From 034b19ea16f6d437d9abf9f2b5544ebeb7a96f9b Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 3 Jan 2020 17:13:41 +1000 Subject: [PATCH] Rename gvars360 to propstate and name properties as per XBLA debug data --- src/game/game_0601b0.c | 4 ++-- src/include/gvars/gvars.h | 2 +- src/include/types.h | 21 +++++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/game/game_0601b0.c b/src/game/game_0601b0.c index a32a9264a..d3c9c460e 100644 --- a/src/game/game_0601b0.c +++ b/src/game/game_0601b0.c @@ -382,9 +382,9 @@ glabel func0f060358 void func0f060438(struct prop *prop) { if (prop->type == PROPTYPE_CHR) { - g_Vars.unk000360[prop->index].chrpropcount--; + g_Vars.propstates[prop->propstateindex].chrpropcount--; } else { - g_Vars.unk000360[prop->index].nonchrpropcount--; + g_Vars.propstates[prop->propstateindex].propcount--; } prop->next = g_Vars.unk000344; diff --git a/src/include/gvars/gvars.h b/src/include/gvars/gvars.h index a6fa1caff..73c9d2e48 100644 --- a/src/include/gvars/gvars.h +++ b/src/include/gvars/gvars.h @@ -97,7 +97,7 @@ struct g_vars { /*000354*/ struct prop *unk000354; /*000358*/ u32 unk000358; /*00035c*/ u32 unk00035c; - /*000360*/ struct gvars360 unk000360[2]; // may also start at 35c or 358 with props moved forward + /*000360*/ struct propstate propstates[2]; /*000398*/ u32 unk000398; /*00039c*/ u32 unk00039c; /*0003a0*/ u32 unk0003a0; diff --git a/src/include/types.h b/src/include/types.h index 09f69c312..6ca9fe6aa 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -47,7 +47,7 @@ struct prop { s16 unk38; s16 unk3a; u8 unk3c; - u8 index; + u8 propstateindex; u8 unk3e; u8 unk3f_00 : 1; u8 unk3f_01 : 1; @@ -3923,15 +3923,16 @@ struct savefile_solo { /*0xac*/ u8 firingrangescores[4]; }; -struct gvars360 { - u16 nonchrpropcount; - u16 chrpropcount; - u32 unk04; - u32 unk08; - u32 unk0c; - u32 unk10; - u32 unk14; - u32 unk18; +struct propstate { + /*0x00*/ u16 propcount; + /*0x02*/ u16 chrpropcount; + /*0x04*/ u16 foregroundpropcount; + /*0x06*/ u16 foregroundchrpropcount; + /*0x08*/ u32 updatetime; + /*0x0c*/ u32 chrupdatetime; + /*0x10*/ u32 slotupdate240; + /*0x14*/ u32 slotupdate60error; + /*0x18*/ u32 lastupdateframe; }; struct options {