From 8fa8e29170fe78a7f9ed1b2396935af47e16c0c1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 13 Jul 2015 02:23:48 -0400 Subject: [PATCH] - Update variable sprites to use constants rather than fixed values --- constants/map_constants.asm | 8 ++++---- engine/std_scripts.asm | 18 +++++++++--------- macros.asm | 8 -------- macros/event.asm | 2 +- maps/CopycatsHouse2F.asm | 14 +++++++------- maps/FuchsiaGym.asm | 32 ++++++++++++++++---------------- maps/FuchsiaPokeCenter1F.asm | 4 ++-- maps/OlivineCity.asm | 4 ++-- maps/Route36.asm | 4 ++-- maps/SlowpokeWellB1F.asm | 2 +- 10 files changed, 44 insertions(+), 52 deletions(-) diff --git a/constants/map_constants.asm b/constants/map_constants.asm index 0be01cade..0067ca9ed 100644 --- a/constants/map_constants.asm +++ b/constants/map_constants.asm @@ -627,10 +627,10 @@ SPRITE_VARS EQU const_value const SPRITE_WEIRD_TREE const SPRITE_OLIVINE_RIVAL const SPRITE_AZALEA_ROCKET - const SPRITE_FUSCHIA_GYM_1 - const SPRITE_FUSCHIA_GYM_2 - const SPRITE_FUSCHIA_GYM_3 - const SPRITE_FUSCHIA_GYM_4 + const SPRITE_FUCHSIA_GYM_1 + const SPRITE_FUCHSIA_GYM_2 + const SPRITE_FUCHSIA_GYM_3 + const SPRITE_FUCHSIA_GYM_4 const SPRITE_COPYCAT const SPRITE_JANINE_IMPERSONATOR diff --git a/engine/std_scripts.asm b/engine/std_scripts.asm index 763ae0908..4315a07f1 100644 --- a/engine/std_scripts.asm +++ b/engine/std_scripts.asm @@ -597,15 +597,15 @@ InitializeEventsScript: setevent EVENT_7CF setflag ENGINE_ROCKET_SIGNAL_ON_CH20 setflag ENGINE_ROCKETS_IN_MAHOGANY - variablesprite $4, $52 - variablesprite $5, $4 - variablesprite $6, $35 - variablesprite $7, $a - variablesprite $8, $a - variablesprite $9, $a - variablesprite $a, $a - variablesprite $b, $28 - variablesprite $c, $28 + variablesprite SPRITE_WEIRD_TREE, SPRITE_SUDOWOODO + variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SILVER + variablesprite SPRITE_AZALEA_ROCKET, SPRITE_ROCKET + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_JANINE + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_JANINE + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_JANINE + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_JANINE + variablesprite SPRITE_COPYCAT, SPRITE_LASS + variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS setevent EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM setevent EVENT_76D setevent EVENT_76C diff --git a/macros.asm b/macros.asm index de576302a..cbd071b8f 100644 --- a/macros.asm +++ b/macros.asm @@ -44,14 +44,6 @@ dbwww: MACRO dw \2, \3, \4 ENDM -dbankaddr: MACRO - dbw BANK(\1), \1 - ENDM - -daddrbank: MACRO - dwb \1, BANK(\1) - ENDM - dn: MACRO rept _NARG / 2 db (\1) << 4 + (\2) diff --git a/macros/event.asm b/macros/event.asm index 893d55fe6..678648a04 100644 --- a/macros/event.asm +++ b/macros/event.asm @@ -690,7 +690,7 @@ faceperson: macro enum variablesprite_command variablesprite: macro db variablesprite_command - db \1 ; byte + db \1 - SPRITE_VARS ; byte db \2 ; sprite endm diff --git a/maps/CopycatsHouse2F.asm b/maps/CopycatsHouse2F.asm index caa96bf15..fc95f7ecb 100644 --- a/maps/CopycatsHouse2F.asm +++ b/maps/CopycatsHouse2F.asm @@ -33,13 +33,13 @@ Copycat: iftrue .Part1 applymovement $2, MovementData_0x18afd0 faceplayer - variablesprite $b, $1 + variablesprite SPRITE_COPYCAT, SPRITE_CHRIS jump .Part2 .Part1 applymovement $7, MovementData_0x18afd0 faceplayer - variablesprite $b, $60 + variablesprite SPRITE_COPYCAT, SPRITE_KRIS .Part2 special Function14209 checkevent EVENT_RETURNED_MACHINE_PART @@ -64,7 +64,7 @@ Copycat: applymovement $7, MovementData_0x18afd0 .Part6 faceplayer - variablesprite $b, $28 + variablesprite SPRITE_COPYCAT, SPRITE_LASS special Function14209 loadfont writetext UnknownText_0x18b028 @@ -93,7 +93,7 @@ Copycat: applymovement $7, MovementData_0x18afd0 .Part11 faceplayer - variablesprite $b, $28 + variablesprite SPRITE_COPYCAT, SPRITE_LASS special Function14209 loadfont writetext UnknownText_0x18b116 @@ -129,13 +129,13 @@ Copycat: iftrue .Part16 applymovement $2, MovementData_0x18afd0 faceplayer - variablesprite $b, $1 + variablesprite SPRITE_COPYCAT, SPRITE_CHRIS jump .Part17 .Part16 applymovement $7, MovementData_0x18afd0 faceplayer - variablesprite $b, $60 + variablesprite SPRITE_COPYCAT, SPRITE_KRIS .Part17 special Function14209 loadfont @@ -158,7 +158,7 @@ Copycat: applymovement $7, MovementData_0x18afd0 .Part21 faceplayer - variablesprite $b, $28 + variablesprite SPRITE_COPYCAT, SPRITE_LASS special Function14209 loadfont writetext UnknownText_0x18b2f5 diff --git a/maps/FuchsiaGym.asm b/maps/FuchsiaGym.asm index acc1c3898..550edb6d0 100644 --- a/maps/FuchsiaGym.asm +++ b/maps/FuchsiaGym.asm @@ -23,10 +23,10 @@ JanineScript_0x195db9: setevent EVENT_BEAT_LASS_LINDA setevent EVENT_BEAT_PICNICKER_CINDY setevent EVENT_BEAT_CAMPER_BARRY - variablesprite $7, $28 - variablesprite $8, $28 - variablesprite $9, $28 - variablesprite $a, $27 + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_LASS + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER special Function14209 loadfont writetext UnknownText_0x195feb @@ -56,7 +56,7 @@ FuschiaGym1Script_0x195e1b: iftrue UnknownScript_0x195e2c applymovement $3, MovementData_0x195f27 faceplayer - variablesprite $7, $28 + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_LASS special Function14209 UnknownScript_0x195e2c: faceplayer @@ -75,7 +75,7 @@ UnknownScript_0x195e2c: end UnknownScript_0x195e4a: - variablesprite $7, $a + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_JANINE returnafterbattle end @@ -90,7 +90,7 @@ FuschiaGym2Script_0x195e55: iftrue UnknownScript_0x195e66 applymovement $4, MovementData_0x195f27 faceplayer - variablesprite $8, $28 + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS special Function14209 UnknownScript_0x195e66: faceplayer @@ -109,7 +109,7 @@ UnknownScript_0x195e66: end UnknownScript_0x195e84: - variablesprite $8, $a + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_JANINE returnafterbattle end @@ -124,7 +124,7 @@ FuschiaGym3Script_0x195e8f: iftrue UnknownScript_0x195ea0 applymovement $5, MovementData_0x195f27 faceplayer - variablesprite $9, $28 + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS special Function14209 UnknownScript_0x195ea0: faceplayer @@ -143,7 +143,7 @@ UnknownScript_0x195ea0: end UnknownScript_0x195ebe: - variablesprite $9, $a + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_JANINE returnafterbattle end @@ -158,7 +158,7 @@ FuschiaGym4Script_0x195ec9: iftrue UnknownScript_0x195eda applymovement $6, MovementData_0x195f27 faceplayer - variablesprite $a, $27 + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER special Function14209 UnknownScript_0x195eda: faceplayer @@ -177,7 +177,7 @@ UnknownScript_0x195eda: end UnknownScript_0x195ef8: - variablesprite $a, $a + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_JANINE returnafterbattle end @@ -392,8 +392,8 @@ FuchsiaGym_MapEventHeader: ; people-events db 6 person_event SPRITE_JANINE, 14, 5, $3, $0, 255, 255, $90, 0, JanineScript_0x195db9, -1 - person_event SPRITE_FUSCHIA_GYM_1, 11, 9, $a, $0, 255, 255, $90, 0, FuschiaGym1Script_0x195e1b, -1 - person_event SPRITE_FUSCHIA_GYM_2, 15, 9, $a, $0, 255, 255, $90, 0, FuschiaGym2Script_0x195e55, -1 - person_event SPRITE_FUSCHIA_GYM_3, 8, 13, $a, $0, 255, 255, $90, 0, FuschiaGym3Script_0x195e8f, -1 - person_event SPRITE_FUSCHIA_GYM_4, 6, 8, $a, $0, 255, 255, $90, 0, FuschiaGym4Script_0x195ec9, -1 + person_event SPRITE_FUCHSIA_GYM_1, 11, 9, $a, $0, 255, 255, $90, 0, FuschiaGym1Script_0x195e1b, -1 + person_event SPRITE_FUCHSIA_GYM_2, 15, 9, $a, $0, 255, 255, $90, 0, FuschiaGym2Script_0x195e55, -1 + person_event SPRITE_FUCHSIA_GYM_3, 8, 13, $a, $0, 255, 255, $90, 0, FuschiaGym3Script_0x195e8f, -1 + person_event SPRITE_FUCHSIA_GYM_4, 6, 8, $a, $0, 255, 255, $90, 0, FuschiaGym4Script_0x195ec9, -1 person_event SPRITE_GYM_GUY, 19, 11, $6, $0, 255, 255, $90, 0, FuchsiaGymGuyScript, -1 diff --git a/maps/FuchsiaPokeCenter1F.asm b/maps/FuchsiaPokeCenter1F.asm index 389ea1130..c962cc0cf 100644 --- a/maps/FuchsiaPokeCenter1F.asm +++ b/maps/FuchsiaPokeCenter1F.asm @@ -28,7 +28,7 @@ JanineImpersonatorScript_0x196462: loadmovesprites applymovement $5, MovementData_0x196486 faceplayer - variablesprite $c, $a + variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_JANINE special Function14209 loadfont writetext UnknownText_0x19654e @@ -36,7 +36,7 @@ JanineImpersonatorScript_0x196462: loadmovesprites applymovement $5, MovementData_0x196486 faceplayer - variablesprite $c, $28 + variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS special Function14209 end diff --git a/maps/OlivineCity.asm b/maps/OlivineCity.asm index 302bc8730..a6b03a426 100644 --- a/maps/OlivineCity.asm +++ b/maps/OlivineCity.asm @@ -42,7 +42,7 @@ UnknownScript_0x1a8833: dotrigger $1 disappear $5 special RestartMapMusic - variablesprite $5, $31 + variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY special Function14209 end @@ -66,7 +66,7 @@ UnknownScript_0x1a886b: disappear $5 dotrigger $1 special RestartMapMusic - variablesprite $5, $31 + variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY special Function14209 end diff --git a/maps/Route36.asm b/maps/Route36.asm index 94847c31d..f63cad50a 100644 --- a/maps/Route36.asm +++ b/maps/Route36.asm @@ -76,7 +76,7 @@ WateredWeirdTreeScript:: setevent EVENT_FOUGHT_SUDOWOODO if_equal $2, UnknownScript_0x19407b disappear $4 - variablesprite $4, $26 + variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN returnafterbattle end @@ -88,7 +88,7 @@ UnknownScript_0x19407b: returnafterbattle applymovement $4, MovementData_0x19424b disappear $4 - variablesprite $4, $26 + variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN special Function14209 special Function14168 end diff --git a/maps/SlowpokeWellB1F.asm b/maps/SlowpokeWellB1F.asm index a27f0cacb..1f2e0fcb6 100644 --- a/maps/SlowpokeWellB1F.asm +++ b/maps/SlowpokeWellB1F.asm @@ -77,7 +77,7 @@ GruntM1Script: closetext loadmovesprites setevent EVENT_CLEARED_SLOWPOKE_WELL - variablesprite $6, $4 + variablesprite SPRITE_AZALEA_ROCKET, SPRITE_SILVER domaptrigger GROUP_AZALEA_TOWN, MAP_AZALEA_TOWN, $1 clearevent EVENT_6F3 clearevent EVENT_6E9