Add LpxClient/LpxServer stubs, add dispatcher to main
This commit is contained in:
@@ -15,8 +15,37 @@
|
||||
#include "textgame.hpp"
|
||||
#include "luaconsole.hpp"
|
||||
#include "print.hpp"
|
||||
#include <memory>
|
||||
|
||||
|
||||
class TextGame : public DrivenEngine {
|
||||
private:
|
||||
using StringVec = LuaConsole::StringVec;
|
||||
std::unique_ptr<World> world_;
|
||||
LuaConsole console_;
|
||||
Gui gui_;
|
||||
int64_t gui_place_;
|
||||
int64_t actor_id_;
|
||||
|
||||
void do_view_command(const StringVec &cmd);
|
||||
void do_menu_command(const StringVec &cmd);
|
||||
void do_choose_command(const StringVec &cmd);
|
||||
void do_quit_command(const StringVec &cmd);
|
||||
void do_snapshot_command(const StringVec &cmd);
|
||||
void do_rollback_command(const StringVec &cmd);
|
||||
void do_tick_command(const StringVec &cmd);
|
||||
|
||||
void do_lua(const std::string &exp);
|
||||
void do_command(const StringVec &exp);
|
||||
|
||||
void check_redirects();
|
||||
|
||||
public:
|
||||
virtual void event_init();
|
||||
virtual void event_update();
|
||||
};
|
||||
|
||||
|
||||
// Add another error status.
|
||||
|
||||
static lua_State *globalL = NULL;
|
||||
|
||||
@@ -222,3 +251,6 @@ void TextGame::event_update()
|
||||
}
|
||||
}
|
||||
|
||||
UniqueDrivenEngine make_TextGame() {
|
||||
return UniqueDrivenEngine(new TextGame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user