Use more lb

and other clean up
This commit is contained in:
dannye 2015-08-05 16:20:29 -05:00
parent 891627d4ba
commit f8a9c37a00
106 changed files with 346 additions and 326 deletions

View file

@ -164,7 +164,7 @@ FillFourRowsWithBlack: ; 7417b (1d:417b)
FillMiddleOfScreenWithWhite: ; 74183 (1d:4183) FillMiddleOfScreenWithWhite: ; 74183 (1d:4183)
coord hl, 0, 4 coord hl, 0, 4
ld bc, SCREEN_WIDTH * 10 ld bc, SCREEN_WIDTH * 10
ld a, $7f ; blank white tile ld a, " "
jp FillMemory jp FillMemory
Credits: ; 7418e (1d:418e) Credits: ; 7418e (1d:418e)
@ -246,7 +246,7 @@ Credits: ; 7418e (1d:418e)
pop de pop de
ld de, TheEndGfx ld de, TheEndGfx
ld hl, vChars2 + $600 ld hl, vChars2 + $600
ld bc, (BANK(TheEndGfx) << 8) + $0a lb bc, BANK(TheEndGfx), $0a
call CopyVideoData call CopyVideoData
coord hl, 4, 8 coord hl, 4, 8
ld de, TheEndTextString ld de, TheEndTextString

View file

@ -184,7 +184,7 @@ DungeonMaps2: ; 70a44 (1c:4a44)
LoadBattleTransitionTile: ; 70a4d (1c:4a4d) LoadBattleTransitionTile: ; 70a4d (1c:4a4d)
ld hl, vChars1 + $7f0 ld hl, vChars1 + $7f0
ld de, BattleTransitionTile ld de, BattleTransitionTile
ld bc, (BANK(BattleTransitionTile) << 8) + $01 lb bc, BANK(BattleTransitionTile), $01
jp CopyVideoData jp CopyVideoData
BattleTransitionTile: ; 70a59 (1c:4a59) BattleTransitionTile: ; 70a59 (1c:4a59)

View file

@ -102,7 +102,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
coord hl, 1, 5 coord hl, 1, 5
ld bc, $307 lb bc, 3, 7
call ClearScreenArea call ClearScreenArea
call DisableLCD call DisableLCD
call LoadFontTilePatterns call LoadFontTilePatterns
@ -110,7 +110,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; 3c04c (f:404c)
ld hl, vBGMap0 ld hl, vBGMap0
ld bc, $400 ld bc, $400
.clearBackgroundLoop .clearBackgroundLoop
ld a, $7f ld a, " "
ld [hli], a ld [hli], a
dec bc dec bc
ld a, b ld a, b
@ -717,8 +717,8 @@ HandlePoisonBurnLeechSeed_IncreaseEnemyHP: ; 3c4a3 (f:44a3)
ld [wHPBarMaxHP+1], a ld [wHPBarMaxHP+1], a
ld a, [hl] ld a, [hl]
ld [wHPBarMaxHP], a ld [wHPBarMaxHP], a
ld de, $fff2 ld de, wBattleMonHP - wBattleMonMaxHP
add hl, de ; skip back fomr max hp to current hp add hl, de ; skip back from max hp to current hp
ld a, [hl] ld a, [hl]
ld [wHPBarOldHP], a ; add bc to current HP ld [wHPBarOldHP], a ; add bc to current HP
add c add c
@ -852,7 +852,7 @@ FaintEnemyPokemon: ; 0x3c567
coord de, 12, 6 coord de, 12, 6
call SlideDownFaintedMonPic call SlideDownFaintedMonPic
coord hl, 0, 0 coord hl, 0, 0
ld bc, $40b lb bc, 4, 11
call ClearScreenArea call ClearScreenArea
ld a, [W_ISINBATTLE] ld a, [W_ISINBATTLE]
dec a dec a
@ -1100,7 +1100,7 @@ RemoveFaintedPlayerMon: ; 3c741 (f:4741)
ld [wBattleMonStatus], a ld [wBattleMonStatus], a
call ReadPlayerMonCurHPAndStatus call ReadPlayerMonCurHPAndStatus
coord hl, 9, 7 coord hl, 9, 7
ld bc, $50b lb bc, 5, 11
call ClearScreenArea call ClearScreenArea
coord hl, 1, 10 coord hl, 1, 10
coord de, 1, 11 coord de, 1, 11
@ -1132,7 +1132,7 @@ DoUseNextMonDialogue: ; 3c79b (f:479b)
call PrintText call PrintText
.displayYesNoBox .displayYesNoBox
coord hl, 13, 9 coord hl, 13, 9
ld bc, $a0e lb bc, 10, 14
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
@ -1209,7 +1209,7 @@ HandlePlayerBlackOut: ; 3c837 (f:4837)
cp $c8 + SONY1 cp $c8 + SONY1
jr nz, .notSony1Battle jr nz, .notSony1Battle
coord hl, 0, 0 ; sony 1 battle coord hl, 0, 0 ; sony 1 battle
ld bc, $815 lb bc, 8, 21
call ClearScreenArea call ClearScreenArea
call ScrollTrainerPicAfterBattle call ScrollTrainerPicAfterBattle
ld c, 40 ld c, 40
@ -1449,7 +1449,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
ld hl, TrainerAboutToUseText ld hl, TrainerAboutToUseText
call PrintText call PrintText
coord hl, 0, 7 coord hl, 0, 7
ld bc,$0801 lb bc, 8, 1
ld a,TWO_OPTION_MENU ld a,TWO_OPTION_MENU
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID call DisplayTextBoxID
@ -1484,7 +1484,7 @@ EnemySendOutFirstMon: ; 3c92a (f:492a)
.next4 .next4
call ClearSprites call ClearSprites
coord hl, 0, 0 coord hl, 0, 0
ld bc,$040B lb bc, 4, 11
call ClearScreenArea call ClearScreenArea
ld b,1 ld b,1
call GoPAL_SET call GoPAL_SET
@ -1886,7 +1886,7 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60)
xor a xor a
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
coord hl, 9, 7 coord hl, 9, 7
ld bc, $50b lb bc, 5, 11
call ClearScreenArea call ClearScreenArea
callab PlacePlayerHUDTiles callab PlacePlayerHUDTiles
coord hl, 18, 9 coord hl, 18, 9
@ -1947,7 +1947,7 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
xor a xor a
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
coord hl, 0, 0 coord hl, 0, 0
ld bc, $40c lb bc, 4, 12
call ClearScreenArea call ClearScreenArea
callab PlaceEnemyHUDTiles callab PlaceEnemyHUDTiles
ld de, wEnemyMonNick ld de, wEnemyMonNick
@ -2055,11 +2055,11 @@ CenterMonName: ; 3ce9c (f:4e9c)
.loop .loop
inc de inc de
ld a, [de] ld a, [de]
cp $50 cp "@"
jr z, .done jr z, .done
inc de inc de
ld a, [de] ld a, [de]
cp $50 cp "@"
jr z, .done jr z, .done
dec hl dec hl
dec b dec b
@ -2091,7 +2091,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
; the following happens for the old man tutorial ; the following happens for the old man tutorial
ld hl, wPlayerName ld hl, wPlayerName
ld de, W_GRASSRATE ld de, W_GRASSRATE
ld bc, $b ld bc, 11
call CopyData ; temporarily save the player name in unused space, call CopyData ; temporarily save the player name in unused space,
; which is supposed to get overwritten when entering a ; which is supposed to get overwritten when entering a
; map with wild Pokémon. Due to an oversight, the data ; map with wild Pokémon. Due to an oversight, the data
@ -2099,14 +2099,14 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3)
; Missingno. glitch can show up. ; Missingno. glitch can show up.
ld hl, .oldManName ld hl, .oldManName
ld de, wPlayerName ld de, wPlayerName
ld bc, $b ld bc, 11
call CopyData call CopyData
; the following simulates the keystrokes by drawing menus on screen ; the following simulates the keystrokes by drawing menus on screen
coord hl, 9, 14 coord hl, 9, 14
ld [hl], "▶" ld [hl], "▶"
ld c, 80 ld c, 80
call DelayFrames call DelayFrames
ld [hl], $7f ld [hl], " "
coord hl, 9, 16 coord hl, 9, 16
ld [hl], "▶" ld [hl], "▶"
ld c, 50 ld c, 50
@ -2395,7 +2395,7 @@ PartyMenuOrRockOrRun:
.partyMonDeselected .partyMonDeselected
coord hl, 11, 11 coord hl, 11, 11
ld bc, $81 ld bc, $81
ld a, $7f ld a, " "
call FillMemory call FillMemory
xor a ; NORMAL_PARTY_MENU xor a ; NORMAL_PARTY_MENU
ld [wPartyMenuTypeOrMessageID], a ld [wPartyMenuTypeOrMessageID], a
@ -2585,7 +2585,7 @@ MoveSelectionMenu: ; 3d219 (f:5219)
.relearnmenu .relearnmenu
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
ld hl, wPartyMon1Moves ld hl, wPartyMon1Moves
ld bc, $2c ld bc, wPartyMon2 - wPartyMon1
call AddNTimes call AddNTimes
call .loadmoves call .loadmoves
coord hl, 4, 7 coord hl, 4, 7
@ -2662,7 +2662,7 @@ SelectMenuItem: ; 3d2fe (f:52fe)
jr z, .select jr z, .select
coord hl, 5, 13 coord hl, 5, 13
dec a dec a
ld bc, $14 ld bc, SCREEN_WIDTH
call AddNTimes call AddNTimes
ld [hl], $ec ld [hl], $ec
.select .select
@ -2862,7 +2862,7 @@ SwapMovesInMenu: ; 3d435 (f:5435)
push hl push hl
call .swapBytes ; swap moves call .swapBytes ; swap moves
pop hl pop hl
ld bc, $15 ld bc, wPartyMon1PP - wPartyMon1Moves
add hl, bc add hl, bc
call .swapBytes ; swap move PP call .swapBytes ; swap move PP
xor a xor a
@ -6318,7 +6318,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01)
call GetMonName call GetMonName
ld hl, wcd6d ld hl, wcd6d
ld de, wEnemyMonNick ld de, wEnemyMonNick
ld bc, $b ld bc, 11
call CopyData call CopyData
ld a, [wEnemyMonSpecies2] ld a, [wEnemyMonSpecies2]
ld [wd11e], a ld [wd11e], a
@ -6718,11 +6718,11 @@ LoadHudTilePatterns: ; 3ee5b (f:6e5b)
.lcdEnabled .lcdEnabled
ld de, BattleHudTiles1 ld de, BattleHudTiles1
ld hl, vChars2 + $6d0 ld hl, vChars2 + $6d0
ld bc, (BANK(BattleHudTiles1) << 8) + $03 lb bc, BANK(BattleHudTiles1), $03
call CopyVideoDataDouble call CopyVideoDataDouble
ld de, BattleHudTiles2 ld de, BattleHudTiles2
ld hl, vChars2 + $730 ld hl, vChars2 + $730
ld bc, (BANK(BattleHudTiles2) << 8) + $06 lb bc, BANK(BattleHudTiles2), $06
jp CopyVideoDataDouble jp CopyVideoDataDouble
PrintEmptyString: ; 3ee94 (f:6e94) PrintEmptyString: ; 3ee94 (f:6e94)
@ -6942,10 +6942,10 @@ InitBattle_Common: ; 3efeb (f:6feb)
ld [H_AUTOBGTRANSFERDEST + 1], a ld [H_AUTOBGTRANSFERDEST + 1], a
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
coord hl, 9, 7 coord hl, 9, 7
ld bc, $50a lb bc, 5, 10
call ClearScreenArea call ClearScreenArea
coord hl, 1, 0 coord hl, 1, 0
ld bc, $40a lb bc, 4, 10
call ClearScreenArea call ClearScreenArea
call ClearSprites call ClearSprites
ld a, [W_ISINBATTLE] ld a, [W_ISINBATTLE]
@ -7089,8 +7089,8 @@ LoadMonBackPic: ; 3f103 (f:7103)
ld a, [wBattleMonSpecies2] ld a, [wBattleMonSpecies2]
ld [wcf91], a ld [wcf91], a
coord hl, 1, 5 coord hl, 1, 5
ld b, $7 ld b, 7
ld c, $8 ld c, 8
call ClearScreenArea call ClearScreenArea
ld hl, W_MONHBACKSPRITE - W_MONHEADER ld hl, W_MONHBACKSPRITE - W_MONHEADER
call UncompressMonSprite call UncompressMonSprite
@ -7928,7 +7928,7 @@ FellText: ; 3f683 (f:7683)
PrintStatText: ; 3f688 (f:7688) PrintStatText: ; 3f688 (f:7688)
ld hl, StatsTextStrings ld hl, StatsTextStrings
ld c, $50 ld c, "@"
.asm_3f68d .asm_3f68d
dec b dec b
jr z, .asm_3f696 jr z, .asm_3f696

View file

@ -13,7 +13,7 @@ DrawEnemyPokeballs: ; 3a857 (e:6857)
LoadPartyPokeballGfx: ; 3a85d (e:685d) LoadPartyPokeballGfx: ; 3a85d (e:685d)
ld de, PokeballTileGraphics ld de, PokeballTileGraphics
ld hl, vSprites + $310 ld hl, vSprites + $310
ld bc, (BANK(PokeballTileGraphics) << 8) + $04 lb bc, BANK(PokeballTileGraphics), $04
jp CopyVideoData jp CopyVideoData
SetupOwnPartyPokeballs: ; 3a869 (e:6869) SetupOwnPartyPokeballs: ; 3a869 (e:6869)

View file

@ -5,7 +5,7 @@ MarowakAnim: ; 708ca (1c:48ca)
call CopyMonPicFromBGToSpriteVRAM ; cover the BG ghost pic with a sprite ghost pic that looks the same 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 ; now that the ghost pic is being displayed using sprites, clear the ghost pic from the BG tilemap
coord hl, 12, 0 coord hl, 12, 0
ld bc, $707 lb bc, 7, 7
call ClearScreenArea call ClearScreenArea
call Delay3 call Delay3
xor a xor a
@ -59,7 +59,7 @@ CopyMonPicFromBGToSpriteVRAM: ; 7092a (1c:492a)
ld a, $70 ld a, $70
ld [W_BASECOORDX], a ld [W_BASECOORDX], a
ld hl, wOAMBuffer ld hl, wOAMBuffer
ld bc, $606 lb bc, 6, 6
ld d, $8 ld d, $8
.oamLoop .oamLoop
push bc push bc

View file

@ -665,7 +665,7 @@ AISwitchIfEnoughMons: ; 3a72a (e:672a)
inc d inc d
.Fainted .Fainted
push bc push bc
ld bc,$2C ld bc, wEnemyMon2 - wEnemyMon1
add hl,bc add hl,bc
pop bc pop bc
dec c dec c

View file

@ -96,7 +96,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345
ld a, SERIAL_PATCH_LIST_PART_TERMINATOR ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
ld [de], a ; end of part 1 ld [de], a ; end of part 1
inc de inc de
ld bc, $100 lb bc, 1, 0
jr .patchPartyMonsLoop jr .patchPartyMonsLoop
.finishedPatchingPlayerData .finishedPatchingPlayerData
ld a, SERIAL_PATCH_LIST_PART_TERMINATOR ld a, SERIAL_PATCH_LIST_PART_TERMINATOR
@ -400,7 +400,7 @@ TradeCenter_SelectMon:
ld a, 1 ld a, 1
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
coord hl, 1, 1 coord hl, 1, 1
ld bc, $0601 lb bc, 6, 1
call ClearScreenArea call ClearScreenArea
.playerMonMenu_HandleInput .playerMonMenu_HandleInput
ld hl, hFlags_0xFFF6 ld hl, hFlags_0xFFF6
@ -713,7 +713,7 @@ TradeCenter_Trade:
call TextCommandProcessor call TextCommandProcessor
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
coord hl, 10, 7 coord hl, 10, 7
ld bc, $080b lb bc, 8, 11
ld a, TRADE_CANCEL_MENU ld a, TRADE_CANCEL_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU

View file

@ -6,7 +6,7 @@ DoClearSaveDialogue: ; 1c98a (7:498a)
ld hl, ClearSaveDataText ld hl, ClearSaveDataText
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc, $80f lb bc, 8, 15
ld a, NO_YES_MENU ld a, NO_YES_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU

View file

@ -48,7 +48,7 @@ EvolveMon: ; 7bde9 (1e:7de9)
call DelayFrames call DelayFrames
ld c, $1 ld c, $1
call EvolutionSetWholeScreenPalette call EvolutionSetWholeScreenPalette
ld bc, $110 lb bc, $1, $10
.animLoop .animLoop
push bc push bc
call Evolution_CheckForCancel call Evolution_CheckForCancel

View file

@ -278,7 +278,7 @@ RenameEvolvedMon: ; 3aef7 (e:6ef7)
cp $50 cp $50
jr nz, .compareNamesLoop jr nz, .compareNamesLoop
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
ld bc, $b ld bc, 11
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
call AddNTimes call AddNTimes
push hl push hl

View file

@ -5,15 +5,15 @@ LoadShootingStarGraphics: ; 70000 (1c:4000)
ld [rOBP1], a ld [rOBP1], a
ld de, AnimationTileset2 + $30 ; star tile (top left quadrant) ld de, AnimationTileset2 + $30 ; star tile (top left quadrant)
ld hl, vChars1 + $200 ld hl, vChars1 + $200
ld bc, (BANK(AnimationTileset2) << 8) + $01 lb bc, BANK(AnimationTileset2), $01
call CopyVideoData call CopyVideoData
ld de, AnimationTileset2 + $130 ; star tile (bottom left quadrant) ld de, AnimationTileset2 + $130 ; star tile (bottom left quadrant)
ld hl, vChars1 + $210 ld hl, vChars1 + $210
ld bc, (BANK(AnimationTileset2) << 8) + $01 lb bc, BANK(AnimationTileset2), $01
call CopyVideoData call CopyVideoData
ld de, FallingStar ld de, FallingStar
ld hl, vChars1 + $220 ld hl, vChars1 + $220
ld bc, (BANK(FallingStar) << 8) + $01 lb bc, BANK(FallingStar), $01
call CopyVideoData call CopyVideoData
ld hl, GameFreakLogoOAMData ld hl, GameFreakLogoOAMData
ld de, wOAMBuffer + $60 ld de, wOAMBuffer + $60
@ -31,7 +31,7 @@ AnimateShootingStar: ; 70044 (1c:4044)
; Move the big star down and left across the screen. ; Move the big star down and left across the screen.
ld hl, wOAMBuffer ld hl, wOAMBuffer
ld bc, $a004 lb bc, $a0, $4
.bigStarLoop .bigStarLoop
push hl push hl
push bc push bc

View file

@ -8,7 +8,7 @@ AnimateHallOfFame: ; 701a0 (1c:41a0)
call DisableLCD call DisableLCD
ld hl,vBGMap0 ld hl,vBGMap0
ld bc, $800 ld bc, $800
ld a, $7f ld a, " "
call FillMemory call FillMemory
call EnableLCD call EnableLCD
ld hl, rLCDC ld hl, rLCDC
@ -187,7 +187,7 @@ HoFLoadPlayerPics: ; 7033e (1c:433e)
ld a, BANK(RedPicFront) ld a, BANK(RedPicFront)
call UncompressSpriteFromDE call UncompressSpriteFromDE
ld hl, S_SPRITEBUFFER1 ld hl, S_SPRITEBUFFER1
ld de, $a000 ld de, S_SPRITEBUFFER0
ld bc, $310 ld bc, $310
call CopyData call CopyData
ld de, vFrontPic ld de, vFrontPic

View file

@ -194,7 +194,7 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced)
ld hl, wd730 ld hl, wd730
set 6, [hl] set 6, [hl]
coord hl, 0, 0 coord hl, 0, 0
ld bc, $060a lb bc, 6, 10
call TextBoxBorder call TextBoxBorder
coord hl, 1, 2 coord hl, 1, 2
ld de, StatusAilmentText1 ld de, StatusAilmentText1

View file

@ -222,7 +222,7 @@ UpdateHPBar_PrintHPNumber: ; faf5 (3:7af5)
.next .next
add hl, de add hl, de
push hl push hl
ld a, $7f ld a, " "
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a

View file

@ -17,7 +17,7 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9)
ld a,[hli] ld a,[hli]
push af push af
ld de,wInGameTradeMonNick ld de,wInGameTradeMonNick
ld bc,$000b ld bc, 11
call CopyData call CopyData
pop af pop af
ld l,a ld l,a
@ -81,7 +81,7 @@ InGameTrade_GetMonName: ; 71b6a (1c:5b6a)
call GetMonName call GetMonName
ld hl,wcd6d ld hl,wcd6d
pop de pop de
ld bc,$b ld bc, 11
jp CopyData jp CopyData
INCLUDE "data/trades.asm" 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 jr nz,.tradeFailed ; jump if the selected mon's species is not the required one
ld a,[wWhichPokemon] ld a,[wWhichPokemon]
ld hl,wPartyMon1Level ld hl,wPartyMon1Level
ld bc,$002c ld bc, wPartyMon2 - wPartyMon1
call AddNTimes call AddNTimes
ld a,[hl] ld a,[hl]
ld [W_CURENEMYLVL],a ld [W_CURENEMYLVL],a
@ -168,11 +168,11 @@ InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1)
ld a, [wInGameTradeReceiveMonSpecies] ld a, [wInGameTradeReceiveMonSpecies]
ld [hl], a ; wTradedEnemyMonSpecies ld [hl], a ; wTradedEnemyMonSpecies
ld hl, wPartyMonOT ld hl, wPartyMonOT
ld bc, $b ld bc, 11
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
call AddNTimes call AddNTimes
ld de, wTradedPlayerMonOT ld de, wTradedPlayerMonOT
ld bc, $b ld bc, 11
call InGameTrade_CopyData call InGameTrade_CopyData
ld hl, InGameTrade_TrainerString ld hl, InGameTrade_TrainerString
ld de, wTradedEnemyMonOT ld de, wTradedEnemyMonOT
@ -201,16 +201,16 @@ InGameTrade_CopyData: ; 71d11 (1c:5d11)
InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19) InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19)
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
ld bc, $b ld bc, 11
call InGameTrade_GetReceivedMonPointer call InGameTrade_GetReceivedMonPointer
ld hl, wInGameTradeMonNick ld hl, wInGameTradeMonNick
ld bc, $b ld bc, 11
call CopyData call CopyData
ld hl, wPartyMonOT ld hl, wPartyMonOT
ld bc, $b ld bc, 11
call InGameTrade_GetReceivedMonPointer call InGameTrade_GetReceivedMonPointer
ld hl, InGameTrade_TrainerString ld hl, InGameTrade_TrainerString
ld bc, $b ld bc, 11
call CopyData call CopyData
ld hl, wPartyMon1OTID ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1 ld bc, wPartyMon2 - wPartyMon1

View file

@ -28,7 +28,7 @@ PlayIntroScene: ; 4169d (10:569d)
ld [W_BASECOORDX], a ld [W_BASECOORDX], a
ld a, 80 ld a, 80
ld [W_BASECOORDY], a ld [W_BASECOORDY], a
ld bc, $606 lb bc, 6, 6
call InitIntroNidorinoOAM call InitIntroNidorinoOAM
ld de, $28ff ; move Nidorino right by 80 pixels ld de, $28ff ; move Nidorino right by 80 pixels
call IntroMoveMon call IntroMoveMon

View file

@ -734,22 +734,22 @@ ItemUseMedicine: ; dabb (3:5abb)
ld bc,4 ld bc,4
add hl,bc ; hl now points to status add hl,bc ; hl now points to status
ld a,[wcf91] ld a,[wcf91]
ld bc, (ANTIDOTE_MSG << 8) | (1 << PSN) lb bc, ANTIDOTE_MSG, 1 << PSN
cp a,ANTIDOTE cp a,ANTIDOTE
jr z,.checkMonStatus jr z,.checkMonStatus
ld bc, (BURN_HEAL_MSG << 8) | (1 << BRN) lb bc, BURN_HEAL_MSG, 1 << BRN
cp a,BURN_HEAL cp a,BURN_HEAL
jr z,.checkMonStatus jr z,.checkMonStatus
ld bc, (ICE_HEAL_MSG << 8) | (1 << FRZ) lb bc, ICE_HEAL_MSG, 1 << FRZ
cp a,ICE_HEAL cp a,ICE_HEAL
jr z,.checkMonStatus jr z,.checkMonStatus
ld bc, (AWAKENING_MSG << 8) | SLP lb bc, AWAKENING_MSG, SLP
cp a,AWAKENING cp a,AWAKENING
jr z,.checkMonStatus jr z,.checkMonStatus
ld bc, (PARALYZ_HEAL_MSG << 8) | (1 << PAR) lb bc, PARALYZ_HEAL_MSG, 1 << PAR
cp a,PARLYZ_HEAL cp a,PARLYZ_HEAL
jr z,.checkMonStatus jr z,.checkMonStatus
ld bc, (FULL_HEAL_MSG << 8) | $ff ; Full Heal lb bc, FULL_HEAL_MSG, $ff ; Full Heal
.checkMonStatus .checkMonStatus
ld a,[hl] ; pokemon's status ld a,[hl] ; pokemon's status
and c ; does the pokemon have a status ailment the item can cure? 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) ItemUseOldRod: ; e24c (3:624c)
call FishingInit call FishingInit
jp c, ItemUseNotTime jp c, ItemUseNotTime
ld bc, (5 << 8) | MAGIKARP lb bc, 5, MAGIKARP
ld a, $1 ; set bite ld a, $1 ; set bite
jr RodResponse jr RodResponse
@ -2088,7 +2088,7 @@ ItemUseTMHM: ; e479 (3:6479)
ld hl,TeachMachineMoveText ld hl,TeachMachineMoveText
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc,$080f lb bc, 8, 15
ld a,TWO_OPTION_MENU ld a,TWO_OPTION_MENU
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID ; yes/no menu call DisplayTextBoxID ; yes/no menu
@ -2479,7 +2479,7 @@ TossItem_: ; e6f1 (3:66f1)
ld hl,IsItOKToTossItemText ld hl,IsItOKToTossItemText
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc,$080f lb bc, 8, 15
ld a,TWO_OPTION_MENU ld a,TWO_OPTION_MENU
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID ; yes/no menu call DisplayTextBoxID ; yes/no menu
@ -2578,14 +2578,14 @@ SendNewMonToBox: ; e7a4 (3:67a4)
jr nz, .asm_e7b1 jr nz, .asm_e7b1
call GetMonHeader call GetMonHeader
ld hl, wBoxMonOT ld hl, wBoxMonOT
ld bc, $b ld bc, 11
ld a, [W_NUMINBOX] ld a, [W_NUMINBOX]
dec a dec a
jr z, .asm_e7ee jr z, .asm_e7ee
dec a dec a
call AddNTimes call AddNTimes
push hl push hl
ld bc, $b ld bc, 11
add hl, bc add hl, bc
ld d, h ld d, h
ld e, l ld e, l
@ -2596,7 +2596,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
.asm_e7db .asm_e7db
push bc push bc
push hl push hl
ld bc, $b ld bc, 11
call CopyData call CopyData
pop hl pop hl
ld d, h ld d, h
@ -2609,17 +2609,17 @@ SendNewMonToBox: ; e7a4 (3:67a4)
.asm_e7ee .asm_e7ee
ld hl, wPlayerName ld hl, wPlayerName
ld de, wBoxMonOT ld de, wBoxMonOT
ld bc, $b ld bc, 11
call CopyData call CopyData
ld a, [W_NUMINBOX] ld a, [W_NUMINBOX]
dec a dec a
jr z, .asm_e82a jr z, .asm_e82a
ld hl, wBoxMonNicks ld hl, wBoxMonNicks
ld bc, $b ld bc, 11
dec a dec a
call AddNTimes call AddNTimes
push hl push hl
ld bc, $b ld bc, 11
add hl, bc add hl, bc
ld d, h ld d, h
ld e, l ld e, l
@ -2630,7 +2630,7 @@ SendNewMonToBox: ; e7a4 (3:67a4)
.asm_e817 .asm_e817
push bc push bc
push hl push hl
ld bc, $b ld bc, 11
call CopyData call CopyData
pop hl pop hl
ld d, h ld d, h

View file

@ -5,7 +5,7 @@ LearnMove: ; 6e43 (1:6e43)
call GetPartyMonName call GetPartyMonName
ld hl, wcd6d ld hl, wcd6d
ld de, wd036 ld de, wd036
ld bc, $b ld bc, 11
call CopyData call CopyData
DontAbandonLearning: ; 6e5b (1:6e5b) DontAbandonLearning: ; 6e5b (1:6e5b)
@ -77,7 +77,7 @@ AbandonLearning: ; 6eda (1:6eda)
ld hl, AbandonLearningText ld hl, AbandonLearningText
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc, $80f lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID ; yes/no menu call DisplayTextBoxID ; yes/no menu
@ -100,7 +100,7 @@ TryingToLearn: ; 6f07 (1:6f07)
ld hl, TryingToLearnText ld hl, TryingToLearnText
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc, $80f lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID ; yes/no menu call DisplayTextBoxID ; yes/no menu

View file

@ -3,9 +3,9 @@ LoadPokedexTilePatterns: ; 17840 (5:7840)
call LoadHpBarAndStatusTilePatterns call LoadHpBarAndStatusTilePatterns
ld de,PokedexTileGraphics ld de,PokedexTileGraphics
ld hl,vChars2 + $600 ld hl,vChars2 + $600
ld bc,(BANK(PokedexTileGraphics) << 8) + $12 lb bc, BANK(PokedexTileGraphics), $12
call CopyVideoData call CopyVideoData
ld de,PokeballTileGraphics ld de,PokeballTileGraphics
ld hl,vChars2 + $720 ld hl,vChars2 + $720
ld bc,(BANK(PokeballTileGraphics) << 8) + $01 lb bc, BANK(PokeballTileGraphics), $01
jp CopyVideoData ; load pokeball tile for marking caught mons jp CopyVideoData ; load pokeball tile for marking caught mons

View file

@ -116,7 +116,7 @@ BillsPCMenu: ; 214e8 (8:54e8)
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
ld hl, vChars2 + $780 ld hl, vChars2 + $780
ld de, PokeballTileGraphics ld de, PokeballTileGraphics
ld bc, (BANK(PokeballTileGraphics) << 8) + $01 lb bc, BANK(PokeballTileGraphics), $01
call CopyVideoData call CopyVideoData
call LoadScreenTilesFromBuffer2DisableBGTransfer call LoadScreenTilesFromBuffer2DisableBGTransfer
coord hl, 0, 0 coord hl, 0, 0

View file

@ -13,7 +13,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
ld a, BANK(CircleTile) ld a, BANK(CircleTile)
call FarCopyData2 call FarCopyData2
coord hl, 0, 0 coord hl, 0, 0
ld bc, $1012 lb bc, 16, 18
predef Diploma_TextBoxBorder predef Diploma_TextBoxBorder
ld hl, DiplomaTextPointersAndCoords ld hl, DiplomaTextPointersAndCoords
ld c, $5 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 ; Move the player 33 pixels right and set the priority bit so he appears
; behind the background layer. ; behind the background layer.
ld hl, wOAMBuffer + $01 ld hl, wOAMBuffer + $01
ld bc, $8028 lb bc, $80, $28
.adjustPlayerGfxLoop .adjustPlayerGfxLoop
ld a, [hl] ; X ld a, [hl] ; X
add 33 add 33

View file

@ -90,7 +90,7 @@ LeaguePCShowMon: ; 76610 (1d:6610)
ld a, [hli] ld a, [hli]
ld [wHoFMonLevel], a ld [wHoFMonLevel], a
ld de, wcd6d ld de, wcd6d
ld bc, $000B ld bc, 11
call CopyData call CopyData
ld b, $0B ld b, $0B
ld c, 0 ld c, 0

View file

@ -5,8 +5,8 @@ AskName: ; 64eb (1:64eb)
ld a, [W_ISINBATTLE] ld a, [W_ISINBATTLE]
dec a dec a
coord hl, 0, 0 coord hl, 0, 0
ld b, $4 ld b, 4
ld c, $b ld c, 11
call z, ClearScreenArea ; only if in wild batle call z, ClearScreenArea ; only if in wild batle
ld a, [wcf91] ld a, [wcf91]
ld [wd11e], a ld [wd11e], a
@ -14,7 +14,7 @@ AskName: ; 64eb (1:64eb)
ld hl, DoYouWantToNicknameText ld hl, DoYouWantToNicknameText
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc, $80f lb bc, 8, 15
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
@ -64,10 +64,10 @@ DisplayNameRaterScreen: ; 655c (1:655c)
call RestoreScreenTilesAndReloadTilePatterns call RestoreScreenTilesAndReloadTilePatterns
call LoadGBPal call LoadGBPal
ld a, [wcf4b] ld a, [wcf4b]
cp $50 cp "@"
jr z, .playerCancelled jr z, .playerCancelled
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
ld bc, $b ld bc, 11
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
call AddNTimes call AddNTimes
ld e, l ld e, l
@ -269,7 +269,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
ret z ret z
call CalcStringLength call CalcStringLength
dec hl dec hl
ld [hl], $50 ld [hl], "@"
ret ret
.pressedRight .pressedRight
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
@ -342,7 +342,7 @@ PrintAlphabet: ; 676f (1:676f)
ld de, UpperCaseAlphabet ld de, UpperCaseAlphabet
.lowercase .lowercase
coord hl, 2, 5 coord hl, 2, 5
ld bc, $509 ; 5 rows, 9 columns lb bc, 5, 9 ; 5 rows, 9 columns
.outerLoop .outerLoop
push bc push bc
.innerLoop .innerLoop
@ -373,7 +373,7 @@ PrintNicknameAndUnderscores: ; 680e (1:680e)
ld a, c ld a, c
ld [wNamingScreenNameLength], a ld [wNamingScreenNameLength], a
coord hl, 10, 2 coord hl, 10, 2
ld bc, $10a lb bc, 1, 10
call ClearScreenArea call ClearScreenArea
coord hl, 10, 2 coord hl, 10, 2
ld de, wcf4b ld de, wcf4b
@ -458,7 +458,7 @@ CalcStringLength: ; 68eb (1:68eb)
ld c, $0 ld c, $0
.loop .loop
ld a, [hl] ld a, [hl]
cp $50 cp "@"
ret z ret z
inc hl inc hl
inc c inc c

View file

@ -120,7 +120,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
push bc push bc
coord hl, 0, 3 coord hl, 0, 3
ld de,20 ld de,20
ld bc,$7f0d ; 13 blank tiles lb bc, " ", 13
call DrawTileLine ; cover up the menu cursor in the pokemon list call DrawTileLine ; cover up the menu cursor in the pokemon list
pop bc pop bc
ret ret
@ -128,7 +128,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
push bc push bc
coord hl, 15, 10 coord hl, 15, 10
ld de,20 ld de,20
ld bc,$7f07 ; 7 blank tiles lb bc, " ", 7
call DrawTileLine ; cover up the menu cursor in the side menu call DrawTileLine ; cover up the menu cursor in the side menu
pop bc pop bc
jr .exitSideMenu jr .exitSideMenu
@ -212,7 +212,7 @@ HandlePokedexListMenu: ; 40111 (10:4111)
xor a xor a
ld [H_AUTOBGTRANSFERENABLED],a ld [H_AUTOBGTRANSFERENABLED],a
coord hl, 4, 2 coord hl, 4, 2
ld bc,$0e0a lb bc, 14, 10
call ClearScreenArea call ClearScreenArea
coord hl, 1, 3 coord hl, 1, 3
ld a,[wListScrollOffset] ld a,[wListScrollOffset]
@ -413,14 +413,14 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld [hTilesetType],a ld [hTilesetType],a
coord hl, 0, 0 coord hl, 0, 0
ld de,1 ld de,1
ld bc,$6414 lb bc, $64, SCREEN_WIDTH
call DrawTileLine ; draw top border call DrawTileLine ; draw top border
coord hl, 0, 17 coord hl, 0, 17
ld b,$6f ld b, $6f
call DrawTileLine ; draw bottom border call DrawTileLine ; draw bottom border
coord hl, 0, 1 coord hl, 0, 1
ld de,20 ld de,20
ld bc,$6610 lb bc, $66, $10
call DrawTileLine ; draw left border call DrawTileLine ; draw left border
coord hl, 19, 1 coord hl, 19, 1
ld b,$67 ld b,$67

View file

@ -34,7 +34,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID ; display pokemon menu options call DisplayTextBoxID ; display pokemon menu options
ld hl,wFieldMoves 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 ld e,5
.adjustMenuVariablesLoop .adjustMenuVariablesLoop
dec e dec e
@ -523,7 +523,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
; loads tile patterns and draws everything except for gym leader faces / badges ; loads tile patterns and draws everything except for gym leader faces / badges
DrawTrainerInfo: ; 1349a (4:749a) DrawTrainerInfo: ; 1349a (4:749a)
ld de,RedPicFront ld de,RedPicFront
ld bc,(BANK(RedPicFront) << 8) | $01 lb bc, BANK(RedPicFront), $01
predef DisplayPicCenteredOrUpperRight predef DisplayPicCenteredOrUpperRight
call DisableLCD call DisableLCD
coord hl, 0, 2 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 ; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next
TrainerInfo_DrawTextBox: ; 135a0 (4:75a0) TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
ld a,$79 ; upper left corner tile ID 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_DrawHorizontalEdge ; draw top edge
call TrainerInfo_NextTextBoxRow call TrainerInfo_NextTextBoxRow
ld a,[wTrainerInfoTextBoxWidthPlus1] ld a,[wTrainerInfoTextBoxWidthPlus1]
@ -647,7 +647,7 @@ TrainerInfo_DrawTextBox: ; 135a0 (4:75a0)
dec c dec c
jr nz,.loop jr nz,.loop
ld a,$7d ; lower left corner tile ID 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) TrainerInfo_DrawHorizontalEdge: ; 135c3 (4:75c3)
ld [hli],a ; place left corner tile ld [hli],a ; place left corner tile
@ -813,36 +813,36 @@ SwitchPartyMon_InitVarOrSwapData: ; 13653 (4:7653)
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
push hl push hl
ld de, wSwitchPartyMonTempBuffer ld de, wSwitchPartyMonTempBuffer
ld bc, $b ld bc, 11
call CopyData call CopyData
ld hl, wPartyMonOT ld hl, wPartyMonOT
ld a, [wMenuItemToSwap] ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
pop de pop de
push hl push hl
ld bc, $b ld bc, 11
call CopyData call CopyData
pop de pop de
ld hl, wSwitchPartyMonTempBuffer ld hl, wSwitchPartyMonTempBuffer
ld bc, $b ld bc, 11
call CopyData call CopyData
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
push hl push hl
ld de, wSwitchPartyMonTempBuffer ld de, wSwitchPartyMonTempBuffer
ld bc, $b ld bc, 11
call CopyData call CopyData
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
ld a, [wMenuItemToSwap] ld a, [wMenuItemToSwap]
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
pop de pop de
push hl push hl
ld bc, $b ld bc, 11
call CopyData call CopyData
pop de pop de
ld hl, wSwitchPartyMonTempBuffer ld hl, wSwitchPartyMonTempBuffer
ld bc, $b ld bc, 11
call CopyData call CopyData
ld a, [wMenuItemToSwap] ld a, [wMenuItemToSwap]
ld [wSwappedMenuItem], a ld [wSwappedMenuItem], a

View file

@ -87,34 +87,34 @@ StatusScreen: ; 12953 (4:6953)
call LoadHpBarAndStatusTilePatterns call LoadHpBarAndStatusTilePatterns
ld de, BattleHudTiles1 ; source ld de, BattleHudTiles1 ; source
ld hl, vChars2 + $6d0 ; dest 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 call CopyVideoDataDouble ; ·│ :L and halfarrow line end
ld de, BattleHudTiles2 ld de, BattleHudTiles2
ld hl, vChars2 + $780 ld hl, vChars2 + $780
ld bc, (BANK(BattleHudTiles2) << 8) + $01 lb bc, BANK(BattleHudTiles2), $01
call CopyVideoDataDouble ; │ call CopyVideoDataDouble ; │
ld de, BattleHudTiles3 ld de, BattleHudTiles3
ld hl, vChars2 + $760 ld hl, vChars2 + $760
ld bc, (BANK(BattleHudTiles3) << 8) + $02 lb bc, BANK(BattleHudTiles3), $02
call CopyVideoDataDouble ; ─┘ call CopyVideoDataDouble ; ─┘
ld de, PTile ld de, PTile
ld hl, vChars2 + $720 ld hl, vChars2 + $720
ld bc,(BANK(PTile) << 8 | $01) lb bc, BANK(PTile), $01
call CopyVideoDataDouble ; P (for PP), inline call CopyVideoDataDouble ; P (for PP), inline
ld a, [hTilesetType] ld a, [hTilesetType]
push af push af
xor a xor a
ld [hTilesetType], a ld [hTilesetType], a
coord hl, 19, 1 coord hl, 19, 1
ld bc, $060a lb bc, 6, 10
call DrawLineBox ; Draws the box around name, HP and status call DrawLineBox ; Draws the box around name, HP and status
ld de, $fffa ld de, -6
add hl, de add hl, de
ld [hl], $f2 ; . after No ("." is a different one) ld [hl], $f2 ; . after No ("." is a different one)
dec hl dec hl
ld [hl], "№" ld [hl], "№"
coord hl, 19, 9 coord hl, 19, 9
ld bc, $0806 lb bc, 8, 6
call DrawLineBox ; Draws the box around types, ID No. and OT call DrawLineBox ; Draws the box around types, ID No. and OT
coord hl, 10, 9 coord hl, 10, 9
ld de, Type1Text ld de, Type1Text
@ -224,7 +224,7 @@ OKText: ; 12ac4 (4:6ac4)
; Draws a line starting from hl high b and wide c ; Draws a line starting from hl high b and wide c
DrawLineBox: ; 0x12ac7 DrawLineBox: ; 0x12ac7
ld de, $0014 ; New line ld de, SCREEN_WIDTH ; New line
.PrintVerticalLine .PrintVerticalLine
ld [hl], $78 ; │ ld [hl], $78 ; │
add hl, de add hl, de

View file

@ -24,11 +24,11 @@ SetDefaultNames: ; 60ca (1:60ca)
call z, InitOptions call z, InitOptions
ld hl, NintenText ld hl, NintenText
ld de, wPlayerName ld de, wPlayerName
ld bc, $b ld bc, 11
call CopyData call CopyData
ld hl, SonyText ld hl, SonyText
ld de, W_RIVALNAME ld de, W_RIVALNAME
ld bc, $b ld bc, 11
jp CopyData jp CopyData
OakSpeech: ; 6115 (1:6115) OakSpeech: ; 6115 (1:6115)
@ -57,7 +57,7 @@ OakSpeech: ; 6115 (1:6115)
bit 1,a ; possibly a debug mode bit bit 1,a ; possibly a debug mode bit
jp nz,.skipChoosingNames jp nz,.skipChoosingNames
ld de,ProfOakPic ld de,ProfOakPic
ld bc, (Bank(ProfOakPic) << 8) | $00 lb bc, Bank(ProfOakPic), $00
call IntroDisplayPicCenteredOrUpperRight call IntroDisplayPicCenteredOrUpperRight
call FadeInIntroPic call FadeInIntroPic
ld hl,OakSpeechText1 ld hl,OakSpeechText1
@ -76,7 +76,7 @@ OakSpeech: ; 6115 (1:6115)
call GBFadeOutToWhite call GBFadeOutToWhite
call ClearScreen call ClearScreen
ld de,RedPicFront ld de,RedPicFront
ld bc,(Bank(RedPicFront) << 8) | $00 lb bc, Bank(RedPicFront), $00
call IntroDisplayPicCenteredOrUpperRight call IntroDisplayPicCenteredOrUpperRight
call MovePicLeft call MovePicLeft
ld hl,IntroducePlayerText ld hl,IntroducePlayerText
@ -85,7 +85,7 @@ OakSpeech: ; 6115 (1:6115)
call GBFadeOutToWhite call GBFadeOutToWhite
call ClearScreen call ClearScreen
ld de,Rival1Pic ld de,Rival1Pic
ld bc,(Bank(Rival1Pic) << 8) | $00 lb bc, Bank(Rival1Pic), $00
call IntroDisplayPicCenteredOrUpperRight call IntroDisplayPicCenteredOrUpperRight
call FadeInIntroPic call FadeInIntroPic
ld hl,IntroduceRivalText ld hl,IntroduceRivalText
@ -95,7 +95,7 @@ OakSpeech: ; 6115 (1:6115)
call GBFadeOutToWhite call GBFadeOutToWhite
call ClearScreen call ClearScreen
ld de,RedPicFront ld de,RedPicFront
ld bc,(Bank(RedPicFront) << 8) | $00 lb bc, Bank(RedPicFront), $00
call IntroDisplayPicCenteredOrUpperRight call IntroDisplayPicCenteredOrUpperRight
call GBFadeInFromWhite call GBFadeInFromWhite
ld a,[wd72d] ld a,[wd72d]
@ -115,15 +115,15 @@ OakSpeech: ; 6115 (1:6115)
call DelayFrames call DelayFrames
ld de,RedSprite ld de,RedSprite
ld hl,vSprites ld hl,vSprites
ld bc,(BANK(RedSprite) << 8) | $0C lb bc, BANK(RedSprite), $0C
call CopyVideoData call CopyVideoData
ld de,ShrinkPic1 ld de,ShrinkPic1
ld bc,(BANK(ShrinkPic1) << 8) | $00 lb bc, BANK(ShrinkPic1), $00
call IntroDisplayPicCenteredOrUpperRight call IntroDisplayPicCenteredOrUpperRight
ld c,4 ld c,4
call DelayFrames call DelayFrames
ld de,ShrinkPic2 ld de,ShrinkPic2
ld bc,(BANK(ShrinkPic2) << 8) | $00 lb bc, BANK(ShrinkPic2), $00
call IntroDisplayPicCenteredOrUpperRight call IntroDisplayPicCenteredOrUpperRight
call ResetPlayerSpriteData call ResetPlayerSpriteData
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]

View file

@ -73,7 +73,7 @@ OakSpeechSlidePicLeft: ; 69ec (1:69ec)
call DelayFrames call DelayFrames
pop de pop de
ld hl, wcd6d ld hl, wcd6d
ld bc, $b ld bc, 11
call CopyData call CopyData
call Delay3 call Delay3
coord hl, 12, 4 coord hl, 12, 4

View file

@ -82,11 +82,11 @@ InitCutAnimOAM: ; eff7 (3:6ff7)
; tree ; tree
ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row ld de, Overworld_GFX + $2d0 ; cuttable tree sprite top row
ld hl, vChars1 + $7c0 ld hl, vChars1 + $7c0
ld bc, (BANK(Overworld_GFX) << 8) + $02 lb bc, BANK(Overworld_GFX), $02
call CopyVideoData call CopyVideoData
ld de, Overworld_GFX + $3d0 ; cuttable tree sprite bottom row ld de, Overworld_GFX + $3d0 ; cuttable tree sprite bottom row
ld hl, vChars1 + $7e0 ld hl, vChars1 + $7e0
ld bc, (BANK(Overworld_GFX) << 8) + $02 lb bc, BANK(Overworld_GFX), $02
call CopyVideoData call CopyVideoData
jr WriteCutOrBoulderDustAnimationOAMBlock jr WriteCutOrBoulderDustAnimationOAMBlock
.grass .grass
@ -113,7 +113,7 @@ InitCutAnimOAM: ; eff7 (3:6ff7)
LoadCutGrassAnimationTilePattern: ; f04c (3:704c) LoadCutGrassAnimationTilePattern: ; f04c (3:704c)
ld de, AnimationTileset2 + $60 ; tile depicting a leaf ld de, AnimationTileset2 + $60 ; tile depicting a leaf
ld bc, (BANK(AnimationTileset2) << 8) + $01 lb bc, BANK(AnimationTileset2), $01
jp CopyVideoData jp CopyVideoData
WriteCutOrBoulderDustAnimationOAMBlock: ; f055 (3:7055) WriteCutOrBoulderDustAnimationOAMBlock: ; f055 (3:7055)

View file

@ -9,7 +9,7 @@ EmotionBubble: ; 17c47 (5:7c47)
inc hl inc hl
ld d, [hl] ld d, [hl]
ld hl, vChars1 + $780 ld hl, vChars1 + $780
ld bc, (BANK(EmotionBubblesPointerTable) << 8) + $04 lb bc, BANK(EmotionBubblesPointerTable), $04
call CopyVideoData call CopyVideoData
ld a, [wUpdateSpritesEnabled] ld a, [wUpdateSpritesEnabled]
push af push af

View file

@ -1,7 +1,7 @@
AnimateHealingMachine: ; 70433 (1c:4433) AnimateHealingMachine: ; 70433 (1c:4433)
ld de, PokeCenterFlashingMonitorAndHealBall ld de, PokeCenterFlashingMonitorAndHealBall
ld hl, vChars0 + $7c0 ld hl, vChars0 + $7c0
ld bc, (BANK(PokeCenterFlashingMonitorAndHealBall) << 8) + $03 lb bc, BANK(PokeCenterFlashingMonitorAndHealBall), $03
call CopyVideoData call CopyVideoData
ld hl, wUpdateSpritesEnabled ld hl, wUpdateSpritesEnabled
ld a, [hl] ld a, [hl]

View file

@ -69,10 +69,10 @@ LedgeTiles: ; 1a6cf (6:66cf)
LoadHoppingShadowOAM: ; 1a6f0 (6:66f0) LoadHoppingShadowOAM: ; 1a6f0 (6:66f0)
ld hl, vChars1 + $7f0 ld hl, vChars1 + $7f0
ld de, LedgeHoppingShadow ld de, LedgeHoppingShadow
ld bc, (BANK(LedgeHoppingShadow) << 8) + $01 lb bc, BANK(LedgeHoppingShadow), $01
call CopyVideoDataDouble call CopyVideoDataDouble
ld a, $9 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 ld de, LedgeHoppingShadowOAM
call WriteOAMBlock call WriteOAMBlock
ret ret

View file

@ -47,7 +47,7 @@ EnterMapAnim: ; 70510 (1c:4510)
pop hl pop hl
ld de, BirdSprite ld de, BirdSprite
ld hl, vNPCSprites ld hl, vNPCSprites
ld bc, (BANK(BirdSprite) << 8) + $0c lb bc, BANK(BirdSprite), $0c
call CopyVideoData call CopyVideoData
call LoadBirdSpriteGraphics call LoadBirdSpriteGraphics
ld a, SFX_FLY ld a, SFX_FLY
@ -250,11 +250,11 @@ DoFlyAnimation: ; 706ae (1c:46ae)
LoadBirdSpriteGraphics: ; 706d7 (1c:46d7) LoadBirdSpriteGraphics: ; 706d7 (1c:46d7)
ld de, BirdSprite ld de, BirdSprite
ld hl, vNPCSprites ld hl, vNPCSprites
ld bc, (BANK(BirdSprite) << 8) + $0c lb bc, BANK(BirdSprite), $0c
call CopyVideoData call CopyVideoData
ld de, BirdSprite + $c0 ; moving animation sprite ld de, BirdSprite + $c0 ; moving animation sprite
ld hl, vNPCSprites2 ld hl, vNPCSprites2
ld bc, (BANK(BirdSprite) << 8) + $0c lb bc, BANK(BirdSprite), $0c
jp CopyVideoData jp CopyVideoData
InitFacingDirectionList: ; 706ef (1c:46ef) InitFacingDirectionList: ; 706ef (1c:46ef)
@ -388,7 +388,7 @@ FishingAnim: ; 707b6 (1c:47b6)
set 6, [hl] ; reserve the last 4 OAM entries set 6, [hl] ; reserve the last 4 OAM entries
ld de, RedSprite ld de, RedSprite
ld hl, vNPCSprites ld hl, vNPCSprites
ld bc, (BANK(RedSprite) << 8) + $0c lb bc, BANK(RedSprite), $0c
call CopyVideoData call CopyVideoData
ld a, $4 ld a, $4
ld hl, RedFishingTiles ld hl, RedFishingTiles

View file

@ -82,10 +82,10 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
inc a inc a
jr z,.sellMenuLoop ; if the player closed the choose quantity menu with the B button jr z,.sellMenuLoop ; if the player closed the choose quantity menu with the B button
ld hl,PokemartTellSellPriceText ld hl,PokemartTellSellPriceText
ld bc,$0e01 lb bc, 14, 1 ; location that PrintText always prints to, this is useless
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc,$080f lb bc, 08, 15
ld a,TWO_OPTION_MENU ld a,TWO_OPTION_MENU
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID ; yes/no menu call DisplayTextBoxID ; yes/no menu
@ -163,7 +163,7 @@ DisplayPokemartDialogue_: ; 6c20 (1:6c20)
ld hl,PokemartTellBuyPriceText ld hl,PokemartTellBuyPriceText
call PrintText call PrintText
coord hl, 14, 7 coord hl, 14, 7
ld bc,$080f lb bc, 8, 15
ld a,TWO_OPTION_MENU ld a,TWO_OPTION_MENU
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID ; yes/no menu call DisplayTextBoxID ; yes/no menu

View file

@ -85,7 +85,7 @@ LoadSmokeTileFourTimes: ; 79fc0 (1e:5fc0)
LoadSmokeTile: ; 79fd4 (1e:5fd4) LoadSmokeTile: ; 79fd4 (1e:5fd4)
ld de, SSAnneSmokePuffTile ld de, SSAnneSmokePuffTile
ld bc, (BANK(SSAnneSmokePuffTile) << 8) + $01 lb bc, BANK(SSAnneSmokePuffTile), $01
jp CopyVideoData jp CopyVideoData
SSAnneSmokePuffTile: ; 79fdd (1e:5fdd) SSAnneSmokePuffTile: ; 79fdd (1e:5fdd)

View file

@ -155,8 +155,8 @@ SaveSAV: ; 7370a (1c:770a)
.save .save
call SaveSAVtoSRAM call SaveSAVtoSRAM
coord hl, 1, 13 coord hl, 1, 13
ld bc,$0412 lb bc, 4, 18
call ClearScreenArea ; clear area 4x12 starting at 13,1 call ClearScreenArea
coord hl, 1, 14 coord hl, 1, 14
ld de,NowSavingString ld de,NowSavingString
call PlaceString call PlaceString
@ -176,7 +176,7 @@ NowSavingString:
SaveSAVConfirm: ; 73768 (1c:7768) SaveSAVConfirm: ; 73768 (1c:7768)
call PrintText call PrintText
coord hl, 0, 7 coord hl, 0, 7
ld bc,$0801 lb bc, 8, 1
ld a,TWO_OPTION_MENU ld a,TWO_OPTION_MENU
ld [wTextBoxID],a ld [wTextBoxID],a
call DisplayTextBoxID ; yes/no menu call DisplayTextBoxID ; yes/no menu

View file

@ -134,7 +134,7 @@ MainSlotMachineLoop: ; 37395 (d:7395)
ld hl, OneMoreGoSlotMachineText ld hl, OneMoreGoSlotMachineText
call PrintText call PrintText
coord hl, 14, 12 coord hl, 14, 12
ld bc, $0d0f lb bc, 13, 15
xor a ; YES_NO_MENU xor a ; YES_NO_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU

View file

@ -1,6 +1,6 @@
; copy text of fixed length $b (like player name, rival name, mon names, ...) ; copy text of fixed length $b (like player name, rival name, mon names, ...)
CopyFixedLengthText: ; 42b1 (1:42b1) CopyFixedLengthText: ; 42b1 (1:42b1)
ld bc, $b ld bc, 11
jp CopyData jp CopyData
SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7) SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7)
@ -377,7 +377,7 @@ LoadCopyrightAndTextBoxTiles: ; 4538 (1:4538)
LoadCopyrightTiles: ; 4541 (1:4541) LoadCopyrightTiles: ; 4541 (1:4541)
ld de, NintendoCopyrightLogoGraphics ld de, NintendoCopyrightLogoGraphics
ld hl, vChars2 + $600 ld hl, vChars2 + $600
ld bc, (BANK(NintendoCopyrightLogoGraphics) << 8) + $1c lb bc, BANK(NintendoCopyrightLogoGraphics), $1c
call CopyVideoData call CopyVideoData
coord hl, 2, 7 coord hl, 2, 7
ld de, CopyrightTextString ld de, CopyrightTextString

View file

@ -20,7 +20,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
call CopyData call CopyData
ld hl, vSprites + $40 ld hl, vSprites + $40
ld de, TownMapCursor ld de, TownMapCursor
ld bc, (BANK(TownMapCursor) << 8) + $04 lb bc, BANK(TownMapCursor), $04
call CopyVideoDataDouble call CopyVideoDataDouble
xor a xor a
ld [wWhichTownMapLocation], a ld [wWhichTownMapLocation], a
@ -29,7 +29,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
.townMapLoop .townMapLoop
coord hl, 0, 0 coord hl, 0, 0
ld bc, $114 lb bc, 1, 20
call ClearScreenArea call ClearScreenArea
ld hl, TownMapOrder ld hl, TownMapOrder
ld a, [wWhichTownMapLocation] ld a, [wWhichTownMapLocation]
@ -140,11 +140,11 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
call LoadFontTilePatterns call LoadFontTilePatterns
ld de, BirdSprite ld de, BirdSprite
ld hl, vSprites + $40 ld hl, vSprites + $40
ld bc, (BANK(BirdSprite) << 8) + $0c lb bc, BANK(BirdSprite), $0c
call CopyVideoData call CopyVideoData
ld de, TownMapUpArrow ld de, TownMapUpArrow
ld hl, vChars1 + $6d0 ld hl, vChars1 + $6d0
ld bc, (BANK(TownMapUpArrow) << 8) + $01 lb bc, BANK(TownMapUpArrow), $01
call CopyVideoDataDouble call CopyVideoDataDouble
call BuildFlyLocationsList call BuildFlyLocationsList
ld hl, wUpdateSpritesEnabled ld hl, wUpdateSpritesEnabled
@ -161,12 +161,12 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
ld hl, wFlyLocationsList ld hl, wFlyLocationsList
coord de, 18, 0 coord de, 18, 0
.townMapFlyLoop .townMapFlyLoop
ld a, $7f ld a, " "
ld [de], a ld [de], a
push hl push hl
push hl push hl
coord hl, 3, 0 coord hl, 3, 0
ld bc, $10f lb bc, 1, 15
call ClearScreenArea call ClearScreenArea
pop hl pop hl
ld a, [hl] ld a, [hl]
@ -442,8 +442,8 @@ WritePlayerOrBirdSpriteOAM: ; 7126d (1c:526d)
WriteTownMapSpriteOAM: ; 71279 (1c:5279) WriteTownMapSpriteOAM: ; 71279 (1c:5279)
push hl push hl
ld hl, $fcfc lb hl, -4, -4
add hl, bc ; subtract 4 from c (X coord) and 3 from b (Y coord) add hl, bc ; subtract 4 from c (X coord) and 4 from b (Y coord)
ld b, h ld b, h
ld c, l ld c, l
pop hl pop hl
@ -451,7 +451,7 @@ WriteTownMapSpriteOAM: ; 71279 (1c:5279)
WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281) WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281)
; Writes 4 OAM blocks for a helix mon party sprite, since it does not have ; Writes 4 OAM blocks for a helix mon party sprite, since it does not have
; a vertical line of symmetry. ; a vertical line of symmetry.
ld de, $202 lb de, 2, 2
.loop .loop
push de push de
push bc push bc

View file

@ -371,7 +371,7 @@ Trade_ShowEnemyMon: ; 41336 (10:5336)
call PlayCry call PlayCry
call Trade_Delay100 call Trade_Delay100
coord hl, 4, 10 coord hl, 4, 10
ld bc, $80c lb bc, 8, 12
call ClearScreenArea call ClearScreenArea
jp PrintTradeTakeCareText jp PrintTradeTakeCareText
@ -647,14 +647,14 @@ Trade_AnimMonMoveVertical: ; 41525 (10:5525)
and a and a
jr z, .movingLeft jr z, .movingLeft
; moving right ; moving right
ld bc, $400 ; move right lb bc, 4, 0 ; move right
call .doAnim call .doAnim
ld bc, $a ; move down lb bc, 0, 10 ; move down
jr .doAnim jr .doAnim
.movingLeft .movingLeft
ld bc, $f6 ; move up lb bc, 0, -10 ; move up
call .doAnim call .doAnim
ld bc, $fc00 ; move left lb bc, -4, 0 ; move left
.doAnim .doAnim
ld a, b ld a, b
ld [W_BASECOORDX], a ld [W_BASECOORDX], a

View file

@ -1402,7 +1402,7 @@ DisplayListMenuID:: ; 2be6 (0:2be6)
call UpdateSprites ; disable sprites behind the text box call UpdateSprites ; disable sprites behind the text box
; the code up to .skipMovingSprites appears to be useless ; the code up to .skipMovingSprites appears to be useless
coord hl, 4, 2 ; coordinates of upper left corner of menu text box coord hl, 4, 2 ; coordinates of upper left corner of menu text box
ld de,$090e ; height and width of menu text box lb de, 9, 14 ; height and width of menu text box
ld a,[wListMenuID] ld a,[wListMenuID]
and a ; is it a PC pokemon list? and a ; is it a PC pokemon list?
jr nz,.skipMovingSprites jr nz,.skipMovingSprites
@ -1668,7 +1668,7 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57)
coord hl, 9, 10 coord hl, 9, 10
.printQuantity .printQuantity
ld de,wItemQuantity ; current quantity ld de,wItemQuantity ; current quantity
lb bc,LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits lb bc, LEADING_ZEROES | 1, 2 ; 1 byte, 2 digits
call PrintNumber call PrintNumber
jp .waitForKeyPressLoop jp .waitForKeyPressLoop
.buttonAPressed ; the player chose to make the transaction .buttonAPressed ; the player chose to make the transaction
@ -1705,8 +1705,8 @@ ExitListMenu:: ; 2e3b (0:2e3b)
PrintListMenuEntries:: ; 2e5a (0:2e5a) PrintListMenuEntries:: ; 2e5a (0:2e5a)
coord hl, 5, 3 coord hl, 5, 3
ld b,$09 ld b,9
ld c,$0e ld c,14
call ClearScreenArea call ClearScreenArea
ld a,[wListPointer] ld a,[wListPointer]
ld e,a ld e,a
@ -1786,7 +1786,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a)
ld [wcf91],a ld [wcf91],a
call GetItemPrice ; get price call GetItemPrice ; get price
pop hl pop hl
ld bc,20 + 5 ; 1 row down and 5 columns right ld bc, SCREEN_WIDTH + 5 ; 1 row down and 5 columns right
add hl,bc add hl,bc
ld c,$a3 ; no leading zeroes, right-aligned, print currency symbol, 3 bytes ld c,$a3 ; no leading zeroes, right-aligned, print currency symbol, 3 bytes
call PrintBCDNumber call PrintBCDNumber
@ -1815,7 +1815,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a)
ld a,[wListScrollOffset] ld a,[wListScrollOffset]
add b add b
ld [hl],a ld [hl],a
call LoadMonData ; load pokemon info call LoadMonData
ld a,[wMonDataLocation] ld a,[wMonDataLocation]
and a ; is it a list of party pokemon or box pokemon? and a ; is it a list of party pokemon or box pokemon?
jr z,.skipCopyingLevel jr z,.skipCopyingLevel
@ -1826,7 +1826,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a)
pop hl pop hl
ld bc,$001c ld bc,$001c
add hl,bc add hl,bc
call PrintLevel ; print level call PrintLevel
pop af pop af
ld [wd11e],a ld [wd11e],a
.skipPrintingPokemonLevel .skipPrintingPokemonLevel
@ -1844,7 +1844,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a)
and a ; is the item unsellable? and a ; is the item unsellable?
jr nz,.skipPrintingItemQuantity ; if so, don't print the quantity jr nz,.skipPrintingItemQuantity ; if so, don't print the quantity
push hl push hl
ld bc,20 + 8 ; 1 row down and 8 columns right ld bc, SCREEN_WIDTH + 8 ; 1 row down and 8 columns right
add hl,bc add hl,bc
ld a,"×" ld a,"×"
ld [hli],a ld [hli],a
@ -1877,7 +1877,7 @@ PrintListMenuEntries:: ; 2e5a (0:2e5a)
ld a,$ec ; unfilled right arrow menu cursor to indicate an item being swapped ld a,$ec ; unfilled right arrow menu cursor to indicate an item being swapped
ld [hli],a ld [hli],a
.nextListEntry .nextListEntry
ld bc,2 * 20 ; 2 rows ld bc,2 * SCREEN_WIDTH ; 2 rows
add hl,bc add hl,bc
pop bc pop bc
inc c inc c
@ -1899,12 +1899,12 @@ GetMonName:: ; 2f9e (0:2f9e)
push hl push hl
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
ld a,BANK(MonsterNames) ; 07 ld a,BANK(MonsterNames)
ld [H_LOADEDROMBANK],a ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a ld [MBC1RomBank],a
ld a,[wd11e] ld a,[wd11e]
dec a dec a
ld hl,MonsterNames ; 421E ld hl,MonsterNames
ld c,10 ld c,10
ld b,0 ld b,0
call AddNTimes call AddNTimes
@ -1972,7 +1972,7 @@ GetMachineName:: ; 2ff3 (0:2ff3)
; now get the machine number and convert it to text ; now get the machine number and convert it to text
ld a,[wd11e] ld a,[wd11e]
sub TM_01 - 1 sub TM_01 - 1
ld b,$F6 ; "0" ld b, "0"
.FirstDigit .FirstDigit
sub 10 sub 10
jr c,.SecondDigit jr c,.SecondDigit
@ -1985,7 +1985,7 @@ GetMachineName:: ; 2ff3 (0:2ff3)
ld [de],a ld [de],a
inc de inc de
pop af pop af
ld b,$F6 ; "0" ld b, "0"
add b add b
ld [de],a ld [de],a
inc de inc de
@ -2134,6 +2134,7 @@ IsKeyItem:: ; 30d9 (0:30d9)
; function to draw various text boxes ; function to draw various text boxes
; INPUT: ; INPUT:
; [wTextBoxID] = text box ID ; [wTextBoxID] = text box ID
; b, c = y, x cursor position (TWO_OPTION_MENU only)
DisplayTextBoxID:: ; 30e8 (0:30e8) DisplayTextBoxID:: ; 30e8 (0:30e8)
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
@ -3002,7 +3003,7 @@ YesNoChoicePokeCenter:: ; 360a (0:360a)
ld a, HEAL_CANCEL_MENU ld a, HEAL_CANCEL_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
coord hl, 11, 6 coord hl, 11, 6
ld bc, $80c lb bc, 8, 12
jr DisplayYesNoChoice jr DisplayYesNoChoice
Func_361a:: ; 361a (0:361a) Func_361a:: ; 361a (0:361a)
@ -3010,7 +3011,7 @@ Func_361a:: ; 361a (0:361a)
ld a, WIDE_YES_NO_MENU ld a, WIDE_YES_NO_MENU
ld [wTwoOptionMenuID], a ld [wTwoOptionMenuID], a
coord hl, 12, 7 coord hl, 12, 7
ld bc, $080d lb bc, 8, 13
DisplayYesNoChoice:: ; 3628 (0:3628) DisplayYesNoChoice:: ; 3628 (0:3628)
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -3097,7 +3098,7 @@ LoadFontTilePatterns::
.on .on
ld de, FontGraphics ld de, FontGraphics
ld hl, vFont ld hl, vFont
ld bc, BANK(FontGraphics) << 8 | $80 lb bc, BANK(FontGraphics), $80
jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank jp CopyVideoDataDouble ; if LCD is on, transfer during V-blank
LoadTextBoxTilePatterns:: LoadTextBoxTilePatterns::
@ -3113,7 +3114,7 @@ LoadTextBoxTilePatterns::
.on .on
ld de, TextBoxGraphics ld de, TextBoxGraphics
ld hl, vChars2 + $600 ld hl, vChars2 + $600
ld bc, BANK(TextBoxGraphics) << 8 | $20 lb bc, BANK(TextBoxGraphics), $20
jp CopyVideoData ; if LCD is on, transfer during V-blank jp CopyVideoData ; if LCD is on, transfer during V-blank
LoadHpBarAndStatusTilePatterns:: LoadHpBarAndStatusTilePatterns::
@ -3129,7 +3130,7 @@ LoadHpBarAndStatusTilePatterns::
.on .on
ld de, HpBarAndStatusGraphics ld de, HpBarAndStatusGraphics
ld hl, vChars2 + $620 ld hl, vChars2 + $620
ld bc, BANK(HpBarAndStatusGraphics) << 8 | $1e lb bc, BANK(HpBarAndStatusGraphics), $1e
jp CopyVideoData ; if LCD is on, transfer during V-blank jp CopyVideoData ; if LCD is on, transfer during V-blank
@ -3824,12 +3825,12 @@ MoveMon:: ; 3a68 (0:3a68)
ld [MBC1RomBank], a ld [MBC1RomBank], a
ret ret
; skips a text entries, each of size $b (like trainer name, OT name, rival name, ...) ; skips a text entries, each of size 11 (like trainer name, OT name, rival name, ...)
; hl: base pointer, will be incremented by $b * a ; hl: base pointer, will be incremented by $b * a
SkipFixedLengthTextEntries:: ; 3a7d (0:3a7d) SkipFixedLengthTextEntries:: ; 3a7d (0:3a7d)
and a and a
ret z ret z
ld bc, $b ld bc, 11
.skipLoop .skipLoop
add hl, bc add hl, bc
dec a dec a

View file

@ -161,7 +161,7 @@ CopyVideoDataDouble::
ClearScreenArea:: ClearScreenArea::
; Clear tilemap area cxb at hl. ; Clear tilemap area cxb at hl.
ld a, $7f ; blank tile ld a, " " ; blank tile
ld de, 20 ; screen width ld de, 20 ; screen width
.y .y
push hl push hl
@ -218,7 +218,7 @@ ClearScreen::
ld bc, 20 * 18 ld bc, 20 * 18
inc b inc b
coord hl, 0, 0 coord hl, 0, 0
ld a, $7f ld a, " "
.loop .loop
ld [hli], a ld [hli], a
dec c dec c

View file

@ -1995,7 +1995,7 @@ LoadBikePlayerSpriteGraphics:: ; 105d (0:105d)
LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063) LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063)
push de push de
push hl push hl
ld bc,(BANK(RedSprite) << 8) + $0c lb bc, BANK(RedSprite), $0c
call CopyVideoData call CopyVideoData
pop hl pop hl
pop de pop de
@ -2006,7 +2006,7 @@ LoadPlayerSpriteGraphicsCommon:: ; 1063 (0:1063)
inc d inc d
.noCarry .noCarry
set 3,h set 3,h
ld bc,$050c lb bc, BANK(RedSprite), $0c
jp CopyVideoData jp CopyVideoData
; function to load data from the map header ; function to load data from the map header

View file

@ -291,7 +291,7 @@ Char51:: ; 1ab4 (0:1ab4)
call ProtectedDelay3 call ProtectedDelay3
call ManualTextScroll call ManualTextScroll
coord hl, 1, 13 coord hl, 1, 13
ld bc,$0412 lb bc, 4, 18
call ClearScreenArea call ClearScreenArea
ld c,20 ld c,20
call DelayFrames call DelayFrames
@ -306,7 +306,7 @@ Char49:: ; 1ad5 (0:1ad5)
call ProtectedDelay3 call ProtectedDelay3
call ManualTextScroll call ManualTextScroll
coord hl, 1, 10 coord hl, 1, 10
ld bc,$0712 lb bc, 7, 18
call ClearScreenArea call ClearScreenArea
ld c,20 ld c,20
call DelayFrames call DelayFrames

View file

@ -590,7 +590,7 @@ INCLUDE "engine/cable_club.asm"
LoadTrainerInfoTextBoxTiles: ; 5ae6 (1:5ae6) LoadTrainerInfoTextBoxTiles: ; 5ae6 (1:5ae6)
ld de, TrainerInfoTextBoxTileGraphics ld de, TrainerInfoTextBoxTileGraphics
ld hl, vChars2 + $760 ld hl, vChars2 + $760
ld bc, (BANK(TrainerInfoTextBoxTileGraphics) << 8) +$09 lb bc, BANK(TrainerInfoTextBoxTileGraphics), $09
jp CopyVideoData jp CopyVideoData
INCLUDE "engine/menu/main_menu.asm" INCLUDE "engine/menu/main_menu.asm"
@ -1435,8 +1435,8 @@ DisplayMoneyBox: ; 74ba (1:74ba)
ld [wTextBoxID], a ld [wTextBoxID], a
call DisplayTextBoxID call DisplayTextBoxID
coord hl, 13, 1 coord hl, 13, 1
ld b, $1 ld b, 1
ld c, $6 ld c, 6
call ClearScreenArea call ClearScreenArea
coord hl, 12, 1 coord hl, 12, 1
ld de, wPlayerMoney ld de, wPlayerMoney
@ -1967,7 +1967,7 @@ _RemovePokemon: ; 7b68 (1:7b68)
.asm_7ba6 .asm_7ba6
ld d, h ld d, h
ld e, l ld e, l
ld bc, $b ld bc, 11
add hl, bc add hl, bc
ld bc, wPartyMonNicks ld bc, wPartyMonNicks
ld a, [wRemoveMonFromBox] ld a, [wRemoveMonFromBox]
@ -2007,12 +2007,12 @@ _RemovePokemon: ; 7b68 (1:7b68)
jr z, .asm_7bfa jr z, .asm_7bfa
ld hl, wBoxMonNicks ld hl, wBoxMonNicks
.asm_7bfa .asm_7bfa
ld bc, $b ld bc, 11
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
call AddNTimes call AddNTimes
ld d, h ld d, h
ld e, l ld e, l
ld bc, $b ld bc, 11
add hl, bc add hl, bc
ld bc, wPokedexOwned ld bc, wPokedexOwned
ld a, [wRemoveMonFromBox] ld a, [wRemoveMonFromBox]
@ -3587,7 +3587,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
ld d, h ld d, h
ld e, l ld e, l
ld hl, wPlayerName ld hl, wPlayerName
ld bc, $b ld bc, 11
call CopyData call CopyData
ld a, [wMonDataLocation] ld a, [wMonDataLocation]
and a and a
@ -3858,7 +3858,7 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d)
ld hl, wEnemyMonOT ld hl, wEnemyMonOT
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
ld bc, $000b ld bc, 11
call CopyData ; write new mon's OT name (from an enemy mon) call CopyData ; write new mon's OT name (from an enemy mon)
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
ld a, [wPartyCount] ld a, [wPartyCount]
@ -3869,7 +3869,7 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d)
ld hl, wEnemyMonNicks ld hl, wEnemyMonNicks
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
ld bc, $000b ld bc, 11
call CopyData ; write new mon's nickname (from an enemy mon) call CopyData ; write new mon's nickname (from an enemy mon)
ld a, [wcf91] ld a, [wcf91]
ld [wd11e], a ld [wd11e], a
@ -4000,7 +4000,7 @@ _MoveMon: ; f51e (3:751e)
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
.asm_f5ec .asm_f5ec
ld bc, $b ld bc, 11
call CopyData call CopyData
ld a, [wMoveMonType] ld a, [wMoveMonType]
cp PARTY_TO_DAYCARE cp PARTY_TO_DAYCARE
@ -4030,7 +4030,7 @@ _MoveMon: ; f51e (3:751e)
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries call SkipFixedLengthTextEntries
.asm_f62a .asm_f62a
ld bc, $b ld bc, 11
call CopyData call CopyData
pop hl pop hl
ld a, [wMoveMonType] ld a, [wMoveMonType]

View file

@ -22,7 +22,7 @@ AgathaScript_76443: ; 76443 (1d:6443)
AgathaScript_76459: ; 76459 (1d:6459) AgathaScript_76459: ; 76459 (1d:6459)
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $2 lb bc, 0, 2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
AgathaScript_76464: ; 76464 (1d:6464) AgathaScript_76464: ; 76464 (1d:6464)

View file

@ -19,7 +19,7 @@ BikeShopText1: ; 1d745 (7:5745)
jr z, .asm_41190 jr z, .asm_41190
ld hl, BikeShopText_1d81f ld hl, BikeShopText_1d81f
call PrintText call PrintText
ld bc, (BICYCLE << 8) | 1 lb bc, BICYCLE, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, BIKE_VOUCHER ld a, BIKE_VOUCHER

View file

@ -163,7 +163,7 @@ BillsHouseText2: ; 1e874 (7:6874)
jr nz, .asm_1e8a9 jr nz, .asm_1e8a9
ld hl, BillThankYouText ld hl, BillThankYouText
call PrintText call PrintText
ld bc, (S_S__TICKET << 8) | 1 lb bc, S_S__TICKET, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, SSTicketReceivedText ld hl, SSTicketReceivedText

View file

@ -36,7 +36,7 @@ BluesHouseText1: ; 19b5d (6:5b5d)
.GiveMap .GiveMap
ld hl,DaisyOfferMapText ld hl,DaisyOfferMapText
call PrintText call PrintText
ld bc,(TOWN_MAP << 8) | 1 lb bc, TOWN_MAP, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a,HS_TOWN_MAP ld a,HS_TOWN_MAP

View file

@ -22,7 +22,7 @@ BrunoScript_762ec: ; 762ec (1d:62ec)
BrunoScript_76302: ; 76302 (1d:6302) BrunoScript_76302: ; 76302 (1d:6302)
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $2 lb bc, 0, 2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
BrunoScript_7630d: ; 7630d (1d:630d) BrunoScript_7630d: ; 7630d (1d:630d)

View file

@ -46,7 +46,7 @@ CeladonCityText5: ; 1999e (6:599e)
jr nz, .asm_7053f jr nz, .asm_7053f
ld hl, TM41PreText ld hl, TM41PreText
call PrintText call PrintText
ld bc, (TM_41 << 8) | 1 lb bc, TM_41, 1
call GiveItem call GiveItem
jr c, .Success jr c, .Success
ld hl, TM41NoRoomText ld hl, TM41NoRoomText

View file

@ -31,7 +31,7 @@ CeladonDinerText5: ; 49173 (12:5173)
jr nz, .asm_eb14d jr nz, .asm_eb14d
ld hl, CeladonDinerText_491a7 ld hl, CeladonDinerText_491a7
call PrintText call PrintText
ld bc, (COIN_CASE << 8) | 1 lb bc, COIN_CASE, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
SetEvent EVENT_GOT_COIN_CASE SetEvent EVENT_GOT_COIN_CASE

View file

@ -32,7 +32,7 @@ CeladonGameCornerScript_48bec: ; 48bec (12:4bec)
ret nz ret nz
ld a, $2a ld a, $2a
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0208 lb bc, 2, 8
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
CeladonGameCornerScript_48c07: ; 48c07 (12:4c07) CeladonGameCornerScript_48c07: ; 48c07 (12:4c07)
@ -452,7 +452,7 @@ CeladonGameCornerText12: ; 48edd (12:4edd)
SetEvent EVENT_FOUND_ROCKET_HIDEOUT SetEvent EVENT_FOUND_ROCKET_HIDEOUT
ld a, $43 ld a, $43
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0208 lb bc, 2, 8
predef ReplaceTileBlock predef ReplaceTileBlock
jp TextScriptEnd jp TextScriptEnd
@ -477,8 +477,8 @@ CeladonGameCornerScript_48f1e: ; 48f1e (12:4f1e)
call TextBoxBorder call TextBoxBorder
call UpdateSprites call UpdateSprites
coord hl, 12, 1 coord hl, 12, 1
ld b, $4 ld b, 4
ld c, $7 ld c, 7
call ClearScreenArea call ClearScreenArea
coord hl, 12, 2 coord hl, 12, 2
ld de, GameCornerMoneyText ld de, GameCornerMoneyText

View file

@ -47,7 +47,7 @@ CeladonGymText_48963: ; 48963 (12:4963)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
SetEvent EVENT_BEAT_ERIKA SetEvent EVENT_BEAT_ERIKA
ld bc, (TM_21 << 8) | 1 lb bc, TM_21, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $a ld a, $a

View file

@ -11,7 +11,7 @@ CeladonMansion5Text1: ; 1dd41 (7:5d41)
CeladonMansion5Text2: ; 1dd46 (7:5d46) CeladonMansion5Text2: ; 1dd46 (7:5d46)
TX_ASM TX_ASM
ld bc,(EEVEE << 8) | 25 lb bc, EEVEE, 25
call GivePokemon call GivePokemon
jr nc, .asm_24365 jr nc, .asm_24365
ld a, HS_CELADON_MANSION_5_GIFT ld a, HS_CELADON_MANSION_5_GIFT

View file

@ -26,7 +26,7 @@ CeladonMart3Text1: ; 4824a (12:424a)
jr nz, .asm_a5463 jr nz, .asm_a5463
ld hl, TM18PreReceiveText ld hl, TM18PreReceiveText
call PrintText call PrintText
ld bc, (TM_18 << 8) | 1 lb bc, TM_18, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
SetEvent EVENT_GOT_TM18 SetEvent EVENT_GOT_TM18

View file

@ -88,7 +88,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
ld hl, CeladonMartRoofText_48515 ld hl, CeladonMartRoofText_48515
call PrintText call PrintText
call RemoveItemByIDBank12 call RemoveItemByIDBank12
ld bc, (TM_49 << 8) | 1 lb bc, TM_49, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM49Text ld hl, ReceivedTM49Text
@ -101,7 +101,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
ld hl, CeladonMartRoofText_48504 ld hl, CeladonMartRoofText_48504
call PrintText call PrintText
call RemoveItemByIDBank12 call RemoveItemByIDBank12
ld bc, (TM_48 << 8) | 1 lb bc, TM_48, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, CeladonMartRoofText_4850a ld hl, CeladonMartRoofText_4850a
@ -114,7 +114,7 @@ CeladonMartRoofScript_4840c: ; 4840c (12:440c)
ld hl, CeladonMartRoofText_484f3 ld hl, CeladonMartRoofText_484f3
call PrintText call PrintText
call RemoveItemByIDBank12 call RemoveItemByIDBank12
ld bc, (TM_13 << 8) | 1 lb bc, TM_13, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, CeladonMartRoofText_484f9 ld hl, CeladonMartRoofText_484f9

View file

@ -299,7 +299,7 @@ CeruleanCityText2: ; 1967c (6:567c)
.asm_4ca20 .asm_4ca20
ld hl, CeruleanCityText_196f3 ld hl, CeruleanCityText_196f3
call PrintText call PrintText
ld bc, (TM_28 << 8) + 1 lb bc, TM_28, 1
call GiveItem call GiveItem
jr c, .Success jr c, .Success
ld hl, TM28NoRoomText ld hl, TM28NoRoomText

View file

@ -47,7 +47,7 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
SetEvent EVENT_BEAT_MISTY SetEvent EVENT_BEAT_MISTY
ld bc, (TM_11 << 8) | 1 lb bc, TM_11, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $6 ld a, $6

View file

@ -144,7 +144,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
SetEvent EVENT_BEAT_BLAINE SetEvent EVENT_BEAT_BLAINE
ld bc, (TM_38 << 8) | 1 lb bc, TM_38, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $b ld a, $b

View file

@ -23,7 +23,7 @@ CopycatsHouse2FText1: ; 5cc82 (17:4c82)
jr z, .asm_62ecd jr z, .asm_62ecd
ld hl, TM31PreReceiveText ld hl, TM31PreReceiveText
call PrintText call PrintText
ld bc, (TM_31 << 8) | 1 lb bc, TM_31, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM31Text ld hl, ReceivedTM31Text

View file

@ -113,7 +113,7 @@ FanClubText5:
; tell the story ; tell the story
ld hl, .storytext ld hl, .storytext
call PrintText call PrintText
ld bc, (BIKE_VOUCHER << 8) | 1 lb bc, BIKE_VOUCHER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, .receivedvouchertext ld hl, .receivedvouchertext

View file

@ -47,7 +47,7 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
SetEvent EVENT_BEAT_KOGA SetEvent EVENT_BEAT_KOGA
ld bc, (TM_06 << 8) | 1 lb bc, TM_06, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $a ld a, $a

View file

@ -38,7 +38,7 @@ FuchsiaHouse2Text1: ; 750c2 (1d:50c2)
.asm_60cba .asm_60cba
ld hl, WardenThankYouText ld hl, WardenThankYouText
call PrintText call PrintText
ld bc,(HM_04 << 8) | 1 lb bc, HM_04, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedHM04Text ld hl, ReceivedHM04Text

View file

@ -18,7 +18,7 @@ FuchsiaHouse3Text1: ; 56181 (15:6181)
and a and a
jr nz, .refused jr nz, .refused
ld bc, (GOOD_ROD << 8) | 1 lb bc, GOOD_ROD, 1
call GiveItem call GiveItem
jr nc, .full jr nc, .full

View file

@ -14,7 +14,7 @@ Lab3Text1: ; 75c94 (1d:5c94)
jr nz, .asm_e551a jr nz, .asm_e551a
ld hl, TM35PreReceiveText ld hl, TM35PreReceiveText
call PrintText call PrintText
ld bc, (TM_35 << 8) | 1 lb bc, TM_35, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM35Text ld hl, ReceivedTM35Text

View file

@ -25,12 +25,12 @@ LanceScript_5a2c4: ; 5a2c4 (16:62c4)
LanceScript_5a2de: ; 5a2de (16:62de) LanceScript_5a2de: ; 5a2de (16:62de)
push bc push bc
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $602 lb bc, 6, 2
call LanceScript_5a2f0 call LanceScript_5a2f0
pop bc pop bc
ld a, b ld a, b
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $603 lb bc, 6, 3
LanceScript_5a2f0: ; 5a2f0 (16:62f0) LanceScript_5a2f0: ; 5a2f0 (16:62f0)
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock

View file

@ -72,7 +72,7 @@ LavenderHouse1Text5: ; 1d918 (7:5918)
jr nz, .asm_15ac2 jr nz, .asm_15ac2
ld hl, LavenderHouse1Text_1d94c ld hl, LavenderHouse1Text_1d94c
call PrintText call PrintText
ld bc, (POKE_FLUTE << 8) | 1 lb bc, POKE_FLUTE, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedFluteText ld hl, ReceivedFluteText

View file

@ -23,7 +23,7 @@ LoreleiScript_76191: ; 76191 (1d:6191)
ld a, $24 ld a, $24
.asm_761ab .asm_761ab
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $2 lb bc, 0, 2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
LoreleiScript_761b6: ; 761b6 (1d:61b6) LoreleiScript_761b6: ; 761b6 (1d:61b6)

View file

@ -15,22 +15,22 @@ Mansion1Subscript1: ; 442c5 (11:42c5)
ret z ret z
CheckEvent EVENT_MANSION_SWITCH_ON CheckEvent EVENT_MANSION_SWITCH_ON
jr nz, .asm_442ec jr nz, .asm_442ec
ld bc, $060c lb bc, 6, 12
call Mansion1Script_4430b call Mansion1Script_4430b
ld bc, $0308 lb bc, 3, 8
call Mansion1Script_44304 call Mansion1Script_44304
ld bc, $080a lb bc, 8, 10
call Mansion1Script_44304 call Mansion1Script_44304
ld bc, $0d0d lb bc, 13, 13
jp Mansion1Script_44304 jp Mansion1Script_44304
.asm_442ec .asm_442ec
ld bc, $060c lb bc, 6, 12
call Mansion1Script_44304 call Mansion1Script_44304
ld bc, $0308 lb bc, 3, 8
call Mansion1Script_4430b call Mansion1Script_4430b
ld bc, $080a lb bc, 8, 10
call Mansion1Script_4430b call Mansion1Script_4430b
ld bc, $0d0d lb bc, 13, 13
jp Mansion1Script_4430b jp Mansion1Script_4430b
Mansion1Script_44304: ; 44304 (11:4304) Mansion1Script_44304: ; 44304 (11:4304)

View file

@ -16,24 +16,24 @@ Mansion2Script_51fee: ; 51fee (14:5fee)
CheckEvent EVENT_MANSION_SWITCH_ON CheckEvent EVENT_MANSION_SWITCH_ON
jr nz, .asm_52016 jr nz, .asm_52016
ld a, $e ld a, $e
ld bc, $204 lb bc, 2, 4
call Mansion2Script_5202f call Mansion2Script_5202f
ld a, $54 ld a, $54
ld bc, $409 lb bc, 4, 9
call Mansion2Script_5202f call Mansion2Script_5202f
ld a, $5f ld a, $5f
ld bc, $b03 lb bc, 11, 3
call Mansion2Script_5202f call Mansion2Script_5202f
ret ret
.asm_52016 .asm_52016
ld a, $5f ld a, $5f
ld bc, $204 lb bc, 2, 4
call Mansion2Script_5202f call Mansion2Script_5202f
ld a, $e ld a, $e
ld bc, $409 lb bc, 4, 9
call Mansion2Script_5202f call Mansion2Script_5202f
ld a, $e ld a, $e
ld bc, $b03 lb bc, 11, 3
call Mansion2Script_5202f call Mansion2Script_5202f
ret ret

View file

@ -271,7 +271,7 @@ MtMoon3Text6: ; 49ee9 (12:5ee9)
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_49f21 jr nz, .asm_49f21
ld bc,(DOME_FOSSIL << 8) | 1 lb bc, DOME_FOSSIL, 1
call GiveItem call GiveItem
jp nc, MtMoon3Script_49f76 jp nc, MtMoon3Script_49f76
call MtMoon3Script_49f69 call MtMoon3Script_49f69
@ -299,7 +299,7 @@ MtMoon3Text7: ; 49f29 (12:5f29)
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_49f61 jr nz, .asm_49f61
ld bc, (HELIX_FOSSIL << 8) | 1 lb bc, HELIX_FOSSIL, 1
call GiveItem call GiveItem
jp nc, MtMoon3Script_49f76 jp nc, MtMoon3Script_49f76
call MtMoon3Script_49f69 call MtMoon3Script_49f69

View file

@ -43,7 +43,7 @@ MtMoonPokecenterText4: ; 492ec (12:52ec)
ld hl, MtMoonPokecenterText_49366 ld hl, MtMoonPokecenterText_49366
jr .printText jr .printText
.enoughMoney .enoughMoney
ld bc,(MAGIKARP << 8) | 5 lb bc, MAGIKARP, 5
call GivePokemon call GivePokemon
jr nc, .done jr nc, .done
xor a xor a

View file

@ -191,7 +191,7 @@ Museum1FText3: ; 5c256 (17:4256)
jr nz, .asm_5c285 jr nz, .asm_5c285
ld hl, Museum1FText_5c28e ld hl, Museum1FText_5c28e
call PrintText call PrintText
ld bc, (OLD_AMBER << 8) | 1 lb bc, OLD_AMBER, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
SetEvent EVENT_GOT_OLD_AMBER SetEvent EVENT_GOT_OLD_AMBER

View file

@ -1022,7 +1022,7 @@ OaksLabText5: ; 1d248 (7:5248)
.asm_1d2d0 .asm_1d2d0
CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK
jr nz, .asm_1d2e7 jr nz, .asm_1d2e7
ld bc, (POKE_BALL << 8) | 5 lb bc, POKE_BALL, 5
call GiveItem call GiveItem
ld hl, OaksLabGivePokeballsText ld hl, OaksLabGivePokeballsText
call PrintText call PrintText

View file

@ -47,7 +47,7 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
SetEvent EVENT_BEAT_BROCK SetEvent EVENT_BEAT_BROCK
ld bc, (TM_34 << 8) | 1 lb bc, TM_34, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $5 ld a, $5

View file

@ -27,7 +27,7 @@ RocketHideout1Script_44be0: ; 44be0 (11:4be0)
ld a, $e ld a, $e
.asm_44c03 .asm_44c03
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $080c lb bc, 8, 12
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
RocketHideout1ScriptPointers: ; 44c0e (11:4c0e) RocketHideout1ScriptPointers: ; 44c0e (11:4c0e)

View file

@ -27,7 +27,7 @@ RocketHideout4Script_45473: ; 45473 (11:5473)
ld a, $e ld a, $e
.asm_45498 .asm_45498
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $050c lb bc, 5, 12
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
RocketHideout4Script_454a3: ; 454a3 (11:54a3) RocketHideout4Script_454a3: ; 454a3 (11:54a3)

View file

@ -12,7 +12,7 @@ Route1Text1: ; 1cab8 (7:4ab8)
jr nz, .asm_1cada jr nz, .asm_1cada
ld hl, Route1ViridianMartSampleText ld hl, Route1ViridianMartSampleText
call PrintText call PrintText
ld bc, (POTION << 8) | 1 lb bc, POTION, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, Route1Text_1cae8 ld hl, Route1Text_1cae8

View file

@ -12,7 +12,7 @@ Route12GateUpstairsText1: ; 49569 (12:5569)
jr c, .asm_0ad3c jr c, .asm_0ad3c
ld hl, TM39PreReceiveText ld hl, TM39PreReceiveText
call PrintText call PrintText
ld bc, (TM_39 << 8) | 1 lb bc, TM_39, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM39Text ld hl, ReceivedTM39Text

View file

@ -15,7 +15,7 @@ Route12HouseText1: ; 56484 (15:6484)
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_a2d76 jr nz, .asm_a2d76
ld bc, (SUPER_ROD << 8) | 1 lb bc, SUPER_ROD, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wd728 ld hl, wd728

View file

@ -12,7 +12,7 @@ Route16HouseText1: ; 1e5ff (7:65ff)
jr nz, .asm_13616 jr nz, .asm_13616
ld hl, Route16HouseText3 ld hl, Route16HouseText3
call PrintText call PrintText
ld bc, (HM_02 << 8) | 1 lb bc, HM_02, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
SetEvent EVENT_GOT_HM02 SetEvent EVENT_GOT_HM02

View file

@ -149,7 +149,7 @@ Route24Text1: ; 514a4 (14:54a4)
jr nz, .asm_514f9 jr nz, .asm_514f9
ld hl, Route24Text_51510 ld hl, Route24Text_51510
call PrintText call PrintText
ld bc, (NUGGET << 8) | 1 lb bc, NUGGET, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
SetEvent EVENT_GOT_NUGGET SetEvent EVENT_GOT_NUGGET

View file

@ -54,7 +54,7 @@
ld hl,.MakePaymentText ld hl,.MakePaymentText
call PrintText call PrintText
ld a,30 ld a,30
ld hl,(502 / $100) << 8 | (502 % $100) lb hl, (502 / $100), (502 % $100)
.xf1ff2 .xf1ff2
ld [W_NUMSAFARIBALLS],a ld [W_NUMSAFARIBALLS],a
ld a,h ld a,h

View file

@ -10,7 +10,7 @@ SafariZoneSecretHouseText1: ; 4a31c (12:631c)
jr nz, .asm_20a9b jr nz, .asm_20a9b
ld hl, SafariZoneSecretHouseText_4a350 ld hl, SafariZoneSecretHouseText_4a350
call PrintText call PrintText
ld bc, (HM_03 << 8) | 1 lb bc, HM_03, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedHM03Text ld hl, ReceivedHM03Text

View file

@ -47,7 +47,7 @@ SaffronGymText_5d068: ; 5d068 (17:5068)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
SetEvent EVENT_BEAT_SABRINA SetEvent EVENT_BEAT_SABRINA
ld bc, (TM_46 << 8) | 1 lb bc, TM_46, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $b ld a, $b

View file

@ -10,7 +10,7 @@ SaffronHouse2Text1: ; 1de41 (7:5e41)
jr nz, .asm_9e72b jr nz, .asm_9e72b
ld hl, TM29PreReceiveText ld hl, TM29PreReceiveText
call PrintText call PrintText
ld bc,(TM_29 << 8) | 1 lb bc, TM_29, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedTM29Text ld hl, ReceivedTM29Text

View file

@ -13,18 +13,19 @@ SilphCo10Script_5a14f: ; 5a14f (16:614f)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, DataTable_5a173 ld hl, SilphCo10GateCoords
call SilphCo2Script_59d43 call SilphCo2Script_59d43
call SilphCo10Text_5a176 call SilphCo10Text_5a176
CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR
ret nz ret nz
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $405 lb bc, 4, 5
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
DataTable_5a173: ; 5a173 (16:6173) SilphCo10GateCoords: ; 5a173 (16:6173)
db $04,$05,$FF db $04,$05
db $FF
SilphCo10Text_5a176: ; 5a176 (16:6176) SilphCo10Text_5a176: ; 5a176 (16:6176)
ld a, [$ffe0] ld a, [$ffe0]

View file

@ -13,18 +13,19 @@ SilphCo11Script_62110: ; 62110 (18:6110)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, DataTable_62134 ld hl, SilphCo11GateCoords
call SilphCo11Script_62137 call SilphCo11Script_62137
call SilphCo11Script_62163 call SilphCo11Script_62163
CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR
ret nz ret nz
ld a, $20 ld a, $20
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $603 lb bc, 6, 3
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
DataTable_62134: ; 62134 (18:6134) SilphCo11GateCoords: ; 62134 (18:6134)
db $06,$03,$FF db $06,$03
db $FF
SilphCo11Script_62137: ; 62137 (18:6137) SilphCo11Script_62137: ; 62137 (18:6137)
push hl push hl
@ -306,7 +307,7 @@ SilphCo11Text1: ; 622dc (18:62dc)
jp nz, .asm_62308 jp nz, .asm_62308
ld hl, SilphCoPresidentText ld hl, SilphCoPresidentText
call PrintText call PrintText
ld bc, (MASTER_BALL << 8) | 1 lb bc, MASTER_BALL, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedSilphCoMasterBallText ld hl, ReceivedSilphCoMasterBallText

View file

@ -13,7 +13,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, DataTable_59d3e ld hl, SilphCo2GateCoords
call SilphCo2Script_59d43 call SilphCo2Script_59d43
call SilphCo2Script_59d6f call SilphCo2Script_59d6f
CheckEvent EVENT_SILPH_CO_2_UNLOCKED_DOOR1 CheckEvent EVENT_SILPH_CO_2_UNLOCKED_DOOR1
@ -21,7 +21,7 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07)
push af push af
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0202 lb bc, 2, 2
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_59d2e .asm_59d2e
@ -29,11 +29,13 @@ SilphCo2Script_59d07: ; 59d07 (16:5d07)
ret nz ret nz
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0502 lb bc, 5, 2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
DataTable_59d3e: ; 59d3e (16:5d3e) SilphCo2GateCoords: ; 59d3e (16:5d3e)
db $02,$02,$05,$02,$FF db $02,$02
db $05,$02
db $FF
SilphCo2Script_59d43: ; 59d43 (16:5d43) SilphCo2Script_59d43: ; 59d43 (16:5d43)
push hl push hl
@ -141,7 +143,7 @@ SilphCo2Text1: ; 59dc1 (16:5dc1)
jr nz, .asm_59de4 jr nz, .asm_59de4
ld hl, SilphCo2Text_59ded ld hl, SilphCo2Text_59ded
call PrintText call PrintText
ld bc, (TM_36 << 8) | 1 lb bc, TM_36, 1
call GiveItem call GiveItem
ld hl, TM36NoRoomText ld hl, TM36NoRoomText
jr nc, .asm_59de7 jr nc, .asm_59de7

View file

@ -13,7 +13,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, DataTable_59fa8 ld hl, SilphCo3GateCoords
call SilphCo2Script_59d43 call SilphCo2Script_59d43
call SilphCo3Script_59fad call SilphCo3Script_59fad
CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1 CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1
@ -21,7 +21,7 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71)
push af push af
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $404 lb bc, 4, 4
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_59f98 .asm_59f98
@ -29,11 +29,13 @@ SilphCo3Script_59f71: ; 59f71 (16:5f71)
ret nz ret nz
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $408 lb bc, 4, 8
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
DataTable_59fa8: ; 59fa8 (16:5fa8) SilphCo3GateCoords: ; 59fa8 (16:5fa8)
db $04,$04,$04,$08,$FF db $04,$04
db $04,$08
db $FF
SilphCo3Script_59fad: ; 59fad (16:5fad) SilphCo3Script_59fad: ; 59fad (16:5fad)
EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1

View file

@ -13,7 +13,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, SilphCo4Data19d58 ld hl, SilphCo4GateCoords
call SilphCo4Script_19d5d call SilphCo4Script_19d5d
call SilphCo4Script_19d89 call SilphCo4Script_19d89
CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1 CheckEvent EVENT_SILPH_CO_4_UNLOCKED_DOOR1
@ -21,7 +21,7 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21)
push af push af
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0602 lb bc, 6, 2
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_19d48 .asm_19d48
@ -29,11 +29,13 @@ SilphCo4Script_19d21: ; 19d21 (6:5d21)
ret nz ret nz
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0406 lb bc, 4, 6
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
SilphCo4Data19d58: ; 19d58 (6:5d58) SilphCo4GateCoords: ; 19d58 (6:5d58)
db $06, $02, $04, $06, $ff db $06,$02
db $04,$06
db $FF
SilphCo4Script_19d5d: ; 19d5d (6:5d5d) SilphCo4Script_19d5d: ; 19d5d (6:5d5d)
push hl push hl

View file

@ -13,7 +13,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, SilphCo5Coords ld hl, SilphCo5GateCoords
call SilphCo4Script_19d5d call SilphCo4Script_19d5d
call SilphCo5Script_19f9e call SilphCo5Script_19f9e
CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1 CheckEvent EVENT_SILPH_CO_5_UNLOCKED_DOOR1
@ -21,7 +21,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
push af push af
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0203 lb bc, 2, 3
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_19f74 .asm_19f74
@ -30,7 +30,7 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
push af push af
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0603 lb bc, 6, 3
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_19f87 .asm_19f87
@ -38,11 +38,14 @@ SilphCo5Script_19f4d: ; 19f4d (6:5f4d)
ret nz ret nz
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0507 lb bc, 5, 7
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
SilphCo5Coords: ; 19f97 (6:5f97) SilphCo5GateCoords: ; 19f97 (6:5f97)
db $02, $03, $06, $03, $05, $07, $ff db $02,$03
db $06,$03
db $05,$07
db $FF
SilphCo5Script_19f9e: ; 19f9e (6:5f9e) SilphCo5Script_19f9e: ; 19f9e (6:5f9e)
EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1

View file

@ -13,19 +13,19 @@ SilphCo6Script_1a1bf: ; 1a1bf (6:61bf)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, SilphCo6Coords1 ld hl, SilphCo6GateCoords
call SilphCo4Script_19d5d call SilphCo4Script_19d5d
call SilphCo6Script_1a1e6 call SilphCo6Script_1a1e6
CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR
ret nz ret nz
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $0602 lb bc, 6, 2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
SilphCo6Coords1: ; 1a1e3 (6:61e3) SilphCo6GateCoords: ; 1a1e3 (6:61e3)
db $06, $02 db $06,$02
db $ff db $FF
SilphCo6Script_1a1e6: ; 1a1e6 (6:61e6) SilphCo6Script_1a1e6: ; 1a1e6 (6:61e6)
ld a, [$ffe0] ld a, [$ffe0]

View file

@ -13,7 +13,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, DataTable_51bc1 ld hl, SilphCo7GateCoords
call SilphCo7Text_51bc8 call SilphCo7Text_51bc8
call SilphCo7Text_51bf4 call SilphCo7Text_51bf4
CheckEvent EVENT_SILPH_CO_7_UNLOCKED_DOOR1 CheckEvent EVENT_SILPH_CO_7_UNLOCKED_DOOR1
@ -21,7 +21,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
push af push af
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $305 lb bc, 3, 5
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_51b9e .asm_51b9e
@ -30,7 +30,7 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
push af push af
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $20a lb bc, 2, 10
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_51bb1 .asm_51bb1
@ -38,11 +38,14 @@ SilphCo7Script_51b77: ; 51b77 (14:5b77)
ret nz ret nz
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $60a lb bc, 6, 10
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
DataTable_51bc1: ; 51bc1 (14:5bc1) SilphCo7GateCoords: ; 51bc1 (14:5bc1)
db $03,$05,$02,$0A,$06,$0A,$FF db $03,$05
db $02,$0A
db $06,$0A
db $FF
SilphCo7Text_51bc8: ; 51bc8 (14:5bc8) SilphCo7Text_51bc8: ; 51bc8 (14:5bc8)
push hl push hl
@ -329,7 +332,7 @@ SilphCo7Text1:
.givelapras .givelapras
ld hl, .MeetLaprasGuyText ld hl, .MeetLaprasGuyText
call PrintText call PrintText
ld bc, (LAPRAS << 8) | 15 lb bc, LAPRAS, 15
call GivePokemon call GivePokemon
jr nc, .done jr nc, .done
ld a, [wSimulatedJoypadStatesEnd] ld a, [wSimulatedJoypadStatesEnd]

View file

@ -13,18 +13,19 @@ SilphCo8Script_5651a: ; 5651a (15:651a)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, DataTable_5653e ld hl, SilphCo8GateCoords
call SilphCo8Script_56541 call SilphCo8Script_56541
call SilphCo8Script_5656d call SilphCo8Script_5656d
CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR CheckEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR
ret nz ret nz
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $403 lb bc, 4, 3
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
DataTable_5653e: ; 5653e (15:653e) SilphCo8GateCoords: ; 5653e (15:653e)
db $04,$03,$FF db $04,$03
db $FF
SilphCo8Script_56541: ; 56541 (15:6541) SilphCo8Script_56541: ; 56541 (15:6541)
push hl push hl

View file

@ -13,7 +13,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
bit 5, [hl] bit 5, [hl]
res 5, [hl] res 5, [hl]
ret z ret z
ld hl, DataTable_5d82e ld hl, SilphCo9GateCoords
call SilphCo9Script_5d837 call SilphCo9Script_5d837
call SilphCo9Script_5d863 call SilphCo9Script_5d863
CheckEvent EVENT_SILPH_CO_9_UNLOCKED_DOOR1 CheckEvent EVENT_SILPH_CO_9_UNLOCKED_DOOR1
@ -21,7 +21,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
push af push af
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $401 lb bc, 4, 1
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_5d7f8 .asm_5d7f8
@ -30,7 +30,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
push af push af
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $209 lb bc, 2, 9
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_5d80b .asm_5d80b
@ -39,7 +39,7 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
push af push af
ld a, $54 ld a, $54
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $509 lb bc, 5, 9
predef ReplaceTileBlock predef ReplaceTileBlock
pop af pop af
.asm_5d81e .asm_5d81e
@ -47,11 +47,15 @@ SilphCo9Script_5d7d1: ; 5d7d1 (17:57d1)
ret nz ret nz
ld a, $5f ld a, $5f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $605 lb bc, 6, 5
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
DataTable_5d82e: ; 5d82e (17:582e) SilphCo9GateCoords: ; 5d82e (17:582e)
db $04,$01,$02,$09,$05,$09,$06,$05,$FF db $04,$01
db $02,$09
db $05,$09
db $06,$05
db $FF
SilphCo9Script_5d837: ; 5d837 (17:5837) SilphCo9Script_5d837: ; 5d837 (17:5837)
push hl push hl

View file

@ -22,7 +22,7 @@ SSAnne7Text1: ; 618ad (18:58ad)
call PrintText call PrintText
ld hl, ReceivingHM01Text ld hl, ReceivingHM01Text
call PrintText call PrintText
ld bc, (HM_01 << 8) | 1 lb bc, HM_01, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, ReceivedHM01Text ld hl, ReceivedHM01Text

View file

@ -38,7 +38,7 @@ VermilionGymScript_5ca6d: ; 5ca6d (17:4a6d)
ld a, $5 ld a, $5
.asm_5ca7f .asm_5ca7f
ld [wNewTileBlockID], a ld [wNewTileBlockID], a
ld bc, $202 lb bc, 2, 2
predef_jump ReplaceTileBlock predef_jump ReplaceTileBlock
VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a) VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a)
@ -66,7 +66,7 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
ld [hSpriteIndexOrTextID], a ld [hSpriteIndexOrTextID], a
call DisplayTextID call DisplayTextID
SetEvent EVENT_BEAT_LT_SURGE SetEvent EVENT_BEAT_LT_SURGE
ld bc, (TM_24 << 8) | 1 lb bc, TM_24, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld a, $7 ld a, $7

View file

@ -15,7 +15,7 @@ VermilionHouse2Text1: ; 56075 (15:6075)
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_eb1b7 jr nz, .asm_eb1b7
ld bc, (OLD_ROD << 8) | 1 lb bc, OLD_ROD, 1
call GiveItem call GiveItem
jr nc, .BagFull jr nc, .BagFull
ld hl, wd728 ld hl, wd728

Some files were not shown because too many files have changed in this diff Show more