ref: de39851f4a06da54856b1da36edf92e3ab9fb9cc
parent: 070c9649645f564c081bfaedbe07b64191868e2d
author: U-Daniel-PC\Daniel <corrnondacqb@yahoo.com>
date: Thu Sep 25 15:21:49 EDT 2014
Make Hide/Show objects more dynamic be on the look out for more static ids in the wild unused constants are still included because a script could be written to check whether the player has picked up an item/fought a legendary etc.
--- a/constants.asm
+++ b/constants.asm
@@ -27,6 +27,7 @@
INCLUDE "constants/map_constants.asm"
INCLUDE "constants/map_dimensions.asm"
INCLUDE "constants/connection_constants.asm"
+INCLUDE "constants/hide_show_constants.asm"
INCLUDE "constants/credits_constants.asm"
INCLUDE "constants/music_constants.asm"
INCLUDE "constants/tilesets.asm"
--- /dev/null
+++ b/constants/hide_show_constants.asm
@@ -1,0 +1,234 @@
+; this is a list of the sprites that can be enabled/disabled during the game
+; sprites marked with an X are constants that are never used
+; because those sprites are not (de)activated in a map's script
+; (they are either items or sprites that deactivate after battle
+; and are detected in W_MISSABLEOBJECTLIST)
+
+HS_PALLET_TOWN_OAK EQU $00
+HS_LYING_OLD_MAN EQU $01
+HS_OLD_MAN EQU $02
+HS_MUSEUM_GUY EQU $03
+HS_GYM_GUY EQU $04
+HS_CERULEAN_RIVAL EQU $05
+HS_CERULEAN_ROCKET EQU $06
+HS_CERULEAN_GUARD_1 EQU $07
+HS_UNKNOWN_DUNGEON_GUY EQU $08
+HS_CERULEAN_GUARD_2 EQU $09
+HS_SAFFRON_CITY_1 EQU $0A
+HS_SAFFRON_CITY_2 EQU $0B
+HS_SAFFRON_CITY_3 EQU $0C
+HS_SAFFRON_CITY_4 EQU $0D
+HS_SAFFRON_CITY_5 EQU $0E
+HS_SAFFRON_CITY_6 EQU $0F
+HS_SAFFRON_CITY_7 EQU $10
+HS_SAFFRON_CITY_8 EQU $11
+HS_SAFFRON_CITY_9 EQU $12
+HS_SAFFRON_CITY_A EQU $13
+HS_SAFFRON_CITY_B EQU $14
+HS_SAFFRON_CITY_C EQU $15
+HS_SAFFRON_CITY_D EQU $16
+HS_SAFFRON_CITY_E EQU $17
+HS_SAFFRON_CITY_F EQU $18
+HS_ROUTE_2_ITEM_1 EQU $19 ; X
+HS_ROUTE_2_ITEM_2 EQU $1A ; X
+HS_ROUTE_4_ITEM EQU $1B ; X
+HS_ROUTE_9_ITEM EQU $1C ; X
+HS_ROUTE_12_SNORLAX EQU $1D
+HS_ROUTE_12_ITEM_1 EQU $1E ; X
+HS_ROUTE_12_ITEM_2 EQU $1F ; X
+HS_ROUTE_15_ITEM EQU $20 ; X
+HS_ROUTE_16_SNORLAX EQU $21
+HS_ROUTE_22_RIVAL_1 EQU $22
+HS_ROUTE_22_RIVAL_2 EQU $23
+HS_NUGGET_BRIDGE_GUY EQU $24
+HS_ROUTE_24_ITEM EQU $25 ; X
+HS_ROUTE_25_ITEM EQU $26 ; X
+HS_DAISY_SITTING EQU $27
+HS_DAISY_WALKING EQU $28
+HS_TOWN_MAP EQU $29
+HS_OAKS_LAB_RIVAL EQU $2A
+HS_STARTER_BALL_1 EQU $2B
+HS_STARTER_BALL_2 EQU $2C
+HS_STARTER_BALL_3 EQU $2D
+HS_OAKS_LAB_OAK_1 EQU $2E
+HS_POKEDEX_1 EQU $2F
+HS_POKEDEX_2 EQU $30
+HS_OAKS_LAB_OAK_2 EQU $31
+HS_VIRIDIAN_GYM_GIOVANNI EQU $32
+HS_VIRIDIAN_GYM_ITEM EQU $33 ; X
+HS_OLD_AMBER EQU $34
+HS_UNKNOWN_DUNGEON_1_ITEM_1 EQU $35 ; X
+HS_UNKNOWN_DUNGEON_1_ITEM_2 EQU $36 ; X
+HS_UNKNOWN_DUNGEON_1_ITEM_3 EQU $37 ; X
+HS_POKEMONTOWER_2_RIVAL EQU $38
+HS_POKEMONTOWER_3_ITEM EQU $39 ; X
+HS_POKEMONTOWER_4_ITEM_1 EQU $3A ; X
+HS_POKEMONTOWER_4_ITEM_2 EQU $3B ; X
+HS_POKEMONTOWER_4_ITEM_3 EQU $3C ; X
+HS_POKEMONTOWER_5_ITEM EQU $3D ; X
+HS_POKEMONTOWER_6_ITEM_1 EQU $3E ; X
+HS_POKEMONTOWER_6_ITEM_2 EQU $3F ; X
+HS_POKEMONTOWER_7_ROCKET_1 EQU $40 ; X
+HS_POKEMONTOWER_7_ROCKET_2 EQU $41 ; X
+HS_POKEMONTOWER_7_ROCKET_3 EQU $42 ; X
+HS_POKEMONTOWER_7_MR_FUJI EQU $43
+HS_LAVENDER_HOUSE_1_MR_FUJI EQU $44
+HS_CELADON_MANSION_5_GIFT EQU $45
+HS_GAME_CORNER_ROCKET EQU $46
+HS_FUCHSIA_HOUSE_2_ITEM EQU $47 ; X
+HS_MANSION_1_ITEM_1 EQU $48 ; X
+HS_MANSION_1_ITEM_2 EQU $49 ; X
+HS_FIGHTING_DOJO_GIFT_1 EQU $4A
+HS_FIGHTING_DOJO_GIFT_2 EQU $4B
+HS_SILPH_CO_1F_1 EQU $4C
+HS_VOLTORB_1 EQU $4D ; X
+HS_VOLTORB_2 EQU $4E ; X
+HS_VOLTORB_3 EQU $4F ; X
+HS_ELECTRODE_1 EQU $50 ; X
+HS_VOLTORB_4 EQU $51 ; X
+HS_VOLTORB_5 EQU $52 ; X
+HS_ELECTRODE_2 EQU $53 ; X
+HS_VOLTORB_6 EQU $54 ; X
+HS_ZAPDOS EQU $55 ; X
+HS_POWER_PLANT_ITEM_1 EQU $56 ; X
+HS_POWER_PLANT_ITEM_2 EQU $57 ; X
+HS_POWER_PLANT_ITEM_3 EQU $58 ; X
+HS_POWER_PLANT_ITEM_4 EQU $59 ; X
+HS_POWER_PLANT_ITEM_5 EQU $5A ; X
+HS_MOLTRES EQU $5B ; X
+HS_VICTORY_ROAD_2_ITEM_1 EQU $5C ; X
+HS_VICTORY_ROAD_2_ITEM_2 EQU $5D ; X
+HS_VICTORY_ROAD_2_ITEM_3 EQU $5E ; X
+HS_VICTORY_ROAD_2_ITEM_4 EQU $5F ; X
+HS_VICTORY_ROAD_2_BOULDER EQU $60
+HS_BILL_POKEMON EQU $61
+HS_BILL_1 EQU $62
+HS_BILL_2 EQU $63
+HS_VIRIDIAN_FOREST_ITEM_1 EQU $64 ; X
+HS_VIRIDIAN_FOREST_ITEM_2 EQU $65 ; X
+HS_VIRIDIAN_FOREST_ITEM_3 EQU $66 ; X
+HS_MT_MOON_1_ITEM_1 EQU $67 ; X
+HS_MT_MOON_1_ITEM_2 EQU $68 ; X
+HS_MT_MOON_1_ITEM_3 EQU $69 ; X
+HS_MT_MOON_1_ITEM_4 EQU $6A ; X
+HS_MT_MOON_1_ITEM_5 EQU $6B ; X
+HS_MT_MOON_1_ITEM_6 EQU $6C ; X
+HS_MT_MOON_3_FOSSIL_1 EQU $6D
+HS_MT_MOON_3_FOSSIL_2 EQU $6E
+HS_MT_MOON_3_ITEM_1 EQU $6F ; X
+HS_MT_MOON_3_ITEM_2 EQU $70 ; X
+HS_SS_ANNE_2_RIVAL EQU $71
+HS_SS_ANNE_8_ITEM EQU $72 ; X
+HS_SS_ANNE_9_ITEM_1 EQU $73 ; X
+HS_SS_ANNE_9_ITEM_2 EQU $74 ; X
+HS_SS_ANNE_10_ITEM_1 EQU $75 ; X
+HS_SS_ANNE_10_ITEM_2 EQU $76 ; X
+HS_SS_ANNE_10_ITEM_3 EQU $77 ; X
+HS_VICTORY_ROAD_3_ITEM_1 EQU $78 ; X
+HS_VICTORY_ROAD_3_ITEM_2 EQU $79 ; X
+HS_VICTORY_ROAD_3_BOULDER EQU $7A
+HS_ROCKET_HIDEOUT_1_ITEM_1 EQU $7B ; X
+HS_ROCKET_HIDEOUT_1_ITEM_2 EQU $7C ; X
+HS_ROCKET_HIDEOUT_2_ITEM_1 EQU $7D ; X
+HS_ROCKET_HIDEOUT_2_ITEM_2 EQU $7E ; X
+HS_ROCKET_HIDEOUT_2_ITEM_3 EQU $7F ; X
+HS_ROCKET_HIDEOUT_2_ITEM_4 EQU $80 ; X
+HS_ROCKET_HIDEOUT_3_ITEM_1 EQU $81 ; X
+HS_ROCKET_HIDEOUT_3_ITEM_2 EQU $82 ; X
+HS_ROCKET_HIDEOUT_4_GIOVANNI EQU $83
+HS_ROCKET_HIDEOUT_4_ITEM_1 EQU $84 ; X
+HS_ROCKET_HIDEOUT_4_ITEM_2 EQU $85 ; X
+HS_ROCKET_HIDEOUT_4_ITEM_3 EQU $86 ; X
+HS_ROCKET_HIDEOUT_4_ITEM_4 EQU $87
+HS_ROCKET_HIDEOUT_4_ITEM_5 EQU $88
+HS_SILPH_CO_2F_1 EQU $89 ; XXX never (de)activated?
+HS_SILPH_CO_2F_2 EQU $8A
+HS_SILPH_CO_2F_3 EQU $8B
+HS_SILPH_CO_2F_4 EQU $8C
+HS_SILPH_CO_2F_5 EQU $8D
+HS_SILPH_CO_3F_1 EQU $8E
+HS_SILPH_CO_3F_2 EQU $8F
+HS_SILPH_CO_3F_3 EQU $90 ; X
+HS_SILPH_CO_4F_1 EQU $91
+HS_SILPH_CO_4F_2 EQU $92
+HS_SILPH_CO_4F_3 EQU $93
+HS_SILPH_CO_4F_4 EQU $94 ; X
+HS_SILPH_CO_4F_5 EQU $95 ; X
+HS_SILPH_CO_4F_6 EQU $96 ; X
+HS_SILPH_CO_5F_1 EQU $97
+HS_SILPH_CO_5F_2 EQU $98
+HS_SILPH_CO_5F_3 EQU $99
+HS_SILPH_CO_5F_4 EQU $9A
+HS_SILPH_CO_5F_5 EQU $9B ; X
+HS_SILPH_CO_5F_6 EQU $9C ; X
+HS_SILPH_CO_5F_7 EQU $9D ; X
+HS_SILPH_CO_6F_1 EQU $9E
+HS_SILPH_CO_6F_2 EQU $9F
+HS_SILPH_CO_6F_3 EQU $A0
+HS_SILPH_CO_6F_4 EQU $A1 ; X
+HS_SILPH_CO_6F_5 EQU $A2 ; X
+HS_SILPH_CO_7F_1 EQU $A3
+HS_SILPH_CO_7F_2 EQU $A4
+HS_SILPH_CO_7F_3 EQU $A5
+HS_SILPH_CO_7F_4 EQU $A6
+HS_SILPH_CO_7F_5 EQU $A7
+HS_SILPH_CO_7F_6 EQU $A8 ; X
+HS_SILPH_CO_7F_7 EQU $A9 ; X
+HS_SILPH_CO_7F_8 EQU $AA ; X
+HS_SILPH_CO_8F_1 EQU $AB
+HS_SILPH_CO_8F_2 EQU $AC
+HS_SILPH_CO_8F_3 EQU $AD
+HS_SILPH_CO_9F_1 EQU $AE
+HS_SILPH_CO_9F_2 EQU $AF
+HS_SILPH_CO_9F_3 EQU $B0
+HS_SILPH_CO_10F_1 EQU $B1
+HS_SILPH_CO_10F_2 EQU $B2
+HS_SILPH_CO_10F_3 EQU $B3 ; X
+HS_SILPH_CO_10F_4 EQU $B4 ; X
+HS_SILPH_CO_10F_5 EQU $B5 ; X
+HS_SILPH_CO_10F_6 EQU $B6 ; X
+HS_SILPH_CO_11F_1 EQU $B7
+HS_SILPH_CO_11F_2 EQU $B8
+HS_SILPH_CO_11F_3 EQU $B9
+;HS_MAP_F4_1 EQU $BA
+HS_MANSION_2_ITEM EQU $BB ; X
+HS_MANSION_3_ITEM_1 EQU $BC ; X
+HS_MANSION_3_ITEM_2 EQU $BD ; X
+HS_MANSION_4_ITEM_1 EQU $BE ; X
+HS_MANSION_4_ITEM_2 EQU $BF ; X
+HS_MANSION_4_ITEM_3 EQU $C0 ; X
+HS_MANSION_4_ITEM_4 EQU $C1 ; X
+HS_MANSION_4_ITEM_5 EQU $C2 ; X
+HS_SAFARI_ZONE_EAST_ITEM_1 EQU $C3 ; X
+HS_SAFARI_ZONE_EAST_ITEM_2 EQU $C4 ; X
+HS_SAFARI_ZONE_EAST_ITEM_3 EQU $C5 ; X
+HS_SAFARI_ZONE_EAST_ITEM_4 EQU $C6 ; X
+HS_SAFARI_ZONE_NORTH_ITEM_1 EQU $C7 ; X
+HS_SAFARI_ZONE_NORTH_ITEM_2 EQU $C8 ; X
+HS_SAFARI_ZONE_WEST_ITEM_1 EQU $C9 ; X
+HS_SAFARI_ZONE_WEST_ITEM_2 EQU $CA ; X
+HS_SAFARI_ZONE_WEST_ITEM_3 EQU $CB ; X
+HS_SAFARI_ZONE_WEST_ITEM_4 EQU $CC ; X
+HS_SAFARI_ZONE_CENTER_ITEM EQU $CD ; X
+HS_UNKNOWN_DUNGEON_2_ITEM_1 EQU $CE ; X
+HS_UNKNOWN_DUNGEON_2_ITEM_2 EQU $CF ; X
+HS_UNKNOWN_DUNGEON_2_ITEM_3 EQU $D0 ; X
+HS_MEWTWO EQU $D1 ; X
+HS_UNKNOWN_DUNGEON_3_ITEM_1 EQU $D2 ; X
+HS_UNKNOWN_DUNGEON_3_ITEM_2 EQU $D3 ; X
+HS_VICTORY_ROAD_1_ITEM_1 EQU $D4 ; X
+HS_VICTORY_ROAD_1_ITEM_2 EQU $D5 ; X
+HS_CHAMPIONS_ROOM_OAK EQU $D6
+HS_SEAFOAM_ISLANDS_1_BOULDER_1 EQU $D7
+HS_SEAFOAM_ISLANDS_1_BOULDER_2 EQU $D8
+HS_SEAFOAM_ISLANDS_2_BOULDER_1 EQU $D9
+HS_SEAFOAM_ISLANDS_2_BOULDER_2 EQU $DA
+HS_SEAFOAM_ISLANDS_3_BOULDER_1 EQU $DB
+HS_SEAFOAM_ISLANDS_3_BOULDER_2 EQU $DC
+HS_SEAFOAM_ISLANDS_4_BOULDER_1 EQU $DD
+HS_SEAFOAM_ISLANDS_4_BOULDER_2 EQU $DE
+HS_SEAFOAM_ISLANDS_4_BOULDER_3 EQU $DF
+HS_SEAFOAM_ISLANDS_4_BOULDER_4 EQU $E0
+HS_SEAFOAM_ISLANDS_5_BOULDER_1 EQU $E1
+HS_SEAFOAM_ISLANDS_5_BOULDER_2 EQU $E2
+HS_ARTICUNO EQU $E3 ; X
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -39,7 +39,7 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $61
+ ld a, HS_BILL_POKEMON
ld [wcc4d], a
predef HideObject
ld hl, wd7f2
@@ -67,7 +67,7 @@
ld a, $5
ld [$ffee], a
call SetSpritePosition1
- ld a, $62
+ ld a, HS_BILL_1
ld [wcc4d], a
predef ShowObject
ld c, $8
@@ -161,10 +161,10 @@
call PrintText
ld hl, wd7f2
set 4, [hl]
- ld a, $7
+ ld a, HS_CERULEAN_GUARD_1
ld [wcc4d], a
predef ShowObject
- ld a, $9
+ ld a, HS_CERULEAN_GUARD_2
ld [wcc4d], a
predef HideObject
.asm_5491f ; 0x1e8a9
--- a/scripts/blueshouse.asm
+++ b/scripts/blueshouse.asm
@@ -42,7 +42,7 @@
ld bc,(TOWN_MAP << 8) | 1
call GiveItem
jr nc, .BagFull
- ld a,$29
+ ld a,HS_TOWN_MAP
ld [wcc4d],a
predef HideObject ; hide table map object
ld hl,GotMapText
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -94,7 +94,7 @@
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $46
+ ld a, HS_GAME_CORNER_ROCKET
ld [wcc4d], a
predef HideObject
ld hl, wd126
--- a/scripts/celadonmansion5.asm
+++ b/scripts/celadonmansion5.asm
@@ -14,7 +14,7 @@
ld bc,(EEVEE << 8) | 25
call GivePokemon
jr nc, .asm_24365 ; 0x1dd4d
- ld a, $45
+ ld a, HS_CELADON_MANSION_5_GIFT
ld [wcc4d], a
predef HideObject
.asm_24365 ; 0x1dd59
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -8,7 +8,7 @@
xor a
ld [wJoyIgnore], a
ld [W_CERULEANCITYCURSCRIPT], a
- ld a, $5
+ ld a, HS_CERULEAN_RIVAL
ld [wcc4d], a
predef_jump HideObject
@@ -88,7 +88,7 @@
call GetPointerWithinSpriteStateData2
ld [hl], $19
.asm_19535
- ld a, $5
+ ld a, HS_CERULEAN_RIVAL
ld [wcc4d], a
predef ShowObject
ld de, CeruleanCityMovement1
@@ -204,7 +204,7 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $5
+ ld a, HS_CERULEAN_RIVAL
ld [wcc4d], a
predef HideObject
xor a
--- a/scripts/ceruleancity2.asm
+++ b/scripts/ceruleancity2.asm
@@ -3,13 +3,13 @@
; one is called after you beat the Rocket that gives you TM28 DIG.
; the screen then fades out, he disappears, and fades back in
call GBFadeOutToBlack
- ld a, $07
+ ld a, HS_CERULEAN_GUARD_1
ld [wcc4d], a
predef ShowObject
- ld a, $09
+ ld a, HS_CERULEAN_GUARD_2
ld [wcc4d], a
predef HideObject
- ld a, $06
+ ld a, HS_CERULEAN_ROCKET
ld [wcc4d], a
predef HideObject
call GBFadeInFromBlack
--- a/scripts/fightingdojo.asm
+++ b/scripts/fightingdojo.asm
@@ -279,7 +279,7 @@
jr nc, .done
; once Poké Ball is taken, hide sprite
- ld a, $4a
+ ld a, HS_FIGHTING_DOJO_GIFT_1
ld [wcc4d], a
predef HideObject
ld hl, wd7b1
@@ -320,7 +320,7 @@
set 0, [hl]
; once Poké Ball is taken, hide sprite
- ld a, $4b
+ ld a, HS_FIGHTING_DOJO_GIFT_2
ld [wcc4d], a
predef HideObject
.done
--- a/scripts/gary.asm
+++ b/scripts/gary.asm
@@ -120,7 +120,7 @@
ld a, $2
ld [$ff8c], a
call MoveSprite
- ld a, $d6
+ ld a, HS_CHAMPIONS_ROOM_OAK
ld [wcc4d], a
predef ShowObject
ld a, $5
@@ -190,7 +190,7 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $d6
+ ld a, HS_CHAMPIONS_ROOM_OAK
ld [wcc4d], a
predef HideObject
ld a, $9
--- a/scripts/halloffameroom.asm
+++ b/scripts/halloffameroom.asm
@@ -98,7 +98,7 @@
call DisplayTextID
ld a, $ff
ld [wJoyIgnore], a
- ld a, $8
+ ld a, HS_UNKNOWN_DUNGEON_GUY
ld [wcc4d], a
predef HideObject
ld a, $2
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -145,10 +145,10 @@
ld a, [wd7f6]
bit 6, a
jr z, .asm_49e1d
- ld a, $6e
+ ld a, HS_MT_MOON_3_FOSSIL_2
jr .asm_49e1f
.asm_49e1d
- ld a, $6d
+ ld a, HS_MT_MOON_3_FOSSIL_1
.asm_49e1f
ld [wcc4d], a
predef HideObject
@@ -281,7 +281,7 @@
call GiveItem
jp nc, MtMoon3Script_49f76
call MtMoon3Script_49f69
- ld a, $6d
+ ld a, HS_MT_MOON_3_FOSSIL_1
ld [wcc4d], a
predef HideObject
ld hl, wd7f6
@@ -310,7 +310,7 @@
call GiveItem
jp nc, MtMoon3Script_49f76
call MtMoon3Script_49f69
- ld a, $6e
+ ld a, HS_MT_MOON_3_FOSSIL_2
ld [wcc4d], a
predef HideObject
ld hl, wd7f6
--- a/scripts/museum1f.asm
+++ b/scripts/museum1f.asm
@@ -200,7 +200,7 @@
jr nc, .BagFull
ld hl, wd754
set 1, [hl]
- ld a, $34
+ ld a, HS_OLD_AMBER
ld [wcc4d], a
predef HideObject
ld hl, ReceivedOldAmberText
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -38,7 +38,7 @@
ld a, [wNPCMovementScriptFunctionNum]
and a
ret nz
- ld a, $31
+ ld a, HS_OAKS_LAB_OAK_2
ld [wcc4d], a
predef ShowObject
ld hl, wd72e
@@ -65,10 +65,10 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $31
+ ld a, HS_OAKS_LAB_OAK_2
ld [wcc4d], a
predef HideObject
- ld a, $2e
+ ld a, HS_OAKS_LAB_OAK_1
ld [wcc4d], a
predef ShowObject
@@ -280,15 +280,15 @@
ld a, [wTrainerEngageDistance]
cp $2
jr nz, .asm_1cd28 ; 0x1cd22 $4
- ld a, $2b
+ ld a, HS_STARTER_BALL_1
jr .asm_1cd32 ; 0x1cd26 $a
.asm_1cd28
cp $3
jr nz, .asm_1cd30 ; 0x1cd2a $4
- ld a, $2c
+ ld a, HS_STARTER_BALL_2
jr .asm_1cd32 ; 0x1cd2e $2
.asm_1cd30
- ld a, $2d
+ ld a, HS_STARTER_BALL_3
.asm_1cd32
ld [wcc4d], a
predef HideObject
@@ -445,7 +445,7 @@
ld a, [wd730]
bit 0, a
jr nz, .asm_1ce8c ; 0x1ce72 $18
- ld a, $2a
+ ld a, HS_OAKS_LAB_RIVAL
ld [wcc4d], a
predef HideObject
xor a
@@ -488,7 +488,7 @@
ld [$ff8c], a
call DisplayTextID
call OaksLabScript_1d02b
- ld a, $2a
+ ld a, HS_OAKS_LAB_RIVAL
ld [wcc4d], a
predef ShowObject
ld a, [wNPCMovementDirections2Index]
@@ -547,10 +547,10 @@
ld [$ff8c], a
call DisplayTextID
call Delay3
- ld a, $2f
+ ld a, HS_POKEDEX_1
ld [wcc4d], a
predef HideObject
- ld a, $30
+ ld a, HS_POKEDEX_2
ld [wcc4d], a
predef HideObject
call OaksLabScript_1cefd
@@ -570,10 +570,10 @@
set 5, [hl]
ld hl, wd74e
set 0, [hl]
- ld a, $1
+ ld a, HS_LYING_OLD_MAN
ld [wcc4d], a
predef HideObject
- ld a, $2
+ ld a, HS_OLD_MAN
ld [wcc4d], a
predef ShowObject
ld a, [wd157]
@@ -601,7 +601,7 @@
bit 0, a
ret nz
call PlayDefaultMusic
- ld a, $2a
+ ld a, HS_OAKS_LAB_RIVAL
ld [wcc4d], a
predef HideObject
ld hl, wd7eb
@@ -608,7 +608,7 @@
set 0, [hl]
res 1, [hl]
set 7, [hl]
- ld a, $22
+ ld a, HS_ROUTE_22_RIVAL_1
ld [wcc4d], a
predef ShowObject
ld a, $5
@@ -880,15 +880,15 @@
ld a, [wSpriteIndex]
cp $2
jr nz, asm_1d1db ; 0x1d1d5 $4
- ld a, $2b
+ ld a, HS_STARTER_BALL_1
jr asm_1d1e5 ; 0x1d1d9 $a
asm_1d1db: ; 1d1db (7:51db)
cp $3
jr nz, asm_1d1e3 ; 0x1d1dd $4
- ld a, $2c
+ ld a, HS_STARTER_BALL_2
jr asm_1d1e5 ; 0x1d1e1 $2
asm_1d1e3: ; 1d1e3 (7:51e3)
- ld a, $2d
+ ld a, HS_STARTER_BALL_3
asm_1d1e5: ; 1d1e5 (7:51e5)
ld [wcc4d], a
predef HideObject
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -54,7 +54,7 @@
call DisplayTextID
ld a,$FF
ld [wJoyIgnore],a
- ld a,0
+ ld a,HS_PALLET_TOWN_OAK
ld [wcc4d],a
predef ShowObject
@@ -141,10 +141,10 @@
jr nz,.next
ld hl,wd74a
set 2,[hl]
- ld a,$27
+ ld a,HS_DAISY_SITTING
ld [wcc4d],a
predef HideObject
- ld a,$28
+ ld a,HS_DAISY_WALKING
ld [wcc4d],a
predef_jump ShowObject
.next
--- a/scripts/pewtercity.asm
+++ b/scripts/pewtercity.asm
@@ -85,7 +85,7 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $3
+ ld a, HS_MUSEUM_GUY
ld [wcc4d], a
predef HideObject
ld a, $3
@@ -96,7 +96,7 @@
ld a, $3
ld [wSpriteIndex], a
call SetSpritePosition2
- ld a, $3
+ ld a, HS_MUSEUM_GUY
ld [wcc4d], a
predef ShowObject
xor a
@@ -149,7 +149,7 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $4
+ ld a, HS_GYM_GUY
ld [wcc4d], a
predef HideObject
ld a, $6
@@ -160,7 +160,7 @@
ld a, $5
ld [wSpriteIndex], a
call SetSpritePosition2
- ld a, $4
+ ld a, HS_GYM_GUY
ld [wcc4d], a
predef ShowObject
xor a
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -67,10 +67,10 @@
ld hl, wd72a
set 0, [hl]
- ld a, $4
+ ld a, HS_GYM_GUY
ld [wcc4d], a
predef HideObject
- ld a, $22
+ ld a, HS_ROUTE_22_RIVAL_1
ld [wcc4d], a
predef HideObject
--- a/scripts/pokemontower2.asm
+++ b/scripts/pokemontower2.asm
@@ -99,7 +99,7 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $38
+ ld a, HS_POKEMONTOWER_2_RIVAL
ld [wcc4d], a
predef HideObject
xor a
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -66,7 +66,7 @@
PokemonTower7Script4: ; 60d86 (18:4d86)
ld a, $ff
ld [wJoyIgnore], a
- ld a, $43
+ ld a, HS_POKEMONTOWER_7_MR_FUJI
ld [wcc4d], a
predef HideObject
ld a, $4
@@ -222,13 +222,13 @@
set 7, [hl]
ld hl, wd769
set 7, [hl]
- ld a, $44
+ ld a, HS_LAVENDER_HOUSE_1_MR_FUJI
ld [wcc4d], a
predef ShowObject
- ld a, $17
+ ld a, HS_SAFFRON_CITY_E
ld [wcc4d], a
predef HideObject
- ld a, $18
+ ld a, HS_SAFFRON_CITY_F
ld [wcc4d], a
predef ShowObject
ld a, $4
--- a/scripts/rockethideout4.asm
+++ b/scripts/rockethideout4.asm
@@ -59,10 +59,10 @@
ld [H_SPRITEHEIGHT], a
call DisplayTextID
call GBFadeOutToBlack
- ld a, $83
+ ld a, HS_ROCKET_HIDEOUT_4_GIOVANNI
ld [wcc4d], a
predef HideObject
- ld a, $87
+ ld a, HS_ROCKET_HIDEOUT_4_ITEM_4
ld [wcc4d], a
predef ShowObject
call UpdateSprites
@@ -217,7 +217,7 @@
bit 6, [hl]
set 6, [hl]
jr nz, .asm_455e9 ; 0x455dd $a
- ld a, $88
+ ld a, HS_ROCKET_HIDEOUT_4_ITEM_5
ld [wcc4d], a
predef ShowObject
.asm_455e9
--- a/scripts/route12.asm
+++ b/scripts/route12.asm
@@ -34,7 +34,7 @@
ld [W_CUROPPONENT], a ; wd059
ld a, 30
ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
- ld a, $1d
+ ld a, HS_ROUTE_12_SNORLAX
ld [wcc4d], a
predef HideObject
ld a, $3
--- a/scripts/route16.asm
+++ b/scripts/route16.asm
@@ -34,7 +34,7 @@
ld [W_CUROPPONENT], a ; wd059
ld a, 30
ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
- ld a, $21
+ ld a, HS_ROUTE_16_SNORLAX
ld [wcc4d], a
predef HideObject
call UpdateSprites
--- a/scripts/route20.asm
+++ b/scripts/route20.asm
@@ -38,13 +38,13 @@
and $3
cp $3
ret z
- ld a, $dd
+ ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1
call Route20Script_50d0c
- ld a, $de
+ ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2
call Route20Script_50d0c
- ld a, $e1
+ ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1
call Route20Script_50d14
- ld a, $e2
+ ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_2
call Route20Script_50d14
ret
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -205,7 +205,7 @@
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $22
+ ld a, HS_ROUTE_22_RIVAL_1
ld [wcc4d], a
predef HideObject
call PlayDefaultMusic
@@ -350,7 +350,7 @@
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $23
+ ld a, HS_ROUTE_22_RIVAL_2
ld [wcc4d], a
predef HideObject
call PlayDefaultMusic
--- a/scripts/route23.asm
+++ b/scripts/route23.asm
@@ -16,10 +16,10 @@
ld hl, wd813
res 0, [hl]
res 6, [hl]
- ld a, $7a
+ ld a, HS_VICTORY_ROAD_3_BOULDER
ld [wcc4d], a
predef ShowObject
- ld a, $60
+ ld a, HS_VICTORY_ROAD_2_BOULDER
ld [wcc4d], a
predef_jump HideObject
--- a/scripts/route25.asm
+++ b/scripts/route25.asm
@@ -19,7 +19,7 @@
bit 5, [hl]
jr nz, .asm_515ff
res 6, [hl]
- ld a, $61
+ ld a, HS_BILL_POKEMON
ld [wcc4d], a
predef_jump ShowObject
.asm_515ff
@@ -26,13 +26,13 @@
bit 4, [hl]
ret z
set 7, [hl]
- ld a, $24
+ ld a, HS_NUGGET_BRIDGE_GUY
ld [wcc4d], a
predef HideObject
- ld a, $62
+ ld a, HS_BILL_1
ld [wcc4d], a
predef HideObject
- ld a, $63
+ ld a, HS_BILL_2
ld [wcc4d], a
predef_jump ShowObject
--- a/scripts/seafoamislands1.asm
+++ b/scripts/seafoamislands1.asm
@@ -14,16 +14,16 @@
cp $1
jr nz, .asm_44819 ; 0x44809 $e
set 6, [hl]
- ld a, $d7
+ ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_1
ld [wd079], a
- ld a, $d9
+ ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1
ld [wd07a], a
jr .asm_44825 ; 0x44817 $c
.asm_44819
set 7, [hl]
- ld a, $d8
+ ld a, HS_SEAFOAM_ISLANDS_1_BOULDER_2
ld [wd079], a
- ld a, $da
+ ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2
ld [wd07a], a
.asm_44825
ld a, [wd079]
--- a/scripts/seafoamislands2.asm
+++ b/scripts/seafoamislands2.asm
@@ -12,16 +12,16 @@
cp $1
jr nz, .asm_46340 ; 0x46330 $e
set 0, [hl]
- ld a, $d9
+ ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_1
ld [wd079], a
- ld a, $db
+ ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1
ld [wd07a], a
jr .asm_4634c ; 0x4633e $c
.asm_46340
set 1, [hl]
- ld a, $da
+ ld a, HS_SEAFOAM_ISLANDS_2_BOULDER_2
ld [wd079], a
- ld a, $dc
+ ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2
ld [wd07a], a
.asm_4634c
ld a, [wd079]
--- a/scripts/seafoamislands3.asm
+++ b/scripts/seafoamislands3.asm
@@ -12,16 +12,16 @@
cp $1
jr nz, .asm_4647c ; 0x4646c $e
set 0, [hl]
- ld a, $db
+ ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_1
ld [wd079], a
- ld a, $df
+ ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_3
ld [wd07a], a
jr .asm_46488 ; 0x4647a $c
.asm_4647c
set 1, [hl]
- ld a, $dc
+ ld a, HS_SEAFOAM_ISLANDS_3_BOULDER_2
ld [wd079], a
- ld a, $e0
+ ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_4
ld [wd07a], a
.asm_46488
ld a, [wd079]
--- a/scripts/seafoamislands4.asm
+++ b/scripts/seafoamislands4.asm
@@ -12,16 +12,16 @@
cp $1
jr nz, .asm_465b8 ; 0x465a8 $e
set 0, [hl]
- ld a, $dd
+ ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_1
ld [wd079], a
- ld a, $e1
+ ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_1
ld [wd07a], a
jr .asm_465c4 ; 0x465b6 $c
.asm_465b8
set 1, [hl]
- ld a, $de
+ ld a, HS_SEAFOAM_ISLANDS_4_BOULDER_2
ld [wd079], a
- ld a, $e2
+ ld a, HS_SEAFOAM_ISLANDS_5_BOULDER_2
ld [wd07a], a
.asm_465c4
ld a, [wd079]
--- a/scripts/silphco1.asm
+++ b/scripts/silphco1.asm
@@ -7,7 +7,7 @@
bit 7, [hl]
set 7, [hl]
ret nz
- ld a, $4c
+ ld a, HS_SILPH_CO_1F_1
ld [wcc4d], a
predef_jump ShowObject
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -95,14 +95,55 @@
jr .asm_62184
MissableObjectIDs_62194: ; 62194 (18:6194)
- db $11,$12,$13,$14,$15,$16,$FF
+ db HS_SAFFRON_CITY_8
+ db HS_SAFFRON_CITY_9
+ db HS_SAFFRON_CITY_A
+ db HS_SAFFRON_CITY_B
+ db HS_SAFFRON_CITY_C
+ db HS_SAFFRON_CITY_D
+ db $FF
MissableObjectIDs_6219b: ; 6219b (18:619b)
- db $0A,$0B,$0C,$0D,$0E,$0F,$10,$17
- db $18,$8A,$8B,$8C,$8D,$8E,$8F,$91
- db $92,$93,$97,$98,$99,$9A,$9E,$9F
- db $A0,$A3,$A4,$A5,$A6,$AB,$AC,$AD
- db $AE,$AF,$B0,$B1,$B2,$B7,$B8,$B9
+ db HS_SAFFRON_CITY_1
+ db HS_SAFFRON_CITY_2
+ db HS_SAFFRON_CITY_3
+ db HS_SAFFRON_CITY_4
+ db HS_SAFFRON_CITY_5
+ db HS_SAFFRON_CITY_6
+ db HS_SAFFRON_CITY_7
+ db HS_SAFFRON_CITY_E
+ db HS_SAFFRON_CITY_F
+ db HS_SILPH_CO_2F_2
+ db HS_SILPH_CO_2F_3
+ db HS_SILPH_CO_2F_4
+ db HS_SILPH_CO_2F_5
+ db HS_SILPH_CO_3F_1
+ db HS_SILPH_CO_3F_2
+ db HS_SILPH_CO_4F_1
+ db HS_SILPH_CO_4F_2
+ db HS_SILPH_CO_4F_3
+ db HS_SILPH_CO_5F_1
+ db HS_SILPH_CO_5F_2
+ db HS_SILPH_CO_5F_3
+ db HS_SILPH_CO_5F_4
+ db HS_SILPH_CO_6F_1
+ db HS_SILPH_CO_6F_2
+ db HS_SILPH_CO_6F_3
+ db HS_SILPH_CO_7F_1
+ db HS_SILPH_CO_7F_2
+ db HS_SILPH_CO_7F_3
+ db HS_SILPH_CO_7F_4
+ db HS_SILPH_CO_8F_1
+ db HS_SILPH_CO_8F_2
+ db HS_SILPH_CO_8F_3
+ db HS_SILPH_CO_9F_1
+ db HS_SILPH_CO_9F_2
+ db HS_SILPH_CO_9F_3
+ db HS_SILPH_CO_10F_1
+ db HS_SILPH_CO_10F_2
+ db HS_SILPH_CO_11F_1
+ db HS_SILPH_CO_11F_2
+ db HS_SILPH_CO_11F_3
db $FF
SilphCo11Script_621c4: ; 621c4 (18:61c4)
--- a/scripts/silphco7.asm
+++ b/scripts/silphco7.asm
@@ -241,7 +241,7 @@
ld a, [wd730]
bit 0, a
ret nz
- ld a, $a7
+ ld a, HS_SILPH_CO_7F_5
ld [wcc4d], a
predef HideObject
call PlayDefaultMusic
--- a/scripts/ssanne2.asm
+++ b/scripts/ssanne2.asm
@@ -32,7 +32,7 @@
call PlayMusic
ld a, [wWhichTrade]
ld [$ffdb], a
- ld a, $71
+ ld a, HS_SS_ANNE_2_RIVAL
ld [wcc4d], a
predef ShowObject
call Delay3
@@ -160,7 +160,7 @@
ret nz
xor a
ld [wJoyIgnore], a
- ld a, $71
+ ld a, HS_SS_ANNE_2_RIVAL
ld [wcc4d], a
predef HideObject
call PlayDefaultMusic
--- a/scripts/victoryroad3.asm
+++ b/scripts/victoryroad3.asm
@@ -47,10 +47,10 @@
bit 6, [hl]
set 6, [hl]
jr nz, .asm_449fe
- ld a, $7a
+ ld a, HS_VICTORY_ROAD_3_BOULDER
ld [wcc4d], a
predef HideObject
- ld a, $60
+ ld a, HS_VICTORY_ROAD_2_BOULDER
ld [wcc4d], a
predef_jump ShowObject
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -175,7 +175,7 @@
or %00000011
ld [wd752], a
- ld a, $23
+ ld a, HS_ROUTE_22_RIVAL_2
ld [wcc4d], a
predef ShowObject
ld hl, wd7eb
@@ -290,7 +290,7 @@
ld hl, ViridianGymText_74ad9
call PrintText
call GBFadeOutToBlack
- ld a, $32
+ ld a, HS_VIRIDIAN_GYM_GIOVANNI
ld [wcc4d], a
predef HideObject
call UpdateSprites