From 40372d72b71cbe3720e528a7ae762497c42c26f1 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 8 Sep 2024 03:00:05 +0200 Subject: [PATCH 1/2] Move some function declarations to `z64{interface,light,message}.h` (#2166) --- include/functions.h | 65 ++---------------------------------------- include/z64interface.h | 34 ++++++++++++++++++++++ include/z64light.h | 25 ++++++++++++++++ include/z64message.h | 14 +++++++++ 4 files changed, 75 insertions(+), 63 deletions(-) diff --git a/include/functions.h b/include/functions.h index 6608ce1814..e134758eab 100644 --- a/include/functions.h +++ b/include/functions.h @@ -741,27 +741,7 @@ void Health_UpdateMeter(PlayState* play); void Health_DrawMeter(PlayState* play); void Health_UpdateBeatingHeart(PlayState* play); u32 Health_IsCritical(void); -void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type); -void Lights_PointNoGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius); -void Lights_PointGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius); -void Lights_PointSetColorAndRadius(LightInfo* info, u8 r, u8 g, u8 b, s16 radius); -void Lights_DirectionalSetInfo(LightInfo* info, s8 x, s8 y, s8 z, u8 r, u8 g, u8 b); -void Lights_Reset(Lights* lights, u8 ambentR, u8 ambentG, u8 ambentB); -void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx); -void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* vec); -void LightContext_Init(PlayState* play, LightContext* lightCtx); -void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b); -void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 zFar); -Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx); -void LightContext_InitList(PlayState* play, LightContext* lightCtx); -void LightContext_DestroyList(PlayState* play, LightContext* lightCtx); -LightNode* LightContext_InsertLight(PlayState* play, LightContext* lightCtx, LightInfo* info); -void LightContext_RemoveLight(PlayState* play, LightContext* lightCtx, LightNode* node); -Lights* Lights_NewAndDraw(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB, u8 numLights, u8 r, u8 g, - u8 b, s8 x, s8 y, s8 z); -Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB); -void Lights_GlowCheck(PlayState* play); -void Lights_DrawGlow(PlayState* play); + void* ZeldaArena_Malloc(u32 size); void* ZeldaArena_MallocR(u32 size); void* ZeldaArena_Realloc(void* ptr, u32 newSize); @@ -813,36 +793,7 @@ void Map_Destroy(PlayState* play); void Map_Init(PlayState* play); void Minimap_Draw(PlayState* play); void Map_Update(PlayState* play); -void Interface_ChangeHudVisibilityMode(u16 hudVisibilityMode); -void Interface_SetSceneRestrictions(PlayState* play); -void Inventory_SwapAgeEquipment(void); -void Interface_InitHorsebackArchery(PlayState* play); -void func_800849EC(PlayState* play); -void Interface_LoadItemIcon1(PlayState* play, u16 button); -void Interface_LoadItemIcon2(PlayState* play, u16 button); -void func_80084BF4(PlayState* play, u16 flag); -u8 Item_Give(PlayState* play, u8 item); -u8 Item_CheckObtainability(u8 item); -void Inventory_DeleteItem(u16 item, u16 invSlot); -s32 Inventory_ReplaceItem(PlayState* play, u16 oldItem, u16 newItem); -s32 Inventory_HasEmptyBottle(void); -s32 Inventory_HasSpecificBottle(u8 bottleItem); -void Inventory_UpdateBottleItem(PlayState* play, u8 item, u8 button); -s32 Inventory_ConsumeFairy(PlayState* play); -void Interface_SetDoAction(PlayState* play, u16 action); -void Interface_SetNaviCall(PlayState* play, u16 naviCallState); -void Interface_LoadActionLabelB(PlayState* play, u16 action); -s32 Health_ChangeBy(PlayState* play, s16 amount); -void Rupees_ChangeBy(s16 rupeeChange); -void Inventory_ChangeAmmo(s16 item, s16 ammoChange); -void Magic_Fill(PlayState* play); -void Magic_Reset(PlayState* play); -s32 Magic_RequestChange(PlayState* play, s16 amount, s16 type); -void Interface_SetSubTimer(s16 seconds); -void Interface_SetSubTimerToFinalSecond(PlayState* play); -void Interface_SetTimer(s16 seconds); -void Interface_Draw(PlayState* play); -void Interface_Update(PlayState* play); + Path* Path_GetByIndex(PlayState* play, s16 index, s16 max); f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw); void Path_CopyLastPoint(Path* path, Vec3f* dest); @@ -1583,21 +1534,9 @@ s32 __osSpSetPc(void* pc); f32 absf(f32); void* memset(void* dest, int val, size_t len); void* memmove(void* dest, const void* src, size_t len); -void Message_UpdateOcarinaMemoryGame(PlayState* play); -u8 Message_ShouldAdvance(PlayState* play); -void Message_CloseTextbox(PlayState*); -void Message_StartTextbox(PlayState* play, u16 textId, Actor* actor); -void Message_ContinueTextbox(PlayState* play, u16 textId); -void Message_StartOcarina(PlayState* play, u16 ocarinaActionId); -void Message_StartOcarinaSunsSongDisabled(PlayState* play, u16 ocarinaActionId); -u8 Message_GetState(MessageContext* msgCtx); -void Message_Draw(PlayState* play); -void Message_Update(PlayState* play); -void Message_SetTables(void); void Interface_Destroy(PlayState* play); void Interface_Init(PlayState* play); -void Message_Init(PlayState* play); void Regs_InitData(PlayState* play); void Setup_Init(GameState* thisx); diff --git a/include/z64interface.h b/include/z64interface.h index ac5bfc8153..6ee09afe9b 100644 --- a/include/z64interface.h +++ b/include/z64interface.h @@ -1,8 +1,11 @@ #ifndef Z64INTERFACE_H #define Z64INTERFACE_H +#include "z64dma.h" #include "z64view.h" +struct PlayState; + extern u8 _icon_item_staticSegmentRomStart[]; extern u8 _icon_item_24_staticSegmentRomStart[]; @@ -242,4 +245,35 @@ typedef struct InterfaceContext { #define HEARTS_DROWN_ENV_G 0 #define HEARTS_DROWN_ENV_B 255 +void Interface_ChangeHudVisibilityMode(u16 hudVisibilityMode); +void Interface_SetSceneRestrictions(struct PlayState* play); +void Inventory_SwapAgeEquipment(void); +void Interface_InitHorsebackArchery(struct PlayState* play); +void func_800849EC(struct PlayState* play); +void Interface_LoadItemIcon1(struct PlayState* play, u16 button); +void Interface_LoadItemIcon2(struct PlayState* play, u16 button); +void func_80084BF4(struct PlayState* play, u16 flag); +u8 Item_Give(struct PlayState* play, u8 item); +u8 Item_CheckObtainability(u8 item); +void Inventory_DeleteItem(u16 item, u16 invSlot); +s32 Inventory_ReplaceItem(struct PlayState* play, u16 oldItem, u16 newItem); +s32 Inventory_HasEmptyBottle(void); +s32 Inventory_HasSpecificBottle(u8 bottleItem); +void Inventory_UpdateBottleItem(struct PlayState* play, u8 item, u8 button); +s32 Inventory_ConsumeFairy(struct PlayState* play); +void Interface_SetDoAction(struct PlayState* play, u16 action); +void Interface_SetNaviCall(struct PlayState* play, u16 naviCallState); +void Interface_LoadActionLabelB(struct PlayState* play, u16 action); +s32 Health_ChangeBy(struct PlayState* play, s16 amount); +void Rupees_ChangeBy(s16 rupeeChange); +void Inventory_ChangeAmmo(s16 item, s16 ammoChange); +void Magic_Fill(struct PlayState* play); +void Magic_Reset(struct PlayState* play); +s32 Magic_RequestChange(struct PlayState* play, s16 amount, s16 type); +void Interface_SetSubTimer(s16 seconds); +void Interface_SetSubTimerToFinalSecond(struct PlayState* play); +void Interface_SetTimer(s16 seconds); +void Interface_Draw(struct PlayState* play); +void Interface_Update(struct PlayState* play); + #endif diff --git a/include/z64light.h b/include/z64light.h index 5b20af3142..cb666ff752 100644 --- a/include/z64light.h +++ b/include/z64light.h @@ -6,6 +6,9 @@ #include "z64math.h" #include "color.h" +struct GraphicsContext; +struct PlayState; + typedef struct LightPoint { /* 0x0 */ s16 x; /* 0x2 */ s16 y; @@ -62,4 +65,26 @@ typedef enum LightType { typedef void (*LightsBindFunc)(Lights* lights, LightParams* params, Vec3f* vec); +void Lights_PointSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius, s32 type); +void Lights_PointNoGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius); +void Lights_PointGlowSetInfo(LightInfo* info, s16 x, s16 y, s16 z, u8 r, u8 g, u8 b, s16 radius); +void Lights_PointSetColorAndRadius(LightInfo* info, u8 r, u8 g, u8 b, s16 radius); +void Lights_DirectionalSetInfo(LightInfo* info, s8 x, s8 y, s8 z, u8 r, u8 g, u8 b); +void Lights_Reset(Lights* lights, u8 ambentR, u8 ambentG, u8 ambentB); +void Lights_Draw(Lights* lights, struct GraphicsContext* gfxCtx); +void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* vec); +void LightContext_Init(struct PlayState* play, LightContext* lightCtx); +void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b); +void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 fogNear, s16 zFar); +Lights* LightContext_NewLights(LightContext* lightCtx, struct GraphicsContext* gfxCtx); +void LightContext_InitList(struct PlayState* play, LightContext* lightCtx); +void LightContext_DestroyList(struct PlayState* play, LightContext* lightCtx); +LightNode* LightContext_InsertLight(struct PlayState* play, LightContext* lightCtx, LightInfo* info); +void LightContext_RemoveLight(struct PlayState* play, LightContext* lightCtx, LightNode* node); +Lights* Lights_NewAndDraw(struct GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB, u8 numLights, u8 r, u8 g, + u8 b, s8 x, s8 y, s8 z); +Lights* Lights_New(struct GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB); +void Lights_GlowCheck(struct PlayState* play); +void Lights_DrawGlow(struct PlayState* play); + #endif diff --git a/include/z64message.h b/include/z64message.h index d0df11a16a..9a073cfa03 100644 --- a/include/z64message.h +++ b/include/z64message.h @@ -5,6 +5,7 @@ struct OcarinaStaff; struct Actor; +struct PlayState; typedef enum TextBoxIcon { /* 0 */ TEXTBOX_ICON_TRIANGLE, @@ -278,4 +279,17 @@ typedef struct MessageContext { /* 0xE410 */ u8 lastOcarinaButtonIndex; } MessageContext; // size = 0xE418 +void Message_UpdateOcarinaMemoryGame(struct PlayState* play); +u8 Message_ShouldAdvance(struct PlayState* play); +void Message_CloseTextbox(struct PlayState*); +void Message_StartTextbox(struct PlayState* play, u16 textId, struct Actor* actor); +void Message_ContinueTextbox(struct PlayState* play, u16 textId); +void Message_StartOcarina(struct PlayState* play, u16 ocarinaActionId); +void Message_StartOcarinaSunsSongDisabled(struct PlayState* play, u16 ocarinaActionId); +u8 Message_GetState(MessageContext* msgCtx); +void Message_Draw(struct PlayState* play); +void Message_Update(struct PlayState* play); +void Message_SetTables(void); +void Message_Init(struct PlayState* play); + #endif From 1332356e5c6c7f925a519fc8760149aa86d67f19 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 8 Sep 2024 04:28:46 +0200 Subject: [PATCH 2/2] Pause doc: Cursor drawing (#2159) * Pause doc: Cursor drawing * bss --- include/z64pause.h | 9 ++ src/code/z_parameter.c | 6 +- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 2 + src/overlays/actors/ovl_En_Xc/z_en_xc.c | 2 +- src/overlays/actors/ovl_Fishing/z_fishing.c | 2 +- .../ovl_kaleido_scope/z_kaleido_collect.c | 10 +- .../ovl_kaleido_scope/z_kaleido_equipment.c | 4 +- .../misc/ovl_kaleido_scope/z_kaleido_item.c | 10 +- .../misc/ovl_kaleido_scope/z_kaleido_map.c | 12 +- .../misc/ovl_kaleido_scope/z_kaleido_scope.c | 148 ++++++++++-------- .../misc/ovl_kaleido_scope/z_kaleido_scope.h | 2 +- tools/disasm/ntsc-1.2/functions.txt | 6 +- 12 files changed, 121 insertions(+), 92 deletions(-) diff --git a/include/z64pause.h b/include/z64pause.h index 12921fcd9f..d560963a12 100644 --- a/include/z64pause.h +++ b/include/z64pause.h @@ -96,6 +96,15 @@ typedef enum PauseMainState { /* 9 */ PAUSE_MAIN_STATE_9 } PauseMainState; +typedef enum PauseCursorQuad { + /* 0 */ PAUSE_QUAD_CURSOR_TL, + /* 1 */ PAUSE_QUAD_CURSOR_TR, + /* 2 */ PAUSE_QUAD_CURSOR_BL, + /* 3 */ PAUSE_QUAD_CURSOR_BR, + /* 4 */ PAUSE_QUAD_CURSOR_4, + /* 5 */ PAUSE_QUAD_CURSOR_MAX +} PauseCursorQuad; + typedef enum WorldMapPoint { /* 0 */ WORLD_MAP_POINT_HAUNTED_WASTELAND, /* 1 */ WORLD_MAP_POINT_GERUDOS_FORTRESS, diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 47ced85959..9cae1b69ee 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -3393,6 +3393,7 @@ void Interface_Draw(PlayState* play) { gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATERGBA_PRIM, G_CC_MODULATERGBA_PRIM); gSPMatrix(OVERLAY_DISP++, &gMtxClear, G_MTX_MODELVIEW | G_MTX_LOAD); + // PAUSE_QUAD_CURSOR_4 pauseCtx->cursorVtx[16].v.ob[0] = pauseCtx->cursorVtx[18].v.ob[0] = pauseCtx->equipAnimX / 10; pauseCtx->cursorVtx[17].v.ob[0] = pauseCtx->cursorVtx[19].v.ob[0] = pauseCtx->cursorVtx[16].v.ob[0] + WREG(90) / 10; @@ -3403,7 +3404,7 @@ void Interface_Draw(PlayState* play) { if (pauseCtx->equipTargetItem < 0xBF) { // Normal Equip (icon goes from the inventory slot to the C button when equipping it) gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, pauseCtx->equipAnimAlpha); - gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[16], 4, 0); + gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_QUAD_CURSOR_4 * 4], 4, 0); gDPLoadTextureBlock(OVERLAY_DISP++, gItemIcons[pauseCtx->equipTargetItem], G_IM_FMT_RGBA, G_IM_SIZ_32b, ITEM_ICON_WIDTH, ITEM_ICON_HEIGHT, 0, G_TX_NOMIRROR | G_TX_WRAP, @@ -3416,6 +3417,7 @@ void Interface_Draw(PlayState* play) { if ((pauseCtx->equipAnimAlpha > 0) && (pauseCtx->equipAnimAlpha < 255)) { svar1 = (pauseCtx->equipAnimAlpha / 8) / 2; + // PAUSE_QUAD_CURSOR_4 pauseCtx->cursorVtx[16].v.ob[0] = pauseCtx->cursorVtx[18].v.ob[0] = pauseCtx->cursorVtx[16].v.ob[0] - svar1; pauseCtx->cursorVtx[17].v.ob[0] = pauseCtx->cursorVtx[19].v.ob[0] = @@ -3426,7 +3428,7 @@ void Interface_Draw(PlayState* play) { pauseCtx->cursorVtx[16].v.ob[1] - svar1 * 2 - 32; } - gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[16], 4, 0); + gSPVertex(OVERLAY_DISP++, &pauseCtx->cursorVtx[PAUSE_QUAD_CURSOR_4 * 4], 4, 0); gDPLoadTextureBlock(OVERLAY_DISP++, gMagicArrowEquipEffectTex, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 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); diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 6dccaf33d6..5072670e7d 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -9,6 +9,8 @@ #include "overlays/actors/ovl_En_Boom/z_en_boom.h" #include "assets/objects/gameplay_keep/gameplay_keep.h" +#pragma increment_block_number "gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" + #define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_5) #define GET_BODY(this) ((BossVa*)(this)->actor.parent) diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index d3f45ab15a..bd424121e2 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -1395,7 +1395,7 @@ void func_80B3F3D8(void) { Sfx_PlaySfxCentered2(NA_SE_PL_SKIP); } -#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" +#pragma increment_block_number "gc-eu:128 gc-eu-mq:64 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" void EnXc_PlayDiveSFX(Vec3f* src, PlayState* play) { static Vec3f D_80B42DA0; diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index a6822e4a47..e446b7f8b8 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -15,7 +15,7 @@ #include "cic6105.h" #endif -#pragma increment_block_number "gc-eu:145 gc-eu-mq:145 gc-jp:147 gc-jp-ce:147 gc-jp-mq:147 gc-us:147 gc-us-mq:147" +#pragma increment_block_number "gc-eu:142 gc-eu-mq:142 gc-jp:144 gc-jp-ce:144 gc-jp-mq:144 gc-us:144 gc-us-mq:144" #define FLAGS ACTOR_FLAG_4 diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c index 1f5dcba140..7856b520b0 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c @@ -186,7 +186,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216; } - KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx); + KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx); if ((pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) && (pauseCtx->cursorSpecialPos == 0)) { @@ -234,7 +234,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; sp216 = pauseCtx->cursorPoint[PAUSE_QUEST]; - KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx); + KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx); Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) { @@ -252,7 +252,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->nameDisplayTimer = 0; pauseCtx->cursorSpecialPos = 0; sp216 = pauseCtx->cursorPoint[PAUSE_QUEST]; - KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx); + KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx); Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) { @@ -297,11 +297,11 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff(); pauseCtx->ocarinaStaff->pos = 0; sp216 = pauseCtx->cursorSlot[PAUSE_QUEST]; - KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx); + KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx); } } else { sp216 = pauseCtx->cursorSlot[PAUSE_QUEST]; - KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx); + KaleidoScope_SetCursorPos(pauseCtx, sp216 * 4, pauseCtx->questVtx); } } diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index e40b9be294..33c98159c9 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -456,7 +456,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) { } } - KaleidoScope_SetCursorVtx(pauseCtx, cursorSlot * 4, pauseCtx->equipVtx); + KaleidoScope_SetCursorPos(pauseCtx, cursorSlot * 4, pauseCtx->equipVtx); if ((pauseCtx->cursorSpecialPos == 0) && (cursorItem != PAUSE_ITEM_NONE) && (pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE) && @@ -502,7 +502,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) { &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_7) && (pauseCtx->pageIndex == PAUSE_EQUIP)) { - KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_EQUIP] * 4, pauseCtx->equipVtx); + KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_EQUIP] * 4, pauseCtx->equipVtx); pauseCtx->cursorColorSet = 8; sEquipTimer--; diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c index c51530df83..9b62bf51db 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c @@ -68,13 +68,13 @@ void KaleidoScope_DrawAmmoCount(PauseContext* pauseCtx, GraphicsContext* gfxCtx, CLOSE_DISPS(gfxCtx, "../z_kaleido_item.c", 116); } -void KaleidoScope_SetCursorVtx(PauseContext* pauseCtx, u16 index, Vtx* vtx) { +void KaleidoScope_SetCursorPos(PauseContext* pauseCtx, u16 index, Vtx* vtx) { pauseCtx->cursorVtx[0].v.ob[0] = vtx[index].v.ob[0]; pauseCtx->cursorVtx[0].v.ob[1] = vtx[index].v.ob[1]; } -void KaleidoScope_SetItemCursorVtx(PauseContext* pauseCtx) { - KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_ITEM] * 4, pauseCtx->itemVtx); +void KaleidoScope_SetItemCursorPos(PauseContext* pauseCtx) { + KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_ITEM] * 4, pauseCtx->itemVtx); } void KaleidoScope_DrawItemSelect(PlayState* play) { @@ -334,7 +334,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) { if (cursorItem != PAUSE_ITEM_NONE) { index = cursorSlot * 4; // required to match? - KaleidoScope_SetCursorVtx(pauseCtx, index, pauseCtx->itemVtx); + KaleidoScope_SetCursorPos(pauseCtx, index, pauseCtx->itemVtx); if ((pauseCtx->debugState == 0) && (pauseCtx->state == PAUSE_STATE_MAIN) && (pauseCtx->mainState == PAUSE_MAIN_STATE_IDLE)) { @@ -401,7 +401,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) { } } else if ((pauseCtx->mainState == PAUSE_MAIN_STATE_3) && (pauseCtx->pageIndex == PAUSE_ITEM)) { //! @bug cursorSlot is uninitialized - KaleidoScope_SetCursorVtx(pauseCtx, cursorSlot * 4, pauseCtx->itemVtx); + KaleidoScope_SetCursorPos(pauseCtx, cursorSlot * 4, pauseCtx->itemVtx); pauseCtx->cursorColorSet = 4; } diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c index efb6e0f553..9d46f54041 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_map.c @@ -150,7 +150,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot; pauseCtx->cursorX[PAUSE_MAP] = 0; j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4); - KaleidoScope_SetCursorVtx(pauseCtx, j, pauseCtx->mapPageVtx); + KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx); Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } @@ -181,7 +181,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) { PRINTF("kscope->cursor_point====%d\n", pauseCtx->cursorPoint[PAUSE_MAP]); j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4); - KaleidoScope_SetCursorVtx(pauseCtx, j, pauseCtx->mapPageVtx); + KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx); Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } @@ -203,7 +203,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP]; j = 72 + (pauseCtx->cursorSlot[PAUSE_MAP] * 4); - KaleidoScope_SetCursorVtx(pauseCtx, j, pauseCtx->mapPageVtx); + KaleidoScope_SetCursorPos(pauseCtx, j, pauseCtx->mapPageVtx); if (pauseCtx->cursorX[PAUSE_MAP] == 0) { pauseCtx->mapPageVtx[j + 0].v.ob[0] = pauseCtx->mapPageVtx[j + 2].v.ob[0] = @@ -578,7 +578,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; pauseCtx->cursorSlot[PAUSE_MAP] = PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; - KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); + KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); } else { pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18; if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { @@ -594,7 +594,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; pauseCtx->cursorSlot[PAUSE_MAP] = PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; - KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); + KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); D_8082A6D4 = 0; @@ -612,7 +612,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->cursorItem[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; pauseCtx->cursorSlot[PAUSE_MAP] = PAGE_BG_QUADS + QUAD_MAP_WORLD_POINT_FIRST + pauseCtx->cursorPoint[PAUSE_WORLD_MAP]; - KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); + KaleidoScope_SetCursorPos(pauseCtx, pauseCtx->cursorSlot[PAUSE_MAP] * 4, pauseCtx->mapPageVtx); Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); D_8082A6D4 = 0; diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c index b1349a495b..886824111a 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c @@ -867,10 +867,10 @@ u8 gAreaGsFlags[] = { }; static void* sCursorTexs[] = { - gPauseMenuCursorTopLeftTex, - gPauseMenuCursorTopRightTex, - gPauseMenuCursorBottomLeftTex, - gPauseMenuCursorBottomRightTex, + gPauseMenuCursorTopLeftTex, // PAUSE_QUAD_CURSOR_TL + gPauseMenuCursorTopRightTex, // PAUSE_QUAD_CURSOR_TR + gPauseMenuCursorBottomLeftTex, // PAUSE_QUAD_CURSOR_BL + gPauseMenuCursorBottomRightTex, // PAUSE_QUAD_CURSOR_BR }; static s16 sCursorColors[][3] = { @@ -1124,6 +1124,8 @@ void KaleidoScope_DrawCursor(PlayState* play, u16 pageIndex) { if (pauseCtx->pageIndex == pageIndex) { + // Draw PAUSE_QUAD_CURSOR_TL, PAUSE_QUAD_CURSOR_TR, PAUSE_QUAD_CURSOR_BL, PAUSE_QUAD_CURSOR_BR + gDPPipeSync(POLY_OPA_DISP++); gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); @@ -2706,9 +2708,9 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->questPageVtx = GRAPH_ALLOC(gfxCtx, ((PAGE_BG_QUADS + VTX_PAGE_QUEST_QUADS) * 4) * sizeof(Vtx)); KaleidoScope_SetPageVertices(play, pauseCtx->questPageVtx, VTX_PAGE_QUEST, VTX_PAGE_QUEST_QUADS); - pauseCtx->cursorVtx = GRAPH_ALLOC(gfxCtx, 20 * sizeof(Vtx)); + pauseCtx->cursorVtx = GRAPH_ALLOC(gfxCtx, PAUSE_QUAD_CURSOR_MAX * 4 * sizeof(Vtx)); - for (i = 0; i < 20; i++) { + for (i = 0; i < (PAUSE_QUAD_CURSOR_MAX * 4); i++) { pauseCtx->cursorVtx[i].v.ob[0] = pauseCtx->cursorVtx[i].v.ob[1] = pauseCtx->cursorVtx[i].v.ob[2] = 0; pauseCtx->cursorVtx[i].v.flag = 0; @@ -2719,15 +2721,21 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) { pauseCtx->cursorVtx[i].v.cn[3] = 255; } + // PAUSE_QUAD_CURSOR_TL pauseCtx->cursorVtx[1].v.tc[0] = pauseCtx->cursorVtx[2].v.tc[1] = pauseCtx->cursorVtx[3].v.tc[0] = - pauseCtx->cursorVtx[3].v.tc[1] = pauseCtx->cursorVtx[5].v.tc[0] = pauseCtx->cursorVtx[6].v.tc[1] = - pauseCtx->cursorVtx[7].v.tc[0] = pauseCtx->cursorVtx[7].v.tc[1] = pauseCtx->cursorVtx[9].v.tc[0] = - pauseCtx->cursorVtx[10].v.tc[1] = pauseCtx->cursorVtx[11].v.tc[0] = pauseCtx->cursorVtx[11].v.tc[1] = - pauseCtx->cursorVtx[13].v.tc[0] = pauseCtx->cursorVtx[14].v.tc[1] = - pauseCtx->cursorVtx[15].v.tc[0] = pauseCtx->cursorVtx[15].v.tc[1] = 0x200; - + pauseCtx->cursorVtx[3].v.tc[1] + // PAUSE_QUAD_CURSOR_TR + = pauseCtx->cursorVtx[5].v.tc[0] = pauseCtx->cursorVtx[6].v.tc[1] = pauseCtx->cursorVtx[7].v.tc[0] = + pauseCtx->cursorVtx[7].v.tc[1] + // PAUSE_QUAD_CURSOR_BL + = pauseCtx->cursorVtx[9].v.tc[0] = pauseCtx->cursorVtx[10].v.tc[1] = pauseCtx->cursorVtx[11].v.tc[0] = + pauseCtx->cursorVtx[11].v.tc[1] + // PAUSE_QUAD_CURSOR_BR + = pauseCtx->cursorVtx[13].v.tc[0] = pauseCtx->cursorVtx[14].v.tc[1] = pauseCtx->cursorVtx[15].v.tc[0] = + pauseCtx->cursorVtx[15].v.tc[1] = 16 * (1 << 5); + // PAUSE_QUAD_CURSOR_4 pauseCtx->cursorVtx[17].v.tc[0] = pauseCtx->cursorVtx[18].v.tc[1] = pauseCtx->cursorVtx[19].v.tc[0] = - pauseCtx->cursorVtx[19].v.tc[1] = 0x400; + pauseCtx->cursorVtx[19].v.tc[1] = 32 * (1 << 5); pauseCtx->itemVtx = GRAPH_ALLOC(gfxCtx, 164 * sizeof(Vtx)); @@ -3192,88 +3200,96 @@ void KaleidoScope_UpdateOpening(PlayState* play) { } } -void KaleidoScope_UpdateCursorSize(PlayState* play) { +void KaleidoScope_UpdateCursorVtx(PlayState* play) { PauseContext* pauseCtx = &play->pauseCtx; - s32 temp1; - s32 temp2; - s32 temp3; - s32 temp4; + s32 tlOffsetX; + s32 tlOffsetY; + s32 rightOffsetX; + s32 bottomOffsetY; if (pauseCtx->cursorSpecialPos == 0) { - temp1 = -1; - temp2 = 1; - temp3 = 14; - temp4 = 14; + tlOffsetX = -1; + tlOffsetY = 1; + rightOffsetX = 14; + bottomOffsetY = 14; if (pauseCtx->pageIndex == PAUSE_MAP) { if (!sInDungeonScene) { - temp1 = -6; - temp2 = 6; - temp3 = 4; - temp4 = 4; + tlOffsetX = -6; + tlOffsetY = 6; + rightOffsetX = 4; + bottomOffsetY = 4; } else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] >= 3) { - temp1 = -6; - temp2 = 5; - temp4 = 7; - temp3 = 19; + tlOffsetX = -6; + tlOffsetY = 5; + bottomOffsetY = 7; + rightOffsetX = 19; } else { - temp1 = -3; - temp2 = 3; - temp3 = 13; - temp4 = 13; + tlOffsetX = -3; + tlOffsetY = 3; + rightOffsetX = 13; + bottomOffsetY = 13; } } else if (pauseCtx->pageIndex == PAUSE_QUEST) { - temp1 = -4; - temp2 = 4; - temp3 = 12; - temp4 = 12; + tlOffsetX = -4; + tlOffsetY = 4; + rightOffsetX = 12; + bottomOffsetY = 12; if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == 0x18) { - temp1 = -2; - temp2 = 2; - temp3 = 32; - temp4 = 32; + tlOffsetX = -2; + tlOffsetY = 2; + rightOffsetX = 32; + bottomOffsetY = 32; } else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] == 0x17) { - temp1 = -4; - temp2 = 4; - temp4 = 13; - temp3 = 34; + tlOffsetX = -4; + tlOffsetY = 4; + bottomOffsetY = 13; + rightOffsetX = 34; } else if (pauseCtx->cursorSlot[pauseCtx->pageIndex] < 6) { - temp1 = -1; - temp2 = 1; - temp3 = 10; - temp4 = 10; + tlOffsetX = -1; + tlOffsetY = 1; + rightOffsetX = 10; + bottomOffsetY = 10; } else if ((pauseCtx->cursorSlot[pauseCtx->pageIndex] >= 6) && (pauseCtx->cursorSlot[pauseCtx->pageIndex] < 0x12)) { - temp1 = -5; - temp2 = 3; - temp3 = 8; - temp4 = 8; + tlOffsetX = -5; + tlOffsetY = 3; + rightOffsetX = 8; + bottomOffsetY = 8; } } } else { - temp1 = -4; - temp2 = 4; - temp3 = 16; - temp4 = 16; + tlOffsetX = -4; + tlOffsetY = 4; + rightOffsetX = 16; + bottomOffsetY = 16; } - pauseCtx->cursorVtx[0].v.ob[0] = pauseCtx->cursorVtx[2].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + temp1; + // Move the quads according to the offsets set above, + // and the position of the cursor in `pauseCtx->cursorVtx[0].v.ob` + // (see `KaleidoScope_SetCursorPos` and other `PAUSE_QUAD_CURSOR_TL` uses) + + // PAUSE_QUAD_CURSOR_TL + pauseCtx->cursorVtx[0].v.ob[0] = pauseCtx->cursorVtx[2].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + tlOffsetX; pauseCtx->cursorVtx[1].v.ob[0] = pauseCtx->cursorVtx[3].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + 16; - pauseCtx->cursorVtx[0].v.ob[1] = pauseCtx->cursorVtx[1].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] + temp2; + pauseCtx->cursorVtx[0].v.ob[1] = pauseCtx->cursorVtx[1].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] + tlOffsetY; pauseCtx->cursorVtx[2].v.ob[1] = pauseCtx->cursorVtx[3].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - 16; - pauseCtx->cursorVtx[4].v.ob[0] = pauseCtx->cursorVtx[6].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + temp3; + // PAUSE_QUAD_CURSOR_TR + pauseCtx->cursorVtx[4].v.ob[0] = pauseCtx->cursorVtx[6].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + rightOffsetX; pauseCtx->cursorVtx[5].v.ob[0] = pauseCtx->cursorVtx[7].v.ob[0] = pauseCtx->cursorVtx[4].v.ob[0] + 16; pauseCtx->cursorVtx[4].v.ob[1] = pauseCtx->cursorVtx[5].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1]; pauseCtx->cursorVtx[6].v.ob[1] = pauseCtx->cursorVtx[7].v.ob[1] = pauseCtx->cursorVtx[4].v.ob[1] - 16; + // PAUSE_QUAD_CURSOR_BL pauseCtx->cursorVtx[8].v.ob[0] = pauseCtx->cursorVtx[10].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0]; pauseCtx->cursorVtx[9].v.ob[0] = pauseCtx->cursorVtx[11].v.ob[0] = pauseCtx->cursorVtx[8].v.ob[0] + 16; - pauseCtx->cursorVtx[8].v.ob[1] = pauseCtx->cursorVtx[9].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - temp4; + pauseCtx->cursorVtx[8].v.ob[1] = pauseCtx->cursorVtx[9].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - bottomOffsetY; pauseCtx->cursorVtx[10].v.ob[1] = pauseCtx->cursorVtx[11].v.ob[1] = pauseCtx->cursorVtx[8].v.ob[1] - 16; - pauseCtx->cursorVtx[12].v.ob[0] = pauseCtx->cursorVtx[14].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + temp3; + // PAUSE_QUAD_CURSOR_BR + pauseCtx->cursorVtx[12].v.ob[0] = pauseCtx->cursorVtx[14].v.ob[0] = pauseCtx->cursorVtx[0].v.ob[0] + rightOffsetX; pauseCtx->cursorVtx[13].v.ob[0] = pauseCtx->cursorVtx[15].v.ob[0] = pauseCtx->cursorVtx[12].v.ob[0] + 16; - pauseCtx->cursorVtx[12].v.ob[1] = pauseCtx->cursorVtx[13].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - temp4; + pauseCtx->cursorVtx[12].v.ob[1] = pauseCtx->cursorVtx[13].v.ob[1] = pauseCtx->cursorVtx[0].v.ob[1] - bottomOffsetY; pauseCtx->cursorVtx[14].v.ob[1] = pauseCtx->cursorVtx[15].v.ob[1] = pauseCtx->cursorVtx[12].v.ob[1] - 16; } @@ -3352,11 +3368,11 @@ void KaleidoScope_Update(PlayState* play) { (pauseCtx->state == PAUSE_STATE_MAIN)) { pauseCtx->stickAdjX = input->rel.stick_x; pauseCtx->stickAdjY = input->rel.stick_y; - KaleidoScope_UpdateCursorSize(play); + KaleidoScope_UpdateCursorVtx(play); KaleidoScope_HandlePageToggles(pauseCtx, input); } else if ((pauseCtx->pageIndex == PAUSE_QUEST) && ((pauseCtx->mainState < PAUSE_MAIN_STATE_3) || (pauseCtx->mainState == PAUSE_MAIN_STATE_5))) { - KaleidoScope_UpdateCursorSize(play); + KaleidoScope_UpdateCursorVtx(play); } if (pauseCtx->state == PAUSE_STATE_MAIN) { diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h index 945e7efa8c..c0c65e5bea 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.h @@ -75,7 +75,7 @@ s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s32 point); void KaleidoScope_DrawDebugEditor(PlayState* play); void KaleidoScope_DrawPlayerWork(PlayState* play); void KaleidoScope_DrawEquipment(PlayState* play); -void KaleidoScope_SetCursorVtx(PauseContext* pauseCtx, u16 index, Vtx* vtx); +void KaleidoScope_SetCursorPos(PauseContext* pauseCtx, u16 index, Vtx* vtx); void KaleidoScope_DrawItemSelect(PlayState* play); void KaleidoScope_UpdateItemEquip(PlayState* play); void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx); diff --git a/tools/disasm/ntsc-1.2/functions.txt b/tools/disasm/ntsc-1.2/functions.txt index 766a3dbbef..72e0f6c122 100644 --- a/tools/disasm/ntsc-1.2/functions.txt +++ b/tools/disasm/ntsc-1.2/functions.txt @@ -3215,8 +3215,8 @@ KaleidoScope_DrawEquipmentImage = 0x80817BA0; // type:func KaleidoScope_DrawPlayerWork = 0x80817FE8; // type:func KaleidoScope_DrawEquipment = 0x8081818C; // type:func KaleidoScope_DrawAmmoCount = 0x80819670; // type:func -KaleidoScope_SetCursorVtx = 0x80819BF4; // type:func -KaleidoScope_SetItemCursorVtx = 0x80819C24; // type:func +KaleidoScope_SetCursorPos = 0x80819BF4; // type:func +KaleidoScope_SetItemCursorPos = 0x80819C24; // type:func KaleidoScope_DrawItemSelect = 0x80819C50; // type:func KaleidoScope_UpdateItemEquip = 0x8081AA60; // type:func KaleidoScope_DrawDungeonMap = 0x8081B660; // type:func @@ -3245,7 +3245,7 @@ KaleidoScope_DrawGameOver = 0x8082536C; // type:func KaleidoScope_Draw = 0x80825A00; // type:func KaleidoScope_GrayOutTextureRGBA32 = 0x80825C1C; // type:func KaleidoScope_UpdateOpening = 0x80825CD0; // type:func -KaleidoScope_UpdateCursorSize = 0x80825EC0; // type:func +KaleidoScope_UpdateCursorVtx = 0x80825EC0; // type:func KaleidoScope_LoadDungeonMap = 0x80826204; // type:func KaleidoScope_UpdateDungeonMap = 0x808262A0; // type:func KaleidoScope_Update = 0x808263C0; // type:func