mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Changed some variable names in state_title_screen (#1003)
* Changed some variable names in state_title_screen.c * resolving pull request items * changed TitleData to TitleScreenGfxData across sys * replace gbi names with understandable ones * accidentally switched logo and pressStart * changed GfxData to ImgList * Renaming and b32 * Doing this but more
This commit is contained in:
parent
e599c2e773
commit
86cfc280d5
@ -33,9 +33,11 @@ SaveMetadata gSaveSlotMetadata[4] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
u8 gSaveSlotHasData[4] = {TRUE, TRUE, TRUE, TRUE};
|
u8 gSaveSlotHasData[4] = {TRUE, TRUE, TRUE, TRUE};
|
||||||
s32 D_80077A28 = 0;
|
|
||||||
s32 D_80077A2C = 0;
|
s32 TitleScreen_PressStart_Alpha = 0; // the opacity of "PRESS START" text
|
||||||
s32 D_80077A30 = 0;
|
b32 TitleScreen_PressStart_IsVisible = FALSE; // toggles the visibility of "PRESS START"
|
||||||
|
s32 TitleScreen_PressStart_BlinkCounter = 0; // counts to 16, then toggles TitleScreen_PressStart_IsVisible
|
||||||
|
|
||||||
s32 D_80077A34[1] = {0};
|
s32 D_80077A34[1] = {0};
|
||||||
|
|
||||||
Lights1 D_80077A38 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
|
Lights1 D_80077A38 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
|
||||||
@ -62,19 +64,19 @@ Gfx D_80077A50[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef struct TitleDataStruct {
|
typedef struct TitleDataStruct {
|
||||||
/* 0x0 */ s32 unk_00;
|
/* 0x0 */ s32 logo;
|
||||||
/* 0x4 */ s32 unk_04;
|
/* 0x4 */ s32 copyright;
|
||||||
/* 0x8 */ s32 unk_08;
|
/* 0x8 */ s32 pressStart;
|
||||||
/* 0xC */ s32 img2_pal;
|
/* 0xC */ s32 copyrightPalette;
|
||||||
} TitleDataStruct; // size = 0x10
|
} TitleDataStruct; // size = 0x10
|
||||||
|
|
||||||
extern s16 D_800A0970;
|
extern s16 D_800A0970;
|
||||||
extern TitleDataStruct* D_800A0974;
|
extern TitleDataStruct* TitleScreen_ImgList;
|
||||||
extern s32* D_800A0978;
|
extern s32* TitleScreen_ImgList_Logo;
|
||||||
extern s32* D_800A097C;
|
extern s32* TitleScreen_ImgList_Copyright;
|
||||||
extern s32* D_800A0980;
|
extern s32* TitleScreen_ImgList_PressStart;
|
||||||
#if VERSION_JP
|
#if VERSION_JP
|
||||||
extern s32* JP_800A0980;
|
extern s32* TitleScreen_ImgList_CopyrightPalette;
|
||||||
#endif
|
#endif
|
||||||
extern s16 D_800A0988;
|
extern s16 D_800A0988;
|
||||||
|
|
||||||
@ -102,15 +104,15 @@ void state_init_title_screen(void) {
|
|||||||
gGameStatusPtr->creditsViewportMode = -1;
|
gGameStatusPtr->creditsViewportMode = -1;
|
||||||
intro_logos_update_fade();
|
intro_logos_update_fade();
|
||||||
titleData = load_asset_by_name("title_data", &titleDataSize);
|
titleData = load_asset_by_name("title_data", &titleDataSize);
|
||||||
titleDataDst = D_800A0974 = heap_malloc(titleDataSize);
|
titleDataDst = TitleScreen_ImgList = heap_malloc(titleDataSize);
|
||||||
decode_yay0(titleData, titleDataDst);
|
decode_yay0(titleData, titleDataDst);
|
||||||
general_heap_free(titleData);
|
general_heap_free(titleData);
|
||||||
|
|
||||||
D_800A0978 = (s32*)(D_800A0974->unk_00 + (s32) D_800A0974);
|
TitleScreen_ImgList_Logo = (s32*)(TitleScreen_ImgList->logo + (s32) TitleScreen_ImgList);
|
||||||
D_800A097C = (s32*)(D_800A0974->unk_04 + (s32) D_800A0974);
|
TitleScreen_ImgList_Copyright = (s32*)(TitleScreen_ImgList->copyright + (s32) TitleScreen_ImgList);
|
||||||
D_800A0980 = (s32*)(D_800A0974->unk_08 + (s32) D_800A0974);
|
TitleScreen_ImgList_PressStart = (s32*)(TitleScreen_ImgList->pressStart + (s32) TitleScreen_ImgList);
|
||||||
#if VERSION_JP
|
#if VERSION_JP
|
||||||
JP_800A0980 = (s32*)(D_800A0974->img2_pal + (s32) D_800A0974);
|
TitleScreen_ImgList_CopyrightPalette = (s32*)(TitleScreen_ImgList->copyrightPalette + (s32) TitleScreen_ImgList);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
create_cameras_a();
|
create_cameras_a();
|
||||||
@ -300,9 +302,9 @@ void state_step_title_screen(void) {
|
|||||||
void state_drawUI_title_screen(void) {
|
void state_drawUI_title_screen(void) {
|
||||||
switch (gGameStatusPtr->introState) {
|
switch (gGameStatusPtr->introState) {
|
||||||
case INTRO_STATE_0:
|
case INTRO_STATE_0:
|
||||||
D_80077A28 = 0;
|
TitleScreen_PressStart_Alpha = 0;
|
||||||
D_80077A2C = 0;
|
TitleScreen_PressStart_IsVisible = FALSE;
|
||||||
D_80077A30 = 0;
|
TitleScreen_PressStart_BlinkCounter = 0;
|
||||||
draw_title_screen_NOP();
|
draw_title_screen_NOP();
|
||||||
break;
|
break;
|
||||||
case INTRO_STATE_2:
|
case INTRO_STATE_2:
|
||||||
@ -390,7 +392,7 @@ void title_screen_draw_logo(f32 arg0) {
|
|||||||
|
|
||||||
for (i = 0; i < TITLE_NUM_TILES; i++) {
|
for (i = 0; i < TITLE_NUM_TILES; i++) {
|
||||||
// Load a tile from the logo texture
|
// Load a tile from the logo texture
|
||||||
gDPLoadTextureTile(gMainGfxPos++, &D_800A0978[i * TITLE_TILE_PIXELS], G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
gDPLoadTextureTile(gMainGfxPos++, &TitleScreen_ImgList_Logo[i * TITLE_TILE_PIXELS], G_IM_FMT_RGBA, G_IM_SIZ_32b,
|
||||||
TITLE_WIDTH, TITLE_TILE_HEIGHT, // width, height
|
TITLE_WIDTH, TITLE_TILE_HEIGHT, // width, height
|
||||||
0, 0, (TITLE_WIDTH - 1), (TITLE_TILE_HEIGHT - 1), // uls, ult, lrs, lrt
|
0, 0, (TITLE_WIDTH - 1), (TITLE_TILE_HEIGHT - 1), // uls, ult, lrs, lrt
|
||||||
0, // pal
|
0, // pal
|
||||||
@ -418,37 +420,37 @@ void title_screen_draw_logo(f32 arg0) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void title_screen_draw_press_start(void) {
|
void title_screen_draw_press_start(void) {
|
||||||
switch (D_80077A2C) {
|
switch (TitleScreen_PressStart_IsVisible) {
|
||||||
case 0:
|
case FALSE:
|
||||||
D_80077A28 -= 128;
|
TitleScreen_PressStart_Alpha -= 128;
|
||||||
if (D_80077A28 < 0) {
|
if (TitleScreen_PressStart_Alpha < 0) {
|
||||||
D_80077A28 = 0;
|
TitleScreen_PressStart_Alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_80077A30++;
|
TitleScreen_PressStart_BlinkCounter++;
|
||||||
if (D_80077A30 >= 16) {
|
if (TitleScreen_PressStart_BlinkCounter >= 16) {
|
||||||
D_80077A30 = 0;
|
TitleScreen_PressStart_BlinkCounter = 0;
|
||||||
D_80077A2C = 1;
|
TitleScreen_PressStart_IsVisible = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case TRUE:
|
||||||
D_80077A28 += 128;
|
TitleScreen_PressStart_Alpha += 128;
|
||||||
if (D_80077A28 > 255) {
|
if (TitleScreen_PressStart_Alpha > 255) {
|
||||||
D_80077A28 = 255;
|
TitleScreen_PressStart_Alpha = 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_80077A30++;
|
TitleScreen_PressStart_BlinkCounter++;
|
||||||
if (D_80077A30 >= 16) {
|
if (TitleScreen_PressStart_BlinkCounter >= 16) {
|
||||||
D_80077A30 = 0;
|
TitleScreen_PressStart_BlinkCounter = 0;
|
||||||
D_80077A2C = 0;
|
TitleScreen_PressStart_IsVisible = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gSPDisplayList(gMainGfxPos++, D_80077A50);
|
gSPDisplayList(gMainGfxPos++, D_80077A50);
|
||||||
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
|
||||||
gDPSetPrimColor(gMainGfxPos++, 0, 0, 248, 240, 152, D_80077A28);
|
gDPSetPrimColor(gMainGfxPos++, 0, 0, 248, 240, 152, TitleScreen_PressStart_Alpha);
|
||||||
gDPPipeSync(gMainGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
gDPLoadTextureBlock(gMainGfxPos++, D_800A0980, G_IM_FMT_IA, G_IM_SIZ_8b, 128, VAR_1, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
gDPLoadTextureBlock(gMainGfxPos++, TitleScreen_ImgList_PressStart, G_IM_FMT_IA, G_IM_SIZ_8b, 128, VAR_1, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMainGfxPos++, 384, 548, 896, VAR_2, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
gSPTextureRectangle(gMainGfxPos++, 384, 548, 896, VAR_2, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
|
||||||
gDPPipeSync(gMainGfxPos++);
|
gDPPipeSync(gMainGfxPos++);
|
||||||
@ -478,8 +480,8 @@ void title_screen_draw_copyright(f32 arg0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if VERSION_JP
|
#if VERSION_JP
|
||||||
gDPLoadTLUT_pal16(gMainGfxPos++, 0, JP_800A0980);
|
gDPLoadTLUT_pal16(gMainGfxPos++, 0, TitleScreen_ImgList_CopyrightPalette);
|
||||||
gDPLoadTextureTile_4b(gMainGfxPos++, D_800A097C, G_IM_FMT_CI, 128, 0, 0, 0, 127, 31, 0,
|
gDPLoadTextureTile_4b(gMainGfxPos++, TitleScreen_ImgList_Copyright, G_IM_FMT_CI, 128, 0, 0, 0, 127, 31, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||||
G_TX_NOLOD);
|
G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMainGfxPos++, 388, 764, 900, 892, G_TX_RENDERTILE,
|
gSPTextureRectangle(gMainGfxPos++, 388, 764, 900, 892, G_TX_RENDERTILE,
|
||||||
@ -487,7 +489,7 @@ void title_screen_draw_copyright(f32 arg0) {
|
|||||||
#else
|
#else
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
alpha = 0; // TODO figure out why this is needed
|
alpha = 0; // TODO figure out why this is needed
|
||||||
gDPLoadTextureTile(gMainGfxPos++, &D_800A097C[0x240 * i], G_IM_FMT_IA, G_IM_SIZ_8b, 144, 32, 0, 0, 143, 15, 0,
|
gDPLoadTextureTile(gMainGfxPos++, &TitleScreen_ImgList_Copyright[0x240 * i], G_IM_FMT_IA, G_IM_SIZ_8b, 144, 32, 0, 0, 143, 15, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
|
||||||
G_TX_NOLOD);
|
G_TX_NOLOD);
|
||||||
gSPTextureRectangle(gMainGfxPos++, 356, 764 + (0x40 * i), 932, 828 + (0x40 * i), G_TX_RENDERTILE,
|
gSPTextureRectangle(gMainGfxPos++, 356, 764 + (0x40 * i), 932, 828 + (0x40 * i), G_TX_RENDERTILE,
|
||||||
|
@ -406,16 +406,16 @@ dlabel D_800A0968
|
|||||||
dlabel D_800A0970
|
dlabel D_800A0970
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0974
|
dlabel TitleScreen_ImgList
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0978
|
dlabel TitleScreen_ImgList_Logo
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A097C
|
dlabel TitleScreen_ImgList_Copyright
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0980
|
dlabel TitleScreen_ImgList_PressStart
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0984
|
dlabel D_800A0984
|
||||||
|
@ -62,8 +62,8 @@ glabel title_screen_draw_copyright
|
|||||||
/* 12998 80037598 25299244 */ addiu $t1, $t1, %lo(gMainGfxPos)
|
/* 12998 80037598 25299244 */ addiu $t1, $t1, %lo(gMainGfxPos)
|
||||||
/* 1299C 8003759C 3C10FD68 */ lui $s0, (0xFD68008F >> 16)
|
/* 1299C 8003759C 3C10FD68 */ lui $s0, (0xFD68008F >> 16)
|
||||||
/* 129A0 800375A0 3610008F */ ori $s0, $s0, (0xFD68008F & 0xFFFF)
|
/* 129A0 800375A0 3610008F */ ori $s0, $s0, (0xFD68008F & 0xFFFF)
|
||||||
/* 129A4 800375A4 3C16800A */ lui $s6, %hi(D_800A097C)
|
/* 129A4 800375A4 3C16800A */ lui $s6, %hi(TitleScreen_ImgList_Copyright)
|
||||||
/* 129A8 800375A8 26D6D38C */ addiu $s6, $s6, %lo(D_800A097C)
|
/* 129A8 800375A8 26D6D38C */ addiu $s6, $s6, %lo(TitleScreen_ImgList_Copyright)
|
||||||
/* 129AC 800375AC 3C0EF568 */ lui $t6, (0xF5682400 >> 16)
|
/* 129AC 800375AC 3C0EF568 */ lui $t6, (0xF5682400 >> 16)
|
||||||
/* 129B0 800375B0 35CE2400 */ ori $t6, $t6, (0xF5682400 & 0xFFFF)
|
/* 129B0 800375B0 35CE2400 */ ori $t6, $t6, (0xF5682400 & 0xFFFF)
|
||||||
/* 129B4 800375B4 3C150700 */ lui $s5, (0x7000000 >> 16)
|
/* 129B4 800375B4 3C150700 */ lui $s5, (0x7000000 >> 16)
|
||||||
|
@ -50,7 +50,7 @@ D_8009A5EC = 0x800991b8;
|
|||||||
|
|
||||||
__osContPifRam + 0x3C = 0x800AF94C;
|
__osContPifRam + 0x3C = 0x800AF94C;
|
||||||
__osEepromTimerQ = 0x800d8e20;
|
__osEepromTimerQ = 0x800d8e20;
|
||||||
D_800A097C = 0x8009d38c;
|
TitleScreen_ImgList_Copyright = 0x8009d38c;
|
||||||
__osBbIsBb = 0x80000388;
|
__osBbIsBb = 0x80000388;
|
||||||
|
|
||||||
main_BSS_START = 0x80099170;
|
main_BSS_START = 0x80099170;
|
||||||
|
@ -325,19 +325,19 @@ dlabel D_800A0964
|
|||||||
dlabel D_800A0970
|
dlabel D_800A0970
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0974
|
dlabel TitleScreen_ImgList
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0978
|
dlabel TitleScreen_ImgList_Logo
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A097C
|
dlabel TitleScreen_ImgList_Copyright
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0980
|
dlabel TitleScreen_ImgList_PressStart
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel JP_800A0980
|
dlabel TitleScreen_ImgList_CopyrightPalette
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0988
|
dlabel D_800A0988
|
||||||
|
@ -398,16 +398,16 @@ dlabel D_800A0968
|
|||||||
dlabel D_800A0970
|
dlabel D_800A0970
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0974
|
dlabel TitleScreen_ImgList
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0978
|
dlabel TitleScreen_ImgList_Logo
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A097C
|
dlabel TitleScreen_ImgList_Copyright
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0980
|
dlabel TitleScreen_ImgList_PressStart
|
||||||
.space 4
|
.space 4
|
||||||
|
|
||||||
dlabel D_800A0984
|
dlabel D_800A0984
|
||||||
|
@ -1394,9 +1394,9 @@ D_800779B0 = 0x800779B0; // type:data rom:0x52DB0
|
|||||||
D_800779C0 = 0x800779C0; // type:data rom:0x52DC0
|
D_800779C0 = 0x800779C0; // type:data rom:0x52DC0
|
||||||
gSaveSlotMetadata = 0x800779C4; // type:data rom:0x52DC4
|
gSaveSlotMetadata = 0x800779C4; // type:data rom:0x52DC4
|
||||||
gSaveSlotHasData = 0x80077A24; // type:data rom:0x52E24
|
gSaveSlotHasData = 0x80077A24; // type:data rom:0x52E24
|
||||||
D_80077A28 = 0x80077A28; // type:data rom:0x52E28
|
TitleScreen_PressStart_Alpha = 0x80077A28; // type:data rom:0x52E28
|
||||||
D_80077A2C = 0x80077A2C; // type:data rom:0x52E2C
|
TitleScreen_PressStart_isVisibile = 0x80077A2C; // type:data rom:0x52E2C
|
||||||
D_80077A30 = 0x80077A30; // type:data rom:0x52E30
|
TitleScreen_PressStart_BlinkCounter = 0x80077A30; // type:data rom:0x52E30
|
||||||
D_80077A34 = 0x80077A34; // type:data rom:0x52E34
|
D_80077A34 = 0x80077A34; // type:data rom:0x52E34
|
||||||
D_80077A38 = 0x80077A38; // type:data rom:0x52E38
|
D_80077A38 = 0x80077A38; // type:data rom:0x52E38
|
||||||
D_80077A40 = 0x80077A40; // type:data rom:0x52E40
|
D_80077A40 = 0x80077A40; // type:data rom:0x52E40
|
||||||
@ -2752,10 +2752,10 @@ D_800A0963 = 0x800A0963; // type:data rom:0x7BD63
|
|||||||
D_800A0964 = 0x800A0964; // type:data rom:0x7BD64
|
D_800A0964 = 0x800A0964; // type:data rom:0x7BD64
|
||||||
D_800A0968 = 0x800A0968; // type:data rom:0x7BD68
|
D_800A0968 = 0x800A0968; // type:data rom:0x7BD68
|
||||||
D_800A0970 = 0x800A0970; // type:data rom:0x7BD70
|
D_800A0970 = 0x800A0970; // type:data rom:0x7BD70
|
||||||
D_800A0974 = 0x800A0974; // type:data rom:0x7BD74
|
TitleScreen_ImgList = 0x800A0974; // type:data rom:0x7BD74
|
||||||
D_800A0978 = 0x800A0978; // type:data rom:0x7BD78
|
TitleScreen_ImgList_Logo = 0x800A0978; // type:data rom:0x7BD78
|
||||||
D_800A097C = 0x800A097C; // type:data rom:0x7BD7C
|
TitleScreen_ImgList_Copyright = 0x800A097C; // type:data rom:0x7BD7C
|
||||||
D_800A0980 = 0x800A0980; // type:data rom:0x7BD80
|
TitleScreen_ImgList_PressStart = 0x800A0980; // type:data rom:0x7BD80
|
||||||
D_800A0984 = 0x800A0984; // type:data rom:0x7BD84
|
D_800A0984 = 0x800A0984; // type:data rom:0x7BD84
|
||||||
D_800A0988 = 0x800A0988; // type:data rom:0x7BD88
|
D_800A0988 = 0x800A0988; // type:data rom:0x7BD88
|
||||||
D_800A098C = 0x800A098C; // type:data rom:0x7BD8C
|
D_800A098C = 0x800A098C; // type:data rom:0x7BD8C
|
||||||
|
Loading…
Reference in New Issue
Block a user