From 17aeec4b13d03be0fde61e3a78ad932434f8f2ee Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sun, 26 Feb 2023 23:04:47 -0500 Subject: [PATCH] add greg to gameplay stats (#2544) Co-authored-by: briaguya --- soh/soh/Enhancements/gameplaystats.cpp | 2 ++ soh/soh/Enhancements/gameplaystats.h | 3 ++- soh/src/code/z_parameter.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/gameplaystats.cpp b/soh/soh/Enhancements/gameplaystats.cpp index ddba32d0c..16ccc1044 100644 --- a/soh/soh/Enhancements/gameplaystats.cpp +++ b/soh/soh/Enhancements/gameplaystats.cpp @@ -422,6 +422,7 @@ void SetupDisplayNames() { strcpy(timestampDisplayName[TIMESTAMP_DEFEAT_TWINROVA], "Twinrova Defeated: "); strcpy(timestampDisplayName[TIMESTAMP_DEFEAT_GANONDORF], "Ganondorf Defeated: "); strcpy(timestampDisplayName[TIMESTAMP_DEFEAT_GANON], "Ganon Defeated: "); + strcpy(timestampDisplayName[TIMESTAMP_FOUND_GREG], "Greg Found: "); } void SetupDisplayColors() { @@ -431,6 +432,7 @@ void SetupDisplayColors() { case ITEM_KOKIRI_EMERALD: case ITEM_SONG_SARIA: case ITEM_MEDALLION_FOREST: + case TIMESTAMP_FOUND_GREG: timestampDisplayColor[i] = COLOR_GREEN; break; case ITEM_SONG_BOLERO: diff --git a/soh/soh/Enhancements/gameplaystats.h b/soh/soh/Enhancements/gameplaystats.h index 78bea8b9d..c5b685e32 100644 --- a/soh/soh/Enhancements/gameplaystats.h +++ b/soh/soh/Enhancements/gameplaystats.h @@ -21,7 +21,8 @@ typedef enum { /* 0xA7 */ TIMESTAMP_DEFEAT_TWINROVA, // z_boss_tw.c /* 0xA8 */ TIMESTAMP_DEFEAT_GANONDORF, // z_boss_ganon.c /* 0xA9 */ TIMESTAMP_DEFEAT_GANON, // z_boss_ganon2.c - /* 0xAA */ TIMESTAMP_MAX + /* 0xAA */ TIMESTAMP_FOUND_GREG, // z_parameter.c + /* 0xAB */ TIMESTAMP_MAX }GameplayStatTimestamp; diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 2d22afe6b..c5bbb38ca 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -2581,6 +2581,7 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) { if (item == RG_GREG_RUPEE) { Rupees_ChangeBy(1); Flags_SetRandomizerInf(RAND_INF_GREG_FOUND); + gSaveContext.sohStats.timestamp[TIMESTAMP_FOUND_GREG] = GAMEPLAYSTAT_TOTAL_TIME; return RG_NONE; }