Viewer is ready to go, I think

This commit is contained in:
2021-01-22 17:35:23 -05:00
parent 351b923d68
commit b0440a4e12
11 changed files with 234 additions and 34 deletions

View File

@@ -1,19 +1,39 @@
#ifndef VIEWER_HPP
#define VIEWER_HPP
class Viewer {
public:
// Initialize a standalone game.
//
void init_standalone();
#include "world.hpp"
#include "animqueue.hpp"
#include <vector>
#include <string>
#include <unordered_map>
#include <memory>
class Viewer {
private:
std::unique_ptr<World> world_;
std::vector<int64_t> tangibles_;
std::unordered_map<int64_t, AnimView> anim_view_;
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.
//
void update_view();
// Get a list of the tangibles in viewing radius of the player.
//
std::vector<int64_t> get_tangibles_near_player();
const std::vector<int64_t> &get_tangibles_near_player();
// Get the animation viewer of the specified tangible.
//