diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/bank01.asm | 22 | ||||
-rw-r--r-- | src/engine/bank06.asm | 38 | ||||
-rw-r--r-- | src/engine/home.asm | 8 |
3 files changed, 45 insertions, 23 deletions
diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index fff7239..a159b07 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -3139,7 +3139,7 @@ ReturnWrongAction: ; 0x54c8 ; display BOXMSG_PLAYERS_TURN or BOXMSG_OPPONENTS_TURN and print -; DuelistsTurnText in a textbox. also call ExchangeRNG. +; DuelistTurnText in a textbox. also call ExchangeRNG. DisplayDuelistTurnScreen: ; 54c8 (1:54c8) call EmptyScreen ld c, BOXMSG_PLAYERS_TURN @@ -3150,7 +3150,7 @@ DisplayDuelistTurnScreen: ; 54c8 (1:54c8) .got_turn ld a, c call DrawDuelBoxMessage - ldtx hl, DuelistsTurnText + ldtx hl, DuelistTurnText call DrawWideTextBox_WaitForInput call ExchangeRNG ret @@ -3503,7 +3503,7 @@ CardListItemSelectionMenu: ; 56c2 (1:56c2) ldtx hl, PlayCheck1Text .got_text call DrawNarrowTextBox_PrintTextNoDelay - ld hl, ItemSelectionMenuParamenters + ld hl, ItemSelectionMenuParameters xor a call InitializeMenuParameters .wait_a_or_b @@ -3525,7 +3525,7 @@ CardListItemSelectionMenu: ; 56c2 (1:56c2) ret ; 0x5708 -ItemSelectionMenuParamenters ; 5708 (1:5708) +ItemSelectionMenuParameters: ; 5708 (1:5708) db 1, 14 ; corsor x, cursor y db 2 ; y displacement between items db 2 ; number of items @@ -4327,7 +4327,7 @@ DisplayCardPage_PokemonOverview: ; 5b7d (1:5b7d) jr z, .basic ld hl, wLoadedCard1PreEvoName lb de, 1, 3 - call ProcessTextFromPointerToID_InitTextPrinting + call InitTextPrinting_ProcessTextFromPointerToID .basic ; print card level and maximum HP lb bc, 12, 2 @@ -4428,7 +4428,7 @@ PrintMoveOrPkmnPowerInformation: ; 5c33 (1:5c33) dec hl ; print text ID pointed to by hl at 7,e ld d, 7 - call ProcessTextFromPointerToID_InitTextPrinting + call InitTextPrinting_ProcessTextFromPointerToID pop hl inc hl inc hl @@ -4549,7 +4549,7 @@ PrintPokemonCardPageGenericInformation: ; 5cc4 (1:5cc4) call DrawCardPageSurroundingBox lb de, 5, 1 ld hl, wLoadedCard1Name - call ProcessTextFromPointerToID_InitTextPrinting + call InitTextPrinting_ProcessTextFromPointerToID ld a, [wCardPageType] or a jr z, .from_loaded_card @@ -4665,7 +4665,7 @@ DisplayCardPage_PokemonDescription: ; 5d54 (1:5d54) ; print the Pokemon's category at 1,10 (just above the length and weight texts) lb de, 1, 10 ld hl, wLoadedCard1Category - call ProcessTextFromPointerToID_InitTextPrinting + call InitTextPrinting_ProcessTextFromPointerToID ld a, TX_KATAKANA call ProcessSpecialTextCharacter ldtx hl, PokemonText @@ -4713,7 +4713,7 @@ PrintCardPageRarityIcon: ; 5dd3 (1:5dd3) ld c, a ld b, $00 add hl, bc - call ProcessTextFromPointerToID_InitTextPrinting + call InitTextPrinting_ProcessTextFromPointerToID ret ; 0x5ddd @@ -4782,7 +4782,7 @@ DisplayEnergyOrTrainerCardPage: ; 5e2d (1:5e2d) ; print the card's name at 4,3 lb de, 4, 3 ld hl, wLoadedCard1Name - call ProcessTextFromPointerToID_InitTextPrinting + call InitTextPrinting_ProcessTextFromPointerToID ; colorize the card image lb de, 6, 4 call ApplyBGP6OrSGB3ToCardImage @@ -5740,7 +5740,7 @@ DisplayUsePokemonPowerScreen: ; 6510 (1:6510) lb de, 1, 4 call InitTextPrinting ld hl, wLoadedCard1Move1Name - call ProcessTextFromPointerToID_InitTextPrinting + call InitTextPrinting_ProcessTextFromPointerToID lb de, 1, 6 ld hl, wLoadedCard1Move1Description call PrintMoveOrCardDescription diff --git a/src/engine/bank06.asm b/src/engine/bank06.asm index d9cb234..0c28bbe 100644 --- a/src/engine/bank06.asm +++ b/src/engine/bank06.asm @@ -1,3 +1,5 @@ +; copy the name and level of the card at wLoadedCard1 to wDefaultText +; a = length in number of tiles (the resulting string will be padded with spaces to match it) _CopyCardNameAndLevel: ; 18000 (6:4000) push bc push de @@ -12,7 +14,10 @@ _CopyCardNameAndLevel: ; 18000 (6:4000) pop hl ld a, [hli] cp TX_HALFWIDTH - jp z, Func_18086 + jp z, _CopyCardNameAndLevel_HalfwidthText + +; the name doesn't start with TX_HALFWIDTH +; this doesn't appear to be ever the case (unless caller manipulates wLoadedCard1Name) ld a, [wcd9b] ld c, a ld a, [wLoadedCard1Type] @@ -83,9 +88,9 @@ _CopyCardNameAndLevel: ; 18000 (6:4000) pop de pop bc ret -; 0x18086 -Func_18086: ; 18086 (6:4086) +; the name starts with TX_HALFWIDTH +_CopyCardNameAndLevel_HalfwidthText: ld a, [wcd9b] inc a add a @@ -224,18 +229,18 @@ Func_180d5: ; 180d5 (6:40d5) push af lb de, 1, 17 call InitTextPrinting - ldtx hl, Text0251 + ldtx hl, EmptyLineText call ProcessTextFromID ld hl, hffb0 ld [hl], $01 - ldtx hl, Text024e + ldtx hl, HandText_2 call ProcessTextFromID ld hl, hffb0 ld [hl], $00 lb de, 1, 17 call InitTextPrinting pop af - ld hl, Data_006_42bb + ld hl, TextIDTable_182bb ld b, 0 sla a ld c, a @@ -399,8 +404,25 @@ Func_006_42b1: ldh [hWhoseTurn], a ret -Data_006_42bb: - INCROM $182bb, $183bb +TextIDTable_182bb: + tx HandText + tx CheckText + tx AttackText + tx PKMNPowerText + tx DoneText + dw NONE + tx DuelistHandText_2 + tx DuelistDiscardPileText + dw NONE + tx DuelistHandText_2 + tx DuelistDiscardPileText + tx HandText + tx CheckText + tx AttackText + tx PKMNPowerText + tx DoneText + + INCROM $182db, $183bb Func_006_43bb: ; 183bb (6:43bb) xor a diff --git a/src/engine/home.asm b/src/engine/home.asm index 0101028..510887f 100644 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -7940,7 +7940,7 @@ CardSymbolTable: db $dc, $02 ; TYPE_TRAINER ; copy the name and level of the card at wLoadedCard1 to wDefaultText -; a = string length in number of tiles (padded with spaces to fit) +; a = length in number of tiles (the resulting string will be padded with spaces to match it) CopyCardNameAndLevel: ; 29f5 (0:29f5) farcall _CopyCardNameAndLevel ret @@ -8348,7 +8348,7 @@ InitTextPrinting_ProcessTextFromID: ; 2c1b (0:2c1b) jr ProcessTextFromID ; like ProcessTextFromPointerToID, except it calls InitTextPrinting first -ProcessTextFromPointerToID_InitTextPrinting: ; 2c20 (0:2c20) +InitTextPrinting_ProcessTextFromPointerToID: ; 2c20 (0:2c20) call InitTextPrinting ; fallthrough @@ -9995,7 +9995,7 @@ CheckNoDamageOrEffect: ; 34b7 (0:34b7) add a ld e, a ld d, $0 - ld hl, NoDamageOrEffectTextPointerTable + ld hl, NoDamageOrEffectTextIDTable add hl, de ld a, [hli] ld h, [hl] @@ -10009,7 +10009,7 @@ CheckNoDamageOrEffect: ; 34b7 (0:34b7) ret ; 0x34d8 -NoDamageOrEffectTextPointerTable: ; 34d8 (0:34d8) +NoDamageOrEffectTextIDTable: ; 34d8 (0:34d8) tx NoDamageOrEffectDueToAgilityText ; NO_DAMAGE_OR_EFFECT_AGILITY tx NoDamageOrEffectDueToBarrierText ; NO_DAMAGE_OR_EFFECT_BARRIER tx NoDamageOrEffectDueToFlyText ; NO_DAMAGE_OR_EFFECT_FLY |