From fa2b8b7d4738e5ee098fc105adc60e10356dd410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 28 Sep 2026 03:39:31 +0200 Subject: Move code to the TUs that match link order and rename files Rename classes and files so that they sort where their code is linked, and move code that is linked inside another TU into that TU's file. | Old | New | TU start | |---|---|---| | ActorAreaInOutSendMessage | AreaInOutSendMessage | 0x710009fa64 | | AreaTagAction | AreaActionBase | 0x7100e21e64 | | sndResource.{h,cpp} | sndSound.{h,cpp} | | | Code | From | To | |---|---|---| | SoundMgr | sndMgr.h | sndSound.h | | PlayReport | PlayReportMgr.cpp | PlayReport.cpp | | PlayReport::addPlayTimes, addPosition | PlayReportMgr.cpp | ProductReporter.cpp | (AI assisted using Claude Fable 5.1 and Claude Opus 5.5) --- src/KingSystem/System/ProductReporter.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/KingSystem/System/ProductReporter.cpp') diff --git a/src/KingSystem/System/ProductReporter.cpp b/src/KingSystem/System/ProductReporter.cpp index 4812734a..194a0b91 100644 --- a/src/KingSystem/System/ProductReporter.cpp +++ b/src/KingSystem/System/ProductReporter.cpp @@ -9,7 +9,7 @@ #include "KingSystem/Camera/CameraMgr.h" #include "KingSystem/Framework/frmFramework.h" #include "KingSystem/Map/mapPlacementMgr.h" -#include "KingSystem/Sound/sndMgr.h" +#include "KingSystem/Sound/sndSound.h" #include "KingSystem/System/PlayReportMgr.h" #include "KingSystem/System/VFR.h" @@ -220,6 +220,31 @@ bool ProductReporter::incrementSceneAndRomWorkTime() { return true; } +void PlayReport::addPlayTimes() { + if (!gdt::Manager::instance()) + return; + + if (!PlayReportMgr::instance()) + return; + + if (!PlayReportMgr::instance()->getReporter()) + return; + + s32 playTime = + PlayReportMgr::instance()->getReporter()->getS32(PlayReportKey::PlayReport_PlayTime); + + s32 allPlayTime = + PlayReportMgr::instance()->getReporter()->getS32(PlayReportKey::PlayReport_AllPlayTime); + + add(sead::SafeString("PlayTime"), u32(playTime)); + add(sead::SafeString("AllPlayTime"), u32(allPlayTime)); +} + +void PlayReport::addPosition(const sead::Vector2f& position) { + add(sead::SafeString("PosX"), position.x); + add(sead::SafeString("PosZ"), position.y); +} + #define PRODUCT_REPORTER_S32_GETTER(NAME, PLAY_REPORT_KEY) \ s32 ProductReporter::NAME() const { \ s32 out = 0; \ -- cgit v1.2.3