Skip to content

Commit

Permalink
Extract data for cursor/spinning arrow and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Eebit committed Oct 21, 2023
1 parent 6d996ef commit cf0ae01
Show file tree
Hide file tree
Showing 19 changed files with 232 additions and 229 deletions.
8 changes: 4 additions & 4 deletions asm/unitlistscreen.s
Original file line number Diff line number Diff line change
Expand Up @@ -821,15 +821,15 @@ sub_80906F8: @ 0x080906F8
strh r1, [r0]
subs r0, #2
strh r1, [r0]
ldr r0, _0809077C @ gUnknown_08A1C7D8
ldr r0, _0809077C @ gImg_UiSpinningArrow_Horizontal
ldr r1, _08090780 @ 0x06010280
bl Decompress
pop {r4, r5}
pop {r0}
bx r0
.align 2, 0
_08090778: .4byte gUnknown_0200F158
_0809077C: .4byte gUnknown_08A1C7D8
_0809077C: .4byte gImg_UiSpinningArrow_Horizontal
_08090780: .4byte 0x06010280

THUMB_FUNC_END sub_80906F8
Expand Down Expand Up @@ -2009,7 +2009,7 @@ _0809104E:
movs r1, #3
orrs r0, r1
strb r0, [r7, #0x18]
ldr r0, _08091170 @ gUnknown_08A1C7D8
ldr r0, _08091170 @ gImg_UiSpinningArrow_Horizontal
ldr r1, _08091174 @ gBG1TilemapBuffer+0x500
bl Decompress
ldr r0, _08091178 @ gUnknown_08A1A084
Expand Down Expand Up @@ -2044,7 +2044,7 @@ _0809104E:
_08091164: .4byte gBG0TilemapBuffer
_08091168: .4byte gUnknown_0200F158
_0809116C: .4byte gLCDControlBuffer
_08091170: .4byte gUnknown_08A1C7D8
_08091170: .4byte gImg_UiSpinningArrow_Horizontal
_08091174: .4byte gBG1TilemapBuffer+0x500
_08091178: .4byte gUnknown_08A1A084
_0809117C: .4byte ProcScr_bmview
Expand Down
8 changes: 4 additions & 4 deletions data/data_59E8E0.s
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ gGfx_MiscUiGraphics: @ 0x0859E8E0
gPal_MiscUiGraphics: @ 0x0859ED70
.incbin "baserom.gba", 0x59ED70, 0x40

.global gUnknown_0859EDB0
gUnknown_0859EDB0: @ 0x0859EDB0
.global gImg_UiCursorHandTop
gImg_UiCursorHandTop: @ 0x0859EDB0
.incbin "baserom.gba", 0x59EDB0, 0x3C

.global gUnknown_0859EDEC
gUnknown_0859EDEC: @ 0x0859EDEC
.global gImg_UiCursorHandBottom
gImg_UiCursorHandBottom: @ 0x0859EDEC
.incbin "baserom.gba", 0x59EDEC, 0x34

.global gPal_MapSprite
Expand Down
8 changes: 4 additions & 4 deletions data/data_A195B0.s
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ gUnknown_08A1BD40: @ 0x08A1BD40
gUnknown_08A1BD60: @ 0x08A1BD60
.incbin "baserom.gba", 0xA1BD60, 0x9A4

.global gUnknown_08A1C704
gUnknown_08A1C704: @ 0x08A1C704
.global gImg_UiSpinningArrow_Vertical
gImg_UiSpinningArrow_Vertical: @ 0x08A1C704
.incbin "baserom.gba", 0xA1C704, 0xD4

.global gUnknown_08A1C7D8
gUnknown_08A1C7D8: @ 0x08A1C7D8
.global gImg_UiSpinningArrow_Horizontal
gImg_UiSpinningArrow_Horizontal: @ 0x08A1C7D8
.incbin "baserom.gba", 0xA1C7D8, 0xDC

.global gUnknown_08A1C8B4
Expand Down
54 changes: 0 additions & 54 deletions data/data_A2077C.s
Original file line number Diff line number Diff line change
@@ -1,59 +1,5 @@
.section .data

.global gUnknown_08A20B3C
gUnknown_08A20B3C: @ 0x08A20B3C
.incbin "baserom.gba", 0xA20B3C, 0x8

.global gUnknown_08A20B44
gUnknown_08A20B44: @ 0x08A20B44
.incbin "baserom.gba", 0xA20B44, 0x8

.global gUnknown_08A20B4C
gUnknown_08A20B4C: @ 0x08A20B4C
@ PROC_CALL
.short 0x2, 0x0
.word sub_80AC904
@ PROC_LABEL
.short 0xb, 0x0
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_80AC930
@ PROC_LABEL
.short 0xb, 0x1
.word 0x0
@ PROC_BLOCK
.short 0x10, 0x0
.word 0x0
@ PROC_END
.short 0x0, 0x0
.word 0x0


.global gUnknown_08A20B7C
gUnknown_08A20B7C: @ 0x08A20B7C
.incbin "baserom.gba", 0xA20B7C, 0xE

.global gUnknown_08A20B8A
gUnknown_08A20B8A: @ 0x08A20B8A
.incbin "baserom.gba", 0xA20B8A, 0xA

.global gUnknown_08A20B94
gUnknown_08A20B94: @ 0x08A20B94
@ PROC_CALL
.short 0x2, 0x0
.word sub_80ACB14
@ PROC_YIELD
.short 0xe, 0x0
.word 0x0
@ PROC_REPEAT
.short 0x3, 0x0
.word sub_80ACB34
@ PROC_END
.short 0x0, 0x0
.word 0x0


.global ProcScr_ParallelFiniteLoop
ProcScr_ParallelFiniteLoop: @ 0x08A20BB4
@ PROC_YIELD
Expand Down
32 changes: 16 additions & 16 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1213,24 +1213,24 @@ void StartSupportScreen(ProcPtr);
// ??? sub_80AC6AC(???);
// ??? sub_80AC784(???);
void sub_80AC844(u16 *, int, int, int, int, int, int, int);
// ??? sub_80AC904(???);
// ??? sub_80AC930(???);
ProcPtr sub_80AC9C0(ProcPtr);
void sub_80AC9D4(int, int, int, u8);
void sub_80ACA4C(int, int, int, int, int);
// ??? UiCursorHand_Init(???);
// ??? UiCursorHand_Loop(???);
ProcPtr StartUiCursorHand(ProcPtr);
void SetUiCursorHandConfig(int, int, int, u8);
void UiCursorHand_80ACA4C(int, int, int, int, int);
void sub_80ACA84(u32 a);
void sub_80ACAA4(void);
void sub_80ACAC8(void);
void sub_80ACAE4(void);
void sub_80ACB00(void);
// ??? sub_80ACB14(???);
// ??? sub_80ACB34(???);
ProcPtr sub_80ACCE0(ProcPtr);
ProcPtr sub_80ACCF4(int, int, int);
void sub_80ACD60(int mask);
void sub_80ACD7C(int, int, int, int);
void sub_80ACDA4(int);
void sub_80ACDDC(void);
void BlockUiCursorHand(void);
void UnblockUiCursorHand(void);
void EndUiCursorHand(void);
// ??? UiSpinningArrows_Init(???);
// ??? UiSpinningArrows_Loop(???);
ProcPtr StartUiSpinningArrows(ProcPtr);
ProcPtr LoadUiSpinningArrowGfx(int, int, int);
void SetUiSpinningArrowConfig(int mask);
void SetUiSpinningArrowPositions(int, int, int, int);
void SetUiSpinningArrowFastMaybe(int);
void EndUiSpinningArrows(void);
// ??? sub_80ACDF0(???);
// ??? sub_80ACDF8(???);
void StartParallelFiniteLoop(void *func, int cnt, u32 args);
Expand Down
4 changes: 2 additions & 2 deletions include/prepscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ extern u8 gUnknown_08A1BBD0[]; // tsa?
// extern ??? gUnknown_08A1BD00
// extern ??? gUnknown_08A1BD40
// extern ??? gUnknown_08A1BD60
extern u8 gUnknown_08A1C704[]; // arrow gfx
extern u8 gUnknown_08A1C7D8[];
extern u8 gImg_UiSpinningArrow_Vertical[]; // arrow gfx
extern u8 gImg_UiSpinningArrow_Horizontal[];
// extern ??? gUnknown_08A1C8B4
// extern ??? gUnknown_08A1CD68
// extern ??? gUnknown_08A1CDC4
Expand Down
16 changes: 8 additions & 8 deletions include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ extern struct ProcCmd CONST_DATA gProcScr_UpdateTraps[];
// extern ??? gUnknown_0859DBA0
extern u16 gGfx_MiscUiGraphics[];
extern u16 gPal_MiscUiGraphics[];
extern u8 gUnknown_0859EDB0[];
extern u8 gUnknown_0859EDEC[];
extern u8 gImg_UiCursorHandTop[];
extern u8 gImg_UiCursorHandBottom[];
// extern ??? gUnknown_0859EE20
// extern ??? gUnknown_0859EE40
// extern ??? gUnknown_0859EE60
Expand Down Expand Up @@ -1193,12 +1193,12 @@ extern u16* gUnknown_08A209F0[];
// extern ??? gSpriteArray_08A20B08
// extern ??? gUnknown_08A20B14
// extern ??? gProcScr_DrawDifficultyMenuSprites
// extern ??? gUnknown_08A20B3C
// extern ??? gUnknown_08A20B44
// extern ??? gUnknown_08A20B4C
// extern ??? gUnknown_08A20B7C
// extern ??? gUnknown_08A20B8A
// extern ??? gUnknown_08A20B94
// extern ??? gSprite_UiCursorHand_08A20B3C
// extern ??? gSprite_UiCursorHand_08A20B44
// extern ??? gProcScr_UiCursorHand
// extern ??? gSprite_UiSpinningArrows_Horizontal
// extern ??? gSprite_UiSpinningArrows_Vertical
// extern ??? gProcScr_UiSpinningArrows
// extern ??? ProcScr_ParallelFiniteLoop
// extern ??? gUnknown_08A20BD4
// extern ??? ProcScr_ParallelWorker
Expand Down
2 changes: 2 additions & 0 deletions ldscript.txt
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,8 @@ SECTIONS
. = ALIGN(4); src/savedrawcursor.o(.data);
. = ALIGN(4); src/savemenu_data.o(.data);
. = ALIGN(4); src/difficultymenu.o(.data);
. = ALIGN(4); src/cursor_hand.o(.data);
. = ALIGN(4); src/spinning_arrow.o(.data);
. = ALIGN(4); data/data_A2077C.o(.data);
. = ALIGN(4); src/soundroom.o(.data);
. = ALIGN(4); src/extramenu_unk.o(.data);
Expand Down
2 changes: 1 addition & 1 deletion src/bmshop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ void DisplayShopUiArrows(void) {
}

void UnpackUiVArrowGfx(int index, int palIdx) {
Decompress(gUnknown_08A1C704, (void *)((0x3FF & index) * 0x20 + 0x06010000));
Decompress(gImg_UiSpinningArrow_Vertical, (void *)((0x3FF & index) * 0x20 + 0x06010000));
ApplyPalette(gUnknown_08A1A084, palIdx + 0x10);

return;
Expand Down
4 changes: 2 additions & 2 deletions src/bonusclaim.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ void BonusClaim_Init(struct BonusClaimProc* proc) {

UpdateMenuScrollBarConfig(8, proc->unk_2c, *gpBonusClaimItemCount, 5);

sub_80AC9C0(proc);
StartUiCursorHand(proc);

SetupBonusClaimTargets(proc);

Expand Down Expand Up @@ -622,7 +622,7 @@ void BonusClaim_StartSelectTargetSubMenu(struct BonusClaimProc* proc) {
gLCDControlBuffer.win0_right = 200;
gLCDControlBuffer.win0_bottom = (tmp + 7) * 8;

sub_80AC9D4(0, 40, proc->menuIndex * 16 + 56 - proc->unk_2c, 1);
SetUiCursorHandConfig(0, 40, proc->menuIndex * 16 + 56 - proc->unk_2c, 1);

ShowPrepScreenHandCursor(92, proc->submenuIndex * 16 + 48, 12, 0x800);

Expand Down
Loading

0 comments on commit cf0ae01

Please sign in to comment.