Files
integration/luprex/core/cpp/textgame.hpp

39 lines
918 B
C++
Raw Normal View History

2021-01-22 19:10:47 -05:00
#ifndef TEXTGAME_HPP
#define TEXTGAME_HPP
2021-02-02 16:29:07 -05:00
#include "luaconsole.hpp"
2021-02-16 13:31:34 -05:00
#include "world.hpp"
#include "drivenengine.hpp"
2021-02-16 13:31:34 -05:00
#include <memory>
2021-01-22 19:10:47 -05:00
class TextGame : public DrivenEngine {
2021-01-22 19:10:47 -05:00
private:
2021-02-02 16:29:07 -05:00
using StringVec = LuaConsole::StringVec;
2021-02-16 13:31:34 -05:00
std::unique_ptr<World> world_;
2021-02-02 16:29:07 -05:00
LuaConsole console_;
2021-02-07 13:38:29 -05:00
Gui gui_;
2021-02-16 13:31:34 -05:00
int64_t gui_place_;
2021-03-30 18:35:08 -04:00
int64_t actor_id_;
2021-02-02 16:29:07 -05:00
void do_view_command(const StringVec &cmd);
void do_menu_command(const StringVec &cmd);
void do_choose_command(const StringVec &cmd);
2021-02-07 13:38:29 -05:00
void do_quit_command(const StringVec &cmd);
2021-02-09 17:15:54 -05:00
void do_snapshot_command(const StringVec &cmd);
void do_rollback_command(const StringVec &cmd);
2021-10-13 19:41:59 -04:00
void do_tick_command(const StringVec &cmd);
2021-02-09 17:15:54 -05:00
2021-02-02 16:29:07 -05:00
void do_lua(const std::string &exp);
void do_command(const StringVec &exp);
2021-03-30 18:35:08 -04:00
void check_redirects();
2021-10-05 12:54:37 -04:00
2021-01-22 19:10:47 -05:00
public:
virtual void event_init();
2021-10-05 12:54:37 -04:00
virtual void event_update();
2021-01-22 19:10:47 -05:00
};
#endif // TEXTGAME_HPP