In process of adding luaconsole.cpp

This commit is contained in:
2021-01-23 16:10:29 -05:00
parent b85e92343f
commit b897c10506
33 changed files with 264 additions and 191 deletions

48
luprex/cpp/viewer.hpp Normal file
View File

@@ -0,0 +1,48 @@
#ifndef VIEWER_HPP
#define VIEWER_HPP
#include "world.hpp"
#include "animqueue.hpp"
#include <vector>
#include <string>
#include <memory>
class Viewer {
private:
std::unique_ptr<World> world_;
AnimViewMap view_map_;
public:
Viewer();
~Viewer();
// Get the lua state for interaction.
//
lua_State *get_lua_state() { return world_->get_lua_state(); }
// Get the player ID of the current player.
//
int64_t get_player_id();
// Update the view map.
//
void update_view_map() { world_->update_view_map(&view_map_, 1, 100); }
// Get the view map.
//
const AnimViewMap &get_view_map() { return view_map_; }
// Get the menu of the specified tangible.
//
std::vector<std::string> get_menu(int64_t id);
// Select the specified menu item.
//
void choose_menu_item(int64_t id, const std::string &item);
// Advance the simulation clock. Called 1/sec.
//
void advance_clock();
};
#endif // VIEWER_HPP