2021-01-18 00:48:42 -05:00
|
|
|
#ifndef VIEWER_HPP
|
|
|
|
|
#define VIEWER_HPP
|
|
|
|
|
|
2021-01-22 17:35:23 -05:00
|
|
|
#include "world.hpp"
|
|
|
|
|
#include "animqueue.hpp"
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
2021-01-18 00:48:42 -05:00
|
|
|
class Viewer {
|
2021-01-22 17:35:23 -05:00
|
|
|
private:
|
|
|
|
|
std::unique_ptr<World> world_;
|
2021-01-22 19:10:47 -05:00
|
|
|
AnimViewMap view_map_;
|
2021-01-22 17:35:23 -05:00
|
|
|
|
2021-01-18 00:48:42 -05:00
|
|
|
public:
|
2021-01-22 17:35:23 -05:00
|
|
|
Viewer();
|
|
|
|
|
~Viewer();
|
2021-01-18 00:48:42 -05:00
|
|
|
|
2021-01-22 17:35:23 -05:00
|
|
|
// Get the lua state for interaction.
|
|
|
|
|
//
|
|
|
|
|
lua_State *get_lua_state() { return world_->get_lua_state(); }
|
2021-01-22 19:10:47 -05:00
|
|
|
|
2021-01-18 00:48:42 -05:00
|
|
|
// Get the player ID of the current player.
|
|
|
|
|
//
|
|
|
|
|
int64_t get_player_id();
|
|
|
|
|
|
2021-01-22 19:10:47 -05:00
|
|
|
// Update the view map.
|
2021-01-18 00:48:42 -05:00
|
|
|
//
|
2021-01-22 19:10:47 -05:00
|
|
|
void update_view_map() { world_->update_view_map(&view_map_, 1, 100); }
|
2021-01-18 00:48:42 -05:00
|
|
|
|
2021-01-22 19:10:47 -05:00
|
|
|
// Get the view map.
|
2021-01-18 00:48:42 -05:00
|
|
|
//
|
2021-02-02 16:29:07 -05:00
|
|
|
AnimViewMap &get_view_map() { return view_map_; }
|
2021-01-18 00:48:42 -05:00
|
|
|
|
|
|
|
|
// Get the menu of the specified tangible.
|
|
|
|
|
//
|
|
|
|
|
std::vector<std::string> get_menu(int64_t id);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // VIEWER_HPP
|