diff options
Diffstat (limited to 'engine/billspc.asm')
-rwxr-xr-x | engine/billspc.asm | 128 |
1 files changed, 61 insertions, 67 deletions
diff --git a/engine/billspc.asm b/engine/billspc.asm index 10034c806..596679118 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -136,7 +136,7 @@ _DepositPKMN: ; e2391 (38:6391) jp c, BillsPCDepositFuncCancel ld a, [wMenuCursorY] dec a - and $3 + and %11 ld e, a ld d, 0 ld hl, BillsPCDepositJumptable @@ -230,8 +230,7 @@ BillsPCDepositFuncCancel: ; e2537 (38:6537) BillsPCDepositMenuDataHeader: ; 0xe253d (38:653d) db MENU_BACKUP_TILES ; flags - db 04, 09 ; start coords - db 13, 19 ; end coords + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 dw .MenuData2 db 1 ; default option ; 0xe2545 @@ -245,8 +244,7 @@ BillsPCDepositMenuDataHeader: ; 0xe253d (38:653d) db "CANCEL@" ; 0xe2564 (38:6564) -BillsPC_ClearThreeBoxes: ; e2564 -; unreferenced +Unreferenced_BillsPCClearThreeBoxes: ; e2564 hlcoord 0, 0 ld b, 4 ld c, 8 @@ -401,7 +399,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) jp c, .cancel ld a, [wMenuCursorY] dec a - and 3 + and %11 ld e, a ld d, 0 ld hl, .dw @@ -491,8 +489,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) .MenuDataHeader: ; 0xe2731 db MENU_BACKUP_TILES ; flags - db 04, 09 ; start coords - db 13, 19 ; end coords + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 dw .MenuData db 1 ; default option ; 0xe2739 @@ -663,7 +660,7 @@ _MovePKMNWithoutMail: ; e2759 jp c, .Cancel ld a, [wMenuCursorY] dec a - and 3 + and %11 ld e, a ld d, 0 ld hl, .Jumptable2 @@ -715,8 +712,7 @@ _MovePKMNWithoutMail: ; e2759 .MenuDataHeader: ; 0xe28c3 db MENU_BACKUP_TILES ; flags - db 04, 09 ; start coords - db 13, 19 ; end coords + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 dw .MenuData2 db 1 ; default option ; 0xe28cb @@ -1099,10 +1095,10 @@ PCMonInfo: ; e2ac6 (38:6ac6) ld [CurPartySpecies], a ld [CurSpecies], a ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter call GetBaseData ld de, vTiles2 tile $00 - predef GetMonFrontpic + predef Predef_GetMonFrontpic xor a ld [wBillsPC_MonHasMail], a ld a, [CurPartySpecies] @@ -1119,7 +1115,7 @@ PCMonInfo: ; e2ac6 (38:6ac6) ld a, $3 ld [MonType], a - farcall GetGender + farcall Predef_GetGender jr c, .skip_gender ld a, "♂" jr nz, .printgender @@ -1502,7 +1498,7 @@ BillsPC_UpdateSelectionCursor: ; e2e01 (38:6e01) .place_cursor ld hl, .OAM - ld de, Sprites + ld de, Sprite01 .loop ld a, [hl] cp -1 @@ -1512,9 +1508,9 @@ BillsPC_UpdateSelectionCursor: ; e2e01 (38:6e01) swap a add [hl] inc hl - ld [de], a + ld [de], a ; y inc de -rept 3 +rept SPRITEOAMSTRUCT_LENGTH +- 1 ld a, [hli] ld [de], a inc de @@ -1523,36 +1519,36 @@ endr ; e2e2b (38:6e2b) .OAM: ; e2e2b - dsprite 4, 6, 10, 0, $00, $00 - dsprite 4, 6, 11, 0, $00, $00 - dsprite 4, 6, 12, 0, $00, $00 - dsprite 4, 6, 13, 0, $00, $00 - dsprite 4, 6, 14, 0, $00, $00 - dsprite 4, 6, 15, 0, $00, $00 - dsprite 4, 6, 16, 0, $00, $00 - dsprite 4, 6, 17, 0, $00, $00 - dsprite 4, 6, 18, 0, $00, $00 - dsprite 4, 6, 18, 7, $00, $00 - dsprite 7, 1, 10, 0, $00, $40 - dsprite 7, 1, 11, 0, $00, $40 - dsprite 7, 1, 12, 0, $00, $40 - dsprite 7, 1, 13, 0, $00, $40 - dsprite 7, 1, 14, 0, $00, $40 - dsprite 7, 1, 15, 0, $00, $40 - dsprite 7, 1, 16, 0, $00, $40 - dsprite 7, 1, 17, 0, $00, $40 - dsprite 7, 1, 18, 0, $00, $40 - dsprite 7, 1, 18, 7, $00, $40 - dsprite 5, 6, 9, 6, $01, $00 - dsprite 6, 1, 9, 6, $01, $40 - dsprite 5, 6, 19, 1, $01, $20 - dsprite 6, 1, 19, 1, $01, $60 + dsprite 4, 6, 10, 0, $00, 0 + dsprite 4, 6, 11, 0, $00, 0 + dsprite 4, 6, 12, 0, $00, 0 + dsprite 4, 6, 13, 0, $00, 0 + dsprite 4, 6, 14, 0, $00, 0 + dsprite 4, 6, 15, 0, $00, 0 + dsprite 4, 6, 16, 0, $00, 0 + dsprite 4, 6, 17, 0, $00, 0 + dsprite 4, 6, 18, 0, $00, 0 + dsprite 4, 6, 18, 7, $00, 0 + dsprite 7, 1, 10, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 11, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 12, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 13, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 14, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 15, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 16, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 17, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 18, 0, $00, 0 | Y_FLIP + dsprite 7, 1, 18, 7, $00, 0 | Y_FLIP + dsprite 5, 6, 9, 6, $01, 0 + dsprite 6, 1, 9, 6, $01, 0 | Y_FLIP + dsprite 5, 6, 19, 1, $01, 0 | X_FLIP + dsprite 6, 1, 19, 1, $01, 0 | X_FLIP | Y_FLIP db -1 ; e2e8c BillsPC_UpdateInsertCursor: ; e2e8c ld hl, .OAM - ld de, Sprites + ld de, Sprite01 .loop ld a, [hl] cp -1 @@ -1562,9 +1558,9 @@ BillsPC_UpdateInsertCursor: ; e2e8c swap a add [hl] inc hl - ld [de], a + ld [de], a ; y inc de -rept 3 +rept SPRITEOAMSTRUCT_LENGTH +- 1 ld a, [hli] ld [de], a inc de @@ -1573,20 +1569,20 @@ endr ; e2eac .OAM: ; e2eac - dsprite 4, 7, 10, 0, $06, $00 - dsprite 5, 3, 11, 0, $00, $40 - dsprite 5, 3, 12, 0, $00, $40 - dsprite 5, 3, 13, 0, $00, $40 - dsprite 5, 3, 14, 0, $00, $40 - dsprite 5, 3, 15, 0, $00, $40 - dsprite 5, 3, 16, 0, $00, $40 - dsprite 5, 3, 17, 0, $00, $40 - dsprite 5, 3, 18, 0, $00, $40 - dsprite 4, 7, 19, 0, $07, $00 + dsprite 4, 7, 10, 0, $06, 0 + dsprite 5, 3, 11, 0, $00, 0 | Y_FLIP + dsprite 5, 3, 12, 0, $00, 0 | Y_FLIP + dsprite 5, 3, 13, 0, $00, 0 | Y_FLIP + dsprite 5, 3, 14, 0, $00, 0 | Y_FLIP + dsprite 5, 3, 15, 0, $00, 0 | Y_FLIP + dsprite 5, 3, 16, 0, $00, 0 | Y_FLIP + dsprite 5, 3, 17, 0, $00, 0 | Y_FLIP + dsprite 5, 3, 18, 0, $00, 0 | Y_FLIP + dsprite 4, 7, 19, 0, $07, 0 db -1 ; e2ed5 -BillsPC_UnusedFillBox: ; e2ed5 +Unreferenced_BillsPC_FillBox: ; e2ed5 .row push bc push hl @@ -1702,7 +1698,7 @@ BillsPC_StatsScreen: ; e2f7e (38:6f7e) call BillsPC_CopyMon ld a, $3 ld [MonType], a - predef StatsScreenInit + predef Predef_StatsScreenInit call BillsPC_InitGFX call MaxVolume ret @@ -1730,7 +1726,7 @@ StatsScreenDPad: ; e2f95 (38:6f95) ld [CurPartySpecies], a ld [CurSpecies], a ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter call GetBaseData call BillsPC_CopyMon .pressed_a_b_right_left @@ -1823,7 +1819,7 @@ DepositPokemon: ; e307c (38:707c) call GetNick ld a, PC_DEPOSIT ld [wPokemonWithdrawDepositParameter], a - predef SentGetPkmnIntoFromBox + predef Predef_SendGetPkmnIntoFromBox jr c, .asm_boxisfull xor a ld [wPokemonWithdrawDepositParameter], a @@ -1878,7 +1874,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa) call CloseSRAM xor a ld [wPokemonWithdrawDepositParameter], a - predef SentGetPkmnIntoFromBox + predef Predef_SendGetPkmnIntoFromBox jr c, .PartyFull ld a, PC_DEPOSIT ld [wPokemonWithdrawDepositParameter], a @@ -2104,7 +2100,7 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld hl, wBillsPC_BackupScrollPosition add [hl] ld [CurPartyMon], a - ld a, $1 + ld a, BANK(sBox) call GetSRAMBank ld hl, sBoxSpecies call CopySpeciesToTemp @@ -2333,15 +2329,14 @@ BillsPC_ClearTilemap: ; e35e2 (38:75e2) ; e35f1 (38:75f1) _ChangeBox_menudataheader: ; 0xe35f1 - db $40 ; flags - db 05, 01 ; start coords - db 12, 09 ; end coords + db MENU_BACKUP_TILES ; flags + menu_coords 1, 5, 9, 12 dw .menudata2 db 1 ; default option ; 0xe35f9 .menudata2 ; 0xe35f9 - db $22 ; flags + db MENU_UNUSED_1 | MENU_UNUSED_3 ; flags db 4, 0 db 1 dba .boxes @@ -2559,12 +2554,11 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9) ret ; e3778 (38:7778) - hlcoord 11, 7 ; XXX + hlcoord 11, 7 ; unused .MenuDataHeader: ; 0xe377b db MENU_BACKUP_TILES ; flags - db 04, 11 ; start coords - db 13, 19 ; end coords + menu_coords 11, 4, SCREEN_WIDTH - 1, 13 dw .MenuData2 db 1 ; default option ; 0xe3783 |