From 58fe346b724b7f93ce5753e15a48cd195eb203b7 Mon Sep 17 00:00:00 2001 From: gamemasterplc Date: Sat, 10 Feb 2024 16:06:13 -0600 Subject: [PATCH] Several fixes name of hook variable in HsfObjectData, staticness of XFB_Geometry, default type of object work, staticness and name of commentTbl are all fixed --- config/GMPE01_00/symbols.txt | 4 ++-- include/game/hsfformat.h | 2 +- include/game/object.h | 2 +- src/game/ClusterExec.c | 2 +- src/game/EnvelopeExec.c | 2 +- src/game/fault.c | 2 +- src/game/hsfdraw.c | 6 +++--- src/game/minigame_seq.c | 2 +- src/game/saveload.c | 6 +++--- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/GMPE01_00/symbols.txt b/config/GMPE01_00/symbols.txt index 576f6e43..736138cb 100644 --- a/config/GMPE01_00/symbols.txt +++ b/config/GMPE01_00/symbols.txt @@ -5137,7 +5137,7 @@ VolumeTable = .data:0x801311E8; // type:object size:0x100 scope:local lbl_801312E8 = .data:0x801312E8; // type:object size:0x4D lbl_80131335 = .data:0x80131335; // type:object size:0x1B mgInfoTbl = .data:0x80131350; // type:object size:0xE00 data:2byte -saveComment = .data:0x80132150; // type:object size:0x40 scope:local +commentTbl = .data:0x80132150; // type:object size:0x40 scope:local lbl_80132190 = .data:0x80132190; // type:object size:0xC data:string lbl_8013219C = .data:0x8013219C; // type:object size:0xC data:string lbl_801321A8 = .data:0x801321A8; // type:object size:0xC data:string @@ -5153,7 +5153,7 @@ wrongdisc_en = .data:0x8013839C; // type:object size:0x1384 noreloc jumptable_80139720 = .data:0x80139720; // type:object size:0x34 scope:local bmpMes$493 = .data:0x80139754; // type:object size:0x18 scope:local lbl_8013976C = .data:0x8013976C; // type:object size:0x13 data:string -lbl_8013977F = .data:0x8013977F; // type:object size:0x19 +lbl_8013977F = .data:0x8013977F; // type:object size:0x12 data:string camViewTbl = .data:0x80139798; // type:object size:0x24 scope:local jumptable_801397BC = .data:0x801397BC; // type:object size:0x24 scope:local confettiLightTbl = .data:0x801397E0; // type:object size:0x48 scope:local diff --git a/include/game/hsfformat.h b/include/game/hsfformat.h index 1beae421..3a291ab1 100644 --- a/include/game/hsfformat.h +++ b/include/game/hsfformat.h @@ -286,7 +286,7 @@ typedef struct hsf_object_data { HsfBuffer **vertexShape; u32 clusterCnt; HsfCluster **cluster; - u32 hook; + u32 cenvCnt; HsfCenv *cenv; void *file[2]; } HsfObjectData; diff --git a/include/game/object.h b/include/game/object.h index ba3a68ee..83b891f5 100644 --- a/include/game/object.h +++ b/include/game/object.h @@ -51,7 +51,7 @@ typedef struct om_obj_data { /* 0x40 */ s16 *model; /* 0x44 */ u16 mtncnt; /* 0x48 */ s16 *motion; -/* 0x4C */ int work[4]; +/* 0x4C */ u32 work[4]; /* 0x5C */ void *data; } omObjData; diff --git a/src/game/ClusterExec.c b/src/game/ClusterExec.c index f1494664..57fb5ef0 100644 --- a/src/game/ClusterExec.c +++ b/src/game/ClusterExec.c @@ -119,7 +119,7 @@ void ClusterProc(ModelData *arg0) { temp_r31 = temp_r23->object; temp_r31 += var_r29->target; Vertextop = temp_r31->data.vertex->data; - if (temp_r31->data.hook) { + if (temp_r31->data.cenvCnt) { for (k = 0; k < temp_r31->data.vertex->count; k++) { Vertextop[k].x = ((Vec*) temp_r31->data.file[0])[k].x; Vertextop[k].y = ((Vec*) temp_r31->data.file[0])[k].y; diff --git a/src/game/EnvelopeExec.c b/src/game/EnvelopeExec.c index b67b1117..cf417b01 100644 --- a/src/game/EnvelopeExec.c +++ b/src/game/EnvelopeExec.c @@ -179,7 +179,7 @@ static void SetEnvelopMain(HsfData *arg0) { normtop = var_r31->data.file[1]; normenv = temp_r28->data; var_r25 = var_r31->data.cenv; - for (j = 0; j < var_r31->data.hook; j++, var_r25++) { + for (j = 0; j < var_r31->data.cenvCnt; j++, var_r25++) { SetEnvelop(var_r25); } sp10 = temp_r30->data; diff --git a/src/game/fault.c b/src/game/fault.c index 4f8a8b6c..f6043a78 100644 --- a/src/game/fault.c +++ b/src/game/fault.c @@ -25,7 +25,7 @@ static RGBColor XFB_Colors[5] = { #include "Ascii8x8_1bpp.inc" -XFBGeometry XFB_Geometry; +static XFBGeometry XFB_Geometry; static s32 (*XFB_putc)(u8 c, s32 x, s32 y); diff --git a/src/game/hsfdraw.c b/src/game/hsfdraw.c index 9be7868f..ab4dfb55 100755 --- a/src/game/hsfdraw.c +++ b/src/game/hsfdraw.c @@ -240,7 +240,7 @@ static void objMesh(ModelData *arg0, HsfObject *arg1) { temp_r25 = arg1->constData; if (!(temp_r25->flags & 0x1000)) { if (CancelTRXF == 0) { - if (arg1->data.hook != 0 && hookIdx == -1) { + if (arg1->data.cenvCnt != 0 && hookIdx == -1) { temp_r21 = arg1 - temp_r20->object; PSMTXConcat(MTXBuf[0], temp_r20->matrix->data[temp_r21 + temp_r20->matrix->base_idx], MTXBuf[MTXIdx]); } else { @@ -2770,7 +2770,7 @@ static s32 MakeCalcNBT(HsfObject *arg0, HsfFace *arg1, s16 arg2, s16 arg3) { temp_r27 = arg1->indices[arg2][1]; temp_r25 = arg1->indices[arg2][0]; temp_r24 = arg1->indices[arg3][0]; - if (arg0->data.hook != 0) { + if (arg0->data.cenvCnt != 0) { temp_r29 = arg0->data.normal->data; sp10.x = temp_r29[temp_r27].x; sp10.y = temp_r29[temp_r27].y; @@ -2801,7 +2801,7 @@ static s32 MakeNBT(HsfObject *arg0, HsfFace *arg1, s16 arg2, s16 arg3) { spC = arg0->data.vertex->data; temp_r28 = arg1->indices[arg2][1]; - if (arg0->data.hook != 0) { + if (arg0->data.cenvCnt != 0) { temp_r30 = arg0->data.normal->data; sp10.x = temp_r30[temp_r28].x; sp10.y = temp_r30[temp_r28].y; diff --git a/src/game/minigame_seq.c b/src/game/minigame_seq.c index 0c030084..a4a7f58a 100644 --- a/src/game/minigame_seq.c +++ b/src/game/minigame_seq.c @@ -3556,7 +3556,7 @@ void MGSeqPracticeExitCheck(omObjData *object) s16 input; s16 i; mgQuitExtraF = 0; - if((u32)object->work[0] == 0) { + if(object->work[0] == 0) { if(omMgIndexGet(omcurovl) == -1) { omDelObjEx(HuPrcCurrentGet(), object); return; diff --git a/src/game/saveload.c b/src/game/saveload.c index e3277ebb..0c5c5c26 100644 --- a/src/game/saveload.c +++ b/src/game/saveload.c @@ -27,7 +27,7 @@ s32 saveExecF; u8 curBoxNo; s16 curSlotNo; -u8 saveComment[2][32] = { +static u8 commentTbl[2][32] = { "Mario Party 4", "File 0 00/00/0000" }; @@ -258,10 +258,10 @@ void SLSaveDataMake(s32 erase, OSTime *time) { } } for (i = 0; i < 0x20; i++) { - buf[i] = (&saveComment[0][0])[i]; + buf[i] = (&commentTbl[0][0])[i]; } for (i = 0; i < 0x20; i++) { - (&buf[0x20])[i] = (&saveComment[0][0])[i+32]; + (&buf[0x20])[i] = (&commentTbl[0][0])[i+32]; } anim_data = HuSprAnimReadFile(WIN_CARD_BANNER_ANM); memcpy(buf + offsetof(SaveBufData, banner), anim_data->bmp->data, CARD_BANNER_WIDTH*CARD_BANNER_HEIGHT);