diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/constants/text_constants.asm | 15 | ||||
-rw-r--r-- | src/engine/bank01.asm | 34 | ||||
-rw-r--r-- | src/engine/home.asm | 26 | ||||
-rw-r--r-- | src/macros/code.asm | 4 | ||||
-rw-r--r-- | src/wram.asm | 7 |
5 files changed, 53 insertions, 33 deletions
diff --git a/src/constants/text_constants.asm b/src/constants/text_constants.asm index 3c93cdf..38f4e9b 100644 --- a/src/constants/text_constants.asm +++ b/src/constants/text_constants.asm @@ -15,7 +15,8 @@ done EQUS "db TX_END" charmap "♀", "%" charmap "”", "\"" -; TX_SYMBOL (full-tile symbols loaded into v0Tiles2) +; TX_SYMBOL (full-tile icons/symbols loaded at the beginning of v0Tiles2) +; TODO: Use symbols in menus (cursor tile number, tile behind cursor), draw text boxes, WriteByteToBGMap0, etc charmap "<", TX_SYMBOL charmap " >", $00 charmap "FIRE>", $01 @@ -29,7 +30,10 @@ done EQUS "db TX_END" charmap "ASLEEP>", $09 charmap "CONFUSED>", $0a charmap "PARALYZED>", $0b + charmap "△>", $0c charmap "PKMN_ICON>", $0d ; icon displayed along with no. of Pkmn in duel screen +; charmap $0e + charmap "▷>", $0f charmap "HP>", $10 charmap "Lv>", $11 charmap "E>", $12 @@ -38,6 +42,14 @@ done EQUS "db TX_END" charmap "DEFENDER>", $15 charmap "🌕>", $16 ; HP tile charmap "🌑>", $17 ; HP tile with damage counter + charmap "╔>", $18 + charmap "╗>", $19 + charmap "╚>", $1a + charmap "╝>", $1b + charmap "TOP ═>", $1c + charmap "BOTTOM ═>", $1d + charmap "LEFT ║>", $1e + charmap "RIGHT ║>", $1f charmap "0>", $20 charmap "1>", $21 charmap "2>", $22 @@ -49,4 +61,5 @@ done EQUS "db TX_END" charmap "8>", $28 charmap "9>", $29 charmap "+>", $2b + charmap "▽>", $2f charmap "PRIZE_ICON>", $30 ; icon displayed along with no. of prizes in duel screen diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index 6a21178..2113a87 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -12,7 +12,7 @@ GameLoop: ; 4000 (1:4000) ld a, [sa009] ld [wccf2], a call DisableSRAM - ld a, $1 + ld a, 1 ld [wUppercaseFlag], a ei farcall CommentedOut_1a6cc @@ -37,7 +37,7 @@ GameLoop: ; 4000 (1:4000) Func_4050: ; 4050 (1:4050) farcall Func_1996e - ld a, $1 + ld a, 1 ld [wUppercaseFlag], a ret @@ -608,7 +608,7 @@ OpenPlayerHandScreen: ; 4436 (1:4436) .handle_input call Func_55f0 push af - ld a, [wcbdf] + ld a, [wSortCardListByID] or a call nz, SortHandCardsByID pop af @@ -646,7 +646,7 @@ UseEnergyCard: ; 4477 (1:4477) call OpenPlayAreaScreenForSelection ; choose card to play energy card on jp c, DuelMainInterface ; exit if no card was chosen .play_energy_set_played - ld a, $1 + ld a, 1 ld [wAlreadyPlayedEnergy], a .play_energy ldh a, [hTempPlayAreaLocationOffset_ff9d] @@ -2221,7 +2221,7 @@ DrawCardListScreenLayout: ; 559a (1:559a) ld hl, wSelectedDuelSubMenuItem ld [hli], a ld [hl], a - ld [wcbdf], a + ld [wSortCardListByID], a ld hl, wcbd8 ld [hli], a ld [hl], a @@ -2229,13 +2229,13 @@ DrawCardListScreenLayout: ; 559a (1:559a) ld a, START ld [wcbd6], a ld hl, wCardListInfoBoxText - ld [hl], LOW(PleaseSelectHandText_) + ldtx [hl], PleaseSelectHandText, & $ff inc hl - ld [hl], HIGH(PleaseSelectHandText_) + ldtx [hl], PleaseSelectHandText, >> 8 inc hl ; wCardListHeaderText - ld [hl], LOW(DuelistHandText_) + ldtx [hl], DuelistHandText, & $ff inc hl - ld [hl], HIGH(DuelistHandText_) + ldtx [hl], DuelistHandText, >> 8 .draw call ZeroObjectPositionsAndToggleOAMCopy call EmptyScreen @@ -2300,7 +2300,7 @@ Func_55f0: ; 55f0 (1:55f0) or a ret .asm_563b - ld a, [wcbdf] + ld a, [wSortCardListByID] or a jr nz, .asm_560b call SortCardsInDuelTempListByID @@ -2308,8 +2308,8 @@ Func_55f0: ; 55f0 (1:55f0) ld hl, wSelectedDuelSubMenuItem ld [hli], a ld [hl], a - ld a, $01 - ld [wcbdf], a + ld a, 1 + ld [wSortCardListByID], a call EraseCursor jr .asm_55f6 .asm_5654 @@ -2386,7 +2386,7 @@ Func_56a0: ; 56a0 (1:56a0) CardListParameters: ; 5710 (1;5710) db 1, 3 ; cursor x, cursor y db 4 ; item x - db $0e + db 14 ; maximum length, in tiles, occupied by the name and level string of each card in the list db 5 ; number of items selectable without scrolling db $0f ; cursor tile number db $00 ; tile behind cursor @@ -3428,7 +3428,7 @@ AIUseEnergyCard: ; 69a5 (1:69a5) call LoadCardDataToBuffer1_FromDeckIndex call DrawLargePictureOfCard call $68e4 - ld a, $1 + ld a, 1 ld [wAlreadyPlayedEnergy], a call DrawDuelMainScene ret @@ -3762,7 +3762,7 @@ _TossCoin: ; 71ad (1:71ad) INCROM $72ff, $7354 BuildVersion: ; 7354 (1:7354) - db "VER 12/20 09:36",TX_END + db "VER 12/20 09:36", TX_END INCROM $7364, $7571 @@ -3770,8 +3770,8 @@ Func_7571: ; 7571 (1:7571) INCROM $7571, $7576 Func_7576: ; 7576 (1:7576) - farcall $6, $591f - ret + farcall $6, $591f + ret ; 0x757b INCROM $757b, $758f diff --git a/src/engine/home.asm b/src/engine/home.asm index f3b5baf..00684cf 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -4333,7 +4333,7 @@ Func_1823: ; 1823 (0:1823) DealConfusionDamageToSelf: ; 1828 (0:1828) bank1call DrawDuelMainScene - ld a, $1 + ld a, 1 ld [wDamageToSelfMode], a ldtx hl, DamageToSelfDueToConfusionText call DrawWideTextBox_PrintText @@ -4437,7 +4437,7 @@ CheckSelfConfusionDamage: ; 18d7 (0:18d7) ldtx de, ConfusionCheckDamageText call TossCoin jr c, .no_confusion_damage - ld a, $1 + ld a, 1 ld [wGotHeadsFromConfusionCheck], a scf ret @@ -5384,9 +5384,9 @@ DrawLabeledTextBox: ; 1e00 (0:1e00) push hl ; top left tile of the box ld hl, wc000 - ld a, $5 + ld a, TX_SYMBOL ld [hli], a - ld a, $18 + ld a, LOW("<╔>") ld [hli], a ; white tile before the text ld a, $70 @@ -5396,7 +5396,7 @@ DrawLabeledTextBox: ; 1e00 (0:1e00) ld d, h pop hl call CopyText - ld hl, $c003 + ld hl, wc000 + 3 call Func_23c1 ld l, e ld h, d @@ -5413,17 +5413,17 @@ DrawLabeledTextBox: ; 1e00 (0:1e00) jr z, .draw_top_border_right_tile ld b, a .draw_top_border_line_loop - ld a, $5 + ld a, TX_SYMBOL ld [hli], a - ld a, $1c + ld a, LOW("<TOP ═>") ld [hli], a dec b jr nz, .draw_top_border_line_loop .draw_top_border_right_tile - ld a, $5 + ld a, TX_SYMBOL ld [hli], a - ld a, $19 + ld a, LOW("<╗>") ld [hli], a ld [hl], $0 pop bc @@ -6507,7 +6507,7 @@ InitializeCardListParameters: ; 25ea (0:25ea) ld a, [hli] ld [wListItemXPosition], a ld a, [hli] - ld [wcd1c], a + ld [wListItemNameMaxLength], a ld a, [hli] ld [wNumMenuItems], a ld a, [hli] @@ -6852,7 +6852,7 @@ PrintCardListItems: ; 2799 (0:2799) call LoadCardDataToBuffer1_FromDeckIndex call DrawCardSymbol call Func_22ae - ld a, [wcd1c] + ld a, [wListItemNameMaxLength] call CopyCardNameAndLevel ld hl, wDefaultText call Func_21c5 @@ -9436,7 +9436,7 @@ Func_380e: ; 380e (0:380e) ; enable the play time counter and execute the game event at [wGameEvent]. ; then return to the overworld, or restart the game (only after Credits). ExecuteGameEvent: ; 383d (0:383d) - ld a, $1 + ld a, 1 ld [wPlayTimeCounterEnable], a ldh a, [hBankROM] push af @@ -9967,7 +9967,7 @@ Func_3b31: ; 3b31 (0:3b31) ld [wcad4], a .asm_3b45 call ZeroObjectPositions - ld a, $1 + ld a, 1 ld [wVBlankOAMCopyToggle], a pop af call BankswitchHome diff --git a/src/macros/code.asm b/src/macros/code.asm index 9e8a4ce..55f4b63 100644 --- a/src/macros/code.asm +++ b/src/macros/code.asm @@ -3,7 +3,11 @@ lb: MACRO ; r, hi, lo ENDM ldtx: MACRO +if _NARG == 2 ld \1, \2_ +else + ld \1, \2_ \3 +endc ENDM bank1call: MACRO diff --git a/src/wram.asm b/src/wram.asm index 84cd374..2d3b9bc 100644 --- a/src/wram.asm +++ b/src/wram.asm @@ -642,7 +642,8 @@ wCardListHeaderText:: ; cbdc wcbde:: ; cbde ds $1 -wcbdf:: ; cbdf +; flag indicating whether a list of cards should be sorted by ID +wSortCardListByID:: ; cbdf ds $1 wcbe0:: ; cbe0 @@ -958,7 +959,7 @@ wListItemXPosition:: ; cd1a wNumListItems:: ; cd1b ds $1 -wcd1c:: ; cd1c +wListItemNameMaxLength:: ; cd1c ds $1 wListFunctionPointer:: ; cd1d @@ -1298,6 +1299,8 @@ wd0aa:: ; d0aa wd0b4:: ; d0b4 ds $1 +; a GAME_EVENT_* constant corresponding to an entry in GameEventPointerTable +; overworld, duel, credits... wGameEvent:: ; d0b5 ds $1 |