Add LpxClient/LpxServer stubs, add dispatcher to main
This commit is contained in:
38
luprex/core/cpp/lpxclient.cpp
Normal file
38
luprex/core/cpp/lpxclient.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "lpxclient.hpp"
|
||||
|
||||
#include "drivenengine.hpp"
|
||||
#include "world.hpp"
|
||||
#include "luaconsole.hpp"
|
||||
#include "invocation.hpp"
|
||||
#include <memory>
|
||||
|
||||
class LpxClient : public DrivenEngine {
|
||||
public:
|
||||
using StringVec = LuaConsole::StringVec;
|
||||
std::unique_ptr<World> world_;
|
||||
int64_t actor_id_;
|
||||
InvocationQueue unack_;
|
||||
Channel *channel_;
|
||||
LuaConsole console_;
|
||||
Gui gui_;
|
||||
int64_t gui_place_;
|
||||
|
||||
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_lua(const std::string &exp);
|
||||
void do_command(const StringVec &exp);
|
||||
|
||||
public:
|
||||
virtual void event_init() {
|
||||
}
|
||||
|
||||
virtual void event_update() {
|
||||
}
|
||||
};
|
||||
|
||||
UniqueDrivenEngine make_LpxClient() {
|
||||
return UniqueDrivenEngine(new LpxClient);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user