mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Use more lb
and other clean up
This commit is contained in:
parent
891627d4ba
commit
f8a9c37a00
106 changed files with 346 additions and 326 deletions
|
|
@ -164,7 +164,7 @@ FillFourRowsWithBlack: ; 7417b (1d:417b)
|
|||
FillMiddleOfScreenWithWhite: ; 74183 (1d:4183)
|
||||
coord hl, 0, 4
|
||||
ld bc, SCREEN_WIDTH * 10
|
||||
ld a, $7f ; blank white tile
|
||||
ld a, " "
|
||||
jp FillMemory
|
||||
|
||||
Credits: ; 7418e (1d:418e)
|
||||
|
|
@ -246,7 +246,7 @@ Credits: ; 7418e (1d:418e)
|
|||
pop de
|
||||
ld de, TheEndGfx
|
||||
ld hl, vChars2 + $600
|
||||
ld bc, (BANK(TheEndGfx) << 8) + $0a
|
||||
lb bc, BANK(TheEndGfx), $0a
|
||||
call CopyVideoData
|
||||
coord hl, 4, 8
|
||||
ld de, TheEndTextString
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ DungeonMaps2: ; 70a44 (1c:4a44)
|
|||
LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
|
||||
ld hl, vChars1 + $7f0
|
||||
ld de, BattleTransitionTile
|
||||
ld bc, (BANK(BattleTransitionTile) << 8) + $01
|
||||
lb bc, BANK(BattleTransitionTile), $01
|
||||
jp CopyVideoData
|
||||
|
||||
BattleTransitionTile: ; 70a59 (1c:4a59)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
|
|||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID
|
||||
coord hl, 1, 5
|
||||
ld bc, $307
|
||||
lb bc, 3, 7
|
||||
call ClearScreenArea
|
||||
call DisableLCD
|
||||
call LoadFontTilePatterns
|
||||
|
|
@ -110,7 +110,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
|
|||
ld hl, vBGMap0
|
||||
ld bc, $400
|
||||
.clearBackgroundLoop
|
||||
ld a, $7f
|
||||
ld a, " "
|
||||
ld [hli], a
|
||||
dec bc
|
||||
ld a, b
|
||||
|
|
@ -717,8 +717,8 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3)
|
|||
ld [wHPBarMaxHP+1], a
|
||||
ld a, [hl]
|
||||
ld [wHPBarMaxHP], a
|
||||
ld de, $fff2
|
||||
add hl, de ; skip back fomr max hp to current hp
|
||||
ld de, wBattleMonHP - wBattleMonMaxHP
|
||||
add hl, de ; skip back from max hp to current hp
|
||||
ld a, [hl]
|
||||
ld [wHPBarOldHP], a ; add bc to current HP
|
||||
add c
|
||||
|
|
@ -852,7 +852,7 @@ FaintEnemyPokemon: ; 0x3c567
|
|||
coord de, 12, 6
|
||||
call SlideDownFaintedMonPic
|
||||
coord hl, 0, 0
|
||||
ld bc, $40b
|
||||
lb bc, 4, 11
|
||||
call ClearScreenArea
|
||||
ld a, [W_ISINBATTLE]
|
||||
dec a
|
||||
|
|
@ -1100,7 +1100,7 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
|
|||
ld [wBattleMonStatus], a
|
||||
call ReadPlayerMonCurHPAndStatus
|
||||
coord hl, 9, 7
|
||||
ld bc, $50b
|
||||
lb bc, 5, 11
|
||||
call ClearScreenArea
|
||||
coord hl, 1, 10
|
||||
coord de, 1, 11
|
||||
|
|
@ -1132,7 +1132,7 @@ DoUseNextMonDialogue: ; 3c79b (f:479b)
|
|||
call PrintText
|
||||
.displayYesNoBox
|
||||
coord hl, 13, 9
|
||||
ld bc, $a0e
|
||||
lb bc, 10, 14
|
||||
ld a, TWO_OPTION_MENU
|
||||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID
|
||||
|
|
@ -1209,7 +1209,7 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
|
|||
cp $c8 + SONY1
|
||||
jr nz, .notSony1Battle
|
||||
coord hl, 0, 0 ; sony 1 battle
|
||||
ld bc, $815
|
||||
lb bc, 8, 21
|
||||
call ClearScreenArea
|
||||
call ScrollTrainerPicAfterBattle
|
||||
ld c, 40
|
||||
|
|
@ -1449,7 +1449,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
|
|||
ld hl, TrainerAboutToUseText
|
||||
call PrintText
|
||||
coord hl, 0, 7
|
||||
ld bc,$0801
|
||||
lb bc, 8, 1
|
||||
ld a,TWO_OPTION_MENU
|
||||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID
|
||||
|
|
@ -1484,7 +1484,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
|
|||
.next4
|
||||
call ClearSprites
|
||||
coord hl, 0, 0
|
||||
ld bc,$040B
|
||||
lb bc, 4, 11
|
||||
call ClearScreenArea
|
||||
ld b,1
|
||||
call GoPAL_SET
|
||||
|
|
@ -1886,7 +1886,7 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
|
|||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
coord hl, 9, 7
|
||||
ld bc, $50b
|
||||
lb bc, 5, 11
|
||||
call ClearScreenArea
|
||||
callab PlacePlayerHUDTiles
|
||||
coord hl, 18, 9
|
||||
|
|
@ -1947,7 +1947,7 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
|
|||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
coord hl, 0, 0
|
||||
ld bc, $40c
|
||||
lb bc, 4, 12
|
||||
call ClearScreenArea
|
||||
callab PlaceEnemyHUDTiles
|
||||
ld de, wEnemyMonNick
|
||||
|
|
@ -2055,11 +2055,11 @@ CenterMonName: ; 3ce9c (f:4e9c)
|
|||
.loop
|
||||
inc de
|
||||
ld a, [de]
|
||||
cp $50
|
||||
cp "@"
|
||||
jr z, .done
|
||||
inc de
|
||||
ld a, [de]
|
||||
cp $50
|
||||
cp "@"
|
||||
jr z, .done
|
||||
dec hl
|
||||
dec b
|
||||
|
|
@ -2091,7 +2091,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
|
|||
; the following happens for the old man tutorial
|
||||
ld hl, wPlayerName
|
||||
ld de, W_GRASSRATE
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData ; temporarily save the player name in unused space,
|
||||
; which is supposed to get overwritten when entering a
|
||||
; map with wild Pokémon. Due to an oversight, the data
|
||||
|
|
@ -2099,14 +2099,14 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
|
|||
; Missingno. glitch can show up.
|
||||
ld hl, .oldManName
|
||||
ld de, wPlayerName
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
; the following simulates the keystrokes by drawing menus on screen
|
||||
coord hl, 9, 14
|
||||
ld [hl], "▶"
|
||||
ld c, 80
|
||||
call DelayFrames
|
||||
ld [hl], $7f
|
||||
ld [hl], " "
|
||||
coord hl, 9, 16
|
||||
ld [hl], "▶"
|
||||
ld c, 50
|
||||
|
|
@ -2395,7 +2395,7 @@ PartyMenuOrRockOrRun:
|
|||
.partyMonDeselected
|
||||
coord hl, 11, 11
|
||||
ld bc, $81
|
||||
ld a, $7f
|
||||
ld a, " "
|
||||
call FillMemory
|
||||
xor a ; NORMAL_PARTY_MENU
|
||||
ld [wPartyMenuTypeOrMessageID], a
|
||||
|
|
@ -2585,7 +2585,7 @@ MoveSelectionMenu: ; 3d219 (f:5219)
|
|||
.relearnmenu
|
||||
ld a, [wWhichPokemon]
|
||||
ld hl, wPartyMon1Moves
|
||||
ld bc, $2c
|
||||
ld bc, wPartyMon2 - wPartyMon1
|
||||
call AddNTimes
|
||||
call .loadmoves
|
||||
coord hl, 4, 7
|
||||
|
|
@ -2662,7 +2662,7 @@ SelectMenuItem: ; 3d2fe (f:52fe)
|
|||
jr z, .select
|
||||
coord hl, 5, 13
|
||||
dec a
|
||||
ld bc, $14
|
||||
ld bc, SCREEN_WIDTH
|
||||
call AddNTimes
|
||||
ld [hl], $ec
|
||||
.select
|
||||
|
|
@ -2862,7 +2862,7 @@ SwapMovesInMenu: ; 3d435 (f:5435)
|
|||
push hl
|
||||
call .swapBytes ; swap moves
|
||||
pop hl
|
||||
ld bc, $15
|
||||
ld bc, wPartyMon1PP - wPartyMon1Moves
|
||||
add hl, bc
|
||||
call .swapBytes ; swap move PP
|
||||
xor a
|
||||
|
|
@ -6318,7 +6318,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
|
|||
call GetMonName
|
||||
ld hl, wcd6d
|
||||
ld de, wEnemyMonNick
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld a, [wEnemyMonSpecies2]
|
||||
ld [wd11e], a
|
||||
|
|
@ -6718,11 +6718,11 @@ LoadHudTilePatterns: ; 3ee5b (f:6e5b)
|
|||
.lcdEnabled
|
||||
ld de, BattleHudTiles1
|
||||
ld hl, vChars2 + $6d0
|
||||
ld bc, (BANK(BattleHudTiles1) << 8) + $03
|
||||
lb bc, BANK(BattleHudTiles1), $03
|
||||
call CopyVideoDataDouble
|
||||
ld de, BattleHudTiles2
|
||||
ld hl, vChars2 + $730
|
||||
ld bc, (BANK(BattleHudTiles2) << 8) + $06
|
||||
lb bc, BANK(BattleHudTiles2), $06
|
||||
jp CopyVideoDataDouble
|
||||
|
||||
PrintEmptyString: ; 3ee94 (f:6e94)
|
||||
|
|
@ -6942,10 +6942,10 @@ InitBattle_Common: ; 3efeb (f:6feb)
|
|||
ld [H_AUTOBGTRANSFERDEST + 1], a
|
||||
call LoadScreenTilesFromBuffer1
|
||||
coord hl, 9, 7
|
||||
ld bc, $50a
|
||||
lb bc, 5, 10
|
||||
call ClearScreenArea
|
||||
coord hl, 1, 0
|
||||
ld bc, $40a
|
||||
lb bc, 4, 10
|
||||
call ClearScreenArea
|
||||
call ClearSprites
|
||||
ld a, [W_ISINBATTLE]
|
||||
|
|
@ -7089,8 +7089,8 @@ LoadMonBackPic: ; 3f103 (f:7103)
|
|||
ld a, [wBattleMonSpecies2]
|
||||
ld [wcf91], a
|
||||
coord hl, 1, 5
|
||||
ld b, $7
|
||||
ld c, $8
|
||||
ld b, 7
|
||||
ld c, 8
|
||||
call ClearScreenArea
|
||||
ld hl, W_MONHBACKSPRITE - W_MONHEADER
|
||||
call UncompressMonSprite
|
||||
|
|
@ -7928,7 +7928,7 @@ FellText: ; 3f683 (f:7683)
|
|||
|
||||
PrintStatText: ; 3f688 (f:7688)
|
||||
ld hl, StatsTextStrings
|
||||
ld c, $50
|
||||
ld c, "@"
|
||||
.asm_3f68d
|
||||
dec b
|
||||
jr z, .asm_3f696
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ DrawEnemyPokeballs: ; 3a857 (e:6857)
|
|||
LoadPartyPokeballGfx: ; 3a85d (e:685d)
|
||||
ld de, PokeballTileGraphics
|
||||
ld hl, vSprites + $310
|
||||
ld bc, (BANK(PokeballTileGraphics) << 8) + $04
|
||||
lb bc, BANK(PokeballTileGraphics), $04
|
||||
jp CopyVideoData
|
||||
|
||||
SetupOwnPartyPokeballs: ; 3a869 (e:6869)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ MarowakAnim: ; 708ca (1c:48ca)
|
|||
call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same
|
||||
; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap
|
||||
coord hl, 12, 0
|
||||
ld bc, $707
|
||||
lb bc, 7, 7
|
||||
call ClearScreenArea
|
||||
call Delay3
|
||||
xor a
|
||||
|
|
@ -59,7 +59,7 @@ CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
|
|||
ld a, $70
|
||||
ld [W_BASECOORDX], a
|
||||
ld hl, wOAMBuffer
|
||||
ld bc, $606
|
||||
lb bc, 6, 6
|
||||
ld d, $8
|
||||
.oamLoop
|
||||
push bc
|
||||
|
|
|
|||
|
|
@ -665,7 +665,7 @@ AISwitchIfEnoughMons: ; 3a72a (e:672a)
|
|||
inc d
|
||||
.Fainted
|
||||
push bc
|
||||
ld bc,$2C
|
||||
ld bc, wEnemyMon2 - wEnemyMon1
|
||||
add hl,bc
|
||||
pop bc
|
||||
dec c
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345
|
|||
ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
|
||||
ld [de], a ; end of part 1
|
||||
inc de
|
||||
ld bc, $100
|
||||
lb bc, 1, 0
|
||||
jr .patchPartyMonsLoop
|
||||
.finishedPatchingPlayerData
|
||||
ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
|
||||
|
|
@ -400,7 +400,7 @@ TradeCenter_SelectMon:
|
|||
ld a, 1
|
||||
ld [wTopMenuItemX], a
|
||||
coord hl, 1, 1
|
||||
ld bc, $0601
|
||||
lb bc, 6, 1
|
||||
call ClearScreenArea
|
||||
.playerMonMenu_HandleInput
|
||||
ld hl, hFlags_0xFFF6
|
||||
|
|
@ -713,7 +713,7 @@ TradeCenter_Trade:
|
|||
call TextCommandProcessor
|
||||
call SaveScreenTilesToBuffer1
|
||||
coord hl, 10, 7
|
||||
ld bc, $080b
|
||||
lb bc, 8, 11
|
||||
ld a, TRADE_CANCEL_MENU
|
||||
ld [wTwoOptionMenuID], a
|
||||
ld a, TWO_OPTION_MENU
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ DoClearSaveDialogue: ; 1c98a (7:498a)
|
|||
ld hl, ClearSaveDataText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc, $80f
|
||||
lb bc, 8, 15
|
||||
ld a, NO_YES_MENU
|
||||
ld [wTwoOptionMenuID], a
|
||||
ld a, TWO_OPTION_MENU
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ EvolveMon: ; 7bde9 (1e:7de9)
|
|||
call DelayFrames
|
||||
ld c, $1
|
||||
call EvolutionSetWholeScreenPalette
|
||||
ld bc, $110
|
||||
lb bc, $1, $10
|
||||
.animLoop
|
||||
push bc
|
||||
call Evolution_CheckForCancel
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ RenameEvolvedMon: ; 3aef7 (e:6ef7)
|
|||
cp $50
|
||||
jr nz, .compareNamesLoop
|
||||
ld a, [wWhichPokemon]
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
ld hl, wPartyMonNicks
|
||||
call AddNTimes
|
||||
push hl
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ LoadShootingStarGraphics: ; 70000 (1c:4000)
|
|||
ld [rOBP1], a
|
||||
ld de, AnimationTileset2 + $30 ; star tile (top left quadrant)
|
||||
ld hl, vChars1 + $200
|
||||
ld bc, (BANK(AnimationTileset2) << 8) + $01
|
||||
lb bc, BANK(AnimationTileset2), $01
|
||||
call CopyVideoData
|
||||
ld de, AnimationTileset2 + $130 ; star tile (bottom left quadrant)
|
||||
ld hl, vChars1 + $210
|
||||
ld bc, (BANK(AnimationTileset2) << 8) + $01
|
||||
lb bc, BANK(AnimationTileset2), $01
|
||||
call CopyVideoData
|
||||
ld de, FallingStar
|
||||
ld hl, vChars1 + $220
|
||||
ld bc, (BANK(FallingStar) << 8) + $01
|
||||
lb bc, BANK(FallingStar), $01
|
||||
call CopyVideoData
|
||||
ld hl, GameFreakLogoOAMData
|
||||
ld de, wOAMBuffer + $60
|
||||
|
|
@ -31,7 +31,7 @@ AnimateShootingStar: ; 70044 (1c:4044)
|
|||
|
||||
; Move the big star down and left across the screen.
|
||||
ld hl, wOAMBuffer
|
||||
ld bc, $a004
|
||||
lb bc, $a0, $4
|
||||
.bigStarLoop
|
||||
push hl
|
||||
push bc
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
|
|||
call DisableLCD
|
||||
ld hl,vBGMap0
|
||||
ld bc, $800
|
||||
ld a, $7f
|
||||
ld a, " "
|
||||
call FillMemory
|
||||
call EnableLCD
|
||||
ld hl, rLCDC
|
||||
|
|
@ -187,7 +187,7 @@ HoFLoadPlayerPics: ; 7033e (1c:433e)
|
|||
ld a, BANK(RedPicFront)
|
||||
call UncompressSpriteFromDE
|
||||
ld hl, S_SPRITEBUFFER1
|
||||
ld de, $a000
|
||||
ld de, S_SPRITEBUFFER0
|
||||
ld bc, $310
|
||||
call CopyData
|
||||
ld de, vFrontPic
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced)
|
|||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
coord hl, 0, 0
|
||||
ld bc, $060a
|
||||
lb bc, 6, 10
|
||||
call TextBoxBorder
|
||||
coord hl, 1, 2
|
||||
ld de, StatusAilmentText1
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5)
|
|||
.next
|
||||
add hl, de
|
||||
push hl
|
||||
ld a, $7f
|
||||
ld a, " "
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9)
|
|||
ld a,[hli]
|
||||
push af
|
||||
ld de,wInGameTradeMonNick
|
||||
ld bc,$000b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
pop af
|
||||
ld l,a
|
||||
|
|
@ -81,7 +81,7 @@ InGameTrade_GetMonName: ; 71b6a (1c:5b6a)
|
|||
call GetMonName
|
||||
ld hl,wcd6d
|
||||
pop de
|
||||
ld bc,$b
|
||||
ld bc, 11
|
||||
jp CopyData
|
||||
|
||||
INCLUDE "data/trades.asm"
|
||||
|
|
@ -105,7 +105,7 @@ InGameTrade_DoTrade: ; 71c07 (1c:5c07)
|
|||
jr nz,.tradeFailed ; jump if the selected mon's species is not the required one
|
||||
ld a,[wWhichPokemon]
|
||||
ld hl,wPartyMon1Level
|
||||
ld bc,$002c
|
||||
ld bc, wPartyMon2 - wPartyMon1
|
||||
call AddNTimes
|
||||
ld a,[hl]
|
||||
ld [W_CURENEMYLVL],a
|
||||
|
|
@ -168,11 +168,11 @@ InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1)
|
|||
ld a, [wInGameTradeReceiveMonSpecies]
|
||||
ld [hl], a ; wTradedEnemyMonSpecies
|
||||
ld hl, wPartyMonOT
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
ld a, [wWhichPokemon]
|
||||
call AddNTimes
|
||||
ld de, wTradedPlayerMonOT
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call InGameTrade_CopyData
|
||||
ld hl, InGameTrade_TrainerString
|
||||
ld de, wTradedEnemyMonOT
|
||||
|
|
@ -201,16 +201,16 @@ InGameTrade_CopyData: ; 71d11 (1c:5d11)
|
|||
|
||||
InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19)
|
||||
ld hl, wPartyMonNicks
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call InGameTrade_GetReceivedMonPointer
|
||||
ld hl, wInGameTradeMonNick
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMonOT
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call InGameTrade_GetReceivedMonPointer
|
||||
ld hl, InGameTrade_TrainerString
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMon1OTID
|
||||
ld bc, wPartyMon2 - wPartyMon1
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ PlayIntroScene: ; 4169d (10:569d)
|
|||
ld [W_BASECOORDX], a
|
||||
ld a, 80
|
||||
ld [W_BASECOORDY], a
|
||||
ld bc, $606
|
||||
lb bc, 6, 6
|
||||
call InitIntroNidorinoOAM
|
||||
ld de, $28ff ; move Nidorino right by 80 pixels
|
||||
call IntroMoveMon
|
||||
|
|
|
|||
|
|
@ -734,22 +734,22 @@ ItemUseMedicine: ; dabb (3:5abb)
|
|||
ld bc,4
|
||||
add hl,bc ; hl now points to status
|
||||
ld a,[wcf91]
|
||||
ld bc, (ANTIDOTE_MSG << 8) | (1 << PSN)
|
||||
lb bc, ANTIDOTE_MSG, 1 << PSN
|
||||
cp a,ANTIDOTE
|
||||
jr z,.checkMonStatus
|
||||
ld bc, (BURN_HEAL_MSG << 8) | (1 << BRN)
|
||||
lb bc, BURN_HEAL_MSG, 1 << BRN
|
||||
cp a,BURN_HEAL
|
||||
jr z,.checkMonStatus
|
||||
ld bc, (ICE_HEAL_MSG << 8) | (1 << FRZ)
|
||||
lb bc, ICE_HEAL_MSG, 1 << FRZ
|
||||
cp a,ICE_HEAL
|
||||
jr z,.checkMonStatus
|
||||
ld bc, (AWAKENING_MSG << 8) | SLP
|
||||
lb bc, AWAKENING_MSG, SLP
|
||||
cp a,AWAKENING
|
||||
jr z,.checkMonStatus
|
||||
ld bc, (PARALYZ_HEAL_MSG << 8) | (1 << PAR)
|
||||
lb bc, PARALYZ_HEAL_MSG, 1 << PAR
|
||||
cp a,PARLYZ_HEAL
|
||||
jr z,.checkMonStatus
|
||||
ld bc, (FULL_HEAL_MSG << 8) | $ff ; Full Heal
|
||||
lb bc, FULL_HEAL_MSG, $ff ; Full Heal
|
||||
.checkMonStatus
|
||||
ld a,[hl] ; pokemon's status
|
||||
and c ; does the pokemon have a status ailment the item can cure?
|
||||
|
|
@ -1737,7 +1737,7 @@ CoinCaseNumCoinsText: ; e247 (3:6247)
|
|||
ItemUseOldRod: ; e24c (3:624c)
|
||||
call FishingInit
|
||||
jp c, ItemUseNotTime
|
||||
ld bc, (5 << 8) | MAGIKARP
|
||||
lb bc, 5, MAGIKARP
|
||||
ld a, $1 ; set bite
|
||||
jr RodResponse
|
||||
|
||||
|
|
@ -2088,7 +2088,7 @@ ItemUseTMHM: ; e479 (3:6479)
|
|||
ld hl,TeachMachineMoveText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc,$080f
|
||||
lb bc, 8, 15
|
||||
ld a,TWO_OPTION_MENU
|
||||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID ; yes/no menu
|
||||
|
|
@ -2479,7 +2479,7 @@ TossItem_: ; e6f1 (3:66f1)
|
|||
ld hl,IsItOKToTossItemText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc,$080f
|
||||
lb bc, 8, 15
|
||||
ld a,TWO_OPTION_MENU
|
||||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID ; yes/no menu
|
||||
|
|
@ -2578,14 +2578,14 @@ SendNewMonToBox: ; e7a4 (3:67a4)
|
|||
jr nz, .asm_e7b1
|
||||
call GetMonHeader
|
||||
ld hl, wBoxMonOT
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
ld a, [W_NUMINBOX]
|
||||
dec a
|
||||
jr z, .asm_e7ee
|
||||
dec a
|
||||
call AddNTimes
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
add hl, bc
|
||||
ld d, h
|
||||
ld e, l
|
||||
|
|
@ -2596,7 +2596,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
|
|||
.asm_e7db
|
||||
push bc
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
pop hl
|
||||
ld d, h
|
||||
|
|
@ -2609,17 +2609,17 @@ SendNewMonToBox: ; e7a4 (3:67a4)
|
|||
.asm_e7ee
|
||||
ld hl, wPlayerName
|
||||
ld de, wBoxMonOT
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld a, [W_NUMINBOX]
|
||||
dec a
|
||||
jr z, .asm_e82a
|
||||
ld hl, wBoxMonNicks
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
dec a
|
||||
call AddNTimes
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
add hl, bc
|
||||
ld d, h
|
||||
ld e, l
|
||||
|
|
@ -2630,7 +2630,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
|
|||
.asm_e817
|
||||
push bc
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
pop hl
|
||||
ld d, h
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ LearnMove: ; 6e43 (1:6e43)
|
|||
call GetPartyMonName
|
||||
ld hl, wcd6d
|
||||
ld de, wd036
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
|
||||
DontAbandonLearning: ; 6e5b (1:6e5b)
|
||||
|
|
@ -77,7 +77,7 @@ AbandonLearning: ; 6eda (1:6eda)
|
|||
ld hl, AbandonLearningText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc, $80f
|
||||
lb bc, 8, 15
|
||||
ld a, TWO_OPTION_MENU
|
||||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID ; yes/no menu
|
||||
|
|
@ -100,7 +100,7 @@ TryingToLearn: ; 6f07 (1:6f07)
|
|||
ld hl, TryingToLearnText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc, $80f
|
||||
lb bc, 8, 15
|
||||
ld a, TWO_OPTION_MENU
|
||||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID ; yes/no menu
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ LoadPokedexTilePatterns: ; 17840 (5:7840)
|
|||
call LoadHpBarAndStatusTilePatterns
|
||||
ld de,PokedexTileGraphics
|
||||
ld hl,vChars2 + $600
|
||||
ld bc,(BANK(PokedexTileGraphics) << 8) + $12
|
||||
lb bc, BANK(PokedexTileGraphics), $12
|
||||
call CopyVideoData
|
||||
ld de,PokeballTileGraphics
|
||||
ld hl,vChars2 + $720
|
||||
ld bc,(BANK(PokeballTileGraphics) << 8) + $01
|
||||
lb bc, BANK(PokeballTileGraphics), $01
|
||||
jp CopyVideoData ; load pokeball tile for marking caught mons
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ BillsPCMenu: ; 214e8 (8:54e8)
|
|||
ld [wCurrentMenuItem], a
|
||||
ld hl, vChars2 + $780
|
||||
ld de, PokeballTileGraphics
|
||||
ld bc, (BANK(PokeballTileGraphics) << 8) + $01
|
||||
lb bc, BANK(PokeballTileGraphics), $01
|
||||
call CopyVideoData
|
||||
call LoadScreenTilesFromBuffer2DisableBGTransfer
|
||||
coord hl, 0, 0
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
|
|||
ld a, BANK(CircleTile)
|
||||
call FarCopyData2
|
||||
coord hl, 0, 0
|
||||
ld bc, $1012
|
||||
lb bc, 16, 18
|
||||
predef Diploma_TextBoxBorder
|
||||
ld hl, DiplomaTextPointersAndCoords
|
||||
ld c, $5
|
||||
|
|
@ -41,7 +41,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
|
|||
; Move the player 33 pixels right and set the priority bit so he appears
|
||||
; behind the background layer.
|
||||
ld hl, wOAMBuffer + $01
|
||||
ld bc, $8028
|
||||
lb bc, $80, $28
|
||||
.adjustPlayerGfxLoop
|
||||
ld a, [hl] ; X
|
||||
add 33
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ LeaguePCShowMon: ; 76610 (1d:6610)
|
|||
ld a, [hli]
|
||||
ld [wHoFMonLevel], a
|
||||
ld de, wcd6d
|
||||
ld bc, $000B
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld b, $0B
|
||||
ld c, 0
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ AskName: ; 64eb (1:64eb)
|
|||
ld a, [W_ISINBATTLE]
|
||||
dec a
|
||||
coord hl, 0, 0
|
||||
ld b, $4
|
||||
ld c, $b
|
||||
ld b, 4
|
||||
ld c, 11
|
||||
call z, ClearScreenArea ; only if in wild batle
|
||||
ld a, [wcf91]
|
||||
ld [wd11e], a
|
||||
|
|
@ -14,7 +14,7 @@ AskName: ; 64eb (1:64eb)
|
|||
ld hl, DoYouWantToNicknameText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc, $80f
|
||||
lb bc, 8, 15
|
||||
ld a, TWO_OPTION_MENU
|
||||
ld [wTextBoxID], a
|
||||
call DisplayTextBoxID
|
||||
|
|
@ -64,10 +64,10 @@ DisplayNameRaterScreen: ; 655c (1:655c)
|
|||
call RestoreScreenTilesAndReloadTilePatterns
|
||||
call LoadGBPal
|
||||
ld a, [wcf4b]
|
||||
cp $50
|
||||
cp "@"
|
||||
jr z, .playerCancelled
|
||||
ld hl, wPartyMonNicks
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
ld a, [wWhichPokemon]
|
||||
call AddNTimes
|
||||
ld e, l
|
||||
|
|
@ -269,7 +269,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
|
|||
ret z
|
||||
call CalcStringLength
|
||||
dec hl
|
||||
ld [hl], $50
|
||||
ld [hl], "@"
|
||||
ret
|
||||
.pressedRight
|
||||
ld a, [wCurrentMenuItem]
|
||||
|
|
@ -342,7 +342,7 @@ PrintAlphabet: ; 676f (1:676f)
|
|||
ld de, UpperCaseAlphabet
|
||||
.lowercase
|
||||
coord hl, 2, 5
|
||||
ld bc, $509 ; 5 rows, 9 columns
|
||||
lb bc, 5, 9 ; 5 rows, 9 columns
|
||||
.outerLoop
|
||||
push bc
|
||||
.innerLoop
|
||||
|
|
@ -373,7 +373,7 @@ PrintNicknameAndUnderscores: ; 680e (1:680e)
|
|||
ld a, c
|
||||
ld [wNamingScreenNameLength], a
|
||||
coord hl, 10, 2
|
||||
ld bc, $10a
|
||||
lb bc, 1, 10
|
||||
call ClearScreenArea
|
||||
coord hl, 10, 2
|
||||
ld de, wcf4b
|
||||
|
|
@ -458,7 +458,7 @@ CalcStringLength: ; 68eb (1:68eb)
|
|||
ld c, $0
|
||||
.loop
|
||||
ld a, [hl]
|
||||
cp $50
|
||||
cp "@"
|
||||
ret z
|
||||
inc hl
|
||||
inc c
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
|
|||
push bc
|
||||
coord hl, 0, 3
|
||||
ld de,20
|
||||
ld bc,$7f0d ; 13 blank tiles
|
||||
lb bc, " ", 13
|
||||
call DrawTileLine ; cover up the menu cursor in the pokemon list
|
||||
pop bc
|
||||
ret
|
||||
|
|
@ -128,7 +128,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
|
|||
push bc
|
||||
coord hl, 15, 10
|
||||
ld de,20
|
||||
ld bc,$7f07 ; 7 blank tiles
|
||||
lb bc, " ", 7
|
||||
call DrawTileLine ; cover up the menu cursor in the side menu
|
||||
pop bc
|
||||
jr .exitSideMenu
|
||||
|
|
@ -212,7 +212,7 @@ HandlePokedexListMenu: ; 40111 (10:4111)
|
|||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED],a
|
||||
coord hl, 4, 2
|
||||
ld bc,$0e0a
|
||||
lb bc, 14, 10
|
||||
call ClearScreenArea
|
||||
coord hl, 1, 3
|
||||
ld a,[wListScrollOffset]
|
||||
|
|
@ -413,14 +413,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
|
|||
ld [hTilesetType],a
|
||||
coord hl, 0, 0
|
||||
ld de,1
|
||||
ld bc,$6414
|
||||
lb bc, $64, SCREEN_WIDTH
|
||||
call DrawTileLine ; draw top border
|
||||
coord hl, 0, 17
|
||||
ld b,$6f
|
||||
ld b, $6f
|
||||
call DrawTileLine ; draw bottom border
|
||||
coord hl, 0, 1
|
||||
ld de,20
|
||||
ld bc,$6610
|
||||
lb bc, $66, $10
|
||||
call DrawTileLine ; draw left border
|
||||
coord hl, 19, 1
|
||||
ld b,$67
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
|||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID ; display pokemon menu options
|
||||
ld hl,wFieldMoves
|
||||
ld bc,$020c ; max menu item ID, top menu item Y
|
||||
lb bc, $02, $0c ; max menu item ID, top menu item Y
|
||||
ld e,5
|
||||
.adjustMenuVariablesLoop
|
||||
dec e
|
||||
|
|
@ -523,7 +523,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
|
|||
; loads tile patterns and draws everything except for gym leader faces / badges
|
||||
DrawTrainerInfo: ; 1349a (4:749a)
|
||||
ld de,RedPicFront
|
||||
ld bc,(BANK(RedPicFront) << 8) | $01
|
||||
lb bc, BANK(RedPicFront), $01
|
||||
predef DisplayPicCenteredOrUpperRight
|
||||
call DisableLCD
|
||||
coord hl, 0, 2
|
||||
|
|
@ -632,7 +632,7 @@ TrainerInfo_BadgesText: ; 13597 (4:7597)
|
|||
; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next
|
||||
TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
|
||||
ld a,$79 ; upper left corner tile ID
|
||||
ld de,$7a7b ; top edge and upper right corner tile ID's
|
||||
lb de, $7a, $7b ; top edge and upper right corner tile ID's
|
||||
call TrainerInfo_DrawHorizontalEdge ; draw top edge
|
||||
call TrainerInfo_NextTextBoxRow
|
||||
ld a,[wTrainerInfoTextBoxWidthPlus1]
|
||||
|
|
@ -647,7 +647,7 @@ TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
|
|||
dec c
|
||||
jr nz,.loop
|
||||
ld a,$7d ; lower left corner tile ID
|
||||
ld de,$777e ; bottom edge and lower right corner tile ID's
|
||||
lb de,$77, $7e ; bottom edge and lower right corner tile ID's
|
||||
|
||||
TrainerInfo_DrawHorizontalEdge: ; 135c3 (4:75c3)
|
||||
ld [hli],a ; place left corner tile
|
||||
|
|
@ -813,36 +813,36 @@ SwitchPartyMon_InitVarOrSwapData: ; 13653 (4:7653)
|
|||
call SkipFixedLengthTextEntries
|
||||
push hl
|
||||
ld de, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMonOT
|
||||
ld a, [wMenuItemToSwap]
|
||||
call SkipFixedLengthTextEntries
|
||||
pop de
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
pop de
|
||||
ld hl, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMonNicks
|
||||
ld a, [wCurrentMenuItem]
|
||||
call SkipFixedLengthTextEntries
|
||||
push hl
|
||||
ld de, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, wPartyMonNicks
|
||||
ld a, [wMenuItemToSwap]
|
||||
call SkipFixedLengthTextEntries
|
||||
pop de
|
||||
push hl
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
pop de
|
||||
ld hl, wSwitchPartyMonTempBuffer
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld a, [wMenuItemToSwap]
|
||||
ld [wSwappedMenuItem], a
|
||||
|
|
|
|||
|
|
@ -87,34 +87,34 @@ StatusScreen: ; 12953 (4:6953)
|
|||
call LoadHpBarAndStatusTilePatterns
|
||||
ld de, BattleHudTiles1 ; source
|
||||
ld hl, vChars2 + $6d0 ; dest
|
||||
ld bc, (BANK(BattleHudTiles1) << 8) + $03 ; bank bytes/8
|
||||
lb bc, BANK(BattleHudTiles1), $03
|
||||
call CopyVideoDataDouble ; ·│ :L and halfarrow line end
|
||||
ld de, BattleHudTiles2
|
||||
ld hl, vChars2 + $780
|
||||
ld bc, (BANK(BattleHudTiles2) << 8) + $01
|
||||
lb bc, BANK(BattleHudTiles2), $01
|
||||
call CopyVideoDataDouble ; │
|
||||
ld de, BattleHudTiles3
|
||||
ld hl, vChars2 + $760
|
||||
ld bc, (BANK(BattleHudTiles3) << 8) + $02
|
||||
lb bc, BANK(BattleHudTiles3), $02
|
||||
call CopyVideoDataDouble ; ─┘
|
||||
ld de, PTile
|
||||
ld hl, vChars2 + $720
|
||||
ld bc,(BANK(PTile) << 8 | $01)
|
||||
lb bc, BANK(PTile), $01
|
||||
call CopyVideoDataDouble ; P (for PP), inline
|
||||
ld a, [hTilesetType]
|
||||
push af
|
||||
xor a
|
||||
ld [hTilesetType], a
|
||||
coord hl, 19, 1
|
||||
ld bc, $060a
|
||||
lb bc, 6, 10
|
||||
call DrawLineBox ; Draws the box around name, HP and status
|
||||
ld de, $fffa
|
||||
ld de, -6
|
||||
add hl, de
|
||||
ld [hl], $f2 ; . after No ("." is a different one)
|
||||
dec hl
|
||||
ld [hl], "№"
|
||||
coord hl, 19, 9
|
||||
ld bc, $0806
|
||||
lb bc, 8, 6
|
||||
call DrawLineBox ; Draws the box around types, ID No. and OT
|
||||
coord hl, 10, 9
|
||||
ld de, Type1Text
|
||||
|
|
@ -224,7 +224,7 @@ OKText: ; 12ac4 (4:6ac4)
|
|||
|
||||
; Draws a line starting from hl high b and wide c
|
||||
DrawLineBox: ; 0x12ac7
|
||||
ld de, $0014 ; New line
|
||||
ld de, SCREEN_WIDTH ; New line
|
||||
.PrintVerticalLine
|
||||
ld [hl], $78 ; │
|
||||
add hl, de
|
||||
|
|
|
|||
|
|
@ -24,11 +24,11 @@ SetDefaultNames: ; 60ca (1:60ca)
|
|||
call z, InitOptions
|
||||
ld hl, NintenText
|
||||
ld de, wPlayerName
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
ld hl, SonyText
|
||||
ld de, W_RIVALNAME
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
jp CopyData
|
||||
|
||||
OakSpeech: ; 6115 (1:6115)
|
||||
|
|
@ -57,7 +57,7 @@ OakSpeech: ; 6115 (1:6115)
|
|||
bit 1,a ; possibly a debug mode bit
|
||||
jp nz,.skipChoosingNames
|
||||
ld de,ProfOakPic
|
||||
ld bc, (Bank(ProfOakPic) << 8) | $00
|
||||
lb bc, Bank(ProfOakPic), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call FadeInIntroPic
|
||||
ld hl,OakSpeechText1
|
||||
|
|
@ -76,7 +76,7 @@ OakSpeech: ; 6115 (1:6115)
|
|||
call GBFadeOutToWhite
|
||||
call ClearScreen
|
||||
ld de,RedPicFront
|
||||
ld bc,(Bank(RedPicFront) << 8) | $00
|
||||
lb bc, Bank(RedPicFront), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call MovePicLeft
|
||||
ld hl,IntroducePlayerText
|
||||
|
|
@ -85,7 +85,7 @@ OakSpeech: ; 6115 (1:6115)
|
|||
call GBFadeOutToWhite
|
||||
call ClearScreen
|
||||
ld de,Rival1Pic
|
||||
ld bc,(Bank(Rival1Pic) << 8) | $00
|
||||
lb bc, Bank(Rival1Pic), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call FadeInIntroPic
|
||||
ld hl,IntroduceRivalText
|
||||
|
|
@ -95,7 +95,7 @@ OakSpeech: ; 6115 (1:6115)
|
|||
call GBFadeOutToWhite
|
||||
call ClearScreen
|
||||
ld de,RedPicFront
|
||||
ld bc,(Bank(RedPicFront) << 8) | $00
|
||||
lb bc, Bank(RedPicFront), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call GBFadeInFromWhite
|
||||
ld a,[wd72d]
|
||||
|
|
@ -115,15 +115,15 @@ OakSpeech: ; 6115 (1:6115)
|
|||
call DelayFrames
|
||||
ld de,RedSprite
|
||||
ld hl,vSprites
|
||||
ld bc,(BANK(RedSprite) << 8) | $0C
|
||||
lb bc, BANK(RedSprite), $0C
|
||||
call CopyVideoData
|
||||
ld de,ShrinkPic1
|
||||
ld bc,(BANK(ShrinkPic1) << 8) | $00
|
||||
lb bc, BANK(ShrinkPic1), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
ld c,4
|
||||
call DelayFrames
|
||||
ld de,ShrinkPic2
|
||||
ld bc,(BANK(ShrinkPic2) << 8) | $00
|
||||
lb bc, BANK(ShrinkPic2), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call ResetPlayerSpriteData
|
||||
ld a,[H_LOADEDROMBANK]
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ OakSpeechSlidePicLeft: ; 69ec (1:69ec)
|
|||
call DelayFrames
|
||||
pop de
|
||||
ld hl, wcd6d
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
call CopyData
|
||||
call Delay3
|
||||
coord hl, 12, 4
|
||||
|
|
|
|||
|
|
@ -82,11 +82,11 @@ InitCutAnimOAM: ; eff7 (3:6ff7)
|
|||
; tree
|
||||
ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row
|
||||
ld hl, vChars1 + $7c0
|
||||
ld bc, (BANK(Overworld_GFX) << 8) + $02
|
||||
lb bc, BANK(Overworld_GFX), $02
|
||||
call CopyVideoData
|
||||
ld de, Overworld_GFX + $3d0 ; cuttable tree sprite bottom row
|
||||
ld hl, vChars1 + $7e0
|
||||
ld bc, (BANK(Overworld_GFX) << 8) + $02
|
||||
lb bc, BANK(Overworld_GFX), $02
|
||||
call CopyVideoData
|
||||
jr WriteCutOrBoulderDustAnimationOAMBlock
|
||||
.grass
|
||||
|
|
@ -113,7 +113,7 @@ InitCutAnimOAM: ; eff7 (3:6ff7)
|
|||
|
||||
LoadCutGrassAnimationTilePattern: ; f04c (3:704c)
|
||||
ld de, AnimationTileset2 + $60 ; tile depicting a leaf
|
||||
ld bc, (BANK(AnimationTileset2) << 8) + $01
|
||||
lb bc, BANK(AnimationTileset2), $01
|
||||
jp CopyVideoData
|
||||
|
||||
WriteCutOrBoulderDustAnimationOAMBlock: ; f055 (3:7055)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ EmotionBubble: ; 17c47 (5:7c47)
|
|||
inc hl
|
||||
ld d, [hl]
|
||||
ld hl, vChars1 + $780
|
||||
ld bc, (BANK(EmotionBubblesPointerTable) << 8) + $04
|
||||
lb bc, BANK(EmotionBubblesPointerTable), $04
|
||||
call CopyVideoData
|
||||
ld a, [wUpdateSpritesEnabled]
|
||||
push af
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
AnimateHealingMachine: ; 70433 (1c:4433)
|
||||
ld de, PokeCenterFlashingMonitorAndHealBall
|
||||
ld hl, vChars0 + $7c0
|
||||
ld bc, (BANK(PokeCenterFlashingMonitorAndHealBall) << 8) + $03
|
||||
lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03
|
||||
call CopyVideoData
|
||||
ld hl, wUpdateSpritesEnabled
|
||||
ld a, [hl]
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ LedgeTiles: ; 1a6cf (6:66cf)
|
|||
LoadHoppingShadowOAM: ; 1a6f0 (6:66f0)
|
||||
ld hl, vChars1 + $7f0
|
||||
ld de, LedgeHoppingShadow
|
||||
ld bc, (BANK(LedgeHoppingShadow) << 8) + $01
|
||||
lb bc, BANK(LedgeHoppingShadow), $01
|
||||
call CopyVideoDataDouble
|
||||
ld a, $9
|
||||
ld bc, $5448 ; b, c = y, x coordinates of shadow
|
||||
lb bc, $54, $48 ; b, c = y, x coordinates of shadow
|
||||
ld de, LedgeHoppingShadowOAM
|
||||
call WriteOAMBlock
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ EnterMapAnim: ; 70510 (1c:4510)
|
|||
pop hl
|
||||
ld de, BirdSprite
|
||||
ld hl, vNPCSprites
|
||||
ld bc, (BANK(BirdSprite) << 8) + $0c
|
||||
lb bc, BANK(BirdSprite), $0c
|
||||
call CopyVideoData
|
||||
call LoadBirdSpriteGraphics
|
||||
ld a, SFX_FLY
|
||||
|
|
@ -250,11 +250,11 @@ DoFlyAnimation: ; 706ae (1c:46ae)
|
|||
LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
|
||||
ld de, BirdSprite
|
||||
ld hl, vNPCSprites
|
||||
ld bc, (BANK(BirdSprite) << 8) + $0c
|
||||
lb bc, BANK(BirdSprite), $0c
|
||||
call CopyVideoData
|
||||
ld de, BirdSprite + $c0 ; moving animation sprite
|
||||
ld hl, vNPCSprites2
|
||||
ld bc, (BANK(BirdSprite) << 8) + $0c
|
||||
lb bc, BANK(BirdSprite), $0c
|
||||
jp CopyVideoData
|
||||
|
||||
InitFacingDirectionList: ; 706ef (1c:46ef)
|
||||
|
|
@ -388,7 +388,7 @@ FishingAnim: ; 707b6 (1c:47b6)
|
|||
set 6, [hl] ; reserve the last 4 OAM entries
|
||||
ld de, RedSprite
|
||||
ld hl, vNPCSprites
|
||||
ld bc, (BANK(RedSprite) << 8) + $0c
|
||||
lb bc, BANK(RedSprite), $0c
|
||||
call CopyVideoData
|
||||
ld a, $4
|
||||
ld hl, RedFishingTiles
|
||||
|
|
|
|||
|
|
@ -82,10 +82,10 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
|
|||
inc a
|
||||
jr z,.sellMenuLoop ; if the player closed the choose quantity menu with the B button
|
||||
ld hl,PokemartTellSellPriceText
|
||||
ld bc,$0e01
|
||||
lb bc, 14, 1 ; location that PrintText always prints to, this is useless
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc,$080f
|
||||
lb bc, 08, 15
|
||||
ld a,TWO_OPTION_MENU
|
||||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID ; yes/no menu
|
||||
|
|
@ -163,7 +163,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
|
|||
ld hl,PokemartTellBuyPriceText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
ld bc,$080f
|
||||
lb bc, 8, 15
|
||||
ld a,TWO_OPTION_MENU
|
||||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID ; yes/no menu
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
|
|||
|
||||
LoadSmokeTile: ; 79fd4 (1e:5fd4)
|
||||
ld de, SSAnneSmokePuffTile
|
||||
ld bc, (BANK(SSAnneSmokePuffTile) << 8) + $01
|
||||
lb bc, BANK(SSAnneSmokePuffTile), $01
|
||||
jp CopyVideoData
|
||||
|
||||
SSAnneSmokePuffTile: ; 79fdd (1e:5fdd)
|
||||
|
|
|
|||
|
|
@ -155,8 +155,8 @@ SaveSAV: ; 7370a (1c:770a)
|
|||
.save
|
||||
call SaveSAVtoSRAM
|
||||
coord hl, 1, 13
|
||||
ld bc,$0412
|
||||
call ClearScreenArea ; clear area 4x12 starting at 13,1
|
||||
lb bc, 4, 18
|
||||
call ClearScreenArea
|
||||
coord hl, 1, 14
|
||||
ld de,NowSavingString
|
||||
call PlaceString
|
||||
|
|
@ -176,7 +176,7 @@ NowSavingString:
|
|||
SaveSAVConfirm: ; 73768 (1c:7768)
|
||||
call PrintText
|
||||
coord hl, 0, 7
|
||||
ld bc,$0801
|
||||
lb bc, 8, 1
|
||||
ld a,TWO_OPTION_MENU
|
||||
ld [wTextBoxID],a
|
||||
call DisplayTextBoxID ; yes/no menu
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ MainSlotMachineLoop: ; 37395 (d:7395)
|
|||
ld hl, OneMoreGoSlotMachineText
|
||||
call PrintText
|
||||
coord hl, 14, 12
|
||||
ld bc, $0d0f
|
||||
lb bc, 13, 15
|
||||
xor a ; YES_NO_MENU
|
||||
ld [wTwoOptionMenuID], a
|
||||
ld a, TWO_OPTION_MENU
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
; copy text of fixed length $b (like player name, rival name, mon names, ...)
|
||||
CopyFixedLengthText: ; 42b1 (1:42b1)
|
||||
ld bc, $b
|
||||
ld bc, 11
|
||||
jp CopyData
|
||||
|
||||
SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
|
||||
|
|
@ -377,7 +377,7 @@ LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538)
|
|||
LoadCopyrightTiles: ; 4541 (1:4541)
|
||||
ld de, NintendoCopyrightLogoGraphics
|
||||
ld hl, vChars2 + $600
|
||||
ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c
|
||||
lb bc, BANK(NintendoCopyrightLogoGraphics), $1c
|
||||
call CopyVideoData
|
||||
coord hl, 2, 7
|
||||
ld de, CopyrightTextString
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
|
|||
call CopyData
|
||||
ld hl, vSprites + $40
|
||||
ld de, TownMapCursor
|
||||
ld bc, (BANK(TownMapCursor) << 8) + $04
|
||||
lb bc, BANK(TownMapCursor), $04
|
||||
call CopyVideoDataDouble
|
||||
xor a
|
||||
ld [wWhichTownMapLocation], a
|
||||
|
|
@ -29,7 +29,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
|
|||
|
||||
.townMapLoop
|
||||
coord hl, 0, 0
|
||||
ld bc, $114
|
||||
lb bc, 1, 20
|
||||
call ClearScreenArea
|
||||
ld hl, TownMapOrder
|
||||
ld a, [wWhichTownMapLocation]
|
||||
|
|
@ -140,11 +140,11 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
|
|||
call LoadFontTilePatterns
|
||||
ld de, BirdSprite
|
||||
ld hl, vSprites + $40
|
||||
ld bc, (BANK(BirdSprite) << 8) + $0c
|
||||
lb bc, BANK(BirdSprite), $0c
|
||||
call CopyVideoData
|
||||
ld de, TownMapUpArrow
|
||||
ld hl, vChars1 + $6d0
|
||||
ld bc, (BANK(TownMapUpArrow) << 8) + $01
|
||||
lb bc, BANK(TownMapUpArrow), $01
|
||||
call CopyVideoDataDouble
|
||||
call BuildFlyLocationsList
|
||||
ld hl, wUpdateSpritesEnabled
|
||||
|
|
@ -161,12 +161,12 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
|
|||
ld hl, wFlyLocationsList
|
||||
coord de, 18, 0
|
||||
.townMapFlyLoop
|
||||
ld a, $7f
|
||||
ld a, " "
|
||||
ld [de], a
|
||||
push hl
|
||||
push hl
|
||||
coord hl, 3, 0
|
||||
ld bc, $10f
|
||||
lb bc, 1, 15
|
||||
call ClearScreenArea
|
||||
pop hl
|
||||
ld a, [hl]
|
||||
|
|
@ -442,8 +442,8 @@ WritePlayerOrBirdSpriteOAM: ; 7126d (1c:526d)
|
|||
|
||||
WriteTownMapSpriteOAM: ; 71279 (1c:5279)
|
||||
push hl
|
||||
ld hl, $fcfc
|
||||
add hl, bc ; subtract 4 from c (X coord) and 3 from b (Y coord)
|
||||
lb hl, -4, -4
|
||||
add hl, bc ; subtract 4 from c (X coord) and 4 from b (Y coord)
|
||||
ld b, h
|
||||
ld c, l
|
||||
pop hl
|
||||
|
|
@ -451,7 +451,7 @@ WriteTownMapSpriteOAM: ; 71279 (1c:5279)
|
|||
WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281)
|
||||
; Writes 4 OAM blocks for a helix mon party sprite, since it does not have
|
||||
; a vertical line of symmetry.
|
||||
ld de, $202
|
||||
lb de, 2, 2
|
||||
.loop
|
||||
push de
|
||||
push bc
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ Trade_ShowEnemyMon: ; 41336 (10:5336)
|
|||
call PlayCry
|
||||
call Trade_Delay100
|
||||
coord hl, 4, 10
|
||||
ld bc, $80c
|
||||
lb bc, 8, 12
|
||||
call ClearScreenArea
|
||||
jp PrintTradeTakeCareText
|
||||
|
||||
|
|
@ -647,14 +647,14 @@ Trade_AnimMonMoveVertical: ; 41525 (10:5525)
|
|||
and a
|
||||
jr z, .movingLeft
|
||||
; moving right
|
||||
ld bc, $400 ; move right
|
||||
lb bc, 4, 0 ; move right
|
||||
call .doAnim
|
||||
ld bc, $a ; move down
|
||||
lb bc, 0, 10 ; move down
|
||||
jr .doAnim
|
||||
.movingLeft
|
||||
ld bc, $f6 ; move up
|
||||
lb bc, 0, -10 ; move up
|
||||
call .doAnim
|
||||
ld bc, $fc00 ; move left
|
||||
lb bc, -4, 0 ; move left
|
||||
.doAnim
|
||||
ld a, b
|
||||
ld [W_BASECOORDX], a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue