Add area ID/name to Area Info debug overlay

This commit is contained in:
Luke Street 2021-05-30 19:57:18 -04:00
parent b4268f7504
commit bed05b1357
1 changed files with 8 additions and 3 deletions

View File

@ -578,10 +578,15 @@ void ImGuiConsole::ShowDebugOverlay() {
layerBits += "0"; layerBits += "0";
} }
} }
ImGuiStringViewText(fmt::format(FMT_STRING("Area AssetId: 0x{}, Total Objects: {}\n" CGameArea* pArea = g_StateManager->GetWorld()->GetArea(aId);
CAssetId stringId = pArea->IGetStringTableAssetId();
if (!stringTables.contains(stringId)) {
stringTables[stringId] = g_SimplePool->GetObj(SObjectTag{SBIG('STRG'), stringId});
}
ImGuiStringViewText(fmt::format(FMT_STRING("Area ID: {} Name: {}\nArea AssetId: 0x{}, Total Objects: {}\n"
"Active Layer bits: {}\n"), "Active Layer bits: {}\n"),
g_StateManager->GetWorld()->GetArea(aId)->GetAreaAssetId(), pArea->GetAreaId(), ReadUtf8String(stringTables[stringId].GetObj(), 0),
g_StateManager->GetAllObjectList().size(), layerBits)); pArea->GetAreaAssetId(), g_StateManager->GetAllObjectList().size(), layerBits));
hasPrevious = true; hasPrevious = true;
} }
} }