- Update variable sprites to use constants rather than fixed values

This commit is contained in:
PikalaxALT 2015-07-13 02:23:48 -04:00
parent 3a9f537f8a
commit 8fa8e29170
10 changed files with 44 additions and 52 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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