From 3bb1e430500a327cb759f1b417b754e6898626a2 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 15 Feb 2020 10:19:16 +1000 Subject: [PATCH] Rename some quip related symbols --- src/game/game_02cde0.c | 12 ++++++------ src/gvars/gvars.c | 4 ++-- src/include/game/game_02cde0.h | 4 ++-- src/include/gvars/gvars.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/game/game_02cde0.c b/src/game/game_02cde0.c index 74e1978b1..d30b0a17a 100644 --- a/src/game/game_02cde0.c +++ b/src/game/game_02cde0.c @@ -34922,21 +34922,21 @@ s16 *squadronGetChrIds(s32 squadron_id) return &g_SquadronList[MAX_SQUADRONS - 1]; } -void audioMarkAsRecentlyPlayed(s16 value) +void audioMarkAsRecentlyPlayed(s16 audioid) { - var8009cd70[var8009cd98++] = value; + g_RecentQuipsPlayed[g_RecentQuipsIndex++] = audioid; - if (var8009cd98 > 4) { - var8009cd98 = 0; + if (g_RecentQuipsIndex > 4) { + g_RecentQuipsIndex = 0; } } -bool audioWasNotPlayedRecently(s16 value) +bool audioWasNotPlayedRecently(s16 audioid) { u8 i; for (i = 0; i < 5; i++) { - if (var8009cd70[i] == value) { + if (g_RecentQuipsPlayed[i] == audioid) { return false; } } diff --git a/src/gvars/gvars.c b/src/gvars/gvars.c index dddce8f0f..f7aab5cdc 100644 --- a/src/gvars/gvars.c +++ b/src/gvars/gvars.c @@ -16046,13 +16046,13 @@ u32 var8009cd60 = 0; u32 var8009cd64 = 0; u32 var8009cd68 = 0; u32 var8009cd6c = 0; -s32 var8009cd70[] = {0, 0, 0, 0, 0}; +s32 g_RecentQuipsPlayed[] = {0, 0, 0, 0, 0}; u32 var8009cd84 = 0; u32 var8009cd88 = 0; u32 var8009cd8c = 0; u32 var8009cd90 = 0; u32 var8009cd94 = 0; -u8 var8009cd98 = 0; // index into var8009cd70 +u8 g_RecentQuipsIndex = 0; // index into g_RecentQuipsPlayed u32 var8009cd9c = 0; u32 var8009cda0 = 0; u32 var8009cda4 = 0; diff --git a/src/include/game/game_02cde0.h b/src/include/game/game_02cde0.h index 0c761cf12..aa8c4b6d8 100644 --- a/src/include/game/game_02cde0.h +++ b/src/include/game/game_02cde0.h @@ -329,8 +329,8 @@ bool func0f04c6b4(struct chrdata *chr, u32 distance); bool func0f04c71c(struct chrdata *chr, u32 distance); s16 *teamGetChrIds(s32 team_id); s16 *squadronGetChrIds(s32 squadron_id); -void audioMarkAsRecentlyPlayed(s16 value); -bool audioWasNotPlayedRecently(s16 value); +void audioMarkAsRecentlyPlayed(s16 audioid); +bool audioWasNotPlayedRecently(s16 audioid); void func0f04cf90(struct chrdata *chr, s32 arg1); bool func0f04d44c(struct chrdata *chr); void chrEmitSparks(struct chrdata *chr); diff --git a/src/include/gvars/gvars.h b/src/include/gvars/gvars.h index 227f324a0..a9e07c01d 100644 --- a/src/include/gvars/gvars.h +++ b/src/include/gvars/gvars.h @@ -556,8 +556,8 @@ extern s16 *g_ChrIndexesC; extern u32 var8009cd20; extern u32 var8009cd28; extern u32 var8009cd48; -extern s32 var8009cd70[5]; -extern u8 var8009cd98; +extern s32 g_RecentQuipsPlayed[5]; +extern u8 g_RecentQuipsIndex; extern u32 var8009cda0; extern u32 var8009cda4; extern u32 var8009cdac;