From 641ef53ba175fdb831b917df0732785ab7613791 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 2 Jan 2021 14:26:44 +1000 Subject: [PATCH] Rename game_1371b0.c to credits.c --- ld/gamefiles.inc | 2 +- src/game/core.c | 12 ++++++------ src/game/{game_1371b0.c => credits.c} | 19 ++++++++----------- src/game/data/data_020df0.c | 2 +- src/game/game_0f09f0.c | 4 ++-- src/game/title.c | 2 +- src/include/game/{game_1371b0.h => credits.h} | 8 ++++---- src/include/game/data/data_020df0.h | 2 +- src/include/game/game_0f09f0.h | 2 +- 9 files changed, 25 insertions(+), 28 deletions(-) rename src/game/{game_1371b0.c => credits.c} (99%) rename src/include/game/{game_1371b0.h => credits.h} (83%) diff --git a/ld/gamefiles.inc b/ld/gamefiles.inc index 5c6bfae5a..8eab69d82 100644 --- a/ld/gamefiles.inc +++ b/ld/gamefiles.inc @@ -137,7 +137,7 @@ build/ROMID/game/sparks/sparks.o (section); \ build/ROMID/game/weather/weather.o (section); \ build/ROMID/game/game_135c70.o (section); \ - build/ROMID/game/game_1371b0.o (section); \ + build/ROMID/game/credits.o (section); \ build/ROMID/game/game_13b670.o (section); \ build/ROMID/game/game_13c510.o (section); \ build/ROMID/game/wallhit.o (section); \ diff --git a/src/game/core.c b/src/game/core.c index 75c23e83f..0e753b019 100644 --- a/src/game/core.c +++ b/src/game/core.c @@ -78,7 +78,7 @@ #include "game/sparks/sparks.h" #include "game/weather/weather.h" #include "game/game_135c70.h" -#include "game/game_1371b0.h" +#include "game/credits.h" #include "game/game_13c510.h" #include "game/bondview.h" #include "game/game_150820.h" @@ -395,12 +395,12 @@ void coreLoadStage(s32 stagenum) // empty } else if (stagenum == STAGE_BOOTPAKMENU) { setCurrentPlayerNum(0); - func0f0f8c98(); + menuInit(); } else if (stagenum == STAGE_4MBMENU) { setCurrentPlayerNum(0); - func0f0f8c98(); + menuInit(); } else if (stagenum == STAGE_CREDITS) { - func0f13b4c4(); + creditsInit(); } else { s32 i; @@ -412,7 +412,7 @@ void coreLoadStage(s32 stagenum) g_Vars.currentplayer->usedowntime = 0; g_Vars.currentplayer->invdowntime = g_Vars.currentplayer->usedowntime; - func0f0f8c98(); + menuInit(); amInit(); currentPlayerInitGunsHeld(); func0f010bb0(); @@ -1480,7 +1480,7 @@ Gfx *coreRender(Gfx *gdl) gdl = func0000b1a8(gdl); gdl = func0000b1d0(gdl); gdl = func0000b330(gdl); - gdl = func0f13b064(gdl); + gdl = creditsRender(gdl); } else { // Normal stages s32 i; diff --git a/src/game/game_1371b0.c b/src/game/credits.c similarity index 99% rename from src/game/game_1371b0.c rename to src/game/credits.c index 0b5f24258..53ba18a3b 100644 --- a/src/game/game_1371b0.c +++ b/src/game/credits.c @@ -14,7 +14,7 @@ #include "game/game_0d4690.h" #include "game/game_0e0770.h" #include "game/game_0f09f0.h" -#include "game/game_1371b0.h" +#include "game/credits.h" #include "game/game_1531a0.h" #include "game/game_166e40.h" #include "game/core.h" @@ -30,9 +30,7 @@ #include "lib/lib_16110.h" #include "types.h" -const u32 var7f1b57c0[] = {0x746c6f61}; -const u32 var7f1b57c4[] = {0x64000000}; - +const char var7f1b57c0[] = "tload"; const char var7f1b57c8[] = "dump"; const char var7f1b57d0[] = "for"; const char var7f1b57d4[] = "flick"; @@ -208,7 +206,6 @@ glabel var7f1b57e4 /* f137428: 03e00008 */ jr $ra /* f13742c: 27bd0040 */ addiu $sp,$sp,0x40 ); - GLOBAL_ASM( glabel func0f137430 .late_rodata @@ -3364,7 +3361,7 @@ glabel func0f13a0e4 /* f13a0f0: 01445023 */ subu $t2,$t2,$a0 /* f13a0f4: 8c654198 */ lw $a1,0x4198($v1) /* f13a0f8: 000a5040 */ sll $t2,$t2,0x1 -/* f13a0fc: 3c0c8008 */ lui $t4,%hi(credits) +/* f13a0fc: 3c0c8008 */ lui $t4,%hi(g_Credits) /* f13a100: 18a00010 */ blez $a1,.L0f13a144 /* f13a104: 28a10011 */ slti $at,$a1,0x11 /* f13a108: 5020000f */ beqzl $at,.L0f13a148 @@ -3376,8 +3373,8 @@ glabel func0f13a0e4 .L0f13a120: /* f13a120: 006e7821 */ addu $t7,$v1,$t6 /* f13a124: 8df84154 */ lw $t8,0x4154($t7) -/* f13a128: 3c088008 */ lui $t0,%hi(credits) -/* f13a12c: 2508f470 */ addiu $t0,$t0,%lo(credits) +/* f13a128: 3c088008 */ lui $t0,%hi(g_Credits) +/* f13a12c: 2508f470 */ addiu $t0,$t0,%lo(g_Credits) /* f13a130: 0018c880 */ sll $t9,$t8,0x2 /* f13a134: 0338c823 */ subu $t9,$t9,$t8 /* f13a138: 0019c840 */ sll $t9,$t9,0x1 @@ -3389,7 +3386,7 @@ glabel func0f13a0e4 /* f13a148: 01254823 */ subu $t1,$t1,$a1 /* f13a14c: 00094840 */ sll $t1,$t1,0x1 /* f13a150: 012a5821 */ addu $t3,$t1,$t2 -/* f13a154: 258cf470 */ addiu $t4,$t4,%lo(credits) +/* f13a154: 258cf470 */ addiu $t4,$t4,%lo(g_Credits) /* f13a158: 016c1021 */ addu $v0,$t3,$t4 /* f13a15c: 03e00008 */ jr $ra /* f13a160: 00000000 */ nop @@ -4549,7 +4546,7 @@ glabel var7f1b5930 ); GLOBAL_ASM( -glabel func0f13b064 +glabel creditsRender .late_rodata glabel var7f1b5934 .word 0xbe86051b @@ -4858,7 +4855,7 @@ glabel var7f1b5948 ); GLOBAL_ASM( -glabel func0f13b4c4 +glabel creditsInit .late_rodata glabel var7f1b594c .word 0x41033333 diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index 0f2a7c39d..e4e01d4e8 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -4565,7 +4565,7 @@ u32 var8007f468 = 0x00000025; u32 var8007f46c = 0x00000000; // 25490 -struct credit credits[] = { +struct credit g_Credits[] = { { 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(2), L_TITLE(0) }, // "perfect dark", "" { 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(3), L_TITLE(4) }, // "beau ner chesluk", "guns and visual orgasms" { 0x00, CREDITSTYLE_R_BIG_R_MED, L_TITLE(5), L_TITLE(6) }, // "jonathan nasty mummery", "mover and shaker" diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index 3cc5e7faa..62271d323 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -21,7 +21,7 @@ #include "game/menu/items.h" #include "game/game_0f09f0.h" #include "game/game_107fb0.h" -#include "game/game_1371b0.h" +#include "game/credits.h" #include "game/game_1531a0.h" #include "game/game_166e40.h" #include "game/core.h" @@ -8930,7 +8930,7 @@ glabel func0f0f8bb4 ); GLOBAL_ASM( -glabel func0f0f8c98 +glabel menuInit .late_rodata glabel var7f1b29fc .word 0xc0490fdb diff --git a/src/game/title.c b/src/game/title.c index f2209907e..98f964d59 100644 --- a/src/game/title.c +++ b/src/game/title.c @@ -14,7 +14,7 @@ #include "game/game_0b3350.h" #include "game/game_111600.h" #include "game/game_127910.h" -#include "game/game_1371b0.h" +#include "game/credits.h" #include "game/bondview.h" #include "game/game_1531a0.h" #include "game/game_166e40.h" diff --git a/src/include/game/game_1371b0.h b/src/include/game/credits.h similarity index 83% rename from src/include/game/game_1371b0.h rename to src/include/game/credits.h index c373f4d91..1652fe459 100644 --- a/src/include/game/game_1371b0.h +++ b/src/include/game/credits.h @@ -1,5 +1,5 @@ -#ifndef _IN_GAME_GAME_1371B0_H -#define _IN_GAME_GAME_1371B0_H +#ifndef _IN_GAME_CREDITS_H +#define _IN_GAME_CREDITS_H #include #include "types.h" @@ -24,8 +24,8 @@ u32 func0f13a164(void); u32 func0f13a3ec(void); u32 func0f13ae04(void); u32 func0f13ae0c(void); -Gfx *func0f13b064(Gfx *gdl); -void func0f13b4c4(void); +Gfx *creditsRender(Gfx *gdl); +void creditsInit(void); void func0f13b660(void); #endif diff --git a/src/include/game/data/data_020df0.h b/src/include/game/data/data_020df0.h index 7b45903b3..a24763777 100644 --- a/src/include/game/data/data_020df0.h +++ b/src/include/game/data/data_020df0.h @@ -162,7 +162,7 @@ extern u32 var8007f410; extern u32 var8007f450; extern u32 var8007f468; extern u32 var8007f46c; -extern struct credit credits[]; +extern struct credit g_Credits[]; extern u32 var8007f6c4; extern u32 var8007f6d4; extern u32 var8007f6d8; diff --git a/src/include/game/game_0f09f0.h b/src/include/game/game_0f09f0.h index c6da6c377..09989548a 100644 --- a/src/include/game/game_0f09f0.h +++ b/src/include/game/game_0f09f0.h @@ -63,7 +63,7 @@ void func0f0f85e0(struct menudialog *dialog, s32 root); u32 func0f0f8634(void); u32 func0f0f86a8(void); void func0f0f8bb4(u8 *arg0, u32 arg1, u32 arg2); -void func0f0f8c98(void); +void menuInit(void); u32 func0f0f9030(void); u32 func0f0f935c(void); void func0f0fa574(struct menuframe *frame);