diff options
Diffstat (limited to 'home.asm')
-rw-r--r-- | home.asm | 926 |
1 files changed, 570 insertions, 356 deletions
@@ -20,7 +20,7 @@ SECTION "rst 38", ROM0 SECTION "vblank", ROM0 jp VBlank SECTION "hblank", ROM0 - rst $38 + jp LCDC SECTION "timer", ROM0 jp Timer SECTION "serial", ROM0 @@ -98,24 +98,74 @@ SECTION "Header", ROM0 SECTION "Main", ROM0 +PlayPikachuPCM:: + ld a, [H_LOADEDROMBANK] + push af + ld a, b + call BankswitchCommon + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a +.loop + ld a, [hli] + ld d, a + ld a, $3 +.playSingleSample + dec a + jr nz, .playSingleSample + + rept 7 + call LoadNextSoundClipSample + call PlaySoundClipSample + endr + + call LoadNextSoundClipSample + dec bc + ld a, c + or b + jr nz, .loop + pop af + call BankswitchCommon + ret + +LoadNextSoundClipSample:: + ld a, d + and $80 + srl a + srl a + ld [rNR32], a + sla d + ret + +PlaySoundClipSample:: + ld a, $3 +.loop + dec a + jr nz, .loop + ret + Start:: cp GBC jr z, .gbc xor a jr .ok .gbc - ld a, 0 + ld a, 1 .ok - ld [wGBC], a + ld [hGBC], a jp Init +Joypad:: + homecall_jump _Joypad + +ReadJoypad:: + homecall_jump ReadJoypad_ -INCLUDE "home/joypad.asm" -INCLUDE "data/map_header_pointers.asm" INCLUDE "home/overworld.asm" CheckForUserInterruption:: -; Return carry if Up+Select+B, Start or A are pressed in c frames. +; Return carry if Up + Select + B, Start or A are pressed in c frames. ; Used only in the intro and title screen. call DelayFrame @@ -173,7 +223,7 @@ DrawHPBar:: push hl push de - push bc + ;push bc ; Left ld a, $71 ; "HP:" @@ -229,7 +279,7 @@ DrawHPBar:: add e ld [hl], a .done - pop bc + ;pop bc pop de pop hl ret @@ -292,25 +342,31 @@ LoadFrontSpriteByMonIndex:: pop hl ld a, [H_LOADEDROMBANK] push af - ld a, Bank(CopyUncompressedPicToHL) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + switchbank CopyUncompressedPicToHL xor a ld [hStartTileID], a call CopyUncompressedPicToHL xor a ld [wSpriteFlipped], a pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - ret - + jp BankswitchCommon PlayCry:: ; Play monster a's cry. + push bc + ld b, a + ld a, [wLowHealthAlarm] + push af + xor a + ld [wLowHealthAlarm], a + ld a, b call GetCryData call PlaySound - jp WaitForSoundToFinish + call WaitForSoundToFinish + pop af + ld [wLowHealthAlarm], a + pop bc + ret GetCryData:: ; Load cry data for monster a. @@ -406,13 +462,24 @@ HandlePartyMenuInput:: ld [wMenuWrappingEnabled], a ld a, $40 ld [wPartyMenuAnimMonEnabled], a - call HandleMenuInput_ - call PlaceUnfilledArrowMenuCursor - ld b, a - xor a + call HandleMenuInputPokemonSelection + push af ; save hJoy5 OR wMenuWrapping enabled, if no inputs were selected within a certain period of time + bit 1, a ; was B button pressed? + ld a, $0 ld [wPartyMenuAnimMonEnabled], a ld a, [wCurrentMenuItem] ld [wPartyAndBillsPCSavedMenuItem], a + jr nz, .asm_1258 + ld a, [wCurrentMenuItem] + ld [wWhichPokemon], a + callab IsThisPartymonStarterPikachu_Party + jr nc, .asm_1258 + call CheckPikachuFollowingPlayer + jr nz, .asm_128f +.asm_1258 + pop af + call PlaceUnfilledArrowMenuCursor + ld b, a ld hl, wd730 res 6, [hl] ; turn on letter printing delay ld a, [wMenuItemToSwap] @@ -437,6 +504,14 @@ HandlePartyMenuInput:: call BankswitchBack and a ret +.asm_128f + pop af + ld hl, PartyMenuText_12cc + call PrintText + xor a + ld [wMenuItemToSwap], a + pop af + ld [hTilesetType], a .noPokemonChosen call BankswitchBack scf @@ -450,12 +525,16 @@ HandlePartyMenuInput:: ld [wMenuItemToSwap], a ld [wPartyMenuTypeOrMessageID], a call RedrawPartyMenu - jr HandlePartyMenuInput + jp HandlePartyMenuInput .handleSwap ld a, [wCurrentMenuItem] ld [wWhichPokemon], a callba SwitchPartyMon - jr HandlePartyMenuInput + jp HandlePartyMenuInput + +PartyMenuText_12cc:: + TX_FAR _SleepingPikachuText1 + db "@" DrawPartyMenu:: ld hl, DrawPartyMenu_ @@ -493,17 +572,7 @@ PrintStatusCondition:: ret PrintStatusConditionNotFainted: - ld a, [H_LOADEDROMBANK] - push af - ld a, BANK(PrintStatusAilment) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call PrintStatusAilment ; print status condition - pop bc - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - ret + homecall_jump_sf PrintStatusAilment ; function to print pokemon level, leaving off the ":L" if the level is at least 100 ; INPUT: @@ -552,9 +621,7 @@ GetwMoves:: GetMonHeader:: ld a, [H_LOADEDROMBANK] push af - ld a, BANK(BaseStats) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + switchbank BaseStats push bc push de push hl @@ -573,8 +640,8 @@ GetMonHeader:: ld b, $77 ; size of Aerodactyl fossil sprite cp FOSSIL_AERODACTYL ; Aerodactyl fossil jr z, .specialID - cp MEW - jr z, .mew + ;cp MEW + ;jr z, .mew predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number ld a, [wd11e] dec a @@ -592,13 +659,6 @@ GetMonHeader:: ld [hl], e ; write front sprite pointer inc hl ld [hl], d - jr .done -.mew - ld hl, MewBaseStats - ld de, wMonHeader - ld bc, MonBaseStatsEnd - MonBaseStats - ld a, BANK(MewBaseStats) - call FarCopyData .done ld a, [wd0b5] ld [wMonHIndex], a @@ -608,8 +668,7 @@ GetMonHeader:: pop de pop bc pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret ; copy party pokemon's name to wcd6d @@ -718,7 +777,7 @@ UncompressMonSprite:: ld a, [hli] ld [wSpriteInputPtr], a ; fetch sprite input pointer ld a, [hl] - ld [wSpriteInputPtr+1], a + ld [wSpriteInputPtr + 1], a ; define (by index number) the bank that a pokemon's image is in ; index = Mew, bank 1 ; index = Kabutops fossil, bank $B @@ -726,13 +785,13 @@ UncompressMonSprite:: ; $1F ≤ index < $4A, bank $A ; $4A ≤ index < $74, bank $B ; $74 ≤ index < $99, bank $C -; $99 ≤ index, bank $D +; $99 ≤ index, bank $D ld a, [wcf91] ; XXX name for this ram location ld b, a - cp MEW - ld a, BANK(MewPicFront) - jr z, .GotBank - ld a, b + ;cp MEW + ;ld a, BANK(MewPicFront) + ;jr z, .GotBank + ;ld a, b cp FOSSIL_KABUTOPS ld a, BANK(FossilKabutopsPic) jr z, .GotBank @@ -770,7 +829,7 @@ LoadMonFrontSprite:: ; postprocesses uncompressed sprite chunks to a 2bpp sprite and loads it into video ram ; calculates alignment parameters to place both sprite chunks in the center of the 7*7 tile sprite buffers ; de: destination location -; a,c: sprite dimensions (in tiles of 8x8 each) +; a, c: sprite dimensions (in tiles of 8x8 each) LoadUncompressedSpriteData:: push de and $f @@ -803,8 +862,8 @@ LoadUncompressedSpriteData:: add a add a ; 8*(7*((8-w)/2) + 7-h) ; combined overall offset (in bytes) ld [H_SPRITEOFFSET], a - xor a - ld [$4000], a + ld a, $0 + call SwitchSRAMBankAndLatchClockData ld hl, sSpriteBuffer0 call ZeroSpriteBuffer ; zero buffer 0 ld de, sSpriteBuffer1 @@ -815,6 +874,7 @@ LoadUncompressedSpriteData:: ld de, sSpriteBuffer2 ld hl, sSpriteBuffer1 call AlignSpriteDataCentered ; copy and align buffer 2 to 1 (containing the LSB of the 2bpp sprite) + call PrepareRTCDataAndDisableSRAM pop de jp InterlaceMergeSpriteBuffers @@ -861,8 +921,8 @@ ZeroSpriteBuffer:: ; in the resulting sprite, the rows of the two source sprites are interlaced ; de: output address InterlaceMergeSpriteBuffers:: - xor a - ld [$4000], a + ld a, $0 + call SwitchSRAMBankAndLatchClockData push de ld hl, sSpriteBuffer2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2 ld de, sSpriteBuffer1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1 @@ -904,16 +964,26 @@ InterlaceMergeSpriteBuffers:: ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied ld a, [H_LOADEDROMBANK] ld b, a - jp CopyVideoData + call CopyVideoData + jp PrepareRTCDataAndDisableSRAM + +INCLUDE "home/pikachu.asm" +;INCLUDE "data/collision.asm" +INCLUDE "home/lcdc.asm" + +IsTilePassable:: +; sets carry if tile is passable, resets carry otherwise + homecall_sf _IsTilePassable + ret -INCLUDE "data/collision.asm" INCLUDE "home/copy2.asm" INCLUDE "home/text.asm" INCLUDE "home/vcopy.asm" INCLUDE "home/init.asm" INCLUDE "home/vblank.asm" INCLUDE "home/fade.asm" +INCLUDE "home/play_time.asm" INCLUDE "home/serial.asm" INCLUDE "home/timer.asm" INCLUDE "home/audio.asm" @@ -925,13 +995,14 @@ UpdateSprites:: ret nz ld a, [H_LOADEDROMBANK] push af - ld a, Bank(_UpdateSprites) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + switchbank _UpdateSprites + ld a, $ff + ld [wUpdateSpritesEnabled], a call _UpdateSprites + ld a, $1 + ld [wUpdateSpritesEnabled], a pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret INCLUDE "data/mart_inventories.asm" @@ -990,7 +1061,8 @@ ResetPlayerSpriteData:: ResetPlayerSpriteData_ClearSpriteData:: ld bc, $10 xor a - jp FillMemory + call FillMemory + ret FadeOutAudio:: ld a, [wAudioFadeOutControl] @@ -1032,15 +1104,17 @@ FadeOutAudio:: ld b, a xor a ld [wAudioFadeOutControl], a - ld a, $ff - ld [wNewSoundID], a - call PlaySound + call StopAllMusic ld a, [wAudioSavedROMBank] ld [wAudioROMBank], a ld a, b ld [wNewSoundID], a jp PlaySound +UnknownText_2812:: + TX_FAR _PokemonText + db "@" + ; this function is used to display sign messages, sprite dialog, etc. ; INPUT: [hSpriteIndexOrTextID] = sprite ID or text ID DisplayTextID:: @@ -1065,6 +1139,8 @@ DisplayTextID:: ld [wSpriteIndex], a and a jp z, DisplayStartMenu + cp TEXT_PIKACHU_ANIM + jp z, DisplayPikachuEmotion cp TEXT_SAFARI_GAME_OVER jp z, DisplaySafariGameOverText cp TEXT_MON_FAINTED @@ -1082,20 +1158,18 @@ DisplayTextID:: .spriteHandling ; get the text ID of the sprite push hl - push de - push bc - callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction) - pop bc - pop de + ;push de + ;push bc + ;callba UpdateSpriteFacingOffsetAndDelayMovement ; update the graphics of the sprite the player is talking to (to face the right direction) + ;pop bc + ;pop de ld hl, wMapSpriteData ; NPC text entries ld a, [hSpriteIndexOrTextID] dec a add a - add l - ld l, a - jr nc, .noCarry - inc h -.noCarry + ld e, a + ld d, $0 + add hl, de inc hl ld a, [hl] ; a = text ID of the sprite pop hl @@ -1103,7 +1177,8 @@ DisplayTextID:: ; look up the address of the text in the map's text entries dec a ld e, a - sla e + ld d, $0 + add hl, de add hl, de ld a, [hli] ld h, [hl] @@ -1171,9 +1246,6 @@ CloseTextDisplay:: add hl, de dec c jr nz, .restoreSpriteFacingDirectionLoop - ld a, BANK(InitMapSprites) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a call InitMapSprites ; reload sprite tile pattern data (since it was partially overwritten by text tile patterns) ld hl, wFontLoaded res 0, [hl] @@ -1182,8 +1254,7 @@ CloseTextDisplay:: call z, LoadPlayerSpriteGraphics call LoadCurrentMapView pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon jp UpdateSprites DisplayPokemartDialogue:: @@ -1195,15 +1266,7 @@ DisplayPokemartDialogue:: call LoadItemList ld a, PRICEDITEMLISTMENU ld [wListMenuID], a - ld a, [H_LOADEDROMBANK] - push af - ld a, Bank(DisplayPokemartDialogue_) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call DisplayPokemartDialogue_ - pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + homecall DisplayPokemartDialogue_ jp AfterDisplayingTextID PokemartGreetingText:: @@ -1234,15 +1297,7 @@ DisplayPokemonCenterDialogue:: ld [$ff8d], a inc hl - ld a, [H_LOADEDROMBANK] - push af - ld a, Bank(DisplayPokemonCenterDialogue_) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call DisplayPokemonCenterDialogue_ - pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + homecall DisplayPokemonCenterDialogue_ jp AfterDisplayingTextID DisplaySafariGameOverText:: @@ -1264,6 +1319,16 @@ DisplayPlayerBlackedOutText:: ld a, [wd732] res 5, a ; reset forced to use bike bit ld [wd732], a + CheckEvent EVENT_IN_SAFARI_ZONE + jr z, .didnotblackoutinsafari + xor a + ld [wNumSafariBalls], a + ld [wSafariSteps], a + ld [wSafariSteps + 1], a + EventFlagAddressa EVENT_IN_SAFARI_ZONE + ld [wcf0d], a + ld [wSafariZoneGateCurScript], a +.didnotblackoutinsafari jp HoldTextDisplayOpen PlayerBlackedOutText:: @@ -1279,6 +1344,10 @@ RepelWoreOffText:: TX_FAR _RepelWoreOffText db "@" +DisplayPikachuEmotion:: + callab TalkToPikachu + jp CloseTextDisplay + INCLUDE "engine/menu/start_menu.asm" ; function to count how many bits are set in a string of bytes @@ -1330,15 +1399,7 @@ AddAmountSoldToMoney:: ; [wWhichPokemon] = index (within the inventory) of the item to remove ; [wItemQuantity] = quantity to remove RemoveItemFromInventory:: - ld a, [H_LOADEDROMBANK] - push af - ld a, BANK(RemoveItemFromInventory_) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call RemoveItemFromInventory_ - pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + homecall RemoveItemFromInventory_ ret ; function to add an item (in varying quantities) to the player's bag or PC box @@ -1349,16 +1410,7 @@ RemoveItemFromInventory:: ; sets carry flag if successful, unsets carry flag if unsuccessful AddItemToInventory:: push bc - ld a, [H_LOADEDROMBANK] - push af - ld a, BANK(AddItemToInventory_) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call AddItemToInventory_ - pop bc - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + homecall_sf AddItemToInventory_ pop bc ret @@ -1432,7 +1484,7 @@ DisplayListMenuIDLoop:: .oldManBattle ld a, "▶" Coorda 5, 4 ; place menu cursor in front of first menu entry - ld c, 80 + ld c, 20 call DelayFrames xor a ld [wCurrentMenuItem], a @@ -1559,15 +1611,13 @@ DisplayListMenuIDLoop:: DisplayChooseQuantityMenu:: ; text box dimensions/coordinates for just quantity coord hl, 15, 9 - ld b, 1 ; height - ld c, 3 ; width + lb bc, 1, 3 ; height and width ld a, [wListMenuID] cp PRICEDITEMLISTMENU jr nz, .drawTextBox ; text box dimensions/coordinates for quantity and price coord hl, 7, 9 - ld b, 1 ; height - ld c, 11 ; width + lb bc, 1, 11 ; height and width .drawTextBox call TextBoxBorder coord hl, 16, 10 @@ -1699,8 +1749,7 @@ ExitListMenu:: PrintListMenuEntries:: coord hl, 5, 3 - ld b, 9 - ld c, 14 + lb bc, 9, 14 call ClearScreenArea ld a, [wListPointer] ld e, a @@ -1715,7 +1764,7 @@ PrintListMenuEntries:: jr nz, .skipMultiplying ; if it's an item menu ; item entries are 2 bytes long, so multiply by 2 - sla a + add a sla c .skipMultiplying add e @@ -1864,7 +1913,7 @@ PrintListMenuEntries:: ld a, [wMenuItemToSwap] ; ID of item chosen for swapping (counts from 1) and a ; is an item being swapped? jr z, .nextListEntry - sla a + add a cp c ; is it this item? jr nz, .nextListEntry dec hl @@ -2016,7 +2065,7 @@ IsMoveHM:: jp IsInArray HMMoves:: - db CUT,FLY,SURF,STRENGTH,FLASH + db CUT, FLY, SURF, STRENGTH, FLASH db $ff ; terminator GetMoveName:: @@ -2044,8 +2093,7 @@ ReloadMapData:: call LoadTilesetTilePatternData call EnableLCD pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret ; reloads tileset tile patterns @@ -2058,8 +2106,7 @@ ReloadTilesetTilePatterns:: call LoadTilesetTilePatternData call EnableLCD pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret ; shows the town map and lets the player choose a destination to fly to @@ -2068,6 +2115,34 @@ ChooseFlyDestination:: res 4, [hl] jpba LoadTownMap_Fly +PrinterSerial:: + homecall PrinterSerial_ + ret + +SerialFunction:: + ld a, [wPrinterConnectionOpen] + bit 0, a + ret z + ld a, [wPrinterOpcode] + and a + ret nz + ld hl, wOverworldMap + 650 + inc [hl] + ld a, [hl] + cp $6 + ret c + xor a + ld [hl], a + ld a, $0c + ld [wPrinterOpcode], a + ld a, $88 + ld [rSB], a + ld a, $1 + ld [rSC], a + ld a, START_TRANSFER_INTERNAL_CLOCK + ld [rSC], a + ret + ; causes the text box to close without waiting for a button press after displaying text DisableWaitingAfterTextDisplay:: ld a, $01 @@ -2129,16 +2204,89 @@ IsKeyItem:: ; [wTextBoxID] = text box ID ; b, c = y, x cursor position (TWO_OPTION_MENU only) DisplayTextBoxID:: - ld a, [H_LOADEDROMBANK] + homecall_sf DisplayTextBoxID_ + ret + +UpdateGBCPal_BGP:: push af - ld a, BANK(DisplayTextBoxID_) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call DisplayTextBoxID_ + ld a, [hGBC] + and a + jr z, .notGBC + push bc + push de + push hl + ld a, [rBGP] + ld b, a + ld a, [wLastBGP] + cp b + jr z, .noChangeInBGP + callba _UpdateGBCPal_BGP +.noChangeInBGP + pop hl + pop de pop bc - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a +.notGBC + pop af + ret + +UpdateGBCPal_OBP0:: + push af + ld a, [hGBC] + and a + jr z, .notGBC + push bc + push de + push hl + ld a, [rOBP0] + ld b, a + ld a, [wLastOBP0] + cp b + jr z, .noChangeInOBP0 + ld b, BANK(_UpdateGBCPal_OBP) + ld hl, _UpdateGBCPal_OBP + ld c, CONVERT_OBP0 + call Bankswitch +.noChangeInOBP0 + pop hl + pop de + pop bc +.notGBC + pop af + ret + +UpdateGBCPal_OBP1:: + push af + ld a, [hGBC] + and a + jr z, .notGBC + push bc + push de + push hl + ld a, [rOBP1] + ld b, a + ld a, [wLastOBP1] + cp b + jr z, .noChangeInOBP1 + ld b, BANK(_UpdateGBCPal_OBP) + ld hl, _UpdateGBCPal_OBP + ld c, CONVERT_OBP1 + call Bankswitch +.noChangeInOBP1 + pop hl + pop de + pop bc +.notGBC + pop af + ret + +Func_3082:: + ld a, [H_LOADEDROMBANK] + push af + call FadeOutAudio + callbs Music_DoLowHealthAlarm + callbs Audio1_UpdateMusic + pop af + call BankswitchCommon ret ; not zero if an NPC movement script is running, the player character is @@ -2174,13 +2322,11 @@ RunNPCMovementScript:: ld a, [H_LOADEDROMBANK] push af ld a, [wNPCMovementScriptBank] - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ld a, [wNPCMovementScriptFunctionNum] call CallFunctionInTable pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret .NPCMovementScriptPointerTables @@ -2201,7 +2347,7 @@ StoreTrainerHeaderPointer:: ld a, h ld [wTrainerHeaderPtr], a ld a, l - ld [wTrainerHeaderPtr+1], a + ld [wTrainerHeaderPtr + 1], a ret ; executes the current map script from the function pointer array provided in hl. @@ -2575,17 +2721,6 @@ TrainerEndBattleText:: call TextCommandProcessor jp TextScriptEnd -; only engage withe trainer if the player is not already -; engaged with another trainer -; XXX unused? -CheckIfAlreadyEngaged:: - ld a, [wFlags_0xcd60] - bit 0, a - ret nz - call EngageMapTrainer - xor a - ret - PlayTrainerMusic:: ld a, [wEngagedTrainerClass] cp OPP_SONY1 @@ -2599,8 +2734,7 @@ PlayTrainerMusic:: ret nz xor a ld [wAudioFadeOutControl], a - ld a, $ff - call PlaySound + call StopAllMusic ; stop music ld a, BANK(Music_MeetEvilTrainer) ld [wAudioROMBank], a ld [wAudioSavedROMBank], a @@ -2705,6 +2839,60 @@ IsItemInBag:: and a ret +IsSurfingPikachuInParty:: +; set bit 6 of wd472 if true +; also calls Func_3467, which is a bankswitch to IsStarterPikachuInOurParty + ld a, [wd472] + and $3f + ld [wd472], a + ld hl, wPartyMon1 + ld c, PARTY_LENGTH + ld b, SURF +.loop + ld a, [hl] + cp PIKACHU + jr nz, .notPikachu + push hl + ld de, $8 + add hl, de + ld a, [hli] + cp b ; does pikachu have surf as one of its moves + jr z, .hasSurf + ld a, [hli] + cp b + jr z, .hasSurf + ld a, [hli] + cp b + jr z, .hasSurf + ld a, [hli] + cp b + jr nz, .noSurf +.hasSurf + ld a, [wd472] + set 6, a + ld [wd472], a +.noSurf + pop hl +.notPikachu + ld de, wPartyMon2 - wPartyMon1 + add hl, de + dec c + jr nz, .loop + call Func_3467 + ret + +Func_3467:: + push hl + push bc + callab IsStarterPikachuInOurParty + pop bc + pop hl + ret nc + ld a, [wd472] + set 7, a + ld [wd472], a + ret + DisplayPokedex:: ld [wd11e], a jpba _DisplayPokedex @@ -2728,6 +2916,26 @@ SetSpriteImageIndexAfterSettingFacingDirection:: ld [hl], a ret +SpriteFunc_34a1:: + ld a, [H_SPRITEINDEX] + swap a + add $e + ld l, a + ld h, $c2 + ld c, [hl] + dec c + swap c + ld a, [$ff8d] + add c + ld c, a + ld a, [$ff8c] + swap a + add $2 + ld l, a + dec h + ld [hl], c + ret + ; tests if the player's coordinates are in a specified array ; INPUT: ; hl = address of array @@ -2876,8 +3084,8 @@ GetSpriteMovementByte2Pointer:: ld a, [H_SPRITEINDEX] dec a add a - ld d, 0 ld e, a + ld d, 0 add hl, de pop de ret @@ -2887,7 +3095,7 @@ GetTrainerInformation:: ld a, [wLinkState] and a jr nz, .linkBattle - ld a, Bank(TrainerPicAndMoneyPointers) + ld a, BANK(TrainerPicAndMoneyPointers) call BankswitchHome ld a, [wTrainerClass] dec a @@ -2906,6 +3114,7 @@ GetTrainerInformation:: inc de ld a, [hli] ld [de], a + call IsFightingJessieJames jp BankswitchBack .linkBattle ld hl, wTrainerPicPointer @@ -2915,6 +3124,24 @@ GetTrainerInformation:: ld [hl], d ret +IsFightingJessieJames:: + ld a, [wTrainerClass] + cp ROCKET + ret nz + ld a, [wTrainerNo] + cp $2a + ret c + ld de, JessieJamesPic + cp $2e + jr c, .dummy + ld de, JessieJamesPic ; possibly meant to add another pic +.dummy + ld hl, wTrainerPicPointer + ld a, e + ld [hli], a + ld [hl], d + ret + GetTrainerName:: jpba GetTrainerName_ @@ -2942,33 +3169,13 @@ BankswitchHome:: ld a, [H_LOADEDROMBANK] ld [wBankswitchHomeSavedROMBank], a ld a, [wBankswitchHomeTemp] - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret BankswitchBack:: ; returns from BankswitchHome ld a, [wBankswitchHomeSavedROMBank] - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - ret - -Bankswitch:: -; self-contained bankswitch, use this when not in the home bank -; switches to the bank in b - ld a, [H_LOADEDROMBANK] - push af - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - ld bc, .Return - push bc - jp hl -.Return - pop bc - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret ; displays yes/no choice @@ -2978,7 +3185,7 @@ YesNoChoice:: call InitYesNoTextBoxParameters jr DisplayYesNoChoice -Func_35f4:: +Func_35f7:: ld a, TWO_OPTION_MENU ld [wTextBoxID], a call InitYesNoTextBoxParameters @@ -3104,7 +3311,7 @@ LoadTextBoxTilePatterns:: ld de, vChars2 + $600 ld bc, TextBoxGraphicsEnd - TextBoxGraphics ld a, BANK(TextBoxGraphics) - jp FarCopyData2 ; if LCD is off, transfer all at once + jp FarCopyData ; if LCD is off, transfer all at once .on ld de, TextBoxGraphics ld hl, vChars2 + $600 @@ -3120,29 +3327,13 @@ LoadHpBarAndStatusTilePatterns:: ld de, vChars2 + $620 ld bc, HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics ld a, BANK(HpBarAndStatusGraphics) - jp FarCopyData2 ; if LCD is off, transfer all at once + jp FarCopyData ; if LCD is off, transfer all at once .on ld de, HpBarAndStatusGraphics ld hl, vChars2 + $620 lb bc, BANK(HpBarAndStatusGraphics), (HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics) / $10 jp CopyVideoData ; if LCD is on, transfer during V-blank - -FillMemory:: -; Fill bc bytes at hl with a. - push de - ld d, a -.loop - ld a, d - ld [hli], a - dec bc - ld a, b - or c - jr nz, .loop - pop de - ret - - UncompressSpriteFromDE:: ; Decompress pic at a:de. ld hl, wSpriteInputPtr @@ -3155,8 +3346,7 @@ SaveScreenTilesToBuffer2:: coord hl, 0, 0 ld de, wTileMapBackup2 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT - call CopyData - ret + jp CopyData LoadScreenTilesFromBuffer2:: call LoadScreenTilesFromBuffer2DisableBGTransfer @@ -3171,8 +3361,7 @@ LoadScreenTilesFromBuffer2DisableBGTransfer:: ld hl, wTileMapBackup2 coord de, 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT - call CopyData - ret + jp CopyData SaveScreenTilesToBuffer1:: coord hl, 0, 0 @@ -3219,6 +3408,7 @@ WaitForSoundToFinish:: inc hl inc hl or [hl] + and a jr nz, .waitLoop pop hl ret @@ -3265,8 +3455,7 @@ GetName:: .otherEntries ;2-7 = OTHER ENTRIES ld a, [wPredefBank] - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ld a, [wNameListType] ;VariousNames' entryID dec a add a @@ -3313,8 +3502,7 @@ GetName:: pop bc pop hl pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret GetItemPrice:: @@ -3328,8 +3516,7 @@ GetItemPrice:: jr nz, .ok ld a, $f ; hardcoded Bank .ok - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ld hl, wItemPrices ld a, [hli] ld h, [hl] @@ -3351,15 +3538,11 @@ GetItemPrice:: ld [hItemPrice], a jr .done .getTMPrice - ld a, Bank(GetMachinePrice) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call GetMachinePrice + callbs GetMachinePrice .done ld de, hItemPrice pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + call BankswitchCommon ret ; copies a string from [de] to [wcf4b] @@ -3444,7 +3627,11 @@ WaitForTextScrollButtonPress:: ld a, [wTownMapSpriteBlinkingEnabled] and a jr z, .skipAnimation - call TownMapSpriteBlinkingAnimation + push de + push bc + callab TownMapSpriteBlinkingAnimation + pop bc + pop de .skipAnimation coord hl, 18, 16 call HandleDownArrowBlinkTiming @@ -3466,6 +3653,7 @@ ManualTextScroll:: cp LINK_STATE_BATTLING jr z, .inLinkBattle call WaitForTextScrollButtonPress + call WaitForSoundToFinish ld a, SFX_PRESS_AB jp PlaySound .inLinkBattle @@ -3500,15 +3688,7 @@ Divide:: push hl push de push bc - ld a, [H_LOADEDROMBANK] - push af - ld a, Bank(_Divide) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call _Divide - pop af - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + homecall _Divide pop bc pop de pop hl @@ -3598,10 +3778,10 @@ CalcStats:: .statsLoop inc c call CalcStat - ld a, [H_MULTIPLICAND+1] + ld a, [H_MULTIPLICAND + 1] ld [de], a inc de - ld a, [H_MULTIPLICAND+2] + ld a, [H_MULTIPLICAND + 2] ld [de], a inc de ld a, c @@ -3610,7 +3790,7 @@ CalcStats:: ret ; calculates stat c of current mon -; c: stat to calc (HP=1,Atk=2,Def=3,Spd=4,Spc=5) +; c: stat to calc (HP=1, Atk=2, Def=3, Spd=4, Spc=5) ; b: consider stat exp? ; hl: base ptr to stat exp values ([hl + 2*c - 1] and [hl + 2*c]) CalcStat:: @@ -3635,12 +3815,12 @@ CalcStat:: .statExpLoop ; calculates ceil(Sqrt(stat exp)) in b xor a ld [H_MULTIPLICAND], a - ld [H_MULTIPLICAND+1], a + ld [H_MULTIPLICAND + 1], a inc b ; increment current stat exp bonus ld a, b cp $ff jr z, .statExpDone - ld [H_MULTIPLICAND+2], a + ld [H_MULTIPLICAND + 2], a ld [H_MULTIPLIER], a call Multiply ld a, [hld] @@ -3729,9 +3909,9 @@ CalcStat:: jr nc, .noCarry2 inc d ; de = (Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4 .noCarry2 - ld [H_MULTIPLICAND+2], a + ld [H_MULTIPLICAND + 2], a ld a, d - ld [H_MULTIPLICAND+1], a + ld [H_MULTIPLICAND + 1], a xor a ld [H_MULTIPLICAND], a ld a, [wCurEnemyLVL] @@ -3739,10 +3919,10 @@ CalcStat:: call Multiply ; ((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level ld a, [H_MULTIPLICAND] ld [H_DIVIDEND], a - ld a, [H_MULTIPLICAND+1] - ld [H_DIVIDEND+1], a - ld a, [H_MULTIPLICAND+2] - ld [H_DIVIDEND+2], a + ld a, [H_MULTIPLICAND + 1] + ld [H_DIVIDEND + 1], a + ld a, [H_MULTIPLICAND + 2] + ld [H_DIVIDEND + 2], a ld a, $64 ld [H_DIVISOR], a ld a, $3 @@ -3754,38 +3934,38 @@ CalcStat:: jr nz, .notHPStat ld a, [wCurEnemyLVL] ld b, a - ld a, [H_MULTIPLICAND+2] + ld a, [H_MULTIPLICAND + 2] add b - ld [H_MULTIPLICAND+2], a + ld [H_MULTIPLICAND + 2], a jr nc, .noCarry3 - ld a, [H_MULTIPLICAND+1] + ld a, [H_MULTIPLICAND + 1] inc a - ld [H_MULTIPLICAND+1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level + ld [H_MULTIPLICAND + 1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level .noCarry3 - ld a, 10 ; +10 for HP stat + ld a, 10 ; + 10 for HP stat .notHPStat ld b, a - ld a, [H_MULTIPLICAND+2] + ld a, [H_MULTIPLICAND + 2] add b - ld [H_MULTIPLICAND+2], a + ld [H_MULTIPLICAND + 2], a jr nc, .noCarry4 - ld a, [H_MULTIPLICAND+1] + ld a, [H_MULTIPLICAND + 1] inc a ; non-HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + 5 - ld [H_MULTIPLICAND+1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level + 10 + ld [H_MULTIPLICAND + 1], a ; HP: (((Base + IV) * 2 + ceil(Sqrt(stat exp)) / 4) * Level) / 100 + Level + 10 .noCarry4 - ld a, [H_MULTIPLICAND+1] ; check for overflow (>999) + ld a, [H_MULTIPLICAND + 1] ; check for overflow (>999) cp 999 / $100 + 1 jr nc, .overflow cp 999 / $100 jr c, .noOverflow - ld a, [H_MULTIPLICAND+2] + ld a, [H_MULTIPLICAND + 2] cp 999 % $100 + 1 jr c, .noOverflow .overflow ld a, 999 / $100 ; overflow: cap at 999 - ld [H_MULTIPLICAND+1], a + ld [H_MULTIPLICAND + 1], a ld a, 999 % $100 - ld [H_MULTIPLICAND+2], a + ld [H_MULTIPLICAND + 2], a .noOverflow pop bc pop de @@ -3793,29 +3973,11 @@ CalcStat:: ret AddEnemyMonToPlayerParty:: - ld a, [H_LOADEDROMBANK] - push af - ld a, BANK(_AddEnemyMonToPlayerParty) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call _AddEnemyMonToPlayerParty - pop bc - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + homecall_sf _AddEnemyMonToPlayerParty ret MoveMon:: - ld a, [H_LOADEDROMBANK] - push af - ld a, BANK(_MoveMon) - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a - call _MoveMon - pop bc - ld a, b - ld [H_LOADEDROMBANK], a - ld [MBC1RomBank], a + homecall_sf _MoveMon ret ; skips a text entries, each of size NAME_LENGTH (like trainer name, OT name, rival name, ...) @@ -3893,7 +4055,7 @@ HandleMenuInput:: xor a ld [wPartyMenuAnimMonEnabled], a -HandleMenuInput_:: +HandleMenuInputPokemonSelection:: ld a, [H_DOWNARROWBLINKCNT1] push af ld a, [H_DOWNARROWBLINKCNT2] @@ -3941,6 +4103,8 @@ HandleMenuInput_:: ld [wCheckFor180DegreeTurn], a ld a, [hJoy5] ld b, a + bit 0, a ; pressed A key? + jr nz, .checkOtherKeys bit 6, a ; pressed Up key? jr z, .checkIfDownPressed .upPressed @@ -4026,15 +4190,13 @@ PlaceMenuCursor:: ld a, [wLastMenuItem] and a ; was the previous menu id 0? jr z, .checkForArrow1 + ld bc, 40 push af - ld a, [hFlags_0xFFF6] + ld a, [hFlags_0xFFFA] bit 1, a ; is the menu double spaced? jr z, .doubleSpaced1 ld bc, 20 - jr .getOldMenuItemScreenPosition .doubleSpaced1 - ld bc, 40 -.getOldMenuItemScreenPosition pop af .oldMenuItemLoop add hl, bc @@ -4052,15 +4214,13 @@ PlaceMenuCursor:: ld a, [wCurrentMenuItem] and a jr z, .checkForArrow2 + ld bc, 40 push af - ld a, [hFlags_0xFFF6] + ld a, [hFlags_0xFFFA] bit 1, a ; is the menu double spaced? jr z, .doubleSpaced2 ld bc, 20 - jr .getCurrentMenuItemScreenPosition .doubleSpaced2 - ld bc, 40 -.getCurrentMenuItemScreenPosition pop af .currentMenuItemLoop add hl, bc @@ -4184,6 +4344,16 @@ PrintText_NoCreatingTextBox:: coord bc, 1, 14 jp TextCommandProcessor +FarPrintText:: +; print text b:hl at (1, 14) + ld a, [H_LOADEDROMBANK] + push af + ld a, b + call BankswitchCommon + call PrintText + pop af + call BankswitchCommon + ret PrintNumber:: ; Print the c-digit, b-byte value at de. @@ -4453,6 +4623,8 @@ IsInRestOfArray:: scf ret +InitMapSprites:: + jpab _InitMapSprites RestoreScreenTilesAndReloadTilePatterns:: call ClearSprites @@ -4480,6 +4652,9 @@ GBPalNormal:: ld [rBGP], a ld a, %11010000 ; 3100 ld [rOBP0], a + call UpdateGBCPal_BGP + call UpdateGBCPal_OBP0 + call UpdateGBCPal_OBP1 ret GBPalWhiteOut:: @@ -4488,6 +4663,9 @@ GBPalWhiteOut:: ld [rBGP], a ld [rOBP0], a ld [rOBP1], a + call UpdateGBCPal_BGP + call UpdateGBCPal_OBP0 + call UpdateGBCPal_OBP1 ret @@ -4525,7 +4703,7 @@ ReloadMapSpriteTilePatterns:: xor a ld [wSpriteSetID], a call DisableLCD - callba InitMapSprites + call InitMapSprites call EnableLCD pop hl pop af @@ -4562,7 +4740,6 @@ GivePokemon:: ld [wMonDataLocation], a jpba _GivePokemon - Random:: ; Return a random number in a. ; For battles, use BattleRandom. @@ -4576,12 +4753,52 @@ Random:: pop hl ret +BankswitchCommon:: + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ret -INCLUDE "home/predef.asm" +Bankswitch:: +; self-contained bankswitch, use this when not in the home bank +; switches to the bank in b + ld a, [H_LOADEDROMBANK] + push af + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + call JumpToAddress + pop bc + ld a, b + ld [H_LOADEDROMBANK], a + ld [MBC1RomBank], a + ret +JumpToAddress:: + jp hl +SwitchSRAMBankAndLatchClockData:: + push af + ld a, $1 + ld [MBC1SRamBankingMode], a + ld a, SRAM_ENABLE + ld [MBC1SRamEnable], a + pop af + ld [MBC1SRamBank], a + ret + +PrepareRTCDataAndDisableSRAM:: + push af + ld a, $0 + ld [MBC1SRamBankingMode], a + ld [MBC1SRamEnable], a + pop af + ret + +INCLUDE "home/predef.asm" UpdateCinnabarGymGateTileBlocks:: - jpba UpdateCinnabarGymGateTileBlocks_ + callba UpdateCinnabarGymGateTileBlocks_ + ret ; again? + ;jp Bankswitch CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: ld a, [H_LOADEDROMBANK] @@ -4590,23 +4807,19 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: bit 0, a ; A button jr z, .nothingFound ; A button is pressed - ld a, Bank(CheckForHiddenObject) - ld [MBC1RomBank], a - ld [H_LOADEDROMBANK], a - call CheckForHiddenObject + callbs CheckForHiddenObject ld a, [$ffee] and a jr nz, .hiddenObjectNotFound - ld a, [wHiddenObjectFunctionRomBank] - ld [MBC1RomBank], a - ld [H_LOADEDROMBANK], a - ld de, .returnAddress - push de - jp hl -.returnAddress xor a + ld [$ffeb], a + ld a, [wHiddenObjectFunctionRomBank] + call BankswitchCommon + call JumpToAddress + ld a, [$ffeb] jr .done .hiddenObjectNotFound + predef GetTileAndCoordsInFrontOfPlayer callba PrintBookshelfText ld a, [$ffdb] and a @@ -4616,8 +4829,7 @@ CheckForHiddenObjectOrBookshelfOrCardKeyDoor:: .done ld [$ffeb], a pop af - ld [MBC1RomBank], a - ld [H_LOADEDROMBANK], a + call BankswitchCommon ret PrintPredefTextID:: @@ -4661,58 +4873,60 @@ const_value = 1 add_tx_pre AerodactylFossilText ; 09 add_tx_pre Route15UpstairsBinocularsText ; 0A add_tx_pre KabutopsFossilText ; 0B - add_tx_pre GymStatueText1 ; 0C - add_tx_pre GymStatueText2 ; 0D - add_tx_pre BookcaseText ; 0E - add_tx_pre ViridianCityPokecenterBenchGuyText ; 0F - add_tx_pre PewterCityPokecenterBenchGuyText ; 10 - add_tx_pre CeruleanCityPokecenterBenchGuyText ; 11 - add_tx_pre LavenderCityPokecenterBenchGuyText ; 12 - add_tx_pre VermilionCityPokecenterBenchGuyText ; 13 - add_tx_pre CeladonCityPokecenterBenchGuyText ; 14 - add_tx_pre CeladonCityHotelText ; 15 - add_tx_pre FuchsiaCityPokecenterBenchGuyText ; 16 - add_tx_pre CinnabarIslandPokecenterBenchGuyText ; 17 - add_tx_pre SaffronCityPokecenterBenchGuyText ; 18 - add_tx_pre MtMoonPokecenterBenchGuyText ; 19 - add_tx_pre RockTunnelPokecenterBenchGuyText ; 1A - add_tx_pre UnusedBenchGuyText1 ; 1B XXX unused - add_tx_pre UnusedBenchGuyText2 ; 1C XXX unused - add_tx_pre UnusedBenchGuyText3 ; 1D XXX unused - add_tx_pre UnusedPredefText ; 1E XXX unused - add_tx_pre PokemonCenterPCText ; 1F - add_tx_pre ViridianSchoolNotebook ; 20 - add_tx_pre ViridianSchoolBlackboard ; 21 - add_tx_pre JustAMomentText ; 22 - add_tx_pre OpenBillsPCText ; 23 - add_tx_pre FoundHiddenItemText ; 24 - add_tx_pre HiddenItemBagFullText ; 25 XXX unused - add_tx_pre VermilionGymTrashText ; 26 - add_tx_pre IndigoPlateauHQText ; 27 - add_tx_pre GameCornerOutOfOrderText ; 28 - add_tx_pre GameCornerOutToLunchText ; 29 - add_tx_pre GameCornerSomeonesKeysText ; 2A - add_tx_pre FoundHiddenCoinsText ; 2B - add_tx_pre DroppedHiddenCoinsText ; 2C - add_tx_pre BillsHouseMonitorText ; 2D - add_tx_pre BillsHouseInitiatedText ; 2E - add_tx_pre BillsHousePokemonList ; 2F - add_tx_pre MagazinesText ; 30 - add_tx_pre CinnabarGymQuiz ; 31 - add_tx_pre GameCornerNoCoinsText ; 32 - add_tx_pre GameCornerCoinCaseText ; 33 - add_tx_pre LinkCableHelp ; 34 - add_tx_pre TMNotebook ; 35 - add_tx_pre FightingDojoText ; 36 - add_tx_pre EnemiesOnEverySideText ; 37 - add_tx_pre WhatGoesAroundComesAroundText ; 38 - add_tx_pre NewBicycleText ; 39 - add_tx_pre IndigoPlateauStatues ; 3A - add_tx_pre VermilionGymTrashSuccessText1 ; 3B - add_tx_pre VermilionGymTrashSuccessText2 ; 3C XXX unused - add_tx_pre VermilionGymTrashSuccessText3 ; 3D - add_tx_pre VermilionGymTrashFailText ; 3E - add_tx_pre TownMapText ; 3F - add_tx_pre BookOrSculptureText ; 40 - add_tx_pre ElevatorText ; 41 - add_tx_pre PokemonStuffText ; 42 + add_tx_pre FanClubPicture1Text ; 0C + add_tx_pre FanClubPicture2Text ; 0D + add_tx_pre GymStatueText1 ; 0E + add_tx_pre GymStatueText2 ; 0F + add_tx_pre BookcaseText ; 10 + add_tx_pre ViridianCityPokecenterBenchGuyText ; 11 + add_tx_pre PewterCityPokecenterBenchGuyText ; 12 + add_tx_pre CeruleanCityPokecenterBenchGuyText ; 13 + add_tx_pre LavenderCityPokecenterBenchGuyText ; 14 + add_tx_pre VermilionCityPokecenterBenchGuyText ; 15 + add_tx_pre CeladonCityPokecenterBenchGuyText ; 16 + add_tx_pre CeladonCityHotelText ; 17 + add_tx_pre FuchsiaCityPokecenterBenchGuyText ; 18 + add_tx_pre CinnabarIslandPokecenterBenchGuyText ; 19 + add_tx_pre SaffronCityPokecenterBenchGuyText ; 1A + add_tx_pre MtMoonPokecenterBenchGuyText ; 1B + add_tx_pre RockTunnelPokecenterBenchGuyText ; 1C + add_tx_pre UnusedBenchGuyText1 ; 1D + add_tx_pre UnusedBenchGuyText2 ; 1E + add_tx_pre UnusedBenchGuyText3 ; 1F + add_tx_pre UnusedPredefText ; 20 + add_tx_pre PokemonCenterPCText ; 21 + add_tx_pre ViridianSchoolNotebook ; 22 + add_tx_pre ViridianSchoolBlackboard ; 23 + add_tx_pre JustAMomentText ; 24 + add_tx_pre OpenBillsPCText ; 25 + add_tx_pre FoundHiddenItemText ; 26 + add_tx_pre HiddenItemBagFullText ; 27 + add_tx_pre VermilionGymTrashText ; 28 + add_tx_pre IndigoPlateauHQText ; 29 + add_tx_pre GameCornerOutOfOrderText ; 2A + add_tx_pre GameCornerOutToLunchText ; 2B + add_tx_pre GameCornerSomeonesKeysText ; 2C + add_tx_pre FoundHiddenCoinsText ; 2D + add_tx_pre DroppedHiddenCoinsText ; 2E + add_tx_pre BillsHouseMonitorText ; 2F + add_tx_pre BillsHouseInitiatedText ; 30 + add_tx_pre BillsHousePokemonList ; 31 + add_tx_pre MagazinesText ; 32 + add_tx_pre CinnabarGymQuiz ; 33 + add_tx_pre GameCornerNoCoinsText ; 34 + add_tx_pre GameCornerCoinCaseText ; 35 + add_tx_pre LinkCableHelp ; 36 + add_tx_pre TMNotebook ; 37 + add_tx_pre FightingDojoText ; 38 + add_tx_pre EnemiesOnEverySideText ; 39 + add_tx_pre WhatGoesAroundComesAroundText ; 3A + add_tx_pre NewBicycleText ; 3B + add_tx_pre IndigoPlateauStatues ; 3C XXX unused + add_tx_pre VermilionGymTrashSuccessText1 ; 3D + add_tx_pre VermilionGymTrashSuccessText2 ; 3E + add_tx_pre VermilionGymTrashSuccessText3 ; 3F + add_tx_pre VermilionGymTrashFailText ; 40 + add_tx_pre TownMapText ; 41 + add_tx_pre BookOrSculptureText ; 42 + add_tx_pre ElevatorText ; 43 + add_tx_pre PokemonStuffText ; 44 |