diff --git a/include/functions.h b/include/functions.h index 5420a27bd7..e1bf40c0a3 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1882,7 +1882,7 @@ void func_8011C808(PlayState* play); // void func_8011CA64(void); // void func_8011E3B4(void); // void func_8011E730(void); -void func_8011F0E0(PlayState* play); +void Interface_Draw(PlayState* play); // void func_80120F90(void); // void func_80121000(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE1 param_8, UNK_TYPE1 param_9, UNK_TYPE1 param_10, UNK_TYPE4 param_11, UNK_TYPE4 param_12, UNK_TYPE4 param_13, UNK_TYPE4 param_14); // void func_80121064(void); @@ -2431,7 +2431,7 @@ u8 Message_GetState(MessageContext* msgCtx); // void func_80153E7C(void); // void func_80153EF0(void); void func_801541D4(PlayState* play, Gfx** gfxp); -void func_80156758(PlayState* play); +void Message_Draw(PlayState* play); void func_8015680C(PlayState* play); void func_801586A4(PlayState* play); void Message_Init(PlayState* play); @@ -2551,7 +2551,7 @@ void func_80166968(PlayState* play, Camera* camera); void func_80166B30(PlayState* play); void Play_Update(PlayState* play); void func_80167DE4(PlayState* play); -// void func_80167F0C(void); +// void Play_DrawOverlayElements(void); void Play_Draw(PlayState* play); void func_80168DAC(PlayState* play); void Play_Main(GameState* thisx); diff --git a/src/code/z_message.c b/src/code/z_message.c index 16e1203d75..3e1b8e4418 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -533,7 +533,7 @@ void func_80153E7C(PlayState* play, void* arg1) { #pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801541D4.s") -void func_80156758(PlayState* play) { +void Message_Draw(PlayState* play) { Gfx* nextDisplayList; Gfx* polyOpa; GraphicsContext* gfxCtx = play->state.gfxCtx; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index b63af90389..9bde1cffe2 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -1360,7 +1360,7 @@ TexturePtr D_801BFD8C[] = { gStoryGiantsLeavingTLUT, }; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_8011F0E0.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/Interface_Draw.s") #pragma GLOBAL_ASM("asm/non_matchings/code/z_parameter/func_80120F90.s") diff --git a/src/code/z_play.c b/src/code/z_play.c index 856931cd0c..25b1ee9da2 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -1,6 +1,7 @@ #include "global.h" #include "overlays/gamestates/ovl_daytelop/z_daytelop.h" #include "overlays/gamestates/ovl_opening/z_opening.h" +#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h" s32 gDbgCamEnabled = false; u8 D_801D0D54 = 0; @@ -119,15 +120,15 @@ void func_801656A4(void* arg0, u16* arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5 for (i = arg4; i <= arg6; i++) { for (j = arg3; j <= arg5; j += 2) { t2 = arg1[i * arg2 + j]; - tempr = (t2 >> 11) & 0x1f; - tempg = (t2 >> 6) & 0x1f; - tempb = (t2 >> 1) & 0x1f; + tempr = (t2 >> 11) & 0x1F; + tempg = (t2 >> 6) & 0x1F; + tempb = (t2 >> 1) & 0x1F; temp1 = ((tempr * 2 + tempg * 4 + tempb) * 0xF) / 217; t2 = arg1[i * arg2 + j + 1]; - tempr = (t2 >> 11) & 0x1f; - tempg = (t2 >> 6) & 0x1f; - tempb = (t2 >> 1) & 0x1f; + tempr = (t2 >> 11) & 0x1F; + tempg = (t2 >> 6) & 0x1F; + tempb = (t2 >> 1) & 0x1F; temp2 = ((tempr * 2 + tempg * 4 + tempb) * 0xF) / 217; *(arg01++) = (temp1 << 4) | temp2; @@ -142,9 +143,9 @@ void func_801656A4(void* arg0, u16* arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5 for (i = arg4; i <= arg6; i++) { for (j = arg3; j <= arg5; j++) { t2 = arg1[i * arg2 + j]; - tempr = (t2 >> 11) & 0x1f; - tempg = (t2 >> 6) & 0x1f; - tempb = (t2 >> 1) & 0x1f; + tempr = (t2 >> 11) & 0x1F; + tempg = (t2 >> 6) & 0x1F; + tempb = (t2 >> 1) & 0x1F; //! What t2 = 0; @@ -162,9 +163,9 @@ void func_801656A4(void* arg0, u16* arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5 for (j = arg3; j <= arg5; j++) { t2 = arg1[i * arg2 + j]; - tempr = (t2 >> 11) & 0x1f; - tempg = (t2 >> 6) & 0x1f; - tempb = (t2 >> 1) & 0x1f; + tempr = (t2 >> 11) & 0x1F; + tempg = (t2 >> 6) & 0x1F; + tempb = (t2 >> 1) & 0x1F; *(arg03++) = ((tempr * 2 + tempg * 4 + tempb) * 0xFF) / 217; } @@ -497,8 +498,8 @@ void func_80166968(PlayState* this, Camera* camera) { D_801D0D58 = quake; if (quake != 0) { - Quake_SetSpeed(D_801D0D58, 0x226); - Quake_SetQuakeValues(D_801D0D58, 1, 1, 0xB4, 0); + Quake_SetSpeed(D_801D0D58, 550); + Quake_SetQuakeValues(D_801D0D58, 1, 1, 180, 0); Quake_SetCountdown(D_801D0D58, 1000); } } @@ -558,21 +559,22 @@ void func_80167DE4(PlayState* play) { } } -void func_80167F0C(PlayState* this) { +void Play_DrawOverlayElements(PlayState* this) { Gfx* sp34; Gfx* sp30; GraphicsContext* gfxCtx; - if ((this->pauseCtx.state != 0) || (this->pauseCtx.debugEditor != 0)) { + if ((this->pauseCtx.state != 0) || (this->pauseCtx.debugEditor != DEBUG_EDITOR_NONE)) { KaleidoScopeCall_Draw(this); } if (gSaveContext.gameMode == 0) { - func_8011F0E0(this); + Interface_Draw(this); } - if (((this->pauseCtx.state == 0) && (this->pauseCtx.debugEditor == 0)) || (this->msgCtx.currentTextId != 0xFF)) { - func_80156758(this); + if (((this->pauseCtx.state == 0) && (this->pauseCtx.debugEditor == DEBUG_EDITOR_NONE)) || + (this->msgCtx.currentTextId != 0xFF)) { + Message_Draw(this); } if (this->gameOverCtx.state != 0) { @@ -636,7 +638,7 @@ void func_80168DAC(PlayState* this) { if ((D_801F6DFC != 0) && ((SREG(2) != 2) || (gZBufferPtr == NULL))) { func_8016F1A8(&D_801F6D50, gfxCtx); - func_80156758(this); + Message_Draw(this); } else { Play_Draw(this); } diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index c6d2b441c4..a9b65b8ea1 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -2161,7 +2161,7 @@ 0x8011CA64:("func_8011CA64",), 0x8011E3B4:("func_8011E3B4",), 0x8011E730:("func_8011E730",), - 0x8011F0E0:("func_8011F0E0",), + 0x8011F0E0:("Interface_Draw",), 0x80120F90:("func_80120F90",), 0x80121064:("func_80121064",), 0x801210E0:("func_801210E0",), @@ -2870,7 +2870,7 @@ 0x80153E7C:("func_80153E7C",), 0x80153EF0:("func_80153EF0",), 0x801541D4:("func_801541D4",), - 0x80156758:("func_80156758",), + 0x80156758:("Message_Draw",), 0x8015680C:("func_8015680C",), 0x801586A4:("func_801586A4",), 0x801586D4:("Message_Init",), @@ -2994,7 +2994,7 @@ 0x80166B30:("func_80166B30",), 0x80167814:("Play_Update",), 0x80167DE4:("func_80167DE4",), - 0x80167F0C:("func_80167F0C",), + 0x80167F0C:("Play_DrawOverlayElements",), 0x80168090:("Play_Draw",), 0x80168DAC:("func_80168DAC",), 0x80168F64:("Play_Main",), diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index 4774096f17..0b72f605c8 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -1675,7 +1675,7 @@ asm/non_matchings/code/z_parameter/func_8011C898.s,func_8011C898,0x8011C898,0x73 asm/non_matchings/code/z_parameter/func_8011CA64.s,func_8011CA64,0x8011CA64,0x654 asm/non_matchings/code/z_parameter/func_8011E3B4.s,func_8011E3B4,0x8011E3B4,0xDF asm/non_matchings/code/z_parameter/func_8011E730.s,func_8011E730,0x8011E730,0x26C -asm/non_matchings/code/z_parameter/func_8011F0E0.s,func_8011F0E0,0x8011F0E0,0x7AC +asm/non_matchings/code/z_parameter/Interface_Draw.s,Interface_Draw,0x8011F0E0,0x7AC asm/non_matchings/code/z_parameter/func_80120F90.s,func_80120F90,0x80120F90,0x35 asm/non_matchings/code/z_parameter/func_80121064.s,func_80121064,0x80121064,0x1F asm/non_matchings/code/z_parameter/func_801210E0.s,func_801210E0,0x801210E0,0x3AD @@ -2384,7 +2384,7 @@ asm/non_matchings/code/z_message/func_80153750.s,func_80153750,0x80153750,0x1CB asm/non_matchings/code/z_message/func_80153E7C.s,func_80153E7C,0x80153E7C,0x1D asm/non_matchings/code/z_message/func_80153EF0.s,func_80153EF0,0x80153EF0,0xB9 asm/non_matchings/code/z_message/func_801541D4.s,func_801541D4,0x801541D4,0x961 -asm/non_matchings/code/z_message/func_80156758.s,func_80156758,0x80156758,0x2D +asm/non_matchings/code/z_message/Message_Draw.s,Message_Draw,0x80156758,0x2D asm/non_matchings/code/z_message/func_8015680C.s,func_8015680C,0x8015680C,0x7A6 asm/non_matchings/code/z_message/func_801586A4.s,func_801586A4,0x801586A4,0xC asm/non_matchings/code/z_message/Message_Init.s,Message_Init,0x801586D4,0x7F @@ -2508,7 +2508,7 @@ asm/non_matchings/code/z_play/func_80166968.s,func_80166968,0x80166968,0x72 asm/non_matchings/code/z_play/func_80166B30.s,func_80166B30,0x80166B30,0x339 asm/non_matchings/code/z_play/Play_Update.s,Play_Update,0x80167814,0x174 asm/non_matchings/code/z_play/func_80167DE4.s,func_80167DE4,0x80167DE4,0x4A -asm/non_matchings/code/z_play/func_80167F0C.s,func_80167F0C,0x80167F0C,0x61 +asm/non_matchings/code/z_play/Play_DrawOverlayElements.s,Play_DrawOverlayElements,0x80167F0C,0x61 asm/non_matchings/code/z_play/Play_Draw.s,Play_Draw,0x80168090,0x347 asm/non_matchings/code/z_play/func_80168DAC.s,func_80168DAC,0x80168DAC,0x6E asm/non_matchings/code/z_play/Play_Main.s,Play_Main,0x80168F64,0x5A