diff options
| -rw-r--r-- | editor/editor.cpp | 18 | ||||
| -rw-r--r-- | src/game.cpp | 8 |
2 files changed, 15 insertions, 11 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp index 0c6f811..b5a47cf 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -714,7 +714,7 @@ void RecordImGuiCameras() { ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg }; - if (ImGui::BeginTable("Entities", 9, tableFlags)) { + if (ImGui::BeginTable("Entities", 8, tableFlags)) { ImGui::TableSetupColumn("Interact"); ImGui::TableSetupColumn("CameraHandle"); ImGui::TableSetupColumn("Target"); @@ -751,13 +751,17 @@ void RecordImGuiCameras() { ImGui::TableSetColumnIndex(1); ImGui::Text("0x%016lX", cam.handle.hash); ImGui::TableSetColumnIndex(2); - ImGui::Text("0x%p", cam.phys.targetInst); + if (cam.phys.targetInst != nullptr) { + ImGui::Text("0x%016lX", cam.phys.targetInst->entHandle.hash); + } else { + ImGui::Text("0x%p", cam.phys.targetInst); + } ImGui::TableSetColumnIndex(3); - ImGui::Text("%hhu", cam.type); + ImGui::Text("%hhu", (unsigned char)cam.type); ImGui::TableSetColumnIndex(4); - ImGui::Text("%hhu", cam.view); + ImGui::Text("%hhu", (unsigned char)cam.view); ImGui::TableSetColumnIndex(5); - ImGui::Text("%hhu", cam.stale); + ImGui::Text("%hhu", (unsigned char)cam.stale); ImGui::TableSetColumnIndex(6); ImGui::Text("%i", cam.isPrimary); ImGui::TableSetColumnIndex(7); @@ -977,7 +981,7 @@ void RecordImGuiLevels() { ImGui::TableSetColumnIndex(0); ImGui::Text("%s", LEVELS[i].name); ImGui::TableSetColumnIndex(1); - ImGui::Text("0x%04hx", LEVELS[i].levelHandle); + ImGui::Text("0x%04hx", static_cast<unsigned short>(LEVELS[i].levelHandle)); ImGui::TableSetColumnIndex(2); ImGui::Text("%u", LEVELS[i].cameras.next - 1); } @@ -1108,7 +1112,7 @@ void RecordImGui_CompInstPos(bool readonly, CompInstance *component) { ImGui::InputScalar("Phys - Motion State", ImGuiDataType_U64, &component->bt.motionState, nullptr, nullptr, "0x%016lX", ImGuiInputTextFlags_ReadOnly); // exclude EntityHandle_MAX so you can't attach the NullCamera - ImGui::BeginDisabled(ActiveCamera->handle == component->entHandle || ActiveCamera->handle == EntityHandle_MAX || ActiveCamera->phys.inst == nullptr || ActiveCamera->phys.inst == CAFE_BABE(CompInstance)); + ImGui::BeginDisabled(ActiveCamera->handle == component->entHandle || ActiveCamera->handle == EntityHandle_MAX || ActiveCamera->phys.inst == nullptr || ActiveCamera->phys.inst == CAFE_BABE(CompInstance) || PkeCamera_Get(selectedEntity->entHandle) != nullptr); if (ImGui::Button("Attach Active Camera")) { PkeCamera_AttachToInstance(ActiveCamera->camHandle, component); } diff --git a/src/game.cpp b/src/game.cpp index 565f1ce..8c2bc2a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -182,7 +182,7 @@ void ParseCamera(PkeLevel *level, std::ifstream &stream) { instPos.mass = 1.f; instPos.posRot.setIdentity(); instPos.scale = btVector3(1.f, 1.f, 1.f); - fprintf(stdout, "[ParseCamera] Failed to find instance mapping. Is this an outdated parse?"); + fprintf(stdout, "[ParseCamera] Failed to find instance mapping. Is this an outdated parse?\n"); } else { instPos = loadFileInstanceMappings.data[instanceIndex].newInstance; } @@ -276,7 +276,7 @@ void ParseInstance(Entity_Base *parentEntity, std::ifstream &stream) { mapping.newEnt = reinterpret_cast<CreateInst*>(etPtr->createInstanceCallback.func)(); } else { mapping.newEnt = EntityType_CreateGenericInstance(etPtr, parentEntity, &comp, &mapping.newInstance); - fprintf(stdout ,"[Game::ParseInstance] No callback func to create instance."); + fprintf(stdout ,"[Game::ParseInstance] Debug: entTypeCode '%s' does not have a registered callback func to handle instance creation.\n", entTypeCode); } } if (mapping.newEnt != nullptr) { @@ -449,9 +449,9 @@ void Game_SaveSceneFile(const char *sceneFilePath) { errF << stream.str(); errF.flush(); errF.close(); - fprintf(stderr, "Failed to save scene file '%s', partial output saved to '%s'", sceneFilePath, errFileName); + fprintf(stderr, "Failed to save scene file '%s', partial output saved to '%s'\n", sceneFilePath, errFileName); } else { - fprintf(stderr, "Failed to save scene file '%s' and also failed to write failed output", sceneFilePath); + fprintf(stderr, "Failed to save scene file '%s' and also failed to write failed output\n", sceneFilePath); } } } |
