49 lines
999 B
C++
49 lines
999 B
C++
#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
|