mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Merge pull request #729 from Rangi42/master
Treat std scripts like specials and predefs
This commit is contained in:
commit
0cf0a5b9b4
@ -46,7 +46,6 @@ INCLUDE "constants/sfx_constants.asm"
|
||||
INCLUDE "constants/sprite_anim_constants.asm"
|
||||
INCLUDE "constants/sprite_constants.asm"
|
||||
INCLUDE "constants/sprite_data_constants.asm"
|
||||
INCLUDE "constants/std_constants.asm"
|
||||
INCLUDE "constants/tileset_constants.asm"
|
||||
INCLUDE "constants/trainer_constants.asm"
|
||||
INCLUDE "constants/trainer_data_constants.asm"
|
||||
|
@ -1,55 +0,0 @@
|
||||
; StdScripts indexes (see engine/events/std_scripts.asm)
|
||||
; also used in TileCollisionStdScripts (see data/events/collision_stdscripts.asm)
|
||||
enum_start
|
||||
enum pokecenternurse
|
||||
enum difficultbookshelf
|
||||
enum picturebookshelf
|
||||
enum magazinebookshelf
|
||||
enum teamrocketoath
|
||||
enum incenseburner
|
||||
enum merchandiseshelf
|
||||
enum townmap
|
||||
enum window
|
||||
enum tv
|
||||
enum homepage
|
||||
enum radio1
|
||||
enum radio2
|
||||
enum trashcan
|
||||
enum strengthboulder
|
||||
enum smashrock
|
||||
enum pokecentersign
|
||||
enum martsign
|
||||
enum goldenrodrockets
|
||||
enum radiotowerrockets
|
||||
enum elevatorbutton
|
||||
enum daytotext
|
||||
enum bugcontestresultswarp
|
||||
enum bugcontestresults
|
||||
enum initializeevents
|
||||
enum asknumber1m
|
||||
enum asknumber2m
|
||||
enum registerednumberm
|
||||
enum numberacceptedm
|
||||
enum numberdeclinedm
|
||||
enum phonefullm
|
||||
enum rematchm
|
||||
enum giftm
|
||||
enum packfullm
|
||||
enum rematchgiftm
|
||||
enum asknumber1f
|
||||
enum asknumber2f
|
||||
enum registerednumberf
|
||||
enum numberacceptedf
|
||||
enum numberdeclinedf
|
||||
enum phonefullf
|
||||
enum rematchf
|
||||
enum giftf
|
||||
enum packfullf
|
||||
enum rematchgiftf
|
||||
enum gymstatue1
|
||||
enum gymstatue2
|
||||
enum receiveitem
|
||||
enum receivetogepiegg
|
||||
enum pcscript
|
||||
enum gamecornercoinvendor
|
||||
enum happinesschecknpc
|
@ -1,13 +1,18 @@
|
||||
; stdscripts associated with tile collisions
|
||||
; std scripts associated with tile collisions
|
||||
|
||||
stdcoll: MACRO
|
||||
db \1
|
||||
dw (\2StdScript - StdScripts) / 3
|
||||
ENDM
|
||||
|
||||
TileCollisionStdScripts:
|
||||
; collision type, stdscript
|
||||
dbw COLL_BOOKSHELF, magazinebookshelf
|
||||
dbw COLL_PC, pcscript
|
||||
dbw COLL_RADIO, radio1
|
||||
dbw COLL_TOWN_MAP, townmap
|
||||
dbw COLL_MART_SHELF, merchandiseshelf
|
||||
dbw COLL_TV, tv
|
||||
dbw COLL_WINDOW, window
|
||||
dbw COLL_INCENSE_BURNER, incenseburner
|
||||
; collision type, std script
|
||||
stdcoll COLL_BOOKSHELF, MagazineBookshelfScript
|
||||
stdcoll COLL_PC, PCScript
|
||||
stdcoll COLL_RADIO, Radio1Script
|
||||
stdcoll COLL_TOWN_MAP, TownMapScript
|
||||
stdcoll COLL_MART_SHELF, MerchandiseShelfScript
|
||||
stdcoll COLL_TV, TVScript
|
||||
stdcoll COLL_WINDOW, WindowScript
|
||||
stdcoll COLL_INCENSE_BURNER, IncenseBurnerScript
|
||||
db -1 ; end
|
||||
|
@ -5,9 +5,9 @@ DisplayUsedMoveText:
|
||||
jp WaitBGMap
|
||||
|
||||
UsedMoveText:
|
||||
; this is a stream of text and asm from 105db9 to 105ef6
|
||||
text_far _ActorNameText
|
||||
text_asm
|
||||
|
||||
ldh a, [hBattleTurn]
|
||||
and a
|
||||
jr nz, .start
|
||||
|
@ -30,7 +30,7 @@ BugCatchingContestOutOfBallsScript:
|
||||
|
||||
BugCatchingContestReturnToGateScript:
|
||||
closetext
|
||||
jumpstd bugcontestresultswarp
|
||||
jumpstd BugContestResultsWarpScript
|
||||
|
||||
BugCatchingContestTimeUpText:
|
||||
text_far _BugCatchingContestTimeUpText
|
||||
|
@ -1,57 +1,61 @@
|
||||
add_stdscript: MACRO
|
||||
\1StdScript::
|
||||
dba \1
|
||||
ENDM
|
||||
|
||||
StdScripts::
|
||||
; entries correspond to constants/std_constants.asm
|
||||
dba PokecenterNurseScript
|
||||
dba DifficultBookshelfScript
|
||||
dba PictureBookshelfScript
|
||||
dba MagazineBookshelfScript
|
||||
dba TeamRocketOathScript
|
||||
dba IncenseBurnerScript
|
||||
dba MerchandiseShelfScript
|
||||
dba TownMapScript
|
||||
dba WindowScript
|
||||
dba TVScript
|
||||
dba HomepageScript
|
||||
dba Radio1Script
|
||||
dba Radio2Script
|
||||
dba TrashCanScript
|
||||
dba StrengthBoulderScript
|
||||
dba SmashRockScript
|
||||
dba PokecenterSignScript
|
||||
dba MartSignScript
|
||||
dba GoldenrodRocketsScript
|
||||
dba RadioTowerRocketsScript
|
||||
dba ElevatorButtonScript
|
||||
dba DayToTextScript
|
||||
dba BugContestResultsWarpScript
|
||||
dba BugContestResultsScript
|
||||
dba InitializeEventsScript
|
||||
dba AskNumber1MScript
|
||||
dba AskNumber2MScript
|
||||
dba RegisteredNumberMScript
|
||||
dba NumberAcceptedMScript
|
||||
dba NumberDeclinedMScript
|
||||
dba PhoneFullMScript
|
||||
dba RematchMScript
|
||||
dba GiftMScript
|
||||
dba PackFullMScript
|
||||
dba RematchGiftMScript
|
||||
dba AskNumber1FScript
|
||||
dba AskNumber2FScript
|
||||
dba RegisteredNumberFScript
|
||||
dba NumberAcceptedFScript
|
||||
dba NumberDeclinedFScript
|
||||
dba PhoneFullFScript
|
||||
dba RematchFScript
|
||||
dba GiftFScript
|
||||
dba PackFullFScript
|
||||
dba RematchGiftFScript
|
||||
dba GymStatue1Script
|
||||
dba GymStatue2Script
|
||||
dba ReceiveItemScript
|
||||
dba ReceiveTogepiEggScript
|
||||
dba PCScript
|
||||
dba GameCornerCoinVendorScript
|
||||
dba HappinessCheckScript
|
||||
add_stdscript PokecenterNurseScript
|
||||
add_stdscript DifficultBookshelfScript
|
||||
add_stdscript PictureBookshelfScript
|
||||
add_stdscript MagazineBookshelfScript
|
||||
add_stdscript TeamRocketOathScript
|
||||
add_stdscript IncenseBurnerScript
|
||||
add_stdscript MerchandiseShelfScript
|
||||
add_stdscript TownMapScript
|
||||
add_stdscript WindowScript
|
||||
add_stdscript TVScript
|
||||
add_stdscript HomepageScript
|
||||
add_stdscript Radio1Script
|
||||
add_stdscript Radio2Script
|
||||
add_stdscript TrashCanScript
|
||||
add_stdscript StrengthBoulderScript
|
||||
add_stdscript SmashRockScript
|
||||
add_stdscript PokecenterSignScript
|
||||
add_stdscript MartSignScript
|
||||
add_stdscript GoldenrodRocketsScript
|
||||
add_stdscript RadioTowerRocketsScript
|
||||
add_stdscript ElevatorButtonScript
|
||||
add_stdscript DayToTextScript
|
||||
add_stdscript BugContestResultsWarpScript
|
||||
add_stdscript BugContestResultsScript
|
||||
add_stdscript InitializeEventsScript
|
||||
add_stdscript AskNumber1MScript
|
||||
add_stdscript AskNumber2MScript
|
||||
add_stdscript RegisteredNumberMScript
|
||||
add_stdscript NumberAcceptedMScript
|
||||
add_stdscript NumberDeclinedMScript
|
||||
add_stdscript PhoneFullMScript
|
||||
add_stdscript RematchMScript
|
||||
add_stdscript GiftMScript
|
||||
add_stdscript PackFullMScript
|
||||
add_stdscript RematchGiftMScript
|
||||
add_stdscript AskNumber1FScript
|
||||
add_stdscript AskNumber2FScript
|
||||
add_stdscript RegisteredNumberFScript
|
||||
add_stdscript NumberAcceptedFScript
|
||||
add_stdscript NumberDeclinedFScript
|
||||
add_stdscript PhoneFullFScript
|
||||
add_stdscript RematchFScript
|
||||
add_stdscript GiftFScript
|
||||
add_stdscript PackFullFScript
|
||||
add_stdscript RematchGiftFScript
|
||||
add_stdscript GymStatue1Script
|
||||
add_stdscript GymStatue2Script
|
||||
add_stdscript ReceiveItemScript
|
||||
add_stdscript ReceiveTogepiEggScript
|
||||
add_stdscript PCScript
|
||||
add_stdscript GameCornerCoinVendorScript
|
||||
add_stdscript HappinessCheckScript
|
||||
|
||||
PokecenterNurseScript:
|
||||
; EVENT_WELCOMED_TO_POKECOM_CENTER is never set
|
||||
|
@ -22,7 +22,7 @@ Script_Whiteout:
|
||||
endall
|
||||
|
||||
.bug_contest
|
||||
jumpstd bugcontestresultswarp
|
||||
jumpstd BugContestResultsWarpScript
|
||||
|
||||
.WhitedOutText:
|
||||
text_far _WhitedOutText
|
||||
|
@ -48,14 +48,10 @@ AnimateMon_HOF:
|
||||
|
||||
pokeanim: MACRO
|
||||
rept _NARG
|
||||
; Workaround for a bug where macro args can't come after the start of a symbol
|
||||
if !DEF(\1_POKEANIM)
|
||||
\1_POKEANIM EQUS "PokeAnim_\1_"
|
||||
endc
|
||||
db (\1_POKEANIM - PokeAnim_SetupCommands) / 2
|
||||
db (PokeAnim_\1_SetupCommand - PokeAnim_SetupCommands) / 2
|
||||
shift
|
||||
endr
|
||||
db (PokeAnim_Finish_ - PokeAnim_SetupCommands) / 2
|
||||
db (PokeAnim_Finish_SetupCommand - PokeAnim_SetupCommands) / 2
|
||||
ENDM
|
||||
|
||||
PokeAnims:
|
||||
@ -132,22 +128,24 @@ SetUpPokeAnim:
|
||||
scf
|
||||
ret
|
||||
|
||||
PokeAnim_SetupCommands:
|
||||
setup_command: MACRO
|
||||
\1_: dw \1
|
||||
add_setup_command: MACRO
|
||||
\1_SetupCommand:
|
||||
dw \1
|
||||
ENDM
|
||||
setup_command PokeAnim_Finish
|
||||
setup_command PokeAnim_BasePic
|
||||
setup_command PokeAnim_SetWait
|
||||
setup_command PokeAnim_Wait
|
||||
setup_command PokeAnim_Setup
|
||||
setup_command PokeAnim_Setup2
|
||||
setup_command PokeAnim_Idle
|
||||
setup_command PokeAnim_Play
|
||||
setup_command PokeAnim_Play2
|
||||
setup_command PokeAnim_Cry
|
||||
setup_command PokeAnim_CryNoWait
|
||||
setup_command PokeAnim_StereoCry
|
||||
|
||||
PokeAnim_SetupCommands:
|
||||
add_setup_command PokeAnim_Finish
|
||||
add_setup_command PokeAnim_BasePic
|
||||
add_setup_command PokeAnim_SetWait
|
||||
add_setup_command PokeAnim_Wait
|
||||
add_setup_command PokeAnim_Setup
|
||||
add_setup_command PokeAnim_Setup2
|
||||
add_setup_command PokeAnim_Idle
|
||||
add_setup_command PokeAnim_Play
|
||||
add_setup_command PokeAnim_Play2
|
||||
add_setup_command PokeAnim_Cry
|
||||
add_setup_command PokeAnim_CryNoWait
|
||||
add_setup_command PokeAnim_StereoCry
|
||||
|
||||
PokeAnim_SetWait:
|
||||
ld a, 18
|
||||
|
@ -1107,7 +1107,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived:
|
||||
ld d, $0
|
||||
ld b, CHECK_FLAG
|
||||
ld hl, sMysteryGiftDecorationsReceived
|
||||
predef_id SmallFarFlagAction
|
||||
lda_predef SmallFarFlagAction
|
||||
push hl
|
||||
push bc
|
||||
call Predef
|
||||
|
@ -327,3 +327,57 @@ text_jump EQUS "text_far"
|
||||
anim_enemyfeetobj EQUS "anim_battlergfx_2row"
|
||||
anim_playerheadobj EQUS "anim_battlergfx_1row"
|
||||
anim_clearsprites EQUS "anim_keepsprites"
|
||||
|
||||
; engine/events/std_scripts.asm
|
||||
pokecenternurse EQUS "PokecenterNurseScript"
|
||||
difficultbookshelf EQUS "DifficultBookshelfScript"
|
||||
picturebookshelf EQUS "PictureBookshelfScript"
|
||||
magazinebookshelf EQUS "MagazineBookshelfScript"
|
||||
teamrocketoath EQUS "TeamRocketOathScript"
|
||||
incenseburner EQUS "IncenseBurnerScript"
|
||||
merchandiseshelf EQUS "MerchandiseShelfScript"
|
||||
townmap EQUS "TownMapScript"
|
||||
window EQUS "WindowScript"
|
||||
tv EQUS "TVScript"
|
||||
homepage EQUS "HomepageScript"
|
||||
radio1 EQUS "Radio1Script"
|
||||
radio2 EQUS "Radio2Script"
|
||||
trashcan EQUS "TrashCanScript"
|
||||
strengthboulder EQUS "StrengthBoulderScript"
|
||||
smashrock EQUS "SmashRockScript"
|
||||
pokecentersign EQUS "PokecenterSignScript"
|
||||
martsign EQUS "MartSignScript"
|
||||
goldenrodrockets EQUS "GoldenrodRocketsScript"
|
||||
radiotowerrockets EQUS "RadioTowerRocketsScript"
|
||||
elevatorbutton EQUS "ElevatorButtonScript"
|
||||
daytotext EQUS "DayToTextScript"
|
||||
bugcontestresultswarp EQUS "BugContestResultsWarpScript"
|
||||
bugcontestresults EQUS "BugContestResultsScript"
|
||||
initializeevents EQUS "InitializeEventsScript"
|
||||
asknumber1m EQUS "AskNumber1MScript"
|
||||
asknumber2m EQUS "AskNumber2MScript"
|
||||
registerednumberm EQUS "RegisteredNumberMScript"
|
||||
numberacceptedm EQUS "NumberAcceptedMScript"
|
||||
numberdeclinedm EQUS "NumberDeclinedMScript"
|
||||
phonefullm EQUS "PhoneFullMScript"
|
||||
rematchm EQUS "RematchMScript"
|
||||
giftm EQUS "GiftMScript"
|
||||
packfullm EQUS "PackFullMScript"
|
||||
rematchgiftm EQUS "RematchGiftMScript"
|
||||
asknumber1f EQUS "AskNumber1FScript"
|
||||
asknumber2f EQUS "AskNumber2FScript"
|
||||
registerednumberf EQUS "RegisteredNumberFScript"
|
||||
numberacceptedf EQUS "NumberAcceptedFScript"
|
||||
numberdeclinedf EQUS "NumberDeclinedFScript"
|
||||
phonefullf EQUS "PhoneFullFScript"
|
||||
rematchf EQUS "RematchFScript"
|
||||
giftf EQUS "GiftFScript"
|
||||
packfullf EQUS "PackFullFScript"
|
||||
rematchgiftf EQUS "RematchGiftFScript"
|
||||
gymstatue1 EQUS "GymStatue1Script"
|
||||
gymstatue2 EQUS "GymStatue2Script"
|
||||
receiveitem EQUS "ReceiveItemScript"
|
||||
receivetogepiegg EQUS "ReceiveTogepiEggScript"
|
||||
pcscript EQUS "PCScript"
|
||||
gamecornercoinvendor EQUS "GameCornerCoinVendorScript"
|
||||
happinesschecknpc EQUS "HappinessCheckScript"
|
||||
|
@ -1,15 +1,15 @@
|
||||
predef_id: MACRO
|
||||
lda_predef: MACRO
|
||||
; Some functions load the predef id
|
||||
; without immediately calling Predef.
|
||||
ld a, (\1Predef - PredefPointers) / 3
|
||||
ENDM
|
||||
|
||||
predef: MACRO
|
||||
predef_id \1
|
||||
lda_predef \1
|
||||
call Predef
|
||||
ENDM
|
||||
|
||||
predef_jump: MACRO
|
||||
predef_id \1
|
||||
lda_predef \1
|
||||
jp Predef
|
||||
ENDM
|
||||
|
@ -80,13 +80,13 @@ ENDM
|
||||
enum jumpstd_command ; $0c
|
||||
jumpstd: MACRO
|
||||
db jumpstd_command
|
||||
dw \1 ; predefined_script
|
||||
dw (\1StdScript - StdScripts) / 3
|
||||
ENDM
|
||||
|
||||
enum callstd_command ; $0d
|
||||
callstd: MACRO
|
||||
db callstd_command
|
||||
dw \1 ; predefined_script
|
||||
dw (\1StdScript - StdScripts) / 3
|
||||
ENDM
|
||||
|
||||
enum callasm_command ; $0e
|
||||
|
@ -62,10 +62,10 @@ AzaleaGymActivateRockets:
|
||||
end
|
||||
|
||||
.GoldenrodRockets:
|
||||
jumpstd goldenrodrockets
|
||||
jumpstd GoldenrodRocketsScript
|
||||
|
||||
.RadioTowerRockets:
|
||||
jumpstd radiotowerrockets
|
||||
jumpstd RadioTowerRocketsScript
|
||||
|
||||
TrainerTwinsAmyandmay1:
|
||||
trainer TWINS, AMYANDMAY1, EVENT_BEAT_TWINS_AMY_AND_MAY, TwinsAmyandmay1SeenText, TwinsAmyandmay1BeatenText, 0, .AfterScript
|
||||
@ -142,10 +142,10 @@ AzaleaGymGuyScript:
|
||||
AzaleaGymStatue:
|
||||
checkflag ENGINE_HIVEBADGE
|
||||
iftrue .Beaten
|
||||
jumpstd gymstatue1
|
||||
jumpstd GymStatue1Script
|
||||
.Beaten:
|
||||
gettrainername STRING_BUFFER_4, BUGSY, BUGSY1
|
||||
jumpstd gymstatue2
|
||||
jumpstd GymStatue2Script
|
||||
|
||||
BugsyText_INeverLose:
|
||||
text "I'm BUGSY!"
|
||||
|
@ -14,7 +14,7 @@ AzaleaPokecenter1F_MapScripts:
|
||||
end
|
||||
|
||||
AzaleaPokecenter1FNurseScript:
|
||||
jumpstd pokecenternurse
|
||||
jumpstd PokecenterNurseScript
|
||||
|
||||
AzaleaPokecenter1FGentlemanScript:
|
||||
jumptextfaceplayer AzaleaPokecenter1FGentlemanText
|
||||
|
@ -200,10 +200,10 @@ AzaleaTownIlextForestSign:
|
||||
jumptext AzaleaTownIlexForestSignText
|
||||
|
||||
AzaleaTownPokecenterSign:
|
||||
jumpstd pokecentersign
|
||||
jumpstd PokecenterSignScript
|
||||
|
||||
AzaleaTownMartSign:
|
||||
jumpstd martsign
|
||||
jumpstd MartSignScript
|
||||
|
||||
WhiteApricornTree:
|
||||
fruittree FRUITTREE_AZALEA_TOWN
|
||||
|
@ -98,13 +98,13 @@ BillsSisterScript:
|
||||
sjump .Refused
|
||||
|
||||
BillsHouseBookshelf1:
|
||||
jumpstd picturebookshelf
|
||||
jumpstd PictureBookshelfScript
|
||||
|
||||
BillsHouseBookshelf2:
|
||||
jumpstd magazinebookshelf
|
||||
jumpstd MagazineBookshelfScript
|
||||
|
||||
BillsHouseRadio:
|
||||
jumpstd radio2
|
||||
jumpstd Radio2Script
|
||||
|
||||
BillTakeThisEeveeText:
|
||||
text "BILL: Hi, <PLAYER>!"
|
||||
|
@ -137,10 +137,10 @@ BlackthornCityTrainerTips:
|
||||
jumptext BlackthornCityTrainerTipsText
|
||||
|
||||
BlackthornCityPokecenterSign:
|
||||
jumpstd pokecentersign
|
||||
jumpstd PokecenterSignScript
|
||||
|
||||
BlackthornCityMartSign:
|
||||
jumpstd martsign
|
||||
jumpstd MartSignScript
|
||||
|
||||
Text_ClairIsOut:
|
||||
text "I am sorry."
|
||||
|
@ -20,11 +20,11 @@ BlackthornDragonSpeechHouseDratiniScript:
|
||||
|
||||
; unused
|
||||
BlackthornDragonSpeechHousePictureBookshelf:
|
||||
jumpstd picturebookshelf
|
||||
jumpstd PictureBookshelfScript
|
||||
|
||||
; unused
|
||||
BlackthornDragonSpeechHouseMagazineBookshelf:
|
||||
jumpstd magazinebookshelf
|
||||
jumpstd MagazineBookshelfScript
|
||||
|
||||
BlackthornDragonSpeechHouseGrannyText:
|
||||
text "A clan of trainers"
|
||||
|
@ -15,7 +15,7 @@ Emy:
|
||||
end
|
||||
|
||||
EmysHouseBookshelf:
|
||||
jumpstd magazinebookshelf
|
||||
jumpstd MagazineBookshelfScript
|
||||
|
||||
BlackthornEmysHouse_MapEvents:
|
||||
db 0, 0 ; filler
|
||||
|
@ -142,10 +142,10 @@ BlackthornGymGuyScript:
|
||||
BlackthornGymStatue:
|
||||
checkflag ENGINE_RISINGBADGE
|
||||
iftrue .Beaten
|
||||
jumpstd gymstatue1
|
||||
jumpstd GymStatue1Script
|
||||
.Beaten:
|
||||
gettrainername STRING_BUFFER_4, CLAIR, CLAIR1
|
||||
jumpstd gymstatue2
|
||||
jumpstd GymStatue2Script
|
||||
|
||||
ClairIntroText:
|
||||
text "I am CLAIR."
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user