mirror of https://github.com/AxioDL/metaforce.git
Compare commits
2 Commits
e4e6c0c00a
...
db6a1737de
Author | SHA1 | Date |
---|---|---|
Phillip Stephens | db6a1737de | |
Phillip Stephens | d23b6f6904 |
|
@ -813,11 +813,11 @@ static std::string BytesToString(size_t bytes) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGuiConsole::ShowDebugOverlay() {
|
void ImGuiConsole::ShowDebugOverlay() {
|
||||||
if (!m_developer) {
|
if (!m_developer && !m_frameCounter && !m_frameRate && !m_inGameTime && !m_roomTimer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!m_frameCounter && !m_frameRate && !m_inGameTime && !m_roomTimer && !m_playerInfo && !m_areaInfo &&
|
if (!m_playerInfo && !m_areaInfo && !m_worldInfo && !m_randomStats && !m_resourceStats && !m_pipelineInfo &&
|
||||||
!m_worldInfo && !m_randomStats && !m_resourceStats && !m_pipelineInfo && !m_drawCallInfo && !m_bufferInfo) {
|
!m_drawCallInfo && !m_bufferInfo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
@ -867,7 +867,7 @@ void ImGuiConsole::ShowDebugOverlay() {
|
||||||
ImGuiStringViewText(fmt::format(FMT_STRING("Room Time: {:7.3f} / {:5d} | Last Room:{:7.3f} / {:5d}\n"),
|
ImGuiStringViewText(fmt::format(FMT_STRING("Room Time: {:7.3f} / {:5d} | Last Room:{:7.3f} / {:5d}\n"),
|
||||||
currentRoomTime, curFrames, m_lastRoomTime, lastFrames));
|
currentRoomTime, curFrames, m_lastRoomTime, lastFrames));
|
||||||
}
|
}
|
||||||
if (m_playerInfo && g_StateManager != nullptr && g_StateManager->Player() != nullptr) {
|
if (m_playerInfo && g_StateManager != nullptr && g_StateManager->Player() != nullptr && m_developer) {
|
||||||
if (hasPrevious) {
|
if (hasPrevious) {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,7 @@ void ImGuiConsole::ShowDebugOverlay() {
|
||||||
pl.GetVelocity().y(), pl.GetVelocity().z(), camXf.origin.x(), camXf.origin.y(), camXf.origin.z(),
|
pl.GetVelocity().y(), pl.GetVelocity().z(), camXf.origin.x(), camXf.origin.y(), camXf.origin.z(),
|
||||||
zeus::radToDeg(camQ.roll()), zeus::radToDeg(camQ.pitch()), zeus::radToDeg(camQ.yaw())));
|
zeus::radToDeg(camQ.roll()), zeus::radToDeg(camQ.pitch()), zeus::radToDeg(camQ.yaw())));
|
||||||
}
|
}
|
||||||
if (m_worldInfo && g_StateManager != nullptr) {
|
if (m_worldInfo && g_StateManager != nullptr && m_developer) {
|
||||||
if (hasPrevious) {
|
if (hasPrevious) {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
}
|
}
|
||||||
|
@ -900,7 +900,7 @@ void ImGuiConsole::ShowDebugOverlay() {
|
||||||
ImGuiStringViewText(
|
ImGuiStringViewText(
|
||||||
fmt::format(FMT_STRING("World Asset ID: 0x{}, Name: {}\n"), g_GameState->CurrentWorldAssetId(), name));
|
fmt::format(FMT_STRING("World Asset ID: 0x{}, Name: {}\n"), g_GameState->CurrentWorldAssetId(), name));
|
||||||
}
|
}
|
||||||
if (m_areaInfo && g_StateManager != nullptr) {
|
if (m_areaInfo && g_StateManager != nullptr && m_developer) {
|
||||||
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
||||||
if (g_StateManager->GetWorld() != nullptr && g_StateManager->GetWorld()->DoesAreaExist(aId)) {
|
if (g_StateManager->GetWorld() != nullptr && g_StateManager->GetWorld()->DoesAreaExist(aId)) {
|
||||||
if (hasPrevious) {
|
if (hasPrevious) {
|
||||||
|
@ -926,7 +926,7 @@ void ImGuiConsole::ShowDebugOverlay() {
|
||||||
pArea->GetAreaAssetId(), ImGuiLoadStringTable(stringId, 0), pArea->GetAreaId(), layerBits));
|
pArea->GetAreaAssetId(), ImGuiLoadStringTable(stringId, 0), pArea->GetAreaId(), layerBits));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_layerInfo && g_StateManager != nullptr) {
|
if (m_layerInfo && g_StateManager != nullptr && m_developer) {
|
||||||
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
const metaforce::TAreaId aId = g_GameState->CurrentWorldState().GetCurrentAreaId();
|
||||||
const auto* world = g_StateManager->GetWorld();
|
const auto* world = g_StateManager->GetWorld();
|
||||||
if (world != nullptr && world->DoesAreaExist(aId) && world->GetWorldLayers()) {
|
if (world != nullptr && world->DoesAreaExist(aId) && world->GetWorldLayers()) {
|
||||||
|
@ -956,7 +956,7 @@ void ImGuiConsole::ShowDebugOverlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_randomStats) {
|
if (m_randomStats && m_developer) {
|
||||||
if (hasPrevious) {
|
if (hasPrevious) {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
}
|
}
|
||||||
|
@ -1058,7 +1058,8 @@ void ImGuiConsole::ShowInputViewer() {
|
||||||
ImGui::SetNextWindowBgAlpha(0.65f);
|
ImGui::SetNextWindowBgAlpha(0.65f);
|
||||||
if (ImGui::Begin("Input Overlay", nullptr, windowFlags)) {
|
if (ImGui::Begin("Input Overlay", nullptr, windowFlags)) {
|
||||||
/* If the position has changed and we're not in a corner, grab it and store it */
|
/* If the position has changed and we're not in a corner, grab it and store it */
|
||||||
if (m_inputOverlayCorner == -1 && (ImGui::GetWindowPos().x != m_inputOverlayPos.x() || ImGui::GetWindowPos().y != m_inputOverlayPos.y())) {
|
if (m_inputOverlayCorner == -1 &&
|
||||||
|
(ImGui::GetWindowPos().x != m_inputOverlayPos.x() || ImGui::GetWindowPos().y != m_inputOverlayPos.y())) {
|
||||||
m_inputOverlayPos = ImGui::GetWindowPos();
|
m_inputOverlayPos = ImGui::GetWindowPos();
|
||||||
m_cvarCommons.m_debugInputOverlayPos->fromVec2f(m_inputOverlayPos);
|
m_cvarCommons.m_debugInputOverlayPos->fromVec2f(m_inputOverlayPos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue