diff options
author | Daniel Harding <33dannye@gmail.com> | 2021-01-14 13:47:31 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 13:47:31 -0600 |
commit | 03e37ba8419dd027f87d355a5fb1bf60c397d5b2 (patch) | |
tree | d1834a7f962771e0135f270183a66592809be2a4 /src | |
parent | 0dc8af64aab2658a882f73d34bd7a5cc6563f7a1 (diff) | |
parent | 220133c398784bc37ee0447455bf6f6e4d2ba03f (diff) |
Merge pull request #88 from SailorMoonFan01/master
More disassembling on engine/bank01
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/bank01.asm | 130 |
1 files changed, 129 insertions, 1 deletions
diff --git a/src/engine/bank01.asm b/src/engine/bank01.asm index 2c2a23f..8c996bc 100644 --- a/src/engine/bank01.asm +++ b/src/engine/bank01.asm @@ -5694,7 +5694,135 @@ PrintPlayAreaCardAttachedEnergies: ; 63e6 (1:63e6) ret ; 0x6423 - INCROM $6423, $6510 +Func_6423: ; 6423 (1:6423) + ld hl, wDefaultText + ld e, $08 +.asm_6428 + ld a, [hli] + call JPWriteByteToBGMap0 + inc b + dec e + jr nz, .asm_6428 + ret +; 0x6431 + +Func_6431: ; 6431 (1:6431) + xor a + ld [wSelectedDuelSubMenuItem], a + +Func_6435: + call Func_64b0 + ld hl, PlayAreaScreenMenuParameters_ActivePokemonIncluded + ld a, [wSelectedDuelSubMenuItem] + call InitializeMenuParameters + ld a, [wNumPlayAreaItems] + ld [wNumMenuItems], a +.asm_6447 + call DoFrame + call HandleMenuInput + ldh [hTempPlayAreaLocation_ff9d], a + ld [wHUDEnergyAndHPBarsX], a + jr nc, .asm_6447 + cp $ff + jr z, .asm_649b + ld [wSelectedDuelSubMenuItem], a + ldh a, [hKeysPressed] + and START + jr nz, .asm_649d + ldh a, [hCurMenuItem] + add a + ld e, a + ld d, $00 + ld hl, wDuelTempList + 1 + add hl, de + ld a, [hld] + cp $04 + jr nz, .asm_6447 + ld a, [hl] + ldh [hTempCardIndex_ff98], a + ld d, a + ld e, $00 + call CopyMoveDataAndDamage_FromDeckIndex + call DisplayUsePokemonPowerScreen + ld a, EFFECTCMDTYPE_INITIAL_EFFECT_1 + call TryExecuteEffectCommandFunction + jr nc, .asm_648c + ldtx hl, PokemonPowerSelectNotRequiredText + call DrawWideTextBox_WaitForInput + jp Func_6435 +.asm_648c + ldtx hl, UseThisPokemonPowerText + call YesOrNoMenuWithText + jp c, Func_6435 + ldh a, [hTempCardIndex_ff98] + ldh [hTemp_ffa0], a + or a + ret +.asm_649b + scf + ret +.asm_649d + ldh a, [hCurMenuItem] + add DUELVARS_ARENA_CARD + call GetTurnDuelistVariable + call GetCardIDFromDeckIndex + call LoadCardDataToBuffer1_FromCardID + call OpenCardPage_FromCheckPlayArea + jp Func_6435 +; 0x64b0 + +Func_64b0: ; 64b0 (1:64b0) + call ZeroObjectPositionsAndToggleOAMCopy + call EmptyScreen + call LoadDuelCardSymbolTiles + call LoadDuelCheckPokemonScreenTiles + ld de, wDuelTempList + call SetListPointer + ld a, DUELVARS_NUMBER_OF_POKEMON_IN_PLAY_AREA + call GetTurnDuelistVariable + ld c, a + ld b, $00 +.asm_64ca + push hl + push bc + ld a, b + ld [wHUDEnergyAndHPBarsX], a + ld a, b + add a + add b + ld [wCurPlayAreaY], a + ld a, b + add DUELVARS_ARENA_CARD + call GetTurnDuelistVariable + call SetNextElementOfList + call PrintPlayAreaCardHeader + call PrintPlayAreaCardLocation + call Func_64fc + ld a, [wLoadedCard1Move1Category] + call SetNextElementOfList + pop bc + pop hl + inc b + dec c + jr nz, .asm_64ca + ld a, b + ld [wNumPlayAreaItems], a + call EnableLCD + ret +; 0x64fc + +Func_64fc: ; 64fc (1:64fc) + ld a, [wLoadedCard1Move1Category] + cp POKEMON_POWER + ret nz + ld a, [wCurPlayAreaY] + inc a + ld e, a + ld d, $04 + ld hl, wLoadedCard1Move1Name + call InitTextPrinting_ProcessTextFromPointerToID + ret +; 0x6510 ; display the screen that prompts the player to use the selected card's ; Pokemon Power. Includes the card's information above, and the Pokemon Power's |