Added get_animation_queue to DrivenEngine

This commit is contained in:
2023-07-24 17:21:44 -04:00
parent 5db04b3abc
commit ab005fc968
7 changed files with 89 additions and 0 deletions

View File

@@ -445,6 +445,22 @@ void DrivenEngine::drv_get_animation_queue_hashes(uint32_t count, const int64_t
}
}
void DrivenEngine::drv_get_animation_queue(uint64_t tanid, uint32_t *count, AnimEntry **entries) {
uint32_t hash1 = eng::memhash();
anim_queue_result_.clear();
if ((visible_world_ != 0) && (tanid != 0)) {
visible_world_->get_animation_queue(tanid, &anim_queue_result_);
}
*count = anim_queue_result_.size();
if (count > 0) {
*entries = &(anim_queue_result_[0]);
} else {
*entries = nullptr;
}
uint32_t hash2 = eng::memhash();
assert(hash1 == hash2);
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
@@ -578,6 +594,10 @@ static void drv_get_animation_queue_hashes(EngineWrapper *w, uint32_t count, con
return w->engine->drv_get_animation_queue_hashes(count, ids, hashes);
}
static void drv_get_animation_queue(EngineWrapper *w, int64_t tanid, uint32_t *count, EngineWrapper::AnimEntry **entries) {
return w->engine->drv_get_animation_queue(tanid, count, entries);
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
@@ -975,6 +995,7 @@ static void init_engine_wrapper_helper(EngineWrapper *w) {
w->get_actor_id = drv_get_actor_id;
w->get_tangibles_near = drv_get_tangibles_near;
w->get_animation_queue_hashes = drv_get_animation_queue_hashes;
w->get_animation_queue = drv_get_animation_queue;
w->play_initialize = play_initialize;
w->play_clear_new_outgoing = play_clear_new_outgoing;