shithub: pokecrystal

Download patch

ref: 06673cbee76630f4049da1ce763d27d4eb967432
parent: d9300a9becc9aa699b7191f87d8b493a93139ba2
author: PikalaxALT <PikalaxALT@gmail.com>
date: Mon Jul 20 14:59:26 EDT 2015

Named more specials, fixed a missing EOL

--- a/engine/color.asm
+++ b/engine/color.asm
@@ -1944,7 +1944,7 @@
 	callba Function494ac
 	jr c, .asm_b230
 
-	ld a, [wd19a]
+	ld a, [wRoofPalette]
 	and 7
 	ld e, a
 	ld d, 0
@@ -2009,7 +2009,7 @@
 	ld a, $5 ; BANK(Unkn2Pals)
 	call FarCopyWRAM
 
-	ld a, [wd19a]
+	ld a, [wRoofPalette]
 	cp 1
 	jr z, .asm_b253
 	cp 2
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -146,7 +146,7 @@
 	ld hl, StatusFlags
 	bit 5, [hl]
 	jr nz, .asm_97d21
-	ld a, [wd19a]
+	ld a, [wRoofPalette]
 	cp $4
 	jr z, .asm_97d17
 	cp $7
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -393,7 +393,7 @@
 	jr c, .ok
 	ret
 .ok
-	call Functione4a
+	call Special_ReplaceKrisSprite
 	ret
 
 Function1550c: ; 1550c (5:550c)
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -105,4 +105,4 @@
 	add_predef Functiond0669 ; $48
 	add_predef Functiond066e
 	dbw $ff, Function2d43 ; ????
-; 864c
\ No newline at end of file
+; 864c
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -46,38 +46,38 @@
 	add_special ContestReturnMons
 	add_special Special_GiveParkBalls
 	add_special Special_CheckMagikarpLength
-	add_special Functionfbcd2
+	add_special Special_MagikarpHouseSign
 	add_special HealParty
 	add_special PokemonCenterPC
-	add_special Functionc2e7
-	add_special Function166d6
-	add_special Function1672a
-	add_special Function16936
+	add_special Special_KrissHousePC
+	add_special Special_DayCareMan
+	add_special Special_DayCareLady
+	add_special Special_DayCareManOutside
 	add_special MoveDeletion
-	add_special Function16218
-	add_special Function8cc04
+	add_special Special_BankOfMom
+	add_special Special_MagnetTrain
 	add_special SpecialNameRival
-	add_special Function90913
-	add_special Functionc2c0
-	add_special Functionc2cd
+	add_special Special_SetDayOfWeek
+	add_special Special_TownMap
+	add_special Special_UnownPrinter
 	add_special MapRadio
-	add_special Functionc360
-	add_special Functionc373
-	add_special Functionc380
-	add_special Functionc38d
-	add_special Functionc3db
+	add_special Special_UnownPuzzle
+	add_special Special_SlotMachine
+	add_special Special_CardFlip
+	add_special Special_DummyNonfunctionalGameCornerGame
+	add_special Special_WhiteBGMapBufferScreen
 	add_special FadeBlackBGMap
-	add_special Function8c092
-	add_special Function8c0b6
+	add_special Special_BattleTowerFade
+	add_special Special_FadeBlackQuickly
 	add_special FadeInBGMap
-	add_special Function8c0ab
-	add_special Functiond91
+	add_special Special_FadeInQuickly
+	add_special Special_ReloadSpritesNoPalettes
 	add_special WhiteBGMap
 	add_special UpdateTimePals
 	add_special ClearTileMap
 	add_special DrawOnMap
-	add_special Functione4a
-	add_special Functionc230
+	add_special Special_ReplaceKrisSprite
+	add_special Special_GameCornerPrizeMonCheckDex
 	add_special SpecialSeenMon
 	add_special WaitSFX
 	add_special PlayMapMusic
@@ -155,7 +155,7 @@
 	add_special SpecialOmanyteChamber
 	add_special Function11c1ab
 	add_special Function170687
-	add_special Function8ae68
+	add_special Special_DisplayUnownWords
 	add_special Function17d224
 	add_special Function17d2b6
 	add_special Function17d2ce
@@ -202,7 +202,7 @@
 	ret
 ; c230
 
-Functionc230: ; c230
+Special_GameCornerPrizeMonCheckDex: ; c230
 	ld a, [ScriptVar]
 	dec a
 	call CheckCaughtMon
@@ -283,7 +283,7 @@
 	ret
 ; c2c0
 
-Functionc2c0: ; c2c0
+Special_TownMap: ; c2c0
 	call FadeToMenu
 	callba Function9191c
 	call Function2b4d
@@ -290,7 +290,7 @@
 	ret
 ; c2cd
 
-Functionc2cd: ; c2cd
+Special_UnownPrinter: ; c2cd
 	call FadeToMenu
 	callba Function16be4
 	call Function2b4d
@@ -304,7 +304,7 @@
 	ret
 ; c2e7
 
-Functionc2e7: ; c2e7
+Special_KrissHousePC: ; c2e7
 	xor a
 	ld [ScriptVar], a
 	callba Function156d9
@@ -376,7 +376,7 @@
 	ret
 ; c360
 
-Functionc360: ; c360
+Special_UnownPuzzle: ; c360
 	call FadeToMenu
 	callba Functione1190
 	ld a, [wd0ec]
@@ -385,34 +385,34 @@
 	ret
 ; c373
 
-Functionc373: ; c373
-	call Functionc3ae
+Special_SlotMachine: ; c373
+	call Special_CheckCoins
 	ret c
-	ld a, BANK(Function926c7)
-	ld hl, Function926c7
-	call Functionc39a
+	ld a, BANK(_SlotMachine)
+	ld hl, _SlotMachine
+	call Special_StartGameCornerGame
 	ret
 ; c380
 
-Functionc380: ; c380
-	call Functionc3ae
+Special_CardFlip: ; c380
+	call Special_CheckCoins
 	ret c
-	ld a, BANK(Functione00ee)
-	ld hl, Functione00ee
-	call Functionc39a
+	ld a, BANK(_CardFlip)
+	ld hl, _CardFlip
+	call Special_StartGameCornerGame
 	ret
 ; c38d
 
-Functionc38d: ; c38d
-	call Functionc3ae
+Special_DummyNonfunctionalGameCornerGame: ; c38d
+	call Special_CheckCoins
 	ret c
-	ld a, BANK(Functione1e5b)
-	ld hl, Functione1e5b
-	call Functionc39a
+	ld a, BANK(_DummyGame)
+	ld hl, _DummyGame
+	call Special_StartGameCornerGame
 	ret
 ; c39a
 
-Functionc39a: ; c39a
+Special_StartGameCornerGame: ; c39a
 	call Function31cf
 	call FadeToMenu
 	ld hl, wd0e8
@@ -427,7 +427,7 @@
 	ret
 ; c3ae
 
-Functionc3ae: ; c3ae
+Special_CheckCoins: ; c3ae
 	ld hl, Coins
 	ld a, [hli]
 	or [hl]
@@ -465,7 +465,7 @@
 	db "@"
 ; 0xc3db
 
-Functionc3db: ; c3db
+Special_WhiteBGMapBufferScreen: ; c3db
 	call WhiteBGMap
 	call BufferScreen
 	ret
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -184,7 +184,7 @@
 	loadfont
 	farwritetext TownMapText
 	closetext
-	special Functionc2c0
+	special Special_TownMap
 	loadmovesprites
 	end
 
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -105,7 +105,7 @@
 
 
 
-Functione4a:: ; e4a
+Special_ReplaceKrisSprite:: ; e4a
 	callba Function14135
 	ret
 ; e51
--- a/home/flag.asm
+++ b/home/flag.asm
@@ -1,4 +1,4 @@
-Function2e50:: ; 2e50
+ResetMapBufferEventFlags:: ; 2e50
 	xor a
 	ld hl, EventFlags
 	ld [hli], a
@@ -5,7 +5,7 @@
 	ret
 ; 2e56
 
-Function2e56:: ; 2e56
+ResetBikeFlags:: ; 2e56
 	xor a
 	ld hl, BikeFlags
 	ld [hli], a
@@ -13,8 +13,8 @@
 	ret
 ; 2e5d
 
-Function2e5d:: ; 2e5d
-	ld a, [wd19a]
+ResetFlashIfOutOfCave:: ; 2e5d
+	ld a, [wRoofPalette]
 	cp $2
 	jr z, .asm_2e69
 	cp $1
--- a/home/map.asm
+++ b/home/map.asm
@@ -1,6 +1,6 @@
 ; Functions dealing with rendering and interacting with maps.
 
-Function210f:: ; 210f
+Clearwc7e8:: ; 210f
 	ld hl, wc7e8
 	ld bc, $0018
 	ld a, $0
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -302,7 +302,7 @@
 ; d91
 
 
-Functiond91:: ; d91
+Special_ReloadSpritesNoPalettes:: ; d91
 	ld a, [hCGB]
 	and a
 	ret z
--- a/home/window.asm
+++ b/home/window.asm
@@ -40,7 +40,7 @@
 	call Function2e31
 	ld a, $90
 	ld [hWY], a
-	call Functione4a
+	call Special_ReplaceKrisSprite
 	callba ReturnFromMapSetupScript
 	callba Function106594
 	ret
--- a/main.asm
+++ b/main.asm
@@ -5004,7 +5004,7 @@
 	copybytetovar Buffer2
 	writevarcode VAR_MOVEMENT
 
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	special PlayMapMusic
 ; step into the water
 	special Function8379 ; (slow_step_x, step_end)
@@ -5242,7 +5242,7 @@
 Functioncacb: ; cacb
 	callba Function561d
 	call DelayFrame
-	call Functione4a
+	call Special_ReplaceKrisSprite
 	callba Function106594
 	ret
 ; cade
@@ -6343,7 +6343,7 @@
 	ld a, $1
 	ld [PlayerAction], a
 	call DrawOnMap
-	call Functione4a
+	call Special_ReplaceKrisSprite
 	ret
 ; d0a4
 
@@ -6462,7 +6462,7 @@
 	writetext UnknownText_0xd17c
 	closetext
 	loadmovesprites
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	end
 ; 0xd14e
 
@@ -6469,7 +6469,7 @@
 Script_GetOnBike_Register: ; 0xd14e
 	writecode VAR_MOVEMENT, $1
 	loadmovesprites
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	end
 ; 0xd156
 
@@ -6486,7 +6486,7 @@
 
 UnknownScript_0xd163:
 	loadmovesprites
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	special PlayMapMusic
 	end
 ; 0xd16b
@@ -21243,7 +21243,7 @@
 INCLUDE "items/marts.asm"
 
 
-Function16218: ; 16218
+Special_BankOfMom: ; 16218
 	ld a, [$ffaa]
 	push af
 	ld a, $1
@@ -21992,7 +21992,7 @@
 	db "CANCEL@"
 ; 0x166d6
 
-Function166d6: ; 166d6
+Special_DayCareMan: ; 166d6
 	ld hl, wDaycareMan
 	bit 0, [hl]
 	jr nz, .asm_166fe
@@ -22031,7 +22031,7 @@
 	ret
 ; 1672a
 
-Function1672a: ; 1672a
+Special_DayCareLady: ; 1672a
 	ld hl, wDaycareLady
 	bit 0, [hl]
 	jr nz, .asm_16752
@@ -22399,7 +22399,7 @@
 	db "@"
 ; 0x16936
 
-Function16936: ; 16936
+Special_DayCareManOutside: ; 16936
 	ld hl, wDaycareMan
 	bit 6, [hl]
 	jr nz, Function16949
@@ -29177,7 +29177,7 @@
 	loadfont
 	writetext UnknownText_0x26f9b
 	closetext
-	special Functionc2c0
+	special Special_TownMap
 	loadmovesprites
 	end
 ; 0x26f9b
@@ -41297,7 +41297,7 @@
 	ret
 
 .ice_path
-	ld a, [wd19a] ; permission
+	ld a, [wRoofPalette] ; permission
 	and 7
 	cp 3 ; Hall of Fame
 	jr z, .do_nothing
@@ -52231,7 +52231,7 @@
 	push bc
 	ld a, PLAYER_NORMAL
 	ld [PlayerState], a
-	call Functione4a ; UpdateSprites
+	call Special_ReplaceKrisSprite ; UpdateSprites
 	pop bc
 	ret
 ; 80404
@@ -52419,7 +52419,7 @@
 	dwb MapGroup,      $00
 	dwb MapNumber,     $00
 	dwb Function806ff, $80
-	dwb wd19a,         $00
+	dwb wRoofPalette,         $00
 	dwb Function80715, $80
 	dwb wd46c,         $00
 	dwb XCoord,        $00
@@ -61386,7 +61386,7 @@
 	ret
 ; 8ae68
 
-Function8ae68: ; 8ae68
+Special_DisplayUnownWords: ; 8ae68
 	ld a, [ScriptVar]
 	ld hl, MenuDataHeader_0x8aed5
 	and a
@@ -63558,7 +63558,7 @@
 	ret
 ; 8c092
 
-Function8c092: ; 8c092
+Special_BattleTowerFade: ; 8c092
 	call Function8c0c1
 	ld c, $9
 	call GetTimePalFade
@@ -63575,7 +63575,7 @@
 	ret
 ; 8c0ab
 
-Function8c0ab: ; 8c0ab
+Special_FadeInQuickly: ; 8c0ab
 	ld c, $0
 	call GetTimePalFade
 	ld b, $4
@@ -63583,7 +63583,7 @@
 	ret
 ; 8c0b6
 
-Function8c0b6: ; 8c0b6
+Special_FadeBlackQuickly: ; 8c0b6
 	ld c, $9
 	call GetTimePalFade
 	ld b, $4
@@ -64031,7 +64031,7 @@
 	jr nc, .asm_8c375
 	set 0, e
 .asm_8c375
-	ld a, [wd19a]
+	ld a, [wRoofPalette]
 	cp $4
 	jr z, .asm_8c386
 	cp $5
@@ -64732,7 +64732,7 @@
 	ld hl, VTiles1
 	lb bc, BANK(Font), $c
 	call Get1bpp
-	call Functione4a
+	call Special_ReplaceKrisSprite
 	ret
 ; 8c893
 
@@ -65117,7 +65117,7 @@
 	ld [hl], $80
 	ret
 
-Function8cc04: ; 8cc04
+Special_MagnetTrain: ; 8cc04
 	ld a, [ScriptVar]
 	and a
 	jr nz, .asm_8cc14
@@ -65553,13 +65553,13 @@
 	ld [rSVBK], a
 	ld a, [TimeOfDayPal]
 	push af
-	ld a, [wd19a]
+	ld a, [wRoofPalette]
 	push af
 	ld a, [TimeOfDay]
 	and $3
 	ld [TimeOfDayPal], a
 	ld a, $1
-	ld [wd19a], a
+	ld [wRoofPalette], a
 	ld b, $9
 	call GetSGBLayout
 	call UpdateTimePals
@@ -65570,7 +65570,7 @@
 	ld a, [rOBP1]
 	ld [wcfc9], a
 	pop af
-	ld [wd19a], a
+	ld [wRoofPalette], a
 	pop af
 	ld [TimeOfDayPal], a
 	pop af
@@ -69205,7 +69205,7 @@
 	ret
 
 Function90188: ; 90188
-	ld a, [wd19a]
+	ld a, [wRoofPalette]
 	cp $1
 	jr z, .asm_90195
 	cp $2
@@ -70165,7 +70165,7 @@
 INCBIN "gfx/unknown/09090b.2bpp"
 ; 90913
 
-Function90913: ; 90913
+Special_SetDayOfWeek: ; 90913
 	ld a, [$ffaa]
 	push af
 	ld a, $1
@@ -73691,7 +73691,7 @@
 INCLUDE "data/wild/fish.asm"
 
 
-Function926c7:
+_SlotMachine:
 	ld hl, Options
 	set 4, [hl]
 	call Function926f7
@@ -80258,7 +80258,7 @@
 	ret
 ; e00ee (38:40ee)
 
-Functione00ee: ; e00ee (38:40ee)
+_CardFlip: ; e00ee (38:40ee)
 	ld hl, Options
 	set 4, [hl]
 	call WhiteBGMap
@@ -82816,7 +82816,7 @@
 LZ_e1c9b: ; e1c9b
 INCBIN "gfx/unknown/0e1c9b.2bpp.lz"
 
-Functione1e5b: ; e1e5b (38:5e5b)
+_DummyGame: ; e1e5b (38:5e5b)
 	call Functione1e67
 	call DelayFrame
 .asm_e1e61
@@ -90316,7 +90316,7 @@
 
 INCLUDE "battle/magikarp_length.asm"
 
-Functionfbcd2: ; fbcd2
+Special_MagikarpHouseSign: ; fbcd2
 	ld a, [wdfe8]
 	ld [Buffer1], a
 	ld a, [wdfe9]
@@ -92084,11 +92084,11 @@
 
 
 RunCallback_05_03: ; 1045b0
-	call Function210f
-	call Function2e50
-	call Function2e5d
+	call Clearwc7e8
+	call ResetMapBufferEventFlags
+	call ResetFlashIfOutOfCave
 	call GetCurrentMapTrigger
-	call Function2e56
+	call ResetBikeFlags
 	ld a, $5
 	call RunMapCallback
 
--- a/maps/BattleTowerBattleRoom.asm
+++ b/maps/BattleTowerBattleRoom.asm
@@ -91,7 +91,7 @@
 
 UnknownScript_0x9f4c2:
 	pause 60
-	special Function8c092
+	special Special_BattleTowerFade
 	warpfacing $1, GROUP_BATTLE_TOWER_1F, MAP_BATTLE_TOWER_1F, $7, $7
 	writebyte $4
 	special Function170687
@@ -103,7 +103,7 @@
 
 UnknownScript_0x9f4d9:
 	pause 60
-	special Function8c092
+	special Special_BattleTowerFade
 	warpfacing $1, GROUP_BATTLE_TOWER_1F, MAP_BATTLE_TOWER_1F, $7, $7
 BattleTowerBattleRoomScript_0x9f4e4:
 	loadfont
--- a/maps/CeladonGameCorner.asm
+++ b/maps/CeladonGameCorner.asm
@@ -104,7 +104,7 @@
 	if_equal $0, MapCeladonGameCornerSignpost16Script
 	refreshscreen $0
 	writebyte $0
-	special Functionc373
+	special Special_SlotMachine
 	loadmovesprites
 	end
 
@@ -111,13 +111,13 @@
 MapCeladonGameCornerSignpost16Script:
 	refreshscreen $0
 	writebyte $1
-	special Functionc373
+	special Special_SlotMachine
 	loadmovesprites
 	end
 
 MapCeladonGameCornerSignpost11Script:
 	refreshscreen $0
-	special Functionc380
+	special Special_CardFlip
 	loadmovesprites
 	end
 
@@ -128,7 +128,7 @@
 	loadfont
 	writetext UnknownText_0x72567
 	closetext
-	special Functionc380
+	special Special_CardFlip
 	loadmovesprites
 	end
 
--- a/maps/CeladonGameCornerPrizeRoom.asm
+++ b/maps/CeladonGameCornerPrizeRoom.asm
@@ -146,7 +146,7 @@
 	writetext UnknownText_0x729ad
 	closetext
 	writebyte PIKACHU
-	special Functionc230
+	special Special_GameCornerPrizeMonCheckDex
 	givepoke PIKACHU, 25, 0, 0
 	takecoins 2222
 	jump UnknownScript_0x727d3
@@ -164,7 +164,7 @@
 	writetext UnknownText_0x729ad
 	closetext
 	writebyte PORYGON
-	special Functionc230
+	special Special_GameCornerPrizeMonCheckDex
 	givepoke PORYGON, 15, 0, 0
 	takecoins 5555
 	jump UnknownScript_0x727d3
@@ -182,7 +182,7 @@
 	writetext UnknownText_0x729ad
 	closetext
 	writebyte LARVITAR
-	special Functionc230
+	special Special_GameCornerPrizeMonCheckDex
 	givepoke LARVITAR, 40, 0, 0
 	takecoins 8888
 	jump UnknownScript_0x727d3
--- a/maps/DayCare.asm
+++ b/maps/DayCare.asm
@@ -50,7 +50,7 @@
 	end
 
 UnknownScript_0x62fbd:
-	special Function166d6
+	special Special_DayCareMan
 	closetext
 	loadmovesprites
 	end
@@ -60,7 +60,7 @@
 	loadfont
 	checkflag ENGINE_DAYCARE_MONS_ARE_COMPATIBLE
 	iftrue UnknownScript_0x62fd1
-	special Function1672a
+	special Special_DayCareLady
 	closetext
 	loadmovesprites
 	end
--- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
+++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
@@ -35,8 +35,8 @@
 	writetext UnknownText_0x7621f
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	disappear $5
 	applymovement $0, MovementData_0x76004
 	moveperson $4, $3, $13
@@ -43,7 +43,7 @@
 	appear $4
 	spriteface $0, UP
 	spriteface $4, UP
-	special Function8c0ab
+	special Special_FadeInQuickly
 	spriteface $3, DOWN
 	showemote EMOTE_SHOCK, $3, 15
 	applymovement $4, MovementData_0x7600c
--- a/maps/FastShipCabins_SW_SSW_NW.asm
+++ b/maps/FastShipCabins_SW_SSW_NW.asm
@@ -63,14 +63,14 @@
 	writetext FastShipBedText1
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	special Mobile_HealParty
 	special HealParty
 	playmusic MUSIC_HEAL
 	pause 60
 	special RestartMapMusic
-	special Function8c0ab
+	special Special_FadeInQuickly
 	loadfont
 	writetext FastShipBedText2
 	closetext
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -175,7 +175,7 @@
 	writetext UnknownText_0x56ebd
 	closetext
 	writebyte ABRA
-	special Functionc230
+	special Special_GameCornerPrizeMonCheckDex
 	givepoke ABRA, 5, 0, 0
 	takecoins 100
 	jump UnknownScript_0x56d0c
@@ -193,7 +193,7 @@
 	writetext UnknownText_0x56ebd
 	closetext
 	writebyte CUBONE
-	special Functionc230
+	special Special_GameCornerPrizeMonCheckDex
 	givepoke CUBONE, 15, 0, 0
 	takecoins 800
 	jump UnknownScript_0x56d0c
@@ -211,7 +211,7 @@
 	writetext UnknownText_0x56ebd
 	closetext
 	writebyte WOBBUFFET
-	special Functionc230
+	special Special_GameCornerPrizeMonCheckDex
 	givepoke WOBBUFFET, 15, 0, 0
 	takecoins 1500
 	jump UnknownScript_0x56d0c
@@ -292,7 +292,7 @@
 	if_equal $0, MapGoldenrodGameCornerSignpost7Script
 	refreshscreen $0
 	writebyte $0
-	special Functionc373
+	special Special_SlotMachine
 	loadmovesprites
 	end
 
@@ -299,13 +299,13 @@
 MapGoldenrodGameCornerSignpost7Script:
 	refreshscreen $0
 	writebyte $1
-	special Functionc373
+	special Special_SlotMachine
 	loadmovesprites
 	end
 
 MapGoldenrodGameCornerSignpost29Script:
 	refreshscreen $0
-	special Functionc380
+	special Special_CardFlip
 	loadmovesprites
 	end
 
--- a/maps/GoldenrodMagnetTrainStation.asm
+++ b/maps/GoldenrodMagnetTrainStation.asm
@@ -33,7 +33,7 @@
 	applymovement $2, MovementData_0x55146
 	applymovement $0, MovementData_0x5514f
 	writebyte $0
-	special Function8cc04
+	special Special_MagnetTrain
 	warpcheck
 	newloadmap $f9
 	applymovement $0, MovementData_0x55122
--- a/maps/KrissHouse1F.asm
+++ b/maps/KrissHouse1F.asm
@@ -43,7 +43,7 @@
 	clearevent EVENT_KRISS_HOUSE_MOM_2
 	writetext UnknownText_0x7a6bd
 	keeptextopen
-	special Function90913
+	special Special_SetDayOfWeek
 UnknownScript_0x7a519:
 	writetext UnknownText_0x7a742
 	yesorno
@@ -142,7 +142,7 @@
 	setevent EVENT_FIRST_TIME_BANKING_WITH_MOM
 UnknownScript_0x7a5b8:
 	setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
-	special Function16218
+	special Special_BankOfMom
 	closetext
 	loadmovesprites
 	end
--- a/maps/KrissHouse2F.asm
+++ b/maps/KrissHouse2F.asm
@@ -84,7 +84,7 @@
 
 KrissHousePC:
 	loadfont
-	special Functionc2e7
+	special Special_KrissHousePC
 	iftrue .Warp
 	loadmovesprites
 	end
--- a/maps/LakeofRage.asm
+++ b/maps/LakeofRage.asm
@@ -132,7 +132,7 @@
 
 UnknownScript_0x700b8:
 	keeptextopen
-	special Functionfbcd2
+	special Special_MagikarpHouseSign
 	loadmovesprites
 	end
 
--- a/maps/MrPokemonsHouse.asm
+++ b/maps/MrPokemonsHouse.asm
@@ -108,13 +108,13 @@
 	writetext UnknownText_0x1970ed
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	playmusic MUSIC_HEAL
 	special Mobile_HealParty
 	special HealParty
 	pause 60
-	special Function8c0ab
+	special Special_FadeInQuickly
 	special RestartMapMusic
 	loadfont
 	writetext UnknownText_0x197134
--- a/maps/PokeCenter2F.asm
+++ b/maps/PokeCenter2F.asm
@@ -435,7 +435,7 @@
 	special Functionc225
 	applymovement $0, MovementData_0x192d1c
 	setflag ENGINE_KRIS_IN_CABLE_CLUB
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	loadfont
 	writetext Text_LikeTheLook
 	closetext
@@ -461,7 +461,7 @@
 	writebyte $90
 	special Functionc225
 	applymovement $0, MovementData_0x192d1c
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	applymovement $0, MovementData_0x192d2a
 	applymovement $2, MovementData_0x192cfe
 	end
@@ -483,7 +483,7 @@
 	writebyte $90
 	special Functionc225
 	applymovement $0, MovementData_0x192d1c
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	applymovement $0, MovementData_0x192d2a
 	applymovement $3, MovementData_0x192cfe
 	end
@@ -544,7 +544,7 @@
 	applymovement $0, MovementData_0x192d22
 	faceperson $0, $4
 	setflag ENGINE_KRIS_IN_CABLE_CLUB
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	loadfont
 	writetext Text_LikeTheLook
 	closetext
@@ -571,7 +571,7 @@
 	writebyte $90
 	special Functionc225
 	applymovement $0, MovementData_0x192d1c
-	special Functione4a
+	special Special_ReplaceKrisSprite
 	applymovement $0, MovementData_0x192cfc
 	applymovement $4, MovementData_0x192d01
 .Done:
--- a/maps/RadioTower5F.asm
+++ b/maps/RadioTower5F.asm
@@ -90,12 +90,12 @@
 	writetext UnknownText_0x6050e
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	disappear $3
 	disappear $4
 	pause 15
-	special Function8c0ab
+	special Special_FadeInQuickly
 	setevent EVENT_BEAT_ROCKET_EXECUTIVEM_1
 	setevent EVENT_CLEARED_RADIO_TOWER
 	clearflag ENGINE_ROCKETS_IN_RADIO_TOWER
--- a/maps/Route24.asm
+++ b/maps/Route24.asm
@@ -25,11 +25,11 @@
 	writetext UnknownText_0x1adee1
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	disappear $2
 	pause 25
-	special Function8c0ab
+	special Special_FadeInQuickly
 	playmapmusic
 	end
 
--- a/maps/Route26HealSpeechHouse.asm
+++ b/maps/Route26HealSpeechHouse.asm
@@ -11,13 +11,13 @@
 	writetext UnknownText_0x7b14d
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	special Mobile_HealParty
 	playmusic MUSIC_HEAL
 	special HealParty
 	pause 60
-	special Function8c0ab
+	special Special_FadeInQuickly
 	special RestartMapMusic
 	loadfont
 	writetext UnknownText_0x7b18b
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -44,7 +44,7 @@
 GrampsScript_0x7803d:
 	faceplayer
 	loadfont
-	special Function16936
+	special Special_DayCareManOutside
 	closetext
 	loadmovesprites
 	if_equal $1, UnknownScript_0x7805a
--- a/maps/Route36NationalParkgate.asm
+++ b/maps/Route36NationalParkgate.asm
@@ -67,14 +67,14 @@
 	writetext UnknownText_0x6b2c5
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	scall UnknownScript_0x6ab8c
 	disappear $2
 	appear $d
 	applymovement $0, MovementData_0x6add1
 	pause 15
-	special Function8c0ab
+	special Special_FadeInQuickly
 	jumpstd bugcontestresults
 
 UnknownScript_0x6ab76:
--- a/maps/RuinsofAlphAerodactylChamber.asm
+++ b/maps/RuinsofAlphAerodactylChamber.asm
@@ -55,7 +55,7 @@
 MapRuinsofAlphAerodactylChamberSignpost2Script:
 	refreshscreen $0
 	writebyte $2
-	special Functionc360
+	special Special_UnownPuzzle
 	loadmovesprites
 	iftrue UnknownScript_0x58df7
 	end
@@ -89,7 +89,7 @@
 	loadfont
 	writetext UnknownText_0x58e4f
 	writebyte $1
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
@@ -99,7 +99,7 @@
 	loadfont
 	writetext UnknownText_0x58e81
 	writebyte $1
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
--- a/maps/RuinsofAlphHoOhChamber.asm
+++ b/maps/RuinsofAlphHoOhChamber.asm
@@ -56,7 +56,7 @@
 MapRuinsofAlphHoOhChamberSignpost2Script:
 	refreshscreen $0
 	writebyte $3
-	special Functionc360
+	special Special_UnownPuzzle
 	loadmovesprites
 	iftrue UnknownScript_0x585ba
 	end
@@ -90,7 +90,7 @@
 	loadfont
 	writetext UnknownText_0x58612
 	writebyte $3
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
@@ -100,7 +100,7 @@
 	loadfont
 	writetext UnknownText_0x58644
 	writebyte $3
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
--- a/maps/RuinsofAlphKabutoChamber.asm
+++ b/maps/RuinsofAlphKabutoChamber.asm
@@ -60,7 +60,7 @@
 MapRuinsofAlphKabutoChamberSignpost2Script:
 	refreshscreen $0
 	writebyte $0
-	special Functionc360
+	special Special_UnownPuzzle
 	loadmovesprites
 	iftrue UnknownScript_0x58778
 	end
@@ -125,7 +125,7 @@
 	loadfont
 	writetext UnknownText_0x58aa7
 	writebyte $0
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
@@ -135,7 +135,7 @@
 	loadfont
 	writetext UnknownText_0x58ad9
 	writebyte $0
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
--- a/maps/RuinsofAlphOmanyteChamber.asm
+++ b/maps/RuinsofAlphOmanyteChamber.asm
@@ -56,7 +56,7 @@
 MapRuinsofAlphOmanyteChamberSignpost2Script:
 	refreshscreen $0
 	writebyte $1
-	special Functionc360
+	special Special_UnownPuzzle
 	loadmovesprites
 	iftrue UnknownScript_0x58c36
 	end
@@ -90,7 +90,7 @@
 	loadfont
 	writetext UnknownText_0x58c8e
 	writebyte $2
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
@@ -100,7 +100,7 @@
 	loadfont
 	writetext UnknownText_0x58cc0
 	writebyte $2
-	special Function8ae68
+	special Special_DisplayUnownWords
 	loadmovesprites
 	end
 
--- a/maps/RuinsofAlphResearchCenter.asm
+++ b/maps/RuinsofAlphResearchCenter.asm
@@ -165,7 +165,7 @@
 UnknownScript_0x59260:
 	writetext UnknownText_0x5982d
 	closetext
-	special Functionc2cd
+	special Special_UnownPrinter
 	loadmovesprites
 	end
 
--- a/maps/SaffronTrainStation.asm
+++ b/maps/SaffronTrainStation.asm
@@ -33,7 +33,7 @@
 	applymovement $2, MovementData_0x18a88f
 	applymovement $0, MovementData_0x18a898
 	writebyte $1
-	special Function8cc04
+	special Special_MagnetTrain
 	warpcheck
 	newloadmap $f9
 	applymovement $0, MovementData_0x18a854
--- a/maps/SilverCaveRoom3.asm
+++ b/maps/SilverCaveRoom3.asm
@@ -22,11 +22,11 @@
 	writetext UnknownText_0x18c63f
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	disappear $2
 	pause 15
-	special Function8c0ab
+	special Special_FadeInQuickly
 	pause 30
 	special HealParty
 	refreshscreen $0
--- a/maps/SlowpokeWellB1F.asm
+++ b/maps/SlowpokeWellB1F.asm
@@ -27,14 +27,14 @@
 	writetext TrainerGruntM1WhenTalkText
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	disappear $2
 	disappear $3
 	disappear $4
 	disappear $5
 	pause 15
-	special Function8c0ab
+	special Special_FadeInQuickly
 	disappear $8
 	moveperson $8, $b, $6
 	appear $8
--- a/maps/SproutTower3F.asm
+++ b/maps/SproutTower3F.asm
@@ -47,11 +47,11 @@
 	pause 15
 	loadmovesprites
 	playsound SFX_WARP_TO
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	disappear $8
 	waitbutton
-	special Function8c0ab
+	special Special_FadeInQuickly
 	dotrigger $1
 	special RestartMapMusic
 	end
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -98,8 +98,8 @@
 	writetext UnknownText_0x6d4c6
 	closetext
 	loadmovesprites
-	special Function8c0b6
-	special Functiond91
+	special Special_FadeBlackQuickly
+	special Special_ReloadSpritesNoPalettes
 	disappear $2
 	disappear $3
 	disappear $c
@@ -106,7 +106,7 @@
 	disappear $d
 	disappear $e
 	pause 15
-	special Function8c0ab
+	special Special_FadeInQuickly
 	dotrigger $2
 	clearevent EVENT_TEAM_ROCKET_BASE_B2F_LANCE
 	spriteface $4, DOWN
--- a/predef/sgb.asm
+++ b/predef/sgb.asm
@@ -548,7 +548,7 @@
 	ret
 
 .asm_8a16
-	ld a, [wd19a]
+	ld a, [wRoofPalette]
 	cp $2
 	jr z, .asm_8a39
 	cp $4
--- a/wram.asm
+++ b/wram.asm
@@ -1550,7 +1550,7 @@
 wd196:: ds 1
 wd197:: ds 2
 wd199:: ds 1
-wd19a:: ds 3
+wRoofPalette:: ds 3
 
 ; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles)
 MapHeader:: ; d19d