ref: 7cef012335f0bb335833a3ea36fd02dfa31cfbea
parent: 6ecf18aa52b79131fbf0cce85c41d3cae617100a
author: Rangi <[email protected]>
date: Mon Jan 22 08:00:35 EST 2018
wUnlockedUnowns engine flag constants Use local labels for "End"ings
--- a/constants/engine_flags.asm
+++ b/constants/engine_flags.asm
@@ -54,14 +54,14 @@
const ENGINE_VOLCANOBADGE
const ENGINE_EARTHBADGE
; wUnlockedUnowns
- const ENGINE_UNLOCKED_UNOWNS_1
- const ENGINE_UNLOCKED_UNOWNS_2
- const ENGINE_UNLOCKED_UNOWNS_3
- const ENGINE_UNLOCKED_UNOWNS_4
- const ENGINE_UNLOCKED_UNOWNS_5
- const ENGINE_UNLOCKED_UNOWNS_6 ; 30
- const ENGINE_UNLOCKED_UNOWNS_7
- const ENGINE_UNLOCKED_UNOWNS_8
+ const ENGINE_UNLOCKED_UNOWNS_A_TO_K
+ const ENGINE_UNLOCKED_UNOWNS_L_TO_R
+ const ENGINE_UNLOCKED_UNOWNS_S_TO_W
+ const ENGINE_UNLOCKED_UNOWNS_X_TO_Z
+ const ENGINE_UNLOCKED_UNOWNS_UNUSED_5
+ const ENGINE_UNLOCKED_UNOWNS_UNUSED_6 ; 30
+ const ENGINE_UNLOCKED_UNOWNS_UNUSED_7
+ const ENGINE_UNLOCKED_UNOWNS_UNUSED_8
; wVisitedSpawns
const ENGINE_FLYPOINT_KRISS_HOUSE
const ENGINE_FLYPOINT_VIRIDIAN_POKECENTER
--- a/constants/map_data_constants.asm
+++ b/constants/map_data_constants.asm
@@ -97,7 +97,7 @@
const SPAWN_OLIVINE
const SPAWN_ECRUTEAK
const SPAWN_MAHOGANY
- const SPAWN_LAKE
+ const SPAWN_LAKE_OF_RAGE
const SPAWN_BLACKTHORN
const SPAWN_MT_SILVER
const SPAWN_FAST_SHIP
--- a/data/decorations/mystery_gift_decos.asm
+++ b/data/decorations/mystery_gift_decos.asm
@@ -36,5 +36,5 @@
db DECOFLAG_PIKACHU_BED
db DECOFLAG_GRIMER_DOLL
db DECOFLAG_UNOWN_DOLL
-MysteryGiftDecosEnd
+.End
; 2c76f
--- a/data/engine_flags.asm
+++ b/data/engine_flags.asm
@@ -1,10 +1,11 @@
engine_flag: MACRO
- dwb \1, 1 << \2
+; location, bit
+; (all locations are in WRAM bank 1)
+ dwb \1 + (\2 / 8), 1 << (\2 % 8)
ENDM
EngineFlags: ; 80462
- ; location, bit
- ; (all locations are in WRAM bank 1)
+; entries correspond to ENGINE_* constants
; pokegear
engine_flag wPokegearFlags, POKEGEAR_RADIO_CARD_F ; $0
@@ -31,7 +32,7 @@
engine_flag wStatusFlags, 3 ; pokerus
engine_flag wStatusFlags, 4 ; rocket signal on ch20
engine_flag wStatusFlags, 6 ; credits skip
- engine_flag wStatusFlags, 7 ; bug contest on ; $10
+ engine_flag wStatusFlags, 7 ; bug contest on ; $10
engine_flag wStatusFlags2, 2 ; bug contest timer
engine_flag wStatusFlags2, 1 ; safari zone?
engine_flag wStatusFlags2, 0 ; rockets in radio tower
@@ -40,7 +41,7 @@
engine_flag wStatusFlags2, 6 ; berry -> berry juice when trading?
engine_flag wStatusFlags2, 7 ; rockets in mahogany
- engine_flag wBikeFlags, 0 ; strength active ; $18
+ engine_flag wBikeFlags, 0 ; strength active ; $18
engine_flag wBikeFlags, 1 ; always on bike (cant surf)
engine_flag wBikeFlags, 2 ; downhill (cycling road)
@@ -63,50 +64,48 @@
engine_flag wKantoBadges, EARTHBADGE
; unown sets
- engine_flag wUnlockedUnowns, 0 ; 1
- engine_flag wUnlockedUnowns, 1 ; 2
- engine_flag wUnlockedUnowns, 2 ; 3
- engine_flag wUnlockedUnowns, 3 ; 4
- engine_flag wUnlockedUnowns, 4 ; 5
- engine_flag wUnlockedUnowns, 5 ; 6 ; $30
- engine_flag wUnlockedUnowns, 6 ; 7
- engine_flag wUnlockedUnowns, 7 ; 8
+ engine_flag wUnlockedUnowns, 0 ; A-K
+ engine_flag wUnlockedUnowns, 1 ; L-R
+ engine_flag wUnlockedUnowns, 2 ; S-W
+ engine_flag wUnlockedUnowns, 3 ; X-Z
+ engine_flag wUnlockedUnowns, 4 ; unused 5
+ engine_flag wUnlockedUnowns, 5 ; unused 6 ; $30
+ engine_flag wUnlockedUnowns, 6 ; unused 7
+ engine_flag wUnlockedUnowns, 7 ; unused 8
; fly
- engine_flag wVisitedSpawns, 0 ; your house
- engine_flag wVisitedSpawns, 1 ; viridian pokecenter
- engine_flag wVisitedSpawns, 2 ; pallet
- engine_flag wVisitedSpawns, 3 ; viridian
- engine_flag wVisitedSpawns, 4 ; pewter
- engine_flag wVisitedSpawns, 5 ; cerulean ; $38
- engine_flag wVisitedSpawns, 6 ; rock tunnel
- engine_flag wVisitedSpawns, 7 ; vermilion
- engine_flag wVisitedSpawns + 1, 0 ; lavender
- engine_flag wVisitedSpawns + 1, 1 ; saffron
- engine_flag wVisitedSpawns + 1, 2 ; celadon
- engine_flag wVisitedSpawns + 1, 3 ; fuchsia
- engine_flag wVisitedSpawns + 1, 4 ; cinnabar
- engine_flag wVisitedSpawns + 1, 5 ; indigo plateau ; $40
- engine_flag wVisitedSpawns + 1, 6 ; new bark
- engine_flag wVisitedSpawns + 1, 7 ; cherrygrove
- engine_flag wVisitedSpawns + 2, 0 ; violet
- ; union cave
- engine_flag wVisitedSpawns + 2, 2 ; azalea
- engine_flag wVisitedSpawns + 2, 3 ; cianwood
- engine_flag wVisitedSpawns + 2, 4 ; goldenrod
- engine_flag wVisitedSpawns + 2, 5 ; olivine
- engine_flag wVisitedSpawns + 2, 6 ; ecruteak ; $48
- engine_flag wVisitedSpawns + 2, 7 ; mahogany
- engine_flag wVisitedSpawns + 3, 0 ; lake of rage
- engine_flag wVisitedSpawns + 3, 1 ; blackthorn
- engine_flag wVisitedSpawns + 3, 2 ; silver cave
- ; fast ship
- engine_flag wVisitedSpawns + 3, 4 ; unused
+ engine_flag wVisitedSpawns, SPAWN_HOME
+ engine_flag wVisitedSpawns, SPAWN_DEBUG
+ engine_flag wVisitedSpawns, SPAWN_PALLET
+ engine_flag wVisitedSpawns, SPAWN_VIRIDIAN
+ engine_flag wVisitedSpawns, SPAWN_PEWTER
+ engine_flag wVisitedSpawns, SPAWN_CERULEAN ; $38
+ engine_flag wVisitedSpawns, SPAWN_ROCK_TUNNEL
+ engine_flag wVisitedSpawns, SPAWN_VERMILION
+ engine_flag wVisitedSpawns, SPAWN_LAVENDER
+ engine_flag wVisitedSpawns, SPAWN_SAFFRON
+ engine_flag wVisitedSpawns, SPAWN_CELADON
+ engine_flag wVisitedSpawns, SPAWN_FUCHSIA
+ engine_flag wVisitedSpawns, SPAWN_CINNABAR
+ engine_flag wVisitedSpawns, SPAWN_INDIGO ; $40
+ engine_flag wVisitedSpawns, SPAWN_NEW_BARK
+ engine_flag wVisitedSpawns, SPAWN_CHERRYGROVE
+ engine_flag wVisitedSpawns, SPAWN_VIOLET
+ engine_flag wVisitedSpawns, SPAWN_AZALEA
+ engine_flag wVisitedSpawns, SPAWN_CIANWOOD
+ engine_flag wVisitedSpawns, SPAWN_GOLDENROD
+ engine_flag wVisitedSpawns, SPAWN_OLIVINE
+ engine_flag wVisitedSpawns, SPAWN_ECRUTEAK ; $48
+ engine_flag wVisitedSpawns, SPAWN_MAHOGANY
+ engine_flag wVisitedSpawns, SPAWN_LAKE_OF_RAGE
+ engine_flag wVisitedSpawns, SPAWN_BLACKTHORN
+ engine_flag wVisitedSpawns, SPAWN_MT_SILVER
+ engine_flag wVisitedSpawns, NUM_SPAWNS ; unused
engine_flag wLuckyNumberShowFlag, 0 ; lucky number show
engine_flag wStatusFlags2, 3 ; ????
- engine_flag wDailyFlags, 0 ; kurt making balls ; $50
+ engine_flag wDailyFlags, 0 ; kurt making balls ; $50
engine_flag wDailyFlags, 1 ; ????
engine_flag wDailyFlags, 2 ; special wilddata?
engine_flag wDailyFlags, 3 ; time capsule (24h wait)
@@ -115,7 +114,7 @@
engine_flag wDailyFlags, 6 ; goldenrod underground merchant closed
engine_flag wDailyFlags, 7 ; fought in trainer hall today
- engine_flag wWeeklyFlags, 0 ; mt moon square clefairy ; $58
+ engine_flag wWeeklyFlags, 0 ; mt moon square clefairy ; $58
engine_flag wWeeklyFlags, 1 ; union cave lapras
engine_flag wWeeklyFlags, 2 ; goldenrod underground haircut used
engine_flag wWeeklyFlags, 3 ; goldenrod mall happiness event floor05 object07
@@ -134,73 +133,70 @@
engine_flag wCelebiEvent, 2 ; have gs ball after kurt examined it
; rematches
- engine_flag wDailyRematchFlags, 0 ; jack
- engine_flag wDailyRematchFlags, 1 ; huey
- engine_flag wDailyRematchFlags, 2 ; gaven
- engine_flag wDailyRematchFlags, 3 ; beth ; $68
- engine_flag wDailyRematchFlags, 4 ; jose
- engine_flag wDailyRematchFlags, 5 ; reena
- engine_flag wDailyRematchFlags, 6 ; joey
- engine_flag wDailyRematchFlags, 7 ; wade
- engine_flag wDailyRematchFlags + 1, 0 ; ralph
- engine_flag wDailyRematchFlags + 1, 1 ; liz
- engine_flag wDailyRematchFlags + 1, 2 ; anthony
- engine_flag wDailyRematchFlags + 1, 3 ; todd ; $70
- engine_flag wDailyRematchFlags + 1, 4 ; gina
- engine_flag wDailyRematchFlags + 1, 5 ; arnie
- engine_flag wDailyRematchFlags + 1, 6 ; alan
- engine_flag wDailyRematchFlags + 1, 7 ; dana
- engine_flag wDailyRematchFlags + 2, 0 ; chad
- engine_flag wDailyRematchFlags + 2, 1 ; tully
- engine_flag wDailyRematchFlags + 2, 2 ; brent
- engine_flag wDailyRematchFlags + 2, 3 ; tiffany ; $78
- engine_flag wDailyRematchFlags + 2, 4 ; vance
- engine_flag wDailyRematchFlags + 2, 5 ; wilton
- engine_flag wDailyRematchFlags + 2, 6 ; parry
- engine_flag wDailyRematchFlags + 2, 7 ; erin
+ engine_flag wDailyRematchFlags, 0 ; jack
+ engine_flag wDailyRematchFlags, 1 ; huey
+ engine_flag wDailyRematchFlags, 2 ; gaven
+ engine_flag wDailyRematchFlags, 3 ; beth ; $68
+ engine_flag wDailyRematchFlags, 4 ; jose
+ engine_flag wDailyRematchFlags, 5 ; reena
+ engine_flag wDailyRematchFlags, 6 ; joey
+ engine_flag wDailyRematchFlags, 7 ; wade
+ engine_flag wDailyRematchFlags, 8 ; ralph
+ engine_flag wDailyRematchFlags, 9 ; liz
+ engine_flag wDailyRematchFlags, 10 ; anthony
+ engine_flag wDailyRematchFlags, 11 ; todd ; $70
+ engine_flag wDailyRematchFlags, 12 ; gina
+ engine_flag wDailyRematchFlags, 13 ; arnie
+ engine_flag wDailyRematchFlags, 14 ; alan
+ engine_flag wDailyRematchFlags, 15 ; dana
+ engine_flag wDailyRematchFlags, 16 ; chad
+ engine_flag wDailyRematchFlags, 17 ; tully
+ engine_flag wDailyRematchFlags, 18 ; brent
+ engine_flag wDailyRematchFlags, 19 ; tiffany ; $78
+ engine_flag wDailyRematchFlags, 20 ; vance
+ engine_flag wDailyRematchFlags, 21 ; wilton
+ engine_flag wDailyRematchFlags, 22 ; parry
+ engine_flag wDailyRematchFlags, 23 ; erin
engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget
engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece
engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see EVENT_WADE_HAS_*** in constants/event_flags.asm)
- engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone ; $80
+ engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone ; $80
engine_flag wDailyPhoneItemFlags, 4 ; alan has fire stone
engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone
engine_flag wDailyPhoneItemFlags, 6 ; derek has nugget
engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone
+ engine_flag wDailyPhoneItemFlags, 8 ; tiffany has pink bow
+ engine_flag wDailyPhoneItemFlags, 9 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm)
- engine_flag wDailyPhoneItemFlags + 1, 0 ; tiffany has pink bow
- engine_flag wDailyPhoneItemFlags + 1, 1 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm)
+ engine_flag wDailyPhoneTimeOfDayFlags, 0 ; jack
+ engine_flag wDailyPhoneTimeOfDayFlags, 1 ; huey ; $88
+ engine_flag wDailyPhoneTimeOfDayFlags, 2 ; gaven
+ engine_flag wDailyPhoneTimeOfDayFlags, 3 ; beth
+ engine_flag wDailyPhoneTimeOfDayFlags, 4 ; jose
+ engine_flag wDailyPhoneTimeOfDayFlags, 5 ; reena
+ engine_flag wDailyPhoneTimeOfDayFlags, 6 ; joey
+ engine_flag wDailyPhoneTimeOfDayFlags, 7 ; wade
+ engine_flag wDailyPhoneTimeOfDayFlags, 8 ; ralph
+ engine_flag wDailyPhoneTimeOfDayFlags, 9 ; liz ; $90
+ engine_flag wDailyPhoneTimeOfDayFlags, 10 ; anthony
+ engine_flag wDailyPhoneTimeOfDayFlags, 11 ; todd
+ engine_flag wDailyPhoneTimeOfDayFlags, 12 ; gina
+ engine_flag wDailyPhoneTimeOfDayFlags, 13 ; arnie
+ engine_flag wDailyPhoneTimeOfDayFlags, 14 ; alan
+ engine_flag wDailyPhoneTimeOfDayFlags, 15 ; dana
+ engine_flag wDailyPhoneTimeOfDayFlags, 16 ; chad
+ engine_flag wDailyPhoneTimeOfDayFlags, 17 ; tully ; $98
+ engine_flag wDailyPhoneTimeOfDayFlags, 18 ; brent
+ engine_flag wDailyPhoneTimeOfDayFlags, 19 ; tiffany
+ engine_flag wDailyPhoneTimeOfDayFlags, 20 ; vance
+ engine_flag wDailyPhoneTimeOfDayFlags, 21 ; wilton
+ engine_flag wDailyPhoneTimeOfDayFlags, 22 ; parry
+ engine_flag wDailyPhoneTimeOfDayFlags, 23 ; erin
- engine_flag wDailyPhoneTimeOfDayFlags, 0
- engine_flag wDailyPhoneTimeOfDayFlags, 1 ; $88
- engine_flag wDailyPhoneTimeOfDayFlags, 2
- engine_flag wDailyPhoneTimeOfDayFlags, 3
- engine_flag wDailyPhoneTimeOfDayFlags, 4
- engine_flag wDailyPhoneTimeOfDayFlags, 5
- engine_flag wDailyPhoneTimeOfDayFlags, 6
- engine_flag wDailyPhoneTimeOfDayFlags, 7
-
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 0
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 1 ; $90
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 2
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 3
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 4
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 5
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 6
- engine_flag wDailyPhoneTimeOfDayFlags + 1, 7
-
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 0
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 1 ; $98
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 2
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 3
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 4
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 5
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 6
- engine_flag wDailyPhoneTimeOfDayFlags + 2, 7
-
engine_flag wPlayerSpriteSetupFlags, 2 ; female player has been transformed into male
- engine_flag wSwarmFlags, 2 ; dunsparce swarm ; $a0
+ engine_flag wSwarmFlags, 2 ; dunsparce swarm ; $a0
engine_flag wSwarmFlags, 3 ; yanma swarm
; 80648
--- a/data/items/buena_prizes.asm
+++ b/data/items/buena_prizes.asm
@@ -9,5 +9,5 @@
db CARBOS, 5
db CALCIUM, 5
db HP_UP, 5
-BuenaPrizeItemsEnd:
+.End
; 8b170
--- a/data/items/marts.asm
+++ b/data/items/marts.asm
@@ -34,7 +34,7 @@
dw MartMtMoon
dw MartIndigoPlateau
dw MartUnderground
-MartsEnd
+.End
; 160ed
--- a/data/items/mom_phone.asm
+++ b/data/items/mom_phone.asm
@@ -11,7 +11,7 @@
momitem 0, 180, MOM_ITEM, POKE_BALL
momitem 0, 450, MOM_ITEM, ESCAPE_ROPE
momitem 0, 500, MOM_ITEM, GREAT_BALL
-MomItems_1End: ; fd15e
+.End ; fd15e
MomItems_2: ; fd15e
momitem 900, 600, MOM_ITEM, SUPER_POTION
@@ -24,4 +24,4 @@
momitem 40000, 900, MOM_ITEM, HYPER_POTION
momitem 50000, 8000, MOM_DOLL, DECO_PIKACHU_DOLL
momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
-MomItems_2End: ; fd1ae
+.End ; fd1ae
--- a/data/items/mystery_gift_items.asm
+++ b/data/items/mystery_gift_items.asm
@@ -36,5 +36,5 @@
db RARE_CANDY
db BLUESKY_MAIL
db MIRAGE_MAIL
-MysteryGiftItemsEnd:
+.End
; 2c74a
--- a/data/maps/flypoints.asm
+++ b/data/maps/flypoints.asm
@@ -7,32 +7,32 @@
; landmark, spawn point
const_def
; Johto
- flypoint NEW_BARK, NEW_BARK_TOWN
- flypoint CHERRYGROVE, CHERRYGROVE_CITY
- flypoint VIOLET, VIOLET_CITY
- flypoint AZALEA, AZALEA_TOWN
- flypoint GOLDENROD, GOLDENROD_CITY
- flypoint ECRUTEAK, ECRUTEAK_CITY
- flypoint OLIVINE, OLIVINE_CITY
- flypoint CIANWOOD, CIANWOOD_CITY
- flypoint MAHOGANY, MAHOGANY_TOWN
- flypoint LAKE, LAKE_OF_RAGE
- flypoint BLACKTHORN, BLACKTHORN_CITY
- flypoint MT_SILVER, SILVER_CAVE
+ flypoint NEW_BARK, NEW_BARK_TOWN
+ flypoint CHERRYGROVE, CHERRYGROVE_CITY
+ flypoint VIOLET, VIOLET_CITY
+ flypoint AZALEA, AZALEA_TOWN
+ flypoint GOLDENROD, GOLDENROD_CITY
+ flypoint ECRUTEAK, ECRUTEAK_CITY
+ flypoint OLIVINE, OLIVINE_CITY
+ flypoint CIANWOOD, CIANWOOD_CITY
+ flypoint MAHOGANY, MAHOGANY_TOWN
+ flypoint LAKE_OF_RAGE, LAKE_OF_RAGE
+ flypoint BLACKTHORN, BLACKTHORN_CITY
+ flypoint MT_SILVER, SILVER_CAVE
; Kanto
KANTO_FLYPOINT EQU const_value
- flypoint PALLET, PALLET_TOWN
- flypoint VIRIDIAN, VIRIDIAN_CITY
- flypoint PEWTER, PEWTER_CITY
- flypoint CERULEAN, CERULEAN_CITY
- flypoint VERMILION, VERMILION_CITY
- flypoint ROCK_TUNNEL, ROCK_TUNNEL
- flypoint LAVENDER, LAVENDER_TOWN
- flypoint CELADON, CELADON_CITY
- flypoint SAFFRON, SAFFRON_CITY
- flypoint FUCHSIA, FUCHSIA_CITY
- flypoint CINNABAR, CINNABAR_ISLAND
- flypoint INDIGO, INDIGO_PLATEAU
+ flypoint PALLET, PALLET_TOWN
+ flypoint VIRIDIAN, VIRIDIAN_CITY
+ flypoint PEWTER, PEWTER_CITY
+ flypoint CERULEAN, CERULEAN_CITY
+ flypoint VERMILION, VERMILION_CITY
+ flypoint ROCK_TUNNEL, ROCK_TUNNEL
+ flypoint LAVENDER, LAVENDER_TOWN
+ flypoint CELADON, CELADON_CITY
+ flypoint SAFFRON, SAFFRON_CITY
+ flypoint FUCHSIA, FUCHSIA_CITY
+ flypoint CINNABAR, CINNABAR_ISLAND
+ flypoint INDIGO, INDIGO_PLATEAU
db -1
; 91c8f
--- a/data/radio/oaks_pkmn_talk_routes.asm
+++ b/data/radio/oaks_pkmn_talk_routes.asm
@@ -16,4 +16,4 @@
map ROUTE_45
map ROUTE_36
map ROUTE_31
-OaksPkmnTalkRoutesEnd
+.End
--- a/data/radio/pnp_hidden_places.asm
+++ b/data/radio/pnp_hidden_places.asm
@@ -10,4 +10,4 @@
map ROUTE_16
map ROUTE_14
map CINNABAR_POKECENTER_2F_BETA
-PnP_HiddenPlacesEnd
+.End
--- a/data/sprites/facings.asm
+++ b/data/sprites/facings.asm
@@ -32,10 +32,10 @@
dw FacingBoulderDust2
dw FacingGrass1
dw FacingGrass2
-FacingsEnd:
+.End
dw 0
-NUM_FACINGS EQU (FacingsEnd - Facings) / 2
+NUM_FACINGS EQU (Facings.End - Facings) / 2
; Tables used as a reference to transform OAM data.
--- a/data/trainers/gendered_trainers.asm
+++ b/data/trainers/gendered_trainers.asm
@@ -26,7 +26,7 @@
db SAGE
db BIKER
db SCIENTIST
-MaleTrainersEnd
+.End
FemaleTrainers: ; 4e976
db MEDIUM
@@ -39,4 +39,4 @@
db KIMONO_GIRL
db POKEFANF
db COOLTRAINERF
-FemaleTrainersEnd
+.End
--- /dev/null
+++ b/data/wild/unlocked_unowns.asm
@@ -1,0 +1,20 @@
+UnlockedUnownLetterSets:
+; entries correspond to wUnlockedUnowns bits
+ dw .Set1 ; ENGINE_UNLOCKED_UNOWNS_A_TO_K
+ dw .Set2 ; ENGINE_UNLOCKED_UNOWNS_L_TO_R
+ dw .Set3 ; ENGINE_UNLOCKED_UNOWNS_S_TO_W
+ dw .Set4 ; ENGINE_UNLOCKED_UNOWNS_X_TO_Z
+.End
+
+.Set1:
+ ; A B C D E F G H I J K
+ db 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, -1
+.Set2:
+ ; L M N O P Q R
+ db 12, 13, 14, 15, 16, 17, 18, -1
+.Set3:
+ ; S T U V W
+ db 19, 20, 21, 22, 23, -1
+.Set4:
+ ; X Y Z
+ db 24, 25, 26, -1
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6642,7 +6642,7 @@
jr nc, .next
; Is our letter in the set?
- ld hl, .LetterSets
+ ld hl, UnlockedUnownLetterSets
add hl, de
ld a, [hli]
ld h, [hl]
@@ -6663,7 +6663,7 @@
inc e
inc e
ld a, e
- cp .Set1 - .LetterSets
+ cp UnlockedUnownLetterSets.End - UnlockedUnownLetterSets
jr c, .loop
; Hasn't been unlocked, or the letter is invalid
@@ -6675,26 +6675,8 @@
and a
ret
-.LetterSets:
- dw .Set1
- dw .Set2
- dw .Set3
- dw .Set4
+INCLUDE "data/wild/unlocked_unowns.asm"
-.Set1:
- ; A B C D E F G H I J K
- db 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, $ff
-.Set2:
- ; L M N O P Q R
- db 12, 13, 14, 15, 16, 17, 18, $ff
-.Set3:
- ; S T U V W
- db 19, 20, 21, 22, 23, $ff
-.Set4:
- ; X Y Z
- db 24, 25, 26, $ff
-
-; 3ebc7
Unreferenced_SwapBattlerLevels: ; 3ebc7
push bc
--- a/engine/events/battle_tower/get_trainer_class.asm
+++ b/engine/events/battle_tower/get_trainer_class.asm
@@ -15,7 +15,7 @@
.male_trainer_loop
srl c
ld a, c
- cp MaleTrainersEnd - MaleTrainers - 1
+ cp MaleTrainers.End - MaleTrainers - 1
jr nc, .male_trainer_loop
inc c
@@ -33,7 +33,7 @@
.female_trainer_loop
srl c
ld a, c
- cp FemaleTrainersEnd - FemaleTrainers - 1
+ cp FemaleTrainers.End - FemaleTrainers - 1
jr nc, .female_trainer_loop
inc c
--- a/engine/events/buena.asm
+++ b/engine/events/buena.asm
@@ -288,7 +288,7 @@
dba .prizepoints
; 8b129
-NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItemsEnd - BuenaPrizeItems) / 2)
+NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItems.End - BuenaPrizeItems) / 2)
.indices ; 8b129
db NUM_BUENA_PRIZES
--- a/engine/events/mom_phone.asm
+++ b/engine/events/mom_phone.asm
@@ -1,5 +1,5 @@
-NUM_MOM_ITEMS_1 EQUS "((MomItems_1End - MomItems_1) / 8)"
-NUM_MOM_ITEMS_2 EQUS "((MomItems_2End - MomItems_2) / 8)"
+NUM_MOM_ITEMS_1 EQUS "((MomItems_1.End - MomItems_1) / 8)"
+NUM_MOM_ITEMS_2 EQUS "((MomItems_2.End - MomItems_2) / 8)"
const_value = 1
const MOM_ITEM
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -902,7 +902,7 @@
Intro_RotatePalettesLeftFrontpic: ; 616a
ld hl, IntroFadePalettes
- ld b, IntroFadePalettesEnd - IntroFadePalettes
+ ld b, IntroFadePalettes.End - IntroFadePalettes
.loop
ld a, [hli]
call DmgToCgbBGPals
@@ -920,7 +920,7 @@
db %11111000
db %11110100
db %11100100
-IntroFadePalettesEnd
+.End
; 6182
Intro_WipeInFrontpic: ; 6182
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -121,7 +121,7 @@
GetMart: ; 15b31
ld a, e
- cp (MartsEnd - Marts) / 2
+ cp (Marts.End - Marts) / 2
jr c, .IsAMart
ld b, BANK(DefaultMart)
ld de, DefaultMart
--- a/engine/mystery_gift.asm
+++ b/engine/mystery_gift.asm
@@ -1279,7 +1279,7 @@
ld hl, MysteryGiftGFX
ld de, vTiles2 tile $00
ld a, BANK(MysteryGiftGFX)
- ld bc, MysteryGiftGFXEnd - MysteryGiftGFX
+ ld bc, MysteryGiftGFX.End - MysteryGiftGFX
call FarCopyBytes
hlcoord 0, 0
ld a, $42
@@ -1412,7 +1412,7 @@
MysteryGiftGFX: ; 105258
INCBIN "gfx/mystery_gift/mystery_gift.2bpp"
-MysteryGiftGFXEnd:
+.End
Function105688: ; 105688 (41:5688)
call ClearTileMap
--- a/engine/mystery_gift_2.asm
+++ b/engine/mystery_gift_2.asm
@@ -123,7 +123,7 @@
MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708)
ld a, c
- cp MysteryGiftItemsEnd - MysteryGiftItems
+ cp MysteryGiftItems.End - MysteryGiftItems
jr nc, MysteryGiftFallbackItem
ld hl, MysteryGiftItems
ld b, 0
@@ -133,7 +133,7 @@
MysteryGiftGetDecoration: ; 2c715 (b:4715)
ld a, c
- cp MysteryGiftDecosEnd - MysteryGiftDecos
+ cp MysteryGiftDecos.End - MysteryGiftDecos
jr nc, MysteryGiftFallbackItem
ld hl, MysteryGiftDecos
ld b, 0
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -205,7 +205,7 @@
.sample
call Random
and %11111
- cp (OaksPkmnTalkRoutesEnd - OaksPkmnTalkRoutes) / 2
+ cp (OaksPkmnTalkRoutes.End - OaksPkmnTalkRoutes) / 2
jr nc, .sample
; We now have a number between 0 and 14.
ld hl, OaksPkmnTalkRoutes
@@ -1330,7 +1330,7 @@
PeoplePlaces6: ; Places
call Random
- cp (PnP_HiddenPlacesEnd - PnP_HiddenPlaces) / 2
+ cp (PnP_HiddenPlaces.End - PnP_HiddenPlaces) / 2
jr nc, PeoplePlaces6
ld hl, PnP_HiddenPlaces
ld c, a
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1294,7 +1294,7 @@
ld hl, EarthquakeMovement
ld de, wEarthquakeMovementDataBuffer
- ld bc, EarthquakeMovementEnd - EarthquakeMovement
+ ld bc, EarthquakeMovement.End - EarthquakeMovement
call CopyBytes
call GetScriptByte
ld [wEarthquakeMovementDataBuffer + 1], a
@@ -1312,7 +1312,7 @@
step_shake 16 ; the 16 gets overwritten with the script byte
step_sleep 16 ; the 16 gets overwritten with the lower 6 bits of the script byte
step_end
-EarthquakeMovementEnd
+.End
Script_loadpikachudata:
--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -2169,7 +2169,7 @@
push de
push bc
push hl
- ld b, URIPrefixEnd - URIPrefix
+ ld b, URIPrefix.End - URIPrefix
ld de, URIPrefix
.asm_110e53
ld a, [de]
@@ -2180,7 +2180,7 @@
dec b
jr nz, .asm_110e53
push hl
- ld b, HTTPUploadURLEnd - HTTPUploadURL
+ ld b, HTTPUploadURL.End - HTTPUploadURL
ld c, $0
ld de, HTTPUploadURL
.asm_110e64
@@ -2197,7 +2197,7 @@
.asm_110e70
pop hl
push hl
- ld b, HTTPRankingURLEnd - HTTPRankingURL
+ ld b, HTTPRankingURL.End - HTTPRankingURL
ld c, $0
ld de, HTTPRankingURL
.asm_110e79
@@ -2214,7 +2214,7 @@
.asm_110e86
pop hl
push hl
- ld b, HTTPUtilityURLEnd - HTTPUtilityURL
+ ld b, HTTPUtilityURL.End - HTTPUtilityURL
ld c, $0
ld de, HTTPUtilityURL
.asm_110e8f
@@ -2233,7 +2233,7 @@
.asm_110ea2
pop hl
- ld b, HTTPDownloadURLEnd - HTTPDownloadURL
+ ld b, HTTPDownloadURL.End - HTTPDownloadURL
ld c, $0
ld de, HTTPDownloadURL
.asm_110eaa
@@ -2391,23 +2391,23 @@
URIPrefix: ; 0x110fad
db "http://"
-URIPrefixEnd
+.End
HTTPDownloadURL: ; 0x110fb4
db "gameboy.datacenter.ne.jp/cgb/download"
-HTTPDownloadURLEnd
+.End
HTTPUploadURL: ; 0x110fd9
db "gameboy.datacenter.ne.jp/cgb/upload"
-HTTPUploadURLEnd
+.End
HTTPUtilityURL: ; 0x110ffc
db "gameboy.datacenter.ne.jp/cgb/utility"
-HTTPUtilityURLEnd
+.End
HTTPRankingURL: ; 0x111020
db "gameboy.datacenter.ne.jp/cgb/ranking"
-HTTPRankingURLEnd
+.End
Function111044: ; 111044
ld hl, $c827
@@ -2749,7 +2749,7 @@
jp z, Function1113f7
.asm_111251
- ld b, URIPrefixEnd - URIPrefix
+ ld b, URIPrefix.End - URIPrefix
ld de, URIPrefix
.asm_111256
ld a, [de]
@@ -2760,7 +2760,7 @@
dec b
jr nz, .asm_111256
push hl
- ld b, HTTPDownloadURLEnd - HTTPDownloadURL
+ ld b, HTTPDownloadURL.End - HTTPDownloadURL
ld c, $0
ld de, HTTPDownloadURL
.asm_111268
@@ -2777,7 +2777,7 @@
.asm_111275
pop hl
push hl
- ld b, HTTPRankingURLEnd - HTTPRankingURL
+ ld b, HTTPRankingURL.End - HTTPRankingURL
ld c, $0
ld de, HTTPRankingURL
.asm_11127e
@@ -2795,7 +2795,7 @@
.asm_11128f
pop hl
- ld b, HTTPUploadURLEnd - HTTPUploadURL
+ ld b, HTTPUploadURL.End - HTTPUploadURL
ld c, $0
ld de, HTTPUploadURL
.asm_111297
--- a/maps/RuinsOfAlphAerodactylChamber.asm
+++ b/maps/RuinsOfAlphAerodactylChamber.asm
@@ -58,7 +58,7 @@
UnknownScript_0x58df7:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
setevent EVENT_SOLVED_AERODACTYL_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_3
+ setflag ENGINE_UNLOCKED_UNOWNS_S_TO_W
setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
showemote EMOTE_SHOCK, PLAYER, 15
--- a/maps/RuinsOfAlphHoOhChamber.asm
+++ b/maps/RuinsOfAlphHoOhChamber.asm
@@ -59,7 +59,7 @@
UnknownScript_0x585ba:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
setevent EVENT_SOLVED_HO_OH_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_4
+ setflag ENGINE_UNLOCKED_UNOWNS_X_TO_Z
setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
showemote EMOTE_SHOCK, PLAYER, 15
--- a/maps/RuinsOfAlphKabutoChamber.asm
+++ b/maps/RuinsOfAlphKabutoChamber.asm
@@ -65,7 +65,7 @@
UnknownScript_0x58778:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
setevent EVENT_SOLVED_KABUTO_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_1
+ setflag ENGINE_UNLOCKED_UNOWNS_A_TO_K
setevent EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST
setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
--- a/maps/RuinsOfAlphOmanyteChamber.asm
+++ b/maps/RuinsOfAlphOmanyteChamber.asm
@@ -59,7 +59,7 @@
UnknownScript_0x58c36:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
setevent EVENT_SOLVED_OMANYTE_PUZZLE
- setflag ENGINE_UNLOCKED_UNOWNS_2
+ setflag ENGINE_UNLOCKED_UNOWNS_L_TO_R
setmapscene RUINS_OF_ALPH_INNER_CHAMBER, 1
earthquake 30
showemote EMOTE_SHOCK, PLAYER, 15
--- a/mobile/fixed_words.asm
+++ b/mobile/fixed_words.asm
@@ -3037,7 +3037,7 @@
ld [wcd34], a
ld hl, EZChat_SortedWords
- ld a, (EZChat_SortedWordsEnd - EZChat_SortedWords) / 4
+ ld a, (EZChat_SortedWords.End - EZChat_SortedWords) / 4
.MasterLoop: ; 11d3ef
push af
@@ -4196,4 +4196,4 @@
macro_11f23c $15 ; wa
x = $d000
macro_11f23c $09 ; end
-EZChat_SortedWordsEnd:
+.End
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -4105,12 +4105,10 @@
XGameCodePrefix: ; 119e33
INCBIN "data/mobile/x-game-code-prefix.txt"
-XGameCodePrefixEnd:
;119e40
XGameResultPrefix: ; 119e40
INCBIN "data/mobile/x-game-result-prefix.txt"
-XGameResultPrefixEnd:
; 119e4f
Function119e4f: ; 119e4f