mirror of https://github.com/AxioDL/metaforce.git
Update submodules, add room timer
This commit is contained in:
parent
0364d50164
commit
c6593760b1
|
@ -72,6 +72,19 @@ void ViewManager::TestGameView::think() {
|
||||||
auto pt = std::div(igt, 3600);
|
auto pt = std::div(igt, 3600);
|
||||||
overlayText +=
|
overlayText +=
|
||||||
fmt::format(FMT_STRING("PlayTime: {:02d}:{:02d}:{:02d}.{:03d}\n"), pt.quot, pt.rem / 60, pt.rem % 60, ms);
|
fmt::format(FMT_STRING("PlayTime: {:02d}:{:02d}:{:02d}.{:03d}\n"), pt.quot, pt.rem / 60, pt.rem % 60, ms);
|
||||||
|
if (g_StateManager->GetCurrentArea() != nullptr) {
|
||||||
|
if (m_currentRoom != g_StateManager->GetCurrentArea()) {
|
||||||
|
m_currentRoom = static_cast<const void*>(g_StateManager->GetCurrentArea());
|
||||||
|
m_lastRoomTime = igt - m_currentRoomStart;
|
||||||
|
m_currentRoomStart = igt;
|
||||||
|
}
|
||||||
|
double currentRoomTime = igt - m_currentRoomStart;
|
||||||
|
u32 curFrames = std::round(u32(currentRoomTime * 60));
|
||||||
|
u32 lastFrames = std::round(u32(m_lastRoomTime * 60));
|
||||||
|
overlayText += fmt::format(FMT_STRING("Room Time:{:8.3f}/{:6d}| Last Room:{:8.3f}/{:6d}\n"),
|
||||||
|
currentRoomTime, curFrames,
|
||||||
|
m_lastRoomTime, lastFrames);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_StateManager->Player() && m_cvarCommons.m_debugOverlayPlayerInfo->toBoolean()) {
|
if (g_StateManager->Player() && m_cvarCommons.m_debugOverlayPlayerInfo->toBoolean()) {
|
||||||
|
|
|
@ -59,6 +59,9 @@ class ViewManager final : public specter::IViewManager {
|
||||||
ViewManager& m_vm;
|
ViewManager& m_vm;
|
||||||
std::unique_ptr<specter::MultiLineTextView> m_debugText;
|
std::unique_ptr<specter::MultiLineTextView> m_debugText;
|
||||||
hecl::CVarCommons m_cvarCommons;
|
hecl::CVarCommons m_cvarCommons;
|
||||||
|
const void* m_currentRoom = nullptr;
|
||||||
|
double m_lastRoomTime = 0.f;
|
||||||
|
double m_currentRoomStart = 0.f;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TestGameView(ViewManager& vm, specter::ViewResources& res, specter::View& parent, hecl::CVarManager& cvarMgr)
|
TestGameView(ViewManager& vm, specter::ViewResources& res, specter::View& parent, hecl::CVarManager& cvarMgr)
|
||||||
|
|
|
@ -2845,4 +2845,11 @@ void CStateManager::sub_80044098(const CCollisionResponseData& colRespData, cons
|
||||||
TUniqueId uid, const CWeaponMode& weaponMode, u32 w1, u8 thermalFlags) {
|
TUniqueId uid, const CWeaponMode& weaponMode, u32 w1, u8 thermalFlags) {
|
||||||
// TODO implement
|
// TODO implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CGameArea* CStateManager::GetCurrentArea() const {
|
||||||
|
if (x850_world == nullptr || x850_world->GetCurrentAreaId() == kInvalidAreaId) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return x850_world->GetAreaAlways(x850_world->GetCurrentAreaId());
|
||||||
|
};
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
|
@ -464,6 +464,7 @@ public:
|
||||||
void sub_80044098(const CCollisionResponseData& colRespData, const CRayCastResult& rayCast, TUniqueId uid,
|
void sub_80044098(const CCollisionResponseData& colRespData, const CRayCastResult& rayCast, TUniqueId uid,
|
||||||
const CWeaponMode& weaponMode, u32 w1, u8 thermalFlags);
|
const CWeaponMode& weaponMode, u32 w1, u8 thermalFlags);
|
||||||
|
|
||||||
|
const CGameArea* GetCurrentArea() const;
|
||||||
void SetWarping(bool warp) { m_warping = warp; }
|
void SetWarping(bool warp) { m_warping = warp; }
|
||||||
};
|
};
|
||||||
} // namespace urde
|
} // namespace urde
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit d2e629b1e90b8c0f7b2b44ae065941b18fe3293f
|
Subproject commit 2b75ffed470e6f9287da83bca72039ab2598c261
|
2
nod
2
nod
|
@ -1 +1 @@
|
||||||
Subproject commit 2783337c36bacdf832f78182340e4aa6063dece9
|
Subproject commit d53d6770386b5944a4e65251bde30596332bdc2c
|
Loading…
Reference in New Issue