Merge pull request #135 from YamaArashi/master

sync tileset WRAM labels
This commit is contained in:
YamaArashi 2016-06-12 11:51:59 -07:00 committed by GitHub
commit bfaabd08be
31 changed files with 412 additions and 375 deletions

View file

@ -147,9 +147,16 @@ charmap "ゅ", $E1
charmap "ょ", $E2 charmap "ょ", $E2
charmap "ー", $E3 charmap "ー", $E3
charmap "<pkmn>", $4A ; PkMn
charmap "@", $50 charmap "@", $50
charmap "<PLAYER>", $52
charmap "<RIVAL>", $53
charmap "#", $54 charmap "#", $54
;charmap "POKé", $54 ;charmap "POKé", $54
charmap "<TARGET>", $59
charmap "<USER>", $5A
charmap "", $71
charmap "″", $73
charmap "…", $75 charmap "…", $75
charmap "┌", $79 charmap "┌", $79
@ -233,6 +240,7 @@ charmap "'m", $E5
charmap "?", $E6 charmap "?", $E6
charmap "!", $E7 charmap "!", $E7
charmap ".", $E8 charmap ".", $E8
charmap "▷", $EC
charmap "▶", $ED charmap "▶", $ED
charmap "♂", $EF charmap "♂", $EF
charmap "¥", $F0 charmap "¥", $F0

View file

@ -30,3 +30,4 @@ INCLUDE "constants/tilesets.asm"
INCLUDE "constants/starter_mons.asm" INCLUDE "constants/starter_mons.asm"
INCLUDE "constants/event_constants.asm" INCLUDE "constants/event_constants.asm"
INCLUDE "constants/event_macros.asm" INCLUDE "constants/event_macros.asm"
INCLUDE "constants/text_constants.asm"

View file

@ -29,6 +29,16 @@ D_LEFT EQU %00100000
D_UP EQU %01000000 D_UP EQU %01000000
D_DOWN EQU %10000000 D_DOWN EQU %10000000
const_value set 0
const BIT_A_BUTTON
const BIT_B_BUTTON
const BIT_SELECT
const BIT_START
const BIT_D_RIGHT
const BIT_D_LEFT
const BIT_D_UP
const BIT_D_DOWN
SCREEN_WIDTH EQU 20 SCREEN_WIDTH EQU 20
SCREEN_HEIGHT EQU 18 SCREEN_HEIGHT EQU 18
@ -152,20 +162,6 @@ FLAG_RESET EQU 0
FLAG_SET EQU 1 FLAG_SET EQU 1
FLAG_TEST EQU 2 FLAG_TEST EQU 2
; special text IDs
TEXT_MON_FAINTED EQU $d0
TEXT_BLACKED_OUT EQU $d1
TEXT_REPEL_WORE_OFF EQU $d2
TEXT_SAFARI_GAME_OVER EQU $d3
; PrintNumber
BIT_LEFT_ALIGN EQU 6
BIT_LEADING_ZEROES EQU 7
LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN)
LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES)
; HP bar ; HP bar
HP_BAR_GREEN EQU 0 HP_BAR_GREEN EQU 0
HP_BAR_YELLOW EQU 1 HP_BAR_YELLOW EQU 1

View file

@ -0,0 +1,14 @@
; special text IDs
TEXT_MON_FAINTED EQU $d0
TEXT_BLACKED_OUT EQU $d1
TEXT_REPEL_WORE_OFF EQU $d2
TEXT_SAFARI_GAME_OVER EQU $d3
; PrintNumber
BIT_MONEY_SIGN EQU 5
BIT_LEFT_ALIGN EQU 6
BIT_LEADING_ZEROES EQU 7
MONEY_SIGN EQU (1 << BIT_MONEY_SIGN)
LEFT_ALIGN EQU (1 << BIT_LEFT_ALIGN)
LEADING_ZEROES EQU (1 << BIT_LEADING_ZEROES)

View file

@ -900,16 +900,16 @@ CableClub_Run:
call CableClub_DoBattleOrTrade call CableClub_DoBattleOrTrade
ld hl, Club_GFX ld hl, Club_GFX
ld a, h ld a, h
ld [wTileSetGFXPtr + 1], a ld [wTilesetGfxPtr + 1], a
ld a, l ld a, l
ld [wTileSetGFXPtr], a ld [wTilesetGfxPtr], a
ld a, Bank(Club_GFX) ld a, Bank(Club_GFX)
ld [wTileSetBank], a ld [wTilesetBank], a
ld hl, Club_Coll ld hl, Club_Coll
ld a, h ld a, h
ld [wTileSetCollisionPtr + 1], a ld [wTilesetCollisionPtr + 1], a
ld a, l ld a, l
ld [wTileSetCollisionPtr], a ld [wTilesetCollisionPtr], a
xor a xor a
ld [wGrassRate], a ld [wGrassRate], a
inc a ; LINK_STATE_IN_CABLE_CLUB inc a ; LINK_STATE_IN_CABLE_CLUB

View file

@ -199,7 +199,6 @@ MoveDownSmallStars:
add hl, de add hl, de
dec c dec c
jr nz, .innerLoop jr nz, .innerLoop
; Toggle the palette so that the lower star in the small stars tile blinks in ; Toggle the palette so that the lower star in the small stars tile blinks in
; and out. ; and out.
ld a, [rOBP1] ld a, [rOBP1]

View file

@ -58,8 +58,8 @@ AnimateHallOfFame:
ld c, 80 ld c, 80
call DelayFrames call DelayFrames
coord hl, 2, 13 coord hl, 2, 13
ld b, $3 ld b, 3
ld c, $e ld c, 14
call TextBoxBorder call TextBoxBorder
coord hl, 4, 15 coord hl, 4, 15
ld de, HallOfFameText ld de, HallOfFameText

View file

@ -695,7 +695,7 @@ ItemUseSurfboard:
ld hl,TilePairCollisionsWater ld hl,TilePairCollisionsWater
call CheckForTilePairCollisions call CheckForTilePairCollisions
jr c,.cannotStopSurfing jr c,.cannotStopSurfing
ld hl,wTileSetCollisionPtr ; pointer to list of passable tiles ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles
ld a,[hli] ld a,[hli]
ld h,[hl] ld h,[hl]
ld l,a ; hl now points to passable tiles ld l,a ; hl now points to passable tiles

View file

@ -589,9 +589,9 @@ CanWalkOntoTile:
and a and a
ret ret
.notScripted .notScripted
ld a, [wTileSetCollisionPtr] ld a, [wTilesetCollisionPtr]
ld l, a ld l, a
ld a, [wTileSetCollisionPtr+1] ld a, [wTilesetCollisionPtr+1]
ld h, a ld h, a
.tilePassableLoop .tilePassableLoop
ld a, [hli] ld a, [hli]

126
home.asm
View file

@ -117,7 +117,6 @@ INCLUDE "home/joypad.asm"
INCLUDE "data/map_header_pointers.asm" INCLUDE "data/map_header_pointers.asm"
INCLUDE "home/overworld.asm" INCLUDE "home/overworld.asm"
CheckForUserInterruption:: 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. ; Used only in the intro and title screen.
@ -255,7 +254,6 @@ DrawHPBar::
LoadMonData:: LoadMonData::
jpab LoadMonData_ jpab LoadMonData_
OverwritewMoves:: OverwritewMoves::
; Write c to [wMoves + b]. Unused. ; Write c to [wMoves + b]. Unused.
ld hl, wMoves ld hl, wMoves
@ -327,7 +325,7 @@ GetCryData::
add hl, bc add hl, bc
add hl, bc add hl, bc
ld a, Bank(CryData) ld a, BANK(CryData)
call BankswitchHome call BankswitchHome
ld a, [hli] ld a, [hli]
ld b, a ; cry id ld b, a ; cry id
@ -347,7 +345,6 @@ GetCryData::
add c add c
ret ret
DisplayPartyMenu:: DisplayPartyMenu::
ld a,[hTilesetType] ld a,[hTilesetType]
push af push af
@ -497,6 +494,7 @@ PrintStatusCondition::
ld [hl],"T" ld [hl],"T"
and a and a
ret ret
PrintStatusConditionNotFainted: PrintStatusConditionNotFainted:
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
@ -519,7 +517,7 @@ PrintLevel::
ld [hli],a ld [hli],a
ld c,2 ; number of digits ld c,2 ; number of digits
ld a,[wLoadedMonLevel] ; level ld a,[wLoadedMonLevel] ; level
cp a,100 cp 100
jr c,PrintLevelCommon jr c,PrintLevelCommon
; if level at least 100, write over the ":L" tile ; if level at least 100, write over the ":L" tile
dec hl dec hl
@ -569,25 +567,25 @@ GetMonHeader::
ld [wd11e],a ld [wd11e],a
ld de,FossilKabutopsPic ld de,FossilKabutopsPic
ld b,$66 ; size of Kabutops fossil and Ghost sprites ld b,$66 ; size of Kabutops fossil and Ghost sprites
cp a,FOSSIL_KABUTOPS ; Kabutops fossil cp FOSSIL_KABUTOPS ; Kabutops fossil
jr z,.specialID jr z,.specialID
ld de,GhostPic ld de,GhostPic
cp a,MON_GHOST ; Ghost cp MON_GHOST ; Ghost
jr z,.specialID jr z,.specialID
ld de,FossilAerodactylPic ld de,FossilAerodactylPic
ld b,$77 ; size of Aerodactyl fossil sprite ld b,$77 ; size of Aerodactyl fossil sprite
cp a,FOSSIL_AERODACTYL ; Aerodactyl fossil cp FOSSIL_AERODACTYL ; Aerodactyl fossil
jr z,.specialID jr z,.specialID
cp a,MEW cp a,MEW
jr z,.mew jr z,.mew
predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number
ld a,[wd11e] ld a,[wd11e]
dec a dec a
ld bc,MonBaseStatsEnd - MonBaseStats ld bc, MonBaseStatsEnd - MonBaseStats
ld hl,BaseStats ld hl,BaseStats
call AddNTimes call AddNTimes
ld de,wMonHeader ld de,wMonHeader
ld bc,MonBaseStatsEnd - MonBaseStats ld bc, MonBaseStatsEnd - MonBaseStats
call CopyData call CopyData
jr .done jr .done
.specialID .specialID
@ -703,7 +701,7 @@ PrintBCDDigit::
.skipCurrencySymbol .skipCurrencySymbol
res 7,b ; unset 7 to indicate that a nonzero digit has been reached res 7,b ; unset 7 to indicate that a nonzero digit has been reached
.outputDigit .outputDigit
add a,"0" add "0"
ld [hli],a ld [hli],a
jp PrintLetterDelay jp PrintLetterDelay
.zeroDigit .zeroDigit
@ -968,7 +966,6 @@ PokeCenterSignText::
db "@" db "@"
PickUpItemText:: PickUpItemText::
; XXX better label (what does predef $5C do?)
TX_ASM TX_ASM
predef PickUpItem predef PickUpItem
jp TextScriptEnd jp TextScriptEnd
@ -1000,15 +997,15 @@ ResetPlayerSpriteData_ClearSpriteData::
FadeOutAudio:: FadeOutAudio::
ld a, [wAudioFadeOutControl] ld a, [wAudioFadeOutControl]
and a and a ; currently fading out audio?
jr nz, .asm_28dc jr nz, .fadingOut
ld a, [wd72c] ld a, [wd72c]
bit 1, a bit 1, a
ret nz ret nz
ld a, $77 ld a, $77
ld [rNR50], a ld [rNR50], a
ret ret
.asm_28dc .fadingOut
ld a, [wAudioFadeOutCounter] ld a, [wAudioFadeOutCounter]
and a and a
jr z, .counterReachedZero jr z, .counterReachedZero
@ -1019,8 +1016,8 @@ FadeOutAudio::
ld a, [wAudioFadeOutCounterReloadValue] ld a, [wAudioFadeOutCounterReloadValue]
ld [wAudioFadeOutCounter], a ld [wAudioFadeOutCounter], a
ld a, [rNR50] ld a, [rNR50]
and a and a ; has the volume reached 0?
jr z, .asm_2903 jr z, .fadeOutComplete
ld b, a ld b, a
and $f and $f
dec a dec a
@ -1033,7 +1030,7 @@ FadeOutAudio::
or c or c
ld [rNR50], a ld [rNR50], a
ret ret
.asm_2903 .fadeOutComplete
ld a, [wAudioFadeOutControl] ld a, [wAudioFadeOutControl]
ld b, a ld b, a
xor a xor a
@ -1071,13 +1068,13 @@ DisplayTextID::
ld [wSpriteIndex],a ld [wSpriteIndex],a
and a and a
jp z,DisplayStartMenu jp z,DisplayStartMenu
cp a,TEXT_SAFARI_GAME_OVER cp TEXT_SAFARI_GAME_OVER
jp z,DisplaySafariGameOverText jp z,DisplaySafariGameOverText
cp a,TEXT_MON_FAINTED cp TEXT_MON_FAINTED
jp z,DisplayPokemonFaintedText jp z,DisplayPokemonFaintedText
cp a,TEXT_BLACKED_OUT cp TEXT_BLACKED_OUT
jp z,DisplayPlayerBlackedOutText jp z,DisplayPlayerBlackedOutText
cp a,TEXT_REPEL_WORE_OFF cp TEXT_REPEL_WORE_OFF
jp z,DisplayRepelWoreOffText jp z,DisplayRepelWoreOffText
ld a,[wNumSprites] ld a,[wNumSprites]
ld e,a ld e,a
@ -1116,24 +1113,24 @@ DisplayTextID::
ld l,a ; hl = address of the text ld l,a ; hl = address of the text
ld a,[hl] ; a = first byte of text ld a,[hl] ; a = first byte of text
; check first byte of text for special cases ; check first byte of text for special cases
cp a,$fe ; Pokemart NPC cp $fe ; Pokemart NPC
jp z,DisplayPokemartDialogue jp z,DisplayPokemartDialogue
cp a,$ff ; Pokemon Center NPC cp $ff ; Pokemon Center NPC
jp z,DisplayPokemonCenterDialogue jp z,DisplayPokemonCenterDialogue
cp a,$fc ; Item Storage PC cp $fc ; Item Storage PC
jp z,FuncTX_ItemStoragePC jp z,FuncTX_ItemStoragePC
cp a,$fd ; Bill's PC cp $fd ; Bill's PC
jp z,FuncTX_BillsPC jp z,FuncTX_BillsPC
cp a,$f9 ; Pokemon Center PC cp $f9 ; Pokemon Center PC
jp z,FuncTX_PokemonCenterPC jp z,FuncTX_PokemonCenterPC
cp a,$f5 ; Vending Machine cp $f5 ; Vending Machine
jr nz,.notVendingMachine jr nz,.notVendingMachine
callba VendingMachineMenu ; jump banks to vending machine routine callba VendingMachineMenu ; jump banks to vending machine routine
jr AfterDisplayingTextID jr AfterDisplayingTextID
.notVendingMachine .notVendingMachine
cp a,$f7 ; slot machine cp $f7 ; prize menu
jp z,FuncTX_SlotMachine jp z, FuncTX_GameCornerPrizeMenu
cp a,$f6 ; cable connection NPC in Pokemon Center cp $f6 ; cable connection NPC in Pokemon Center
jr nz,.notSpecialCase jr nz,.notSpecialCase
callab CableClubNPC callab CableClubNPC
jr AfterDisplayingTextID jr AfterDisplayingTextID
@ -1228,7 +1225,7 @@ LoadItemList::
ld a,[hli] ld a,[hli]
ld [de],a ld [de],a
inc de inc de
cp a,$ff cp $ff
jr nz,.loop jr nz,.loop
ret ret
@ -1382,7 +1379,7 @@ DisplayListMenuID::
ld a,$01 ; hardcoded bank ld a,$01 ; hardcoded bank
jr .bankswitch jr .bankswitch
.specialBattleType ; Old Man battle .specialBattleType ; Old Man battle
ld a, Bank(DisplayBattleMenu) ld a, BANK(DisplayBattleMenu)
.bankswitch .bankswitch
call BankswitchHome call BankswitchHome
ld hl,wd730 ld hl,wd730
@ -1411,7 +1408,7 @@ DisplayListMenuID::
ld a,1 ; max menu item ID is 1 if the list has less than 2 entries ld a,1 ; max menu item ID is 1 if the list has less than 2 entries
ld [wMenuWatchMovingOutOfBounds],a ld [wMenuWatchMovingOutOfBounds],a
ld a,[wListCount] ld a,[wListCount]
cp a,2 ; does the list have less than 2 entries? cp 2 ; does the list have less than 2 entries?
jr c,.setMenuVariables jr c,.setMenuVariables
ld a,2 ; max menu item ID is 2 if the list has at least 2 entries ld a,2 ; max menu item ID is 2 if the list has at least 2 entries
.setMenuVariables .setMenuVariables
@ -1481,7 +1478,7 @@ DisplayListMenuIDLoop::
ld a,c ld a,c
ld [wWhichPokemon],a ld [wWhichPokemon],a
ld a,[wListMenuID] ld a,[wListMenuID]
cp a,ITEMLISTMENU cp ITEMLISTMENU
jr nz,.skipMultiplying jr nz,.skipMultiplying
; if it's an item menu ; if it's an item menu
sla c ; item entries are 2 bytes long, so multiply by 2 sla c ; item entries are 2 bytes long, so multiply by 2
@ -1502,7 +1499,7 @@ DisplayListMenuIDLoop::
call GetItemPrice call GetItemPrice
pop hl pop hl
ld a,[wListMenuID] ld a,[wListMenuID]
cp a,ITEMLISTMENU cp ITEMLISTMENU
jr nz,.skipGettingQuantity jr nz,.skipGettingQuantity
; if it's an item menu ; if it's an item menu
inc hl inc hl
@ -1548,7 +1545,7 @@ DisplayListMenuIDLoop::
jr z,.upPressed jr z,.upPressed
.downPressed .downPressed
ld a,[hl] ld a,[hl]
add a,3 add 3
ld b,a ld b,a
ld a,[wListCount] ld a,[wListCount]
cp b ; will going down scroll past the Cancel button? cp b ; will going down scroll past the Cancel button?
@ -1568,7 +1565,7 @@ DisplayChooseQuantityMenu::
ld b,1 ; height ld b,1 ; height
ld c,3 ; width ld c,3 ; width
ld a,[wListMenuID] ld a,[wListMenuID]
cp a,PRICEDITEMLISTMENU cp PRICEDITEMLISTMENU
jr nz,.drawTextBox jr nz,.drawTextBox
; text box dimensions/coordinates for quantity and price ; text box dimensions/coordinates for quantity and price
coord hl, 7, 9 coord hl, 7, 9
@ -1578,7 +1575,7 @@ DisplayChooseQuantityMenu::
call TextBoxBorder call TextBoxBorder
coord hl, 16, 10 coord hl, 16, 10
ld a,[wListMenuID] ld a,[wListMenuID]
cp a,PRICEDITEMLISTMENU cp PRICEDITEMLISTMENU
jr nz,.printInitialQuantity jr nz,.printInitialQuantity
coord hl, 8, 10 coord hl, 8, 10
.printInitialQuantity .printInitialQuantity
@ -1622,7 +1619,7 @@ DisplayChooseQuantityMenu::
.handleNewQuantity .handleNewQuantity
coord hl, 17, 10 coord hl, 17, 10
ld a,[wListMenuID] ld a,[wListMenuID]
cp a,PRICEDITEMLISTMENU cp PRICEDITEMLISTMENU
jr nz,.printQuantity jr nz,.printQuantity
.printPrice .printPrice
ld c,$03 ld c,$03
@ -1716,7 +1713,7 @@ PrintListMenuEntries::
ld a,[wListScrollOffset] ld a,[wListScrollOffset]
ld c,a ld c,a
ld a,[wListMenuID] ld a,[wListMenuID]
cp a,ITEMLISTMENU cp ITEMLISTMENU
ld a,c ld a,c
jr nz,.skipMultiplying jr nz,.skipMultiplying
; if it's an item menu ; if it's an item menu
@ -1736,7 +1733,7 @@ PrintListMenuEntries::
ld [wWhichPokemon],a ld [wWhichPokemon],a
ld a,[de] ld a,[de]
ld [wd11e],a ld [wd11e],a
cp a,$ff cp $ff
jp z,.printCancelMenuItem jp z,.printCancelMenuItem
push bc push bc
push de push de
@ -1746,7 +1743,7 @@ PrintListMenuEntries::
ld a,[wListMenuID] ld a,[wListMenuID]
and a and a
jr z,.pokemonPCMenu jr z,.pokemonPCMenu
cp a,$01 cp MOVESLISTMENU
jr z,.movesMenu jr z,.movesMenu
.itemMenu .itemMenu
call GetItemName call GetItemName
@ -1834,7 +1831,7 @@ PrintListMenuEntries::
pop de pop de
inc de inc de
ld a,[wListMenuID] ld a,[wListMenuID]
cp a,ITEMLISTMENU cp ITEMLISTMENU
jr nz,.nextListEntry jr nz,.nextListEntry
.printItemQuantity .printItemQuantity
ld a,[wd11e] ld a,[wd11e]
@ -1991,7 +1988,6 @@ GetMachineName::
inc de inc de
ld a,"@" ld a,"@"
ld [de],a ld [de],a
pop af pop af
ld [wd11e],a ld [wd11e],a
pop bc pop bc
@ -2007,9 +2003,9 @@ HiddenPrefix::
; sets carry if item is HM, clears carry if item is not HM ; sets carry if item is HM, clears carry if item is not HM
; Input: a = item ID ; Input: a = item ID
IsItemHM:: IsItemHM::
cp a,HM_01 cp HM_01
jr c,.notHM jr c,.notHM
cp a,TM_01 cp TM_01
ret ret
.notHM .notHM
and a and a
@ -2189,6 +2185,7 @@ RunNPCMovementScript::
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a ld [MBC1RomBank], a
ret ret
.NPCMovementScriptPointerTables .NPCMovementScriptPointerTables
dw PalletMovementScriptPointerTable dw PalletMovementScriptPointerTable
dw PewterMuseumGuyMovementScriptPointerTable dw PewterMuseumGuyMovementScriptPointerTable
@ -2679,7 +2676,7 @@ FuncTX_BillsPC::
ld hl, BillsPC_ ld hl, BillsPC_
jr bankswitchAndContinue jr bankswitchAndContinue
FuncTX_SlotMachine:: FuncTX_GameCornerPrizeMenu::
; XXX find a better name for this function ; XXX find a better name for this function
; special_F7 ; special_F7
ld b,BANK(CeladonPrizeMenu) ld b,BANK(CeladonPrizeMenu)
@ -2752,7 +2749,7 @@ CheckCoords::
ld [wCoordIndex],a ld [wCoordIndex],a
.loop .loop
ld a,[hli] ld a,[hli]
cp a,$ff ; reached terminator? cp $ff ; reached terminator?
jr z,.notInArray jr z,.notInArray
push hl push hl
ld hl,wCoordIndex ld hl,wCoordIndex
@ -2871,7 +2868,7 @@ GetSpriteMovementByte1Pointer::
ld h,$C2 ld h,$C2
ld a,[H_SPRITEINDEX] ld a,[H_SPRITEINDEX]
swap a swap a
add a,6 add 6
ld l,a ld l,a
ret ret
@ -2924,7 +2921,6 @@ GetTrainerInformation::
GetTrainerName:: GetTrainerName::
jpba GetTrainerName_ jpba GetTrainerName_
HasEnoughMoney:: HasEnoughMoney::
; Check if the player has at least as much ; Check if the player has at least as much
; money as the 3-byte BCD value at hMoney. ; money as the 3-byte BCD value at hMoney.
@ -3006,12 +3002,13 @@ YesNoChoicePokeCenter::
lb bc, 8, 12 lb bc, 8, 12
jr DisplayYesNoChoice jr DisplayYesNoChoice
Func_361a:: WideYesNoChoice:: ; unused
call SaveScreenTilesToBuffer1 call SaveScreenTilesToBuffer1
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
lb bc, 8, 13 lb bc, 8, 13
DisplayYesNoChoice:: DisplayYesNoChoice::
ld a, TWO_OPTION_MENU ld a, TWO_OPTION_MENU
ld [wTextBoxID], a ld [wTextBoxID], a
@ -3045,7 +3042,7 @@ MoveSprite_::
ld [hli],a ld [hli],a
inc de inc de
inc c inc c
cp a,$FF ; have we reached the end of the movement data? cp $FF ; have we reached the end of the movement data?
jr nz,.loop jr nz,.loop
ld a,c ld a,c
@ -3066,7 +3063,7 @@ MoveSprite_::
; divides [hDividend2] by [hDivisor2] and stores the quotient in [hQuotient2] ; divides [hDividend2] by [hDivisor2] and stores the quotient in [hQuotient2]
DivideBytes:: DivideBytes::
push hl push hl
ld hl, $ffe7 ld hl, hQuotient2
xor a xor a
ld [hld], a ld [hld], a
ld a, [hld] ld a, [hld]
@ -3157,7 +3154,6 @@ UncompressSpriteFromDE::
ld [hl], d ld [hl], d
jp UncompressSpriteData jp UncompressSpriteData
SaveScreenTilesToBuffer2:: SaveScreenTilesToBuffer2::
coord hl, 0, 0 coord hl, 0, 0
ld de, wTileMapBackup2 ld de, wTileMapBackup2
@ -3199,7 +3195,7 @@ LoadScreenTilesFromBuffer1::
ret ret
DelayFrames:: DelayFrames::
; wait n frames, where n is the value in c ; wait c frames
call DelayFrame call DelayFrame
dec c dec c
jr nz,DelayFrames jr nz,DelayFrames
@ -3300,7 +3296,7 @@ GetName::
ld e,l ld e,l
.nextChar .nextChar
ld a,[hli] ld a,[hli]
cp a, "@" cp "@"
jr nz,.nextChar jr nz,.nextChar
inc c ;entry counter inc c ;entry counter
ld a,b ;wanted entry ld a,b ;wanted entry
@ -3332,9 +3328,9 @@ GetItemPrice::
ld a, [wListMenuID] ld a, [wListMenuID]
cp MOVESLISTMENU cp MOVESLISTMENU
ld a, BANK(ItemPrices) ld a, BANK(ItemPrices)
jr nz, .asm_37ed jr nz, .ok
ld a, $f ; hardcoded Bank ld a, $f ; hardcoded Bank
.asm_37ed .ok
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a ld [MBC1RomBank], a
ld hl, wItemPrices ld hl, wItemPrices
@ -3345,10 +3341,10 @@ GetItemPrice::
cp HM_01 cp HM_01
jr nc, .getTMPrice jr nc, .getTMPrice
ld bc, $3 ld bc, $3
.asm_3802 .loop
add hl, bc add hl, bc
dec a dec a
jr nz, .asm_3802 jr nz, .loop
dec hl dec hl
ld a, [hld] ld a, [hld]
ld [hItemPrice + 2], a ld [hItemPrice + 2], a
@ -3356,13 +3352,13 @@ GetItemPrice::
ld [hItemPrice + 1], a ld [hItemPrice + 1], a
ld a, [hl] ld a, [hl]
ld [hItemPrice], a ld [hItemPrice], a
jr .asm_381c jr .done
.getTMPrice .getTMPrice
ld a, Bank(GetMachinePrice) ld a, Bank(GetMachinePrice)
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a ld [MBC1RomBank], a
call GetMachinePrice call GetMachinePrice
.asm_381c .done
ld de, hItemPrice ld de, hItemPrice
pop af pop af
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
@ -4075,7 +4071,7 @@ PlaceMenuCursor::
jr nz,.currentMenuItemLoop jr nz,.currentMenuItemLoop
.checkForArrow2 .checkForArrow2
ld a,[hl] ld a,[hl]
cp a,"▶" ; has the right arrow already been placed? cp "▶" ; has the right arrow already been placed?
jr z,.skipSavingTile ; if so, don't lose the saved tile jr z,.skipSavingTile ; if so, don't lose the saved tile
ld [wTileBehindCursor],a ; save tile before overwriting with right arrow ld [wTileBehindCursor],a ; save tile before overwriting with right arrow
.skipSavingTile .skipSavingTile
@ -4656,6 +4652,8 @@ SetMapTextPointer::
ret ret
TextPredefs:: TextPredefs::
const_value = 1
add_tx_pre CardKeySuccessText ; 01 add_tx_pre CardKeySuccessText ; 01
add_tx_pre CardKeyFailText ; 02 add_tx_pre CardKeyFailText ; 02
add_tx_pre RedBedroomPCText ; 03 add_tx_pre RedBedroomPCText ; 03

View file

@ -1,7 +1,7 @@
; These routines manage gradual fading ; These routines manage gradual fading
; (e.g., entering a doorway) ; (e.g., entering a doorway)
LoadGBPal:: LoadGBPal::
ld a, [wMapPalOffset] ;tells if cur.map is dark (requires HM5_FLASH?) ld a, [wMapPalOffset] ;tells if wCurMap is dark (requires HM5_FLASH?)
ld b, a ld b, a
ld hl, FadePal4 ld hl, FadePal4
ld a, l ld a, l

View file

@ -59,7 +59,7 @@ OverworldLoopLessDelay::
res 3,[hl] res 3,[hl]
jp nz,WarpFound2 jp nz,WarpFound2
ld a,[wd732] ld a,[wd732]
and a,1 << 4 | 1 << 3 ; fly warp or dungeon warp and 1 << 4 | 1 << 3 ; fly warp or dungeon warp
jp nz,HandleFlyWarpOrDungeonWarp jp nz,HandleFlyWarpOrDungeonWarp
ld a,[wCurOpponent] ld a,[wCurOpponent]
and a and a
@ -133,7 +133,7 @@ OverworldLoopLessDelay::
ld hl,wFlags_0xcd60 ld hl,wFlags_0xcd60
res 2,[hl] res 2,[hl]
call UpdateSprites call UpdateSprites
ld a,1 ld a, 1
ld [wCheckFor180DegreeTurn],a ld [wCheckFor180DegreeTurn],a
ld a,[wPlayerMovingDirection] ; the direction that was pressed last time ld a,[wPlayerMovingDirection] ; the direction that was pressed last time
and a and a
@ -143,6 +143,7 @@ OverworldLoopLessDelay::
xor a xor a
ld [wPlayerMovingDirection],a ; zero the direction ld [wPlayerMovingDirection],a ; zero the direction
jp OverworldLoop jp OverworldLoop
.checkIfDownButtonIsPressed .checkIfDownButtonIsPressed
ld a,[hJoyHeld] ; current joypad state ld a,[hJoyHeld] ; current joypad state
bit 7,a ; down button bit 7,a ; down button
@ -151,6 +152,7 @@ OverworldLoopLessDelay::
ld [wSpriteStateData1 + 3],a ; delta Y ld [wSpriteStateData1 + 3],a ; delta Y
ld a,PLAYER_DIR_DOWN ld a,PLAYER_DIR_DOWN
jr .handleDirectionButtonPress jr .handleDirectionButtonPress
.checkIfUpButtonIsPressed .checkIfUpButtonIsPressed
bit 6,a ; up button bit 6,a ; up button
jr z,.checkIfLeftButtonIsPressed jr z,.checkIfLeftButtonIsPressed
@ -158,6 +160,7 @@ OverworldLoopLessDelay::
ld [wSpriteStateData1 + 3],a ; delta Y ld [wSpriteStateData1 + 3],a ; delta Y
ld a,PLAYER_DIR_UP ld a,PLAYER_DIR_UP
jr .handleDirectionButtonPress jr .handleDirectionButtonPress
.checkIfLeftButtonIsPressed .checkIfLeftButtonIsPressed
bit 5,a ; left button bit 5,a ; left button
jr z,.checkIfRightButtonIsPressed jr z,.checkIfRightButtonIsPressed
@ -165,11 +168,14 @@ OverworldLoopLessDelay::
ld [wSpriteStateData1 + 5],a ; delta X ld [wSpriteStateData1 + 5],a ; delta X
ld a,PLAYER_DIR_LEFT ld a,PLAYER_DIR_LEFT
jr .handleDirectionButtonPress jr .handleDirectionButtonPress
.checkIfRightButtonIsPressed .checkIfRightButtonIsPressed
bit 4,a ; right button bit 4,a ; right button
jr z,.noDirectionButtonsPressed jr z,.noDirectionButtonsPressed
ld a,1 ; PLAYER_DIR_RIGHT ld a, 1
ld [wSpriteStateData1 + 5],a ; delta X ld [wSpriteStateData1 + 5],a ; delta X
.handleDirectionButtonPress .handleDirectionButtonPress
ld [wPlayerDirection],a ; new direction ld [wPlayerDirection],a ; new direction
ld a,[wd730] ld a,[wd730]
@ -226,12 +232,13 @@ OverworldLoopLessDelay::
call NewBattle call NewBattle
jp c,.battleOccurred jp c,.battleOccurred
jp OverworldLoop jp OverworldLoop
.noDirectionChange .noDirectionChange
ld a,[wPlayerDirection] ; current direction ld a,[wPlayerDirection] ; current direction
ld [wPlayerMovingDirection],a ; save direction ld [wPlayerMovingDirection],a ; save direction
call UpdateSprites call UpdateSprites
ld a,[wWalkBikeSurfState] ld a,[wWalkBikeSurfState]
cp a,$02 ; surfing cp $02 ; surfing
jr z,.surfing jr z,.surfing
; not surfing ; not surfing
call CollisionCheckOnLand call CollisionCheckOnLand
@ -248,20 +255,24 @@ OverworldLoopLessDelay::
pop hl pop hl
jp c,CheckWarpsCollision jp c,CheckWarpsCollision
jp OverworldLoop jp OverworldLoop
.surfing .surfing
call CollisionCheckOnWater call CollisionCheckOnWater
jp c,OverworldLoop jp c,OverworldLoop
.noCollision .noCollision
ld a,$08 ld a,$08
ld [wWalkCounter],a ld [wWalkCounter],a
jr .moveAhead2 jr .moveAhead2
.moveAhead .moveAhead
ld a,[wd736] ld a,[wd736]
bit 7,a bit 7,a
jr z,.noSpinning jr z,.noSpinning
callba LoadSpinnerArrowTiles ; spin while moving callba LoadSpinnerArrowTiles
.noSpinning .noSpinning
call UpdateSprites call UpdateSprites
.moveAhead2 .moveAhead2
ld hl,wFlags_0xcd60 ld hl,wFlags_0xcd60
res 2,[hl] res 2,[hl]
@ -271,7 +282,7 @@ OverworldLoopLessDelay::
ld a,[wd736] ld a,[wd736]
bit 6,a ; jumping a ledge? bit 6,a ; jumping a ledge?
jr nz,.normalPlayerSpriteAdvancement jr nz,.normalPlayerSpriteAdvancement
call BikeSpeedup ; if riding a bike and not jumping a ledge call DoBikeSpeedup
.normalPlayerSpriteAdvancement .normalPlayerSpriteAdvancement
call AdvancePlayerSprite call AdvancePlayerSprite
ld a,[wWalkCounter] ld a,[wWalkCounter]
@ -323,14 +334,14 @@ OverworldLoopLessDelay::
xor a xor a
ld [hJoyHeld],a ld [hJoyHeld],a
ld a,[wCurMap] ld a,[wCurMap]
cp a,CINNABAR_GYM cp CINNABAR_GYM
jr nz,.notCinnabarGym jr nz,.notCinnabarGym
SetEvent EVENT_2A7 SetEvent EVENT_2A7
.notCinnabarGym .notCinnabarGym
ld hl,wd72e ld hl,wd72e
set 5,[hl] set 5,[hl]
ld a,[wCurMap] ld a,[wCurMap]
cp a,OAKS_LAB cp OAKS_LAB
jp z,.noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab jp z,.noFaintCheck ; no blacking out if the player lost to the rival in Oak's lab
callab AnyPartyAlive callab AnyPartyAlive
ld a,d ld a,d
@ -363,15 +374,15 @@ NewBattle::
ret ret
; function to make bikes twice as fast as walking ; function to make bikes twice as fast as walking
BikeSpeedup:: DoBikeSpeedup::
ld a,[wNPCMovementScriptPointerTableNum] ld a,[wNPCMovementScriptPointerTableNum]
and a and a
ret nz ret nz
ld a,[wCurMap] ld a,[wCurMap]
cp a,ROUTE_17 ; Cycling Road cp ROUTE_17 ; Cycling Road
jr nz,.goFaster jr nz,.goFaster
ld a,[hJoyHeld] ld a,[hJoyHeld]
and a,D_UP | D_LEFT | D_RIGHT and D_UP | D_LEFT | D_RIGHT
ret nz ret nz
.goFaster .goFaster
jp AdvancePlayerSprite jp AdvancePlayerSprite
@ -421,7 +432,7 @@ CheckWarpsNoCollisionLoop::
pop bc pop bc
pop de pop de
ld a,[hJoyHeld] ld a,[hJoyHeld]
and a,D_DOWN | D_UP | D_LEFT | D_RIGHT and D_DOWN | D_UP | D_LEFT | D_RIGHT
jr z,CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp jr z,CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp
jr WarpFound1 jr WarpFound1
@ -483,7 +494,7 @@ WarpFound2::
ld [wUnusedD366],a ; not read ld [wUnusedD366],a ; not read
ld a,[hWarpDestinationMap] ld a,[hWarpDestinationMap]
ld [wCurMap],a ld [wCurMap],a
cp a,ROCK_TUNNEL_1 cp ROCK_TUNNEL_1
jr nz,.notRockTunnel jr nz,.notRockTunnel
ld a,$06 ld a,$06
ld [wMapPalOffset],a ld [wMapPalOffset],a
@ -491,10 +502,12 @@ WarpFound2::
.notRockTunnel .notRockTunnel
call PlayMapChangeSound call PlayMapChangeSound
jr .done jr .done
; for maps that can have the 0xFF destination map, which means to return to the outside map; not all these maps are necessarily indoors, though
; for maps that can have the 0xFF destination map, which means to return to the outside map
; not all these maps are necessarily indoors, though
.indoorMaps .indoorMaps
ld a,[hWarpDestinationMap] ; destination map ld a,[hWarpDestinationMap] ; destination map
cp a,$ff cp $ff
jr z,.goBackOutside jr z,.goBackOutside
; if not going back to the previous map ; if not going back to the previous map
ld [wCurMap],a ld [wCurMap],a
@ -535,7 +548,7 @@ ContinueCheckWarpsNoCollisionLoop::
CheckMapConnections:: CheckMapConnections::
.checkWestMap .checkWestMap
ld a,[wXCoord] ld a,[wXCoord]
cp a,$ff cp $ff
jr nz,.checkEastMap jr nz,.checkEastMap
ld a,[wMapConn3Ptr] ld a,[wMapConn3Ptr]
ld [wCurMap],a ld [wCurMap],a
@ -555,7 +568,7 @@ CheckMapConnections::
jr z,.savePointer1 jr z,.savePointer1
.pointerAdjustmentLoop1 .pointerAdjustmentLoop1
ld a,[wWestConnectedMapWidth] ; width of connected map ld a,[wWestConnectedMapWidth] ; width of connected map
add a,MAP_BORDER * 2 add MAP_BORDER * 2
ld e,a ld e,a
ld d,0 ld d,0
ld b,0 ld b,0
@ -568,6 +581,7 @@ CheckMapConnections::
ld a,h ld a,h
ld [wCurrentTileBlockMapViewPointer + 1],a ld [wCurrentTileBlockMapViewPointer + 1],a
jp .loadNewMap jp .loadNewMap
.checkEastMap .checkEastMap
ld b,a ld b,a
ld a,[wCurrentMapWidth2] ; map width ld a,[wCurrentMapWidth2] ; map width
@ -591,7 +605,7 @@ CheckMapConnections::
jr z,.savePointer2 jr z,.savePointer2
.pointerAdjustmentLoop2 .pointerAdjustmentLoop2
ld a,[wEastConnectedMapWidth] ld a,[wEastConnectedMapWidth]
add a,MAP_BORDER * 2 add MAP_BORDER * 2
ld e,a ld e,a
ld d,0 ld d,0
ld b,0 ld b,0
@ -604,9 +618,10 @@ CheckMapConnections::
ld a,h ld a,h
ld [wCurrentTileBlockMapViewPointer + 1],a ld [wCurrentTileBlockMapViewPointer + 1],a
jp .loadNewMap jp .loadNewMap
.checkNorthMap .checkNorthMap
ld a,[wYCoord] ld a,[wYCoord]
cp a,$ff cp $ff
jr nz,.checkSouthMap jr nz,.checkSouthMap
ld a,[wMapConn1Ptr] ld a,[wMapConn1Ptr]
ld [wCurMap],a ld [wCurMap],a
@ -630,6 +645,7 @@ CheckMapConnections::
ld a,h ld a,h
ld [wCurrentTileBlockMapViewPointer + 1],a ld [wCurrentTileBlockMapViewPointer + 1],a
jp .loadNewMap jp .loadNewMap
.checkSouthMap .checkSouthMap
ld b,a ld b,a
ld a,[wCurrentMapHeight2] ld a,[wCurrentMapHeight2]
@ -666,13 +682,14 @@ CheckMapConnections::
callba InitMapSprites callba InitMapSprites
call LoadTileBlockMap call LoadTileBlockMap
jp OverworldLoopLessDelay jp OverworldLoopLessDelay
.didNotEnterConnectedMap .didNotEnterConnectedMap
jp OverworldLoop jp OverworldLoop
; function to play a sound when changing maps ; function to play a sound when changing maps
PlayMapChangeSound:: PlayMapChangeSound::
aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on aCoord 8, 8 ; upper left tile of the 4x4 square the player's sprite is standing on
cp a,$0b ; door tile in tileset 0 cp $0b ; door tile in tileset 0
jr nz,.didNotGoThroughDoor jr nz,.didNotGoThroughDoor
ld a,SFX_GO_INSIDE ld a,SFX_GO_INSIDE
jr .playSound jr .playSound
@ -854,13 +871,13 @@ INCLUDE "data/bike_riding_tilesets.asm"
; load the tile pattern data of the current tileset into VRAM ; load the tile pattern data of the current tileset into VRAM
LoadTilesetTilePatternData:: LoadTilesetTilePatternData::
ld a,[wTileSetGFXPtr] ld a,[wTilesetGfxPtr]
ld l,a ld l,a
ld a,[wTileSetGFXPtr + 1] ld a,[wTilesetGfxPtr + 1]
ld h,a ld h,a
ld de,vTileset ld de,vTileset
ld bc,$600 ld bc,$600
ld a,[wTileSetBank] ld a,[wTilesetBank]
jp FarCopyData2 jp FarCopyData2
; this loads the current maps complete tile map (which references blocks, not individual tiles) to C6E8 ; this loads the current maps complete tile map (which references blocks, not individual tiles) to C6E8
@ -883,7 +900,7 @@ LoadTileBlockMap::
ld hl,wOverworldMap ld hl,wOverworldMap
ld a,[wCurMapWidth] ld a,[wCurMapWidth]
ld [hMapWidth],a ld [hMapWidth],a
add a,MAP_BORDER * 2 ; east and west add MAP_BORDER * 2 ; east and west
ld [hMapStride],a ; map width + border ld [hMapStride],a ; map width + border
ld b,0 ld b,0
ld c,a ld c,a
@ -921,7 +938,7 @@ LoadTileBlockMap::
jr nz,.rowLoop jr nz,.rowLoop
.northConnection .northConnection
ld a,[wMapConn1Ptr] ld a,[wMapConn1Ptr]
cp a,$ff cp $ff
jr z,.southConnection jr z,.southConnection
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wNorthConnectionStripSrc] ld a,[wNorthConnectionStripSrc]
@ -939,7 +956,7 @@ LoadTileBlockMap::
call LoadNorthSouthConnectionsTileMap call LoadNorthSouthConnectionsTileMap
.southConnection .southConnection
ld a,[wMapConn2Ptr] ld a,[wMapConn2Ptr]
cp a,$ff cp $ff
jr z,.westConnection jr z,.westConnection
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wSouthConnectionStripSrc] ld a,[wSouthConnectionStripSrc]
@ -957,7 +974,7 @@ LoadTileBlockMap::
call LoadNorthSouthConnectionsTileMap call LoadNorthSouthConnectionsTileMap
.westConnection .westConnection
ld a,[wMapConn3Ptr] ld a,[wMapConn3Ptr]
cp a,$ff cp $ff
jr z,.eastConnection jr z,.eastConnection
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wWestConnectionStripSrc] ld a,[wWestConnectionStripSrc]
@ -975,7 +992,7 @@ LoadTileBlockMap::
call LoadEastWestConnectionsTileMap call LoadEastWestConnectionsTileMap
.eastConnection .eastConnection
ld a,[wMapConn4Ptr] ld a,[wMapConn4Ptr]
cp a,$ff cp $ff
jr z,.done jr z,.done
call SwitchToMapRomBank call SwitchToMapRomBank
ld a,[wEastConnectionStripSrc] ld a,[wEastConnectionStripSrc]
@ -1016,7 +1033,7 @@ LoadNorthSouthConnectionsTileMap::
inc h inc h
.noCarry1 .noCarry1
ld a,[wCurMapWidth] ld a,[wCurMapWidth]
add a,MAP_BORDER * 2 add MAP_BORDER * 2
add e add e
ld e,a ld e,a
jr nc,.noCarry2 jr nc,.noCarry2
@ -1045,7 +1062,7 @@ LoadEastWestConnectionsTileMap::
inc h inc h
.noCarry1 .noCarry1
ld a,[wCurMapWidth] ld a,[wCurMapWidth]
add a,MAP_BORDER * 2 add MAP_BORDER * 2
add e add e
ld e,a ld e,a
jr nc,.noCarry2 jr nc,.noCarry2
@ -1100,7 +1117,7 @@ IsSpriteOrSignInFrontOfPlayer::
; check if the player is front of a counter in a pokemon center, pokemart, etc. and if so, extend the range at which he can talk to the NPC ; check if the player is front of a counter in a pokemon center, pokemart, etc. and if so, extend the range at which he can talk to the NPC
.extendRangeOverCounter .extendRangeOverCounter
predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player in c predef GetTileAndCoordsInFrontOfPlayer ; get the tile in front of the player in c
ld hl,wTileSetTalkingOverTiles ; list of tiles that extend talking range (counter tiles) ld hl,wTilesetTalkingOverTiles ; list of tiles that extend talking range (counter tiles)
ld b,3 ld b,3
ld d,$20 ; talking range in pixels (long range) ld d,$20 ; talking range in pixels (long range)
.counterTilesLoop .counterTilesLoop
@ -1126,6 +1143,7 @@ IsSpriteInFrontOfPlayer2::
ld b,a ld b,a
ld a,PLAYER_DIR_UP ld a,PLAYER_DIR_UP
jr .doneCheckingDirection jr .doneCheckingDirection
.checkIfPlayerFacingDown .checkIfPlayerFacingDown
cp SPRITE_FACING_DOWN cp SPRITE_FACING_DOWN
jr nz,.checkIfPlayerFacingRight jr nz,.checkIfPlayerFacingRight
@ -1135,6 +1153,7 @@ IsSpriteInFrontOfPlayer2::
ld b,a ld b,a
ld a,PLAYER_DIR_DOWN ld a,PLAYER_DIR_DOWN
jr .doneCheckingDirection jr .doneCheckingDirection
.checkIfPlayerFacingRight .checkIfPlayerFacingRight
cp SPRITE_FACING_RIGHT cp SPRITE_FACING_RIGHT
jr nz,.playerFacingLeft jr nz,.playerFacingLeft
@ -1144,6 +1163,7 @@ IsSpriteInFrontOfPlayer2::
ld c,a ld c,a
ld a,PLAYER_DIR_RIGHT ld a,PLAYER_DIR_RIGHT
jr .doneCheckingDirection jr .doneCheckingDirection
.playerFacingLeft .playerFacingLeft
; facing left ; facing left
ld a,c ld a,c
@ -1225,7 +1245,7 @@ CollisionCheckOnLand::
jr nc,.noCollision jr nc,.noCollision
.collision .collision
ld a,[wChannelSoundIDs + CH4] ld a,[wChannelSoundIDs + CH4]
cp a,SFX_COLLISION ; check if collision sound is already playing cp SFX_COLLISION ; check if collision sound is already playing
jr z,.setCarry jr z,.setCarry
ld a,SFX_COLLISION ld a,SFX_COLLISION
call PlaySound ; play collision sound (if it's not already playing) call PlaySound ; play collision sound (if it's not already playing)
@ -1242,7 +1262,7 @@ CheckTilePassable::
predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player predef GetTileAndCoordsInFrontOfPlayer ; get tile in front of player
ld a,[wTileInFrontOfPlayer] ; tile in front of player ld a,[wTileInFrontOfPlayer] ; tile in front of player
ld c,a ld c,a
ld hl,wTileSetCollisionPtr ; pointer to list of passable tiles ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles
ld a,[hli] ld a,[hli]
ld h,[hl] ld h,[hl]
ld l,a ; hl now points to passable tiles ld l,a ; hl now points to passable tiles
@ -1287,7 +1307,7 @@ CheckForTilePairCollisions::
ld a,[wCurMapTileset] ; tileset number ld a,[wCurMapTileset] ; tileset number
ld b,a ld b,a
ld a,[hli] ld a,[hli]
cp a,$ff cp $ff
jr z,.noMatch jr z,.noMatch
cp b cp b
jr z,.tilesetMatches jr z,.tilesetMatches
@ -1354,7 +1374,7 @@ TilePairCollisionsWater::
LoadCurrentMapView:: LoadCurrentMapView::
ld a,[H_LOADEDROMBANK] ld a,[H_LOADEDROMBANK]
push af push af
ld a,[wTileSetBank] ; tile data ROM bank ld a,[wTilesetBank] ; tile data ROM bank
ld [H_LOADEDROMBANK],a ld [H_LOADEDROMBANK],a
ld [MBC1RomBank],a ; switch to ROM bank that contains tile data ld [MBC1RomBank],a ; switch to ROM bank that contains tile data
ld a,[wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view ld a,[wCurrentTileBlockMapViewPointer] ; address of upper left corner of current map view
@ -1387,7 +1407,7 @@ LoadCurrentMapView::
; update tile block map pointer to next row's address ; update tile block map pointer to next row's address
pop de pop de
ld a,[wCurMapWidth] ld a,[wCurMapWidth]
add a,MAP_BORDER * 2 add MAP_BORDER * 2
add e add e
ld e,a ld e,a
jr nc,.noCarry jr nc,.noCarry
@ -1722,8 +1742,8 @@ ScheduleSouthRowRedraw::
ld bc,$0200 ld bc,$0200
add hl,bc add hl,bc
ld a,h ld a,h
and a,$03 and $03
or a,$98 or $98
ld [hRedrawRowOrColumnDest + 1],a ld [hRedrawRowOrColumnDest + 1],a
ld a,l ld a,l
ld [hRedrawRowOrColumnDest],a ld [hRedrawRowOrColumnDest],a
@ -1736,11 +1756,11 @@ ScheduleEastColumnRedraw::
call ScheduleColumnRedrawHelper call ScheduleColumnRedrawHelper
ld a,[wMapViewVRAMPointer] ld a,[wMapViewVRAMPointer]
ld c,a ld c,a
and a,$e0 and $e0
ld b,a ld b,a
ld a,c ld a,c
add a,18 add 18
and a,$1f and $1f
or b or b
ld [hRedrawRowOrColumnDest],a ld [hRedrawRowOrColumnDest],a
ld a,[wMapViewVRAMPointer + 1] ld a,[wMapViewVRAMPointer + 1]
@ -1784,17 +1804,17 @@ ScheduleWestColumnRedraw::
; Input: c = tile block ID, hl = destination address ; Input: c = tile block ID, hl = destination address
DrawTileBlock:: DrawTileBlock::
push hl push hl
ld a,[wTileSetBlocksPtr] ; pointer to tiles ld a,[wTilesetBlocksPtr] ; pointer to tiles
ld l,a ld l,a
ld a,[wTileSetBlocksPtr + 1] ld a,[wTilesetBlocksPtr + 1]
ld h,a ld h,a
ld a,c ld a,c
swap a swap a
ld b,a ld b,a
and a,$f0 and $f0
ld c,a ld c,a
ld a,b ld a,b
and a,$0f and $0f
ld b,a ; bc = tile block ID * 0x10 ld b,a ; bc = tile block ID * 0x10
add hl,bc add hl,bc
ld d,h ld d,h
@ -1833,10 +1853,10 @@ JoypadOverworld::
bit 3,a ; check if a trainer wants a challenge bit 3,a ; check if a trainer wants a challenge
jr nz,.notForcedDownwards jr nz,.notForcedDownwards
ld a,[wCurMap] ld a,[wCurMap]
cp a,ROUTE_17 ; Cycling Road cp ROUTE_17 ; Cycling Road
jr nz,.notForcedDownwards jr nz,.notForcedDownwards
ld a,[hJoyHeld] ld a,[hJoyHeld]
and a,D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON and D_DOWN | D_UP | D_LEFT | D_RIGHT | B_BUTTON | A_BUTTON
jr nz,.notForcedDownwards jr nz,.notForcedDownwards
ld a,D_DOWN ld a,D_DOWN
ld [hJoyHeld],a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press ld [hJoyHeld],a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press
@ -1868,6 +1888,7 @@ JoypadOverworld::
ld [hJoyPressed],a ld [hJoyPressed],a
ld [hJoyReleased],a ld [hJoyReleased],a
ret ret
; if done simulating button presses ; if done simulating button presses
.doneSimulating .doneSimulating
xor a xor a
@ -1878,7 +1899,7 @@ JoypadOverworld::
ld [hJoyHeld],a ld [hJoyHeld],a
ld hl,wd736 ld hl,wd736
ld a,[hl] ld a,[hl]
and a,$f8 and $f8
ld [hl],a ld [hl],a
ld hl,wd730 ld hl,wd730
res 7,[hl] res 7,[hl]
@ -1915,7 +1936,7 @@ CollisionCheckOnWater::
jr z,.noCollision ; keep surfing jr z,.noCollision ; keep surfing
; check if the [land] tile in front of the player is passable ; check if the [land] tile in front of the player is passable
.checkIfNextTileIsPassable .checkIfNextTileIsPassable
ld hl,wTileSetCollisionPtr ; pointer to list of passable tiles ld hl,wTilesetCollisionPtr ; pointer to list of passable tiles
ld a,[hli] ld a,[hli]
ld h,[hl] ld h,[hl]
ld l,a ld l,a
@ -1928,7 +1949,7 @@ CollisionCheckOnWater::
jr .loop jr .loop
.collision .collision
ld a,[wChannelSoundIDs + CH4] ld a,[wChannelSoundIDs + CH4]
cp a,SFX_COLLISION ; check if collision sound is already playing cp SFX_COLLISION ; check if collision sound is already playing
jr z,.setCarry jr z,.setCarry
ld a,SFX_COLLISION ld a,SFX_COLLISION
call PlaySound ; play collision sound (if it's not already playing) call PlaySound ; play collision sound (if it's not already playing)
@ -2386,7 +2407,7 @@ IgnoreInputForHalfSecond:
ld [wIgnoreInputCounter], a ld [wIgnoreInputCounter], a
ld hl, wd730 ld hl, wd730
ld a, [hl] ld a, [hl]
or $26 or %00100110
ld [hl], a ; set ignore input bit ld [hl], a ; set ignore input bit
ret ret

View file

@ -531,9 +531,9 @@ ReverseNybble::
ld de, NybbleReverseTable ld de, NybbleReverseTable
add e add e
ld e, a ld e, a
jr nc, .asm_283f jr nc, .noCarry
inc d inc d
.asm_283f .noCarry
ld a, [de] ld a, [de]
ret ret

View file

@ -91,79 +91,79 @@ Serial_ExchangeByte::
ld [hSerialReceivedNewData], a ld [hSerialReceivedNewData], a
ld a, [hSerialConnectionStatus] ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK cp USING_INTERNAL_CLOCK
jr nz, .asm_21a7 jr nz, .loop
ld a, START_TRANSFER_INTERNAL_CLOCK ld a, START_TRANSFER_INTERNAL_CLOCK
ld [rSC], a ld [rSC], a
.asm_21a7 .loop
ld a, [hSerialReceivedNewData] ld a, [hSerialReceivedNewData]
and a and a
jr nz, .asm_21f1 jr nz, .ok
ld a, [hSerialConnectionStatus] ld a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK cp USING_EXTERNAL_CLOCK
jr nz, .asm_21cc jr nz, .doNotIncrementUnknownCounter
call IsUnknownCounterZero call IsUnknownCounterZero
jr z, .asm_21cc jr z, .doNotIncrementUnknownCounter
call WaitLoop_15Iterations call WaitLoop_15Iterations
push hl push hl
ld hl, wUnknownSerialCounter + 1 ld hl, wUnknownSerialCounter + 1
inc [hl] inc [hl]
jr nz, .asm_21c3 jr nz, .noCarry
dec hl dec hl
inc [hl] inc [hl]
.asm_21c3 .noCarry
pop hl pop hl
call IsUnknownCounterZero call IsUnknownCounterZero
jr nz, .asm_21a7 jr nz, .loop
jp SetUnknownCounterToFFFF jp SetUnknownCounterToFFFF
.asm_21cc .doNotIncrementUnknownCounter
ld a, [rIE] ld a, [rIE]
and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
cp (1 << SERIAL) cp (1 << SERIAL)
jr nz, .asm_21a7 jr nz, .loop
ld a, [wUnknownSerialCounter2] ld a, [wUnknownSerialCounter2]
dec a dec a
ld [wUnknownSerialCounter2], a ld [wUnknownSerialCounter2], a
jr nz, .asm_21a7 jr nz, .loop
ld a, [wUnknownSerialCounter2 + 1] ld a, [wUnknownSerialCounter2 + 1]
dec a dec a
ld [wUnknownSerialCounter2 + 1], a ld [wUnknownSerialCounter2 + 1], a
jr nz, .asm_21a7 jr nz, .loop
ld a, [hSerialConnectionStatus] ld a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK cp USING_EXTERNAL_CLOCK
jr z, .asm_21f1 jr z, .ok
ld a, 255 ld a, 255
.waitLoop .waitLoop
dec a dec a
jr nz, .waitLoop jr nz, .waitLoop
.asm_21f1 .ok
xor a xor a
ld [hSerialReceivedNewData], a ld [hSerialReceivedNewData], a
ld a, [rIE] ld a, [rIE]
and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
sub (1 << SERIAL) sub (1 << SERIAL)
jr nz, .asm_2204 jr nz, .skipReloadingUnknownCounter2
ld [wUnknownSerialCounter2], a ld [wUnknownSerialCounter2], a
ld a, $50 ld a, $50
ld [wUnknownSerialCounter2 + 1], a ld [wUnknownSerialCounter2 + 1], a
.asm_2204 .skipReloadingUnknownCounter2
ld a, [hSerialReceiveData] ld a, [hSerialReceiveData]
cp SERIAL_NO_DATA_BYTE cp SERIAL_NO_DATA_BYTE
ret nz ret nz
call IsUnknownCounterZero call IsUnknownCounterZero
jr z, .asm_221f jr z, .done
push hl push hl
ld hl, wUnknownSerialCounter + 1 ld hl, wUnknownSerialCounter + 1
ld a, [hl] ld a, [hl]
dec a dec a
ld [hld], a ld [hld], a
inc a inc a
jr nz, .asm_2219 jr nz, .noBorrow
dec [hl] dec [hl]
.asm_2219 .noBorrow
pop hl pop hl
call IsUnknownCounterZero call IsUnknownCounterZero
jr z, SetUnknownCounterToFFFF jr z, SetUnknownCounterToFFFF
.asm_221f .done
ld a, [rIE] ld a, [rIE]
and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK)
cp (1 << SERIAL) cp (1 << SERIAL)

View file

@ -27,7 +27,7 @@ VBlank::
call VBlankCopyDouble call VBlankCopyDouble
call UpdateMovingBgTiles call UpdateMovingBgTiles
call $ff80 ; hOAMDMA call $ff80 ; hOAMDMA
ld a, Bank(PrepareOAMData) ld a, BANK(PrepareOAMData)
ld [H_LOADEDROMBANK], a ld [H_LOADEDROMBANK], a
ld [MBC1RomBank], a ld [MBC1RomBank], a
call PrepareOAMData call PrepareOAMData

View file

@ -33,13 +33,13 @@ ClearBgMap::
jr nz,.loop jr nz,.loop
ret ret
RedrawRowOrColumn::
; This function redraws a BG row of height 2 or a BG column of width 2. ; This function redraws a BG row of height 2 or a BG column of width 2.
; One of its main uses is redrawing the row or column that will be exposed upon ; One of its main uses is redrawing the row or column that will be exposed upon
; scrolling the BG when the player takes a step. Redrawing only the exposed ; scrolling the BG when the player takes a step. Redrawing only the exposed
; row or column is more efficient than redrawing the entire screen. ; row or column is more efficient than redrawing the entire screen.
; However, this function is also called repeatedly to redraw the whole screen ; However, this function is also called repeatedly to redraw the whole screen
; when necessary. It is also used in trade animation and elevator code. ; when necessary. It is also used in trade animation and elevator code.
RedrawRowOrColumn::
ld a,[hRedrawRowOrColumnMode] ld a,[hRedrawRowOrColumnMode]
and a and a
ret z ret z

View file

@ -2435,7 +2435,7 @@ GetTileTwoStepsInFrontOfPlayer:
CheckForCollisionWhenPushingBoulder: CheckForCollisionWhenPushingBoulder:
call GetTileTwoStepsInFrontOfPlayer call GetTileTwoStepsInFrontOfPlayer
ld hl, wTileSetCollisionPtr ld hl, wTilesetCollisionPtr
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -2665,7 +2665,7 @@ LoadTilesetHeader:
ld e, a ld e, a
ld hl, Tilesets ld hl, Tilesets
add hl, de add hl, de
ld de, wTileSetBank ld de, wTilesetBank
ld c, $b ld c, $b
.copyTilesetHeaderLoop .copyTilesetHeaderLoop
ld a, [hli] ld a, [hli]

305
text.asm

File diff suppressed because it is too large Load diff

View file

@ -25,7 +25,7 @@ _BikeShopText_1d81f::
prompt prompt
_BikeShopText_1d824:: _BikeShopText_1d824::
text $52, " exchanged" text "<PLAYER> exchanged"
line "the BIKE VOUCHER" line "the BIKE VOUCHER"
cont "for a BICYCLE.@@" cont "for a BICYCLE.@@"

View file

@ -8,7 +8,7 @@ _TM18PreReceiveText::
prompt prompt
_ReceivedTM18Text:: _ReceivedTM18Text::
text $52, " received" text "<PLAYER> received"
line "@" line "@"
TX_RAM wcf4b TX_RAM wcf4b
text "!@@" text "!@@"

View file

@ -83,13 +83,13 @@ FanClubChairStoryText::
prompt prompt
ReceivedBikeVoucherText:: ReceivedBikeVoucherText::
text $52, " received" text "<PLAYER> received"
line "a @" line "a @"
TX_RAM wcf4b TX_RAM wcf4b
text "!@@" text "!@@"
ExplainBikeVoucherText:: ExplainBikeVoucherText::
db $0 text ""
para "Exchange that for" para "Exchange that for"
line "a BICYCLE!" line "a BICYCLE!"
@ -111,7 +111,7 @@ FanClubNoStoryText::
done done
FanClubChairFinalText:: FanClubChairFinalText::
text "Hello, ", $52, "!" text "Hello, <PLAYER>!"
para "Did you come see" para "Did you come see"
line "me about my" line "me about my"

View file

@ -1,7 +1,7 @@
_HallofFameRoomText1:: _HallofFameRoomText1::
text "OAK: Er-hem!" text "OAK: Er-hem!"
line "Congratulations" line "Congratulations"
cont $52, "!" cont "<PLAYER>!"
para "This floor is the" para "This floor is the"
line "#MON HALL OF" line "#MON HALL OF"
@ -16,13 +16,13 @@ _HallofFameRoomText1::
line "also recorded in" line "also recorded in"
cont "the HALL OF FAME!" cont "the HALL OF FAME!"
para $52, "! You have" para "<PLAYER>! You have"
line "endeavored hard" line "endeavored hard"
cont "to become the new" cont "to become the new"
cont "LEAGUE champion!" cont "LEAGUE champion!"
para "Congratulations," para "Congratulations,"
line $52, ", you and" line "<PLAYER>, you and"
cont "your #MON are" cont "your #MON are"
cont "HALL OF FAMERs!" cont "HALL OF FAMERs!"
done done

View file

@ -1,6 +1,6 @@
_LanceBeforeBattleText:: _LanceBeforeBattleText::
text "Ah! I heard about" text "Ah! I heard about"
line "you ", $52, "!" line "you <PLAYER>!"
para "I lead the ELITE" para "I lead the ELITE"
line "FOUR! You can" line "FOUR! You can"

View file

@ -81,7 +81,7 @@ _Museum1FText_5c28e::
prompt prompt
_ReceivedOldAmberText:: _ReceivedOldAmberText::
text $52, " received" text "<PLAYER> received"
line "OLD AMBER!@@" line "OLD AMBER!@@"
_Museum1FText_5c299:: _Museum1FText_5c299::

View file

@ -1,11 +1,11 @@
_OaksLabGaryText1:: _OaksLabGaryText1::
text $53,": Yo" text "<RIVAL>: Yo"
line $52,"! Gramps" line "<PLAYER>! Gramps"
cont "isn't around!" cont "isn't around!"
done done
_OaksLabText40:: _OaksLabText40::
text $53,": Heh, I" text "<RIVAL>: Heh, I"
line "don't need to be" line "don't need to be"
cont "greedy like you!" cont "greedy like you!"
@ -14,7 +14,7 @@ _OaksLabText40::
done done
_OaksLabText41:: _OaksLabText41::
text $53,": My" text "<RIVAL>: My"
line "#MON looks a" line "#MON looks a"
cont "lot stronger." cont "lot stronger."
done done
@ -60,7 +60,7 @@ _OaksLabLastMonText::
done done
_OaksLabText_1d2f0:: _OaksLabText_1d2f0::
text "OAK: Now, ", $52, "," text "OAK: Now, <PLAYER>,"
line "which #MON do" line "which #MON do"
cont "you want?" cont "you want?"
done done
@ -73,14 +73,14 @@ _OaksLabText_1d2f5::
done done
_OaksLabText_1d2fa:: _OaksLabText_1d2fa::
text "OAK: ", $52, "," text "OAK: <PLAYER>,"
line "raise your young" line "raise your young"
cont "#MON by making" cont "#MON by making"
cont "it fight!" cont "it fight!"
done done
_OaksLabDeliverParcelText1:: _OaksLabDeliverParcelText1::
text "OAK: Oh, ", $52, "!" text "OAK: Oh, <PLAYER>!"
para "How is my old" para "How is my old"
line "#MON?" line "#MON?"
@ -95,11 +95,11 @@ _OaksLabDeliverParcelText1::
para "What? You have" para "What? You have"
line "something for me?" line "something for me?"
para $52, " delivered" para "<PLAYER> delivered"
line "OAK's PARCEL.@@" line "OAK's PARCEL.@@"
_OaksLabDeliverParcelText2:: _OaksLabDeliverParcelText2::
db $0 text ""
para "Ah! This is the" para "Ah! This is the"
line "custom # BALL" line "custom # BALL"
cont "I ordered!" cont "I ordered!"
@ -109,7 +109,7 @@ _OaksLabDeliverParcelText2::
_OaksLabAroundWorldText:: _OaksLabAroundWorldText::
text "#MON around the" text "#MON around the"
line "world wait for" line "world wait for"
cont "you, ", $52, "!" cont "you, <PLAYER>!"
done done
_OaksLabGivePokeballsText1:: _OaksLabGivePokeballsText1::
@ -123,11 +123,11 @@ _OaksLabGivePokeballsText1::
cont "to capture wild" cont "to capture wild"
cont "#MON." cont "#MON."
para $52, " got 5" para "<PLAYER> got 5"
line "# BALLs!@@" line "# BALLs!@@"
_OaksLabGivePokeballsText2:: _OaksLabGivePokeballsText2::
db $0 text ""
para "When a wild" para "When a wild"
line "#MON appears," line "#MON appears,"
cont "it's fair game." cont "it's fair game."
@ -182,20 +182,20 @@ _OaksLabText_1d340::
done done
_OaksLabRivalWaitingText:: _OaksLabRivalWaitingText::
text $53, ": Gramps!" text "<RIVAL>: Gramps!"
line "I'm fed up with" line "I'm fed up with"
cont "waiting!" cont "waiting!"
done done
_OaksLabChooseMonText:: _OaksLabChooseMonText::
text "OAK: ", $53, "?" text "OAK: <RIVAL>?"
line "Let me think..." line "Let me think..."
para "Oh, that's right," para "Oh, that's right,"
line "I told you to" line "I told you to"
cont "come! Just wait!" cont "come! Just wait!"
para "Here, ", $52, "!" para "Here, <PLAYER>!"
para "There are 3" para "There are 3"
line "#MON here!" line "#MON here!"
@ -216,14 +216,14 @@ _OaksLabChooseMonText::
done done
_OaksLabRivalInterjectionText:: _OaksLabRivalInterjectionText::
text $53, ": Hey!" text "<RIVAL>: Hey!"
line "Gramps! What" line "Gramps! What"
cont "about me?" cont "about me?"
done done
_OaksLabBePatientText:: _OaksLabBePatientText::
text "OAK: Be patient!" text "OAK: Be patient!"
line $53, ", you can" line "<RIVAL>, you can"
cont "have one too!" cont "have one too!"
done done
@ -233,19 +233,19 @@ _OaksLabLeavingText::
done done
_OaksLabRivalPickingMonText:: _OaksLabRivalPickingMonText::
text $53, ": I'll take" text "<RIVAL>: I'll take"
line "this one, then!" line "this one, then!"
done done
_OaksLabRivalReceivedMonText:: _OaksLabRivalReceivedMonText::
text $53, " received" text "<RIVAL> received"
line "a @" line "a @"
TX_RAM wcd6d TX_RAM wcd6d
text "!@@" text "!@@"
_OaksLabRivalChallengeText:: _OaksLabRivalChallengeText::
text $53, ": Wait" text "<RIVAL>: Wait"
line $52, "!" line "<PLAYER>!"
cont "Let's check out" cont "Let's check out"
cont "our #MON!" cont "our #MON!"
@ -261,26 +261,26 @@ _OaksLabText_1d3be::
prompt prompt
_OaksLabText_1d3c3:: _OaksLabText_1d3c3::
text $53, ": Yeah! Am" text "<RIVAL>: Yeah! Am"
line "I great or what?" line "I great or what?"
prompt prompt
_OaksLabRivalToughenUpText:: _OaksLabRivalToughenUpText::
text $53, ": Okay!" text "<RIVAL>: Okay!"
line "I'll make my" line "I'll make my"
cont "#MON fight to" cont "#MON fight to"
cont "toughen it up!" cont "toughen it up!"
para $52, "! Gramps!" para "<PLAYER>! Gramps!"
line "Smell you later!" line "Smell you later!"
done done
_OaksLabText21:: _OaksLabText21::
text $53, ": Gramps!" text "<RIVAL>: Gramps!"
done done
_OaksLabText22:: _OaksLabText22::
text $53, ": What did" text "<RIVAL>: What did"
line "you call me for?" line "you call me for?"
done done
@ -305,11 +305,11 @@ _OaksLabText24::
done done
_OaksLabText25:: _OaksLabText25::
text "OAK: ", $52, " and" text "OAK: <PLAYER> and"
line $53, "! Take" line "<RIVAL>! Take"
cont "these with you!" cont "these with you!"
para $52, " got" para "<PLAYER> got"
line "#DEX from OAK!@@" line "#DEX from OAK!@@"
_OaksLabText26:: _OaksLabText26::
@ -336,11 +336,11 @@ _OaksLabText26::
done done
_OaksLabText27:: _OaksLabText27::
text $53, ": Alright" text "<RIVAL>: Alright"
line "Gramps! Leave it" line "Gramps! Leave it"
cont "all to me!" cont "all to me!"
para $52, ", I hate to" para "<PLAYER>, I hate to"
line "say it, but I" line "say it, but I"
cont "don't need you!" cont "don't need you!"
@ -350,7 +350,7 @@ _OaksLabText27::
para "I'll tell her not" para "I'll tell her not"
line "to lend you one," line "to lend you one,"
cont $52, "! Hahaha!" cont "<PLAYER>! Hahaha!"
done done
_OaksLabText_1d405:: _OaksLabText_1d405::

View file

@ -10,7 +10,7 @@ _MomWakeUpText::
done done
_MomHealText1:: _MomHealText1::
text "MOM: ",$52,"!" text "MOM: <PLAYER>!"
line "You should take a" line "You should take a"
cont "quick rest." cont "quick rest."
prompt prompt

View file

@ -60,7 +60,7 @@ _Route22RivalBeforeBattleText2::
cont "That's cool!" cont "That's cool!"
para "Then I'll whip you" para "Then I'll whip you"
line $52, " as a" line "<PLAYER> as a"
cont "warm up for" cont "warm up for"
cont "#MON LEAGUE!" cont "#MON LEAGUE!"
@ -88,8 +88,8 @@ _Route22RivalDefeatedText2::
prompt prompt
_Route22Text_511d0:: _Route22Text_511d0::
text $53, ": Hahaha!" text "<RIVAL>: Hahaha!"
line $52, "! That's" line "<PLAYER>! That's"
cont "your best? You're" cont "your best? You're"
cont "nowhere near as" cont "nowhere near as"
cont "good as me, pal!" cont "good as me, pal!"

View file

@ -58,7 +58,7 @@ _SilphCo11Text2::
done done
_SilphCo11Text3:: _SilphCo11Text3::
text "Ah ", $52, "!" text "Ah <PLAYER>!"
line "So we meet again!" line "So we meet again!"
para "The PRESIDENT and" para "The PRESIDENT and"

View file

@ -35,7 +35,7 @@ _SSAnneWelcomeText9::
prompt prompt
_SSAnneFlashedTicketText:: _SSAnneFlashedTicketText::
text $52, " flashed" text "<PLAYER> flashed"
line "the S.S.TICKET!" line "the S.S.TICKET!"
para "Great! Welcome to" para "Great! Welcome to"
@ -43,7 +43,7 @@ _SSAnneFlashedTicketText::
done done
_SSAnneNoTicketText:: _SSAnneNoTicketText::
text $52, " doesn't" text "<PLAYER> doesn't"
line "have the needed" line "have the needed"
cont "S.S.TICKET." cont "S.S.TICKET."
@ -71,7 +71,7 @@ _VermilionCityText5::
line "Gogogoh!@@" line "Gogogoh!@@"
_VermilionCityText14:: _VermilionCityText14::
db $0 text ""
para "A MACHOP is" para "A MACHOP is"
line "stomping the land" line "stomping the land"
cont "flat." cont "flat."

View file

@ -53,4 +53,3 @@ _OakSpeechText3::
cont "with #MON" cont "with #MON"
cont "awaits! Let's go!" cont "awaits! Let's go!"
done done

View file

@ -2637,21 +2637,21 @@ wPlayerDirection:: ; d52a
; if the player is not moving, the last the direction in which the player moved ; if the player is not moving, the last the direction in which the player moved
ds 1 ds 1
wTileSetBank:: ; d52b wTilesetBank:: ; d52b
ds 1 ds 1
wTileSetBlocksPtr:: ; d52c wTilesetBlocksPtr:: ; d52c
; maps blocks (4x4 tiles) to tiles ; maps blocks (4x4 tiles) to tiles
ds 2 ds 2
wTileSetGFXPtr:: ; d52e wTilesetGfxPtr:: ; d52e
ds 2 ds 2
wTileSetCollisionPtr:: ; d530 wTilesetCollisionPtr:: ; d530
; list of all walkable tiles ; list of all walkable tiles
ds 2 ds 2
wTileSetTalkingOverTiles:: ; d532 wTilesetTalkingOverTiles:: ; d532
ds 3 ds 3
wGrassTile:: ; d535 wGrassTile:: ; d535