shithub: pokecrystal

Download patch

ref: 46ecd5b86977637c15fbb526812686fef5b7dcc1
parent: ae36ef2c7fb722b7480d73c7a95a5d1e2ece7831
author: pikalaxalt <[email protected]>
date: Tue May 10 08:59:34 EDT 2016

Name all functions in event/

--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -821,7 +821,7 @@
 	xor a
 	ld [hBGMapMode], a
 	call LoadTileMapToTempTileMap
-	callba Function16dac
+	callba PlaceUnownPrinterFrontpic
 	ld a, $0
 	call Function84419
 	call Call_LoadTempTileMapToTileMap
--- a/event/mom.asm
+++ b/event/mom.asm
@@ -148,9 +148,9 @@
 	ld a, $5
 	ld [wcf64], a
 	call LoadStandardMenuDataHeader
-	call Function16517
-	call Function1656b
-	call Function16571
+	call Mom_SetUpDepositMenu
+	call Mom_Wait10Frames
+	call Mom_WithdrawDepositMenuJoypad
 	call CloseWindow
 	jr c, .CancelDeposit
 	ld hl, StringBuffer2
@@ -215,9 +215,9 @@
 	ld a, $5
 	ld [wcf64], a
 	call LoadStandardMenuDataHeader
-	call Function16512
-	call Function1656b
-	call Function16571
+	call Mom_SetUpWithdrawMenu
+	call Mom_Wait10Frames
+	call Mom_WithdrawDepositMenuJoypad
 	call CloseWindow
 	jr c, .CancelWithdraw
 	ld hl, StringBuffer2
@@ -441,14 +441,13 @@
 	db "@"
 ; 0x16512
 
-Function16512: ; 16512
-	ld de, String_1669f
-	jr Function1651a
+Mom_SetUpWithdrawMenu: ; 16512
+	ld de, Mon_WithdrawString
+	jr Mom_ContinueMenuSetup
 
-Function16517: ; 16517
-	ld de, String_166a8
-
-Function1651a: ; 1651a
+Mom_SetUpDepositMenu: ; 16517
+	ld de, Mom_DepositString
+Mom_ContinueMenuSetup: ; 1651a
 	push de
 	xor a
 	ld [hBGMapMode], a
@@ -456,7 +455,7 @@
 	lb bc, 6, 18
 	call TextBox
 	hlcoord 1, 2
-	ld de, String_16699
+	ld de, Mom_SavedString
 	call PlaceString
 	hlcoord 12, 2
 	ld de, wMomsMoney
@@ -463,7 +462,7 @@
 	lb bc, PRINTNUM_MONEY | 3, 6
 	call PrintNum
 	hlcoord 1, 4
-	ld de, String_166b0
+	ld de, Mom_HeldString
 	call PlaceString
 	hlcoord 12, 4
 	ld de, Money
@@ -481,13 +480,13 @@
 	ret
 ; 1656b
 
-Function1656b: ; 1656b
+Mom_Wait10Frames: ; 1656b
 	ld c, 10
 	call DelayFrames
 	ret
 ; 16571
 
-Function16571: ; 16571
+Mom_WithdrawDepositMenuJoypad: ; 16571
 .loop
 	call JoyTextDelay
 	ld hl, hJoyPressed
@@ -529,9 +528,8 @@
 .pressedA
 	and a
 	ret
-; 165b9
 
-.dpadaction ; 165b9
+.dpadaction
 	ld hl, hJoyLast
 	ld a, [hl]
 	and D_UP
@@ -581,9 +579,8 @@
 	ld de, StringBuffer2
 	callba TakeMoney
 	ret
-; 16607
 
-.getdigitquantity ; 16607
+.getdigitquantity
 	ld a, [wMomBankDigitCursorPosition]
 	push de
 	ld e, a
@@ -714,19 +711,19 @@
 	db "@"
 ; 0x16699
 
-String_16699: ; 16699
+Mom_SavedString: ; 16699
 	db "SAVED@"
 ; 1669f
 
-String_1669f: ; 1669f
+Mon_WithdrawString: ; 1669f
 	db "WITHDRAW@"
 ; 166a8
 
-String_166a8: ; 166a8
+Mom_DepositString: ; 166a8
 	db "DEPOSIT@"
 ; 166b0
 
-String_166b0: ; 166b0
+Mom_HeldString: ; 166b0
 	db "HELD@"
 ; 166b5
 
--- a/event/photo.asm
+++ b/event/photo.asm
@@ -219,7 +219,7 @@
 INCBIN "gfx/unknown/016da4.1bpp"
 ; 16dac
 
-Function16dac: ; 16dac
+PlaceUnownPrinterFrontpic: ; 16dac
 	hlcoord 0, 0
 	ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
 	ld a, " "
--- a/event/squirtbottle.asm
+++ b/event/squirtbottle.asm
@@ -1,50 +1,46 @@
 _Squirtbottle: ; 50730
-	ld hl, UnknownScript_0x5073c
+	ld hl, .SquirtbottleScript
 	call QueueScript
 	ld a, $1
 	ld [wItemEffectSucceeded], a
 	ret
-; 5073c
 
-UnknownScript_0x5073c: ; 0x5073c
+.SquirtbottleScript:
 	reloadmappart
 	special UpdateTimePals
-	callasm Function50753
-	iffalse UnknownScript_0x5074b
+	callasm .CheckCanUseSquirtbottle
+	iffalse .NothingHappenedScript
 	farjump WateredWeirdTreeScript
-; 0x5074b
 
-UnknownScript_0x5074b: ; 0x5074b
-	jumptext UnknownText_0x5074e
-; 0x5074e
+.NothingHappenedScript:
+	jumptext .NothingHappenedText
 
-UnknownText_0x5074e: ; 0x5074e
+.NothingHappenedText:
 	; sprinkled water. But nothing happened…
 	text_jump UnknownText_0x1c0b3b
 	db "@"
-; 0x50753
 
-Function50753: ; 50753
+.CheckCanUseSquirtbottle:
 	ld a, [MapGroup]
 	cp GROUP_ROUTE_36
-	jr nz, .asm_50774
+	jr nz, .nope
 
 	ld a, [MapNumber]
 	cp MAP_ROUTE_36
-	jr nz, .asm_50774
+	jr nz, .nope
 
 	callba GetFacingObject
-	jr c, .asm_50774
+	jr c, .nope
 
 	ld a, d
-	cp $17
-	jr nz, .asm_50774
+	cp SPRITEMOVEDATA_SUDOWOODO
+	jr nz, .nope
 
-	ld a, $1
+	ld a, 1
 	ld [ScriptVar], a
 	ret
 
-.asm_50774
+.nope
 	xor a
 	ld [ScriptVar], a
 	ret
--- a/home.asm
+++ b/home.asm
@@ -49,13 +49,6 @@
 INCLUDE "home/farcall.asm"
 INCLUDE "home/predef.asm"
 INCLUDE "home/window.asm"
-
-Function2e4e:: ; 2e4e
-; Unreferenced.
-	scf
-	ret
-; 2e50
-
 INCLUDE "home/flag.asm"
 
 Function2ebb:: ; 2ebb
--- a/home/window.asm
+++ b/home/window.asm
@@ -98,4 +98,8 @@
 	pop af
 	ld [hOAMUpdate], a
 	ret
-; 2e4e
+
+; XXX
+	scf
+	ret
+; 2e50