show scripttype from objects list/intro window

This commit is contained in:
Adam Jensen 2023-05-28 16:25:58 +01:00
parent af17997916
commit 602a48dc46
2 changed files with 11 additions and 1 deletions

View File

@ -12,6 +12,7 @@
#if ENABLE_IMGUI
#include "../imgui/imgui.h"
#include "cdcObjects/Object.h"
#include "cdcResource/ResolveSection.h"
#endif
#ifndef _WIN32
@ -274,6 +275,15 @@ uint32_t buildUI(UIActions& uiact, cdc::Object *obj) {
if (ImGui::SmallButton("Hide")) hide = true;
}
if (uint32_t scriptTypeID = obj->dtpData->m_scriptTypeID) {
ImGui::SameLine();
if (ImGui::SmallButton("Type")) {
auto *scriptSection = cdc::g_resolveSections[8];
if (cdc::ScriptType *scriptType = (cdc::ScriptType*)scriptSection->getWrapped(scriptSection->getDomainId(scriptTypeID)))
uiact.select(scriptType);
}
}
for (uint32_t j = 0; j < obj->numModels; j++) {
auto *mesh = obj->models[j]->renderMesh;
if (!mesh)

View File

@ -66,7 +66,7 @@ struct ObjectBaseData {
uint32_t dwordB4;
uint32_t dwordB8;
void *TuneDataPtr; // BC, override data in object by this
uint32_t dwordC0;
uint32_t m_scriptTypeID; // C0
cdc::ObjectBlobAnim **animationsC4;
uint32_t dwordC8;
uint32_t dwordCC;