43 lines
893 B
C++
43 lines
893 B
C++
#ifndef VIEWER_HPP
|
|
#define VIEWER_HPP
|
|
|
|
#include "world.hpp"
|
|
#include "animqueue.hpp"
|
|
#include "gui.hpp"
|
|
#include <vector>
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
class Viewer {
|
|
private:
|
|
std::unique_ptr<World> world_;
|
|
|
|
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();
|
|
|
|
// Get the list of tangibles near the player.
|
|
//
|
|
std::vector<int64_t> get_near() { return world_->get_near(1, 100); }
|
|
|
|
// Get the specified tangible.
|
|
//
|
|
const Tangible *tangible_get(int64_t id) { return world_->tangible_get(id); }
|
|
|
|
// Update the GUI for the specified sprite.
|
|
//
|
|
// The gui passed in will be overwritten.
|
|
//
|
|
void update_gui(int64_t id, Gui *g);
|
|
};
|
|
|
|
#endif // VIEWER_HPP
|