shithub: pokecrystal

Download patch

ref: e0b4fc781aba3c9ac184e0ab91dfcf5d11c585c5
parent: 40802da3cf27a453f62c8c4b712e876b06a9d834
author: PikalaxALT <PikalaxALT@gmail.com>
date: Thu Nov 12 19:49:27 EST 2015

sprite engine; tileset constants

--- a/constants/tilemap_constants.asm
+++ b/constants/tilemap_constants.asm
@@ -5,39 +5,39 @@
 TALK     EQU  1 << 4
 
 const_value SET 1
-	const TILESET_JOHTO_OUTSIDE_1                    ; 01
-	const TILESET_JOHTO_OUTSIDE_2                    ; 02
-	const TILESET_KANTO_OUTSIDE                      ; 03
-	const TILESET_BATTLE_TOWER_OUTSIDE               ; 04
-	const TILESET_HOUSE_1                            ; 05
-	const TILESET_KRISS_HOUSE                        ; 06
-	const TILESET_POKECENTER                         ; 07
-	const TILESET_GATE                               ; 08
-	const TILESET_PORT                               ; 09
-	const TILESET_LAB                                ; 0a
-	const TILESET_POWER_PLANT                        ; 0b
-	const TILESET_MART                               ; 0c
-	const TILESET_CELADON_MANSION                    ; 0d
-	const TILESET_GAME_CORNER                        ; 0e
-	const TILESET_GYM_1                              ; 0f
-	const TILESET_KURT_HOUSE                         ; 10
-	const TILESET_TRAIN_STATION                      ; 11
-	const TILESET_OLIVINE_GYM                        ; 12
-	const TILESET_LIGHTHOUSE                         ; 13
-	const TILESET_KRISS_HOUSE_2F                     ; 14
-	const TILESET_GOLDENROD_POKECOM_CENTER_2F_MOBILE ; 15
-	const TILESET_BATTLE_TOWER                       ; 16
-	const TILESET_SPROUT_TOWER                       ; 17
-	const TILESET_CAVE                               ; 18
-	const TILESET_PARK                               ; 19
-	const TILESET_RUINS_OF_ALPH                      ; 1a
-	const TILESET_RADIO_TOWER                        ; 1b
-	const TILESET_UNDERGROUND                        ; 1c
-	const TILESET_ICE_PATH                           ; 1d
-	const TILESET_WHIRL_ISLANDS                      ; 1e
-	const TILESET_ILEX_FOREST                        ; 1f
-	const TILESET_20                                 ; 20
-	const TILESET_HO_OH_WORD_ROOM                    ; 21
-	const TILESET_KABUTO_WORD_ROOM                   ; 22
-	const TILESET_OMANYTE_WORD_ROOM                  ; 23
-	const TILESET_AERODACTYL_WORD_ROOM               ; 24
+	const TILESET_JOHTO_1              ; 01
+	const TILESET_JOHTO_2              ; 02
+	const TILESET_KANTO                ; 03
+	const TILESET_BATTLE_TOWER_OUTSIDE ; 04
+	const TILESET_HOUSE_1              ; 05
+	const TILESET_KRISS_HOUSE          ; 06
+	const TILESET_POKECENTER           ; 07
+	const TILESET_GATE                 ; 08
+	const TILESET_PORT                 ; 09
+	const TILESET_LAB                  ; 0a
+	const TILESET_POWER_PLANT          ; 0b
+	const TILESET_MART                 ; 0c
+	const TILESET_CELADON_MANSION      ; 0d
+	const TILESET_GAME_CORNER          ; 0e
+	const TILESET_GYM_1                ; 0f
+	const TILESET_KURT_HOUSE           ; 10
+	const TILESET_TRAIN_STATION        ; 11
+	const TILESET_OLIVINE_GYM          ; 12
+	const TILESET_LIGHTHOUSE           ; 13
+	const TILESET_KRISS_HOUSE_2F       ; 14
+	const TILESET_POKECOM_CENTER       ; 15
+	const TILESET_BATTLE_TOWER         ; 16
+	const TILESET_SPROUT_TOWER         ; 17
+	const TILESET_CAVE                 ; 18
+	const TILESET_PARK                 ; 19
+	const TILESET_RUINS_OF_ALPH        ; 1a
+	const TILESET_RADIO_TOWER          ; 1b
+	const TILESET_UNDERGROUND          ; 1c
+	const TILESET_ICE_PATH             ; 1d
+	const TILESET_WHIRL_ISLANDS        ; 1e
+	const TILESET_ILEX_FOREST          ; 1f
+	const TILESET_20                   ; 20
+	const TILESET_HO_OH_WORD_ROOM      ; 21
+	const TILESET_KABUTO_WORD_ROOM     ; 22
+	const TILESET_OMANYTE_WORD_ROOM    ; 23
+	const TILESET_AERODACTYL_WORD_ROOM ; 24
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -318,7 +318,7 @@
 	lb bc, 6, 4
 	ld a, [EnemySafeguardCount]
 	and $3
-	call Function9663
+	call FillBoxCGB
 	call LoadDETile
 	ret
 ; 8c1d
@@ -394,7 +394,7 @@
 .asm_8c82
 	lb bc, 2, 8
 	ld a, e
-	call Function9663
+	call FillBoxCGB
 	ret
 ; 8c8a
 
@@ -618,7 +618,7 @@
 	ret
 ; 9663
 
-Function9663: ; 9663
+FillBoxCGB: ; 9663
 .row
 	push bc
 	push hl
@@ -752,7 +752,7 @@
 .asm_9712
 	lb bc, 2, 8
 	ld a, e
-	call Function9663
+	call FillBoxCGB
 	ret
 ; 971a
 
--- a/engine/engine_flags.asm
+++ b/engine/engine_flags.asm
@@ -22,7 +22,7 @@
 	engine_flag wMomSavingMoney, 0 ; mom saving money ; $8
 	engine_flag wMomSavingMoney, 7 ; dst
 
-	engine_flag wdc39, 0
+	engine_flag wdc39, 0 ; unused, possibly related to a 2-day timer
 
 	engine_flag StatusFlags, 0 ; pokedex
 	engine_flag StatusFlags, 1 ; unown dex
@@ -31,7 +31,7 @@
 	engine_flag StatusFlags, 6 ; credits skip
 	engine_flag StatusFlags, 7 ; bug contest on   ; $10
 	engine_flag StatusFlags2, 2 ; bug contest timer
-	engine_flag StatusFlags2, 1
+	engine_flag StatusFlags2, 1 ; ???
 	engine_flag StatusFlags2, 0 ; rockets in radio tower
 	engine_flag StatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd)
 	engine_flag StatusFlags2, 5 ; give pokerus
@@ -71,14 +71,14 @@
 	engine_flag UnlockedUnowns, 7 ; 8
 
 	; fly
-	engine_flag VisitedSpawns, 0 ; your house
-	engine_flag VisitedSpawns, 1 ; viridian pokecenter
-	engine_flag VisitedSpawns, 2 ; pallet
-	engine_flag VisitedSpawns, 3 ; viridian
-	engine_flag VisitedSpawns, 4 ; pewter
-	engine_flag VisitedSpawns, 5 ; cerulean ; $38
-	engine_flag VisitedSpawns, 6 ; rock tunnel
-	engine_flag VisitedSpawns, 7 ; vermilion
+	engine_flag VisitedSpawns, 0     ; your house
+	engine_flag VisitedSpawns, 1     ; viridian pokecenter
+	engine_flag VisitedSpawns, 2     ; pallet
+	engine_flag VisitedSpawns, 3     ; viridian
+	engine_flag VisitedSpawns, 4     ; pewter
+	engine_flag VisitedSpawns, 5     ; cerulean ; $38
+	engine_flag VisitedSpawns, 6     ; rock tunnel
+	engine_flag VisitedSpawns, 7     ; vermilion
 	engine_flag VisitedSpawns + 1, 0 ; lavender
 	engine_flag VisitedSpawns + 1, 1 ; saffron
 	engine_flag VisitedSpawns + 1, 2 ; celadon
@@ -88,6 +88,7 @@
 	engine_flag VisitedSpawns + 1, 6 ; new bark
 	engine_flag VisitedSpawns + 1, 7 ; cherrygrove
 	engine_flag VisitedSpawns + 2, 0 ; violet
+	                                 ; union cave
 	engine_flag VisitedSpawns + 2, 2 ; azalea
 	engine_flag VisitedSpawns + 2, 3 ; cianwood
 	engine_flag VisitedSpawns + 2, 4 ; goldenrod
@@ -97,6 +98,7 @@
 	engine_flag VisitedSpawns + 3, 0 ; lake of rage
 	engine_flag VisitedSpawns + 3, 1 ; blackthorn
 	engine_flag VisitedSpawns + 3, 2 ; silver cave
+	                                 ; fast ship
 	engine_flag VisitedSpawns + 3, 4 ; unused
 
 	engine_flag wLuckyNumberShowFlag, 0 ; lucky number show
@@ -157,7 +159,7 @@
 
 	engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget
 	engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece
-	engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see bittable1 $032b-e)
+	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, 4 ; alan has fire stone
 	engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone
@@ -165,7 +167,7 @@
 	engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone
 
 	engine_flag wDailyPhoneItemFlags + 1, 0 ; tiffany has pink bow
-	engine_flag wDailyPhoneItemFlags + 1, 1 ; wilton has item (see bittable1 $032f-31)
+	engine_flag wDailyPhoneItemFlags + 1, 1 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm)
 
 	engine_flag wDailyPhoneTimeOfDayFlags, 0
 	engine_flag wDailyPhoneTimeOfDayFlags, 1  ; $88
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -511,7 +511,7 @@
 	jr nz, .nothing
 
 	ld hl, StatusFlags2
-	bit 2, [hl]
+	bit 2, [hl] ; bug contest
 	jr z, .do_daily
 
 	callba CheckBugContestTimer
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -3,8 +3,8 @@
 
 WarpToSpawnPoint:: ; 97c28
 	ld hl, StatusFlags2
-	res 1, [hl]
-	res 2, [hl]
+	res 1, [hl] ; ??
+	res 2, [hl] ; bug contest
 	ret
 ; 97c30
 
--- a/engine/flypoints.asm
+++ b/engine/flypoints.asm
@@ -496,7 +496,7 @@
 
 .asm_91db7
 	ld a, [StatusFlags]
-	bit 6, a
+	bit 6, a ; hall of fame
 	ret z
 	ld a, [hWY]
 	and a
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -717,7 +717,7 @@
 	ld e, a
 
 	push bc
-	call Function2a3c
+	call GetCoordTile
 	pop bc
 
 	ld hl, OBJECT_STANDING_TILE
@@ -922,7 +922,7 @@
 	add hl, bc
 	ld e, [hl]
 	push bc
-	call Function2a3c
+	call GetCoordTile
 	pop bc
 	ld hl, OBJECT_STANDING_TILE
 	add hl, bc
@@ -2874,7 +2874,7 @@
 	ld hl, OBJECT_MAP_Y
 	add hl, bc
 	ld e, [hl]
-	call Function2a3c
+	call GetCoordTile
 	pop bc
 	ld hl, OBJECT_STANDING_TILE
 	add hl, bc
--- /dev/null
+++ b/engine/overworld.asm
@@ -1,0 +1,1480 @@
+GetEmote2bpp: ; 1412a
+	ld a, $1
+	ld [rVBK], a
+	call Get2bpp
+	xor a
+	ld [rVBK], a
+	ret
+; 14135
+
+_ReplaceKrisSprite:: ; 14135
+	call GetPlayerSprite
+	ld a, [UsedSprites]
+	ld [hUsedSpriteIndex], a
+	ld a, [UsedSprites + 1]
+	ld [hUsedSpriteTile], a
+	call Function143c8
+	ret
+; 14146
+
+Function14146: ; 14146
+	ld hl, wSpriteFlags
+	ld a, [hl]
+	push af
+	res 7, [hl]
+	set 6, [hl]
+	call RunCallback_04
+	pop af
+	ld [wSpriteFlags], a
+	ret
+; 14157
+
+Function14157: ; 14157
+	ld hl, wSpriteFlags
+	ld a, [hl]
+	push af
+	set 7, [hl]
+	res 6, [hl]
+	call RunCallback_04
+	pop af
+	ld [wSpriteFlags], a
+	ret
+; 14168
+
+RefreshSprites:: ; 14168
+	call .Refresh
+	call RunCallback_04
+	ret
+; 1416f
+
+.Refresh: ; 1416f
+	xor a
+	ld bc, UsedSpritesEnd - UsedSprites
+	ld hl, UsedSprites
+	call ByteFill
+	call GetPlayerSprite
+	call AddMapSprites
+	call LoadAndSortSprites
+	ret
+; 14183
+
+GetPlayerSprite: ; 14183
+; Get Chris or Kris's sprite.
+	ld hl, .Chris
+	ld a, [wPlayerSpriteSetupFlags]
+	bit 2, a
+	jr nz, .go
+	ld a, [PlayerGender]
+	bit 0, a
+	jr z, .go
+	ld hl, .Kris
+
+.go
+	ld a, [PlayerState]
+	ld c, a
+.loop
+	ld a, [hli]
+	cp c
+	jr z, .good
+	inc hl
+	cp $ff
+	jr nz, .loop
+
+; Any player state not in the array defaults to Chris's sprite.
+	xor a ; ld a, PLAYER_NORMAL
+	ld [PlayerState], a
+	ld a, SPRITE_CHRIS
+	jr .finish
+
+.good
+	ld a, [hl]
+
+.finish
+	ld [UsedSprites + 0], a
+	ld [PlayerSprite], a
+	ld [PlayerObjectSprite], a
+	ret
+
+.Chris
+	db PLAYER_NORMAL,    SPRITE_CHRIS
+	db PLAYER_BIKE,      SPRITE_CHRIS_BIKE
+	db PLAYER_SURF,      SPRITE_SURF
+	db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
+	db $ff
+
+.Kris
+	db PLAYER_NORMAL,    SPRITE_KRIS
+	db PLAYER_BIKE,      SPRITE_KRIS_BIKE
+	db PLAYER_SURF,      SPRITE_SURF
+	db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
+	db $ff
+; 141c9
+
+
+AddMapSprites: ; 141c9
+	call GetMapPermission
+	call CheckOutdoorMap
+	jr z, .outdoor
+	call AddIndoorSprites
+	ret
+
+.outdoor
+	call AddOutdoorSprites
+	ret
+; 141d9
+
+
+AddIndoorSprites: ; 141d9
+	ld hl, Map1ObjectSprite
+	ld a, 1
+.loop
+	push af
+	ld a, [hl]
+	call AddSpriteGFX
+	ld de, OBJECT_LENGTH
+	add hl, de
+	pop af
+	inc a
+	cp NUM_OBJECTS
+	jr nz, .loop
+	ret
+; 141ee
+
+
+AddOutdoorSprites: ; 141ee
+	ld a, [MapGroup]
+	dec a
+	ld c, a
+	ld b, 0
+	ld hl, OutdoorSprites
+rept 2
+	add hl, bc
+endr
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	ld c, MAX_OUTDOOR_SPRITES
+.loop
+	push bc
+	ld a, [hli]
+	call AddSpriteGFX
+	pop bc
+	dec c
+	jr nz, .loop
+	ret
+; 14209
+
+
+RunCallback_04: ; 14209
+	ld a, $4
+	call RunMapCallback
+	call Function1439b
+	call Function14215
+	ret
+; 14215
+
+Function14215: ; 14215
+	ld a, [wSpriteFlags]
+	bit 6, a
+	ret nz
+	ld c, EMOTE_08
+	callba LoadEmote
+	call GetMapPermission
+	call CheckOutdoorMap
+	ld c, EMOTE_0B
+	jr z, .outdoor
+	ld c, EMOTE_0A
+
+.outdoor
+	callba LoadEmote
+	ret
+; 14236
+
+
+
+SafeGetSprite: ; 14236
+	push hl
+	call GetSprite
+	pop hl
+	ret
+; 1423c
+
+GetSprite: ; 1423c
+	call GetMonSprite
+	ret c
+
+	ld hl, SpriteHeaders ; address
+	dec a
+	ld c, a
+	ld b, 0
+	ld a, 6
+	call AddNTimes
+	; load the address into de
+	ld a, [hli]
+	ld e, a
+	ld a, [hli]
+	ld d, a
+	; load the length into c
+	ld a, [hli]
+	swap a
+	ld c, a
+	; load the sprite bank into both b and h
+	ld b, [hl]
+	ld a, [hli]
+	; load the sprite type into l
+	ld l, [hl]
+	ld h, a
+	ret
+; 14259
+
+
+GetMonSprite: ; 14259
+; Return carry if a monster sprite was loaded.
+
+	cp SPRITE_POKEMON
+	jr c, .Normal
+	cp SPRITE_DAYCARE_MON_1
+	jr z, .wBreedMon1
+	cp SPRITE_DAYCARE_MON_2
+	jr z, .wBreedMon2
+	cp SPRITE_VARS
+	jr nc, .Variable
+	jr .Icon
+
+.Normal
+	and a
+	ret
+
+.Icon
+	sub SPRITE_POKEMON
+	ld e, a
+	ld d, 0
+	ld hl, SpriteMons
+	add hl, de
+	ld a, [hl]
+	jr .Mon
+
+.wBreedMon1
+	ld a, [wBreedMon1Species]
+	jr .Mon
+
+.wBreedMon2
+	ld a, [wBreedMon2Species]
+
+.Mon
+	ld e, a
+	and a
+	jr z, .NoBreedmon
+
+	callba Function8e82b
+
+	ld l, 1
+	ld h, 0
+	scf
+	ret
+
+.Variable
+	sub SPRITE_VARS
+	ld e, a
+	ld d, 0
+	ld hl, VariableSprites
+	add hl, de
+	ld a, [hl]
+	and a
+	jp nz, GetMonSprite
+
+.NoBreedmon
+	ld a, 1
+	ld l, 1
+	ld h, 0
+	and a
+	ret
+; 142a7
+
+
+_DoesSpriteHaveFacings:: ; 142a7
+; Checks to see whether we can apply a facing to a sprite.
+; Returns carry unless the sprite is a Pokemon or a Still Sprite.
+	cp SPRITE_POKEMON
+	jr nc, .only_down
+
+	push hl
+	push bc
+	ld hl, SpriteHeaders + SPRITEHEADER_TYPE ; type
+	dec a
+	ld c, a
+	ld b, 0
+	ld a, NUM_SPRITEHEADER_FIELDS
+	call AddNTimes
+	ld a, [hl]
+	pop bc
+	pop hl
+	cp STILL_SPRITE
+	jr nz, .only_down
+	scf
+	ret
+
+.only_down
+	and a
+	ret
+; 142c4
+
+
+_GetSpritePalette:: ; 142c4
+	ld a, c
+	call GetMonSprite
+	jr c, .is_pokemon
+
+	ld hl, SpriteHeaders + 5 ; palette
+	dec a
+	ld c, a
+	ld b, 0
+	ld a, 6
+	call AddNTimes
+	ld c, [hl]
+	ret
+
+.is_pokemon
+	xor a
+	ld c, a
+	ret
+; 142db
+
+
+LoadAndSortSprites: ; 142db
+	call LoadSpriteGFX
+	call SortUsedSprites
+	call ArrangeUsedSprites
+	ret
+; 142e5
+
+
+AddSpriteGFX: ; 142e5
+; Add any new sprite ids to a list of graphics to be loaded.
+; Return carry if the list is full.
+
+	push hl
+	push bc
+	ld b, a
+	ld hl, UsedSprites + 2
+	ld c, SPRITE_GFX_LIST_CAPACITY - 1
+.loop
+	ld a, [hl]
+	cp b
+	jr z, .exists
+	and a
+	jr z, .new
+rept 2
+	inc hl
+endr
+	dec c
+	jr nz, .loop
+
+	pop bc
+	pop hl
+	scf
+	ret
+
+.exists
+	pop bc
+	pop hl
+	and a
+	ret
+
+.new
+	ld [hl], b
+	pop bc
+	pop hl
+	and a
+	ret
+; 14306
+
+
+LoadSpriteGFX: ; 14306
+; Bug: b is not preserved, so
+; it's useless as a next count.
+
+	ld hl, UsedSprites
+	ld b, SPRITE_GFX_LIST_CAPACITY
+.loop
+	ld a, [hli]
+	and a
+	jr z, .done
+	push hl
+	call .LoadSprite
+	pop hl
+	ld [hli], a
+	dec b
+	jr nz, .loop
+
+.done
+	ret
+
+.LoadSprite
+	call GetSprite
+	ld a, l
+	ret
+; 1431e
+
+
+SortUsedSprites: ; 1431e
+; Bubble-sort sprites by type.
+
+; Run backwards through UsedSprites to find the last one.
+
+	ld c, SPRITE_GFX_LIST_CAPACITY
+	ld de, UsedSprites + (SPRITE_GFX_LIST_CAPACITY - 1) * 2
+.FindLastSprite
+	ld a, [de]
+	and a
+	jr nz, .FoundLastSprite
+rept 2
+	dec de
+endr
+	dec c
+	jr nz, .FindLastSprite
+.FoundLastSprite
+	dec c
+	jr z, .quit
+
+; If the length of the current sprite is
+; higher than a later one, swap them.
+
+	inc de
+	ld hl, UsedSprites + 1
+
+.CheckSprite
+	push bc
+	push de
+	push hl
+
+.CheckFollowing
+	ld a, [de]
+	cp [hl]
+	jr nc, .loop
+
+; Swap the two sprites.
+
+	ld b, a
+	ld a, [hl]
+	ld [hl], b
+	ld [de], a
+	dec de
+	dec hl
+	ld a, [de]
+	ld b, a
+	ld a, [hl]
+	ld [hl], b
+	ld [de], a
+	inc de
+	inc hl
+
+; Keep doing this until everything's in order.
+
+.loop
+rept 2
+	dec de
+endr
+	dec c
+	jr nz, .CheckFollowing
+
+	pop hl
+rept 2
+	inc hl
+endr
+	pop de
+	pop bc
+	dec c
+	jr nz, .CheckSprite
+
+.quit
+	ret
+; 14355
+
+
+ArrangeUsedSprites: ; 14355
+; Get the length of each sprite and space them out in VRAM.
+; Crystal introduces a second table in VRAM bank 0.
+
+	ld hl, UsedSprites
+	ld c, SPRITE_GFX_LIST_CAPACITY
+	ld b, 0
+.FirstTableLength
+; Keep going until the end of the list.
+	ld a, [hli]
+	and a
+	jr z, .quit
+
+	ld a, [hl]
+	call GetSpriteLength
+
+; Spill over into the second table after $80 tiles.
+	add b
+	cp $80
+	jr z, .loop
+	jr nc, .SecondTable
+
+.loop
+	ld [hl], b
+	inc hl
+	ld b, a
+
+; Assumes the next table will be reached before c hits 0.
+	dec c
+	jr nz, .FirstTableLength
+
+.SecondTable
+; The second tile table starts at tile $80.
+	ld b, $80
+	dec hl
+.SecondTableLength
+; Keep going until the end of the list.
+	ld a, [hli]
+	and a
+	jr z, .quit
+
+	ld a, [hl]
+	call GetSpriteLength
+
+; There are only two tables, so don't go any further than that.
+	add b
+	jr c, .quit
+
+	ld [hl], b
+	ld b, a
+	inc hl
+
+	dec c
+	jr nz, .SecondTableLength
+
+.quit
+	ret
+; 14386
+
+
+GetSpriteLength: ; 14386
+; Return the length of sprite type a in tiles.
+
+	cp WALKING_SPRITE
+	jr z, .AnyDirection
+	cp STANDING_SPRITE
+	jr z, .AnyDirection
+	cp STILL_SPRITE
+	jr z, .OneDirection
+
+	ld a, 12
+	ret
+
+.AnyDirection
+	ld a, 12
+	ret
+
+.OneDirection
+	ld a, 4
+	ret
+; 1439b
+
+
+Function1439b: ; 1439b
+	ld hl, UsedSprites
+	ld c, SPRITE_GFX_LIST_CAPACITY
+.loop
+	ld a, [wSpriteFlags]
+	res 5, a
+	ld [wSpriteFlags], a
+	ld a, [hli]
+	and a
+	jr z, .done
+	ld [hUsedSpriteIndex], a
+	ld a, [hli]
+	ld [hUsedSpriteTile], a
+	bit 7, a
+	jr z, .dont_set
+	ld a, [wSpriteFlags]
+	set 5, a
+	ld [wSpriteFlags], a
+
+.dont_set
+	push bc
+	push hl
+	call Function143c8
+	pop hl
+	pop bc
+	dec c
+	jr nz, .loop
+
+.done
+	ret
+; 143c8
+
+Function143c8: ; 143c8
+	ld a, [hUsedSpriteIndex]
+	call SafeGetSprite
+	ld a, [hUsedSpriteTile]
+	call .GetTileAddr
+	push hl
+	push de
+	push bc
+	ld a, [wSpriteFlags]
+	bit 7, a
+	jr nz, .skip
+	call .CopyToVram
+
+.skip
+	pop bc
+	ld l, c
+	ld h, $0
+rept 4
+	add hl, hl
+endr
+	pop de
+	add hl, de
+	ld d, h
+	ld e, l
+	pop hl
+	ld a, [wSpriteFlags]
+	bit 5, a
+	jr nz, .done
+	bit 6, a
+	jr nz, .done
+	ld a, [hUsedSpriteIndex]
+	call _DoesSpriteHaveFacings
+	jr c, .done
+	ld a, h
+	add $8
+	ld h, a
+	call .CopyToVram
+
+.done
+	ret
+; 14406
+
+.GetTileAddr: ; 14406
+; Return the address of tile (a) in (hl).
+	and $7f
+	ld l, a
+	ld h, 0
+rept 4
+	add hl, hl
+endr
+	ld a, l
+	add VTiles0 % $100
+	ld l, a
+	ld a, h
+	adc VTiles0 / $100
+	ld h, a
+	ret
+; 14418
+
+.CopyToVram: ; 14418
+	ld a, [rVBK]
+	push af
+	ld a, [wSpriteFlags]
+	bit 5, a
+	ld a, $1
+	jr z, .bankswitch
+	ld a, $0
+
+.bankswitch
+	ld [rVBK], a
+	call Get2bpp
+	pop af
+	ld [rVBK], a
+	ret
+; 1442f
+
+LoadEmote:: ; 1442f
+; Get the address of the pointer to emote c.
+	ld a, c
+	ld bc, 6
+	ld hl, EmotesPointers
+	call AddNTimes
+; Load the emote address into de
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+; load the length of the emote (in tiles) into c
+	inc hl
+	ld c, [hl]
+	swap c
+; load the emote pointer bank into b
+	inc hl
+	ld b, [hl]
+; load the VRAM destination into hl
+	inc hl
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+; if the emote has a length of 0, do not proceed (error handling)
+	ld a, c
+	and a
+	ret z
+	call GetEmote2bpp
+	ret
+; 1444d
+
+emote_header: MACRO
+	dw \1
+	db \2 tiles, BANK(\1)
+	dw \3
+ENDM
+
+EmotesPointers: ; 144d
+; dw source address
+; db length, bank
+; dw dest address
+
+	emote_header ShockEmote, 4, VTiles1 tile $78
+	emote_header QuestionEmote, 4, VTiles1 tile $78
+	emote_header HappyEmote, 4, VTiles1 tile $78
+	emote_header SadEmote, 4, VTiles1 tile $78
+	emote_header HeartEmote, 4, VTiles1 tile $78
+	emote_header BoltEmote, 4, VTiles1 tile $78
+	emote_header SleepEmote, 4, VTiles1 tile $78
+	emote_header FishEmote, 4, VTiles1 tile $78
+	emote_header FishingRodGFX1, 1, VTiles1 tile $7c
+	emote_header FishingRodGFX2, 2, VTiles1 tile $7c
+	emote_header FishingRodGFX3, 2, VTiles1 tile $7e
+	emote_header FishingRodGFX4, 1, VTiles1 tile $7e
+; 14495
+
+
+SpriteMons: ; 14495
+	db UNOWN
+	db GEODUDE
+	db GROWLITHE
+	db WEEDLE
+	db SHELLDER
+	db ODDISH
+	db GENGAR
+	db ZUBAT
+	db MAGIKARP
+	db SQUIRTLE
+	db TOGEPI
+	db BUTTERFREE
+	db DIGLETT
+	db POLIWAG
+	db PIKACHU
+	db CLEFAIRY
+	db CHARMANDER
+	db JYNX
+	db STARMIE
+	db BULBASAUR
+	db JIGGLYPUFF
+	db GRIMER
+	db EKANS
+	db PARAS
+	db TENTACOOL
+	db TAUROS
+	db MACHOP
+	db VOLTORB
+	db LAPRAS
+	db RHYDON
+	db MOLTRES
+	db SNORLAX
+	db GYARADOS
+	db LUGIA
+	db HO_OH
+; 144b8
+
+
+OutdoorSprites: ; 144b8
+; Valid sprite IDs for each map group.
+
+	dw Group1Sprites
+	dw Group2Sprites
+	dw Group3Sprites
+	dw Group4Sprites
+	dw Group5Sprites
+	dw Group6Sprites
+	dw Group7Sprites
+	dw Group8Sprites
+	dw Group9Sprites
+	dw Group10Sprites
+	dw Group11Sprites
+	dw Group12Sprites
+	dw Group13Sprites
+	dw Group14Sprites
+	dw Group15Sprites
+	dw Group16Sprites
+	dw Group17Sprites
+	dw Group18Sprites
+	dw Group19Sprites
+	dw Group20Sprites
+	dw Group21Sprites
+	dw Group22Sprites
+	dw Group23Sprites
+	dw Group24Sprites
+	dw Group25Sprites
+	dw Group26Sprites
+; 144ec
+
+
+Group13Sprites: ; 144ec
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_TEACHER
+	db SPRITE_FISHER
+	db SPRITE_YOUNGSTER
+	db SPRITE_BLUE
+	db SPRITE_GRAMPS
+	db SPRITE_BUG_CATCHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_SWIMMER_GIRL
+	db SPRITE_SWIMMER_GUY
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 14503
+
+Group23Sprites: ; 14503
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_TEACHER
+	db SPRITE_FISHER
+	db SPRITE_YOUNGSTER
+	db SPRITE_BLUE
+	db SPRITE_GRAMPS
+	db SPRITE_BUG_CATCHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_SWIMMER_GIRL
+	db SPRITE_SWIMMER_GUY
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 1451a
+
+Group14Sprites: ; 1451a
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_TEACHER
+	db SPRITE_FISHER
+	db SPRITE_YOUNGSTER
+	db SPRITE_BLUE
+	db SPRITE_GRAMPS
+	db SPRITE_BUG_CATCHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_SWIMMER_GIRL
+	db SPRITE_SWIMMER_GUY
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 14531
+
+Group6Sprites: ; 14531
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_TEACHER
+	db SPRITE_FISHER
+	db SPRITE_YOUNGSTER
+	db SPRITE_BLUE
+	db SPRITE_GRAMPS
+	db SPRITE_BUG_CATCHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_SWIMMER_GIRL
+	db SPRITE_SWIMMER_GUY
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 14548
+
+Group7Sprites: ; 14548
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_SUPER_NERD
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_FISHER
+	db SPRITE_YOUNGSTER
+	db SPRITE_LASS
+	db SPRITE_POKEFAN_M
+	db SPRITE_ROCKET
+	db SPRITE_MISTY
+	db SPRITE_POKE_BALL
+	db SPRITE_SLOWPOKE
+; 1455f
+
+Group25Sprites: ; 1455f
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_SUPER_NERD
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_FISHER
+	db SPRITE_YOUNGSTER
+	db SPRITE_LASS
+	db SPRITE_POKEFAN_M
+	db SPRITE_ROCKET
+	db SPRITE_MISTY
+	db SPRITE_POKE_BALL
+	db SPRITE_SLOWPOKE
+; 14576
+
+Group21Sprites: ; 14576
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_FISHER
+	db SPRITE_POLIWAG
+	db SPRITE_TEACHER
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_LASS
+	db SPRITE_BIKER
+	db SPRITE_SILVER
+	db SPRITE_BLUE
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 1458d
+
+Group18Sprites: ; 1458d
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_POKEFAN_M
+	db SPRITE_MACHOP
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_FISHER
+	db SPRITE_TEACHER
+	db SPRITE_SUPER_NERD
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_BIKER
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 145a4
+
+Group12Sprites: ; 145a4
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_POKEFAN_M
+	db SPRITE_MACHOP
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_FISHER
+	db SPRITE_TEACHER
+	db SPRITE_SUPER_NERD
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_BIKER
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 145bb
+
+Group17Sprites: ; 145bb
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_POKEFAN_M
+	db SPRITE_MACHOP
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_FISHER
+	db SPRITE_TEACHER
+	db SPRITE_SUPER_NERD
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_BIKER
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 145d2
+
+Group16Sprites: ; 145d2
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_POKEFAN_M
+	db SPRITE_BUENA
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_FISHER
+	db SPRITE_TEACHER
+	db SPRITE_SUPER_NERD
+	db SPRITE_MACHOP
+	db SPRITE_BIKER
+	db SPRITE_POKE_BALL
+	db SPRITE_BOULDER
+; 145e9
+
+Group24Sprites: ; 145e9
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_SILVER
+	db SPRITE_TEACHER
+	db SPRITE_FISHER
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_YOUNGSTER
+	db SPRITE_MONSTER
+	db SPRITE_GRAMPS
+	db SPRITE_BUG_CATCHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 14600
+
+Group26Sprites: ; 14600
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_SILVER
+	db SPRITE_TEACHER
+	db SPRITE_FISHER
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_YOUNGSTER
+	db SPRITE_MONSTER
+	db SPRITE_GRAMPS
+	db SPRITE_BUG_CATCHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 14617
+
+Group19Sprites: ; 14617
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_SILVER
+	db SPRITE_TEACHER
+	db SPRITE_FISHER
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_YOUNGSTER
+	db SPRITE_MONSTER
+	db SPRITE_GRAMPS
+	db SPRITE_BUG_CATCHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 1462e
+
+Group10Sprites: ; 1462e
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_FISHER
+	db SPRITE_LASS
+	db SPRITE_OFFICER
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_BUG_CATCHER
+	db SPRITE_SUPER_NERD
+	db SPRITE_WEIRD_TREE
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 14645
+
+Group4Sprites: ; 14645
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_FISHER
+	db SPRITE_LASS
+	db SPRITE_OFFICER
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_BUG_CATCHER
+	db SPRITE_SUPER_NERD
+	db SPRITE_WEIRD_TREE
+	db SPRITE_POKE_BALL
+	db SPRITE_FRUIT_TREE
+; 1465c
+
+Group8Sprites: ; 1465c
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_KURT_OUTSIDE
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_OFFICER
+	db SPRITE_POKEFAN_M
+	db SPRITE_BLACK_BELT
+	db SPRITE_TEACHER
+	db SPRITE_AZALEA_ROCKET
+	db SPRITE_LASS
+	db SPRITE_SILVER
+	db SPRITE_FRUIT_TREE
+	db SPRITE_SLOWPOKE
+; 14673
+
+Group11Sprites: ; 14673
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_POKE_BALL
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_OFFICER
+	db SPRITE_POKEFAN_M
+	db SPRITE_DAYCARE_MON_1
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_ROCKET
+	db SPRITE_LASS
+	db SPRITE_DAYCARE_MON_2
+	db SPRITE_FRUIT_TREE
+	db SPRITE_SLOWPOKE
+; 1468a
+
+Group22Sprites: ; 1468a
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_STANDING_YOUNGSTER
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_OLIVINE_RIVAL
+	db SPRITE_POKEFAN_M
+	db SPRITE_LASS
+	db SPRITE_BUENA
+	db SPRITE_SWIMMER_GIRL
+	db SPRITE_SAILOR
+	db SPRITE_POKEFAN_F
+	db SPRITE_SUPER_NERD
+	db SPRITE_TAUROS
+	db SPRITE_FRUIT_TREE
+	db SPRITE_ROCK
+; 146a1
+
+Group1Sprites: ; 146a1
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_STANDING_YOUNGSTER
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_OLIVINE_RIVAL
+	db SPRITE_POKEFAN_M
+	db SPRITE_LASS
+	db SPRITE_BUENA
+	db SPRITE_SWIMMER_GIRL
+	db SPRITE_SAILOR
+	db SPRITE_POKEFAN_F
+	db SPRITE_SUPER_NERD
+	db SPRITE_TAUROS
+	db SPRITE_FRUIT_TREE
+	db SPRITE_ROCK
+; 146b8
+
+Group9Sprites: ; 146b8
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_LANCE
+	db SPRITE_GRAMPS
+	db SPRITE_SUPER_NERD
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_FISHER
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_LASS
+	db SPRITE_YOUNGSTER
+	db SPRITE_GYARADOS
+	db SPRITE_FRUIT_TREE
+	db SPRITE_POKE_BALL
+; 146cf
+
+Group2Sprites: ; 146cf
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_LASS
+	db SPRITE_SUPER_NERD
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_POKEFAN_M
+	db SPRITE_BLACK_BELT
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_FISHER
+	db SPRITE_FRUIT_TREE
+	db SPRITE_POKE_BALL
+; 146e6
+
+Group5Sprites: ; 146e6
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_GRAMPS
+	db SPRITE_YOUNGSTER
+	db SPRITE_LASS
+	db SPRITE_SUPER_NERD
+	db SPRITE_COOLTRAINER_M
+	db SPRITE_POKEFAN_M
+	db SPRITE_BLACK_BELT
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_FISHER
+	db SPRITE_FRUIT_TREE
+	db SPRITE_POKE_BALL
+; 146fd
+
+Group3Sprites: ; 146fd
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_GAMEBOY_KID
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_LASS
+	db SPRITE_POKEFAN_F
+	db SPRITE_TEACHER
+	db SPRITE_YOUNGSTER
+	db SPRITE_GROWLITHE
+	db SPRITE_POKEFAN_M
+	db SPRITE_ROCKER
+	db SPRITE_FISHER
+	db SPRITE_SCIENTIST
+	db SPRITE_POKE_BALL
+	db SPRITE_BOULDER
+; 14714
+
+Group15Sprites: ; 14714
+	db SPRITE_SUICUNE
+	db SPRITE_SILVER_TROPHY
+	db SPRITE_FAMICOM
+	db SPRITE_POKEDEX
+	db SPRITE_WILL
+	db SPRITE_KAREN
+	db SPRITE_NURSE
+	db SPRITE_OLD_LINK_RECEPTIONIST
+	db SPRITE_BIG_LAPRAS
+	db SPRITE_BIG_ONIX
+	db SPRITE_SUDOWOODO
+	db SPRITE_BIG_SNORLAX
+	db SPRITE_SAILOR
+	db SPRITE_FISHING_GURU
+	db SPRITE_GENTLEMAN
+	db SPRITE_SUPER_NERD
+	db SPRITE_HO_OH
+	db SPRITE_TEACHER
+	db SPRITE_COOLTRAINER_F
+	db SPRITE_YOUNGSTER
+	db SPRITE_FAIRY
+	db SPRITE_POKE_BALL
+	db SPRITE_ROCK
+; 1472b
+
+Group20Sprites: ; 1472b
+	db SPRITE_OAK
+	db SPRITE_FISHER
+	db SPRITE_TEACHER
+	db SPRITE_TWIN
+	db SPRITE_POKEFAN_M
+	db SPRITE_GRAMPS
+	db SPRITE_FAIRY
+	db SPRITE_SILVER
+	db SPRITE_FISHING_GURU
+	db SPRITE_POKE_BALL
+	db SPRITE_POKEDEX
+; 14736
+
+
+SpriteHeaders: ; 14736
+INCLUDE "gfx/overworld/sprite_headers.asm"
+; 1499a
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -65,12 +65,8 @@
 	call ClearTileMap
 	call Function414b7
 
-	ld hl, wc6d0
-IF DEF(CRYSTAL11)
-	ld bc, $0116
-ELSE
-	ld bc, $0115
-ENDC
+	ld hl, wPokedexDataStart
+	ld bc, wPokedexDataEnd - wPokedexDataStart
 	xor a
 	call ByteFill
 
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -1,1480 +1,2888 @@
-GetEmote2bpp: ; 1412a
-	ld a, $1
-	ld [rVBK], a
-	call Get2bpp
-	xor a
-	ld [rVBK], a
+Function8cf53: ; 8cf53
+	ld hl, wc300
+	ld bc, wc3c1 - wc300
+.loop
+	ld [hl], $0
+	inc hl
+	dec bc
+	ld a, c
+	or b
+	jr nz, .loop
 	ret
-; 14135
+; 8cf62
 
-_ReplaceKrisSprite:: ; 14135
-	call GetPlayerSprite
-	ld a, [UsedSprites]
-	ld [hUsedSpriteIndex], a
-	ld a, [UsedSprites + 1]
-	ld [hUsedSpriteTile], a
-	call Function143c8
+Function8cf62: ; 8cf62
+	call Function8cf69
+	call DelayFrame
 	ret
-; 14146
+; 8cf69
 
-Function14146: ; 14146
-	ld hl, wSpriteFlags
-	ld a, [hl]
+Function8cf69: ; 8cf69
+	push hl
+	push de
+	push bc
 	push af
-	res 7, [hl]
-	set 6, [hl]
-	call RunCallback_04
+
+	ld a, $0
+	ld [wc3b5], a
+	call Function8cf7a
+
 	pop af
-	ld [wSpriteFlags], a
+	pop bc
+	pop de
+	pop hl
 	ret
-; 14157
+; 8cf7a
 
-Function14157: ; 14157
-	ld hl, wSpriteFlags
+Function8cf7a: ; 8cf7a
+	ld hl, wc314
+	ld e, 10 ; There are 10 structs here.
+
+.loop
 	ld a, [hl]
-	push af
-	set 7, [hl]
-	res 6, [hl]
-	call RunCallback_04
-	pop af
-	ld [wSpriteFlags], a
-	ret
-; 14168
+	and a
+	jr z, .next ; This struct is deinitialized.
+	ld c, l
+	ld b, h
+	push hl
+	push de
+	call Function8d24b ; Uses a massive jumptable
+	call Function8d04c
+	pop de
+	pop hl
+	jr c, .done
 
-RefreshSprites:: ; 14168
-	call .Refresh
-	call RunCallback_04
-	ret
-; 1416f
+.next
+	ld bc, $10
+	add hl, bc
+	dec e
+	jr nz, .loop
 
-.Refresh: ; 1416f
+	ld a, [wc3b5]
+	ld l, a
+	ld h, Sprites / $0100
+
+.loop2 ; Clear (Sprites + [wc3b5] --> SpritesEnd)
+	ld a, l
+	cp SpritesEnd % $100
+	jr nc, .done
 	xor a
-	ld bc, UsedSpritesEnd - UsedSprites
-	ld hl, UsedSprites
-	call ByteFill
-	call GetPlayerSprite
-	call AddMapSprites
-	call LoadAndSortSprites
+	ld [hli], a
+	jr .loop2
+
+.done
 	ret
-; 14183
+; 8cfa8
 
-GetPlayerSprite: ; 14183
-; Get Chris or Kris's sprite.
-	ld hl, .Chris
-	ld a, [wPlayerSpriteSetupFlags]
-	bit 2, a
-	jr nz, .go
-	ld a, [PlayerGender]
-	bit 0, a
-	jr z, .go
-	ld hl, .Kris
+Function8cfa8: ; 8cfa8 (23:4fa8)
+	ld hl, wc314
+	ld e, 10
 
-.go
-	ld a, [PlayerState]
-	ld c, a
 .loop
-	ld a, [hli]
-	cp c
-	jr z, .good
-	inc hl
-	cp $ff
+	ld a, [hl]
+	and a
+	jr z, .next
+	ld c, l
+	ld b, h
+	push hl
+	push de
+	call Function8d24b ; Uses a massive jumptable
+	call Function8d04c
+	pop de
+	pop hl
+	jr c, .done
+
+.next
+	ld bc, $10
+	add hl, bc
+	dec e
 	jr nz, .loop
 
-; Any player state not in the array defaults to Chris's sprite.
-	xor a ; ld a, PLAYER_NORMAL
-	ld [PlayerState], a
-	ld a, SPRITE_CHRIS
-	jr .finish
+	ld a, [wc3b5]
+	ld l, a
+	ld h, (Sprites + $40) / $100
 
-.good
-	ld a, [hl]
+.loop2 ; Clear (Sprites + [wc3b5] --> Sprites + $40)
+	ld a, l
+	cp (Sprites + $40) % $100
+	jr nc, .done
+	xor a
+	ld [hli], a
+	jr .loop2
 
-.finish
-	ld [UsedSprites + 0], a
-	ld [PlayerSprite], a
-	ld [PlayerObjectSprite], a
+.done
 	ret
 
-.Chris
-	db PLAYER_NORMAL,    SPRITE_CHRIS
-	db PLAYER_BIKE,      SPRITE_CHRIS_BIKE
-	db PLAYER_SURF,      SPRITE_SURF
-	db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
-	db $ff
+Function8cfd6:: ; 8cfd6
+; Find if there's any room in the wc314 array, which is 10x16
+	push de
+	push af
+	ld hl, wc314
+	ld e, 10
+.loop
+	ld a, [hl]
+	and a
+	jr z, .found
+	ld bc, $10
+	add hl, bc
+	dec e
+	jr nz, .loop
+; We've reached the end.  There is no more room here.
+; Return carry.
+	pop af
+	pop de
+	scf
+	ret
 
-.Kris
-	db PLAYER_NORMAL,    SPRITE_KRIS
-	db PLAYER_BIKE,      SPRITE_KRIS_BIKE
-	db PLAYER_SURF,      SPRITE_SURF
-	db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
-	db $ff
-; 141c9
+.found
+; Back up the structure address to bc.
+	ld c, l
+	ld b, h
+; Value [wc3b4] is initially set to -1. Set it to
+; the number of objects loaded into this array.
+	ld hl, wc3b4
+	inc [hl]
+	ld a, [hl]
+	and a
+	jr nz, .initialized
+	inc [hl]
 
-
-AddMapSprites: ; 141c9
-	call GetMapPermission
-	call CheckOutdoorMap
-	jr z, .outdoor
-	call AddIndoorSprites
+.initialized
+; Get row a of Unknown_8d1c4, copy the pointer into de
+	pop af
+	ld e, a
+	ld d, 0
+	ld hl, Unknown_8d1c4
+rept 3
+	add hl, de
+endr
+	ld e, l
+	ld d, h
+; Set hl to the first field (field 0) in the current structure.
+	ld hl, 0
+	add hl, bc
+; Load the index.
+	ld a, [wc3b4]
+	ld [hli], a
+; Copy the table entry to the next two fields.
+	ld a, [de]
+	ld [hli], a
+	inc de
+	ld a, [de]
+	ld [hli], a
+	inc de
+; Look up the third field from the table in the wc300 array (10x2).
+; Take the value and load it in 
+	ld a, [de]
+	call LookUpInwDict_c300
+	ld [hli], a
+	pop de
+; Set hl to field 4.  Kinda pointless, because we're presumably already here.
+	ld hl, $4
+	add hl, bc
+; Load the original value of de into here.
+	ld a, e
+	ld [hli], a
+	ld a, d
+	ld [hli], a
+; load 0 into the next four fields
+	xor a
+rept 2
+	ld [hli], a
+endr
+	xor a
+rept 2
+	ld [hli], a
+endr
+; load -1 into the next field
+	dec a
+	ld [hli], a
+; load 0 into the last five fields
+	xor a
+rept 4
+	ld [hli], a
+endr
+	ld [hl], a
+; back up the address of the first field to wc3b8
+	ld a, c
+	ld [wc3b8], a
+	ld a, b
+	ld [wc3b8 + 1], a
 	ret
+; 8d036
 
-.outdoor
-	call AddOutdoorSprites
+Function8d036: ; 8d036
+; Clear the index field of the struct in bc.
+	ld hl, 0
+	add hl, bc
+	ld [hl], $0
 	ret
-; 141d9
+; 8d03d
 
 
-AddIndoorSprites: ; 141d9
-	ld hl, Map1ObjectSprite
-	ld a, 1
+Function8d03d: ; 8d03d (23:503d)
+; Clear the index field of every struct in the wc314 array.
+	ld hl, wc314
+	ld bc, $10
+	ld e, 10
+	xor a
 .loop
-	push af
-	ld a, [hl]
-	call AddSpriteGFX
-	ld de, OBJECT_LENGTH
-	add hl, de
-	pop af
-	inc a
-	cp NUM_OBJECTS
+	ld [hl], a
+	add hl, bc
+	dec e
 	jr nz, .loop
 	ret
-; 141ee
 
 
-AddOutdoorSprites: ; 141ee
-	ld a, [MapGroup]
-	dec a
-	ld c, a
-	ld b, 0
-	ld hl, OutdoorSprites
-rept 2
-	add hl, bc
-endr
+Function8d04c: ; 8d04c
+; Populate Sprites with the bouncing mon icons
+	call Function8d0ec ; init WRAM
+	call Function8d132 ; read from a memory array
+	cp -3
+	jr z, .done
+	cp -4
+	jr z, .almost
+	call Function8d1a2 ; read from a pointer table
+	ld a, [wc3ba]
+	add [hl]
+	ld [wc3ba], a
+	inc hl
 	ld a, [hli]
 	ld h, [hl]
 	ld l, a
-	ld c, MAX_OUTDOOR_SPRITES
-.loop
 	push bc
+	ld a, [wc3b5]
+	ld e, a
+	ld d, Sprites / $100
 	ld a, [hli]
-	call AddSpriteGFX
-	pop bc
+	ld c, a
+.loop
+	ld a, [wc3bc]
+	ld b, a
+	ld a, [wc3be]
+	add b
+	ld b, a
+	ld a, [wc3bf]
+	add b
+	ld b, a
+	call Function8d0be
+	add b
+	ld [de], a
+	inc hl
+	inc de
+	ld a, [wc3bb]
+	ld b, a
+	ld a, [wc3bd]
+	add b
+	ld b, a
+	ld a, [wc3c0]
+	add b
+	ld b, a
+	call Function8d0ce
+	add b
+	ld [de], a
+	inc hl
+	inc de
+	ld a, [wc3ba]
+	add [hl]
+	ld [de], a
+	inc hl
+	inc de
+	call Function8d0de
+	ld [de], a
+	inc hl
+	inc de
+	ld a, e
+	ld [wc3b5], a
+	cp SpritesEnd % $100
+	jr nc, .outofroom
 	dec c
 	jr nz, .loop
-	ret
-; 14209
+	pop bc
+	jr .done
 
+.almost
+	call Function8d036
 
-RunCallback_04: ; 14209
-	ld a, $4
-	call RunMapCallback
-	call Function1439b
-	call Function14215
+.done
+	and a
 	ret
-; 14215
 
-Function14215: ; 14215
-	ld a, [wSpriteFlags]
-	bit 6, a
-	ret nz
-	ld c, EMOTE_08
-	callba LoadEmote
-	call GetMapPermission
-	call CheckOutdoorMap
-	ld c, EMOTE_0B
-	jr z, .outdoor
-	ld c, EMOTE_0A
-
-.outdoor
-	callba LoadEmote
+.outofroom
+	pop bc
+	scf
 	ret
-; 14236
+; 8d0be
 
+Function8d0be: ; 8d0be
+	push hl
+	ld a, [hl]
+	ld hl, wc3b8
+	bit 6, [hl]
+	jr z, .ok
+	add $8
+	xor $ff
+	inc a
 
+.ok
+	pop hl
+	ret
+; 8d0ce
 
-SafeGetSprite: ; 14236
+Function8d0ce: ; 8d0ce
 	push hl
-	call GetSprite
+	ld a, [hl]
+	ld hl, wc3b8
+	bit 5, [hl]
+	jr z, .ok
+	add $8
+	xor $ff
+	inc a
+
+.ok
 	pop hl
 	ret
-; 1423c
+; 8d0de
 
-GetSprite: ; 1423c
-	call GetMonSprite
-	ret c
+Function8d0de: ; 8d0de
+	ld a, [wc3b8]
+	ld b, a
+	ld a, [hl]
+	xor b
+	and $e0
+	ld b, a
+	ld a, [hl]
+	and $1f
+	or b
+	ret
+; 8d0ec
 
-	ld hl, SpriteHeaders ; address
-	dec a
-	ld c, a
-	ld b, 0
-	ld a, 6
-	call AddNTimes
-	; load the address into de
+Function8d0ec: ; 8d0ec
+	xor a
+	ld [wc3b8], a
+	ld hl, $3
+	add hl, bc
 	ld a, [hli]
-	ld e, a
+	ld [wc3ba], a
 	ld a, [hli]
-	ld d, a
-	; load the length into c
+	ld [wc3bb], a
 	ld a, [hli]
-	swap a
-	ld c, a
-	; load the sprite bank into both b and h
-	ld b, [hl]
+	ld [wc3bc], a
 	ld a, [hli]
-	; load the sprite type into l
-	ld l, [hl]
-	ld h, a
+	ld [wc3bd], a
+	ld a, [hli]
+	ld [wc3be], a
 	ret
-; 14259
+; 8d109
 
+LookUpInwDict_c300: ; 8d109
+; a = wDict_c300[a] if a in wDict_c300 else 0
+	push hl
+	push bc
+	ld hl, wDict_c300
+	ld b, a
+	ld c, 10
+.loop
+	ld a, [hli]
+	cp b
+	jr z, .ok
+	inc hl
+	dec c
+	jr nz, .loop
+	xor a
+	jr .done
 
-GetMonSprite: ; 14259
-; Return carry if a monster sprite was loaded.
+.ok
+	ld a, [hl]
 
-	cp SPRITE_POKEMON
-	jr c, .Normal
-	cp SPRITE_DAYCARE_MON_1
-	jr z, .wBreedMon1
-	cp SPRITE_DAYCARE_MON_2
-	jr z, .wBreedMon2
-	cp SPRITE_VARS
-	jr nc, .Variable
-	jr .Icon
+.done
+	pop bc
+	pop hl
+	ret
+; 8d120
 
-.Normal
-	and a
+Function8d120:: ; 8d120
+	ld hl, $1
+	add hl, bc
+	ld [hl], a
+	ld hl, $8
+	add hl, bc
+	ld [hl], $0
+	ld hl, $a
+	add hl, bc
+	ld [hl], $ff
 	ret
+; 8d132
 
-.Icon
-	sub SPRITE_POKEMON
-	ld e, a
-	ld d, 0
-	ld hl, SpriteMons
-	add hl, de
+
+Function8d132: ; 8d132
+.loop
+	ld hl, $8
+	add hl, bc
 	ld a, [hl]
-	jr .Mon
+	and a
+	jr z, .ok
+	dec [hl]
+	call Function8d189
+	ld a, [hli]
+	push af
+	jr .skip
 
-.wBreedMon1
-	ld a, [wBreedMon1Species]
-	jr .Mon
+.ok
+	ld hl, $a
+	add hl, bc
+	inc [hl]
+	call Function8d189
+	ld a, [hli]
+	cp $fe
+	jr z, .minus_2
+	cp $ff
+	jr z, .minus_1
+	push af
+	ld a, [hl]
+	push hl
+	and $3f
+	ld hl, $9
+	add hl, bc
+	add [hl]
+	ld hl, $8
+	add hl, bc
+	ld [hl], a
+	pop hl
 
-.wBreedMon2
-	ld a, [wBreedMon2Species]
+.skip
+	ld a, [hl]
+	and $c0
+	srl a
+	ld [wc3b8], a
+	pop af
+	ret
 
-.Mon
-	ld e, a
-	and a
-	jr z, .NoBreedmon
+.minus_1
+	xor a
+	ld hl, $8
+	add hl, bc
+	ld [hl], a
+	ld hl, $a
+	add hl, bc
+rept 2
+	dec [hl]
+endr
+	jr .loop
 
-	callba Function8e82b
+.minus_2
+	xor a
+	ld hl, $8
+	add hl, bc
+	ld [hl], a
+	dec a
+	ld hl, $a
+	add hl, bc
+	ld [hl], a
+	jr .loop
+; 8d189
 
-	ld l, 1
+Function8d189: ; 8d189
+	; Get the [bc+10]th entry in the data table
+	; indexed at [bc+1] in Unknown_8d6e6
+	ld hl, $1
+	add hl, bc
+	ld e, [hl]
+	ld d, 0
+	ld hl, Unknown_8d6e6
+rept 2
+	add hl, de
+endr
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	ld hl, $a
+	add hl, bc
+	ld l, [hl]
 	ld h, 0
-	scf
+	add hl, hl
+	add hl, de
 	ret
+; 8d1a2
 
-.Variable
-	sub SPRITE_VARS
+Function8d1a2: ; 8d1a2
 	ld e, a
 	ld d, 0
-	ld hl, VariableSprites
+	ld hl, Unknown_8d94d
+rept 3
 	add hl, de
-	ld a, [hl]
-	and a
-	jp nz, GetMonSprite
-
-.NoBreedmon
-	ld a, 1
-	ld l, 1
-	ld h, 0
-	and a
+endr
 	ret
-; 142a7
+; 8d1ac
 
-
-_DoesSpriteHaveFacings:: ; 142a7
-; Checks to see whether we can apply a facing to a sprite.
-; Returns carry unless the sprite is a Pokemon or a Still Sprite.
-	cp SPRITE_POKEMON
-	jr nc, .only_down
-
+Function8d1ac: ; unreferenced
 	push hl
+	ld l, a
+	ld h, 0
+rept 2
+	add hl, hl
+endr
+	ld de, Unknown_8e706 ; broken 2bpp pointers
+	add hl, de
+	ld c, [hl]
+	inc hl
+	ld b, [hl]
+	inc hl
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	pop hl
 	push bc
-	ld hl, SpriteHeaders + SPRITEHEADER_TYPE ; type
-	dec a
-	ld c, a
-	ld b, 0
-	ld a, NUM_SPRITEHEADER_FIELDS
-	call AddNTimes
-	ld a, [hl]
+	call Request2bpp
 	pop bc
-	pop hl
-	cp STILL_SPRITE
-	jr nz, .only_down
-	scf
 	ret
+; 8d1c4
 
-.only_down
-	and a
-	ret
-; 142c4
+Unknown_8d1c4: ; 8d1c4
+	db $01, JUMPTABLE_8D24B_FUNCTION_01, $00 ; 00
+	db $07, JUMPTABLE_8D24B_FUNCTION_04, $00 ; 01
+	db $08, JUMPTABLE_8D24B_FUNCTION_05, $05 ; 02
+	db $0a, JUMPTABLE_8D24B_FUNCTION_06, $00 ; 03
+	db $0b, JUMPTABLE_8D24B_FUNCTION_07, $06 ; 04
+	db $0c, JUMPTABLE_8D24B_FUNCTION_08, $06 ; 05
+	db $0d, JUMPTABLE_8D24B_FUNCTION_09, $07 ; 06
+	db $0e, JUMPTABLE_8D24B_FUNCTION_0A, $07 ; 07
+	db $10, JUMPTABLE_8D24B_FUNCTION_0B, $07 ; 08
+	db $08, JUMPTABLE_8D24B_FUNCTION_0C, $05 ; 09
+	db $11, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 0a
+	db $12, JUMPTABLE_8D24B_FUNCTION_0D, $08 ; 0b
+	db $12, JUMPTABLE_8D24B_FUNCTION_0E, $08 ; 0c
+	db $12, JUMPTABLE_8D24B_FUNCTION_0F, $08 ; 0d
+	db $13, JUMPTABLE_8D24B_FUNCTION_10, $00 ; 0e
+	db $15, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 0f
+	db $16, JUMPTABLE_8D24B_FUNCTION_11, $00 ; 10
+	db $17, JUMPTABLE_8D24B_FUNCTION_12, $00 ; 11
+	db $18, JUMPTABLE_8D24B_FUNCTION_12, $00 ; 12
+	db $19, JUMPTABLE_8D24B_FUNCTION_13, $00 ; 13
+	db $1a, JUMPTABLE_8D24B_FUNCTION_14, $00 ; 14
+	db $1b, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 15
+	db $1d, JUMPTABLE_8D24B_FUNCTION_15, $00 ; 16
+	db $1e, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 17
+	db $1d, JUMPTABLE_8D24B_FUNCTION_17, $00 ; 18
+	db $1f, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 19
+	db $24, JUMPTABLE_8D24B_FUNCTION_19, $00 ; 1a
+	db $25, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1b
+	db $20, JUMPTABLE_8D24B_FUNCTION_13, $00 ; 1c
+	db $26, JUMPTABLE_8D24B_FUNCTION_1A, $00 ; 1d
+	db $2d, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1e
+	db $2e, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1f
+	db $2f, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 20
+	db $30, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 21
+	db $31, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 22
+	db $32, JUMPTABLE_8D24B_FUNCTION_1B, $00 ; 23
+	db $33, JUMPTABLE_8D24B_FUNCTION_1C, $00 ; 24
+	db $34, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 25
+	db $35, JUMPTABLE_8D24B_FUNCTION_1D, $00 ; 26
+	db $37, JUMPTABLE_8D24B_FUNCTION_1E, $00 ; 27
+	db $38, JUMPTABLE_8D24B_FUNCTION_1E, $00 ; 28
+	db $39, JUMPTABLE_8D24B_FUNCTION_20, $00 ; 29
+	db $3f, JUMPTABLE_8D24B_FUNCTION_21, $00 ; 2a
+	db $3e, JUMPTABLE_8D24B_FUNCTION_22, $00 ; 2b
+	db $40, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 2c
+; 8d24b
 
 
-_GetSpritePalette:: ; 142c4
-	ld a, c
-	call GetMonSprite
-	jr c, .is_pokemon
+Function8d24b: ; 8d24b
+	ld hl, $2 ; field 2, see the second column in the above table
+	add hl, bc
+	ld e, [hl]
+	ld d, 0
+	ld hl, .Jumptable
+rept 2
+	add hl, de
+endr
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	jp [hl]
+; 8d25b
 
-	ld hl, SpriteHeaders + 5 ; palette
-	dec a
-	ld c, a
-	ld b, 0
-	ld a, 6
-	call AddNTimes
-	ld c, [hl]
-	ret
 
-.is_pokemon
-	xor a
-	ld c, a
-	ret
-; 142db
+.Jumptable: ; 8d25b (23:525b)
+	dw .zero        ; town map
+	dw .one         ; bouncing mon icons
+	dw .two
+	dw .three
+	dw .four
+	dw .five
+	dw .six         ; Game Freak logo
+	dw .seven
+	dw .eight
+	dw .nine
+	dw .ten
+	dw .eleven
+	dw .twelve
+	dw .thirteen
+	dw .fourteen
+	dw .fifteen
+	dw .sixteen
+	dw .seventeen
+	dw .eighteen
+	dw .nineteen
+	dw .twenty
+	dw .twentyone
+	dw .twentytwo   ; flying sprite
+	dw .twentythree ; flying leaves
+	dw .twentyfour
+	dw .twentyfive
+	dw .twentysix
+	dw .twentyseven
+	dw .twentyeight
+	dw .twentynine  ; intro suicune
+	dw .thirty      ; intro pichu wooper
+	dw .thirtyone
+	dw .thirtytwo   ; intro unown
+	dw .thirtythree ; intro unown F with suicune leaping up
+	dw .thirtyfour  ; intro suicune facing away from us
 
 
-LoadAndSortSprites: ; 142db
-	call LoadSpriteGFX
-	call SortUsedSprites
-	call ArrangeUsedSprites
+.zero: ; 8d2a1 (23:52a1)
 	ret
-; 142e5
 
+.one: ; 8d2a2 (23:52a2)
+	ld a, [MenuSelection2]
+	ld hl, 0
+	add hl, bc
+	cp [hl]
+	jr z, .two
+	ld hl, $4
+	add hl, bc
+	ld [hl], $10
+	ld hl, $7
+	add hl, bc
+	ld [hl], $0
+	ret
 
-AddSpriteGFX: ; 142e5
-; Add any new sprite ids to a list of graphics to be loaded.
-; Return carry if the list is full.
-
-	push hl
-	push bc
-	ld b, a
-	ld hl, UsedSprites + 2
-	ld c, SPRITE_GFX_LIST_CAPACITY - 1
-.loop
+.two: ; 8d2b9 (23:52b9)
+	ld hl, $4
+	add hl, bc
+	ld [hl], $18
+	ld hl, $c
+	add hl, bc
 	ld a, [hl]
-	cp b
-	jr z, .exists
+	ld d, a
+	inc [hl]
+	and $f
+	ret nz
+	ld hl, $d
+	add hl, bc
+	ld e, [hl]
+	ld hl, $7
+	add hl, bc
+	ld a, d
+	and $10 ; bit 4
+	jr z, .asm_8d2df
+	ld a, e
 	and a
-	jr z, .new
-rept 2
-	inc hl
-endr
-	dec c
-	jr nz, .loop
-
-	pop bc
-	pop hl
-	scf
+	jr z, .asm_8d2e6
+	cp $1
+	jr z, .asm_8d2e2
+.asm_8d2df
+	xor a
+	ld [hl], a
 	ret
-
-.exists
-	pop bc
-	pop hl
-	and a
+.asm_8d2e2
+	ld a, $ff
+	ld [hl], a
 	ret
+.asm_8d2e6
+	ld a, $fe
+	ld [hl], a
+	ret
 
-.new
-	ld [hl], b
-	pop bc
-	pop hl
-	and a
+.three: ; 8d2ea (23:52ea)
+	ld a, [MenuSelection2]
+	ld hl, 0
+	add hl, bc
+	cp [hl]
+	jr z, .asm_8d2fb
+	ld hl, $4
+	add hl, bc
+	ld [hl], $10
 	ret
-; 14306
+.asm_8d2fb
+	ld hl, $4
+	add hl, bc
+	ld [hl], $18
+	ret
 
+.four: ; 8d302 (23:5302)
+	call .anonymous_jumptable
+	jp [hl]
+; 8d306 (23:5306)
 
-LoadSpriteGFX: ; 14306
-; Bug: b is not preserved, so
-; it's useless as a next count.
+; Anonymous jumptable (see .anonymous_jumptable)
+	dw .four_zero
+	dw .four_one
+; 8d30a
 
-	ld hl, UsedSprites
-	ld b, SPRITE_GFX_LIST_CAPACITY
-.loop
-	ld a, [hli]
-	and a
-	jr z, .done
-	push hl
-	call .LoadSprite
-	pop hl
-	ld [hli], a
-	dec b
-	jr nz, .loop
+.four_zero: ; 8d30a
+	call .asm_8d6d8
+	ld hl, 0
+	add hl, bc
+	ld a, [hl]
+	ld hl, $d
+	add hl, bc
+	and $3
+	ld [hl], a
+	inc [hl]
+	swap a
+	ld hl, $c
+	add hl, bc
+	ld [hl], a
 
-.done
+.four_one: ; 8d321
+	ld hl, $4
+	add hl, bc
+	ld a, [hl]
+	cp $a4
+	jr nc, .asm_8d356
+	ld hl, $d
+	add hl, bc
+	add $4
+	ld hl, $4
+	add hl, bc
+	ld [hl], a
+	ld hl, $5
+	add hl, bc
+	inc [hl]
+	ld hl, $d
+	add hl, bc
+	ld a, [hl]
+	sla a
+	sla a
+	ld d, $2
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	add $3
+	ld [hl], a
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
 	ret
 
-.LoadSprite
-	call GetSprite
-	ld a, l
+.asm_8d356
+	call Function8d036
 	ret
-; 1431e
+; 8d35a
 
+.twentyfive: ; 8d35a (23:535a)
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	inc a
+	ld [hl], a
+	ld d, $2
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	ret
 
-SortUsedSprites: ; 1431e
-; Bubble-sort sprites by type.
+.five: ; 8d36c (23:536c)
+	callab Function11a3b
+	ret
 
-; Run backwards through UsedSprites to find the last one.
+.twelve: ; 8d373 (23:5373)
+	callab Function120c1
+	ret
 
-	ld c, SPRITE_GFX_LIST_CAPACITY
-	ld de, UsedSprites + (SPRITE_GFX_LIST_CAPACITY - 1) * 2
-.FindLastSprite
-	ld a, [de]
+.six: ; 8d37a (23:537a)
+	callab GameFreakLogoJumper
+	ret
+
+.seven: ; 8d381 (23:5381)
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
 	and a
-	jr nz, .FoundLastSprite
+	jr z, .asm_8d3ba
 rept 2
-	dec de
+	dec [hl]
 endr
-	dec c
-	jr nz, .FindLastSprite
-.FoundLastSprite
-	dec c
-	jr z, .quit
+	ld d, a
+	and $1f
+	jr nz, .asm_8d395
+	ld hl, $d
+	add hl, bc
+	dec [hl]
+.asm_8d395
+	ld hl, $b
+	add hl, bc
+	ld a, [hl]
+	push af
+	push de
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	pop de
+	pop af
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
+	ld hl, $d
+	add hl, bc
+	ld a, [hl]
+	ld hl, $b
+	add hl, bc
+	add [hl]
+	ld [hl], a
+	ret
+.asm_8d3ba
+	ld a, $1
+	ld [wcf64], a
+	call Function8d036
+	ret
 
-; If the length of the current sprite is
-; higher than a later one, swap them.
-
-	inc de
-	ld hl, UsedSprites + 1
-
-.CheckSprite
-	push bc
+.eight: ; 8d3c3 (23:53c3)
+	ld hl, $c
+	add hl, bc
+	ld a, [hli]
+	or [hl]
+	jr z, .asm_8d41e
+	ld hl, $f
+	add hl, bc
+	ld d, [hl]
+	ld hl, $b
+	add hl, bc
+	ld a, [hl]
+	push af
 	push de
-	push hl
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	pop de
+	pop af
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
+	ld hl, $c
+	add hl, bc
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	ld hl, $e
+	add hl, bc
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	add hl, de
+	ld e, l
+	ld d, h
+	ld hl, $e
+	add hl, bc
+	ld [hl], e
+	inc hl
+	ld [hl], d
+	ld hl, $c
+	add hl, bc
+	ld a, [hli]
+	ld h, [hl]
+	ld l, a
+	ld de, $fff0
+	add hl, de
+	ld e, l
+	ld d, h
+	ld hl, $c
+	add hl, bc
+	ld [hl], e
+	inc hl
+	ld [hl], d
+	ld hl, $b
+	add hl, bc
+	ld a, [hl]
+	xor $20
+	ld [hl], a
+	ret
+.asm_8d41e
+	call Function8d036
+	ret
 
-.CheckFollowing
-	ld a, [de]
-	cp [hl]
-	jr nc, .loop
+.nine: ; 8d422 (23:5422)
+	callab Function9321d
+	ret
 
-; Swap the two sprites.
+.ten: ; 8d429 (23:5429)
+	callab Function932ac
+	ld hl, wcf64
+	ld a, [hl]
+	cp $2
+	ret nz
+	ld [hl], $3
+	ld a, $f
+	call Function8d120
+	ret
 
-	ld b, a
+.eleven: ; 8d43e (23:543e)
+	ld hl, $b
+	add hl, bc
 	ld a, [hl]
-	ld [hl], b
-	ld [de], a
-	dec de
-	dec hl
-	ld a, [de]
-	ld b, a
+	dec [hl]
+	ld e, a
+	and $1
+	jr z, .asm_8d462
+	ld hl, $4
+	add hl, bc
 	ld a, [hl]
-	ld [hl], b
-	ld [de], a
-	inc de
-	inc hl
+	cp $78
+	jr c, .asm_8d461
+	call Function8d036
+	ld a, $4
+	ld [wcf64], a
+	ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
+	call PlaySFX
+	ret
+.asm_8d461
+	inc [hl]
+.asm_8d462
+	ld a, e
+	ld d, $20
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	ret
 
-; Keep doing this until everything's in order.
+.thirteen: ; 8d46e (23:546e)
+	callab Functione00ed
+	ret
 
-.loop
-rept 2
-	dec de
-endr
-	dec c
-	jr nz, .CheckFollowing
+.fifteen: ; 8d475 (23:5475)
+	callab Function90d41
+	ret
 
-	pop hl
-rept 2
-	inc hl
-endr
-	pop de
-	pop bc
-	dec c
-	jr nz, .CheckSprite
-
-.quit
+.fourteen: ; 8d47c (23:547c)
+	callab Functione21a1
 	ret
-; 14355
 
+.sixteen: ; 8d483 (23:5483)
+	call .anonymous_jumptable
+	jp [hl]
+; 8d487 (23:5487)
 
-ArrangeUsedSprites: ; 14355
-; Get the length of each sprite and space them out in VRAM.
-; Crystal introduces a second table in VRAM bank 0.
+; Anonymous jumptable (see .anonymous_jumptable)
+	dw .sixteen_zero
+	dw .sixteen_one
+	dw .sixteen_two
+	dw .sixteen_three
+	dw .sixteen_four
+	dw .sixteen_five
+; 8d493
 
-	ld hl, UsedSprites
-	ld c, SPRITE_GFX_LIST_CAPACITY
-	ld b, 0
-.FirstTableLength
-; Keep going until the end of the list.
-	ld a, [hli]
-	and a
-	jr z, .quit
+.sixteen_zero: ; 8d493
+	ld a, $14
+	call Function8d120
+	ld hl, $b
+	add hl, bc
+	ld [hl], $2
+	ld hl, $c
+	add hl, bc
+	ld [hl], $20
+	ret
+; 8d4a5
 
+.sixteen_two: ; 8d4a5
+	ld hl, $c
+	add hl, bc
 	ld a, [hl]
-	call GetSpriteLength
+	and a
+	jr z, .asm_8d4af
+	dec [hl]
+	ret
 
-; Spill over into the second table after $80 tiles.
-	add b
-	cp $80
-	jr z, .loop
-	jr nc, .SecondTable
+.asm_8d4af
+	call .asm_8d6d8
+	ld hl, $c
+	add hl, bc
+	ld [hl], $40
 
-.loop
-	ld [hl], b
-	inc hl
-	ld b, a
+.sixteen_three: ; 8d4b8
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	cp $30
+	jr c, .asm_8d4cd
+	dec [hl]
+	ld d, $28
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	ret
 
-; Assumes the next table will be reached before c hits 0.
-	dec c
-	jr nz, .FirstTableLength
+.asm_8d4cd
+	ld de, SFX_GOT_SAFARI_BALLS
+	call PlaySFX
+	jr .sixteen_five
+; 8d4d5
 
-.SecondTable
-; The second tile table starts at tile $80.
-	ld b, $80
-	dec hl
-.SecondTableLength
-; Keep going until the end of the list.
-	ld a, [hli]
-	and a
-	jr z, .quit
+.sixteen_one: ; 8d4d5
+	ld hl, $b
+	add hl, bc
+	ld [hl], $4
+	ld hl, $c
+	add hl, bc
+	ld [hl], $30
+	ld hl, $d
+	add hl, bc
+	ld [hl], $24
+	ret
+; 8d4e8
 
+.sixteen_four: ; 8d4e8
+	ld hl, $d
+	add hl, bc
 	ld a, [hl]
-	call GetSpriteLength
+	and a
+	jr z, .asm_8d51c
+	ld d, a
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	call Function8e72c
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	ld hl, $c
+	add hl, bc
+	inc [hl]
+	ld a, [hl]
+	and $3f
+	ret nz
+	ld hl, $c
+	add hl, bc
+	ld [hl], $20
+	ld hl, $d
+	add hl, bc
+	ld a, [hl]
+	sub $c
+	ld [hl], a
+	ld de, SFX_SWITCH_POKEMON
+	call PlaySFX
+	ret
 
-; There are only two tables, so don't go any further than that.
-	add b
-	jr c, .quit
+.asm_8d51c
+	xor a
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	call .asm_8d6d8
+	ret
 
-	ld [hl], b
-	ld b, a
-	inc hl
+.sixteen_five: ; 8d526
+	call Function8d036
+	ret
+; 8d52a
 
-	dec c
-	jr nz, .SecondTableLength
+.seventeen: ; 8d52a (23:552a)
+	ld hl, $4
+	add hl, bc
+	ld a, [hl]
+rept 2
+	inc [hl]
+endr
+	cp $b0
+	jr nc, .asm_8d53f
+	and $3
+	ret nz
+	ld de, SFX_POKEBALLS_PLACED_ON_TABLE
+	call PlaySFX
+	ret
 
-.quit
+.asm_8d53f
+	call Function8d036
 	ret
-; 14386
 
+.eighteen: ; 8d543 (23:5543)
+	callab Function29676
+	ret
 
-GetSpriteLength: ; 14386
-; Return the length of sprite type a in tiles.
+.nineteen: ; 8d54a (23:554a)
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	cp $80
+	jr nc, .asm_8d574
+	ld d, a
+	add $8
+	ld [hl], a
+	ld hl, $b
+	add hl, bc
+	ld a, [hl]
+	xor $20
+	ld [hl], a
+	push af
+	push de
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	pop de
+	pop af
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
+	ret
+.asm_8d574
+	call Function8d036
+	ret
 
-	cp WALKING_SPRITE
-	jr z, .AnyDirection
-	cp STANDING_SPRITE
-	jr z, .AnyDirection
-	cp STILL_SPRITE
-	jr z, .OneDirection
+.twenty: ; 8d578 (23:5578)
+	callab Function91640
+	ret
 
-	ld a, 12
+.twentyone: ; 8d57f (23:557f)
+	ld hl, $d
+	add hl, bc
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	ld hl, $80
+	add hl, de
+	ld e, l
+	ld d, h
+	ld hl, $d
+	add hl, bc
+	ld [hl], e
+	inc hl
+	ld [hl], d
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+rept 3
+	inc [hl]
+endr
+	push af
+	push de
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	pop de
+	pop af
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
 	ret
 
-.AnyDirection
-	ld a, 12
+.twentytwo: ; 8d5b0 (23:55b0)
+	ld hl, $5
+	add hl, bc
+	ld a, [hl]
+	and a
+	ret z
+	ld hl, $d
+	add hl, bc
+	ld a, [hl]
+	inc [hl]
+	cp $40
+	ret c
+	ld hl, $5
+	add hl, bc
+rept 2
+	dec [hl]
+endr
+	ld hl, $f
+	add hl, bc
+	ld a, [hl]
+	ld d, a
+	cp $40
+	jr nc, .asm_8d5d3
+	add $8
+	ld [hl], a
+.asm_8d5d3
+	ld hl, $e
+	add hl, bc
+	ld a, [hl]
+	inc [hl]
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
 	ret
 
-.OneDirection
-	ld a, 4
+.twentythree: ; 8d5e2 (23:55e2)
+	ld hl, $4
+	add hl, bc
+	ld a, [hl]
+	cp $b8
+	jr nc, .asm_8d603
+rept 2
+	inc [hl]
+endr
+	ld hl, $5
+	add hl, bc
+	dec [hl]
+	ld d, $40
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	inc [hl]
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
 	ret
-; 1439b
+.asm_8d603
+	call Function8d036
+	ret
 
-
-Function1439b: ; 1439b
-	ld hl, UsedSprites
-	ld c, SPRITE_GFX_LIST_CAPACITY
-.loop
-	ld a, [wSpriteFlags]
-	res 5, a
-	ld [wSpriteFlags], a
-	ld a, [hli]
+.twentyfour: ; 8d607 (23:5607)
+	ld hl, $5
+	add hl, bc
+	ld a, [hl]
+	cp $54
+	ret z
+	ld hl, $5
+	add hl, bc
+rept 2
+	inc [hl]
+endr
+	ld hl, $f
+	add hl, bc
+	ld a, [hl]
+	ld d, a
 	and a
-	jr z, .done
-	ld [hUsedSpriteIndex], a
-	ld a, [hli]
-	ld [hUsedSpriteTile], a
-	bit 7, a
-	jr z, .dont_set
-	ld a, [wSpriteFlags]
-	set 5, a
-	ld [wSpriteFlags], a
+	jr z, .asm_8d621
+	sub $2
+	ld [hl], a
+.asm_8d621
+	ld hl, $e
+	add hl, bc
+	ld a, [hl]
+	inc [hl]
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
+	ret
 
-.dont_set
-	push bc
-	push hl
-	call Function143c8
-	pop hl
-	pop bc
-	dec c
-	jr nz, .loop
+.twentyseven: ; 8d630 (23:5630)
+	callba Function108bc7
+	ret
 
-.done
+.twentyeight: ; 8d637 (23:5637)
+	callba Function108be0
 	ret
-; 143c8
 
-Function143c8: ; 143c8
-	ld a, [hUsedSpriteIndex]
-	call SafeGetSprite
-	ld a, [hUsedSpriteTile]
-	call .GetTileAddr
-	push hl
-	push de
-	push bc
-	ld a, [wSpriteFlags]
-	bit 7, a
-	jr nz, .skip
-	call .CopyToVram
+.twentynine: ; 8d63e (23:563e)
+	ld a, [wcf65]
+	and a
+	jr nz, .asm_8d645
+	ret
+.asm_8d645
+	ld hl, $7
+	add hl, bc
+	ld [hl], $0
+	ld hl, $d
+	add hl, bc
+	ld a, [hl]
+	add $2
+	ld [hl], a
+	xor $ff
+	inc a
+	ld d, $20
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+	ld a, $36
+	call Function8d120
+	ret
 
-.skip
-	pop bc
-	ld l, c
-	ld h, $0
-rept 4
-	add hl, hl
+.thirty: ; 8d666 (23:5666)
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	cp $14
+	jr nc, .asm_8d67f
+	add $2
+	ld [hl], a
+	xor $ff
+	inc a
+	ld d, $20
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
+.asm_8d67f
+	ret
+
+.thirtytwo: ; 8d680 (23:5680)
+	ld hl, $b
+	add hl, bc
+	ld d, [hl]
+rept 3
+	inc [hl]
 endr
+	ld hl, $c
+	add hl, bc
+	ld a, [hl]
+	push af
+	push de
+	call .asm_8d6de
+	ld hl, $7
+	add hl, bc
+	ld [hl], a
 	pop de
-	add hl, de
-	ld d, h
-	ld e, l
-	pop hl
-	ld a, [wSpriteFlags]
-	bit 5, a
-	jr nz, .done
-	bit 6, a
-	jr nz, .done
-	ld a, [hUsedSpriteIndex]
-	call _DoesSpriteHaveFacings
-	jr c, .done
-	ld a, h
-	add $8
-	ld h, a
-	call .CopyToVram
+	pop af
+	call .asm_8d6e2
+	ld hl, $6
+	add hl, bc
+	ld [hl], a
+	ret
 
-.done
+.thirtythree: ; 8d6a2 (23:56a2)
+	ld a, [wcf64]
+	cp $40
+	ret nz
+	ld a, $3d
+	call Function8d120
 	ret
-; 14406
 
-.GetTileAddr: ; 14406
-; Return the address of tile (a) in (hl).
-	and $7f
-	ld l, a
-	ld h, 0
-rept 4
-	add hl, hl
-endr
-	ld a, l
-	add VTiles0 % $100
-	ld l, a
-	ld a, h
-	adc VTiles0 / $100
-	ld h, a
+.thirtyfour: ; 8d6ae (23:56ae)
+	ld hl, $5
+	add hl, bc
+	ld a, [hl]
+	add $10
+	ld [hl], a
 	ret
-; 14418
 
-.CopyToVram: ; 14418
-	ld a, [rVBK]
-	push af
-	ld a, [wSpriteFlags]
-	bit 5, a
-	ld a, $1
-	jr z, .bankswitch
-	ld a, $0
+.twentysix: ; 8d6b7 (23:56b7)
+	callba Function11d0b6
+	ret
 
-.bankswitch
-	ld [rVBK], a
-	call Get2bpp
-	pop af
-	ld [rVBK], a
+.thirtyone: ; 8d6be (23:56be)
+	callba Function49aa2
 	ret
-; 1442f
 
-LoadEmote:: ; 1442f
-; Get the address of the pointer to emote c.
-	ld a, c
-	ld bc, 6
-	ld hl, EmotesPointers
-	call AddNTimes
-; Load the emote address into de
+.anonymous_jumptable: ; 8d6c5 (23:56c5)
+	ld hl, [sp+$0]
 	ld e, [hl]
 	inc hl
 	ld d, [hl]
-; load the length of the emote (in tiles) into c
-	inc hl
-	ld c, [hl]
-	swap c
-; load the emote pointer bank into b
-	inc hl
-	ld b, [hl]
-; load the VRAM destination into hl
-	inc hl
+	inc de
+	ld hl, $b
+	add hl, bc
+	ld l, [hl]
+	ld h, $0
+	add hl, hl
+	add hl, de
 	ld a, [hli]
 	ld h, [hl]
 	ld l, a
-; if the emote has a length of 0, do not proceed (error handling)
-	ld a, c
-	and a
-	ret z
-	call GetEmote2bpp
 	ret
-; 1444d
+; 8d6d8 (23:56d8)
 
-emote_header: MACRO
-	dw \1
-	db \2 tiles, BANK(\1)
-	dw \3
-ENDM
+.asm_8d6d8: ; 8d6d8
+	ld hl, $b
+	add hl, bc
+	inc [hl]
+	ret
+; 8d6de
 
-EmotesPointers: ; 144d
-; dw source address
-; db length, bank
-; dw dest address
+.asm_8d6de: ; 8d6de (23:56de)
+	call Function8e72c
+	ret
 
-	emote_header ShockEmote, 4, VTiles1 tile $78
-	emote_header QuestionEmote, 4, VTiles1 tile $78
-	emote_header HappyEmote, 4, VTiles1 tile $78
-	emote_header SadEmote, 4, VTiles1 tile $78
-	emote_header HeartEmote, 4, VTiles1 tile $78
-	emote_header BoltEmote, 4, VTiles1 tile $78
-	emote_header SleepEmote, 4, VTiles1 tile $78
-	emote_header FishEmote, 4, VTiles1 tile $78
-	emote_header FishingRodGFX1, 1, VTiles1 tile $7c
-	emote_header FishingRodGFX2, 2, VTiles1 tile $7c
-	emote_header FishingRodGFX3, 2, VTiles1 tile $7e
-	emote_header FishingRodGFX4, 1, VTiles1 tile $7e
-; 14495
+.asm_8d6e2: ; 8d6e2 (23:56e2)
+	call Function8e72a
+	ret
+; 8d6e6 (23:56e6)
 
+Unknown_8d6e6: ; 8d6e6
+	dw Unknown_8d76a
+	dw Unknown_8d76d
+	dw Unknown_8d772
+	dw Unknown_8d777
+	dw Unknown_8d77c
+	dw Unknown_8d781
+	dw Unknown_8d786
+	dw Unknown_8d7a6
+	dw Unknown_8d7ab
+	dw Unknown_8d7b0
+	dw Unknown_8d7b5
+	dw Unknown_8d7d4
+	dw Unknown_8d7d9
+	dw Unknown_8d7e2
+	dw Unknown_8d7eb
+	dw Unknown_8d7f4
+	dw Unknown_8d7ff
+	dw Unknown_8d78b
+	dw Unknown_8d802
+	dw Unknown_8d805
+	dw Unknown_8d808
+	dw Unknown_8d811
+	dw Unknown_8d818
+	dw Unknown_8d81d
+	dw Unknown_8d822
+	dw Unknown_8d825
+	dw Unknown_8d82c
+	dw Unknown_8d82f
+	dw Unknown_8d861
+	dw Unknown_8d864
+	dw Unknown_8d867
+	dw Unknown_8d874
+	dw Unknown_8d877
+	dw Unknown_8d87a
+	dw Unknown_8d87d
+	dw Unknown_8d880
+	dw Unknown_8d883
+	dw Unknown_8d890
+	dw Unknown_8d899
+	dw Unknown_8d89c
+	dw Unknown_8d89f
+	dw Unknown_8d8a2
+	dw Unknown_8d8a5
+	dw Unknown_8d8a8
+	dw Unknown_8d8ab
+	dw Unknown_8d794
+	dw Unknown_8d79d
+	dw Unknown_8d8ae
+	dw Unknown_8d8cd
+	dw Unknown_8d8ec
+	dw Unknown_8d8f1
+	dw Unknown_8d8f4
+	dw Unknown_8d8f7
+	dw Unknown_8d8fe
+	dw Unknown_8d907
+	dw Unknown_8d90c
+	dw Unknown_8d913
+	dw Unknown_8d916
+	dw Unknown_8d91d
+	dw Unknown_8d924
+	dw Unknown_8d92b
+	dw Unknown_8d932
+	dw Unknown_8d93d
+	dw Unknown_8d940
+	dw Unknown_8d943
+	dw Unknown_8d948
+; 8d76a
 
-SpriteMons: ; 14495
-	db UNOWN
-	db GEODUDE
-	db GROWLITHE
-	db WEEDLE
-	db SHELLDER
-	db ODDISH
-	db GENGAR
-	db ZUBAT
-	db MAGIKARP
-	db SQUIRTLE
-	db TOGEPI
-	db BUTTERFREE
-	db DIGLETT
-	db POLIWAG
-	db PIKACHU
-	db CLEFAIRY
-	db CHARMANDER
-	db JYNX
-	db STARMIE
-	db BULBASAUR
-	db JIGGLYPUFF
-	db GRIMER
-	db EKANS
-	db PARAS
-	db TENTACOOL
-	db TAUROS
-	db MACHOP
-	db VOLTORB
-	db LAPRAS
-	db RHYDON
-	db MOLTRES
-	db SNORLAX
-	db GYARADOS
-	db LUGIA
-	db HO_OH
-; 144b8
-
+Unknown_8d76a: 	dw $2000
+                db -1
+Unknown_8d76d: 	dw $0800, $0801
+                db -2
+Unknown_8d772: 	dw $083d, $083e
+                db -2
+Unknown_8d777: 	dw $083f, $0840
+                db -2
+Unknown_8d77c: 	dw $0400, $0401
+                db -2
+Unknown_8d781: 	dw $043d, $043e
+                db -2
+Unknown_8d786: 	dw $043f, $0440
+                db -2
+Unknown_8d78b: 	dw $0800, $0801, $0800, $4801
+                db -2
+Unknown_8d794: 	dw $0863, $0864, $0863, $4864
+                db -2
+Unknown_8d79d: 	dw $0865, $0866, $0865, $4866
+                db -2
+Unknown_8d7a6: 	dw $011e, $011f
+                db -2
+Unknown_8d7ab: 	dw $0120, $01fd
+                db -2
+Unknown_8d7b0: 	dw $0121, $01fd
+                db -2
+Unknown_8d7b5: 	dw $0c81, $0182, $0183, $0482, $0c81, $0c82, $0483, $2084, $0385, $0386, $0487, $0488, $0489, $0a8a, $078b
+                db -1
+Unknown_8d7d4: 	dw $0323, $8323
+                db -2
+Unknown_8d7d9: 	dw $0224, $0225, $0226, $0225
+                db -2
+Unknown_8d7e2: 	dw $0727, $0728, $8727, $4728
+                db -2
+Unknown_8d7eb: 	dw $0729, $072a, $0729, $072b
+                db -2
+Unknown_8d7f4: 	dw $0729, $072c, $072d, $072c, $0729
+                db -1
+Unknown_8d7ff: 	dw $142e
+                db -1
+Unknown_8d802: 	dw $202f
+                db -1
+Unknown_8d805: 	dw $2030
+                db -1
+Unknown_8d808: 	dw $0330, $0331, $0330, $4331
+                db -2
+Unknown_8d811: 	dw $0432, $0433, $0434
+                db -4
+Unknown_8d818: 	dw $0335, $0336
+                db -2
+Unknown_8d81d: 	dw $0737, $0738
+                db -2
+Unknown_8d822: 	dw $2039
+                db -1
+Unknown_8d825: 	dw $023b, $023a, $023b
+                db -1
+Unknown_8d82c: 	dw $203c
+                db -1
+Unknown_8d82f: 	dw $0841, $0842, $0841, $4842
+                db -2
+                dw $0843, $0844
+                db -2
+                dw $0845, $0846
+                db -2
+                dw $0847, $0848
+                db -2
+                dw $0149, $4149, $c149, $8149
+                db -2
+                dw $204a
+                db -1
+                dw $204b
+                db -1
+                dw $204c
+                db -1
+                dw $204d
+                db -1
+                dw $034e, $03fd
+                db -2
+Unknown_8d861: 	dw $20fd
+                db -1
+Unknown_8d864: 	dw $204f
+                db -1
+Unknown_8d867: 	dw $0250, $1051, $01fd, $0152, $01fd, $0153
+                db -4
+Unknown_8d874: 	dw $2054
+                db -1
+Unknown_8d877: 	dw $2055
+                db -1
+Unknown_8d87a: 	dw $6055
+                db -1
+Unknown_8d87d: 	dw $a055
+                db -1
+Unknown_8d880: 	dw $e055
+                db -1
+Unknown_8d883: 	dw $0a56, $0957, $0a58, $0a59, $0958, $0a5a
+                db -2
+Unknown_8d890: 	dw $0250, $025b, $0250, $425b
+                db -2
+Unknown_8d899: 	dw $025c
+                db -1
+Unknown_8d89c: 	dw $025d
+                db -1
+Unknown_8d89f: 	dw $025e
+                db -1
+Unknown_8d8a2: 	dw $025f
+                db -1
+Unknown_8d8a5: 	dw $0260
+                db -1
+Unknown_8d8a8: 	dw $0261
+                db -1
+Unknown_8d8ab: 	dw $0262
+                db -1
+Unknown_8d8ae: 	dw $0332, $0333, $0334, $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331
+                db -1
+Unknown_8d8cd: 	dw $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331, $0332, $0333, $0334
+                db -4
+Unknown_8d8ec: 	dw $0367, $0368
+                db -2
+Unknown_8d8f1: 	dw $036c
+                db -1
+Unknown_8d8f4: 	dw $036d
+                db -1
+Unknown_8d8f7: 	dw $0269, $026a, $026b
+                db -4
+Unknown_8d8fe: 	dw $036e, $036f, $0370, $0371
+                db -2
+Unknown_8d907: 	dw $0371, $076e
+                db -1
+Unknown_8d90c: 	dw $2072, $0773, $0774
+                db -1
+Unknown_8d913: 	dw $0375
+                db -1
+Unknown_8d916: 	dw $0376, $0377, $0778
+                db -4
+Unknown_8d91d: 	dw $4376, $4377, $4778
+                db -4
+Unknown_8d924: 	dw $8376, $8377, $8778
+                db -4
+Unknown_8d92b: 	dw $c376, $c377, $c778
+                db -4
+Unknown_8d932: 	dw $0379, $037a, $037b, $077c, $077d
+                db -1
+Unknown_8d93d: 	dw $037e
+                db -1
+Unknown_8d940: 	dw $00fd
+                db -1
+Unknown_8d943: 	dw $087f, $0880
+                db -1
+Unknown_8d948: 	dw $487f, $4880
+                db -1
+; 8d94d
 
-OutdoorSprites: ; 144b8
-; Valid sprite IDs for each map group.
+Unknown_8d94d: ; 8d94d
+	dbw $00, Unknown_8dd8a ; 00
+	dbw $04, Unknown_8dd8a ; 01
+	dbw $4c, Unknown_8daf1 ; 02
+	dbw $5c, Unknown_8daf1 ; 03
+	dbw $6c, Unknown_8daf6 ; 04
+	dbw $6e, Unknown_8daf6 ; 05
+	dbw $2d, Unknown_8ddf0 ; 06
+	dbw $4d, Unknown_8ddf0 ; 07
+	dbw $60, Unknown_8de09 ; 08
+	dbw $00, Unknown_8de09 ; 09
+	dbw $00, Unknown_8de09 ; 0a
+	dbw $06, Unknown_8de09 ; 0b
+	dbw $0c, Unknown_8de7e ; 0c
+	dbw $0d, Unknown_8daf1 ; 0d
+	dbw $00, Unknown_8dc53 ; 0e
+	dbw $04, Unknown_8dc53 ; 0f
+	dbw $08, Unknown_8dc53 ; 10
+	dbw $40, Unknown_8dc53 ; 11
+	dbw $44, Unknown_8dc53 ; 12
+	dbw $48, Unknown_8dc53 ; 13
+	dbw $4c, Unknown_8dc53 ; 14
+	dbw $80, Unknown_8de87 ; 15
+	dbw $85, Unknown_8de87 ; 16
+	dbw $8a, Unknown_8de87 ; 17
+	dbw $00, Unknown_8db29 ; 18
+	dbw $01, Unknown_8db5c ; 19
+	dbw $09, Unknown_8db9d ; 1a
+	dbw $10, Unknown_8dc94 ; 1b
+	dbw $29, Unknown_8dc94 ; 1c
+	dbw $42, Unknown_8dc94 ; 1d
+	dbw $f8, Unknown_8e17e ; 1e
+	dbw $fa, Unknown_8e17e ; 1f
+	dbw $00, Unknown_8deb2 ; 20
+	dbw $00, Unknown_8dec3 ; 21
+	dbw $00, Unknown_8deec ; 22
+	dbw $0f, Unknown_8db07 ; 23
+	dbw $11, Unknown_8daf1 ; 24
+	dbw $12, Unknown_8daf1 ; 25
+	dbw $13, Unknown_8daf1 ; 26
+	dbw $00, Unknown_8df29 ; 27
+	dbw $08, Unknown_8df29 ; 28
+	dbw $10, Unknown_8df42 ; 29
+	dbw $10, Unknown_8df5b ; 2a
+	dbw $10, Unknown_8df74 ; 2b
+	dbw $10, Unknown_8df8d ; 2c
+	dbw $10, Unknown_8dfa6 ; 2d
+	dbw $3a, Unknown_8daf1 ; 2e
+	dbw $00, Unknown_8dd8a ; 2f
+	dbw $00, Unknown_8db18 ; 30
+	dbw $02, Unknown_8dd9b ; 31
+	dbw $06, Unknown_8db5c ; 32
+	dbw $0a, Unknown_8db5c ; 33
+	dbw $0e, Unknown_8db5c ; 34
+	dbw $12, Unknown_8db3a ; 35
+	dbw $13, Unknown_8db3a ; 36
+	dbw $00, Unknown_8dd8a ; 37
+	dbw $04, Unknown_8dd8a ; 38
+	dbw $10, Unknown_8db5c ; 39
+	dbw $00, Unknown_8dd9b ; 3a
+	dbw $04, Unknown_8daf1 ; 3b
+	dbw $00, Unknown_8dfbf ; 3c
+	dbw $00, Unknown_8ddac ; 3d
+	dbw $00, Unknown_8ddbd ; 3e
+	dbw $00, Unknown_8ddce ; 3f
+	dbw $00, Unknown_8dddf ; 40
+	dbw $00, Unknown_8dd9b ; 41
+	dbw $04, Unknown_8dd9b ; 42
+	dbw $00, Unknown_8dc2e ; 43
+	dbw $30, Unknown_8dc2e ; 44
+	dbw $03, Unknown_8dc2e ; 45
+	dbw $33, Unknown_8dc2e ; 46
+	dbw $06, Unknown_8dc2e ; 47
+	dbw $36, Unknown_8dc2e ; 48
+	dbw $09, Unknown_8dc2e ; 49
+	dbw $39, Unknown_8dc2e ; 4a
+	dbw $0c, Unknown_8dfcc ; 4b
+	dbw $0c, Unknown_8dfe5 ; 4c
+	dbw $3c, Unknown_8daf1 ; 4d
+	dbw $3e, Unknown_8daf1 ; 4e
+	dbw $00, Unknown_8de9c ; 4f
+	dbw $00, Unknown_8dea1 ; 50
+	dbw $00, Unknown_8dff6 ; 51
+	dbw $00, Unknown_8e007 ; 52
+	dbw $00, Unknown_8e018 ; 53
+	dbw $00, Unknown_8daf1 ; 54
+	dbw $01, Unknown_8daf1 ; 55
+	dbw $00, Unknown_8e029 ; 56
+	dbw $00, Unknown_8e076 ; 57
+	dbw $00, Unknown_8e0b7 ; 58
+	dbw $00, Unknown_8e0f4 ; 59
+	dbw $00, Unknown_8e139 ; 5a
+	dbw $04, Unknown_8dea1 ; 5b
+	dbw $00, Unknown_8e183 ; 5c
+	dbw $00, Unknown_8e1b4 ; 5d
+	dbw $00, Unknown_8e1b9 ; 5e
+	dbw $00, Unknown_8e1ca ; 5f
+	dbw $00, Unknown_8e1eb ; 60
+	dbw $00, Unknown_8e1f0 ; 61
+	dbw $00, Unknown_8e1f9 ; 62
+	dbw $00, Unknown_8e202 ; 63
+	dbw $04, Unknown_8e202 ; 64
+	dbw $00, Unknown_8e213 ; 65
+	dbw $04, Unknown_8e213 ; 66
+	dbw $20, Unknown_8e224 ; 67
+	dbw $21, Unknown_8e224 ; 68
+	dbw $22, Unknown_8e24b ; 69
+	dbw $23, Unknown_8e25c ; 6a
+	dbw $27, Unknown_8e27d ; 6b
+	dbw $2a, Unknown_8e229 ; 6c
+	dbw $2a, Unknown_8e23a ; 6d
+	dbw $00, Unknown_8e2ae ; 6e
+	dbw $08, Unknown_8e33f ; 6f
+	dbw $60, Unknown_8e3b0 ; 70
+	dbw $68, Unknown_8e429 ; 71
+	dbw $00, Unknown_8e4a6 ; 72
+	dbw $05, Unknown_8e4a6 ; 73
+	dbw $0a, Unknown_8e4a6 ; 74
+	dbw $50, Unknown_8e50b ; 75
+	dbw $00, Unknown_8e54c ; 76
+	dbw $01, Unknown_8e551 ; 77
+	dbw $04, Unknown_8e55e ; 78
+	dbw $00, Unknown_8db29 ; 79
+	dbw $01, Unknown_8e57b ; 7a
+	dbw $03, Unknown_8e59c ; 7b
+	dbw $08, Unknown_8e5cd ; 7c
+	dbw $1c, Unknown_8e5cd ; 7d
+	dbw $80, Unknown_8e61e ; 7e
+	dbw $00, Unknown_8e66f ; 7f
+	dbw $04, Unknown_8e66f ; 80
+	dbw $d0, Unknown_8e680 ; 81
+	dbw $d3, Unknown_8e680 ; 82
+	dbw $d6, Unknown_8e680 ; 83
+	dbw $6c, Unknown_8e6a5 ; 84
+	dbw $68, Unknown_8e6a5 ; 85
+	dbw $64, Unknown_8e6a5 ; 86
+	dbw $60, Unknown_8e6a5 ; 87
+	dbw $0c, Unknown_8e6a5 ; 88
+	dbw $08, Unknown_8e6a5 ; 89
+	dbw $04, Unknown_8e6a5 ; 8a
+	dbw $00, Unknown_8e6a5 ; 8b
+; 8daf1
 
-	dw Group1Sprites
-	dw Group2Sprites
-	dw Group3Sprites
-	dw Group4Sprites
-	dw Group5Sprites
-	dw Group6Sprites
-	dw Group7Sprites
-	dw Group8Sprites
-	dw Group9Sprites
-	dw Group10Sprites
-	dw Group11Sprites
-	dw Group12Sprites
-	dw Group13Sprites
-	dw Group14Sprites
-	dw Group15Sprites
-	dw Group16Sprites
-	dw Group17Sprites
-	dw Group18Sprites
-	dw Group19Sprites
-	dw Group20Sprites
-	dw Group21Sprites
-	dw Group22Sprites
-	dw Group23Sprites
-	dw Group24Sprites
-	dw Group25Sprites
-	dw Group26Sprites
-; 144ec
 
+Unknown_8daf1: ; 8daf1
+	db 1
+	db $fc, $fc, $00, $00
+; 8daf6
 
-Group13Sprites: ; 144ec
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_TEACHER
-	db SPRITE_FISHER
-	db SPRITE_YOUNGSTER
-	db SPRITE_BLUE
-	db SPRITE_GRAMPS
-	db SPRITE_BUG_CATCHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_SWIMMER_GIRL
-	db SPRITE_SWIMMER_GUY
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 14503
+Unknown_8daf6: ; 8daf6
+	db 4
+	db $f8, $f8, $00, $00
+	db $f8, $00, $01, $00
+	db $00, $f8, $10, $00
+	db $00, $00, $11, $00
+; 8db07
 
-Group23Sprites: ; 14503
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_TEACHER
-	db SPRITE_FISHER
-	db SPRITE_YOUNGSTER
-	db SPRITE_BLUE
-	db SPRITE_GRAMPS
-	db SPRITE_BUG_CATCHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_SWIMMER_GIRL
-	db SPRITE_SWIMMER_GUY
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 1451a
+Unknown_8db07: ; 8db07
+	db 4
+	db $f8, $f8, $00, $00
+	db $f8, $00, $00, $20
+	db $00, $f8, $01, $00
+	db $00, $00, $01, $20
+; 8db18
 
-Group14Sprites: ; 1451a
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_TEACHER
-	db SPRITE_FISHER
-	db SPRITE_YOUNGSTER
-	db SPRITE_BLUE
-	db SPRITE_GRAMPS
-	db SPRITE_BUG_CATCHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_SWIMMER_GIRL
-	db SPRITE_SWIMMER_GUY
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 14531
+Unknown_8db18: ; 8db18
+	db 4
+	db $f8, $f8, $00, $80
+	db $f8, $00, $00, $a0
+	db $00, $f8, $01, $80
+	db $00, $00, $01, $a0
+; 8db29
 
-Group6Sprites: ; 14531
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_TEACHER
-	db SPRITE_FISHER
-	db SPRITE_YOUNGSTER
-	db SPRITE_BLUE
-	db SPRITE_GRAMPS
-	db SPRITE_BUG_CATCHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_SWIMMER_GIRL
-	db SPRITE_SWIMMER_GUY
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 14548
+Unknown_8db29: ; 8db29
+	db 4
+	db $f8, $f8, $00, $00
+	db $f8, $00, $00, $20
+	db $00, $f8, $00, $40
+	db $00, $00, $00, $60
+; 8db3a
 
-Group7Sprites: ; 14548
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_SUPER_NERD
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_FISHER
-	db SPRITE_YOUNGSTER
-	db SPRITE_LASS
-	db SPRITE_POKEFAN_M
-	db SPRITE_ROCKET
-	db SPRITE_MISTY
-	db SPRITE_POKE_BALL
-	db SPRITE_SLOWPOKE
-; 1455f
+Unknown_8db3a: ; 8db3a
+	db 4
+	db $f8, $f8, $00, $07
+	db $f8, $00, $00, $27
+	db $00, $f8, $00, $47
+	db $00, $00, $00, $67
+; 8db4b
 
-Group25Sprites: ; 1455f
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_SUPER_NERD
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_FISHER
-	db SPRITE_YOUNGSTER
-	db SPRITE_LASS
-	db SPRITE_POKEFAN_M
-	db SPRITE_ROCKET
-	db SPRITE_MISTY
-	db SPRITE_POKE_BALL
-	db SPRITE_SLOWPOKE
-; 14576
+; 8db4b
+	db 4
+	db $f8, $f8, $00, $80
+	db $f8, $00, $00, $a0
+	db $00, $f8, $00, $c0
+	db $00, $00, $00, $e0
+; 8db5c
 
-Group21Sprites: ; 14576
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_FISHER
-	db SPRITE_POLIWAG
-	db SPRITE_TEACHER
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_LASS
-	db SPRITE_BIKER
-	db SPRITE_SILVER
-	db SPRITE_BLUE
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 1458d
+Unknown_8db5c: ; 8db5c
+	db 16
+	db $f0, $f0, $00, $00
+	db $f0, $f8, $01, $00
+	db $f8, $f0, $02, $00
+	db $f8, $f8, $03, $00
+	db $f0, $00, $01, $20
+	db $f0, $08, $00, $20
+	db $f8, $00, $03, $20
+	db $f8, $08, $02, $20
+	db $00, $f0, $02, $40
+	db $00, $f8, $03, $40
+	db $08, $f0, $00, $40
+	db $08, $f8, $01, $40
+	db $00, $00, $03, $60
+	db $00, $08, $02, $60
+	db $08, $00, $01, $60
+	db $08, $08, $00, $60
+; 8db9d
 
-Group18Sprites: ; 1458d
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_POKEFAN_M
-	db SPRITE_MACHOP
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_FISHER
-	db SPRITE_TEACHER
-	db SPRITE_SUPER_NERD
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_BIKER
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 145a4
+Unknown_8db9d: ; 8db9d
+	db 36
+	db $e8, $e8, $00, $00
+	db $e8, $f0, $01, $00
+	db $e8, $f8, $02, $00
+	db $f0, $e8, $03, $00
+	db $f0, $f0, $04, $00
+	db $f0, $f8, $05, $00
+	db $f8, $e8, $06, $00
+	db $f8, $f0, $05, $00
+	db $f8, $f8, $05, $00
+	db $e8, $00, $02, $20
+	db $e8, $08, $01, $20
+	db $e8, $10, $00, $20
+	db $f0, $00, $05, $20
+	db $f0, $08, $04, $20
+	db $f0, $10, $03, $20
+	db $f8, $00, $05, $20
+	db $f8, $08, $05, $20
+	db $f8, $10, $06, $20
+	db $00, $e8, $06, $40
+	db $00, $f0, $05, $40
+	db $00, $f8, $05, $40
+	db $08, $e8, $03, $40
+	db $08, $f0, $04, $40
+	db $08, $f8, $05, $40
+	db $10, $e8, $00, $40
+	db $10, $f0, $01, $40
+	db $10, $f8, $02, $40
+	db $00, $00, $05, $60
+	db $00, $08, $05, $60
+	db $00, $10, $06, $60
+	db $08, $00, $05, $60
+	db $08, $08, $04, $60
+	db $08, $10, $03, $60
+	db $10, $00, $02, $60
+	db $10, $08, $01, $60
+	db $10, $10, $00, $60
+; 8dc2e
 
-Group12Sprites: ; 145a4
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_POKEFAN_M
-	db SPRITE_MACHOP
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_FISHER
-	db SPRITE_TEACHER
-	db SPRITE_SUPER_NERD
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_BIKER
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 145bb
+Unknown_8dc2e: ; 8dc2e
+	db 9
+	db $f4, $f4, $00, $00
+	db $f4, $fc, $01, $00
+	db $f4, $04, $02, $00
+	db $fc, $f4, $10, $00
+	db $fc, $fc, $11, $00
+	db $fc, $04, $12, $00
+	db $04, $f4, $20, $00
+	db $04, $fc, $21, $00
+	db $04, $04, $22, $00
+; 8dc53
 
-Group17Sprites: ; 145bb
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_POKEFAN_M
-	db SPRITE_MACHOP
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_FISHER
-	db SPRITE_TEACHER
-	db SPRITE_SUPER_NERD
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_BIKER
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 145d2
+Unknown_8dc53: ; 8dc53
+	db 16
+	db $f0, $f0, $00, $00
+	db $f0, $f8, $01, $00
+	db $f0, $00, $02, $00
+	db $f0, $08, $03, $00
+	db $f8, $f0, $10, $00
+	db $f8, $f8, $11, $00
+	db $f8, $00, $12, $00
+	db $f8, $08, $13, $00
+	db $00, $f0, $20, $00
+	db $00, $f8, $21, $00
+	db $00, $00, $22, $00
+	db $00, $08, $23, $00
+	db $08, $f0, $30, $00
+	db $08, $f8, $31, $00
+	db $08, $00, $32, $00
+	db $08, $08, $33, $00
+; 8dc94
 
-Group16Sprites: ; 145d2
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_POKEFAN_M
-	db SPRITE_BUENA
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_FISHER
-	db SPRITE_TEACHER
-	db SPRITE_SUPER_NERD
-	db SPRITE_MACHOP
-	db SPRITE_BIKER
-	db SPRITE_POKE_BALL
-	db SPRITE_BOULDER
-; 145e9
+Unknown_8dc94: ; 8dc94
+	db 25
+	db $ec, $ec, $00, $00
+	db $f4, $ec, $01, $00
+	db $fc, $ec, $02, $00
+	db $04, $ec, $03, $00
+	db $0c, $ec, $04, $00
+	db $ec, $f4, $05, $00
+	db $f4, $f4, $06, $00
+	db $fc, $f4, $07, $00
+	db $04, $f4, $08, $00
+	db $0c, $f4, $09, $00
+	db $ec, $fc, $0a, $00
+	db $f4, $fc, $0b, $00
+	db $fc, $fc, $0c, $00
+	db $04, $fc, $0d, $00
+	db $0c, $fc, $0e, $00
+	db $ec, $04, $0f, $00
+	db $f4, $04, $10, $00
+	db $fc, $04, $11, $00
+	db $04, $04, $12, $00
+	db $0c, $04, $13, $00
+	db $ec, $0c, $14, $00
+	db $f4, $0c, $15, $00
+	db $fc, $0c, $16, $00
+	db $04, $0c, $17, $00
+	db $0c, $0c, $18, $00
+; 8dcf9
 
-Group24Sprites: ; 145e9
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_SILVER
-	db SPRITE_TEACHER
-	db SPRITE_FISHER
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_YOUNGSTER
-	db SPRITE_MONSTER
-	db SPRITE_GRAMPS
-	db SPRITE_BUG_CATCHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 14600
+; 8dcf9
+	db 36
+	db $e8, $e8, $00, $00
+	db $e8, $f0, $01, $00
+	db $e8, $f8, $02, $00
+	db $e8, $00, $03, $00
+	db $e8, $08, $04, $00
+	db $e8, $10, $05, $00
+	db $f0, $e8, $06, $00
+	db $f0, $f0, $07, $00
+	db $f0, $f8, $08, $00
+	db $f0, $00, $09, $00
+	db $f0, $08, $0a, $00
+	db $f0, $10, $0b, $00
+	db $f8, $e8, $0c, $00
+	db $f8, $f0, $0d, $00
+	db $f8, $f8, $0e, $00
+	db $f8, $00, $0f, $00
+	db $f8, $08, $10, $00
+	db $f8, $10, $11, $00
+	db $00, $e8, $12, $00
+	db $00, $f0, $13, $00
+	db $00, $f8, $14, $00
+	db $00, $00, $15, $00
+	db $00, $08, $16, $00
+	db $00, $10, $17, $00
+	db $08, $e8, $18, $00
+	db $08, $f0, $19, $00
+	db $08, $f8, $1a, $00
+	db $08, $00, $1b, $00
+	db $08, $08, $1c, $00
+	db $08, $10, $1d, $00
+	db $10, $e8, $1e, $00
+	db $10, $f0, $1f, $00
+	db $10, $f8, $20, $00
+	db $10, $00, $21, $00
+	db $10, $08, $22, $00
+	db $10, $10, $23, $00
+; 8dd8a
 
-Group26Sprites: ; 14600
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_SILVER
-	db SPRITE_TEACHER
-	db SPRITE_FISHER
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_YOUNGSTER
-	db SPRITE_MONSTER
-	db SPRITE_GRAMPS
-	db SPRITE_BUG_CATCHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 14617
+Unknown_8dd8a: ; 8dd8a
+	db 4
+	db $f8, $f8, $00, $00
+	db $f8, $00, $01, $00
+	db $00, $f8, $02, $00
+	db $00, $00, $03, $00
+; 8dd9b
 
-Group19Sprites: ; 14617
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_SILVER
-	db SPRITE_TEACHER
-	db SPRITE_FISHER
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_YOUNGSTER
-	db SPRITE_MONSTER
-	db SPRITE_GRAMPS
-	db SPRITE_BUG_CATCHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 1462e
+Unknown_8dd9b: ; 8dd9b
+	db 4
+	db $f8, $f8, $00, $80
+	db $f8, $00, $01, $80
+	db $00, $f8, $02, $80
+	db $00, $00, $03, $80
+; 8ddac
 
-Group10Sprites: ; 1462e
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_FISHER
-	db SPRITE_LASS
-	db SPRITE_OFFICER
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_BUG_CATCHER
-	db SPRITE_SUPER_NERD
-	db SPRITE_WEIRD_TREE
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 14645
+Unknown_8ddac: ; 8ddac
+	db 4
+	db $f8, $f8, $00, $00
+	db $f8, $00, $01, $00
+	db $00, $f8, $08, $00
+	db $00, $00, $03, $00
+; 8ddbd
 
-Group4Sprites: ; 14645
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_FISHER
-	db SPRITE_LASS
-	db SPRITE_OFFICER
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_BUG_CATCHER
-	db SPRITE_SUPER_NERD
-	db SPRITE_WEIRD_TREE
-	db SPRITE_POKE_BALL
-	db SPRITE_FRUIT_TREE
-; 1465c
+Unknown_8ddbd: ; 8ddbd
+	db 4
+	db $f8, $f8, $04, $00
+	db $f8, $00, $05, $00
+	db $00, $f8, $08, $00
+	db $00, $00, $07, $00
+; 8ddce
 
-Group8Sprites: ; 1465c
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_KURT_OUTSIDE
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_OFFICER
-	db SPRITE_POKEFAN_M
-	db SPRITE_BLACK_BELT
-	db SPRITE_TEACHER
-	db SPRITE_AZALEA_ROCKET
-	db SPRITE_LASS
-	db SPRITE_SILVER
-	db SPRITE_FRUIT_TREE
-	db SPRITE_SLOWPOKE
-; 14673
+Unknown_8ddce: ; 8ddce
+	db 4
+	db $f8, $f8, $00, $00
+	db $f8, $00, $01, $00
+	db $00, $f8, $09, $00
+	db $00, $00, $03, $00
+; 8dddf
 
-Group11Sprites: ; 14673
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_POKE_BALL
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_OFFICER
-	db SPRITE_POKEFAN_M
-	db SPRITE_DAYCARE_MON_1
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_ROCKET
-	db SPRITE_LASS
-	db SPRITE_DAYCARE_MON_2
-	db SPRITE_FRUIT_TREE
-	db SPRITE_SLOWPOKE
-; 1468a
+Unknown_8dddf: ; 8dddf
+	db 4
+	db $f8, $f8, $04, $00
+	db $f8, $00, $05, $00
+	db $00, $f8, $09, $00
+	db $00, $00, $07, $00
+; 8ddf0
 
-Group22Sprites: ; 1468a
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_STANDING_YOUNGSTER
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_OLIVINE_RIVAL
-	db SPRITE_POKEFAN_M
-	db SPRITE_LASS
-	db SPRITE_BUENA
-	db SPRITE_SWIMMER_GIRL
-	db SPRITE_SAILOR
-	db SPRITE_POKEFAN_F
-	db SPRITE_SUPER_NERD
-	db SPRITE_TAUROS
-	db SPRITE_FRUIT_TREE
-	db SPRITE_ROCK
-; 146a1
+Unknown_8ddf0: ; 8ddf0
+	db 6
+	db $f8, $f4, $00, $01
+	db $f8, $fc, $01, $01
+	db $f8, $04, $02, $01
+	db $00, $f4, $10, $01
+	db $00, $fc, $11, $01
+	db $00, $04, $12, $01
+; 8de09
 
-Group1Sprites: ; 146a1
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_STANDING_YOUNGSTER
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_OLIVINE_RIVAL
-	db SPRITE_POKEFAN_M
-	db SPRITE_LASS
-	db SPRITE_BUENA
-	db SPRITE_SWIMMER_GIRL
-	db SPRITE_SAILOR
-	db SPRITE_POKEFAN_F
-	db SPRITE_SUPER_NERD
-	db SPRITE_TAUROS
-	db SPRITE_FRUIT_TREE
-	db SPRITE_ROCK
-; 146b8
+Unknown_8de09: ; 8de09
+	db 29
+	db $e8, $e8, $00, $00
+	db $e8, $f0, $01, $00
+	db $e8, $f8, $02, $00
+	db $e8, $00, $03, $00
+	db $f0, $e8, $10, $00
+	db $f0, $f0, $11, $00
+	db $f0, $f8, $12, $00
+	db $f0, $00, $13, $00
+	db $f8, $e8, $20, $00
+	db $f8, $f0, $21, $00
+	db $f8, $f8, $22, $00
+	db $f8, $00, $23, $00
+	db $f8, $08, $24, $00
+	db $00, $e8, $30, $80
+	db $00, $f0, $31, $80
+	db $00, $f8, $32, $80
+	db $00, $00, $33, $80
+	db $00, $08, $34, $80
+	db $08, $e8, $40, $80
+	db $08, $f0, $41, $80
+	db $08, $f8, $42, $80
+	db $08, $00, $43, $80
+	db $08, $08, $44, $80
+	db $08, $10, $45, $80
+	db $10, $f0, $51, $80
+	db $10, $f8, $52, $80
+	db $10, $00, $53, $80
+	db $10, $08, $54, $80
+	db $10, $10, $55, $80
+; 8de7e
 
-Group9Sprites: ; 146b8
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_LANCE
-	db SPRITE_GRAMPS
-	db SPRITE_SUPER_NERD
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_FISHER
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_LASS
-	db SPRITE_YOUNGSTER
-	db SPRITE_GYARADOS
-	db SPRITE_FRUIT_TREE
-	db SPRITE_POKE_BALL
-; 146cf
+Unknown_8de7e: ; 8de7e
+	db 2
+	db $f8, $fc, $00, $00
+	db $00, $fc, $10, $00
+; 8de87
 
-Group2Sprites: ; 146cf
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_LASS
-	db SPRITE_SUPER_NERD
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_POKEFAN_M
-	db SPRITE_BLACK_BELT
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_FISHER
-	db SPRITE_FRUIT_TREE
-	db SPRITE_POKE_BALL
-; 146e6
+Unknown_8de87: ; 8de87
+	db 5
+	db $f0, $18, $00, $00
+	db $f0, $20, $01, $00
+	db $f8, $10, $02, $00
+	db $f8, $18, $03, $00
+	db $00, $10, $04, $00
+; 8de9c
 
-Group5Sprites: ; 146e6
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_GRAMPS
-	db SPRITE_YOUNGSTER
-	db SPRITE_LASS
-	db SPRITE_SUPER_NERD
-	db SPRITE_COOLTRAINER_M
-	db SPRITE_POKEFAN_M
-	db SPRITE_BLACK_BELT
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_FISHER
-	db SPRITE_FRUIT_TREE
-	db SPRITE_POKE_BALL
-; 146fd
+Unknown_8de9c: ; 8de9c
+	db 1
+	db $fc, $fc, $00, $06
+; 8dea1
 
-Group3Sprites: ; 146fd
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_GAMEBOY_KID
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_LASS
-	db SPRITE_POKEFAN_F
-	db SPRITE_TEACHER
-	db SPRITE_YOUNGSTER
-	db SPRITE_GROWLITHE
-	db SPRITE_POKEFAN_M
-	db SPRITE_ROCKER
-	db SPRITE_FISHER
-	db SPRITE_SCIENTIST
-	db SPRITE_POKE_BALL
-	db SPRITE_BOULDER
-; 14714
+Unknown_8dea1: ; 8dea1
+	db 4
+	db $f8, $f8, $00, $06
+	db $f8, $00, $01, $06
+	db $00, $f8, $02, $06
+	db $00, $00, $03, $06
+; 8deb2
 
-Group15Sprites: ; 14714
-	db SPRITE_SUICUNE
-	db SPRITE_SILVER_TROPHY
-	db SPRITE_FAMICOM
-	db SPRITE_POKEDEX
-	db SPRITE_WILL
-	db SPRITE_KAREN
-	db SPRITE_NURSE
-	db SPRITE_OLD_LINK_RECEPTIONIST
-	db SPRITE_BIG_LAPRAS
-	db SPRITE_BIG_ONIX
-	db SPRITE_SUDOWOODO
-	db SPRITE_BIG_SNORLAX
-	db SPRITE_SAILOR
-	db SPRITE_FISHING_GURU
-	db SPRITE_GENTLEMAN
-	db SPRITE_SUPER_NERD
-	db SPRITE_HO_OH
-	db SPRITE_TEACHER
-	db SPRITE_COOLTRAINER_F
-	db SPRITE_YOUNGSTER
-	db SPRITE_FAIRY
-	db SPRITE_POKE_BALL
-	db SPRITE_ROCK
-; 1472b
+Unknown_8deb2: ; 8deb2
+	db 4
+	db $ff, $ff, $00, $00
+	db $ff, $00, $00, $20
+	db $00, $ff, $00, $40
+	db $00, $00, $00, $60
+; 8dec3
+
+Unknown_8dec3: ; 8dec3
+	db 10
+	db $ff, $00, $00, $00
+	db $ff, $08, $01, $00
+	db $ff, $10, $01, $00
+	db $ff, $18, $01, $00
+	db $ff, $20, $00, $20
+	db $00, $00, $00, $40
+	db $00, $08, $01, $40
+	db $00, $10, $01, $40
+	db $00, $18, $01, $40
+	db $00, $20, $00, $60
+; 8deec
+
+Unknown_8deec: ; 8deec
+	db 15
+	db $ec, $f4, $00, $11
+	db $ec, $fc, $01, $11
+	db $ec, $04, $02, $11
+	db $f4, $f4, $03, $11
+	db $f4, $fc, $04, $11
+	db $f4, $04, $05, $11
+	db $fc, $f4, $06, $11
+	db $fc, $fc, $07, $11
+	db $fc, $04, $08, $11
+	db $04, $f4, $09, $11
+	db $04, $fc, $0a, $11
+	db $04, $04, $0b, $11
+	db $0c, $f4, $0c, $11
+	db $0c, $fc, $0d, $11
+	db $0c, $04, $0e, $11
+; 8df29
+
+Unknown_8df29: ; 8df29
+	db 6
+	db $f4, $f4, $00, $15
+	db $f4, $fc, $02, $15
+	db $f4, $04, $00, $35
+	db $04, $f4, $04, $15
+	db $04, $fc, $06, $15
+	db $04, $04, $04, $35
+; 8df42
+
+Unknown_8df42: ; 8df42
+	db 6
+	db $f4, $f4, $00, $16
+	db $f4, $fc, $02, $16
+	db $f4, $04, $04, $16
+	db $04, $f4, $06, $16
+	db $04, $fc, $08, $16
+	db $04, $04, $0a, $16
+; 8df5b
+
+Unknown_8df5b: ; 8df5b
+	db 6
+	db $f4, $f4, $00, $16
+	db $f4, $fc, $02, $16
+	db $f4, $04, $04, $16
+	db $04, $f4, $0c, $16
+	db $04, $fc, $0e, $16
+	db $04, $04, $10, $16
+; 8df74
+
+Unknown_8df74: ; 8df74
+	db 6
+	db $f4, $f4, $00, $16
+	db $f4, $fc, $02, $16
+	db $f4, $04, $04, $16
+	db $04, $f4, $12, $16
+	db $04, $fc, $14, $16
+	db $04, $04, $16, $16
+; 8df8d
+
+Unknown_8df8d: ; 8df8d
+	db 6
+	db $f4, $f4, $00, $16
+	db $f4, $fc, $02, $16
+	db $f4, $04, $04, $16
+	db $04, $f4, $18, $16
+	db $04, $fc, $1a, $16
+	db $04, $04, $1c, $16
+; 8dfa6
+
+Unknown_8dfa6: ; 8dfa6
+	db 6
+	db $f4, $f4, $1e, $16
+	db $f4, $fc, $20, $16
+	db $f4, $04, $22, $16
+	db $04, $f4, $24, $16
+	db $04, $fc, $26, $16
+	db $04, $04, $28, $16
+; 8dfbf
+
+Unknown_8dfbf: ; 8dfbf
+	db 3
+	db $f4, $fc, $00, $10
+	db $fc, $fc, $00, $10
+	db $04, $fc, $00, $10
+; 8dfcc
+
+Unknown_8dfcc: ; 8dfcc
+	db 6
+	db $00, $00, $00, $00
+	db $00, $08, $01, $00
+	db $00, $10, $01, $00
+	db $00, $18, $01, $00
+	db $00, $20, $02, $00
+	db $00, $28, $03, $00
+; 8dfe5
+
+Unknown_8dfe5: ; 8dfe5
+	db 4
+	db $00, $00, $00, $00
+	db $00, $08, $01, $00
+	db $00, $10, $02, $00
+	db $00, $18, $03, $00
+; 8dff6
+
+Unknown_8dff6: ; 8dff6
+	db 4
+	db $f8, $f6, $00, $06
+	db $f8, $02, $01, $06
+	db $00, $f6, $02, $06
+	db $00, $02, $03, $06
+; 8e007
+
+Unknown_8e007: ; 8e007
+	db 4
+	db $f8, $f4, $00, $06
+	db $f8, $04, $01, $06
+	db $00, $f4, $02, $06
+	db $00, $04, $03, $06
+; 8e018
+
+Unknown_8e018: ; 8e018
+	db 4
+	db $f8, $f0, $00, $06
+	db $f8, $08, $01, $06
+	db $00, $f0, $02, $06
+	db $00, $08, $03, $06
+; 8e029
+
+Unknown_8e029: ; 8e029
+	db 19
+	db $f8, $e0, $00, $00
+	db $f0, $e8, $02, $00
+	db $00, $e8, $04, $00
+	db $e8, $f0, $06, $00
+	db $f8, $f0, $08, $00
+	db $08, $f0, $0a, $00
+	db $e8, $f8, $0c, $00
+	db $f8, $f8, $0e, $00
+	db $08, $f8, $10, $00
+	db $e8, $00, $12, $00
+	db $f8, $00, $14, $00
+	db $08, $00, $16, $00
+	db $e8, $08, $18, $00
+	db $f8, $08, $1a, $00
+	db $08, $08, $1c, $00
+	db $f8, $10, $1e, $00
+	db $08, $10, $20, $00
+	db $f0, $18, $22, $00
+	db $00, $18, $24, $00
+; 8e076
+
+Unknown_8e076: ; 8e076
+	db 16
+	db $f8, $e0, $00, $00
+	db $f0, $e8, $02, $00
+	db $00, $e8, $04, $00
+	db $f8, $f0, $26, $00
+	db $08, $f0, $0a, $00
+	db $e8, $f8, $28, $00
+	db $f8, $f8, $2a, $00
+	db $08, $f8, $10, $00
+	db $f8, $00, $2c, $00
+	db $08, $00, $16, $00
+	db $f8, $08, $30, $00
+	db $08, $08, $1c, $00
+	db $f8, $10, $1e, $00
+	db $08, $10, $20, $00
+	db $f0, $18, $22, $00
+	db $00, $18, $24, $00
+; 8e0b7
+
+Unknown_8e0b7: ; 8e0b7
+	db 15
+	db $f8, $e0, $00, $00
+	db $f0, $e8, $02, $00
+	db $00, $e8, $32, $00
+	db $f8, $f0, $34, $00
+	db $08, $f0, $36, $00
+	db $f8, $f8, $38, $00
+	db $08, $f8, $3a, $00
+	db $f8, $00, $3c, $00
+	db $08, $00, $3e, $00
+	db $f8, $08, $30, $00
+	db $08, $08, $1c, $00
+	db $f8, $10, $1e, $00
+	db $08, $10, $20, $00
+	db $f0, $18, $22, $00
+	db $00, $18, $24, $00
+; 8e0f4
+
+Unknown_8e0f4: ; 8e0f4
+	db 17
+	db $f8, $e0, $00, $00
+	db $f0, $e8, $02, $00
+	db $00, $e8, $04, $00
+	db $f8, $f0, $40, $00
+	db $08, $f0, $42, $00
+	db $18, $f0, $44, $00
+	db $f8, $f8, $46, $00
+	db $08, $f8, $48, $00
+	db $18, $f8, $4a, $00
+	db $f8, $00, $4c, $00
+	db $08, $00, $4e, $00
+	db $f8, $08, $30, $00
+	db $08, $08, $1c, $00
+	db $f8, $10, $1e, $00
+	db $08, $10, $20, $00
+	db $f0, $18, $22, $00
+	db $00, $18, $24, $00
+; 8e139
+
+Unknown_8e139: ; 8e139
+	db 17
+	db $f8, $e0, $00, $00
+	db $f0, $e8, $02, $00
+	db $00, $e8, $04, $00
+	db $f8, $f0, $50, $00
+	db $08, $f0, $0a, $00
+	db $e8, $f8, $52, $00
+	db $f8, $f8, $54, $00
+	db $08, $f8, $10, $00
+	db $e8, $00, $56, $00
+	db $f8, $00, $2e, $00
+	db $08, $00, $16, $00
+	db $f8, $08, $30, $00
+	db $08, $08, $1c, $00
+	db $f8, $10, $1e, $00
+	db $08, $10, $20, $00
+	db $f0, $18, $22, $00
+	db $00, $18, $24, $00
+; 8e17e
+
+Unknown_8e17e: ; 8e17e
+	db 1
+	db $fc, $fc, $00, $11
+; 8e183
+
+Unknown_8e183: ; 8e183
+	db 12
+	db $00, $00, $30, $00
+	db $00, $08, $31, $00
+	db $00, $10, $31, $00
+	db $00, $18, $31, $00
+	db $00, $20, $31, $00
+	db $00, $28, $32, $00
+	db $08, $00, $33, $00
+	db $08, $08, $34, $00
+	db $08, $10, $34, $00
+	db $08, $18, $34, $00
+	db $08, $20, $34, $00
+	db $08, $28, $35, $00
+; 8e1b4
+
+Unknown_8e1b4: ; 8e1b4
+	db 1
+	db $00, $00, $ed, $00
+; 8e1b9
+
+Unknown_8e1b9: ; 8e1b9
+	db 4
+	db $ff, $ff, $30, $00
+	db $ff, $01, $32, $00
+	db $01, $ff, $33, $00
+	db $01, $01, $35, $00
+; 8e1ca
+
+Unknown_8e1ca: ; 8e1ca
+	db 8
+	db $ff, $ff, $30, $00
+	db $ff, $04, $31, $00
+	db $ff, $0c, $31, $00
+	db $ff, $11, $32, $00
+	db $01, $ff, $33, $00
+	db $01, $04, $34, $00
+	db $01, $0c, $34, $00
+	db $01, $11, $35, $00
+; 8e1eb
+
+Unknown_8e1eb: ; 8e1eb
+	db 1
+	db $00, $00, $34, $00
+; 8e1f0
+
+Unknown_8e1f0: ; 8e1f0
+	db 2
+	db $00, $00, $30, $00
+	db $08, $00, $33, $00
+; 8e1f9
+
+Unknown_8e1f9: ; 8e1f9
+	db 2
+	db $00, $00, $32, $00
+	db $08, $00, $35, $00
+; 8e202
+
+Unknown_8e202: ; 8e202
+	db 4
+	db $f8, $f8, $00, $01
+	db $f8, $00, $01, $01
+	db $00, $f8, $02, $01
+	db $00, $00, $03, $01
+; 8e213
+
+Unknown_8e213: ; 8e213
+	db 4
+	db $f8, $f8, $00, $81
+	db $f8, $00, $01, $81
+	db $00, $f8, $02, $81
+	db $00, $00, $03, $81
+; 8e224
 
-Group20Sprites: ; 1472b
-	db SPRITE_OAK
-	db SPRITE_FISHER
-	db SPRITE_TEACHER
-	db SPRITE_TWIN
-	db SPRITE_POKEFAN_M
-	db SPRITE_GRAMPS
-	db SPRITE_FAIRY
-	db SPRITE_SILVER
-	db SPRITE_FISHING_GURU
-	db SPRITE_POKE_BALL
-	db SPRITE_POKEDEX
-; 14736
+Unknown_8e224: ; 8e224
+	db 1
+	db $fc, $fc, $00, $02
+; 8e229
 
+Unknown_8e229: ; 8e229
+	db 4
+	db $f0, $fc, $00, $03
+	db $f8, $fc, $01, $03
+	db $00, $fc, $02, $03
+	db $08, $fc, $03, $03
+; 8e23a
 
-SpriteHeaders: ; 14736
-INCLUDE "gfx/overworld/sprite_headers.asm"
-; 1499a
+Unknown_8e23a: ; 8e23a
+	db 4
+	db $f0, $fc, $03, $44
+	db $f8, $fc, $02, $44
+	db $00, $fc, $01, $44
+	db $08, $fc, $00, $44
+; 8e24b
+
+Unknown_8e24b: ; 8e24b
+	db 4
+	db $f8, $f8, $00, $01
+	db $f8, $00, $00, $21
+	db $00, $f8, $00, $41
+	db $00, $00, $00, $61
+; 8e25c
+
+Unknown_8e25c: ; 8e25c
+	db 8
+	db $f4, $f4, $00, $01
+	db $f4, $fc, $01, $01
+	db $f4, $04, $00, $21
+	db $fc, $f4, $02, $01
+	db $fc, $04, $02, $21
+	db $04, $f4, $00, $41
+	db $04, $fc, $01, $41
+	db $04, $04, $00, $61
+; 8e27d
+
+Unknown_8e27d: ; 8e27d
+	db 12
+	db $f0, $f0, $00, $01
+	db $f0, $f8, $01, $01
+	db $f8, $f0, $02, $01
+	db $f0, $00, $01, $21
+	db $f0, $08, $00, $21
+	db $f8, $08, $02, $21
+	db $00, $f0, $02, $41
+	db $08, $f0, $00, $41
+	db $08, $f8, $01, $41
+	db $00, $08, $02, $61
+	db $08, $00, $01, $61
+	db $08, $08, $00, $61
+; 8e2ae
+
+Unknown_8e2ae: ; 8e2ae
+	db 36
+	db $e8, $08, $05, $00
+	db $e8, $10, $06, $00
+	db $e8, $18, $07, $00
+	db $f0, $e8, $11, $00
+	db $f0, $f0, $12, $00
+	db $f0, $f8, $13, $00
+	db $f0, $00, $14, $00
+	db $f0, $08, $15, $00
+	db $f0, $10, $16, $00
+	db $f0, $18, $17, $00
+	db $f8, $e0, $20, $00
+	db $f8, $e8, $21, $00
+	db $f8, $f0, $22, $00
+	db $f8, $f8, $23, $00
+	db $f8, $00, $24, $00
+	db $f8, $08, $25, $00
+	db $f8, $10, $26, $00
+	db $f8, $18, $27, $00
+	db $00, $e0, $30, $00
+	db $00, $e8, $31, $00
+	db $00, $f0, $32, $00
+	db $00, $f8, $33, $00
+	db $00, $00, $34, $00
+	db $00, $08, $35, $00
+	db $00, $10, $36, $00
+	db $08, $e0, $40, $00
+	db $08, $e8, $41, $00
+	db $08, $f0, $42, $00
+	db $08, $f8, $43, $00
+	db $08, $00, $44, $00
+	db $08, $08, $45, $00
+	db $08, $10, $46, $00
+	db $08, $18, $47, $00
+	db $10, $e0, $50, $00
+	db $10, $e8, $51, $00
+	db $10, $18, $57, $00
+; 8e33f
+
+Unknown_8e33f: ; 8e33f
+	db 28
+	db $e8, $00, $04, $00
+	db $e8, $08, $05, $00
+	db $e8, $10, $06, $00
+	db $f0, $e8, $11, $00
+	db $f0, $f0, $12, $00
+	db $f0, $f8, $13, $00
+	db $f0, $00, $14, $00
+	db $f0, $08, $15, $00
+	db $f0, $10, $16, $00
+	db $f8, $e8, $21, $00
+	db $f8, $f0, $22, $00
+	db $f8, $f8, $23, $00
+	db $f8, $00, $24, $00
+	db $f8, $08, $25, $00
+	db $f8, $10, $26, $00
+	db $00, $e0, $30, $00
+	db $00, $e8, $31, $00
+	db $00, $f0, $32, $00
+	db $00, $f8, $33, $00
+	db $00, $00, $34, $00
+	db $00, $08, $35, $00
+	db $08, $f0, $42, $00
+	db $08, $f8, $43, $00
+	db $08, $00, $44, $00
+	db $08, $08, $45, $00
+	db $10, $f8, $53, $00
+	db $10, $00, $54, $00
+	db $10, $08, $55, $00
+; 8e3b0
+
+Unknown_8e3b0: ; 8e3b0
+	db 30
+	db $e8, $00, $04, $00
+	db $e8, $08, $05, $00
+	db $f0, $e8, $11, $00
+	db $f0, $f0, $12, $00
+	db $f0, $f8, $13, $00
+	db $f0, $00, $14, $00
+	db $f0, $08, $15, $00
+	db $f0, $10, $16, $00
+	db $f0, $18, $17, $00
+	db $f8, $e0, $20, $00
+	db $f8, $e8, $21, $00
+	db $f8, $f0, $22, $00
+	db $f8, $f8, $23, $00
+	db $f8, $00, $24, $00
+	db $f8, $08, $25, $00
+	db $f8, $10, $26, $00
+	db $00, $e0, $30, $00
+	db $00, $e8, $31, $00
+	db $00, $f0, $32, $00
+	db $00, $f8, $33, $00
+	db $00, $00, $34, $00
+	db $00, $08, $35, $00
+	db $08, $f0, $42, $00
+	db $08, $f8, $43, $00
+	db $08, $00, $44, $00
+	db $08, $08, $45, $00
+	db $10, $f0, $52, $00
+	db $10, $f8, $53, $00
+	db $10, $00, $54, $00
+	db $10, $08, $55, $00
+; 8e429
+
+Unknown_8e429: ; 8e429
+	db 31
+	db $f0, $e8, $11, $00
+	db $f0, $f0, $12, $00
+	db $f0, $f8, $13, $00
+	db $f0, $00, $14, $00
+	db $f0, $08, $15, $00
+	db $f0, $10, $16, $00
+	db $f0, $18, $17, $00
+	db $f8, $e0, $20, $00
+	db $f8, $e8, $21, $00
+	db $f8, $f0, $22, $00
+	db $f8, $f8, $23, $00
+	db $f8, $00, $24, $00
+	db $f8, $08, $25, $00
+	db $f8, $10, $26, $00
+	db $f8, $18, $27, $00
+	db $00, $e0, $30, $00
+	db $00, $e8, $31, $00
+	db $00, $f0, $32, $00
+	db $00, $f8, $33, $00
+	db $00, $00, $34, $00
+	db $00, $08, $35, $00
+	db $00, $10, $36, $00
+	db $08, $e8, $41, $00
+	db $08, $f0, $42, $00
+	db $08, $f8, $43, $00
+	db $08, $00, $44, $00
+	db $08, $08, $45, $00
+	db $10, $e8, $51, $00
+	db $10, $f0, $52, $00
+	db $10, $00, $54, $00
+	db $10, $08, $55, $00
+; 8e4a6
+
+Unknown_8e4a6: ; 8e4a6
+	db 25
+	db $ec, $ec, $00, $09
+	db $ec, $f4, $01, $09
+	db $ec, $fc, $02, $09
+	db $ec, $04, $03, $09
+	db $ec, $0c, $04, $09
+	db $f4, $ec, $10, $09
+	db $f4, $f4, $11, $09
+	db $f4, $fc, $12, $09
+	db $f4, $04, $13, $09
+	db $f4, $0c, $14, $09
+	db $fc, $ec, $20, $09
+	db $fc, $f4, $21, $09
+	db $fc, $fc, $22, $09
+	db $fc, $04, $23, $09
+	db $fc, $0c, $24, $09
+	db $04, $ec, $30, $09
+	db $04, $f4, $31, $09
+	db $04, $fc, $32, $09
+	db $04, $04, $33, $09
+	db $04, $0c, $34, $09
+	db $0c, $ec, $40, $09
+	db $0c, $f4, $41, $09
+	db $0c, $fc, $42, $09
+	db $0c, $04, $43, $09
+	db $0c, $0c, $44, $09
+; 8e50b
+
+Unknown_8e50b: ; 8e50b
+	db 16
+	db $f0, $ec, $00, $0a
+	db $f0, $f4, $01, $0a
+	db $f0, $fc, $02, $0a
+	db $f0, $04, $03, $0a
+	db $f8, $ec, $04, $0a
+	db $f8, $f4, $05, $0a
+	db $f8, $fc, $06, $0a
+	db $f8, $04, $07, $0a
+	db $00, $ec, $08, $0a
+	db $00, $f4, $09, $0a
+	db $00, $fc, $0a, $0a
+	db $00, $04, $0b, $0a
+	db $08, $ec, $0c, $0a
+	db $08, $f4, $0d, $0a
+	db $08, $fc, $0e, $0a
+	db $08, $04, $0f, $0a
+; 8e54c
+
+Unknown_8e54c: ; 8e54c
+	db 1
+	db $fc, $fc, $00, $00
+; 8e551
+
+Unknown_8e551: ; 8e551
+	db 3
+	db $00, $f8, $00, $00
+	db $f8, $f8, $01, $00
+	db $f8, $00, $02, $00
+; 8e55e
+
+Unknown_8e55e: ; 8e55e
+	db 7
+	db $08, $f0, $00, $00
+	db $00, $f0, $01, $00
+	db $f8, $f0, $02, $00
+	db $f8, $f8, $03, $00
+	db $f0, $f8, $04, $00
+	db $f0, $00, $05, $00
+	db $f0, $08, $06, $00
+; 8e57b
+
+Unknown_8e57b: ; 8e57b
+	db 8
+	db $f8, $f0, $00, $00
+	db $f8, $f8, $01, $00
+	db $f8, $00, $01, $20
+	db $f8, $08, $00, $20
+	db $00, $f0, $00, $40
+	db $00, $f8, $01, $40
+	db $00, $00, $01, $60
+	db $00, $08, $00, $60
+; 8e59c
+
+Unknown_8e59c: ; 8e59c
+	db 12
+	db $e8, $f8, $00, $00
+	db $f0, $f8, $01, $00
+	db $f8, $f8, $02, $00
+	db $e8, $00, $00, $20
+	db $f0, $00, $01, $20
+	db $f8, $00, $02, $20
+	db $00, $f8, $02, $40
+	db $08, $f8, $01, $40
+	db $10, $f8, $00, $40
+	db $00, $00, $02, $60
+	db $08, $00, $01, $60
+	db $10, $00, $00, $60
+; 8e5cd
+
+Unknown_8e5cd: ; 8e5cd
+	db 20
+	db $ec, $f0, $00, $00
+	db $ec, $f8, $01, $00
+	db $ec, $00, $02, $00
+	db $ec, $08, $03, $00
+	db $f4, $f0, $04, $00
+	db $f4, $f8, $05, $00
+	db $f4, $00, $06, $00
+	db $f4, $08, $07, $00
+	db $fc, $f0, $08, $00
+	db $fc, $f8, $09, $00
+	db $fc, $00, $0a, $00
+	db $fc, $08, $0b, $00
+	db $04, $f0, $0c, $00
+	db $04, $f8, $0d, $00
+	db $04, $00, $0e, $00
+	db $04, $08, $0f, $00
+	db $0c, $f0, $10, $00
+	db $0c, $f8, $11, $00
+	db $0c, $00, $12, $00
+	db $0c, $08, $13, $00
+; 8e61e
+
+Unknown_8e61e: ; 8e61e
+	db 20
+	db $00, $08, $00, $81
+	db $08, $10, $00, $81
+	db $10, $18, $00, $81
+	db $18, $20, $00, $81
+	db $20, $28, $00, $81
+	db $18, $30, $00, $81
+	db $10, $38, $00, $81
+	db $08, $40, $00, $81
+	db $00, $48, $00, $81
+	db $08, $50, $00, $81
+	db $10, $58, $00, $81
+	db $18, $60, $00, $81
+	db $20, $68, $00, $81
+	db $18, $70, $00, $81
+	db $10, $78, $00, $81
+	db $08, $80, $00, $81
+	db $00, $88, $00, $81
+	db $08, $90, $00, $81
+	db $10, $98, $00, $81
+	db $18, $a0, $00, $81
+; 8e66f
+
+Unknown_8e66f: ; 8e66f
+	db 4
+	db $f8, $f8, $00, $02
+	db $f8, $00, $01, $02
+	db $00, $f8, $02, $02
+	db $00, $00, $03, $02
+; 8e680
+
+Unknown_8e680: ; 8e680
+	db 9
+	db $f0, $f4, $00, $01
+	db $f0, $fc, $01, $01
+	db $f0, $04, $02, $01
+	db $f8, $f4, $10, $01
+	db $f8, $fc, $11, $01
+	db $f8, $04, $12, $01
+	db $00, $f4, $20, $01
+	db $00, $fc, $21, $01
+	db $00, $04, $22, $01
+; 8e6a5
+
+Unknown_8e6a5: ; 8e6a5
+	db 24
+	db $d8, $f4, $00, $01
+	db $d8, $fc, $01, $01
+	db $d8, $04, $02, $01
+	db $d8, $0c, $03, $01
+	db $e0, $f4, $10, $01
+	db $e0, $fc, $11, $01
+	db $e0, $04, $12, $01
+	db $e0, $0c, $13, $01
+	db $e8, $f4, $20, $01
+	db $e8, $fc, $21, $01
+	db $e8, $04, $22, $01
+	db $e8, $0c, $23, $01
+	db $f0, $f4, $30, $01
+	db $f0, $fc, $31, $01
+	db $f0, $04, $32, $01
+	db $f0, $0c, $33, $01
+	db $f8, $f4, $40, $01
+	db $f8, $fc, $41, $01
+	db $f8, $04, $42, $01
+	db $f8, $0c, $43, $01
+	db $00, $f4, $50, $01
+	db $00, $fc, $51, $01
+	db $00, $04, $52, $01
+	db $00, $0c, $53, $01
+; 8e706
+Unknown_8e706: ; Broken 2bpp pointers
+	dbbw $80, $01, $672a ; 128-tile 2bpp at 1:672a (inside Multiply)
+	dbbw $80, $01, $672a
+	dbbw $80, $01, $672a
+	dbbw $80, $01, $672a
+	dbbw $10, $37, $672a ; 16-tile 2bpp at 37:672a (within Tileset11GFX)
+	dbbw $10, $11, $672a ; 16-tile 2bpp at 11:672a (empty data)
+	dbbw $10, $39, $672a ; 16-tile 2bpp at 39:672a (empty data)
+	dbbw $10, $24, $672a ; 16-tile 2bpp at 24:672a (inside Function926f7)
+	dbbw $10, $21, $672a ; 16-tile 2bpp at 21:672a (inside Function8671c)
+
+Function8e72a: ; 8e72a
+	add $10
+Function8e72c: ; 8e72c
+	and $3f
+	cp $20
+	jr nc, .asm_8e737
+	call Function8e741
+	ld a, h
+	ret
+
+.asm_8e737
+	and $1f
+	call Function8e741
+	ld a, h
+	xor $ff ; cpl
+	inc a
+	ret
+; 8e741
+
+Function8e741: ; 8e741
+	ld e, a
+	ld a, d
+	ld d, 0
+	ld hl, Unknown_8e75d
+rept 2
+	add hl, de
+endr
+	ld e, [hl]
+	inc hl
+	ld d, [hl]
+	ld hl, 0
+.asm_8e750
+	srl a
+	jr nc, .asm_8e755
+	add hl, de
+
+.asm_8e755
+	sla e
+	rl d
+	and a
+	jr nz, .asm_8e750
+	ret
+; 8e75d
+
+Unknown_8e75d: ; 8e75d
+	sine_wave $100
--- a/event/mom.asm
+++ b/event/mom.asm
@@ -45,11 +45,11 @@
 ; 16254
 
 .CheckIfBankInitialized: ; 16254
-	ld a, [wBankOfMomMode]
+	ld a, [wMomSavingMoney]
 	bit 7, a
 	jr nz, .savingmoneyalready
 	set 7, a
-	ld [wBankOfMomMode], a
+	ld [wMomSavingMoney], a
 	ld a, $1
 	jr .done_0
 
@@ -75,7 +75,7 @@
 	ld a, %10000000
 
 .done_1
-	ld [wBankOfMomMode], a
+	ld [wMomSavingMoney], a
 	ld hl, UnknownText_0x16653
 	call PrintText
 	ld a, $8
@@ -168,7 +168,7 @@
 	ld de, StringBuffer2 + 3
 	ld bc, 3
 	call CopyBytes
-	ld bc, wd851
+	ld bc, wMomsMoney
 	ld de, StringBuffer2
 	callba GiveMoney
 	jr c, .CantDepositThatMuch
@@ -176,7 +176,7 @@
 	ld de, Money
 	callba TakeMoney
 	ld hl, StringBuffer2
-	ld de, wd851
+	ld de, wMomsMoney
 	ld bc, 3
 	call CopyBytes
 	ld de, SFX_TRANSACTION
@@ -232,7 +232,7 @@
 	ld de, StringBuffer2 + 3
 	ld bc, 3
 	call CopyBytes
-	ld de, wd851
+	ld de, wMomsMoney
 	ld bc, StringBuffer2
 	callba CompareMoney
 	jr c, .InsufficientFundsInBank
@@ -241,7 +241,7 @@
 	callba GiveMoney
 	jr c, .NotEnoughRoomInWallet
 	ld bc, StringBuffer2 + 3
-	ld de, wd851
+	ld de, wMomsMoney
 	callba TakeMoney
 	ld hl, StringBuffer2
 	ld de, Money
@@ -279,7 +279,7 @@
 	call YesNoBox
 	jr c, .StopSavingMoney
 	ld a, $81
-	ld [wBankOfMomMode], a
+	ld [wMomSavingMoney], a
 	ld hl, UnknownText_0x16685
 	call PrintText
 	ld a, $8
@@ -288,7 +288,7 @@
 
 .StopSavingMoney
 	ld a, $80
-	ld [wBankOfMomMode], a
+	ld [wMomSavingMoney], a
 	ld a, $7
 	ld [wJumptableIndex], a
 	ret
@@ -461,7 +461,7 @@
 	ld de, String_16699
 	call PlaceString
 	hlcoord 12, 2
-	ld de, wd851
+	ld de, wMomsMoney
 	lb bc, PRINTNUM_MONEY | 3, 6
 	call PrintNum
 	hlcoord 1, 4
--- a/home/map.asm
+++ b/home/map.asm
@@ -1232,98 +1232,99 @@
 ; 272a
 
 
-Function272a:: ; 272a
+ScrollMapDown:: ; 272a
 	hlcoord 0, 0
 	ld de, BGMapBuffer
-	call Function27b7
-	ld c, $28
+	call BackupBGMapRow
+	ld c, 2 * SCREEN_WIDTH
 	call FarCallScrollBGMapPalettes
-	ld a, [wd152]
+	ld a, [wBGMapAnchorLo]
 	ld e, a
-	ld a, [wd153]
+	ld a, [wBGMapAnchorHi]
 	ld d, a
-	call Function27d3
+	call UpdateBGMapRow
 	ld a, $1
 	ld [hBGMapUpdate], a
 	ret
 ; 2748
 
-Function2748:: ; 2748
-	hlcoord 0, 16
+ScrollMapUp:: ; 2748
+	hlcoord 0, SCREEN_HEIGHT - 2
 	ld de, BGMapBuffer
-	call Function27b7
-	ld c, $28
+	call BackupBGMapRow
+	ld c, 2 * SCREEN_WIDTH
 	call FarCallScrollBGMapPalettes
-	ld a, [wd152]
+	ld a, [wBGMapAnchorLo]
 	ld l, a
-	ld a, [wd153]
+	ld a, [wBGMapAnchorHi]
 	ld h, a
 	ld bc, $0200
 	add hl, bc
+; cap d at VBGMap1 / $100
 	ld a, h
-	and $3
-	or $98
+	and %00000011
+	or VBGMap0 / $100
 	ld e, l
 	ld d, a
-	call Function27d3
+	call UpdateBGMapRow
 	ld a, $1
 	ld [hBGMapUpdate], a
 	ret
 ; 2771
 
-Function2771:: ; 2771
+ScrollMapLeft:: ; 2771
 	hlcoord 0, 0
 	ld de, BGMapBuffer
-	call Function27c0
-	ld c, $24
+	call BackupBGMapColumn
+	ld c, 2 * SCREEN_HEIGHT
 	call FarCallScrollBGMapPalettes
-	ld a, [wd152]
+	ld a, [wBGMapAnchorLo]
 	ld e, a
-	ld a, [wd153]
+	ld a, [wBGMapAnchorHi]
 	ld d, a
-	call Function27f8
+	call UpdateBGMapColumn
 	ld a, $1
 	ld [hBGMapUpdate], a
 	ret
 ; 278f
 
-Function278f:: ; 278f
-	hlcoord 18, 0
+ScrollMapRight:: ; 278f
+	hlcoord SCREEN_WIDTH - 2, 0
 	ld de, BGMapBuffer
-	call Function27c0
-	ld c, $24
+	call BackupBGMapColumn
+	ld c, 2 * SCREEN_HEIGHT
 	call FarCallScrollBGMapPalettes
-	ld a, [wd152]
+	ld a, [wBGMapAnchorLo]
 	ld e, a
-	and $e0
+	and %11100000
 	ld b, a
 	ld a, e
-	add $12
-	and $1f
+	add SCREEN_HEIGHT
+	and %00011111
 	or b
 	ld e, a
-	ld a, [wd153]
+	ld a, [wBGMapAnchorHi]
 	ld d, a
-	call Function27f8
+	call UpdateBGMapColumn
 	ld a, $1
 	ld [hBGMapUpdate], a
 	ret
 ; 27b7
 
-Function27b7:: ; 27b7
-	ld c, $28
-.asm_27b9
+BackupBGMapRow:: ; 27b7
+	ld c, 2 * SCREEN_WIDTH
+.loop
 	ld a, [hli]
 	ld [de], a
 	inc de
 	dec c
-	jr nz, .asm_27b9
+	jr nz, .loop
 	ret
 ; 27c0
 
-Function27c0:: ; 27c0
-	ld c, $12
-.asm_27c2
+BackupBGMapColumn:: ; 27c0
+	ld c, SCREEN_HEIGHT
+.loop
 	ld a, [hli]
 	ld [de], a
 	inc de
@@ -1330,30 +1331,30 @@
 	ld a, [hl]
 	ld [de], a
 	inc de
-	ld a, $13
+	ld a, SCREEN_WIDTH - 1
 	add l
 	ld l, a
-	jr nc, .asm_27cf
+	jr nc, .skip
 	inc h
 
-.asm_27cf
+.skip
 	dec c
-	jr nz, .asm_27c2
+	jr nz, .loop
 	ret
 ; 27d3
 
-Function27d3:: ; 27d3
+UpdateBGMapRow:: ; 27d3
 	ld hl, BGMapBufferPtrs
 	push de
-	call .asm_27df
+	call .iteration
 	pop de
 	ld a, $20
 	add e
 	ld e, a
 
-.asm_27df
-	ld c, $a
-.asm_27e1
+.iteration
+	ld c, 10
+.loop
 	ld a, e
 	ld [hli], a
 	ld a, d
@@ -1369,16 +1370,16 @@
 	or b
 	ld e, a
 	dec c
-	jr nz, .asm_27e1
-	ld a, $14
-	ld [$ffdc], a
+	jr nz, .loop
+	ld a, SCREEN_WIDTH
+	ld [hFFDC], a
 	ret
 ; 27f8
 
-Function27f8:: ; 27f8
+UpdateBGMapColumn:: ; 27f8
 	ld hl, BGMapBufferPtrs
-	ld c, $12
-.asm_27fd
+	ld c, SCREEN_HEIGHT
+.loop
 	ld a, e
 	ld [hli], a
 	ld a, d
@@ -1386,30 +1387,31 @@
 	ld a, $20
 	add e
 	ld e, a
-	jr nc, .asm_280e
+	jr nc, .skip
 	inc d
+; cap d at VBGMap1 / $100
 	ld a, d
 	and $3
-	or $98
+	or VBGMap0 / $100
 	ld d, a
 
-.asm_280e
+.skip
 	dec c
-	jr nz, .asm_27fd
-	ld a, $12
-	ld [$ffdc], a
+	jr nz, .loop
+	ld a, SCREEN_HEIGHT
+	ld [hFFDC], a
 	ret
 ; 2816
 
-Function2816:: ; 2816
+; unreferenced
 	ld hl, BGMapBuffer
-	ld bc, $0078
+	ld bc, SGBPredef - BGMapBuffer
 	xor a
 	call ByteFill
 	ret
 ; 2821
 
-Function2821:: ; 2821
+LoadTileset:: ; 2821
 	ld hl, TilesetAddress
 	ld a, [hli]
 	ld h, [hl]
@@ -1416,42 +1418,50 @@
 	ld l, a
 	ld a, [TilesetBank]
 	ld e, a
+
 	ld a, [rSVBK]
 	push af
 	ld a, $6
 	ld [rSVBK], a
+
 	ld a, e
 	ld de, w6_d000
 	call FarDecompress
+
 	ld hl, w6_d000
 	ld de, VTiles2
 	ld bc, $60 tiles
 	call CopyBytes
+
 	ld a, [rVBK]
 	push af
 	ld a, $1
 	ld [rVBK], a
+
 	ld hl, w6_d600
 	ld de, VTiles2
 	ld bc, $60 tiles
 	call CopyBytes
+
 	pop af
 	ld [rVBK], a
+
 	pop af
 	ld [rSVBK], a
+
 	ld a, [wTileset]
-	cp $1
-	jr z, .asm_286f
-	cp $2
-	jr z, .asm_286f
-	cp $4
-	jr z, .asm_286f
-	jr .asm_2875
+	cp TILESET_JOHTO_1
+	jr z, .load_roof
+	cp TILESET_JOHTO_2
+	jr z, .load_roof
+	cp TILESET_BATTLE_TOWER_OUTSIDE
+	jr z, .load_roof
+	jr .skip_roof
 
-.asm_286f
+.load_roof
 	callba LoadMapGroupRoof
 
-.asm_2875
+.skip_roof
 	xor a
 	ld [hTileAnimFrame], a
 	ret
@@ -1497,40 +1507,40 @@
 	ld [hMapObjectIndexBuffer], a
 	ld a, [wd151]
 	and a
-	jr z, .asm_28cb
-	cp $1
-	jr z, .asm_28c0
-	cp $2
-	jr z, .asm_28d4
-	cp $3
-	jr z, .asm_28da
+	jr z, .down
+	cp UP
+	jr z, .up
+	cp LEFT
+	jr z, .left
+	cp RIGHT
+	jr z, .right
 	ret
 
-.asm_28c0
+.up
 	ld de, wdcbf
 	ld a, [hMapObjectIndexBuffer]
 	ld c, a
 	ld b, $0
 	add hl, bc
-	jr .asm_28ce
+	jr .vertical
 
-.asm_28cb
+.down
 	ld de, XCoord + 1
 
-.asm_28ce
+.vertical
 	ld b, $6
 	ld c, $4
 	jr Function28f7
 
-.asm_28d4
+.left
 	ld de, XCoord + 2
 	inc hl
-	jr .asm_28dd
+	jr .horizontal
 
-.asm_28da
+.right
 	ld de, XCoord + 1
 
-.asm_28dd
+.horizontal
 	ld b, $5
 	ld c, $5
 	jr Function28f7
@@ -1543,38 +1553,38 @@
 	ld l, a
 	ld a, [MapWidth]
 	add $6
-	ld [hMapObjectIndexBuffer], a
+	ld [hConnectionStripLength], a
 	ld de, XCoord + 1
 	ld b, $6
 	ld c, $5
 
 Function28f7:: ; 28f7
-.asm_28f7
+.loop1
 	push bc
 	push hl
 	push de
-.asm_28fa
+.loop2
 	ld a, [de]
 	inc de
 	ld [hli], a
 	dec b
-	jr nz, .asm_28fa
+	jr nz, .loop2
 	pop de
 	ld a, e
 	add $6
 	ld e, a
-	jr nc, .asm_2908
+	jr nc, .okay
 	inc d
 
-.asm_2908
+.okay
 	pop hl
-	ld a, [hMapObjectIndexBuffer]
+	ld a, [hConnectionStripLength]
 	ld c, a
 	ld b, $0
 	add hl, bc
 	pop bc
 	dec c
-	jr nz, .asm_28f7
+	jr nz, .loop1
 	ret
 ; 2914
 
@@ -1581,16 +1591,18 @@
 Function2914:: ; 2914
 	xor a
 	ld [TilePermissions], a
-	call Function296c
-	call Function294d
+	call GetLeftRightCollision
+	call GetUpDownCollision
+; get coords of current tile
 	ld a, [PlayerMapX]
 	ld d, a
 	ld a, [PlayerMapY]
 	ld e, a
-	call Function2a3c
+	call GetCoordTile
 	ld [PlayerStandingTile], a
 	call Function29ff
 	ret nz
+
 	ld a, [PlayerStandingTile]
 	and 7
 	ld hl, .data_2945
@@ -1610,37 +1622,41 @@
 	db 1, 2, 4, 8, 9, 10, 5, 6
 ; 294d
 
-Function294d:: ; 294d
+GetUpDownCollision:: ; 294d
 	ld a, [PlayerMapX]
 	ld d, a
 	ld a, [PlayerMapY]
 	ld e, a
+
 	push de
 	inc e
-	call Function2a3c
+	call GetCoordTile
 	ld [TileDown], a
 	call Function298b
+
 	pop de
 	dec e
-	call Function2a3c
+	call GetCoordTile
 	ld [TileUp], a
 	call Function29a8
 	ret
 ; 296c
 
-Function296c:: ; 296c
+GetLeftRightCollision:: ; 296c
 	ld a, [PlayerMapX]
 	ld d, a
 	ld a, [PlayerMapY]
 	ld e, a
+
 	push de
 	dec d
-	call Function2a3c
+	call GetCoordTile
 	ld [TileLeft], a
 	call Function29e2
+
 	pop de
 	inc d
-	call Function2a3c
+	call GetCoordTile
 	ld [TileRight], a
 	call Function29c5
 	ret
@@ -1650,7 +1666,7 @@
 	call Function29ff
 	ret nz
 	ld a, [TileDown]
-	and $7
+	and 7
 	cp $2
 	jr z, .ok
 	cp $6
@@ -1660,7 +1676,7 @@
 
 .ok
 	ld a, [TilePermissions]
-	or $8
+	or FACE_DOWN
 	ld [TilePermissions], a
 	ret
 ; 29a8
@@ -1669,7 +1685,7 @@
 	call Function29ff
 	ret nz
 	ld a, [TileUp]
-	and $7
+	and 7
 	cp $3
 	jr z, .ok
 	cp $4
@@ -1679,7 +1695,7 @@
 
 .ok
 	ld a, [TilePermissions]
-	or $4
+	or FACE_UP
 	ld [TilePermissions], a
 	ret
 ; 29c5
@@ -1688,7 +1704,7 @@
 	call Function29ff
 	ret nz
 	ld a, [TileRight]
-	and $7
+	and 7
 	cp $1
 	jr z, .ok
 	cp $5
@@ -1698,7 +1714,7 @@
 
 .ok
 	ld a, [TilePermissions]
-	or $1
+	or FACE_RIGHT
 	ld [TilePermissions], a
 	ret
 ; 29e2
@@ -1707,7 +1723,7 @@
 	call Function29ff
 	ret nz
 	ld a, [TileLeft]
-	and $7
+	and 7
 	cp $0
 	jr z, .ok
 	cp $4
@@ -1717,7 +1733,7 @@
 
 .ok
 	ld a, [TilePermissions]
-	or $2
+	or FACE_LEFT
 	ld [TilePermissions], a
 	ret
 ; 29ff
@@ -1778,7 +1794,8 @@
 ; 2a3c
 
 
-Function2a3c:: ; 2a3c
+GetCoordTile:: ; 2a3c
+; Get the collision byte for tile d, e
 	call GetBlockLocation
 	ld a, [hl]
 	and a
@@ -2065,7 +2082,7 @@
 	call SwitchToAnyMapBank
 	callba Function8c001
 	call OverworldTextModeSwitch
-	call Function2821
+	call LoadTileset
 	ld a, 9
 	call SkipMusic
 	pop af
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -347,7 +347,9 @@
 	push af
 	ld a, BANK(ScrollBGMapPalettes)
 	rst Bankswitch
+
 	call ScrollBGMapPalettes
+
 	pop af
 	rst Bankswitch
 	ret
--- a/hram.asm
+++ b/hram.asm
@@ -96,6 +96,7 @@
 hSPBuffer          EQU $ffd9
 
 hBGMapUpdate       EQU $ffdb
+hFFDC              EQU $ffdc
 
 hMapAnims          EQU $ffde
 hTileAnimFrame     EQU $ffdf
--- a/main.asm
+++ b/main.asm
@@ -2323,12 +2323,12 @@
 	inc e
 
 .asm_6fc2
-	call Function2a3c
+	call GetCoordTile
 	call GetTileCollision
 	pop de
 	and a
 	jr nz, .asm_6fd7
-	call Function2a3c
+	call GetCoordTile
 	call GetTileCollision
 	and a
 	jr nz, .asm_6fd7
@@ -4847,42 +4847,42 @@
 
 CutTreeBlockPointers: ; c862
 ; Which tileset are we in?
-	dbw $01, .one
-	dbw $02, .two
-	dbw $03, .three
-	dbw $19, .twentyfive
-	dbw $1f, .thirtyone
+	dbw TILESET_JOHTO_1, .one
+	dbw TILESET_JOHTO_2, .two
+	dbw TILESET_KANTO, .three
+	dbw TILESET_PARK, .twentyfive
+	dbw TILESET_ILEX_FOREST, .thirtyone
 	db -1
 ; c872
 
 .one: ; Johto OW
 ; Which meta tile are we facing, which should we replace it with, and does it affect encounters?
-	db $03, $02, $01
-	db $5b, $3c, $00
-	db $5f, $3d, $00
-	db $63, $3f, $00
-	db $67, $3e, $00
+	db $03, $02, $01 ; grass
+	db $5b, $3c, $00 ; tree
+	db $5f, $3d, $00 ; tree
+	db $63, $3f, $00 ; tree
+	db $67, $3e, $00 ; tree
 	db -1
 ; c882
 
 .two: ; Goldenrod area
-	db $03, $02, $01
+	db $03, $02, $01 ; grass
 	db -1
 ; c886
 
 .three: ; Kanto OW
-	db $0b, $0a, $01
-	db $32, $6d, $00
-	db $33, $6c, $00
-	db $34, $6f, $00
-	db $35, $4c, $00
-	db $60, $6e, $00
+	db $0b, $0a, $01 ; grass
+	db $32, $6d, $00 ; tree
+	db $33, $6c, $00 ; tree
+	db $34, $6f, $00 ; tree
+	db $35, $4c, $00 ; tree
+	db $60, $6e, $00 ; tree
 	db -1
 ; c899
 
 .twentyfive: ; National Park
-	db $13, $03, $01
-	db $03, $04, $01
+	db $13, $03, $01 ; grass
+	db $03, $04, $01 ; grass
 	db -1
 ; c8a0
 
@@ -4892,7 +4892,7 @@
 ; c8a4
 
 WhirlpoolBlockPointers: ; c8a4
-	dbw $01, .one
+	dbw TILESET_JOHTO_1, .one
 	db -1
 ; c8a8
 
@@ -7325,25 +7325,25 @@
 Jumptable_d4f2: ; d4f2 (3:54f2)
 	dw Function2914
 	dw BufferScreen
-	dw Functiond509
-	dw Functiond510
-	dw Functiond508
-	dw Functiond508
-	dw Functiond508
-	dw Functiond508
-	dw Functiond508
-	dw Functiond508
-	dw Functiond508
+	dw .mobile
+	dw .fail2
+	dw .fail1
+	dw .fail1
+	dw .fail1
+	dw .fail1
+	dw .fail1
+	dw .fail1
+	dw .fail1
 
 
-Functiond508: ; d508 (3:5508)
+.fail1: ; d508 (3:5508)
 	ret
 
-Functiond509: ; d509 (3:5509)
+.mobile: ; d509 (3:5509)
 	callba MobileFn_10602e
 	ret
 
-Functiond510: ; d510 (3:5510)
+.fail2: ; d510 (3:5510)
 	ret
 
 Functiond511: ; d511 (3:5511)
@@ -7383,25 +7383,29 @@
 	cp $3
 	jr z, .asm_d567
 	ret
+
 .asm_d549
 	call Functiond571
 	call LoadMapPart
-	call Function2748
+	call ScrollMapUp
 	ret
+
 .asm_d553
 	call Functiond5a2
 	call LoadMapPart
-	call Function272a
+	call ScrollMapDown
 	ret
+
 .asm_d55d
 	call Functiond5d5
 	call LoadMapPart
-	call Function2771
+	call ScrollMapLeft
 	ret
+
 .asm_d567
 	call Functiond5fe
 	call LoadMapPart
-	call Function278f
+	call ScrollMapRight
 	ret
 
 Functiond571: ; d571 (3:5571)
@@ -11332,7 +11336,7 @@
 	ret
 ; 1412a
 
-INCLUDE "engine/sprites.asm"
+INCLUDE "engine/overworld.asm"
 
 Function1499a:: ; 1499a
 	ld a, [PlayerStandingTile]
@@ -25858,7 +25862,7 @@
 
 LoadSpecialMapPalette: ; 494ac
 	ld a, [wTileset]
-	cp TILESET_GOLDENROD_POKECOM_CENTER_2F_MOBILE
+	cp TILESET_POKECOM_CENTER
 	jr z, .pokecom_2f
 	cp TILESET_BATTLE_TOWER
 	jr z, .battle_tower
@@ -29187,6 +29191,8 @@
 	push hl
 	srl a
 	jr c, .UpperNybble
+
+; .LowerNybble
 	ld hl, TilesetPalettes
 	add [hl]
 	ld l, a
@@ -40000,2897 +40006,8 @@
 ; 8cf53
 
 
-Function8cf53: ; 8cf53
-	ld hl, wc300
-	ld bc, $c1
-.asm_8cf59
-	ld [hl], $0
-	inc hl
-	dec bc
-	ld a, c
-	or b
-	jr nz, .asm_8cf59
-	ret
-; 8cf62
+INCLUDE "engine/sprites.asm"
 
-Function8cf62: ; 8cf62
-	call Function8cf69
-	call DelayFrame
-	ret
-; 8cf69
-
-Function8cf69: ; 8cf69
-	push hl
-	push de
-	push bc
-	push af
-
-	ld a, $0
-	ld [wc3b5], a
-	call Function8cf7a
-
-	pop af
-	pop bc
-	pop de
-	pop hl
-	ret
-; 8cf7a
-
-Function8cf7a: ; 8cf7a
-	ld hl, wc314
-	ld e, 10 ; There are 10 structs here.
-
-.loop
-	ld a, [hl]
-	and a
-	jr z, .next ; This struct is deinitialized.
-	ld c, l
-	ld b, h
-	push hl
-	push de
-	call Function8d24b ; Uses a massive jumptable
-	call LoadBouncingMonIcon
-	pop de
-	pop hl
-	jr c, .done
-
-.next
-	ld bc, $10
-	add hl, bc
-	dec e
-	jr nz, .loop
-
-	ld a, [wc3b5]
-	ld l, a
-	ld h, Sprites / $0100
-
-.loop2 ; Clear (Sprites + [wc3b5] --> SpritesEnd)
-	ld a, l
-	cp SpritesEnd % $100
-	jr nc, .done
-	xor a
-	ld [hli], a
-	jr .loop2
-
-.done
-	ret
-; 8cfa8
-
-Function8cfa8: ; 8cfa8 (23:4fa8)
-	ld hl, wc314
-	ld e, 10
-
-.loop
-	ld a, [hl]
-	and a
-	jr z, .next
-	ld c, l
-	ld b, h
-	push hl
-	push de
-	call Function8d24b ; Uses a massive jumptable
-	call LoadBouncingMonIcon
-	pop de
-	pop hl
-	jr c, .done
-
-.next
-	ld bc, $10
-	add hl, bc
-	dec e
-	jr nz, .loop
-
-	ld a, [wc3b5]
-	ld l, a
-	ld h, (Sprites + $40) / $100
-
-.loop2 ; Clear (Sprites + [wc3b5] --> Sprites + $40)
-	ld a, l
-	cp (Sprites + $40) % $100
-	jr nc, .done
-	xor a
-	ld [hli], a
-	jr .loop2
-
-.done
-	ret
-
-Function8cfd6:: ; 8cfd6
-; Find if there's any room in the wc314 array, which is 10x16
-	push de
-	push af
-	ld hl, wc314
-	ld e, 10
-.loop
-	ld a, [hl]
-	and a
-	jr z, .found
-	ld bc, $10
-	add hl, bc
-	dec e
-	jr nz, .loop
-; We've reached the end.  There is no more room here.
-; Return carry.
-	pop af
-	pop de
-	scf
-	ret
-
-.found
-; Back up the structure address to bc.
-	ld c, l
-	ld b, h
-; Value [wc3b4] is initially set to -1. Set it to
-; the number of objects loaded into this array.
-	ld hl, wc3b4
-	inc [hl]
-	ld a, [hl]
-	and a
-	jr nz, .initialized
-	inc [hl]
-
-.initialized
-; Get row a of Unknown_8d1c4, copy the pointer into de
-	pop af
-	ld e, a
-	ld d, 0
-	ld hl, Unknown_8d1c4
-rept 3
-	add hl, de
-endr
-	ld e, l
-	ld d, h
-; Set hl to the first field (field 0) in the current structure.
-	ld hl, 0
-	add hl, bc
-; Load the index.
-	ld a, [wc3b4]
-	ld [hli], a
-; Copy the table entry to the next two fields.
-	ld a, [de]
-	ld [hli], a
-	inc de
-	ld a, [de]
-	ld [hli], a
-	inc de
-; Look up the third field from the table in the wc300 array (10x2).
-; Take the value and load it in 
-	ld a, [de]
-	call LookUpInwDict_c300
-	ld [hli], a
-	pop de
-; Set hl to field 4.  Kinda pointless, because we're presumably already here.
-	ld hl, $4
-	add hl, bc
-; Load the original value of de into here.
-	ld a, e
-	ld [hli], a
-	ld a, d
-	ld [hli], a
-; load 0 into the next four fields
-	xor a
-rept 2
-	ld [hli], a
-endr
-	xor a
-rept 2
-	ld [hli], a
-endr
-; load -1 into the next field
-	dec a
-	ld [hli], a
-; load 0 into the last five fields
-	xor a
-rept 4
-	ld [hli], a
-endr
-	ld [hl], a
-; back up the address of the first field to wc3b8
-	ld a, c
-	ld [wc3b8], a
-	ld a, b
-	ld [wc3b8 + 1], a
-	ret
-; 8d036
-
-Function8d036: ; 8d036
-; Clear the index field of the struct in bc.
-	ld hl, 0
-	add hl, bc
-	ld [hl], $0
-	ret
-; 8d03d
-
-
-Function8d03d: ; 8d03d (23:503d)
-; Clear the index field of every struct in the wc314 array.
-	ld hl, wc314
-	ld bc, $10
-	ld e, 10
-	xor a
-.loop
-	ld [hl], a
-	add hl, bc
-	dec e
-	jr nz, .loop
-	ret
-
-
-LoadBouncingMonIcon: ; 8d04c
-; Populate Sprites with the bouncing mon icons
-	call Function8d0ec
-	call Function8d132
-	cp EGG
-	jr z, .done
-	cp NUM_POKEMON + 1
-	jr z, .almost
-	call Function8d1a2
-	ld a, [wc3ba]
-	add [hl]
-	ld [wc3ba], a
-	inc hl
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	push bc
-	ld a, [wc3b5]
-	ld e, a
-	ld d, Sprites / $100
-	ld a, [hli]
-	ld c, a
-.loop
-	ld a, [wc3bc]
-	ld b, a
-	ld a, [wc3be]
-	add b
-	ld b, a
-	ld a, [wc3bf]
-	add b
-	ld b, a
-	call Function8d0be
-	add b
-	ld [de], a
-	inc hl
-	inc de
-	ld a, [wc3bb]
-	ld b, a
-	ld a, [wc3bd]
-	add b
-	ld b, a
-	ld a, [wc3c0]
-	add b
-	ld b, a
-	call Function8d0ce
-	add b
-	ld [de], a
-	inc hl
-	inc de
-	ld a, [wc3ba]
-	add [hl]
-	ld [de], a
-	inc hl
-	inc de
-	call Function8d0de
-	ld [de], a
-	inc hl
-	inc de
-	ld a, e
-	ld [wc3b5], a
-	cp SpritesEnd % $100
-	jr nc, .outofroom
-	dec c
-	jr nz, .loop
-	pop bc
-	jr .done
-
-.almost
-	call Function8d036
-
-.done
-	and a
-	ret
-
-.outofroom
-	pop bc
-	scf
-	ret
-; 8d0be
-
-Function8d0be: ; 8d0be
-	push hl
-	ld a, [hl]
-	ld hl, wc3b8
-	bit 6, [hl]
-	jr z, .ok
-	add $8
-	xor $ff
-	inc a
-
-.ok
-	pop hl
-	ret
-; 8d0ce
-
-Function8d0ce: ; 8d0ce
-	push hl
-	ld a, [hl]
-	ld hl, wc3b8
-	bit 5, [hl]
-	jr z, .ok
-	add $8
-	xor $ff
-	inc a
-
-.ok
-	pop hl
-	ret
-; 8d0de
-
-Function8d0de: ; 8d0de
-	ld a, [wc3b8]
-	ld b, a
-	ld a, [hl]
-	xor b
-	and $e0
-	ld b, a
-	ld a, [hl]
-	and $1f
-	or b
-	ret
-; 8d0ec
-
-Function8d0ec: ; 8d0ec
-	xor a
-	ld [wc3b8], a
-	ld hl, $3
-	add hl, bc
-	ld a, [hli]
-	ld [wc3ba], a
-	ld a, [hli]
-	ld [wc3bb], a
-	ld a, [hli]
-	ld [wc3bc], a
-	ld a, [hli]
-	ld [wc3bd], a
-	ld a, [hli]
-	ld [wc3be], a
-	ret
-; 8d109
-
-LookUpInwDict_c300: ; 8d109
-; a = wDict_c300[a] if a in wDict_c300 else 0
-	push hl
-	push bc
-	ld hl, wDict_c300
-	ld b, a
-	ld c, 10
-.loop
-	ld a, [hli]
-	cp b
-	jr z, .ok
-	inc hl
-	dec c
-	jr nz, .loop
-	xor a
-	jr .done
-
-.ok
-	ld a, [hl]
-
-.done
-	pop bc
-	pop hl
-	ret
-; 8d120
-
-Function8d120:: ; 8d120
-	ld hl, $1
-	add hl, bc
-	ld [hl], a
-	ld hl, $8
-	add hl, bc
-	ld [hl], $0
-	ld hl, $a
-	add hl, bc
-	ld [hl], $ff
-	ret
-; 8d132
-
-
-Function8d132: ; 8d132
-.loop
-	ld hl, $8
-	add hl, bc
-	ld a, [hl]
-	and a
-	jr z, .ok
-	dec [hl]
-	call Function8d189
-	ld a, [hli]
-	push af
-	jr .skip
-
-.ok
-	ld hl, $a
-	add hl, bc
-	inc [hl]
-	call Function8d189
-	ld a, [hli]
-	cp $fe
-	jr z, .minus_2
-	cp $ff
-	jr z, .minus_1
-	push af
-	ld a, [hl]
-	push hl
-	and $3f
-	ld hl, $9
-	add hl, bc
-	add [hl]
-	ld hl, $8
-	add hl, bc
-	ld [hl], a
-	pop hl
-
-.skip
-	ld a, [hl]
-	and $c0
-	srl a
-	ld [wc3b8], a
-	pop af
-	ret
-
-.minus_1
-	xor a
-	ld hl, $8
-	add hl, bc
-	ld [hl], a
-	ld hl, $a
-	add hl, bc
-rept 2
-	dec [hl]
-endr
-	jr .loop
-
-.minus_2
-	xor a
-	ld hl, $8
-	add hl, bc
-	ld [hl], a
-	dec a
-	ld hl, $a
-	add hl, bc
-	ld [hl], a
-	jr .loop
-; 8d189
-
-Function8d189: ; 8d189
-	; Get the [bc+10]th entry in the data table
-	; indexed at [bc+1] in Unknown_8d6e6
-	ld hl, $1
-	add hl, bc
-	ld e, [hl]
-	ld d, 0
-	ld hl, Unknown_8d6e6
-rept 2
-	add hl, de
-endr
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	ld hl, $a
-	add hl, bc
-	ld l, [hl]
-	ld h, 0
-	add hl, hl
-	add hl, de
-	ret
-; 8d1a2
-
-Function8d1a2: ; 8d1a2
-	ld e, a
-	ld d, 0
-	ld hl, Unknown_8d94d
-rept 3
-	add hl, de
-endr
-	ret
-; 8d1ac
-
-Function8d1ac: ; unreferenced
-	push hl
-	ld l, a
-	ld h, 0
-rept 2
-	add hl, hl
-endr
-	ld de, Unknown_8e706
-	add hl, de
-	ld c, [hl]
-	inc hl
-	ld b, [hl]
-	inc hl
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	pop hl
-	push bc
-	call Request2bpp
-	pop bc
-	ret
-; 8d1c4
-
-Unknown_8d1c4: ; 8d1c4
-	db $01, JUMPTABLE_8D24B_FUNCTION_01, $00 ; 00
-	db $07, JUMPTABLE_8D24B_FUNCTION_04, $00 ; 01
-	db $08, JUMPTABLE_8D24B_FUNCTION_05, $05 ; 02
-	db $0a, JUMPTABLE_8D24B_FUNCTION_06, $00 ; 03
-	db $0b, JUMPTABLE_8D24B_FUNCTION_07, $06 ; 04
-	db $0c, JUMPTABLE_8D24B_FUNCTION_08, $06 ; 05
-	db $0d, JUMPTABLE_8D24B_FUNCTION_09, $07 ; 06
-	db $0e, JUMPTABLE_8D24B_FUNCTION_0A, $07 ; 07
-	db $10, JUMPTABLE_8D24B_FUNCTION_0B, $07 ; 08
-	db $08, JUMPTABLE_8D24B_FUNCTION_0C, $05 ; 09
-	db $11, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 0a
-	db $12, JUMPTABLE_8D24B_FUNCTION_0D, $08 ; 0b
-	db $12, JUMPTABLE_8D24B_FUNCTION_0E, $08 ; 0c
-	db $12, JUMPTABLE_8D24B_FUNCTION_0F, $08 ; 0d
-	db $13, JUMPTABLE_8D24B_FUNCTION_10, $00 ; 0e
-	db $15, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 0f
-	db $16, JUMPTABLE_8D24B_FUNCTION_11, $00 ; 10
-	db $17, JUMPTABLE_8D24B_FUNCTION_12, $00 ; 11
-	db $18, JUMPTABLE_8D24B_FUNCTION_12, $00 ; 12
-	db $19, JUMPTABLE_8D24B_FUNCTION_13, $00 ; 13
-	db $1a, JUMPTABLE_8D24B_FUNCTION_14, $00 ; 14
-	db $1b, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 15
-	db $1d, JUMPTABLE_8D24B_FUNCTION_15, $00 ; 16
-	db $1e, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 17
-	db $1d, JUMPTABLE_8D24B_FUNCTION_17, $00 ; 18
-	db $1f, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 19
-	db $24, JUMPTABLE_8D24B_FUNCTION_19, $00 ; 1a
-	db $25, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1b
-	db $20, JUMPTABLE_8D24B_FUNCTION_13, $00 ; 1c
-	db $26, JUMPTABLE_8D24B_FUNCTION_1A, $00 ; 1d
-	db $2d, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1e
-	db $2e, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1f
-	db $2f, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 20
-	db $30, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 21
-	db $31, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 22
-	db $32, JUMPTABLE_8D24B_FUNCTION_1B, $00 ; 23
-	db $33, JUMPTABLE_8D24B_FUNCTION_1C, $00 ; 24
-	db $34, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 25
-	db $35, JUMPTABLE_8D24B_FUNCTION_1D, $00 ; 26
-	db $37, JUMPTABLE_8D24B_FUNCTION_1E, $00 ; 27
-	db $38, JUMPTABLE_8D24B_FUNCTION_1E, $00 ; 28
-	db $39, JUMPTABLE_8D24B_FUNCTION_20, $00 ; 29
-	db $3f, JUMPTABLE_8D24B_FUNCTION_21, $00 ; 2a
-	db $3e, JUMPTABLE_8D24B_FUNCTION_22, $00 ; 2b
-	db $40, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 2c
-; 8d24b
-
-
-Function8d24b: ; 8d24b
-	ld hl, $2 ; field 2, see the second column in the above table
-	add hl, bc
-	ld e, [hl]
-	ld d, 0
-	ld hl, .Jumptable
-rept 2
-	add hl, de
-endr
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	jp [hl]
-; 8d25b
-
-
-.Jumptable: ; 8d25b (23:525b)
-	dw .zero
-	dw .one
-	dw .two
-	dw .three
-	dw .four
-	dw .five
-	dw .six
-	dw .seven
-	dw .eight
-	dw .nine
-	dw .ten
-	dw .eleven
-	dw .twelve
-	dw .thirteen
-	dw .fourteen
-	dw .fifteen
-	dw .sixteen
-	dw .seventeen
-	dw .eighteen
-	dw .nineteen
-	dw .twenty
-	dw .twentyone
-	dw .twentytwo
-	dw .twentythree
-	dw .twentyfour
-	dw .twentyfive
-	dw .twentysix
-	dw .twentyseven
-	dw .twentyeight
-	dw .twentynine
-	dw .thirty
-	dw .thirtyone
-	dw .thirtytwo
-	dw .thirtythree
-	dw .thirtyfour
-
-
-.zero: ; 8d2a1 (23:52a1)
-	ret
-
-.one: ; 8d2a2 (23:52a2)
-	ld a, [MenuSelection2]
-	ld hl, 0
-	add hl, bc
-	cp [hl]
-	jr z, .two
-	ld hl, $4
-	add hl, bc
-	ld [hl], $10
-	ld hl, $7
-	add hl, bc
-	ld [hl], $0
-	ret
-
-.two: ; 8d2b9 (23:52b9)
-	ld hl, $4
-	add hl, bc
-	ld [hl], $18
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	ld d, a
-	inc [hl]
-	and $f
-	ret nz
-	ld hl, $d
-	add hl, bc
-	ld e, [hl]
-	ld hl, $7
-	add hl, bc
-	ld a, d
-	and $10 ; bit 4
-	jr z, .asm_8d2df
-	ld a, e
-	and a
-	jr z, .asm_8d2e6
-	cp $1
-	jr z, .asm_8d2e2
-.asm_8d2df
-	xor a
-	ld [hl], a
-	ret
-.asm_8d2e2
-	ld a, $ff
-	ld [hl], a
-	ret
-.asm_8d2e6
-	ld a, $fe
-	ld [hl], a
-	ret
-
-.three: ; 8d2ea (23:52ea)
-	ld a, [MenuSelection2]
-	ld hl, 0
-	add hl, bc
-	cp [hl]
-	jr z, .asm_8d2fb
-	ld hl, $4
-	add hl, bc
-	ld [hl], $10
-	ret
-.asm_8d2fb
-	ld hl, $4
-	add hl, bc
-	ld [hl], $18
-	ret
-
-.four: ; 8d302 (23:5302)
-	call .anonymous_jumptable
-	jp [hl]
-; 8d306 (23:5306)
-
-; Anonymous jumptable (see .anonymous_jumptable)
-	dw .four_zero
-	dw .four_one
-; 8d30a
-
-.four_zero: ; 8d30a
-	call Function8d6d8
-	ld hl, 0
-	add hl, bc
-	ld a, [hl]
-	ld hl, $d
-	add hl, bc
-	and $3
-	ld [hl], a
-	inc [hl]
-	swap a
-	ld hl, $c
-	add hl, bc
-	ld [hl], a
-
-.four_one: ; 8d321
-	ld hl, $4
-	add hl, bc
-	ld a, [hl]
-	cp $a4
-	jr nc, .asm_8d356
-	ld hl, $d
-	add hl, bc
-	add $4
-	ld hl, $4
-	add hl, bc
-	ld [hl], a
-	ld hl, $5
-	add hl, bc
-	inc [hl]
-	ld hl, $d
-	add hl, bc
-	ld a, [hl]
-	sla a
-	sla a
-	ld d, $2
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	add $3
-	ld [hl], a
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	ret
-
-.asm_8d356
-	call Function8d036
-	ret
-; 8d35a
-
-.twentyfive: ; 8d35a (23:535a)
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	inc a
-	ld [hl], a
-	ld d, $2
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	ret
-
-.five: ; 8d36c (23:536c)
-	callab Function11a3b
-	ret
-
-.twelve: ; 8d373 (23:5373)
-	callab Function120c1
-	ret
-
-.six: ; 8d37a (23:537a)
-	callab GameFreakLogoJumper
-	ret
-
-.seven: ; 8d381 (23:5381)
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	and a
-	jr z, .asm_8d3ba
-rept 2
-	dec [hl]
-endr
-	ld d, a
-	and $1f
-	jr nz, .asm_8d395
-	ld hl, $d
-	add hl, bc
-	dec [hl]
-.asm_8d395
-	ld hl, $b
-	add hl, bc
-	ld a, [hl]
-	push af
-	push de
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	pop de
-	pop af
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ld hl, $d
-	add hl, bc
-	ld a, [hl]
-	ld hl, $b
-	add hl, bc
-	add [hl]
-	ld [hl], a
-	ret
-.asm_8d3ba
-	ld a, $1
-	ld [wcf64], a
-	call Function8d036
-	ret
-
-.eight: ; 8d3c3 (23:53c3)
-	ld hl, $c
-	add hl, bc
-	ld a, [hli]
-	or [hl]
-	jr z, .asm_8d41e
-	ld hl, $f
-	add hl, bc
-	ld d, [hl]
-	ld hl, $b
-	add hl, bc
-	ld a, [hl]
-	push af
-	push de
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	pop de
-	pop af
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ld hl, $c
-	add hl, bc
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	ld hl, $e
-	add hl, bc
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	add hl, de
-	ld e, l
-	ld d, h
-	ld hl, $e
-	add hl, bc
-	ld [hl], e
-	inc hl
-	ld [hl], d
-	ld hl, $c
-	add hl, bc
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	ld de, $fff0
-	add hl, de
-	ld e, l
-	ld d, h
-	ld hl, $c
-	add hl, bc
-	ld [hl], e
-	inc hl
-	ld [hl], d
-	ld hl, $b
-	add hl, bc
-	ld a, [hl]
-	xor $20
-	ld [hl], a
-	ret
-.asm_8d41e
-	call Function8d036
-	ret
-
-.nine: ; 8d422 (23:5422)
-	callab Function9321d
-	ret
-
-.ten: ; 8d429 (23:5429)
-	callab Function932ac
-	ld hl, wcf64
-	ld a, [hl]
-	cp $2
-	ret nz
-	ld [hl], $3
-	ld a, $f
-	call Function8d120
-	ret
-
-.eleven: ; 8d43e (23:543e)
-	ld hl, $b
-	add hl, bc
-	ld a, [hl]
-	dec [hl]
-	ld e, a
-	and $1
-	jr z, .asm_8d462
-	ld hl, $4
-	add hl, bc
-	ld a, [hl]
-	cp $78
-	jr c, .asm_8d461
-	call Function8d036
-	ld a, $4
-	ld [wcf64], a
-	ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
-	call PlaySFX
-	ret
-.asm_8d461
-	inc [hl]
-.asm_8d462
-	ld a, e
-	ld d, $20
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	ret
-
-.thirteen: ; 8d46e (23:546e)
-	callab Functione00ed
-	ret
-
-.fifteen: ; 8d475 (23:5475)
-	callab Function90d41
-	ret
-
-.fourteen: ; 8d47c (23:547c)
-	callab Functione21a1
-	ret
-
-.sixteen: ; 8d483 (23:5483)
-	call .anonymous_jumptable
-	jp [hl]
-; 8d487 (23:5487)
-
-; Anonymous jumptable (see .anonymous_jumptable)
-	dw .sixteen_zero
-	dw .sixteen_one
-	dw .sixteen_two
-	dw .sixteen_three
-	dw .sixteen_four
-	dw .sixteen_five
-; 8d493
-
-.sixteen_zero: ; 8d493
-	ld a, $14
-	call Function8d120
-	ld hl, $b
-	add hl, bc
-	ld [hl], $2
-	ld hl, $c
-	add hl, bc
-	ld [hl], $20
-	ret
-; 8d4a5
-
-.sixteen_two: ; 8d4a5
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	and a
-	jr z, .asm_8d4af
-	dec [hl]
-	ret
-
-.asm_8d4af
-	call Function8d6d8
-	ld hl, $c
-	add hl, bc
-	ld [hl], $40
-
-.sixteen_three: ; 8d4b8
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	cp $30
-	jr c, .asm_8d4cd
-	dec [hl]
-	ld d, $28
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	ret
-
-.asm_8d4cd
-	ld de, SFX_GOT_SAFARI_BALLS
-	call PlaySFX
-	jr .sixteen_five
-; 8d4d5
-
-.sixteen_one: ; 8d4d5
-	ld hl, $b
-	add hl, bc
-	ld [hl], $4
-	ld hl, $c
-	add hl, bc
-	ld [hl], $30
-	ld hl, $d
-	add hl, bc
-	ld [hl], $24
-	ret
-; 8d4e8
-
-.sixteen_four: ; 8d4e8
-	ld hl, $d
-	add hl, bc
-	ld a, [hl]
-	and a
-	jr z, .asm_8d51c
-	ld d, a
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	call Function8e72c
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	ld hl, $c
-	add hl, bc
-	inc [hl]
-	ld a, [hl]
-	and $3f
-	ret nz
-	ld hl, $c
-	add hl, bc
-	ld [hl], $20
-	ld hl, $d
-	add hl, bc
-	ld a, [hl]
-	sub $c
-	ld [hl], a
-	ld de, SFX_SWITCH_POKEMON
-	call PlaySFX
-	ret
-
-.asm_8d51c
-	xor a
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	call Function8d6d8
-	ret
-
-.sixteen_five: ; 8d526
-	call Function8d036
-	ret
-; 8d52a
-
-.seventeen: ; 8d52a (23:552a)
-	ld hl, $4
-	add hl, bc
-	ld a, [hl]
-rept 2
-	inc [hl]
-endr
-	cp $b0
-	jr nc, .asm_8d53f
-	and $3
-	ret nz
-	ld de, SFX_POKEBALLS_PLACED_ON_TABLE
-	call PlaySFX
-	ret
-.asm_8d53f
-	call Function8d036
-	ret
-
-.eighteen: ; 8d543 (23:5543)
-	callab Function29676
-	ret
-
-.nineteen: ; 8d54a (23:554a)
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	cp $80
-	jr nc, .asm_8d574
-	ld d, a
-	add $8
-	ld [hl], a
-	ld hl, $b
-	add hl, bc
-	ld a, [hl]
-	xor $20
-	ld [hl], a
-	push af
-	push de
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	pop de
-	pop af
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ret
-.asm_8d574
-	call Function8d036
-	ret
-
-.twenty: ; 8d578 (23:5578)
-	callab Function91640
-	ret
-
-.twentyone: ; 8d57f (23:557f)
-	ld hl, $d
-	add hl, bc
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	ld hl, $80
-	add hl, de
-	ld e, l
-	ld d, h
-	ld hl, $d
-	add hl, bc
-	ld [hl], e
-	inc hl
-	ld [hl], d
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-rept 3
-	inc [hl]
-endr
-	push af
-	push de
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	pop de
-	pop af
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ret
-
-.twentytwo: ; 8d5b0 (23:55b0)
-	ld hl, $5
-	add hl, bc
-	ld a, [hl]
-	and a
-	ret z
-	ld hl, $d
-	add hl, bc
-	ld a, [hl]
-	inc [hl]
-	cp $40
-	ret c
-	ld hl, $5
-	add hl, bc
-rept 2
-	dec [hl]
-endr
-	ld hl, $f
-	add hl, bc
-	ld a, [hl]
-	ld d, a
-	cp $40
-	jr nc, .asm_8d5d3
-	add $8
-	ld [hl], a
-.asm_8d5d3
-	ld hl, $e
-	add hl, bc
-	ld a, [hl]
-	inc [hl]
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ret
-
-.twentythree: ; 8d5e2 (23:55e2)
-	ld hl, $4
-	add hl, bc
-	ld a, [hl]
-	cp $b8
-	jr nc, .asm_8d603
-rept 2
-	inc [hl]
-endr
-	ld hl, $5
-	add hl, bc
-	dec [hl]
-	ld d, $40
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	inc [hl]
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ret
-.asm_8d603
-	call Function8d036
-	ret
-
-.twentyfour: ; 8d607 (23:5607)
-	ld hl, $5
-	add hl, bc
-	ld a, [hl]
-	cp $54
-	ret z
-	ld hl, $5
-	add hl, bc
-rept 2
-	inc [hl]
-endr
-	ld hl, $f
-	add hl, bc
-	ld a, [hl]
-	ld d, a
-	and a
-	jr z, .asm_8d621
-	sub $2
-	ld [hl], a
-.asm_8d621
-	ld hl, $e
-	add hl, bc
-	ld a, [hl]
-	inc [hl]
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ret
-
-.twentyseven: ; 8d630 (23:5630)
-	callba Function108bc7
-	ret
-
-.twentyeight: ; 8d637 (23:5637)
-	callba Function108be0
-	ret
-
-.twentynine: ; 8d63e (23:563e)
-	ld a, [wcf65]
-	and a
-	jr nz, .asm_8d645
-	ret
-.asm_8d645
-	ld hl, $7
-	add hl, bc
-	ld [hl], $0
-	ld hl, $d
-	add hl, bc
-	ld a, [hl]
-	add $2
-	ld [hl], a
-	xor $ff
-	inc a
-	ld d, $20
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	ld a, $36
-	call Function8d120
-	ret
-
-.thirty: ; 8d666 (23:5666)
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	cp $14
-	jr nc, .asm_8d67f
-	add $2
-	ld [hl], a
-	xor $ff
-	inc a
-	ld d, $20
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-.asm_8d67f
-	ret
-
-.thirtytwo: ; 8d680 (23:5680)
-	ld hl, $b
-	add hl, bc
-	ld d, [hl]
-rept 3
-	inc [hl]
-endr
-	ld hl, $c
-	add hl, bc
-	ld a, [hl]
-	push af
-	push de
-	call Function8d6de
-	ld hl, $7
-	add hl, bc
-	ld [hl], a
-	pop de
-	pop af
-	call Function8d6e2
-	ld hl, $6
-	add hl, bc
-	ld [hl], a
-	ret
-
-.thirtythree: ; 8d6a2 (23:56a2)
-	ld a, [wcf64]
-	cp $40
-	ret nz
-	ld a, $3d
-	call Function8d120
-	ret
-
-.thirtyfour: ; 8d6ae (23:56ae)
-	ld hl, $5
-	add hl, bc
-	ld a, [hl]
-	add $10
-	ld [hl], a
-	ret
-
-.twentysix: ; 8d6b7 (23:56b7)
-	callba Function11d0b6
-	ret
-
-.thirtyone: ; 8d6be (23:56be)
-	callba Function49aa2
-	ret
-
-.anonymous_jumptable: ; 8d6c5 (23:56c5)
-	ld hl, [sp+$0]
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	inc de
-	ld hl, $b
-	add hl, bc
-	ld l, [hl]
-	ld h, $0
-	add hl, hl
-	add hl, de
-	ld a, [hli]
-	ld h, [hl]
-	ld l, a
-	ret
-; 8d6d8 (23:56d8)
-
-Function8d6d8: ; 8d6d8
-	ld hl, $b
-	add hl, bc
-	inc [hl]
-	ret
-; 8d6de
-
-Function8d6de: ; 8d6de (23:56de)
-	call Function8e72c
-	ret
-
-Function8d6e2: ; 8d6e2 (23:56e2)
-	call Function8e72a
-	ret
-; 8d6e6 (23:56e6)
-
-Unknown_8d6e6: ; 8d6e6
-	dw Unknown_8d76a
-	dw Unknown_8d76d
-	dw Unknown_8d772
-	dw Unknown_8d777
-	dw Unknown_8d77c
-	dw Unknown_8d781
-	dw Unknown_8d786
-	dw Unknown_8d7a6
-	dw Unknown_8d7ab
-	dw Unknown_8d7b0
-	dw Unknown_8d7b5
-	dw Unknown_8d7d4
-	dw Unknown_8d7d9
-	dw Unknown_8d7e2
-	dw Unknown_8d7eb
-	dw Unknown_8d7f4
-	dw Unknown_8d7ff
-	dw Unknown_8d78b
-	dw Unknown_8d802
-	dw Unknown_8d805
-	dw Unknown_8d808
-	dw Unknown_8d811
-	dw Unknown_8d818
-	dw Unknown_8d81d
-	dw Unknown_8d822
-	dw Unknown_8d825
-	dw Unknown_8d82c
-	dw Unknown_8d82f
-	dw Unknown_8d861
-	dw Unknown_8d864
-	dw Unknown_8d867
-	dw Unknown_8d874
-	dw Unknown_8d877
-	dw Unknown_8d87a
-	dw Unknown_8d87d
-	dw Unknown_8d880
-	dw Unknown_8d883
-	dw Unknown_8d890
-	dw Unknown_8d899
-	dw Unknown_8d89c
-	dw Unknown_8d89f
-	dw Unknown_8d8a2
-	dw Unknown_8d8a5
-	dw Unknown_8d8a8
-	dw Unknown_8d8ab
-	dw Unknown_8d794
-	dw Unknown_8d79d
-	dw Unknown_8d8ae
-	dw Unknown_8d8cd
-	dw Unknown_8d8ec
-	dw Unknown_8d8f1
-	dw Unknown_8d8f4
-	dw Unknown_8d8f7
-	dw Unknown_8d8fe
-	dw Unknown_8d907
-	dw Unknown_8d90c
-	dw Unknown_8d913
-	dw Unknown_8d916
-	dw Unknown_8d91d
-	dw Unknown_8d924
-	dw Unknown_8d92b
-	dw Unknown_8d932
-	dw Unknown_8d93d
-	dw Unknown_8d940
-	dw Unknown_8d943
-	dw Unknown_8d948
-; 8d76a
-
-Unknown_8d76a: 	dw $2000
-                db -1
-Unknown_8d76d: 	dw $0800, $0801
-                db -2
-Unknown_8d772: 	dw $083d, $083e
-                db -2
-Unknown_8d777: 	dw $083f, $0840
-                db -2
-Unknown_8d77c: 	dw $0400, $0401
-                db -2
-Unknown_8d781: 	dw $043d, $043e
-                db -2
-Unknown_8d786: 	dw $043f, $0440
-                db -2
-Unknown_8d78b: 	dw $0800, $0801, $0800, $4801
-                db -2
-Unknown_8d794: 	dw $0863, $0864, $0863, $4864
-                db -2
-Unknown_8d79d: 	dw $0865, $0866, $0865, $4866
-                db -2
-Unknown_8d7a6: 	dw $011e, $011f
-                db -2
-Unknown_8d7ab: 	dw $0120, $01fd
-                db -2
-Unknown_8d7b0: 	dw $0121, $01fd
-                db -2
-Unknown_8d7b5: 	dw $0c81, $0182, $0183, $0482, $0c81, $0c82, $0483, $2084, $0385, $0386, $0487, $0488, $0489, $0a8a, $078b
-                db -1
-Unknown_8d7d4: 	dw $0323, $8323
-                db -2
-Unknown_8d7d9: 	dw $0224, $0225, $0226, $0225
-                db -2
-Unknown_8d7e2: 	dw $0727, $0728, $8727, $4728
-                db -2
-Unknown_8d7eb: 	dw $0729, $072a, $0729, $072b
-                db -2
-Unknown_8d7f4: 	dw $0729, $072c, $072d, $072c, $0729
-                db -1
-Unknown_8d7ff: 	dw $142e
-                db -1
-Unknown_8d802: 	dw $202f
-                db -1
-Unknown_8d805: 	dw $2030
-                db -1
-Unknown_8d808: 	dw $0330, $0331, $0330, $4331
-                db -2
-Unknown_8d811: 	dw $0432, $0433, $0434
-                db -4
-Unknown_8d818: 	dw $0335, $0336
-                db -2
-Unknown_8d81d: 	dw $0737, $0738
-                db -2
-Unknown_8d822: 	dw $2039
-                db -1
-Unknown_8d825: 	dw $023b, $023a, $023b
-                db -1
-Unknown_8d82c: 	dw $203c
-                db -1
-Unknown_8d82f: 	dw $0841, $0842, $0841, $4842
-                db -2
-                dw $0843, $0844
-                db -2
-                dw $0845, $0846
-                db -2
-                dw $0847, $0848
-                db -2
-                dw $0149, $4149, $c149, $8149
-                db -2
-                dw $204a
-                db -1
-                dw $204b
-                db -1
-                dw $204c
-                db -1
-                dw $204d
-                db -1
-                dw $034e, $03fd
-                db -2
-Unknown_8d861: 	dw $20fd
-                db -1
-Unknown_8d864: 	dw $204f
-                db -1
-Unknown_8d867: 	dw $0250, $1051, $01fd, $0152, $01fd, $0153
-                db -4
-Unknown_8d874: 	dw $2054
-                db -1
-Unknown_8d877: 	dw $2055
-                db -1
-Unknown_8d87a: 	dw $6055
-                db -1
-Unknown_8d87d: 	dw $a055
-                db -1
-Unknown_8d880: 	dw $e055
-                db -1
-Unknown_8d883: 	dw $0a56, $0957, $0a58, $0a59, $0958, $0a5a
-                db -2
-Unknown_8d890: 	dw $0250, $025b, $0250, $425b
-                db -2
-Unknown_8d899: 	dw $025c
-                db -1
-Unknown_8d89c: 	dw $025d
-                db -1
-Unknown_8d89f: 	dw $025e
-                db -1
-Unknown_8d8a2: 	dw $025f
-                db -1
-Unknown_8d8a5: 	dw $0260
-                db -1
-Unknown_8d8a8: 	dw $0261
-                db -1
-Unknown_8d8ab: 	dw $0262
-                db -1
-Unknown_8d8ae: 	dw $0332, $0333, $0334, $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331
-                db -1
-Unknown_8d8cd: 	dw $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331, $0330, $0331, $0330, $4331, $0332, $0333, $0334
-                db -4
-Unknown_8d8ec: 	dw $0367, $0368
-                db -2
-Unknown_8d8f1: 	dw $036c
-                db -1
-Unknown_8d8f4: 	dw $036d
-                db -1
-Unknown_8d8f7: 	dw $0269, $026a, $026b
-                db -4
-Unknown_8d8fe: 	dw $036e, $036f, $0370, $0371
-                db -2
-Unknown_8d907: 	dw $0371, $076e
-                db -1
-Unknown_8d90c: 	dw $2072, $0773, $0774
-                db -1
-Unknown_8d913: 	dw $0375
-                db -1
-Unknown_8d916: 	dw $0376, $0377, $0778
-                db -4
-Unknown_8d91d: 	dw $4376, $4377, $4778
-                db -4
-Unknown_8d924: 	dw $8376, $8377, $8778
-                db -4
-Unknown_8d92b: 	dw $c376, $c377, $c778
-                db -4
-Unknown_8d932: 	dw $0379, $037a, $037b, $077c, $077d
-                db -1
-Unknown_8d93d: 	dw $037e
-                db -1
-Unknown_8d940: 	dw $00fd
-                db -1
-Unknown_8d943: 	dw $087f, $0880
-                db -1
-Unknown_8d948: 	dw $487f, $4880
-                db -1
-; 8d94d
-
-Unknown_8d94d: ; 8d94d
-	dbw $00, Unknown_8dd8a
-	dbw $04, Unknown_8dd8a
-	dbw $4c, Unknown_8daf1
-	dbw $5c, Unknown_8daf1
-	dbw $6c, Unknown_8daf6
-	dbw $6e, Unknown_8daf6
-	dbw $2d, Unknown_8ddf0
-	dbw $4d, Unknown_8ddf0
-	dbw $60, Unknown_8de09
-	dbw $00, Unknown_8de09
-	dbw $00, Unknown_8de09
-	dbw $06, Unknown_8de09
-	dbw $0c, Unknown_8de7e
-	dbw $0d, Unknown_8daf1
-	dbw $00, Unknown_8dc53
-	dbw $04, Unknown_8dc53
-	dbw $08, Unknown_8dc53
-	dbw $40, Unknown_8dc53
-	dbw $44, Unknown_8dc53
-	dbw $48, Unknown_8dc53
-	dbw $4c, Unknown_8dc53
-	dbw $80, Unknown_8de87
-	dbw $85, Unknown_8de87
-	dbw $8a, Unknown_8de87
-	dbw $00, Unknown_8db29
-	dbw $01, Unknown_8db5c
-	dbw $09, Unknown_8db9d
-	dbw $10, Unknown_8dc94
-	dbw $29, Unknown_8dc94
-	dbw $42, Unknown_8dc94
-	dbw $f8, Unknown_8e17e
-	dbw $fa, Unknown_8e17e
-	dbw $00, Unknown_8deb2
-	dbw $00, Unknown_8dec3
-	dbw $00, Unknown_8deec
-	dbw $0f, Unknown_8db07
-	dbw $11, Unknown_8daf1
-	dbw $12, Unknown_8daf1
-	dbw $13, Unknown_8daf1
-	dbw $00, Unknown_8df29
-	dbw $08, Unknown_8df29
-	dbw $10, Unknown_8df42
-	dbw $10, Unknown_8df5b
-	dbw $10, Unknown_8df74
-	dbw $10, Unknown_8df8d
-	dbw $10, Unknown_8dfa6
-	dbw $3a, Unknown_8daf1
-	dbw $00, Unknown_8dd8a
-	dbw $00, Unknown_8db18
-	dbw $02, Unknown_8dd9b
-	dbw $06, Unknown_8db5c
-	dbw $0a, Unknown_8db5c
-	dbw $0e, Unknown_8db5c
-	dbw $12, Unknown_8db3a
-	dbw $13, Unknown_8db3a
-	dbw $00, Unknown_8dd8a
-	dbw $04, Unknown_8dd8a
-	dbw $10, Unknown_8db5c
-	dbw $00, Unknown_8dd9b
-	dbw $04, Unknown_8daf1
-	dbw $00, Unknown_8dfbf
-	dbw $00, Unknown_8ddac
-	dbw $00, Unknown_8ddbd
-	dbw $00, Unknown_8ddce
-	dbw $00, Unknown_8dddf
-	dbw $00, Unknown_8dd9b
-	dbw $04, Unknown_8dd9b
-	dbw $00, Unknown_8dc2e
-	dbw $30, Unknown_8dc2e
-	dbw $03, Unknown_8dc2e
-	dbw $33, Unknown_8dc2e
-	dbw $06, Unknown_8dc2e
-	dbw $36, Unknown_8dc2e
-	dbw $09, Unknown_8dc2e
-	dbw $39, Unknown_8dc2e
-	dbw $0c, Unknown_8dfcc
-	dbw $0c, Unknown_8dfe5
-	dbw $3c, Unknown_8daf1
-	dbw $3e, Unknown_8daf1
-	dbw $00, Unknown_8de9c
-	dbw $00, Unknown_8dea1
-	dbw $00, Unknown_8dff6
-	dbw $00, Unknown_8e007
-	dbw $00, Unknown_8e018
-	dbw $00, Unknown_8daf1
-	dbw $01, Unknown_8daf1
-	dbw $00, Unknown_8e029
-	dbw $00, Unknown_8e076
-	dbw $00, Unknown_8e0b7
-	dbw $00, Unknown_8e0f4
-	dbw $00, Unknown_8e139
-	dbw $04, Unknown_8dea1
-	dbw $00, Unknown_8e183
-	dbw $00, Unknown_8e1b4
-	dbw $00, Unknown_8e1b9
-	dbw $00, Unknown_8e1ca
-	dbw $00, Unknown_8e1eb
-	dbw $00, Unknown_8e1f0
-	dbw $00, Unknown_8e1f9
-	dbw $00, Unknown_8e202
-	dbw $04, Unknown_8e202
-	dbw $00, Unknown_8e213
-	dbw $04, Unknown_8e213
-	dbw $20, Unknown_8e224
-	dbw $21, Unknown_8e224
-	dbw $22, Unknown_8e24b
-	dbw $23, Unknown_8e25c
-	dbw $27, Unknown_8e27d
-	dbw $2a, Unknown_8e229
-	dbw $2a, Unknown_8e23a
-	dbw $00, Unknown_8e2ae
-	dbw $08, Unknown_8e33f
-	dbw $60, Unknown_8e3b0
-	dbw $68, Unknown_8e429
-	dbw $00, Unknown_8e4a6
-	dbw $05, Unknown_8e4a6
-	dbw $0a, Unknown_8e4a6
-	dbw $50, Unknown_8e50b
-	dbw $00, Unknown_8e54c
-	dbw $01, Unknown_8e551
-	dbw $04, Unknown_8e55e
-	dbw $00, Unknown_8db29
-	dbw $01, Unknown_8e57b
-	dbw $03, Unknown_8e59c
-	dbw $08, Unknown_8e5cd
-	dbw $1c, Unknown_8e5cd
-	dbw $80, Unknown_8e61e
-	dbw $00, Unknown_8e66f
-	dbw $04, Unknown_8e66f
-	dbw $d0, Unknown_8e680
-	dbw $d3, Unknown_8e680
-	dbw $d6, Unknown_8e680
-	dbw $6c, Unknown_8e6a5
-	dbw $68, Unknown_8e6a5
-	dbw $64, Unknown_8e6a5
-	dbw $60, Unknown_8e6a5
-	dbw $0c, Unknown_8e6a5
-	dbw $08, Unknown_8e6a5
-	dbw $04, Unknown_8e6a5
-	dbw $00, Unknown_8e6a5
-; 8daf1
-
-
-Unknown_8daf1: ; 8daf1
-	db 1
-	db $fc, $fc, $00, $00
-; 8daf6
-
-Unknown_8daf6: ; 8daf6
-	db 4
-	db $f8, $f8, $00, $00
-	db $f8, $00, $01, $00
-	db $00, $f8, $10, $00
-	db $00, $00, $11, $00
-; 8db07
-
-Unknown_8db07: ; 8db07
-	db 4
-	db $f8, $f8, $00, $00
-	db $f8, $00, $00, $20
-	db $00, $f8, $01, $00
-	db $00, $00, $01, $20
-; 8db18
-
-Unknown_8db18: ; 8db18
-	db 4
-	db $f8, $f8, $00, $80
-	db $f8, $00, $00, $a0
-	db $00, $f8, $01, $80
-	db $00, $00, $01, $a0
-; 8db29
-
-Unknown_8db29: ; 8db29
-	db 4
-	db $f8, $f8, $00, $00
-	db $f8, $00, $00, $20
-	db $00, $f8, $00, $40
-	db $00, $00, $00, $60
-; 8db3a
-
-Unknown_8db3a: ; 8db3a
-	db 4
-	db $f8, $f8, $00, $07
-	db $f8, $00, $00, $27
-	db $00, $f8, $00, $47
-	db $00, $00, $00, $67
-; 8db4b
-
-; 8db4b
-	db 4
-	db $f8, $f8, $00, $80
-	db $f8, $00, $00, $a0
-	db $00, $f8, $00, $c0
-	db $00, $00, $00, $e0
-; 8db5c
-
-Unknown_8db5c: ; 8db5c
-	db 16
-	db $f0, $f0, $00, $00
-	db $f0, $f8, $01, $00
-	db $f8, $f0, $02, $00
-	db $f8, $f8, $03, $00
-	db $f0, $00, $01, $20
-	db $f0, $08, $00, $20
-	db $f8, $00, $03, $20
-	db $f8, $08, $02, $20
-	db $00, $f0, $02, $40
-	db $00, $f8, $03, $40
-	db $08, $f0, $00, $40
-	db $08, $f8, $01, $40
-	db $00, $00, $03, $60
-	db $00, $08, $02, $60
-	db $08, $00, $01, $60
-	db $08, $08, $00, $60
-; 8db9d
-
-Unknown_8db9d: ; 8db9d
-	db 36
-	db $e8, $e8, $00, $00
-	db $e8, $f0, $01, $00
-	db $e8, $f8, $02, $00
-	db $f0, $e8, $03, $00
-	db $f0, $f0, $04, $00
-	db $f0, $f8, $05, $00
-	db $f8, $e8, $06, $00
-	db $f8, $f0, $05, $00
-	db $f8, $f8, $05, $00
-	db $e8, $00, $02, $20
-	db $e8, $08, $01, $20
-	db $e8, $10, $00, $20
-	db $f0, $00, $05, $20
-	db $f0, $08, $04, $20
-	db $f0, $10, $03, $20
-	db $f8, $00, $05, $20
-	db $f8, $08, $05, $20
-	db $f8, $10, $06, $20
-	db $00, $e8, $06, $40
-	db $00, $f0, $05, $40
-	db $00, $f8, $05, $40
-	db $08, $e8, $03, $40
-	db $08, $f0, $04, $40
-	db $08, $f8, $05, $40
-	db $10, $e8, $00, $40
-	db $10, $f0, $01, $40
-	db $10, $f8, $02, $40
-	db $00, $00, $05, $60
-	db $00, $08, $05, $60
-	db $00, $10, $06, $60
-	db $08, $00, $05, $60
-	db $08, $08, $04, $60
-	db $08, $10, $03, $60
-	db $10, $00, $02, $60
-	db $10, $08, $01, $60
-	db $10, $10, $00, $60
-; 8dc2e
-
-Unknown_8dc2e: ; 8dc2e
-	db 9
-	db $f4, $f4, $00, $00
-	db $f4, $fc, $01, $00
-	db $f4, $04, $02, $00
-	db $fc, $f4, $10, $00
-	db $fc, $fc, $11, $00
-	db $fc, $04, $12, $00
-	db $04, $f4, $20, $00
-	db $04, $fc, $21, $00
-	db $04, $04, $22, $00
-; 8dc53
-
-Unknown_8dc53: ; 8dc53
-	db 16
-	db $f0, $f0, $00, $00
-	db $f0, $f8, $01, $00
-	db $f0, $00, $02, $00
-	db $f0, $08, $03, $00
-	db $f8, $f0, $10, $00
-	db $f8, $f8, $11, $00
-	db $f8, $00, $12, $00
-	db $f8, $08, $13, $00
-	db $00, $f0, $20, $00
-	db $00, $f8, $21, $00
-	db $00, $00, $22, $00
-	db $00, $08, $23, $00
-	db $08, $f0, $30, $00
-	db $08, $f8, $31, $00
-	db $08, $00, $32, $00
-	db $08, $08, $33, $00
-; 8dc94
-
-Unknown_8dc94: ; 8dc94
-	db 25
-	db $ec, $ec, $00, $00
-	db $f4, $ec, $01, $00
-	db $fc, $ec, $02, $00
-	db $04, $ec, $03, $00
-	db $0c, $ec, $04, $00
-	db $ec, $f4, $05, $00
-	db $f4, $f4, $06, $00
-	db $fc, $f4, $07, $00
-	db $04, $f4, $08, $00
-	db $0c, $f4, $09, $00
-	db $ec, $fc, $0a, $00
-	db $f4, $fc, $0b, $00
-	db $fc, $fc, $0c, $00
-	db $04, $fc, $0d, $00
-	db $0c, $fc, $0e, $00
-	db $ec, $04, $0f, $00
-	db $f4, $04, $10, $00
-	db $fc, $04, $11, $00
-	db $04, $04, $12, $00
-	db $0c, $04, $13, $00
-	db $ec, $0c, $14, $00
-	db $f4, $0c, $15, $00
-	db $fc, $0c, $16, $00
-	db $04, $0c, $17, $00
-	db $0c, $0c, $18, $00
-; 8dcf9
-
-; 8dcf9
-	db 36
-	db $e8, $e8, $00, $00
-	db $e8, $f0, $01, $00
-	db $e8, $f8, $02, $00
-	db $e8, $00, $03, $00
-	db $e8, $08, $04, $00
-	db $e8, $10, $05, $00
-	db $f0, $e8, $06, $00
-	db $f0, $f0, $07, $00
-	db $f0, $f8, $08, $00
-	db $f0, $00, $09, $00
-	db $f0, $08, $0a, $00
-	db $f0, $10, $0b, $00
-	db $f8, $e8, $0c, $00
-	db $f8, $f0, $0d, $00
-	db $f8, $f8, $0e, $00
-	db $f8, $00, $0f, $00
-	db $f8, $08, $10, $00
-	db $f8, $10, $11, $00
-	db $00, $e8, $12, $00
-	db $00, $f0, $13, $00
-	db $00, $f8, $14, $00
-	db $00, $00, $15, $00
-	db $00, $08, $16, $00
-	db $00, $10, $17, $00
-	db $08, $e8, $18, $00
-	db $08, $f0, $19, $00
-	db $08, $f8, $1a, $00
-	db $08, $00, $1b, $00
-	db $08, $08, $1c, $00
-	db $08, $10, $1d, $00
-	db $10, $e8, $1e, $00
-	db $10, $f0, $1f, $00
-	db $10, $f8, $20, $00
-	db $10, $00, $21, $00
-	db $10, $08, $22, $00
-	db $10, $10, $23, $00
-; 8dd8a
-
-Unknown_8dd8a: ; 8dd8a
-	db 4
-	db $f8, $f8, $00, $00
-	db $f8, $00, $01, $00
-	db $00, $f8, $02, $00
-	db $00, $00, $03, $00
-; 8dd9b
-
-Unknown_8dd9b: ; 8dd9b
-	db 4
-	db $f8, $f8, $00, $80
-	db $f8, $00, $01, $80
-	db $00, $f8, $02, $80
-	db $00, $00, $03, $80
-; 8ddac
-
-Unknown_8ddac: ; 8ddac
-	db 4
-	db $f8, $f8, $00, $00
-	db $f8, $00, $01, $00
-	db $00, $f8, $08, $00
-	db $00, $00, $03, $00
-; 8ddbd
-
-Unknown_8ddbd: ; 8ddbd
-	db 4
-	db $f8, $f8, $04, $00
-	db $f8, $00, $05, $00
-	db $00, $f8, $08, $00
-	db $00, $00, $07, $00
-; 8ddce
-
-Unknown_8ddce: ; 8ddce
-	db 4
-	db $f8, $f8, $00, $00
-	db $f8, $00, $01, $00
-	db $00, $f8, $09, $00
-	db $00, $00, $03, $00
-; 8dddf
-
-Unknown_8dddf: ; 8dddf
-	db 4
-	db $f8, $f8, $04, $00
-	db $f8, $00, $05, $00
-	db $00, $f8, $09, $00
-	db $00, $00, $07, $00
-; 8ddf0
-
-Unknown_8ddf0: ; 8ddf0
-	db 6
-	db $f8, $f4, $00, $01
-	db $f8, $fc, $01, $01
-	db $f8, $04, $02, $01
-	db $00, $f4, $10, $01
-	db $00, $fc, $11, $01
-	db $00, $04, $12, $01
-; 8de09
-
-Unknown_8de09: ; 8de09
-	db 29
-	db $e8, $e8, $00, $00
-	db $e8, $f0, $01, $00
-	db $e8, $f8, $02, $00
-	db $e8, $00, $03, $00
-	db $f0, $e8, $10, $00
-	db $f0, $f0, $11, $00
-	db $f0, $f8, $12, $00
-	db $f0, $00, $13, $00
-	db $f8, $e8, $20, $00
-	db $f8, $f0, $21, $00
-	db $f8, $f8, $22, $00
-	db $f8, $00, $23, $00
-	db $f8, $08, $24, $00
-	db $00, $e8, $30, $80
-	db $00, $f0, $31, $80
-	db $00, $f8, $32, $80
-	db $00, $00, $33, $80
-	db $00, $08, $34, $80
-	db $08, $e8, $40, $80
-	db $08, $f0, $41, $80
-	db $08, $f8, $42, $80
-	db $08, $00, $43, $80
-	db $08, $08, $44, $80
-	db $08, $10, $45, $80
-	db $10, $f0, $51, $80
-	db $10, $f8, $52, $80
-	db $10, $00, $53, $80
-	db $10, $08, $54, $80
-	db $10, $10, $55, $80
-; 8de7e
-
-Unknown_8de7e: ; 8de7e
-	db 2
-	db $f8, $fc, $00, $00
-	db $00, $fc, $10, $00
-; 8de87
-
-Unknown_8de87: ; 8de87
-	db 5
-	db $f0, $18, $00, $00
-	db $f0, $20, $01, $00
-	db $f8, $10, $02, $00
-	db $f8, $18, $03, $00
-	db $00, $10, $04, $00
-; 8de9c
-
-Unknown_8de9c: ; 8de9c
-	db 1
-	db $fc, $fc, $00, $06
-; 8dea1
-
-Unknown_8dea1: ; 8dea1
-	db 4
-	db $f8, $f8, $00, $06
-	db $f8, $00, $01, $06
-	db $00, $f8, $02, $06
-	db $00, $00, $03, $06
-; 8deb2
-
-Unknown_8deb2: ; 8deb2
-	db 4
-	db $ff, $ff, $00, $00
-	db $ff, $00, $00, $20
-	db $00, $ff, $00, $40
-	db $00, $00, $00, $60
-; 8dec3
-
-Unknown_8dec3: ; 8dec3
-	db 10
-	db $ff, $00, $00, $00
-	db $ff, $08, $01, $00
-	db $ff, $10, $01, $00
-	db $ff, $18, $01, $00
-	db $ff, $20, $00, $20
-	db $00, $00, $00, $40
-	db $00, $08, $01, $40
-	db $00, $10, $01, $40
-	db $00, $18, $01, $40
-	db $00, $20, $00, $60
-; 8deec
-
-Unknown_8deec: ; 8deec
-	db 15
-	db $ec, $f4, $00, $11
-	db $ec, $fc, $01, $11
-	db $ec, $04, $02, $11
-	db $f4, $f4, $03, $11
-	db $f4, $fc, $04, $11
-	db $f4, $04, $05, $11
-	db $fc, $f4, $06, $11
-	db $fc, $fc, $07, $11
-	db $fc, $04, $08, $11
-	db $04, $f4, $09, $11
-	db $04, $fc, $0a, $11
-	db $04, $04, $0b, $11
-	db $0c, $f4, $0c, $11
-	db $0c, $fc, $0d, $11
-	db $0c, $04, $0e, $11
-; 8df29
-
-Unknown_8df29: ; 8df29
-	db 6
-	db $f4, $f4, $00, $15
-	db $f4, $fc, $02, $15
-	db $f4, $04, $00, $35
-	db $04, $f4, $04, $15
-	db $04, $fc, $06, $15
-	db $04, $04, $04, $35
-; 8df42
-
-Unknown_8df42: ; 8df42
-	db 6
-	db $f4, $f4, $00, $16
-	db $f4, $fc, $02, $16
-	db $f4, $04, $04, $16
-	db $04, $f4, $06, $16
-	db $04, $fc, $08, $16
-	db $04, $04, $0a, $16
-; 8df5b
-
-Unknown_8df5b: ; 8df5b
-	db 6
-	db $f4, $f4, $00, $16
-	db $f4, $fc, $02, $16
-	db $f4, $04, $04, $16
-	db $04, $f4, $0c, $16
-	db $04, $fc, $0e, $16
-	db $04, $04, $10, $16
-; 8df74
-
-Unknown_8df74: ; 8df74
-	db 6
-	db $f4, $f4, $00, $16
-	db $f4, $fc, $02, $16
-	db $f4, $04, $04, $16
-	db $04, $f4, $12, $16
-	db $04, $fc, $14, $16
-	db $04, $04, $16, $16
-; 8df8d
-
-Unknown_8df8d: ; 8df8d
-	db 6
-	db $f4, $f4, $00, $16
-	db $f4, $fc, $02, $16
-	db $f4, $04, $04, $16
-	db $04, $f4, $18, $16
-	db $04, $fc, $1a, $16
-	db $04, $04, $1c, $16
-; 8dfa6
-
-Unknown_8dfa6: ; 8dfa6
-	db 6
-	db $f4, $f4, $1e, $16
-	db $f4, $fc, $20, $16
-	db $f4, $04, $22, $16
-	db $04, $f4, $24, $16
-	db $04, $fc, $26, $16
-	db $04, $04, $28, $16
-; 8dfbf
-
-Unknown_8dfbf: ; 8dfbf
-	db 3
-	db $f4, $fc, $00, $10
-	db $fc, $fc, $00, $10
-	db $04, $fc, $00, $10
-; 8dfcc
-
-Unknown_8dfcc: ; 8dfcc
-	db 6
-	db $00, $00, $00, $00
-	db $00, $08, $01, $00
-	db $00, $10, $01, $00
-	db $00, $18, $01, $00
-	db $00, $20, $02, $00
-	db $00, $28, $03, $00
-; 8dfe5
-
-Unknown_8dfe5: ; 8dfe5
-	db 4
-	db $00, $00, $00, $00
-	db $00, $08, $01, $00
-	db $00, $10, $02, $00
-	db $00, $18, $03, $00
-; 8dff6
-
-Unknown_8dff6: ; 8dff6
-	db 4
-	db $f8, $f6, $00, $06
-	db $f8, $02, $01, $06
-	db $00, $f6, $02, $06
-	db $00, $02, $03, $06
-; 8e007
-
-Unknown_8e007: ; 8e007
-	db 4
-	db $f8, $f4, $00, $06
-	db $f8, $04, $01, $06
-	db $00, $f4, $02, $06
-	db $00, $04, $03, $06
-; 8e018
-
-Unknown_8e018: ; 8e018
-	db 4
-	db $f8, $f0, $00, $06
-	db $f8, $08, $01, $06
-	db $00, $f0, $02, $06
-	db $00, $08, $03, $06
-; 8e029
-
-Unknown_8e029: ; 8e029
-	db 19
-	db $f8, $e0, $00, $00
-	db $f0, $e8, $02, $00
-	db $00, $e8, $04, $00
-	db $e8, $f0, $06, $00
-	db $f8, $f0, $08, $00
-	db $08, $f0, $0a, $00
-	db $e8, $f8, $0c, $00
-	db $f8, $f8, $0e, $00
-	db $08, $f8, $10, $00
-	db $e8, $00, $12, $00
-	db $f8, $00, $14, $00
-	db $08, $00, $16, $00
-	db $e8, $08, $18, $00
-	db $f8, $08, $1a, $00
-	db $08, $08, $1c, $00
-	db $f8, $10, $1e, $00
-	db $08, $10, $20, $00
-	db $f0, $18, $22, $00
-	db $00, $18, $24, $00
-; 8e076
-
-Unknown_8e076: ; 8e076
-	db 16
-	db $f8, $e0, $00, $00
-	db $f0, $e8, $02, $00
-	db $00, $e8, $04, $00
-	db $f8, $f0, $26, $00
-	db $08, $f0, $0a, $00
-	db $e8, $f8, $28, $00
-	db $f8, $f8, $2a, $00
-	db $08, $f8, $10, $00
-	db $f8, $00, $2c, $00
-	db $08, $00, $16, $00
-	db $f8, $08, $30, $00
-	db $08, $08, $1c, $00
-	db $f8, $10, $1e, $00
-	db $08, $10, $20, $00
-	db $f0, $18, $22, $00
-	db $00, $18, $24, $00
-; 8e0b7
-
-Unknown_8e0b7: ; 8e0b7
-	db 15
-	db $f8, $e0, $00, $00
-	db $f0, $e8, $02, $00
-	db $00, $e8, $32, $00
-	db $f8, $f0, $34, $00
-	db $08, $f0, $36, $00
-	db $f8, $f8, $38, $00
-	db $08, $f8, $3a, $00
-	db $f8, $00, $3c, $00
-	db $08, $00, $3e, $00
-	db $f8, $08, $30, $00
-	db $08, $08, $1c, $00
-	db $f8, $10, $1e, $00
-	db $08, $10, $20, $00
-	db $f0, $18, $22, $00
-	db $00, $18, $24, $00
-; 8e0f4
-
-Unknown_8e0f4: ; 8e0f4
-	db 17
-	db $f8, $e0, $00, $00
-	db $f0, $e8, $02, $00
-	db $00, $e8, $04, $00
-	db $f8, $f0, $40, $00
-	db $08, $f0, $42, $00
-	db $18, $f0, $44, $00
-	db $f8, $f8, $46, $00
-	db $08, $f8, $48, $00
-	db $18, $f8, $4a, $00
-	db $f8, $00, $4c, $00
-	db $08, $00, $4e, $00
-	db $f8, $08, $30, $00
-	db $08, $08, $1c, $00
-	db $f8, $10, $1e, $00
-	db $08, $10, $20, $00
-	db $f0, $18, $22, $00
-	db $00, $18, $24, $00
-; 8e139
-
-Unknown_8e139: ; 8e139
-	db 17
-	db $f8, $e0, $00, $00
-	db $f0, $e8, $02, $00
-	db $00, $e8, $04, $00
-	db $f8, $f0, $50, $00
-	db $08, $f0, $0a, $00
-	db $e8, $f8, $52, $00
-	db $f8, $f8, $54, $00
-	db $08, $f8, $10, $00
-	db $e8, $00, $56, $00
-	db $f8, $00, $2e, $00
-	db $08, $00, $16, $00
-	db $f8, $08, $30, $00
-	db $08, $08, $1c, $00
-	db $f8, $10, $1e, $00
-	db $08, $10, $20, $00
-	db $f0, $18, $22, $00
-	db $00, $18, $24, $00
-; 8e17e
-
-Unknown_8e17e: ; 8e17e
-	db 1
-	db $fc, $fc, $00, $11
-; 8e183
-
-Unknown_8e183: ; 8e183
-	db 12
-	db $00, $00, $30, $00
-	db $00, $08, $31, $00
-	db $00, $10, $31, $00
-	db $00, $18, $31, $00
-	db $00, $20, $31, $00
-	db $00, $28, $32, $00
-	db $08, $00, $33, $00
-	db $08, $08, $34, $00
-	db $08, $10, $34, $00
-	db $08, $18, $34, $00
-	db $08, $20, $34, $00
-	db $08, $28, $35, $00
-; 8e1b4
-
-Unknown_8e1b4: ; 8e1b4
-	db 1
-	db $00, $00, $ed, $00
-; 8e1b9
-
-Unknown_8e1b9: ; 8e1b9
-	db 4
-	db $ff, $ff, $30, $00
-	db $ff, $01, $32, $00
-	db $01, $ff, $33, $00
-	db $01, $01, $35, $00
-; 8e1ca
-
-Unknown_8e1ca: ; 8e1ca
-	db 8
-	db $ff, $ff, $30, $00
-	db $ff, $04, $31, $00
-	db $ff, $0c, $31, $00
-	db $ff, $11, $32, $00
-	db $01, $ff, $33, $00
-	db $01, $04, $34, $00
-	db $01, $0c, $34, $00
-	db $01, $11, $35, $00
-; 8e1eb
-
-Unknown_8e1eb: ; 8e1eb
-	db 1
-	db $00, $00, $34, $00
-; 8e1f0
-
-Unknown_8e1f0: ; 8e1f0
-	db 2
-	db $00, $00, $30, $00
-	db $08, $00, $33, $00
-; 8e1f9
-
-Unknown_8e1f9: ; 8e1f9
-	db 2
-	db $00, $00, $32, $00
-	db $08, $00, $35, $00
-; 8e202
-
-Unknown_8e202: ; 8e202
-	db 4
-	db $f8, $f8, $00, $01
-	db $f8, $00, $01, $01
-	db $00, $f8, $02, $01
-	db $00, $00, $03, $01
-; 8e213
-
-Unknown_8e213: ; 8e213
-	db 4
-	db $f8, $f8, $00, $81
-	db $f8, $00, $01, $81
-	db $00, $f8, $02, $81
-	db $00, $00, $03, $81
-; 8e224
-
-Unknown_8e224: ; 8e224
-	db 1
-	db $fc, $fc, $00, $02
-; 8e229
-
-Unknown_8e229: ; 8e229
-	db 4
-	db $f0, $fc, $00, $03
-	db $f8, $fc, $01, $03
-	db $00, $fc, $02, $03
-	db $08, $fc, $03, $03
-; 8e23a
-
-Unknown_8e23a: ; 8e23a
-	db 4
-	db $f0, $fc, $03, $44
-	db $f8, $fc, $02, $44
-	db $00, $fc, $01, $44
-	db $08, $fc, $00, $44
-; 8e24b
-
-Unknown_8e24b: ; 8e24b
-	db 4
-	db $f8, $f8, $00, $01
-	db $f8, $00, $00, $21
-	db $00, $f8, $00, $41
-	db $00, $00, $00, $61
-; 8e25c
-
-Unknown_8e25c: ; 8e25c
-	db 8
-	db $f4, $f4, $00, $01
-	db $f4, $fc, $01, $01
-	db $f4, $04, $00, $21
-	db $fc, $f4, $02, $01
-	db $fc, $04, $02, $21
-	db $04, $f4, $00, $41
-	db $04, $fc, $01, $41
-	db $04, $04, $00, $61
-; 8e27d
-
-Unknown_8e27d: ; 8e27d
-	db 12
-	db $f0, $f0, $00, $01
-	db $f0, $f8, $01, $01
-	db $f8, $f0, $02, $01
-	db $f0, $00, $01, $21
-	db $f0, $08, $00, $21
-	db $f8, $08, $02, $21
-	db $00, $f0, $02, $41
-	db $08, $f0, $00, $41
-	db $08, $f8, $01, $41
-	db $00, $08, $02, $61
-	db $08, $00, $01, $61
-	db $08, $08, $00, $61
-; 8e2ae
-
-Unknown_8e2ae: ; 8e2ae
-	db 36
-	db $e8, $08, $05, $00
-	db $e8, $10, $06, $00
-	db $e8, $18, $07, $00
-	db $f0, $e8, $11, $00
-	db $f0, $f0, $12, $00
-	db $f0, $f8, $13, $00
-	db $f0, $00, $14, $00
-	db $f0, $08, $15, $00
-	db $f0, $10, $16, $00
-	db $f0, $18, $17, $00
-	db $f8, $e0, $20, $00
-	db $f8, $e8, $21, $00
-	db $f8, $f0, $22, $00
-	db $f8, $f8, $23, $00
-	db $f8, $00, $24, $00
-	db $f8, $08, $25, $00
-	db $f8, $10, $26, $00
-	db $f8, $18, $27, $00
-	db $00, $e0, $30, $00
-	db $00, $e8, $31, $00
-	db $00, $f0, $32, $00
-	db $00, $f8, $33, $00
-	db $00, $00, $34, $00
-	db $00, $08, $35, $00
-	db $00, $10, $36, $00
-	db $08, $e0, $40, $00
-	db $08, $e8, $41, $00
-	db $08, $f0, $42, $00
-	db $08, $f8, $43, $00
-	db $08, $00, $44, $00
-	db $08, $08, $45, $00
-	db $08, $10, $46, $00
-	db $08, $18, $47, $00
-	db $10, $e0, $50, $00
-	db $10, $e8, $51, $00
-	db $10, $18, $57, $00
-; 8e33f
-
-Unknown_8e33f: ; 8e33f
-	db 28
-	db $e8, $00, $04, $00
-	db $e8, $08, $05, $00
-	db $e8, $10, $06, $00
-	db $f0, $e8, $11, $00
-	db $f0, $f0, $12, $00
-	db $f0, $f8, $13, $00
-	db $f0, $00, $14, $00
-	db $f0, $08, $15, $00
-	db $f0, $10, $16, $00
-	db $f8, $e8, $21, $00
-	db $f8, $f0, $22, $00
-	db $f8, $f8, $23, $00
-	db $f8, $00, $24, $00
-	db $f8, $08, $25, $00
-	db $f8, $10, $26, $00
-	db $00, $e0, $30, $00
-	db $00, $e8, $31, $00
-	db $00, $f0, $32, $00
-	db $00, $f8, $33, $00
-	db $00, $00, $34, $00
-	db $00, $08, $35, $00
-	db $08, $f0, $42, $00
-	db $08, $f8, $43, $00
-	db $08, $00, $44, $00
-	db $08, $08, $45, $00
-	db $10, $f8, $53, $00
-	db $10, $00, $54, $00
-	db $10, $08, $55, $00
-; 8e3b0
-
-Unknown_8e3b0: ; 8e3b0
-	db 30
-	db $e8, $00, $04, $00
-	db $e8, $08, $05, $00
-	db $f0, $e8, $11, $00
-	db $f0, $f0, $12, $00
-	db $f0, $f8, $13, $00
-	db $f0, $00, $14, $00
-	db $f0, $08, $15, $00
-	db $f0, $10, $16, $00
-	db $f0, $18, $17, $00
-	db $f8, $e0, $20, $00
-	db $f8, $e8, $21, $00
-	db $f8, $f0, $22, $00
-	db $f8, $f8, $23, $00
-	db $f8, $00, $24, $00
-	db $f8, $08, $25, $00
-	db $f8, $10, $26, $00
-	db $00, $e0, $30, $00
-	db $00, $e8, $31, $00
-	db $00, $f0, $32, $00
-	db $00, $f8, $33, $00
-	db $00, $00, $34, $00
-	db $00, $08, $35, $00
-	db $08, $f0, $42, $00
-	db $08, $f8, $43, $00
-	db $08, $00, $44, $00
-	db $08, $08, $45, $00
-	db $10, $f0, $52, $00
-	db $10, $f8, $53, $00
-	db $10, $00, $54, $00
-	db $10, $08, $55, $00
-; 8e429
-
-Unknown_8e429: ; 8e429
-	db 31
-	db $f0, $e8, $11, $00
-	db $f0, $f0, $12, $00
-	db $f0, $f8, $13, $00
-	db $f0, $00, $14, $00
-	db $f0, $08, $15, $00
-	db $f0, $10, $16, $00
-	db $f0, $18, $17, $00
-	db $f8, $e0, $20, $00
-	db $f8, $e8, $21, $00
-	db $f8, $f0, $22, $00
-	db $f8, $f8, $23, $00
-	db $f8, $00, $24, $00
-	db $f8, $08, $25, $00
-	db $f8, $10, $26, $00
-	db $f8, $18, $27, $00
-	db $00, $e0, $30, $00
-	db $00, $e8, $31, $00
-	db $00, $f0, $32, $00
-	db $00, $f8, $33, $00
-	db $00, $00, $34, $00
-	db $00, $08, $35, $00
-	db $00, $10, $36, $00
-	db $08, $e8, $41, $00
-	db $08, $f0, $42, $00
-	db $08, $f8, $43, $00
-	db $08, $00, $44, $00
-	db $08, $08, $45, $00
-	db $10, $e8, $51, $00
-	db $10, $f0, $52, $00
-	db $10, $00, $54, $00
-	db $10, $08, $55, $00
-; 8e4a6
-
-Unknown_8e4a6: ; 8e4a6
-	db 25
-	db $ec, $ec, $00, $09
-	db $ec, $f4, $01, $09
-	db $ec, $fc, $02, $09
-	db $ec, $04, $03, $09
-	db $ec, $0c, $04, $09
-	db $f4, $ec, $10, $09
-	db $f4, $f4, $11, $09
-	db $f4, $fc, $12, $09
-	db $f4, $04, $13, $09
-	db $f4, $0c, $14, $09
-	db $fc, $ec, $20, $09
-	db $fc, $f4, $21, $09
-	db $fc, $fc, $22, $09
-	db $fc, $04, $23, $09
-	db $fc, $0c, $24, $09
-	db $04, $ec, $30, $09
-	db $04, $f4, $31, $09
-	db $04, $fc, $32, $09
-	db $04, $04, $33, $09
-	db $04, $0c, $34, $09
-	db $0c, $ec, $40, $09
-	db $0c, $f4, $41, $09
-	db $0c, $fc, $42, $09
-	db $0c, $04, $43, $09
-	db $0c, $0c, $44, $09
-; 8e50b
-
-Unknown_8e50b: ; 8e50b
-	db 16
-	db $f0, $ec, $00, $0a
-	db $f0, $f4, $01, $0a
-	db $f0, $fc, $02, $0a
-	db $f0, $04, $03, $0a
-	db $f8, $ec, $04, $0a
-	db $f8, $f4, $05, $0a
-	db $f8, $fc, $06, $0a
-	db $f8, $04, $07, $0a
-	db $00, $ec, $08, $0a
-	db $00, $f4, $09, $0a
-	db $00, $fc, $0a, $0a
-	db $00, $04, $0b, $0a
-	db $08, $ec, $0c, $0a
-	db $08, $f4, $0d, $0a
-	db $08, $fc, $0e, $0a
-	db $08, $04, $0f, $0a
-; 8e54c
-
-Unknown_8e54c: ; 8e54c
-	db 1
-	db $fc, $fc, $00, $00
-; 8e551
-
-Unknown_8e551: ; 8e551
-	db 3
-	db $00, $f8, $00, $00
-	db $f8, $f8, $01, $00
-	db $f8, $00, $02, $00
-; 8e55e
-
-Unknown_8e55e: ; 8e55e
-	db 7
-	db $08, $f0, $00, $00
-	db $00, $f0, $01, $00
-	db $f8, $f0, $02, $00
-	db $f8, $f8, $03, $00
-	db $f0, $f8, $04, $00
-	db $f0, $00, $05, $00
-	db $f0, $08, $06, $00
-; 8e57b
-
-Unknown_8e57b: ; 8e57b
-	db 8
-	db $f8, $f0, $00, $00
-	db $f8, $f8, $01, $00
-	db $f8, $00, $01, $20
-	db $f8, $08, $00, $20
-	db $00, $f0, $00, $40
-	db $00, $f8, $01, $40
-	db $00, $00, $01, $60
-	db $00, $08, $00, $60
-; 8e59c
-
-Unknown_8e59c: ; 8e59c
-	db 12
-	db $e8, $f8, $00, $00
-	db $f0, $f8, $01, $00
-	db $f8, $f8, $02, $00
-	db $e8, $00, $00, $20
-	db $f0, $00, $01, $20
-	db $f8, $00, $02, $20
-	db $00, $f8, $02, $40
-	db $08, $f8, $01, $40
-	db $10, $f8, $00, $40
-	db $00, $00, $02, $60
-	db $08, $00, $01, $60
-	db $10, $00, $00, $60
-; 8e5cd
-
-Unknown_8e5cd: ; 8e5cd
-	db 20
-	db $ec, $f0, $00, $00
-	db $ec, $f8, $01, $00
-	db $ec, $00, $02, $00
-	db $ec, $08, $03, $00
-	db $f4, $f0, $04, $00
-	db $f4, $f8, $05, $00
-	db $f4, $00, $06, $00
-	db $f4, $08, $07, $00
-	db $fc, $f0, $08, $00
-	db $fc, $f8, $09, $00
-	db $fc, $00, $0a, $00
-	db $fc, $08, $0b, $00
-	db $04, $f0, $0c, $00
-	db $04, $f8, $0d, $00
-	db $04, $00, $0e, $00
-	db $04, $08, $0f, $00
-	db $0c, $f0, $10, $00
-	db $0c, $f8, $11, $00
-	db $0c, $00, $12, $00
-	db $0c, $08, $13, $00
-; 8e61e
-
-Unknown_8e61e: ; 8e61e
-	db 20
-	db $00, $08, $00, $81
-	db $08, $10, $00, $81
-	db $10, $18, $00, $81
-	db $18, $20, $00, $81
-	db $20, $28, $00, $81
-	db $18, $30, $00, $81
-	db $10, $38, $00, $81
-	db $08, $40, $00, $81
-	db $00, $48, $00, $81
-	db $08, $50, $00, $81
-	db $10, $58, $00, $81
-	db $18, $60, $00, $81
-	db $20, $68, $00, $81
-	db $18, $70, $00, $81
-	db $10, $78, $00, $81
-	db $08, $80, $00, $81
-	db $00, $88, $00, $81
-	db $08, $90, $00, $81
-	db $10, $98, $00, $81
-	db $18, $a0, $00, $81
-; 8e66f
-
-Unknown_8e66f: ; 8e66f
-	db 4
-	db $f8, $f8, $00, $02
-	db $f8, $00, $01, $02
-	db $00, $f8, $02, $02
-	db $00, $00, $03, $02
-; 8e680
-
-Unknown_8e680: ; 8e680
-	db 9
-	db $f0, $f4, $00, $01
-	db $f0, $fc, $01, $01
-	db $f0, $04, $02, $01
-	db $f8, $f4, $10, $01
-	db $f8, $fc, $11, $01
-	db $f8, $04, $12, $01
-	db $00, $f4, $20, $01
-	db $00, $fc, $21, $01
-	db $00, $04, $22, $01
-; 8e6a5
-
-Unknown_8e6a5: ; 8e6a5
-	db 24
-	db $d8, $f4, $00, $01
-	db $d8, $fc, $01, $01
-	db $d8, $04, $02, $01
-	db $d8, $0c, $03, $01
-	db $e0, $f4, $10, $01
-	db $e0, $fc, $11, $01
-	db $e0, $04, $12, $01
-	db $e0, $0c, $13, $01
-	db $e8, $f4, $20, $01
-	db $e8, $fc, $21, $01
-	db $e8, $04, $22, $01
-	db $e8, $0c, $23, $01
-	db $f0, $f4, $30, $01
-	db $f0, $fc, $31, $01
-	db $f0, $04, $32, $01
-	db $f0, $0c, $33, $01
-	db $f8, $f4, $40, $01
-	db $f8, $fc, $41, $01
-	db $f8, $04, $42, $01
-	db $f8, $0c, $43, $01
-	db $00, $f4, $50, $01
-	db $00, $fc, $51, $01
-	db $00, $04, $52, $01
-	db $00, $0c, $53, $01
-; 8e706
-
-
-Unknown_8e706: ; Broken 2bpp pointers
-	dbbw $80, $01, $672a ; 128-tile 2bpp at 1:672a (inside Multiply)
-	dbbw $80, $01, $672a
-	dbbw $80, $01, $672a
-	dbbw $80, $01, $672a
-	dbbw $10, $37, $672a ; 16-tile 2bpp at 37:672a (within Tileset11GFX)
-	dbbw $10, $11, $672a ; 16-tile 2bpp at 11:672a (empty data)
-	dbbw $10, $39, $672a ; 16-tile 2bpp at 39:672a (empty data)
-	dbbw $10, $24, $672a ; 16-tile 2bpp at 24:672a (inside Function926f7)
-	dbbw $10, $21, $672a ; 16-tile 2bpp at 21:672a (inside Function8671c)
-
-Function8e72a: ; 8e72a
-	add $10
-Function8e72c: ; 8e72c
-	and $3f
-	cp $20
-	jr nc, .asm_8e737
-	call Function8e741
-	ld a, h
-	ret
-
-.asm_8e737
-	and $1f
-	call Function8e741
-	ld a, h
-	xor $ff ; cpl
-	inc a
-	ret
-; 8e741
-
-Function8e741: ; 8e741
-	ld e, a
-	ld a, d
-	ld d, 0
-	ld hl, Unknown_8e75d
-rept 2
-	add hl, de
-endr
-	ld e, [hl]
-	inc hl
-	ld d, [hl]
-	ld hl, 0
-.asm_8e750
-	srl a
-	jr nc, .asm_8e755
-	add hl, de
-
-.asm_8e755
-	sla e
-	rl d
-	and a
-	jr nz, .asm_8e750
-	ret
-; 8e75d
-
-Unknown_8e75d: ; 8e75d
-	sine_wave $100
-
-
 Function8e79d: ; 8e79d
 	ld a, [hSGB]
 	ld de, GFX_8e7f4
@@ -53568,7 +50685,7 @@
 
 LoadGraphics: ; 1047cf
 	call LoadTilesetHeader
-	call Function2821
+	call LoadTileset
 	xor a
 	ld [hMapAnims], a
 	xor a
--- a/maps/map_headers.asm
+++ b/maps/map_headers.asm
@@ -41,9 +41,9 @@
 	map_header Route38EcruteakGate, TILESET_GATE, GATE, ROUTE_38, MUSIC_ROUTE_37, 0, PALETTE_DAY, 1
 	map_header Route39Barn, TILESET_KURT_HOUSE, INDOOR, ROUTE_39, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, 1
 	map_header Route39Farmhouse, TILESET_HOUSE_1, INDOOR, ROUTE_39, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, 1
-	map_header Route38, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_38, MUSIC_ROUTE_37, 0, PALETTE_AUTO, 1
-	map_header Route39, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_39, MUSIC_ROUTE_37, 0, PALETTE_AUTO, 1
-	map_header OlivineCity, TILESET_JOHTO_OUTSIDE_1, TOWN, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_AUTO, 1
+	map_header Route38, TILESET_JOHTO_1, ROUTE, ROUTE_38, MUSIC_ROUTE_37, 0, PALETTE_AUTO, 1
+	map_header Route39, TILESET_JOHTO_1, ROUTE, ROUTE_39, MUSIC_ROUTE_37, 0, PALETTE_AUTO, 1
+	map_header OlivineCity, TILESET_JOHTO_1, TOWN, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_AUTO, 1
 
 
 MapGroup2:
@@ -51,9 +51,9 @@
 	map_header MahoganyGym, TILESET_GYM_1, INDOOR, MAHOGANY_TOWN, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header MahoganyPokeCenter1F, TILESET_POKECENTER, INDOOR, MAHOGANY_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header Route42EcruteakGate, TILESET_GATE, GATE, ROUTE_42, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, 1
-	map_header Route42, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_42, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 3
-	map_header Route44, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_44, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 4
-	map_header MahoganyTown, TILESET_JOHTO_OUTSIDE_1, TOWN, MAHOGANY_TOWN, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_AUTO, 1
+	map_header Route42, TILESET_JOHTO_1, ROUTE, ROUTE_42, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 3
+	map_header Route44, TILESET_JOHTO_1, ROUTE, ROUTE_44, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 4
+	map_header MahoganyTown, TILESET_JOHTO_1, TOWN, MAHOGANY_TOWN, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_AUTO, 1
 
 
 MapGroup3:
@@ -78,7 +78,7 @@
 	map_header RadioTower3F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, 1
 	map_header RadioTower4F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, 1
 	map_header RadioTower5F, TILESET_RADIO_TOWER, INDOOR, RADIO_TOWER, 1<<7 | MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, 1
-	map_header RuinsofAlphOutside, TILESET_JOHTO_OUTSIDE_1, ROUTE, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 0, PALETTE_AUTO, 4
+	map_header RuinsofAlphOutside, TILESET_JOHTO_1, ROUTE, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 0, PALETTE_AUTO, 4
 	map_header RuinsofAlphHoOhChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, 1
 	map_header RuinsofAlphKabutoChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, 1
 	map_header RuinsofAlphOmanyteChamber, TILESET_RUINS_OF_ALPH, DUNGEON, RUINS_OF_ALPH, MUSIC_UNION_CAVE, 1, PALETTE_DAY, 1
@@ -137,7 +137,7 @@
 	map_header DarkCaveVioletEntrance, TILESET_WHIRL_ISLANDS, CAVE, DARK_CAVE, MUSIC_DARK_CAVE, 1, PALETTE_DARK, 3
 	map_header DarkCaveBlackthornEntrance, TILESET_WHIRL_ISLANDS, CAVE, DARK_CAVE, MUSIC_DARK_CAVE, 1, PALETTE_DARK, 3
 	map_header DragonsDen1F, TILESET_CAVE, CAVE, DRAGONS_DEN, MUSIC_DRAGONS_DEN, 1, PALETTE_NITE, 5
-	map_header DragonsDenB1F, TILESET_JOHTO_OUTSIDE_1, CAVE, DRAGONS_DEN, MUSIC_DRAGONS_DEN, 1, PALETTE_NITE, 5
+	map_header DragonsDenB1F, TILESET_JOHTO_1, CAVE, DRAGONS_DEN, MUSIC_DRAGONS_DEN, 1, PALETTE_NITE, 5
 	map_header DragonShrine, TILESET_LAB, INDOOR, DRAGONS_DEN, MUSIC_DRAGONS_DEN, 1, PALETTE_NITE, 1
 	map_header TohjoFalls, TILESET_CAVE, CAVE, TOHJO_FALLS, MUSIC_UNION_CAVE, 1, PALETTE_NITE, 3
 	map_header DiglettsCave, TILESET_CAVE, CAVE, DIGLETTS_CAVE, MUSIC_MT_MOON, 1, PALETTE_NITE, 1
@@ -159,7 +159,7 @@
 	map_header EcruteakMart, TILESET_MART, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, 1
 	map_header EcruteakGym, TILESET_SPROUT_TOWER, INDOOR, ECRUTEAK_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header EcruteakItemfinderHouse, TILESET_KURT_HOUSE, INDOOR, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, 1
-	map_header EcruteakCity, TILESET_JOHTO_OUTSIDE_1, TOWN, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_AUTO, 4
+	map_header EcruteakCity, TILESET_JOHTO_1, TOWN, ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_AUTO, 4
 
 
 MapGroup5:
@@ -170,9 +170,9 @@
 	map_header BlackthornMart, TILESET_MART, INDOOR, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, 1
 	map_header BlackthornPokeCenter1F, TILESET_POKECENTER, INDOOR, BLACKTHORN_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header MoveDeletersHouse, TILESET_HOUSE_1, INDOOR, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, 1
-	map_header Route45, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_45, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 9
-	map_header Route46, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_46, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
-	map_header BlackthornCity, TILESET_JOHTO_OUTSIDE_1, TOWN, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_AUTO, 4
+	map_header Route45, TILESET_JOHTO_1, ROUTE, ROUTE_45, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 9
+	map_header Route46, TILESET_JOHTO_1, ROUTE, ROUTE_46, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
+	map_header BlackthornCity, TILESET_JOHTO_1, TOWN, BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, 0, PALETTE_AUTO, 4
 
 
 MapGroup6:
@@ -180,10 +180,10 @@
 	map_header CinnabarPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, CINNABAR_ISLAND, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header Route19FuchsiaGate, TILESET_GATE, GATE, ROUTE_19, MUSIC_ROUTE_3, 0, PALETTE_DAY, 1
 	map_header SeafoamGym, TILESET_CAVE, INDOOR, SEAFOAM_ISLANDS, MUSIC_GYM, 1, PALETTE_DAY, 1
-	map_header Route19, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_19, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
-	map_header Route20, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_20, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 2
-	map_header Route21, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_21, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 2
-	map_header CinnabarIsland, TILESET_KANTO_OUTSIDE, TOWN, CINNABAR_ISLAND, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 2
+	map_header Route19, TILESET_KANTO, ROUTE, ROUTE_19, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
+	map_header Route20, TILESET_KANTO, ROUTE, ROUTE_20, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 2
+	map_header Route21, TILESET_KANTO, ROUTE, ROUTE_21, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 2
+	map_header CinnabarIsland, TILESET_KANTO, TOWN, CINNABAR_ISLAND, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 2
 
 
 MapGroup7:
@@ -198,12 +198,12 @@
 	map_header Route10PokeCenter2FBeta, TILESET_POKECENTER, INDOOR, ROUTE_10, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header PowerPlant, TILESET_POWER_PLANT, INDOOR, POWER_PLANT, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
 	map_header BillsHouse, TILESET_HOUSE_1, INDOOR, ROUTE_25, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
-	map_header Route4, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_4, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 0
-	map_header Route9, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_9, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
-	map_header Route10North, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_10, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
-	map_header Route24, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_24, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
-	map_header Route25, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_25, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
-	map_header CeruleanCity, TILESET_KANTO_OUTSIDE, TOWN, CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 0
+	map_header Route4, TILESET_KANTO, ROUTE, ROUTE_4, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 0
+	map_header Route9, TILESET_KANTO, ROUTE, ROUTE_9, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
+	map_header Route10North, TILESET_KANTO, ROUTE, ROUTE_10, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
+	map_header Route24, TILESET_KANTO, ROUTE, ROUTE_24, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
+	map_header Route25, TILESET_KANTO, ROUTE, ROUTE_25, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
+	map_header CeruleanCity, TILESET_KANTO, TOWN, CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 0
 
 
 MapGroup8:
@@ -212,8 +212,8 @@
 	map_header AzaleaMart, TILESET_MART, INDOOR, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, 1
 	map_header KurtsHouse, TILESET_KURT_HOUSE, INDOOR, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, 1
 	map_header AzaleaGym, TILESET_GYM_1, INDOOR, AZALEA_TOWN, MUSIC_GYM, 1, PALETTE_DAY, 1
-	map_header Route33, TILESET_JOHTO_OUTSIDE_2, ROUTE, ROUTE_33, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 1
-	map_header AzaleaTown, TILESET_JOHTO_OUTSIDE_2, TOWN, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_AUTO, 1
+	map_header Route33, TILESET_JOHTO_2, ROUTE, ROUTE_33, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 1
+	map_header AzaleaTown, TILESET_JOHTO_2, TOWN, AZALEA_TOWN, MUSIC_AZALEA_TOWN, 0, PALETTE_AUTO, 1
 
 
 MapGroup9:
@@ -221,16 +221,16 @@
 	map_header LakeofRageMagikarpHouse, TILESET_HOUSE_1, INDOOR, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, 1
 	map_header Route43MahoganyGate, TILESET_GATE, GATE, ROUTE_43, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, 1
 	map_header Route43Gate, TILESET_GATE, GATE, ROUTE_43, MUSIC_LAKE_OF_RAGE, 0, PALETTE_DAY, 1
-	map_header Route43, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_43, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 4
-	map_header LakeofRage, TILESET_JOHTO_OUTSIDE_1, TOWN, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 8
+	map_header Route43, TILESET_JOHTO_1, ROUTE, ROUTE_43, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 4
+	map_header LakeofRage, TILESET_JOHTO_1, TOWN, LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, 0, PALETTE_AUTO, 8
 
 
 MapGroup10:
-	map_header Route32, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_32, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 11
-	map_header Route35, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_35, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 4
-	map_header Route36, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_36, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
-	map_header Route37, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_37, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
-	map_header VioletCity, TILESET_JOHTO_OUTSIDE_1, TOWN, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_AUTO, 4
+	map_header Route32, TILESET_JOHTO_1, ROUTE, ROUTE_32, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 11
+	map_header Route35, TILESET_JOHTO_1, ROUTE, ROUTE_35, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 4
+	map_header Route36, TILESET_JOHTO_1, ROUTE, ROUTE_36, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
+	map_header Route37, TILESET_JOHTO_1, ROUTE, ROUTE_37, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
+	map_header VioletCity, TILESET_JOHTO_1, TOWN, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_AUTO, 4
 	map_header VioletMart, TILESET_MART, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, 1
 	map_header VioletGym, TILESET_GYM_1, INDOOR, VIOLET_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header EarlsPokemonAcademy, TILESET_LAB, INDOOR, VIOLET_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, 1
@@ -246,8 +246,8 @@
 
 
 MapGroup11:
-	map_header Route34, TILESET_JOHTO_OUTSIDE_2, ROUTE, ROUTE_34, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
-	map_header GoldenrodCity, TILESET_JOHTO_OUTSIDE_2, TOWN, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_AUTO, 1
+	map_header Route34, TILESET_JOHTO_2, ROUTE, ROUTE_34, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
+	map_header GoldenrodCity, TILESET_JOHTO_2, TOWN, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_AUTO, 1
 	map_header GoldenrodGym, TILESET_GYM_1, INDOOR, GOLDENROD_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header GoldenrodBikeShop, TILESET_OLIVINE_GYM, INDOOR, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, 1
 	map_header GoldenrodHappinessRater, TILESET_HOUSE_1, INDOOR, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, 1
@@ -266,7 +266,7 @@
 	map_header GoldenrodDeptStoreRoof, TILESET_MART, INDOOR, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 0, PALETTE_DAY, 1
 	map_header GoldenrodGameCorner, TILESET_GAME_CORNER, INDOOR, GOLDENROD_CITY, MUSIC_GAME_CORNER, 0, PALETTE_DAY, 1
 	map_header GoldenrodPokeCenter1F, TILESET_POKECENTER, INDOOR, GOLDENROD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
-	map_header GoldenrodPokeComCenter2FMobile, TILESET_GOLDENROD_POKECOM_CENTER_2F_MOBILE, INDOOR, GOLDENROD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
+	map_header GoldenrodPokeComCenter2FMobile, TILESET_POKECOM_CENTER, INDOOR, GOLDENROD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header IlexForestAzaleaGate, TILESET_GATE, GATE, ROUTE_34, MUSIC_ROUTE_36, 0, PALETTE_DAY, 1
 	map_header Route34IlexForestGate, TILESET_GATE, GATE, ROUTE_34, MUSIC_ROUTE_36, 0, PALETTE_DAY, 1
 	map_header DayCare, TILESET_HOUSE_1, INDOOR, ROUTE_34, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, 1
@@ -273,9 +273,9 @@
 
 
 MapGroup12:
-	map_header Route6, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 4
-	map_header Route11, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_11, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 1
-	map_header VermilionCity, TILESET_KANTO_OUTSIDE, TOWN, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_AUTO, 2
+	map_header Route6, TILESET_KANTO, ROUTE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 4
+	map_header Route11, TILESET_KANTO, ROUTE, ROUTE_11, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 1
+	map_header VermilionCity, TILESET_KANTO, TOWN, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_AUTO, 2
 	map_header VermilionHouseFishingSpeechHouse, TILESET_HOUSE_1, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, 1
 	map_header VermilionPokeCenter1F, TILESET_POKECENTER, INDOOR, VERMILION_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header VermilionPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, 1
@@ -289,8 +289,8 @@
 
 
 MapGroup13:
-	map_header Route1, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_1, MUSIC_ROUTE_1, 0, PALETTE_AUTO, 1
-	map_header PalletTown, TILESET_KANTO_OUTSIDE, TOWN, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_AUTO, 2
+	map_header Route1, TILESET_KANTO, ROUTE, ROUTE_1, MUSIC_ROUTE_1, 0, PALETTE_AUTO, 1
+	map_header PalletTown, TILESET_KANTO, TOWN, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_AUTO, 2
 	map_header RedsHouse1F, TILESET_KRISS_HOUSE, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, 1
 	map_header RedsHouse2F, TILESET_KRISS_HOUSE, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, 1
 	map_header BluesHouse, TILESET_HOUSE_1, INDOOR, PALLET_TOWN, MUSIC_PALLET_TOWN, 0, PALETTE_DAY, 1
@@ -298,8 +298,8 @@
 
 
 MapGroup14:
-	map_header Route3, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_3, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
-	map_header PewterCity, TILESET_KANTO_OUTSIDE, TOWN, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 1
+	map_header Route3, TILESET_KANTO, ROUTE, ROUTE_3, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
+	map_header PewterCity, TILESET_KANTO, TOWN, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 1
 	map_header PewterNidoranSpeechHouse, TILESET_HOUSE_1, INDOOR, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
 	map_header PewterGym, TILESET_SPROUT_TOWER, INDOOR, PEWTER_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header PewterMart, TILESET_MART, INDOOR, PEWTER_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
@@ -318,13 +318,13 @@
 	map_header FastShipB1F, TILESET_LIGHTHOUSE, INDOOR, FAST_SHIP, MUSIC_SS_AQUA, 0, PALETTE_DAY, 1
 	map_header OlivinePortPassage, TILESET_UNDERGROUND, INDOOR, OLIVINE_CITY, MUSIC_VIOLET_CITY, 0, PALETTE_DAY, 1
 	map_header VermilionPortPassage, TILESET_UNDERGROUND, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, 1
-	map_header MountMoonSquare, TILESET_KANTO_OUTSIDE, ROUTE, MT_MOON, MUSIC_MT_MOON_SQUARE, 0, PALETTE_AUTO, 1
+	map_header MountMoonSquare, TILESET_KANTO, ROUTE, MT_MOON, MUSIC_MT_MOON_SQUARE, 0, PALETTE_AUTO, 1
 	map_header MountMoonGiftShop, TILESET_KURT_HOUSE, INDOOR, MT_MOON, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
 	map_header TinTowerRoof, TILESET_SPROUT_TOWER, ROUTE, TIN_TOWER, MUSIC_TIN_TOWER, 0, PALETTE_AUTO, 1
 
 
 MapGroup16:
-	map_header Route23, TILESET_KANTO_OUTSIDE, TOWN, ROUTE_23, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, 1
+	map_header Route23, TILESET_KANTO, TOWN, ROUTE_23, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, 1
 	map_header IndigoPlateauPokeCenter1F, TILESET_POKECENTER, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 0, PALETTE_DAY, 1
 	map_header WillsRoom, TILESET_GYM_1, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 1, PALETTE_DAY, 1
 	map_header KogasRoom, TILESET_GYM_1, INDOOR, INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, 1, PALETTE_DAY, 1
@@ -335,11 +335,11 @@
 
 
 MapGroup17:
-	map_header Route13, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_13, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 13
-	map_header Route14, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_14, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 1
-	map_header Route15, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_15, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 1
-	map_header Route18, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_18, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
-	map_header FuchsiaCity, TILESET_KANTO_OUTSIDE, TOWN, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_AUTO, 8
+	map_header Route13, TILESET_KANTO, ROUTE, ROUTE_13, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 13
+	map_header Route14, TILESET_KANTO, ROUTE, ROUTE_14, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 1
+	map_header Route15, TILESET_KANTO, ROUTE, ROUTE_15, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 1
+	map_header Route18, TILESET_KANTO, ROUTE, ROUTE_18, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
+	map_header FuchsiaCity, TILESET_KANTO, TOWN, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_AUTO, 8
 	map_header FuchsiaMart, TILESET_MART, INDOOR, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, 1
 	map_header SafariZoneMainOffice, TILESET_GAME_CORNER, INDOOR, FUCHSIA_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, 1
 	map_header FuchsiaGym, TILESET_LAB, INDOOR, FUCHSIA_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
@@ -351,10 +351,10 @@
 
 
 MapGroup18:
-	map_header Route8, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_8, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
-	map_header Route12, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_12, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 13
-	map_header Route10South, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_10, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
-	map_header LavenderTown, TILESET_KANTO_OUTSIDE, TOWN, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_AUTO, 1
+	map_header Route8, TILESET_KANTO, ROUTE, ROUTE_8, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
+	map_header Route12, TILESET_KANTO, ROUTE, ROUTE_12, MUSIC_ROUTE_12, 0, PALETTE_AUTO, 13
+	map_header Route10South, TILESET_KANTO, ROUTE, ROUTE_10, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 3
+	map_header LavenderTown, TILESET_KANTO, TOWN, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_AUTO, 1
 	map_header LavenderPokeCenter1F, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header LavenderPokeCenter2FBeta, TILESET_POKECENTER, INDOOR, LAVENDER_TOWN, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header MrFujisHouse, TILESET_HOUSE_1, INDOOR, LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, 0, PALETTE_DAY, 1
@@ -368,8 +368,8 @@
 
 
 MapGroup19:
-	map_header Route28, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_28, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, 4
-	map_header SilverCaveOutside, TILESET_KANTO_OUTSIDE, TOWN, SILVER_CAVE, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, 4
+	map_header Route28, TILESET_KANTO, ROUTE, ROUTE_28, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, 4
+	map_header SilverCaveOutside, TILESET_KANTO, TOWN, SILVER_CAVE, MUSIC_INDIGO_PLATEAU, 0, PALETTE_AUTO, 4
 	map_header SilverCavePokeCenter1F, TILESET_POKECENTER, INDOOR, SILVER_CAVE, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header Route28FamousSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_28, MUSIC_AZALEA_TOWN, 0, PALETTE_DAY, 1
 
@@ -384,10 +384,10 @@
 
 
 MapGroup21:
-	map_header Route7, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_7, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
-	map_header Route16, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_16, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
-	map_header Route17, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_17, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 0
-	map_header CeladonCity, TILESET_KANTO_OUTSIDE, TOWN, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_AUTO, 0
+	map_header Route7, TILESET_KANTO, ROUTE, ROUTE_7, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
+	map_header Route16, TILESET_KANTO, ROUTE, ROUTE_16, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
+	map_header Route17, TILESET_KANTO, ROUTE, ROUTE_17, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 0
+	map_header CeladonCity, TILESET_KANTO, TOWN, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_AUTO, 0
 	map_header CeladonDeptStore1F, TILESET_MART, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, 1
 	map_header CeladonDeptStore2F, TILESET_MART, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, 1
 	map_header CeladonDeptStore3F, TILESET_MART, INDOOR, CELADON_CITY, MUSIC_CELADON_CITY, 0, PALETTE_DAY, 1
@@ -413,9 +413,9 @@
 
 
 MapGroup22:
-	map_header Route40, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_40, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
-	map_header Route41, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_41, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 2
-	map_header CianwoodCity, TILESET_JOHTO_OUTSIDE_1, TOWN, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_AUTO, 1
+	map_header Route40, TILESET_JOHTO_1, ROUTE, ROUTE_40, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 1
+	map_header Route41, TILESET_JOHTO_1, ROUTE, ROUTE_41, MUSIC_ROUTE_36, 0, PALETTE_AUTO, 2
+	map_header CianwoodCity, TILESET_JOHTO_1, TOWN, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_AUTO, 1
 	map_header ManiasHouse, TILESET_HOUSE_1, INDOOR, CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, 0, PALETTE_DAY, 1
 	map_header CianwoodGym, TILESET_SPROUT_TOWER, INDOOR, CIANWOOD_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header CianwoodPokeCenter1F, TILESET_POKECENTER, INDOOR, CIANWOOD_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
@@ -432,9 +432,9 @@
 
 
 MapGroup23:
-	map_header Route2, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_2, MUSIC_ROUTE_2, 0, PALETTE_AUTO, 1
-	map_header Route22, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_22, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 4
-	map_header ViridianCity, TILESET_KANTO_OUTSIDE, TOWN, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 4
+	map_header Route2, TILESET_KANTO, ROUTE, ROUTE_2, MUSIC_ROUTE_2, 0, PALETTE_AUTO, 1
+	map_header Route22, TILESET_KANTO, ROUTE, ROUTE_22, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 4
+	map_header ViridianCity, TILESET_KANTO, TOWN, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 4
 	map_header ViridianGym, TILESET_TRAIN_STATION, INDOOR, VIRIDIAN_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header ViridianNicknameSpeechHouse, TILESET_HOUSE_1, INDOOR, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
 	map_header TrainerHouse1F, TILESET_HOUSE_1, INDOOR, VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
@@ -448,10 +448,10 @@
 
 
 MapGroup24:
-	map_header Route26, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_26, MUSIC_ROUTE_26, 0, PALETTE_AUTO, 2
-	map_header Route27, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_27, MUSIC_ROUTE_26, 0, PALETTE_AUTO, 2
-	map_header Route29, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_29, MUSIC_ROUTE_29, 0, PALETTE_AUTO, 1
-	map_header NewBarkTown, TILESET_JOHTO_OUTSIDE_1, TOWN, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_AUTO, 2
+	map_header Route26, TILESET_JOHTO_1, ROUTE, ROUTE_26, MUSIC_ROUTE_26, 0, PALETTE_AUTO, 2
+	map_header Route27, TILESET_JOHTO_1, ROUTE, ROUTE_27, MUSIC_ROUTE_26, 0, PALETTE_AUTO, 2
+	map_header Route29, TILESET_JOHTO_1, ROUTE, ROUTE_29, MUSIC_ROUTE_29, 0, PALETTE_AUTO, 1
+	map_header NewBarkTown, TILESET_JOHTO_1, TOWN, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_AUTO, 2
 	map_header ElmsLab, TILESET_LAB, INDOOR, NEW_BARK_TOWN, MUSIC_PROF_ELM, 0, PALETTE_DAY, 1
 	map_header KrissHouse1F, TILESET_KRISS_HOUSE, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, 1
 	map_header KrissHouse2F, TILESET_KRISS_HOUSE_2F, INDOOR, NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, 0, PALETTE_DAY, 1
@@ -464,8 +464,8 @@
 
 
 MapGroup25:
-	map_header Route5, TILESET_KANTO_OUTSIDE, ROUTE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
-	map_header SaffronCity, TILESET_KANTO_OUTSIDE, TOWN, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 1
+	map_header Route5, TILESET_KANTO, ROUTE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_AUTO, 1
+	map_header SaffronCity, TILESET_KANTO, TOWN, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_AUTO, 1
 	map_header FightingDojo, TILESET_TRAIN_STATION, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
 	map_header SaffronGym, TILESET_UNDERGROUND, INDOOR, SAFFRON_CITY, MUSIC_GYM, 1, PALETTE_DAY, 1
 	map_header SaffronMart, TILESET_MART, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, 1
@@ -482,9 +482,9 @@
 
 
 MapGroup26:
-	map_header Route30, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_30, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 4
-	map_header Route31, TILESET_JOHTO_OUTSIDE_1, ROUTE, ROUTE_31, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 4
-	map_header CherrygroveCity, TILESET_JOHTO_OUTSIDE_1, TOWN, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_AUTO, 1
+	map_header Route30, TILESET_JOHTO_1, ROUTE, ROUTE_30, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 4
+	map_header Route31, TILESET_JOHTO_1, ROUTE, ROUTE_31, MUSIC_ROUTE_30, 0, PALETTE_AUTO, 4
+	map_header CherrygroveCity, TILESET_JOHTO_1, TOWN, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_AUTO, 1
 	map_header CherrygroveMart, TILESET_MART, INDOOR, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_DAY, 1
 	map_header CherrygrovePokeCenter1F, TILESET_POKECENTER, INDOOR, CHERRYGROVE_CITY, MUSIC_POKEMON_CENTER, 0, PALETTE_DAY, 1
 	map_header CherrygroveGymSpeechHouse, TILESET_HOUSE_1, INDOOR, CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, 0, PALETTE_DAY, 1
--- a/predef/cgb.asm
+++ b/predef/cgb.asm
@@ -34,40 +34,40 @@
 ; 8d7a
 
 .jumptable: ; 8d7a
-	dw Function8db8
-	dw Function8ddb
-	dw Function8eb9
-	dw Function8edb
-	dw Function8f70
-	dw Function906e
-	dw Function90f8
-	dw Function9122
-	dw Function91ad
-	dw Function91c8
-	dw Function91d1
-	dw Function91e4
-	dw Function9228
-	dw Function9251
-	dw Function9373
-	dw Function93a6
-	dw Function93ba
-	dw Function9195
-	dw Function9499
-	dw Function94d0
-	dw Function93d3
-	dw Function9289
-	dw Function903e
-	dw Function8fca
-	dw Function925e
-	dw Function94fa
-	dw Function9529
-	dw Function9555
-	dw Function9578
-	dw Function9591
-	dw Function9542
+	dw _CGB00
+	dw _CGB01
+	dw _CGB02
+	dw _CGB03
+	dw _CGB04
+	dw _CGB05
+	dw _CGB06
+	dw _CGB07
+	dw _CGB08
+	dw _CGB09
+	dw _CGB0a
+	dw _CGB0b
+	dw _CGB0c
+	dw _CGB0d
+	dw _CGB0e
+	dw _CGB0f
+	dw _CGB10
+	dw _CGB11
+	dw _CGB12
+	dw _CGB13
+	dw _CGB14
+	dw _CGB15
+	dw _CGB16
+	dw _CGB17
+	dw _CGB18
+	dw _CGB19
+	dw _CGB1a
+	dw _CGB1b
+	dw _CGB1c
+	dw _CGB1d
+	dw _CGB1e
 ; 8db8
 
-Function8db8: ; 8db8
+_CGB00: ; 8db8
 	ld hl, PalPacket_9c66 + 1
 	ld de, wMapPals
 	ld c, $4
@@ -82,7 +82,7 @@
 	call CopyPalettes
 	jr Function8e23
 
-Function8ddb: ; 8ddb
+_CGB01: ; 8ddb
 	ld de, wMapPals
 	call Function9729
 	push hl
@@ -126,25 +126,25 @@
 	ld a, $2
 	call ByteFill
 	hlcoord 0, 4, AttrMap
-	ld bc, $080a
+	lb bc, 8, 10
 	ld a, $0
-	call Function9663
+	call FillBoxCGB
 	hlcoord 10, 0, AttrMap
-	ld bc, $070a
+	lb bc, 7, 10
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 0, AttrMap
-	ld bc, $040a
+	lb bc, 4, 10
 	ld a, $2
-	call Function9663
+	call FillBoxCGB
 	hlcoord 10, 7, AttrMap
-	ld bc, $050a
+	lb bc, 5, 10
 	ld a, $3
-	call Function9663
+	call FillBoxCGB
 	hlcoord 10, 11, AttrMap
-	ld bc, $0109
+	lb bc, 1, 9
 	ld a, $4
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 12, AttrMap
 	ld bc, $0078
 	ld a, $7
@@ -189,7 +189,7 @@
 	ret
 ; 8eb9
 
-Function8eb9: ; 8eb9
+_CGB02: ; 8eb9
 	ld a, [PlayerGender]
 	bit 0, a
 	jr z, .asm_8ec5
@@ -210,7 +210,7 @@
 	ret
 ; 8edb
 
-Function8edb: ; 8edb
+_CGB03: ; 8edb
 	ld de, wMapPals
 	ld a, [wcda1]
 	ld l, a
@@ -234,25 +234,25 @@
 	call FarCopyWRAM
 	call Function9699
 	hlcoord 0, 0, AttrMap
-	ld bc, $0814
+	lb bc, 8, SCREEN_WIDTH
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 10, 16, AttrMap
 	ld bc, $000a
 	ld a, $2
 	call ByteFill
 	hlcoord 13, 5, AttrMap
-	ld bc, $0202
+	lb bc, 2, 2
 	ld a, $3
-	call Function9663
+	call FillBoxCGB
 	hlcoord 15, 5, AttrMap
-	ld bc, $0202
+	lb bc, 2, 2
 	ld a, $4
-	call Function9663
+	call FillBoxCGB
 	hlcoord 17, 5, AttrMap
-	ld bc, $0202
+	lb bc, 2, 2
 	ld a, $5
-	call Function9663
+	call FillBoxCGB
 	call Function96b3
 	call Function96a4
 	ld a, $1
@@ -285,7 +285,7 @@
 	RGB 17, 31, 31
 ; 8f70
 
-Function8f70: ; 8f70
+_CGB04: ; 8f70
 	ld de, wMapPals
 	ld a, $1d
 	call GetAthPalletFromPalettes9df6
@@ -304,9 +304,9 @@
 .asm_8f90
 	call Function9699
 	hlcoord 1, 1, AttrMap
-	ld bc, $0707
+	lb bc, 7, 7
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function971a
 	ld hl, Palette8fc2
 	ld de, Unkn2Pals + $38
@@ -333,7 +333,7 @@
 	RGB 00, 00, 00
 ; 8fca
 
-Function8fca: ; 8fca
+_CGB17: ; 8fca
 	ld de, wMapPals
 	ld a, $1d
 	call GetAthPalletFromPalettes9df6
@@ -353,9 +353,9 @@
 .asm_8fed
 	call Function9699
 	hlcoord 1, 4, AttrMap
-	ld bc, $0707
+	lb bc, 7, 7
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function971a
 	call Function96b3
 	call Function96a4
@@ -376,9 +376,9 @@
 .asm_901a
 	call Function9699
 	hlcoord 1, 1, AttrMap
-	ld bc, $0707
+	lb bc, 7, 7
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function971a
 	call Function96b3
 	call Function96a4
@@ -394,7 +394,7 @@
 	RGB 00, 00, 00
 ; 903e
 
-Function903e: ; 903e
+_CGB16: ; 903e
 	ld de, wMapPals
 	ld a, $1d
 	call GetAthPalletFromPalettes9df6
@@ -404,9 +404,9 @@
 	call Function9643
 	call Function9699
 	hlcoord 7, 5, AttrMap
-	ld bc, $0707
+	lb bc, 7, 7
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function971a
 	call Function96b3
 	call Function96a4
@@ -415,7 +415,7 @@
 	ret
 ; 906e
 
-Function906e: ; 906e
+_CGB05: ; 906e
 	ld hl, Palettes_b7a9
 	ld de, wMapPals
 	ld bc, $0080
@@ -423,41 +423,41 @@
 	call FarCopyWRAM
 	call Function9699
 	hlcoord 0, 2, AttrMap
-	ld bc, $0a03
+	lb bc, 10, 3
 	ld a, $2
-	call Function9663
+	call FillBoxCGB
 	hlcoord 17, 2, AttrMap
-	ld bc, $0a03
+	lb bc, 10, 3
 	ld a, $2
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 4, AttrMap
-	ld bc, $0603
+	lb bc, 6, 3
 	ld a, $3
-	call Function9663
+	call FillBoxCGB
 	hlcoord 17, 4, AttrMap
-	ld bc, $0603
+	lb bc, 6, 3
 	ld a, $3
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 6, AttrMap
-	ld bc, $0203
+	lb bc, 2, 3
 	ld a, $4
-	call Function9663
+	call FillBoxCGB
 	hlcoord 17, 6, AttrMap
-	ld bc, $0203
+	lb bc, 2, 3
 	ld a, $4
-	call Function9663
+	call FillBoxCGB
 	hlcoord 4, 2, AttrMap
-	ld bc, $020c
+	lb bc, 2, 12
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 3, 2, AttrMap
-	ld bc, $0a01
+	lb bc, 10, 1
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 16, 2, AttrMap
-	ld bc, $0a01
+	lb bc, 10, 1
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 12, AttrMap
 	ld bc, $0078
 	ld a, $7
@@ -469,7 +469,7 @@
 	ret
 ; 90f8
 
-Function90f8: ; 90f8
+_CGB06: ; 90f8
 	ld hl, PalPacket_9ca6 + 1
 	call CopyFourPalettes
 	call Function9699
@@ -478,9 +478,9 @@
 	call GetAthPalletFromPalettes9df6
 	call LoadHLPaletteIntoDE
 	hlcoord 0, 6, AttrMap
-	ld bc, $0c14
+	lb bc, 12, SCREEN_WIDTH
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function96b3
 	call Function96a4
 	ld a, $1
@@ -488,7 +488,7 @@
 	ret
 ; 9122
 
-Function9122: ; 9122
+_CGB07: ; 9122
 	ld b, 0
 	ld hl, Jumptable_912d
 rept 2
@@ -561,7 +561,7 @@
 	ret
 ; 9195
 
-Function9195: ; 9195
+_CGB11: ; 9195
 	ld hl, Palettes_b789
 	ld de, wMapPals
 	ld bc, $0028
@@ -573,7 +573,7 @@
 	ret
 ; 91ad
 
-Function91ad: ; 91ad
+_CGB08: ; 91ad
 	ld hl, Palettes_b641
 	ld de, wMapPals
 	ld bc, $0080
@@ -586,7 +586,7 @@
 	ret
 ; 91c8
 
-Function91c8: ; 91c8
+_CGB09: ; 91c8
 	call Functionb1de
 	ld a, $9
 	ld [SGBPredef], a
@@ -593,7 +593,7 @@
 	ret
 ; 91d1
 
-Function91d1: ; 91d1
+_CGB0a: ; 91d1
 	ld hl, PalPacket_9c56 + 1
 	call CopyFourPalettes
 	call Function8e9f
@@ -603,7 +603,7 @@
 	ret
 ; 91e4
 
-Function91e4: ; 91e4
+_CGB0b: ; 91e4
 	ld de, wMapPals
 	ld a, c
 	and a
@@ -638,7 +638,7 @@
 	ret
 ; 9228
 
-Function9228: ; 9228
+_CGB0c: ; 9228
 	ld hl, Palettes_b6f1
 	ld de, wMapPals
 	ld bc, $0028
@@ -657,7 +657,7 @@
 	ret
 ; 9251
 
-Function9251: ; 9251
+_CGB0d: ; 9251
 	ld hl, PalPacket_9cb6 + 1
 	call CopyFourPalettes
 	call Function9699
@@ -665,7 +665,7 @@
 	ret
 ; 925e
 
-Function925e: ; 925e
+_CGB18: ; 925e
 	ld hl, PalPacket_9bc6 + 1
 	call CopyFourPalettes
 	ld de, Unkn2Pals
@@ -688,7 +688,7 @@
 	ret
 ; 9289
 
-Function9289: ; 9289
+_CGB15: ; 9289
 	ld de, wMapPals
 	xor a
 	call Function976b
@@ -728,7 +728,7 @@
 .asm_92e3
 	call ByteFill
 	hlcoord 14, 1, AttrMap
-	ld bc, $0705
+	lb bc, 7, 5
 	ld a, [PlayerGender]
 	and a
 	ld a, $0
@@ -736,45 +736,45 @@
 	ld a, $1
 
 .asm_92f6
-	call Function9663
+	call FillBoxCGB
 	hlcoord 18, 1, AttrMap
 	ld [hl], $1
 	hlcoord 2, 11, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 6, 11, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $2
-	call Function9663
+	call FillBoxCGB
 	hlcoord 10, 11, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $3
-	call Function9663
+	call FillBoxCGB
 	hlcoord 14, 11, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $4
-	call Function9663
+	call FillBoxCGB
 	hlcoord 2, 14, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $5
-	call Function9663
+	call FillBoxCGB
 	hlcoord 6, 14, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $6
-	call Function9663
+	call FillBoxCGB
 	hlcoord 10, 14, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $7
-	call Function9663
+	call FillBoxCGB
 	ld a, [PlayerGender]
 	and a
 	push af
 	jr z, .asm_935d
 	hlcoord 14, 14, AttrMap
-	ld bc, $0204
+	lb bc, 2, 4
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 
 .asm_935d
 	pop af
@@ -793,7 +793,7 @@
 	ret
 ; 9373
 
-Function9373: ; 9373
+_CGB0e: ; 9373
 	ld de, wMapPals
 	ld a, $10
 	call GetAthPalletFromPalettes9df6
@@ -809,9 +809,9 @@
 	call Function9643
 	call Function9699
 	hlcoord 11, 1, AttrMap
-	ld bc, $0209
+	lb bc, 2, 9
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function96b3
 	call Function96a4
 	ld a, $1
@@ -819,7 +819,7 @@
 	ret
 ; 93a6
 
-Function93a6: ; 93a6
+_CGB0f: ; 93a6
 	ld hl, PalPacket_9c46 + 1
 	call CopyFourPalettes
 	call Function9699
@@ -830,7 +830,7 @@
 	ret
 ; 93ba
 
-Function93ba: ; 93ba
+_CGB10: ; 93ba
 	ld de, wMapPals
 	ld a, $1d
 	call GetAthPalletFromPalettes9df6
@@ -843,7 +843,7 @@
 	ret
 ; 93d3
 
-Function93d3: ; 93d3
+_CGB14: ; 93d3
 	ld a, [BattleType]
 	cp BATTLETYPE_TUTORIAL
 	jr z, .asm_93e6
@@ -865,25 +865,25 @@
 	call FarCopyWRAM
 	call Function9699
 	hlcoord 0, 0, AttrMap
-	ld bc, $010a
+	lb bc, 1, 10
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 10, 0, AttrMap
-	ld bc, $010a
+	lb bc, 1, 10
 	ld a, $2
-	call Function9663
+	call FillBoxCGB
 	hlcoord 7, 2, AttrMap
-	ld bc, $0901
+	lb bc, 9, 1
 	ld a, $3
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 7, AttrMap
-	ld bc, $0305
+	lb bc, 3, 5
 	ld a, $4
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 3, AttrMap
-	ld bc, $0305
+	lb bc, 3, 5
 	ld a, $5
-	call Function9663
+	call FillBoxCGB
 	call Function96b3
 	call Function96a4
 	ld a, $1
@@ -945,8 +945,8 @@
 	RGB 00, 00, 00
 ; 9499
 
-Function9499: ; 9499
-	call Function91c8
+_CGB12: ; 9499
+	call _CGB09
 	ld de, $0014
 	hlcoord 0, 0, AttrMap
 	ld a, [wMenuBorderTopCoord]
@@ -975,23 +975,23 @@
 	inc a
 	ld c, a
 	ld a, $0
-	call Function9663
+	call FillBoxCGB
 	call Function96b3
 	ret
 ; 94d0
 
-Function94d0: ; 94d0
+_CGB13: ; 94d0
 	ld hl, PalPacket_9ba6 + 1
 	call CopyFourPalettes
 	call Function9699
 	hlcoord 0, 4, AttrMap
-	ld bc, $0a14
+	lb bc, 10, SCREEN_WIDTH
 	ld a, $2
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 6, AttrMap
-	ld bc, $0614
+	lb bc, 6, SCREEN_WIDTH
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function96b3
 	call Function96a4
 	ld a, $1
@@ -999,7 +999,7 @@
 	ret
 ; 94fa
 
-Function94fa: ; 94fa
+_CGB19: ; 94fa
 	ld de, wMapPals
 	ld a, $4e
 	call GetAthPalletFromPalettes9df6
@@ -1023,7 +1023,7 @@
 	RGB 00, 00, 00
 ; 9529
 
-Function9529: ; 9529
+_CGB1a: ; 9529
 	ld de, wMapPals
 	ld a, [CurPartySpecies]
 	ld bc, TempMonDVs
@@ -1035,7 +1035,7 @@
 	ret
 ; 9542
 
-Function9542: ; 9542
+_CGB1e: ; 9542
 	ld de, wMapPals
 	ld a, [CurPartySpecies]
 	call Function9775
@@ -1045,7 +1045,7 @@
 	ret
 ; 9555
 
-Function9555: ; 9555
+_CGB1b: ; 9555
 	ld hl, PalPacket_9cc6 + 1
 	call CopyFourPalettes
 	ld hl, Palettes_b681
@@ -1061,7 +1061,7 @@
 	ret
 ; 9578
 
-Function9578: ; 9578
+_CGB1c: ; 9578
 	ld de, wMapPals
 	ld a, [CurPartySpecies]
 	ld bc, TempMonDVs
@@ -1073,7 +1073,7 @@
 	ret
 ; 9591
 
-Function9591: ; 9591
+_CGB1d: ; 9591
 	ld hl, Palette95e0
 	ld de, wMapPals
 	ld bc, $0010
@@ -1082,25 +1082,25 @@
 	call Function96a4
 	call Function9699
 	hlcoord 3, 7, AttrMap
-	ld bc, $080e
+	lb bc, 8, 14
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 1, 5, AttrMap
-	ld bc, $0112
+	lb bc, 1, 18
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 1, 16, AttrMap
-	ld bc, $0112
+	lb bc, 1, 18
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 0, 0, AttrMap
-	ld bc, $1102
+	lb bc, 17, 2
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	hlcoord 18, 5, AttrMap
-	ld bc, $0c01
+	lb bc, 12, 1
 	ld a, $1
-	call Function9663
+	call FillBoxCGB
 	call Function96b3
 	ret
 ; 95e0
--- a/predef/sgb.asm
+++ b/predef/sgb.asm
@@ -33,12 +33,12 @@
 	dw .SGB05
 	dw .SGB06
 	dw .SGB07
-	dw .SGB08_1d
+	dw .SGB08
 	dw .SGB09
 	dw .SGB0a
 	dw .SGB0b
 	dw .SGB0c
-	dw .SGB0d_15
+	dw .SGB0d
 	dw .SGB0e
 	dw .SGB0f
 	dw .SGB10
@@ -46,7 +46,7 @@
 	dw .SGB12
 	dw .SGB13
 	dw .SGB14
-	dw .SGB0d_15
+	dw .SGB15
 	dw .SGB16
 	dw .SGB17
 	dw .SGB18
@@ -54,7 +54,7 @@
 	dw .SGB1a
 	dw .SGB1b
 	dw .SGB1c
-	dw .SGB08_1d
+	dw .SGB1d
 	dw .SGB1e
 ; 86ad
 
@@ -67,10 +67,12 @@
 .SGB01: ; 86b4
 	ld hl, BlkPacket_9aa6
 	call Function9809
+
 	ld hl, PalPacket_9ce6
 	ld de, wcda9
 	ld bc, $0010
 	call CopyBytes
+
 	ld a, [PlayerHPPal]
 	ld l, a
 	ld h, 0
@@ -79,6 +81,7 @@
 endr
 	ld de, Palettes_a8be
 	add hl, de
+
 	ld a, [hli]
 	ld [wcda9 + 3], a
 	ld a, [hli]
@@ -87,6 +90,7 @@
 	ld [wcda9 + 5], a
 	ld a, [hl]
 	ld [wcda9 + 6], a
+
 	ld a, [EnemyHPPal]
 	ld l, a
 	ld h, $0
@@ -93,6 +97,7 @@
 rept 2
 	add hl, hl
 endr
+
 	ld de, Palettes_a8be
 	add hl, de
 	ld a, [hli]
@@ -103,11 +108,14 @@
 	ld [wcda9 + 11], a
 	ld a, [hl]
 	ld [wcda9 + 12], a
+
 	ld hl, PalPacket_9cf6
 	ld de, wcda9 + $10
 	ld bc, $0010
 	call CopyBytes
+
 	call Function9729
+
 	ld a, [hli]
 	ld [wcda9 + $13], a
 	ld a, [hli]
@@ -125,6 +133,7 @@
 	ld [wcda9 + $1b], a
 	ld a, [hl]
 	ld [wcda9 + $1c], a
+
 	ld hl, wcda9
 	ld de, wcda9 + $10
 	ld a, $1
@@ -137,11 +146,13 @@
 	ld de, wcda9
 	ld bc, $0010
 	call CopyBytes
+
 	ld hl, wcda9 + 1
 	ld [hl], $10
 rept 2
 	inc hl
 endr
+
 	ld a, [PlayerHPPal]
 	add $2f
 	ld [hl], a
@@ -298,7 +309,8 @@
 	ret
 ; 8860
 
-.SGB08_1d: ; 8860
+.SGB08:
+.SGB1d: ; 8860
 	ld hl, PalPacket_9cb6
 	ld de, BlkPacket_9a86
 	ret
@@ -414,7 +426,8 @@
 	ret
 ; 891a
 
-.SGB0d_15: ; 891a
+.SGB0d:
+.SGB15: ; 891a
 	ld hl, PalPacket_9cb6
 	ld de, BlkPacket_9a86
 	ret
--- a/wram.asm
+++ b/wram.asm
@@ -357,7 +357,7 @@
 
 	ds 1
 
-SECTION "PARTY ICONS", WRAM0 [$c300]
+SECTION "c300", WRAM0 [$c300]
 ; wc300 - wc313 is a 10x2 dictionary.
 wDict_c300:: ds 10 * 2
 	ds wDict_c300 - @
@@ -392,9 +392,10 @@
 wc374:: ds 16 ; c374
 wc384:: ds 16 ; c384
 wc394:: ds 16 ; c394
-wc3a4:: ds 8  ; c3a4
-wc3ac:: ds 8  ; c3ac
+wc3a4:: ds 16 ; c3a4
 ; wPartyMonMenuIconAnimsEnd::
+	ds -8
+wc3ac:: ds 8 ; c3ac
 wc3b4:: ds 1 ; something to do with wc314
 wc3b5:: ds 1
 
@@ -411,6 +412,8 @@
 wc3be:: ds 1
 wc3bf:: ds 1
 wc3c0:: ds 1
+; wc300_data_end
+
 wc3c1:: ds 11
 wc3cc:: ds 1
 wc3cd:: ds 31
@@ -672,6 +675,7 @@
 PlayerSAtkLevel:: ; c6cf
 	ds 1
 wc6d0::
+wPokedexDataStart::
 PlayerSDefLevel:: ; c6d0
 	ds 1
 wc6d1::
@@ -906,8 +910,8 @@
 wc7d1:: ds 1
 wc7d2:: ds 1
 wc7d3:: ds 1
-wc7d4:: ds 1
-wc7d5:: ds 1
+wc7d4:: ds 1 ; Index of the topmost visible item in a scrolling menu
+wc7d5:: ds 1 ; Which row the cursor is at in a scrolling menu (0-6)
 wc7d6:: ds 1
 wc7d7:: ds 1
 wc7d8:: ds 1
@@ -925,8 +929,14 @@
 wc7e4:: ds 1
 IF DEF(CRYSTAL11)
 wPokedexStatus::
+ELSE
+wPokedexDataEnd::
 ENDC
-	ds 3
+	ds 1
+IF DEF(CRYSTAL11)
+wPokedexDataEnd::
+ENDC
+	ds 2
 
 wMiscEnd::
 
@@ -1694,11 +1704,14 @@
 
 wd14c:: ds 1 ; used in FollowNotExact
 wd14d:: ds 1 ; used in FollowNotExact
+; Player movement
 wd14e:: ds 1
 wd14f:: ds 1
 wd150:: ds 1
 wd151:: ds 1
+wBGMapAnchorLo::
 wd152:: ds 1
+wBGMapAnchorHi::
 wd153:: ds 1
 
 UsedSprites:: ds 64
@@ -2174,8 +2187,8 @@
 \1Action:: ds 1
 \1Object12:: ds 1
 \1Facing:: ds 1
-\1StandingTile:: ds 1
-\1NextTile:: ds 1
+\1StandingTile:: ds 1 ; collision
+\1NextTile:: ds 1     ; collision
 \1MapX:: ds 1
 \1MapY:: ds 1
 \1NextMapX:: ds 1
@@ -2262,17 +2275,31 @@
 wSecretID:: ds 1
 wd84b:: ds 1
 StatusFlags:: ; d84c
+	; 0 - pokedex
+	; 1 - unown dex
+	; 2 - 
+	; 3 - pokerus
+	; 4 - rocket signal
+	; 5 - wild encounters on/off
+	; 6 - hall of fame
+	; 7 - bug contest on
 	ds 1
 StatusFlags2:: ; d84d
+	; 0 - rockets
+	; 1 - 
+	; 2 - bug contest timer
+	; 3 - 
+	; 4 - bike shop call
+	; 5 - pokerus
+	; 6 - berry juice?
+	; 7 - rockets in mahogany
 	ds 1
 
 Money:: ; d84e
 	ds 3
 
-wd851::
 wMomsMoney:: ; d851
 	ds 3
-wBankOfMomMode::
 wMomSavingMoney:: ; d854
 	ds 1