mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Separate maps.asm, pics.asm, sprites.asm, and tilesets.asm from main.asm (#251)
Each new file builds its own .o, along with separate main.o and home.o, which necessitates many more "exported::" labels.
This commit is contained in:
parent
ff927ba730
commit
4b853ad676
317 changed files with 2290 additions and 2240 deletions
|
|
@ -1,4 +1,4 @@
|
|||
_AddPartyMon:
|
||||
_AddPartyMon::
|
||||
; Adds a new mon to the player's or enemy's party.
|
||||
; [wMonDataLocation] is used in an unusual way in this function.
|
||||
; If the lower nybble is 0, the mon is added to the player's party, else the enemy's.
|
||||
|
|
@ -277,7 +277,7 @@ AddPartyMon_WriteMovePP:
|
|||
|
||||
; adds enemy mon [wcf91] (at position [wWhichPokemon] in enemy list) to own party
|
||||
; used in the cable club trade center
|
||||
_AddEnemyMonToPlayerParty:
|
||||
_AddEnemyMonToPlayerParty::
|
||||
ld hl, wPartyCount
|
||||
ld a, [hl]
|
||||
cp PARTY_LENGTH
|
||||
|
|
@ -338,7 +338,7 @@ _AddEnemyMonToPlayerParty:
|
|||
and a
|
||||
ret ; return success
|
||||
|
||||
_MoveMon:
|
||||
_MoveMon::
|
||||
ld a, [wMoveMonType]
|
||||
and a ; BOX_TO_PARTY
|
||||
jr z, .checkPartyMonSlots
|
||||
|
|
|
|||
|
|
@ -1451,7 +1451,7 @@ TrainerSentOutText:
|
|||
|
||||
; tests if the player has any pokemon that are not fainted
|
||||
; sets d = 0 if all fainted, d != 0 if some mons are still alive
|
||||
AnyPartyAlive:
|
||||
AnyPartyAlive::
|
||||
ld a, [wPartyCount]
|
||||
ld e, a
|
||||
xor a
|
||||
|
|
@ -1996,7 +1996,7 @@ CenterMonName:
|
|||
pop de
|
||||
ret
|
||||
|
||||
DisplayBattleMenu:
|
||||
DisplayBattleMenu::
|
||||
call LoadScreenTilesFromBuffer1 ; restore saved screen
|
||||
ld a, [wBattleType]
|
||||
and a
|
||||
|
|
@ -6718,7 +6718,7 @@ PlayMoveAnimation:
|
|||
call Delay3
|
||||
predef_jump MoveAnimation
|
||||
|
||||
InitBattle:
|
||||
InitBattle::
|
||||
ld a, [wCurOpponent]
|
||||
and a
|
||||
jr z, DetermineWildOpponent
|
||||
|
|
@ -6934,7 +6934,7 @@ CopyUncompressedPicToTilemap:
|
|||
ld a, [wPredefRegisters + 1]
|
||||
ld l, a
|
||||
ld a, [hStartTileID]
|
||||
CopyUncompressedPicToHL:
|
||||
CopyUncompressedPicToHL::
|
||||
lb bc, 7, 7
|
||||
ld de, SCREEN_WIDTH
|
||||
push af
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
GetTrainerName_:
|
||||
GetTrainerName_::
|
||||
ld hl, wGrassRate
|
||||
ld a, [wLinkState]
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
SaveTrainerName:
|
||||
SaveTrainerName::
|
||||
ld hl, TrainerNamePointers
|
||||
ld a, [wTrainerClass]
|
||||
dec a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_DisplayPokedex:
|
||||
_DisplayPokedex::
|
||||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
predef ShowPokedexData
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; function that performs initialization for DisplayTextID
|
||||
DisplayTextIDInit:
|
||||
DisplayTextIDInit::
|
||||
xor a
|
||||
ld [wListMenuID], a
|
||||
ld a, [wAutoTextBoxDrawingControl]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; calculates the level a mon should be based on its current exp
|
||||
CalcLevelFromExperience:
|
||||
CalcLevelFromExperience::
|
||||
ld a, [wLoadedMonSpecies]
|
||||
ld [wd0b5], a
|
||||
call GetMonHeader
|
||||
|
|
@ -28,7 +28,7 @@ CalcLevelFromExperience:
|
|||
ret
|
||||
|
||||
; calculates the amount of experience needed for level d
|
||||
CalcExperience:
|
||||
CalcExperience::
|
||||
ld a, [wMonHGrowthRate]
|
||||
add a
|
||||
add a
|
||||
|
|
|
|||
|
|
@ -41,14 +41,14 @@ StartSlotMachine:
|
|||
call PrintPredefTextID
|
||||
ret
|
||||
|
||||
GameCornerOutOfOrderText:
|
||||
GameCornerOutOfOrderText::
|
||||
TX_FAR _GameCornerOutOfOrderText
|
||||
db "@"
|
||||
|
||||
GameCornerOutToLunchText:
|
||||
GameCornerOutToLunchText::
|
||||
TX_FAR _GameCornerOutToLunchText
|
||||
db "@"
|
||||
|
||||
GameCornerSomeonesKeysText:
|
||||
GameCornerSomeonesKeysText::
|
||||
TX_FAR _GameCornerSomeonesKeysText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ AbleToPlaySlotsCheck:
|
|||
ld [wCanPlaySlots], a
|
||||
ret
|
||||
|
||||
GameCornerCoinCaseText:
|
||||
GameCornerCoinCaseText::
|
||||
TX_FAR _GameCornerCoinCaseText
|
||||
db "@"
|
||||
|
||||
GameCornerNoCoinsText:
|
||||
GameCornerNoCoinsText::
|
||||
TX_FAR _GameCornerNoCoinsText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_GivePokemon:
|
||||
_GivePokemon::
|
||||
; returns success in carry
|
||||
; and whether the mon was added to the party in [wAddedToParty]
|
||||
call EnableAutoTextBoxDrawing
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ PrintNotebookText:
|
|||
ld a, [wHiddenObjectFunctionArgument]
|
||||
jp PrintPredefTextID
|
||||
|
||||
TMNotebook:
|
||||
TMNotebook::
|
||||
TX_FAR TMNotebookText
|
||||
TX_WAIT
|
||||
db "@"
|
||||
|
||||
ViridianSchoolNotebook:
|
||||
ViridianSchoolNotebook::
|
||||
TX_ASM
|
||||
ld hl, ViridianSchoolNotebookText1
|
||||
call PrintText
|
||||
|
|
@ -68,7 +68,7 @@ PrintFightingDojoText2:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump EnemiesOnEverySideText
|
||||
|
||||
EnemiesOnEverySideText:
|
||||
EnemiesOnEverySideText::
|
||||
TX_FAR _EnemiesOnEverySideText
|
||||
db "@"
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ PrintFightingDojoText3:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump WhatGoesAroundComesAroundText
|
||||
|
||||
WhatGoesAroundComesAroundText:
|
||||
WhatGoesAroundComesAroundText::
|
||||
TX_FAR _WhatGoesAroundComesAroundText
|
||||
db "@"
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ PrintFightingDojoText:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump FightingDojoText
|
||||
|
||||
FightingDojoText:
|
||||
FightingDojoText::
|
||||
TX_FAR _FightingDojoText
|
||||
db "@"
|
||||
|
||||
|
|
@ -95,6 +95,6 @@ PrintIndigoPlateauHQText:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump IndigoPlateauHQText
|
||||
|
||||
IndigoPlateauHQText:
|
||||
IndigoPlateauHQText::
|
||||
TX_FAR _IndigoPlateauHQText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ PrintRedSNESText:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump RedBedroomSNESText
|
||||
|
||||
RedBedroomSNESText:
|
||||
RedBedroomSNESText::
|
||||
TX_FAR _RedBedroomSNESText
|
||||
db "@"
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ OpenRedsPC:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump RedBedroomPCText
|
||||
|
||||
RedBedroomPCText:
|
||||
RedBedroomPCText::
|
||||
TX_PLAYERS_PC
|
||||
|
||||
Route15GateLeftBinoculars:
|
||||
|
|
@ -24,7 +24,7 @@ Route15GateLeftBinoculars:
|
|||
call PlayCry
|
||||
jp DisplayMonFrontSpriteInBox
|
||||
|
||||
Route15UpstairsBinocularsText:
|
||||
Route15UpstairsBinocularsText::
|
||||
TX_FAR _Route15UpstairsBinocularsText
|
||||
db "@"
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ AerodactylFossil:
|
|||
tx_pre AerodactylFossilText
|
||||
ret
|
||||
|
||||
AerodactylFossilText:
|
||||
AerodactylFossilText::
|
||||
TX_FAR _AerodactylFossilText
|
||||
db "@"
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ KabutopsFossil:
|
|||
tx_pre KabutopsFossilText
|
||||
ret
|
||||
|
||||
KabutopsFossilText:
|
||||
KabutopsFossilText::
|
||||
TX_FAR _KabutopsFossilText
|
||||
db "@"
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ PrintBlackboardLinkCableText:
|
|||
call PrintPredefTextID
|
||||
ret
|
||||
|
||||
LinkCableHelp:
|
||||
LinkCableHelp::
|
||||
TX_ASM
|
||||
call SaveScreenTilesToBuffer1
|
||||
ld hl, LinkCableHelpText1
|
||||
|
|
@ -173,7 +173,7 @@ LinkCableInfoText3:
|
|||
TX_FAR _LinkCableInfoText3
|
||||
db "@"
|
||||
|
||||
ViridianSchoolBlackboard:
|
||||
ViridianSchoolBlackboard::
|
||||
TX_ASM
|
||||
call SaveScreenTilesToBuffer1
|
||||
ld hl, ViridianSchoolBlackboardText1
|
||||
|
|
@ -308,7 +308,7 @@ PrintTrashText:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump VermilionGymTrashText
|
||||
|
||||
VermilionGymTrashText:
|
||||
VermilionGymTrashText::
|
||||
TX_FAR _VermilionGymTrashText
|
||||
db "@"
|
||||
|
||||
|
|
@ -433,7 +433,7 @@ GymTrashCans:
|
|||
db 3, 10, 12, 14, 0 ; 13
|
||||
db 2, 11, 13, 0, 0 ; 14
|
||||
|
||||
VermilionGymTrashSuccessText1:
|
||||
VermilionGymTrashSuccessText1::
|
||||
TX_FAR _VermilionGymTrashSuccessText1
|
||||
TX_ASM
|
||||
call WaitForSoundToFinish
|
||||
|
|
@ -443,7 +443,7 @@ VermilionGymTrashSuccessText1:
|
|||
jp TextScriptEnd
|
||||
|
||||
; unused
|
||||
VermilionGymTrashSuccessText2:
|
||||
VermilionGymTrashSuccessText2::
|
||||
TX_FAR _VermilionGymTrashSuccessText2
|
||||
db "@"
|
||||
|
||||
|
|
@ -456,7 +456,7 @@ VermilionGymTrashSuccesPlaySfx:
|
|||
call WaitForSoundToFinish
|
||||
jp TextScriptEnd
|
||||
|
||||
VermilionGymTrashSuccessText3:
|
||||
VermilionGymTrashSuccessText3::
|
||||
TX_FAR _VermilionGymTrashSuccessText3
|
||||
TX_ASM
|
||||
call WaitForSoundToFinish
|
||||
|
|
@ -465,7 +465,7 @@ VermilionGymTrashSuccessText3:
|
|||
call WaitForSoundToFinish
|
||||
jp TextScriptEnd
|
||||
|
||||
VermilionGymTrashFailText:
|
||||
VermilionGymTrashFailText::
|
||||
TX_FAR _VermilionGymTrashFailText
|
||||
TX_ASM
|
||||
call WaitForSoundToFinish
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ GymStatues:
|
|||
db VIRIDIAN_GYM, %10000000
|
||||
db $ff
|
||||
|
||||
GymStatueText1:
|
||||
GymStatueText1::
|
||||
TX_FAR _GymStatueText1
|
||||
db "@"
|
||||
|
||||
GymStatueText2:
|
||||
GymStatueText2::
|
||||
TX_FAR _GymStatueText2
|
||||
db "@"
|
||||
|
||||
|
|
@ -98,59 +98,59 @@ BenchGuyTextPointers:
|
|||
db_tx_pre RockTunnelPokecenterBenchGuyText
|
||||
db $FF
|
||||
|
||||
ViridianCityPokecenterBenchGuyText:
|
||||
ViridianCityPokecenterBenchGuyText::
|
||||
TX_FAR _ViridianCityPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
PewterCityPokecenterBenchGuyText:
|
||||
PewterCityPokecenterBenchGuyText::
|
||||
TX_FAR _PewterCityPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
CeruleanCityPokecenterBenchGuyText:
|
||||
CeruleanCityPokecenterBenchGuyText::
|
||||
TX_FAR _CeruleanPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
LavenderCityPokecenterBenchGuyText:
|
||||
LavenderCityPokecenterBenchGuyText::
|
||||
TX_FAR _LavenderPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
MtMoonPokecenterBenchGuyText:
|
||||
MtMoonPokecenterBenchGuyText::
|
||||
TX_FAR _MtMoonPokecenterBenchGuyText
|
||||
db "@"
|
||||
|
||||
RockTunnelPokecenterBenchGuyText:
|
||||
RockTunnelPokecenterBenchGuyText::
|
||||
TX_FAR _RockTunnelPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
UnusedBenchGuyText1:
|
||||
UnusedBenchGuyText1::
|
||||
TX_FAR _UnusedBenchGuyText1
|
||||
db "@"
|
||||
|
||||
UnusedBenchGuyText2:
|
||||
UnusedBenchGuyText2::
|
||||
TX_FAR _UnusedBenchGuyText2
|
||||
db "@"
|
||||
|
||||
UnusedBenchGuyText3:
|
||||
UnusedBenchGuyText3::
|
||||
TX_FAR _UnusedBenchGuyText3
|
||||
db "@"
|
||||
|
||||
VermilionCityPokecenterBenchGuyText:
|
||||
VermilionCityPokecenterBenchGuyText::
|
||||
TX_FAR _VermilionPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
CeladonCityPokecenterBenchGuyText:
|
||||
CeladonCityPokecenterBenchGuyText::
|
||||
TX_FAR _CeladonCityPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
FuchsiaCityPokecenterBenchGuyText:
|
||||
FuchsiaCityPokecenterBenchGuyText::
|
||||
TX_FAR _FuchsiaCityPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
CinnabarIslandPokecenterBenchGuyText:
|
||||
CinnabarIslandPokecenterBenchGuyText::
|
||||
TX_FAR _CinnabarPokecenterGuyText
|
||||
db "@"
|
||||
|
||||
SaffronCityPokecenterBenchGuyText:
|
||||
SaffronCityPokecenterBenchGuyText::
|
||||
TX_ASM
|
||||
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
|
||||
ld hl, SaffronCityPokecenterBenchGuyText2
|
||||
|
|
@ -168,20 +168,20 @@ SaffronCityPokecenterBenchGuyText2:
|
|||
TX_FAR _SaffronCityPokecenterGuyText2
|
||||
db "@"
|
||||
|
||||
CeladonCityHotelText:
|
||||
CeladonCityHotelText::
|
||||
TX_FAR _CeladonCityHotelText
|
||||
db "@"
|
||||
|
||||
ret
|
||||
|
||||
UnusedPredefText:
|
||||
UnusedPredefText::
|
||||
db "@"
|
||||
|
||||
PrintBookcaseText:
|
||||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump BookcaseText
|
||||
|
||||
BookcaseText:
|
||||
BookcaseText::
|
||||
TX_FAR _BookcaseText
|
||||
db "@"
|
||||
|
||||
|
|
@ -194,5 +194,5 @@ OpenPokemonCenterPC:
|
|||
ld [wAutoTextBoxDrawingControl], a
|
||||
tx_pre_jump PokemonCenterPCText
|
||||
|
||||
PokemonCenterPCText:
|
||||
PokemonCenterPCText::
|
||||
TX_POKECENTER_PC
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; prints text for bookshelves in buildings without sign events
|
||||
PrintBookshelfText:
|
||||
PrintBookshelfText::
|
||||
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
|
||||
cp SPRITE_FACING_UP
|
||||
jr nz, .noMatch
|
||||
|
|
@ -38,7 +38,7 @@ PrintBookshelfText:
|
|||
|
||||
INCLUDE "data/bookshelf_tile_ids.asm"
|
||||
|
||||
IndigoPlateauStatues:
|
||||
IndigoPlateauStatues::
|
||||
TX_ASM
|
||||
ld hl, IndigoPlateauStatuesText1
|
||||
call PrintText
|
||||
|
|
@ -63,7 +63,7 @@ IndigoPlateauStatuesText3:
|
|||
TX_FAR _IndigoPlateauStatuesText3
|
||||
db "@"
|
||||
|
||||
BookOrSculptureText:
|
||||
BookOrSculptureText::
|
||||
TX_ASM
|
||||
ld hl, PokemonBooksText
|
||||
ld a, [wCurMapTileset]
|
||||
|
|
@ -85,11 +85,11 @@ DiglettSculptureText:
|
|||
TX_FAR _DiglettSculptureText
|
||||
db "@"
|
||||
|
||||
ElevatorText:
|
||||
ElevatorText::
|
||||
TX_FAR _ElevatorText
|
||||
db "@"
|
||||
|
||||
TownMapText:
|
||||
TownMapText::
|
||||
TX_FAR _TownMapText
|
||||
TX_BLINK
|
||||
TX_ASM
|
||||
|
|
@ -112,6 +112,6 @@ TownMapText:
|
|||
push af
|
||||
jp CloseTextDisplay
|
||||
|
||||
PokemonStuffText:
|
||||
PokemonStuffText::
|
||||
TX_FAR _PokemonStuffText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ PrintNewBikeText:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump NewBicycleText
|
||||
|
||||
NewBicycleText:
|
||||
NewBicycleText::
|
||||
TX_FAR _NewBicycleText
|
||||
db "@"
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ DisplayOakLabLeftPoster:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump PushStartText
|
||||
|
||||
PushStartText:
|
||||
PushStartText::
|
||||
TX_FAR _PushStartText
|
||||
db "@"
|
||||
|
||||
|
|
@ -28,15 +28,15 @@ DisplayOakLabRightPoster:
|
|||
.ownLessThanTwo
|
||||
jp PrintPredefTextID
|
||||
|
||||
SaveOptionText:
|
||||
SaveOptionText::
|
||||
TX_FAR _SaveOptionText
|
||||
db "@"
|
||||
|
||||
StrengthsAndWeaknessesText:
|
||||
StrengthsAndWeaknessesText::
|
||||
TX_FAR _StrengthsAndWeaknessesText
|
||||
db "@"
|
||||
|
||||
SafariZoneCheck:
|
||||
SafariZoneCheck::
|
||||
CheckEventHL EVENT_IN_SAFARI_ZONE ; if we are not in the Safari Zone,
|
||||
jr z, SafariZoneGameStillGoing ; don't bother printing game over text
|
||||
ld a, [wNumSafariBalls]
|
||||
|
|
@ -44,7 +44,7 @@ SafariZoneCheck:
|
|||
jr z, SafariZoneGameOver
|
||||
jr SafariZoneGameStillGoing
|
||||
|
||||
SafariZoneCheckSteps:
|
||||
SafariZoneCheckSteps::
|
||||
ld a, [wSafariSteps]
|
||||
ld b, a
|
||||
ld a, [wSafariSteps + 1]
|
||||
|
|
@ -90,7 +90,7 @@ SafariZoneGameOver:
|
|||
ld [wSafariZoneGameOver], a
|
||||
ret
|
||||
|
||||
PrintSafariGameOverText:
|
||||
PrintSafariGameOverText::
|
||||
xor a
|
||||
ld [wJoyIgnore], a
|
||||
ld hl, SafariGameOverText
|
||||
|
|
@ -123,7 +123,7 @@ PrintCinnabarQuiz:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump CinnabarGymQuiz
|
||||
|
||||
CinnabarGymQuiz:
|
||||
CinnabarGymQuiz::
|
||||
TX_ASM
|
||||
xor a
|
||||
ld [wOpponentAfterWrongAnswer], a
|
||||
|
|
@ -258,7 +258,7 @@ CinnabarGymQuizIncorrectText:
|
|||
TX_FAR _CinnabarGymQuizIncorrectText
|
||||
db "@"
|
||||
|
||||
UpdateCinnabarGymGateTileBlocks_:
|
||||
UpdateCinnabarGymGateTileBlocks_::
|
||||
; Update the overworld map with open floor blocks or locked gate blocks
|
||||
; depending on event flags.
|
||||
ld a, 6
|
||||
|
|
@ -316,7 +316,7 @@ PrintMagazinesText:
|
|||
tx_pre MagazinesText
|
||||
ret
|
||||
|
||||
MagazinesText:
|
||||
MagazinesText::
|
||||
TX_FAR _MagazinesText
|
||||
db "@"
|
||||
|
||||
|
|
@ -366,11 +366,11 @@ BillsHousePC:
|
|||
tx_pre BillsHousePokemonList
|
||||
ret
|
||||
|
||||
BillsHouseMonitorText:
|
||||
BillsHouseMonitorText::
|
||||
TX_FAR _BillsHouseMonitorText
|
||||
db "@"
|
||||
|
||||
BillsHouseInitiatedText:
|
||||
BillsHouseInitiatedText::
|
||||
TX_FAR _BillsHouseInitiatedText
|
||||
TX_BLINK
|
||||
TX_ASM
|
||||
|
|
@ -386,7 +386,7 @@ BillsHouseInitiatedText:
|
|||
call DelayFrames
|
||||
jp TextScriptEnd
|
||||
|
||||
BillsHousePokemonList:
|
||||
BillsHousePokemonList::
|
||||
TX_ASM
|
||||
call SaveScreenTilesToBuffer1
|
||||
ld hl, BillsHousePokemonListText1
|
||||
|
|
@ -462,6 +462,6 @@ DisplayOakLabEmailText:
|
|||
call EnableAutoTextBoxDrawing
|
||||
tx_pre_jump OakLabEmailText
|
||||
|
||||
OakLabEmailText:
|
||||
OakLabEmailText::
|
||||
TX_FAR _OakLabEmailText
|
||||
db "@"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
; [wcf91] = item ID
|
||||
; [wItemQuantity] = item quantity
|
||||
; sets carry flag if successful, unsets carry flag if unsuccessful
|
||||
AddItemToInventory_:
|
||||
AddItemToInventory_::
|
||||
ld a, [wItemQuantity] ; a = item quantity
|
||||
push af
|
||||
push bc
|
||||
|
|
@ -97,7 +97,7 @@ AddItemToInventory_:
|
|||
; hl = address of inventory (either wNumBagItems or wNumBoxItems)
|
||||
; [wWhichPokemon] = index (within the inventory) of the item to remove
|
||||
; [wItemQuantity] = quantity to remove
|
||||
RemoveItemFromInventory_:
|
||||
RemoveItemFromInventory_::
|
||||
push hl
|
||||
inc hl
|
||||
ld a, [wWhichPokemon] ; index (within the inventory) of the item being removed
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
UseItem_:
|
||||
UseItem_::
|
||||
ld a, 1
|
||||
ld [wActionResultOrTookBattleTurn], a ; initialise to success value
|
||||
ld a, [wcf91] ;contains item_ID
|
||||
|
|
@ -2588,7 +2588,7 @@ GetSelectedMoveOffset2:
|
|||
; [wItemQuantity] = quantity to toss
|
||||
; OUTPUT:
|
||||
; clears carry flag if the item is tossed, sets carry flag if not
|
||||
TossItem_:
|
||||
TossItem_::
|
||||
push hl
|
||||
ld a, [wcf91]
|
||||
call IsItemHM
|
||||
|
|
@ -2657,7 +2657,7 @@ TooImportantToTossText:
|
|||
; [wIsKeyItem] = result
|
||||
; 00: item is not key item
|
||||
; 01: item is key item
|
||||
IsKeyItem_:
|
||||
IsKeyItem_::
|
||||
ld a, $01
|
||||
ld [wIsKeyItem], a
|
||||
ld a, [wcf91]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
GetMachinePrice:
|
||||
GetMachinePrice::
|
||||
; Input: [wcf91] = Item Id of a TM
|
||||
; Output: Stores the TM price at hItemPrice
|
||||
ld a, [wcf91] ; a contains TM item id
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
LoadMonData_:
|
||||
LoadMonData_::
|
||||
; Load monster [wWhichPokemon] from list [wMonDataLocation]:
|
||||
; 0: partymon
|
||||
; 1: enemymon
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DisplayDiploma:
|
||||
DisplayDiploma::
|
||||
call SaveScreenTilesToBuffer2
|
||||
call GBPalWhiteOutWithDelay3
|
||||
call ClearScreen
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; function that displays the start menu
|
||||
DrawStartMenu:
|
||||
DrawStartMenu::
|
||||
CheckEvent EVENT_GOT_POKEDEX
|
||||
; menu with pokedex
|
||||
coord hl, 10, 0
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ StartNewGame:
|
|||
call DelayFrames
|
||||
|
||||
; enter map after using a special warp or loading the game from the main menu
|
||||
SpecialEnterMap:
|
||||
SpecialEnterMap::
|
||||
xor a
|
||||
ld [hJoyPressed], a
|
||||
ld [hJoyHeld], a
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ DoYouWantToNicknameText:
|
|||
TX_FAR _DoYouWantToNicknameText
|
||||
db "@"
|
||||
|
||||
DisplayNameRaterScreen:
|
||||
DisplayNameRaterScreen::
|
||||
ld hl, wBuffer
|
||||
xor a
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@
|
|||
; f6: health returned
|
||||
; f7: revitalized
|
||||
; f8: leveled up
|
||||
DrawPartyMenu_:
|
||||
DrawPartyMenu_::
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call ClearScreen
|
||||
call UpdateSprites
|
||||
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
|
||||
|
||||
RedrawPartyMenu_:
|
||||
RedrawPartyMenu_::
|
||||
ld a, [wPartyMenuTypeOrMessageID]
|
||||
cp SWAP_MONS_PARTY_MENU
|
||||
jp z, .printMessage
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ActivatePC:
|
||||
ActivatePC::
|
||||
call SaveScreenTilesToBuffer2
|
||||
ld a, SFX_TURN_ON_PC
|
||||
call PlaySound
|
||||
|
|
@ -115,7 +115,7 @@ AccessedMyPCText:
|
|||
db "@"
|
||||
|
||||
; removes one of the specified item ID [hItemToRemoveID] from bag (if existent)
|
||||
RemoveItemByID:
|
||||
RemoveItemByID::
|
||||
ld hl, wBagItems
|
||||
ld a, [hItemToRemoveID]
|
||||
ld b, a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PlayerPC:
|
||||
PlayerPC::
|
||||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
ld a, ITEM_NAME
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
CeladonPrizeMenu:
|
||||
CeladonPrizeMenu::
|
||||
ld b, COIN_CASE
|
||||
call IsItemInBag
|
||||
jr nz, .havingCoinCase
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
StartMenu_Pokedex:
|
||||
StartMenu_Pokedex::
|
||||
predef ShowPokedexMenu
|
||||
call LoadScreenTilesFromBuffer2 ; restore saved screen
|
||||
call Delay3
|
||||
|
|
@ -6,7 +6,7 @@ StartMenu_Pokedex:
|
|||
call UpdateSprites
|
||||
jp RedisplayStartMenu
|
||||
|
||||
StartMenu_Pokemon:
|
||||
StartMenu_Pokemon::
|
||||
ld a, [wPartyCount]
|
||||
and a
|
||||
jp z, RedisplayStartMenu
|
||||
|
|
@ -284,7 +284,7 @@ StartMenu_Pokemon:
|
|||
db "@"
|
||||
|
||||
; writes a blank tile to all possible menu cursor positions on the party menu
|
||||
ErasePartyMenuCursors:
|
||||
ErasePartyMenuCursors::
|
||||
coord hl, 0, 1
|
||||
ld bc, 2 * 20 ; menu cursor positions are 2 rows apart
|
||||
ld a, 6 ; 6 menu cursor positions
|
||||
|
|
@ -299,7 +299,7 @@ ItemMenuLoop:
|
|||
call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen
|
||||
call RunDefaultPaletteCommand
|
||||
|
||||
StartMenu_Item:
|
||||
StartMenu_Item::
|
||||
ld a, [wLinkState]
|
||||
dec a ; is the player in the Colosseum or Trade Centre?
|
||||
jr nz, .notInCableClubRoom
|
||||
|
|
@ -450,7 +450,7 @@ INCLUDE "data/party_items.asm"
|
|||
|
||||
INCLUDE "data/overworld_items.asm"
|
||||
|
||||
StartMenu_TrainerInfo:
|
||||
StartMenu_TrainerInfo::
|
||||
call GBPalWhiteOut
|
||||
call ClearScreen
|
||||
call UpdateSprites
|
||||
|
|
@ -638,7 +638,7 @@ TrainerInfo_DrawVerticalLine:
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
StartMenu_SaveReset:
|
||||
StartMenu_SaveReset::
|
||||
ld a, [wd72e]
|
||||
bit 6, a ; is the player using the link feature?
|
||||
jp nz, Init
|
||||
|
|
@ -646,7 +646,7 @@ StartMenu_SaveReset:
|
|||
call LoadScreenTilesFromBuffer2 ; restore saved screen
|
||||
jp HoldTextDisplayOpen
|
||||
|
||||
StartMenu_Option:
|
||||
StartMenu_Option::
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call ClearScreen
|
||||
|
|
@ -657,7 +657,7 @@ StartMenu_Option:
|
|||
call UpdateSprites
|
||||
jp RedisplayStartMenu
|
||||
|
||||
SwitchPartyMon:
|
||||
SwitchPartyMon::
|
||||
call SwitchPartyMon_InitVarOrSwapData ; swap data
|
||||
ld a, [wSwappedMenuItem]
|
||||
call SwitchPartyMon_ClearGfx
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
HandleItemListSwapping:
|
||||
HandleItemListSwapping::
|
||||
ld a, [wListMenuID]
|
||||
cp ITEMLISTMENU
|
||||
jp nz, DisplayListMenuIDLoop ; only rearrange item list menus
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; function to draw various text boxes
|
||||
DisplayTextBoxID_:
|
||||
DisplayTextBoxID_::
|
||||
ld a, [wTextBoxID]
|
||||
cp TWO_OPTION_MENU
|
||||
jp z, DisplayTwoOptionMenu
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
VendingMachineMenu:
|
||||
VendingMachineMenu::
|
||||
ld hl, VendingMachineText1
|
||||
call PrintText
|
||||
ld a, MONEY_BOX
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ AnimatePartyMon_ForceSpeed1:
|
|||
; 0: green
|
||||
; 1: yellow
|
||||
; 2: red
|
||||
AnimatePartyMon:
|
||||
AnimatePartyMon::
|
||||
ld hl, wPartyMenuHPBarColors
|
||||
ld a, [wCurrentMenuItem]
|
||||
ld c, a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_Multiply:
|
||||
_Multiply::
|
||||
ld a, $8
|
||||
ld b, a
|
||||
xor a
|
||||
|
|
@ -59,7 +59,7 @@ _Multiply:
|
|||
ld [H_PRODUCT], a
|
||||
ret
|
||||
|
||||
_Divide:
|
||||
_Divide::
|
||||
xor a
|
||||
ld [H_DIVIDEBUFFER], a
|
||||
ld [H_DIVIDEBUFFER+1], a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
WriteDMACodeToHRAM:
|
||||
WriteDMACodeToHRAM::
|
||||
; Since no other memory is available during OAM DMA,
|
||||
; DMARoutine is copied to HRAM and executed there.
|
||||
ld c, $ff80 % $100
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
CableClubNPC:
|
||||
CableClubNPC::
|
||||
ld hl, CableClubNPCWelcomeText
|
||||
call PrintText
|
||||
CheckEvent EVENT_GOT_POKEDEX
|
||||
|
|
|
|||
|
|
@ -71,13 +71,13 @@ SilphCoMapList:
|
|||
db SILPH_CO_11F
|
||||
db $FF
|
||||
|
||||
CardKeySuccessText:
|
||||
CardKeySuccessText::
|
||||
TX_FAR _CardKeySuccessText1
|
||||
TX_SFX_ITEM_1
|
||||
TX_FAR _CardKeySuccessText2
|
||||
db "@"
|
||||
|
||||
CardKeyFailText:
|
||||
CardKeyFailText::
|
||||
TX_FAR _CardKeyFailText
|
||||
db "@"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
GiveFossilToCinnabarLab:
|
||||
GiveFossilToCinnabarLab::
|
||||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
xor a
|
||||
|
|
@ -112,7 +112,7 @@ PrintFossilsInBag:
|
|||
jr .loop
|
||||
|
||||
; loads the names of the fossil item and the resulting mon
|
||||
LoadFossilItemAndMonName:
|
||||
LoadFossilItemAndMonName::
|
||||
ld a, [wFossilMon]
|
||||
ld [wd11e], a
|
||||
call GetMonName
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ClearVariablesOnEnterMap:
|
||||
ClearVariablesOnEnterMap::
|
||||
ld a, SCREEN_HEIGHT_PIXELS
|
||||
ld [hWY], a
|
||||
ld [rWY], a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
ShakeElevator:
|
||||
ShakeElevator::
|
||||
ld de, -$20
|
||||
call ShakeElevatorRedrawRow
|
||||
ld de, SCREEN_HEIGHT * $20
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ HiddenItems:
|
|||
|
||||
INCLUDE "data/hidden_item_coords.asm"
|
||||
|
||||
FoundHiddenItemText:
|
||||
FoundHiddenItemText::
|
||||
TX_FAR _FoundHiddenItemText
|
||||
TX_ASM
|
||||
ld a, [wHiddenObjectFunctionArgument] ; item ID
|
||||
|
|
@ -45,7 +45,7 @@ FoundHiddenItemText:
|
|||
call PrintText
|
||||
jp TextScriptEnd
|
||||
|
||||
HiddenItemBagFullText:
|
||||
HiddenItemBagFullText::
|
||||
TX_FAR _HiddenItemBagFullText
|
||||
db "@"
|
||||
|
||||
|
|
@ -120,12 +120,12 @@ HiddenCoins:
|
|||
|
||||
INCLUDE "data/hidden_coins.asm"
|
||||
|
||||
FoundHiddenCoinsText:
|
||||
FoundHiddenCoinsText::
|
||||
TX_FAR _FoundHiddenCoinsText
|
||||
TX_SFX_ITEM_2
|
||||
db "@"
|
||||
|
||||
DroppedHiddenCoinsText:
|
||||
DroppedHiddenCoinsText::
|
||||
TX_FAR _FoundHiddenCoins2Text
|
||||
TX_SFX_ITEM_2
|
||||
TX_FAR _DroppedHiddenCoinsText
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
IsPlayerOnDungeonWarp:
|
||||
IsPlayerOnDungeonWarp::
|
||||
xor a
|
||||
ld [wWhichDungeonWarp], a
|
||||
ld a, [wd72d]
|
||||
|
|
@ -15,7 +15,7 @@ IsPlayerOnDungeonWarp:
|
|||
ret
|
||||
|
||||
; if a hidden object was found, stores $00 in [$ffee], else stores $ff
|
||||
CheckForHiddenObject:
|
||||
CheckForHiddenObject::
|
||||
ld hl, $ffeb
|
||||
xor a
|
||||
ld [hli], a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
HandleLedges:
|
||||
HandleLedges::
|
||||
ld a, [wd736]
|
||||
bit 6, a ; already jumping down ledge
|
||||
ret nz
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_UpdateSprites:
|
||||
_UpdateSprites::
|
||||
ld h, $c1
|
||||
inc h
|
||||
ld a, $e ; wSpriteStateData2 + $0e
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
; fields, respectively, within loops. The X is the loop index.
|
||||
; If there is an inner loop, Y is the inner loop index, i.e. $C1Y* and $C2Y*
|
||||
; denote fields of the sprite slots iterated over in the inner loop.
|
||||
InitMapSprites:
|
||||
InitMapSprites::
|
||||
call InitOutsideMapSprites
|
||||
ret c ; return if the map is an outside map (already handled by above call)
|
||||
; if the map is an inside map (i.e. mapID >= $25)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
MarkTownVisitedAndLoadMissableObjects:
|
||||
MarkTownVisitedAndLoadMissableObjects::
|
||||
ld a, [wCurMap]
|
||||
cp ROUTE_1
|
||||
jr nc, .notInTown
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PlayerStepOutFromDoor:
|
||||
PlayerStepOutFromDoor::
|
||||
ld hl, wd730
|
||||
res 1, [hl]
|
||||
call IsPlayerStandingOnDoorTile
|
||||
|
|
@ -27,7 +27,7 @@ PlayerStepOutFromDoor:
|
|||
res 7, [hl]
|
||||
ret
|
||||
|
||||
_EndNPCMovementScript:
|
||||
_EndNPCMovementScript::
|
||||
ld hl, wd730
|
||||
res 7, [hl]
|
||||
ld hl, wd72e
|
||||
|
|
@ -44,7 +44,7 @@ _EndNPCMovementScript:
|
|||
ld [wSimulatedJoypadStatesEnd], a
|
||||
ret
|
||||
|
||||
PalletMovementScriptPointerTable:
|
||||
PalletMovementScriptPointerTable::
|
||||
dw PalletMovementScript_OakMoveLeft
|
||||
dw PalletMovementScript_PlayerMoveLeft
|
||||
dw PalletMovementScript_WaitAndWalkToLab
|
||||
|
|
@ -157,7 +157,7 @@ PalletMovementScript_Done:
|
|||
res 7, [hl]
|
||||
jp EndNPCMovementScript
|
||||
|
||||
PewterMuseumGuyMovementScriptPointerTable:
|
||||
PewterMuseumGuyMovementScriptPointerTable::
|
||||
dw PewterMovementScript_WalkToMuseum
|
||||
dw PewterMovementScript_Done
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ PewterMovementScript_Done:
|
|||
res 7, [hl]
|
||||
jp EndNPCMovementScript
|
||||
|
||||
PewterGymGuyMovementScriptPointerTable:
|
||||
PewterGymGuyMovementScriptPointerTable::
|
||||
dw PewterMovementScript_WalkToGym
|
||||
dw PewterMovementScript_Done
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ RLEList_PewterGymGuy:
|
|||
db NPC_MOVEMENT_RIGHT, $03
|
||||
db $FF
|
||||
|
||||
FreezeEnemyTrainerSprite:
|
||||
FreezeEnemyTrainerSprite::
|
||||
ld a, [wCurMap]
|
||||
cp POKEMON_TOWER_7F
|
||||
ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PrepareOAMData:
|
||||
PrepareOAMData::
|
||||
; Determine OAM data for currently visible
|
||||
; sprites and write it to wOAMBuffer.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
EnterMapAnim:
|
||||
EnterMapAnim::
|
||||
call InitFacingDirectionList
|
||||
ld a, $ec
|
||||
ld [wSpriteStateData1 + 4], a ; player's sprite Y screen position
|
||||
|
|
@ -90,7 +90,7 @@ PlayerSpinWhileMovingDown:
|
|||
ld [hl], a ; wPlayerSpinWhileMovingUpOrDownAnimFrameDelay
|
||||
jp PlayerSpinWhileMovingUpOrDown
|
||||
|
||||
_LeaveMapAnim:
|
||||
_LeaveMapAnim::
|
||||
call InitFacingDirectionList
|
||||
call IsPlayerStandingOnWarpPadOrHole
|
||||
ld a, b
|
||||
|
|
@ -347,7 +347,7 @@ GetPlayerTeleportAnimFrameDelay:
|
|||
inc a
|
||||
ret
|
||||
|
||||
IsPlayerStandingOnWarpPadOrHole:
|
||||
IsPlayerStandingOnWarpPadOrHole::
|
||||
ld b, 0
|
||||
ld hl, WarpPadAndHoleData
|
||||
ld a, [wCurMapTileset]
|
||||
|
|
@ -496,7 +496,7 @@ RedFishingTiles:
|
|||
db 3, BANK(RedFishingRodTiles)
|
||||
dw vNPCSprites2 + $7d0
|
||||
|
||||
_HandleMidJump:
|
||||
_HandleMidJump::
|
||||
ld a, [wPlayerJumpingYScreenCoordsIndex]
|
||||
ld c, a
|
||||
inc a
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; only used for setting bit 2 of wd736 upon entering a new map
|
||||
IsPlayerStandingOnWarp:
|
||||
IsPlayerStandingOnWarp::
|
||||
ld a, [wNumberOfWarps]
|
||||
and a
|
||||
ret z
|
||||
|
|
@ -31,7 +31,7 @@ IsPlayerStandingOnWarp:
|
|||
jr nz, .loop
|
||||
ret
|
||||
|
||||
CheckForceBikeOrSurf:
|
||||
CheckForceBikeOrSurf::
|
||||
ld hl, wd732
|
||||
bit 5, [hl]
|
||||
ret nz
|
||||
|
|
@ -84,7 +84,7 @@ CheckForceBikeOrSurf:
|
|||
|
||||
INCLUDE "data/force_bike_surf.asm"
|
||||
|
||||
IsPlayerFacingEdgeOfMap:
|
||||
IsPlayerFacingEdgeOfMap::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
|
@ -150,7 +150,7 @@ IsPlayerFacingEdgeOfMap:
|
|||
scf
|
||||
ret
|
||||
|
||||
IsWarpTileInFrontOfPlayer:
|
||||
IsWarpTileInFrontOfPlayer::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
|
@ -188,7 +188,7 @@ IsSSAnneBowWarpTileInFrontOfPlayer:
|
|||
and a
|
||||
jr IsWarpTileInFrontOfPlayer.done
|
||||
|
||||
IsPlayerStandingOnDoorTileOrWarpTile:
|
||||
IsPlayerStandingOnDoorTileOrWarpTile::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
|
@ -217,7 +217,7 @@ IsPlayerStandingOnDoorTileOrWarpTile:
|
|||
|
||||
INCLUDE "data/warp_tile_ids.asm"
|
||||
|
||||
PrintSafariZoneSteps:
|
||||
PrintSafariZoneSteps::
|
||||
ld a, [wCurMap]
|
||||
cp SAFARI_ZONE_EAST
|
||||
ret c
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DisplayPokemonCenterDialogue_:
|
||||
DisplayPokemonCenterDialogue_::
|
||||
call SaveScreenTilesToBuffer1 ; save screen
|
||||
ld hl, PokemonCenterWelcomeText
|
||||
call PrintText
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DisplayPokemartDialogue_:
|
||||
DisplayPokemartDialogue_::
|
||||
ld a, [wListScrollOffset]
|
||||
ld [wSavedListScrollOffset], a
|
||||
call UpdateSprites
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TryPushingBoulder:
|
||||
TryPushingBoulder::
|
||||
ld a, [wd728]
|
||||
bit 0, a ; using Strength?
|
||||
ret z
|
||||
|
|
@ -82,7 +82,7 @@ PushBoulderLeftMovementData:
|
|||
PushBoulderRightMovementData:
|
||||
db NPC_MOVEMENT_RIGHT,$FF
|
||||
|
||||
DoBoulderDustAnimation:
|
||||
DoBoulderDustAnimation::
|
||||
ld a, [wd730]
|
||||
bit 0, a
|
||||
ret nz
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
RemoveGuardDrink:
|
||||
RemoveGuardDrink::
|
||||
ld hl, GuardDrinksList
|
||||
.drinkLoop
|
||||
ld a, [hli]
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ MoveBoulderDustFunctionPointerTable:
|
|||
db $FF,$01
|
||||
dw AdjustOAMBlockXPos
|
||||
|
||||
LoadSmokeTileFourTimes:
|
||||
LoadSmokeTileFourTimes::
|
||||
ld hl, vChars1 + $7c0
|
||||
ld c, $4
|
||||
.loop
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_GetSpritePosition1:
|
||||
_GetSpritePosition1::
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, $4
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -17,7 +17,7 @@ _GetSpritePosition1:
|
|||
ld [$ffee], a
|
||||
ret
|
||||
|
||||
_GetSpritePosition2:
|
||||
_GetSpritePosition2::
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, $4
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -36,7 +36,7 @@ _GetSpritePosition2:
|
|||
ld [wSavedSpriteMapX], a
|
||||
ret
|
||||
|
||||
_SetSpritePosition1:
|
||||
_SetSpritePosition1::
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, $4
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -55,7 +55,7 @@ _SetSpritePosition1:
|
|||
ld [hl], a
|
||||
ret
|
||||
|
||||
_SetSpritePosition2:
|
||||
_SetSpritePosition2::
|
||||
ld hl, wSpriteStateData1
|
||||
ld de, 4
|
||||
ld a, [wSpriteIndex]
|
||||
|
|
@ -74,7 +74,7 @@ _SetSpritePosition2:
|
|||
ld [hl], a ; c2x5 (map X pos)
|
||||
ret
|
||||
|
||||
TrainerWalkUpToPlayer:
|
||||
TrainerWalkUpToPlayer::
|
||||
ld a, [wSpriteIndex]
|
||||
swap a
|
||||
ld [wTrainerSpriteOffset], a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
LoadWildData:
|
||||
LoadWildData::
|
||||
ld hl, WildDataPointers
|
||||
ld a, [wCurMap]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TrackPlayTime:
|
||||
TrackPlayTime::
|
||||
call CountDownIgnoreInputBitReset
|
||||
ld a, [wd732]
|
||||
bit 0, a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
GetPredefPointer:
|
||||
GetPredefPointer::
|
||||
; Store the contents of the register
|
||||
; pairs (hl, de, bc) at wPredefRegisters.
|
||||
; Then put the bank and address of predef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PrintWaitingText:
|
||||
PrintWaitingText::
|
||||
coord hl, 3, 10
|
||||
ld b, $1
|
||||
ld c, $b
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
_RemovePokemon:
|
||||
_RemovePokemon::
|
||||
ld hl, wPartyCount
|
||||
ld a, [wRemoveMonFromBox]
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ SaveSAVtoSRAM2:
|
|||
ld [MBC1SRamEnable], a
|
||||
ret
|
||||
|
||||
SaveSAVtoSRAM:
|
||||
SaveSAVtoSRAM::
|
||||
ld a, $2
|
||||
ld [wSaveFileStatus], a
|
||||
call SaveSAVtoSRAM0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
SpecialWarpIn:
|
||||
SpecialWarpIn::
|
||||
call LoadSpecialWarpData
|
||||
predef LoadTilesetHeader
|
||||
ld hl, wd732
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PrintStatusAilment:
|
||||
PrintStatusAilment::
|
||||
ld a, [de]
|
||||
bit PSN, a
|
||||
jr nz, .psn
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
; subtracts the amount the player paid from their money
|
||||
; OUTPUT: carry = 0(success) or 1(fail because there is not enough money)
|
||||
SubtractAmountPaidFromMoney_:
|
||||
SubtractAmountPaidFromMoney_::
|
||||
ld de, wPlayerMoney
|
||||
ld hl, hMoney ; total price of items
|
||||
ld c, 3 ; length of money in bytes
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ CopyFixedLengthText:
|
|||
ld bc, NAME_LENGTH
|
||||
jp CopyData
|
||||
|
||||
SetDefaultNamesBeforeTitlescreen:
|
||||
SetDefaultNamesBeforeTitlescreen::
|
||||
ld hl, NintenText
|
||||
ld de, wPlayerName
|
||||
call CopyFixedLengthText
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ LoadTownMap_Nest:
|
|||
MonsNestText:
|
||||
db "'s NEST@"
|
||||
|
||||
LoadTownMap_Fly:
|
||||
LoadTownMap_Fly::
|
||||
call ClearSprites
|
||||
call LoadTownMap
|
||||
call LoadPlayerSpriteGraphics
|
||||
|
|
@ -590,7 +590,7 @@ MonNestIcon:
|
|||
INCBIN "gfx/mon_nest_icon.1bpp"
|
||||
MonNestIconEnd:
|
||||
|
||||
TownMapSpriteBlinkingAnimation:
|
||||
TownMapSpriteBlinkingAnimation::
|
||||
ld a, [wAnimCounter]
|
||||
inc a
|
||||
cp 25
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
UpdateSpriteFacingOffsetAndDelayMovement:
|
||||
UpdateSpriteFacingOffsetAndDelayMovement::
|
||||
ld h, $c2
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
add $8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue