mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
Update submodules, add room timer
This commit is contained in:
@@ -72,6 +72,19 @@ void ViewManager::TestGameView::think() {
|
||||
auto pt = std::div(igt, 3600);
|
||||
overlayText +=
|
||||
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()) {
|
||||
|
||||
@@ -59,6 +59,9 @@ class ViewManager final : public specter::IViewManager {
|
||||
ViewManager& m_vm;
|
||||
std::unique_ptr<specter::MultiLineTextView> m_debugText;
|
||||
hecl::CVarCommons m_cvarCommons;
|
||||
const void* m_currentRoom = nullptr;
|
||||
double m_lastRoomTime = 0.f;
|
||||
double m_currentRoomStart = 0.f;
|
||||
|
||||
public:
|
||||
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) {
|
||||
// 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
|
||||
|
||||
@@ -464,6 +464,7 @@ public:
|
||||
void sub_80044098(const CCollisionResponseData& colRespData, const CRayCastResult& rayCast, TUniqueId uid,
|
||||
const CWeaponMode& weaponMode, u32 w1, u8 thermalFlags);
|
||||
|
||||
const CGameArea* GetCurrentArea() const;
|
||||
void SetWarping(bool warp) { m_warping = warp; }
|
||||
};
|
||||
} // namespace urde
|
||||
|
||||
2
hecl
2
hecl
Submodule hecl updated: d2e629b1e9...2b75ffed47
2
nod
2
nod
Submodule nod updated: 2783337c36...d53d677038
Reference in New Issue
Block a user