diff options
Diffstat (limited to 'engine/menu/party_menu.asm')
-rwxr-xr-x | engine/menu/party_menu.asm | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index a35524ed..5149e5ab 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -19,83 +19,83 @@ ; f8: leveled up DrawPartyMenu_: xor a - ld [H_AUTOBGTRANSFERENABLED],a + ld [H_AUTOBGTRANSFERENABLED], a call ClearScreen call UpdateSprites callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics RedrawPartyMenu_: - ld a,[wPartyMenuTypeOrMessageID] - cp a,SWAP_MONS_PARTY_MENU - jp z,.printMessage + ld a, [wPartyMenuTypeOrMessageID] + cp SWAP_MONS_PARTY_MENU + jp z, .printMessage call ErasePartyMenuCursors callba InitPartyMenuBlkPacket coord hl, 3, 0 - ld de,wPartySpecies + ld de, wPartySpecies xor a - ld c,a - ld [hPartyMonIndex],a - ld [wWhichPartyMenuHPBar],a + ld c, a + ld [hPartyMonIndex], a + ld [wWhichPartyMenuHPBar], a .loop - ld a,[de] - cp a,$FF ; reached the terminator? - jp z,.afterDrawingMonEntries + ld a, [de] + cp $FF ; reached the terminator? + jp z, .afterDrawingMonEntries push bc push de push hl - ld a,c + ld a, c push hl - ld hl,wPartyMonNicks + ld hl, wPartyMonNicks call GetPartyMonName pop hl call PlaceString ; print the pokemon's name callba WriteMonPartySpriteOAMByPartyIndex ; place the appropriate pokemon icon - ld a,[hPartyMonIndex] - ld [wWhichPokemon],a + ld a, [hPartyMonIndex] + ld [wWhichPokemon], a inc a - ld [hPartyMonIndex],a + ld [hPartyMonIndex], a call LoadMonData pop hl push hl - ld a,[wMenuItemToSwap] + ld a, [wMenuItemToSwap] and a ; is the player swapping pokemon positions? - jr z,.skipUnfilledRightArrow + jr z, .skipUnfilledRightArrow ; if the player is swapping pokemon positions dec a - ld b,a - ld a,[wWhichPokemon] + ld b, a + ld a, [wWhichPokemon] cp b ; is the player swapping the current pokemon in the list? - jr nz,.skipUnfilledRightArrow + jr nz, .skipUnfilledRightArrow ; the player is swapping the current pokemon in the list dec hl dec hl dec hl - ld a,"▷" ; unfilled right arrow menu cursor - ld [hli],a ; place the cursor + ld a, "▷" ; unfilled right arrow menu cursor + ld [hli], a ; place the cursor inc hl inc hl .skipUnfilledRightArrow - ld a,[wPartyMenuTypeOrMessageID] ; menu type - cp a,TMHM_PARTY_MENU - jr z,.teachMoveMenu - cp a,EVO_STONE_PARTY_MENU - jr z,.evolutionStoneMenu + ld a, [wPartyMenuTypeOrMessageID] ; menu type + cp TMHM_PARTY_MENU + jr z, .teachMoveMenu + cp EVO_STONE_PARTY_MENU + jr z, .evolutionStoneMenu push hl - ld bc,14 ; 14 columns to the right - add hl,bc - ld de,wLoadedMonStatus + ld bc, 14 ; 14 columns to the right + add hl, bc + ld de, wLoadedMonStatus call PrintStatusCondition pop hl push hl - ld bc,SCREEN_WIDTH + 1 ; down 1 row and right 1 column - ld a,[hFlags_0xFFF6] - set 0,a - ld [hFlags_0xFFF6],a - add hl,bc + ld bc, SCREEN_WIDTH + 1 ; down 1 row and right 1 column + ld a, [hFlags_0xFFF6] + set 0, a + ld [hFlags_0xFFF6], a + add hl, bc predef DrawHP2 ; draw HP bar and prints current / max HP - ld a,[hFlags_0xFFF6] - res 0,a - ld [hFlags_0xFFF6],a + ld a, [hFlags_0xFFF6] + res 0, a + ld [hFlags_0xFFF6], a call SetPartyMenuHPBarColor ; color the HP bar (on SGB) pop hl jr .printLevel @@ -103,26 +103,26 @@ RedrawPartyMenu_: push hl predef CanLearnTM ; check if the pokemon can learn the move pop hl - ld de,.ableToLearnMoveText - ld a,c + ld de, .ableToLearnMoveText + ld a, c and a - jr nz,.placeMoveLearnabilityString - ld de,.notAbleToLearnMoveText + jr nz, .placeMoveLearnabilityString + ld de, .notAbleToLearnMoveText .placeMoveLearnabilityString - ld bc,20 + 9 ; down 1 row and right 9 columns + ld bc, 20 + 9 ; down 1 row and right 9 columns push hl - add hl,bc + add hl, bc call PlaceString pop hl .printLevel - ld bc,10 ; move 10 columns to the right - add hl,bc + ld bc, 10 ; move 10 columns to the right + add hl, bc call PrintLevel pop hl pop de inc de - ld bc,2 * 20 - add hl,bc + ld bc, 2 * 20 + add hl, bc pop bc inc c jp .loop @@ -132,54 +132,54 @@ RedrawPartyMenu_: db "NOT ABLE@" .evolutionStoneMenu push hl - ld hl,EvosMovesPointerTable - ld b,0 - ld a,[wLoadedMonSpecies] + ld hl, EvosMovesPointerTable + ld b, 0 + ld a, [wLoadedMonSpecies] dec a add a rl b - ld c,a - add hl,bc - ld de,wcd6d - ld a,BANK(EvosMovesPointerTable) - ld bc,2 + ld c, a + add hl, bc + ld de, wcd6d + ld a, BANK(EvosMovesPointerTable) + ld bc, 2 call FarCopyData - ld hl,wcd6d - ld a,[hli] - ld h,[hl] - ld l,a - ld de,wcd6d - ld a,BANK(EvosMovesPointerTable) - ld bc,Mon133_EvosEnd - Mon133_EvosMoves + ld hl, wcd6d + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wcd6d + ld a, BANK(EvosMovesPointerTable) + ld bc, Mon133_EvosEnd - Mon133_EvosMoves call FarCopyData - ld hl,wcd6d - ld de,.notAbleToEvolveText + ld hl, wcd6d + ld de, .notAbleToEvolveText ; loop through the pokemon's evolution entries .checkEvolutionsLoop - ld a,[hli] + ld a, [hli] and a ; reached terminator? - jr z,.placeEvolutionStoneString ; if so, place the "NOT ABLE" string + jr z, .placeEvolutionStoneString ; if so, place the "NOT ABLE" string inc hl inc hl - cp a,EV_ITEM - jr nz,.checkEvolutionsLoop + cp EV_ITEM + jr nz, .checkEvolutionsLoop ; if it's a stone evolution entry dec hl dec hl - ld b,[hl] - ld a,[wEvoStoneItemID] ; the stone the player used + ld b, [hl] + ld a, [wEvoStoneItemID] ; the stone the player used inc hl inc hl inc hl cp b ; does the player's stone match this evolution entry's stone? - jr nz,.checkEvolutionsLoop + jr nz, .checkEvolutionsLoop ; if it does match - ld de,.ableToEvolveText + ld de, .ableToEvolveText .placeEvolutionStoneString - ld bc,20 + 9 ; down 1 row and right 9 columns + ld bc, 20 + 9 ; down 1 row and right 9 columns pop hl push hl - add hl,bc + add hl, bc call PlaceString pop hl jr .printLevel @@ -191,44 +191,44 @@ RedrawPartyMenu_: ld b, SET_PAL_PARTY_MENU call RunPaletteCommand .printMessage - ld hl,wd730 - ld a,[hl] + ld hl, wd730 + ld a, [hl] push af push hl - set 6,[hl] ; turn off letter printing delay - ld a,[wPartyMenuTypeOrMessageID] ; message ID - cp a,$F0 - jr nc,.printItemUseMessage + set 6, [hl] ; turn off letter printing delay + ld a, [wPartyMenuTypeOrMessageID] ; message ID + cp $F0 + jr nc, .printItemUseMessage add a - ld hl,PartyMenuMessagePointers - ld b,0 - ld c,a - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a + ld hl, PartyMenuMessagePointers + ld b, 0 + ld c, a + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a call PrintText .done pop hl pop af - ld [hl],a - ld a,1 - ld [H_AUTOBGTRANSFERENABLED],a + ld [hl], a + ld a, 1 + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 jp GBPalNormal .printItemUseMessage - and a,$0F - ld hl,PartyMenuItemUseMessagePointers + and $0F + ld hl, PartyMenuItemUseMessagePointers add a - ld c,a - ld b,0 - add hl,bc - ld a,[hli] - ld h,[hl] - ld l,a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a push hl - ld a,[wUsedItemOnWhichPokemon] - ld hl,wPartyMonNicks + ld a, [wUsedItemOnWhichPokemon] + ld hl, wPartyMonNicks call GetPartyMonName pop hl call PrintText |