Refactor to remove dependency of DrivenEngine on World
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#include "source.hpp"
|
||||
#include "luasnap.hpp"
|
||||
|
||||
struct EngineWrapper;
|
||||
|
||||
enum WorldType {
|
||||
WORLD_TYPE_MASTER = 1,
|
||||
WORLD_TYPE_PREDICTIVE = 2,
|
||||
@@ -169,11 +171,21 @@ public:
|
||||
//
|
||||
void get_near(int64_t player_id, float radius, bool exclude_nowhere, bool omit_player, bool sorted, IdVector *into) const;
|
||||
|
||||
// get encoded animation queues.
|
||||
// Get tangibles near the specified tangible.
|
||||
//
|
||||
// This is used by the graphics engine to get the animation queues.
|
||||
// Returns a count and pointer to an array of tangible IDs. The
|
||||
// returned pointer remains valid until the next call to
|
||||
// get_tangibles_near.
|
||||
//
|
||||
void get_encoded_animation_queues(uint32_t count, const int64_t *ids, util::SharedStdStringVec &into);
|
||||
void get_tangibles_near(uint64_t tanid, double rx, double ry, double rz, uint32_t *count, int64_t **ids);
|
||||
|
||||
// Get the animation queues for the specified tangibles.
|
||||
//
|
||||
// For each tangible ID, returns the animation queue as a serialized
|
||||
// string via lengths/strings output arrays. The returned pointers
|
||||
// remain valid until the next call to get_animation_queues.
|
||||
//
|
||||
void get_animation_queues(uint32_t count, const int64_t *ids, uint32_t *lengths, const char **strings);
|
||||
|
||||
// Make a tangible.
|
||||
//
|
||||
@@ -309,6 +321,10 @@ public:
|
||||
//
|
||||
void run_unittests();
|
||||
|
||||
// Install this world into an EngineWrapper's function pointers.
|
||||
//
|
||||
void expose_world_to_driver(EngineWrapper *w);
|
||||
|
||||
// fetch_global_pointer
|
||||
//
|
||||
// Given a lua state, fetch the world model associated with
|
||||
@@ -668,6 +684,12 @@ private:
|
||||
//
|
||||
Redirects redirects_;
|
||||
|
||||
// Storage for wrapper_get_tangibles_near and wrapper_get_animation_queues.
|
||||
// These hold results alive while the driver reads from the raw pointers.
|
||||
//
|
||||
util::IdVector wrapper_scan_result_;
|
||||
util::SharedStdStringVec wrapper_anim_queues_;
|
||||
|
||||
// lthread variables: see set_lthread_state for explanation.
|
||||
//
|
||||
int64_t lthread_actor_id_;
|
||||
|
||||
Reference in New Issue
Block a user