diff options
| author | Léo Lam <leo@leolam.fr> | 2026-09-28 03:39:31 +0200 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2026-10-13 01:53:08 +0200 |
| commit | fa2b8b7d4738e5ee098fc105adc60e10356dd410 (patch) | |
| tree | 2c8e3a8180401385f6e24c1e26ac58ef839d30c6 /src/KingSystem/System/ProductReporter.cpp | |
| parent | b26086477c7d8897c76e328c89d718b3c02a9ae9 (diff) | |
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)
Diffstat (limited to 'src/KingSystem/System/ProductReporter.cpp')
| -rw-r--r-- | src/KingSystem/System/ProductReporter.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
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; \ |
