ref: 8fa8e29170fe78a7f9ed1b2396935af47e16c0c1
parent: 3a9f537f8a8891957c665c5e0ede645390ec2384
author: PikalaxALT <PikalaxALT@gmail.com>
date: Sun Jul 12 22:23:48 EDT 2015
- Update variable sprites to use constants rather than fixed values
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -627,10 +627,10 @@
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
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -597,15 +597,15 @@
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
--- a/macros.asm
+++ b/macros.asm
@@ -44,14 +44,6 @@
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)
--- a/macros/event.asm
+++ b/macros/event.asm
@@ -690,7 +690,7 @@
enum variablesprite_command
variablesprite: macro
db variablesprite_command
- db \1 ; byte
+ db \1 - SPRITE_VARS ; byte
db \2 ; sprite
endm
--- a/maps/CopycatsHouse2F.asm
+++ b/maps/CopycatsHouse2F.asm
@@ -33,13 +33,13 @@
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 @@
applymovement $7, MovementData_0x18afd0
.Part6
faceplayer
- variablesprite $b, $28
+ variablesprite SPRITE_COPYCAT, SPRITE_LASS
special Function14209
loadfont
writetext UnknownText_0x18b028
@@ -93,7 +93,7 @@
applymovement $7, MovementData_0x18afd0
.Part11
faceplayer
- variablesprite $b, $28
+ variablesprite SPRITE_COPYCAT, SPRITE_LASS
special Function14209
loadfont
writetext UnknownText_0x18b116
@@ -129,13 +129,13 @@
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 @@
applymovement $7, MovementData_0x18afd0
.Part21
faceplayer
- variablesprite $b, $28
+ variablesprite SPRITE_COPYCAT, SPRITE_LASS
special Function14209
loadfont
writetext UnknownText_0x18b2f5
--- a/maps/FuchsiaGym.asm
+++ b/maps/FuchsiaGym.asm
@@ -23,10 +23,10 @@
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 @@
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 @@
end
UnknownScript_0x195e4a:
- variablesprite $7, $a
+ variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_JANINE
returnafterbattle
end
@@ -90,7 +90,7 @@
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 @@
end
UnknownScript_0x195e84:
- variablesprite $8, $a
+ variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_JANINE
returnafterbattle
end
@@ -124,7 +124,7 @@
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 @@
end
UnknownScript_0x195ebe:
- variablesprite $9, $a
+ variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_JANINE
returnafterbattle
end
@@ -158,7 +158,7 @@
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 @@
end
UnknownScript_0x195ef8:
- variablesprite $a, $a
+ variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_JANINE
returnafterbattle
end
@@ -392,8 +392,8 @@
; 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
--- a/maps/FuchsiaPokeCenter1F.asm
+++ b/maps/FuchsiaPokeCenter1F.asm
@@ -28,7 +28,7 @@
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 @@
loadmovesprites
applymovement $5, MovementData_0x196486
faceplayer
- variablesprite $c, $28
+ variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS
special Function14209
end
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -42,7 +42,7 @@
dotrigger $1
disappear $5
special RestartMapMusic
- variablesprite $5, $31
+ variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
special Function14209
end
@@ -66,7 +66,7 @@
disappear $5
dotrigger $1
special RestartMapMusic
- variablesprite $5, $31
+ variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
special Function14209
end
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -76,7 +76,7 @@
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 @@
returnafterbattle
applymovement $4, MovementData_0x19424b
disappear $4
- variablesprite $4, $26
+ variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN
special Function14209
special Function14168
end
--- a/maps/SlowpokeWellB1F.asm
+++ b/maps/SlowpokeWellB1F.asm
@@ -77,7 +77,7 @@
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