shithub: pokecrystal

Download patch

ref: be0c7962b00e612543a8d3653cc9a876e68adf70
parent: 099e17bbaf1956e072edc569c3d90682c1e5a5d2
author: yenatch <[email protected]>
date: Tue Dec 3 21:49:12 EST 2013

YesNoBox

--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -455,7 +455,7 @@
 Script_yesorno: ; 0x96eed
 ; script command 0x4e
 
-	call Function1dcf
+	call YesNoBox
 	ld a, $0
 	jr c, .asm_96ef6 ; 0x96ef2 $2
 	ld a, $1
@@ -792,7 +792,7 @@
 ; parameters:
 ;     number (SingleByteParam)
 
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_970d6 ; 0x970c1 $13
 	call GetScriptByte
 	ld c, a
--- a/event/name_rater.asm
+++ b/event/name_rater.asm
@@ -1,7 +1,7 @@
 NameRater: ; fb6ed
 	ld hl, UnknownText_0xfb80f
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jp c, .asm_fb77e
 	ld hl, UnknownText_0xfb814
 	call PrintText
@@ -15,7 +15,7 @@
 	jr c, .asm_fb779
 	ld hl, UnknownText_0xfb819
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_fb77e
 	ld hl, UnknownText_0xfb81e
 	call PrintText
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -124,19 +124,20 @@
 ; 0x1dcf
 
 
-Function1dcf: ; 1dcf
-	ld bc, $0e07
+YesNoBox: ; 1dcf
+	lb bc, 14, 7
 
-Function1dd2: ; 1dd2
-	jr Function1dd9
+PlaceYesNoBox: ; 1dd2
+	jr _YesNoBox
 
 Function1dd4: ; 1dd4
 	call LoadMenuDataHeader
 	jr Function1dfe
 
-Function1dd9: ; 1dd9
+_YesNoBox: ; 1dd9
+; Return nc (yes) or c (no).
 	push bc
-	ld hl, MenuDataHeader_0x1e1d
+	ld hl, YesNoMenuDataHeader
 	call Function1d3c
 	pop bc
 	ld a, b
@@ -165,7 +166,7 @@
 	pop af
 	jr c, .asm_1e16
 	ld a, [$cfa9]
-	cp $2
+	cp 2 ; no
 	jr z, .asm_1e16
 	and a
 	ret
@@ -177,15 +178,15 @@
 	ret
 ; 1e1d
 
-MenuDataHeader_0x1e1d: ; 1e1d
+YesNoMenuDataHeader: ; 1e1d
 	db $40 ; tile backup
 	db 5, 10 ; start coords
 	db 9, 15 ; end coords
-	dw MenuData2_0x1e25
+	dw YesNoMenuData2
 	db 1 ; default option
 ; 1e25
 
-MenuData2_0x1e25: ; 1e25
+YesNoMenuData2: ; 1e25
 	db $c0 ; flags
 	db 2
 	db "YES@"
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -367,7 +367,7 @@
 	ld [$d265], a
 	call $343b
 
-	call $1dcf
+	call YesNoBox
 
 	jp c, $6be2
 
@@ -430,7 +430,7 @@
 	ld [$d265], a
 	call $343b
 
-	call $1dcf
+	call YesNoBox
 
 	jr c, .asm_ebaf
 
--- a/main.asm
+++ b/main.asm
@@ -5507,7 +5507,7 @@
 Function65b5: ; 65b5
 	ld hl, UnknownText_0x6675
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jp c, Function6520
 	ld hl, UnknownText_0x667a
 	call PrintText
@@ -5526,7 +5526,7 @@
 	push hl
 	ld hl, UnknownText_0x667f
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	pop hl
 	ret c
 	ld bc, $fffc
@@ -14021,8 +14021,8 @@
 	ld [$d265], a
 	callba Functioncc0c7
 	callba Functioncc000
-	ld bc, $0e07
-	call Function1dd2
+	lb bc, 14, 7
+	call PlaceYesNoBox
 	ret c
 
 .asm_e6ea
@@ -18704,7 +18704,7 @@
 	jr c, .asm_12a42
 	ld hl, $6a4a
 	call Function1d4f
-	call Function1dcf
+	call YesNoBox
 	push af
 	call Function1c07
 	pop af
@@ -19138,7 +19138,7 @@
 
 Function12cf5: ; 12cf5
 	call Function1d4f
-	call Function1dcf
+	call YesNoBox
 	jp Function1c07
 ; 12cfe
 
@@ -22788,7 +22788,7 @@
 	push de
 	ld hl, $52a1
 	call Function1d4f
-	call Function1dcf
+	call YesNoBox
 	call Function1c07
 	jr c, .asm_14ab0
 	call Function14b89
@@ -22895,8 +22895,8 @@
 	ld b, $5
 	call Function269a
 	call Function1d58
-	ld bc, $0007
-	call Function1dd2
+	lb bc, 0, 7
+	call PlaceYesNoBox
 	ld a, [$cfa9]
 	dec a
 	call Function1c17
@@ -25101,7 +25101,7 @@
 	call Predef
 	ld a, $1
 	call Function15c7d
-	call Function1dcf
+	call YesNoBox
 	ret
 ; 15da5
 
@@ -25264,7 +25264,7 @@
 	call ClearBox
 	ld hl, UnknownText_0x15f78
 	call PrintTextBoxText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_15f6e
 	ld de, Money
 	ld bc, $ffc3
@@ -25664,7 +25664,7 @@
 
 .asm_16788
 	call Function1689b
-	call Function1dcf
+	call YesNoBox
 	ret
 ; 1678f
 
@@ -25671,7 +25671,7 @@
 Function1678f: ; 1678f
 	set 7, [hl]
 	call Function1689b
-	call Function1dcf
+	call YesNoBox
 	ret
 ; 16798
 
@@ -25746,7 +25746,7 @@
 	jr nz, .asm_16819
 	ld a, $f
 	call Function1689b
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_16844
 	jr .asm_1682d
 
@@ -25753,11 +25753,11 @@
 .asm_16819
 	ld a, $b
 	call Function1689b
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_16844
 	ld a, $c
 	call Function1689b
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_16844
 
 .asm_1682d
@@ -25856,7 +25856,7 @@
 .asm_16949
 	ld hl, $6993
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_1697c
 	ld a, [PartyCount]
 	cp $6
@@ -26762,7 +26762,7 @@
 	push de
 	ld hl, $70ba
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	pop de
 	jr c, .asm_17074
 	ld a, $1
@@ -27494,7 +27494,7 @@
 	call Function2011f
 	ld hl, $40b0
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_200ad
 	ld a, [$d1ed]
 	ld [StringBuffer2], a ; $d086
@@ -30871,7 +30871,7 @@
 ProfOaksPC: ; 0x265d3
 	ld hl, OakPCText1
 	call Function1d4f
-	call Function1dcf
+	call YesNoBox
 	jr c, .shutdown
 	call ProfOaksPCBoot ; player chose "yes"?
 .shutdown
@@ -36330,7 +36330,7 @@
 Function2c547: ; 2c547
 	ld hl, $45ef
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_2c5c3
 	ld hl, $45f4
 	call PrintText
@@ -36361,7 +36361,7 @@
 	call GetMoveName
 	ld hl, $45d6
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	pop bc
 	jr c, .asm_2c5c3
 	call Function2c5f9
@@ -36671,7 +36671,7 @@
 	call PrintText
 	ld hl, $48c9
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 .asm_2c7f5
 	pop bc
 	ld a, b
@@ -41446,8 +41446,8 @@
 	ld hl, BattleText_0x80a83
 	call StdBattleTextBox
 .asm_3d20a
-	ld bc, $0107
-	call Function1dd2
+	lb bc, 1, 7
+	call PlaceYesNoBox
 	ld a, [$cfa9]
 	jr c, .asm_3d217
 	and a
@@ -42253,8 +42253,8 @@
 	callab Function39939
 	ld hl, BattleText_0x80aca
 	call StdBattleTextBox
-	ld bc, $0107
-	call Function1dd2
+	lb bc, 1, 7
+	call PlaceYesNoBox
 	ld a, [$cfa9]
 	dec a
 	jr nz, .asm_3d79a
@@ -51746,7 +51746,7 @@
 .PutInPack ; 0x44877
 	ld hl, .MessageLostText
 	call Function1d4f
-	call Function1dcf
+	call YesNoBox
 	call Function1c07
 	ret c
 	ld a, [MenuSelection]
@@ -55963,7 +55963,7 @@
 	call CopyBytes
 	ld hl, $6a1d
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	ret
 ; 4aa1d
 
@@ -56576,7 +56576,7 @@
 Function4ae1f: ; 4ae1f
 	ld bc, $0e07
 	push bc
-	ld hl, MenuDataHeader_0x1e1d
+	ld hl, YesNoMenuDataHeader
 	call Function1d3c
 	pop bc
 	ld a, b
@@ -58012,7 +58012,7 @@
 Function4db3b: ; 4db3b
 	ld hl, $5b44
 	call PrintText
-	jp Function1dcf
+	jp YesNoBox
 ; 4db44
 
 INCBIN "baserom.gbc",$4db44,$4db49 - $4db44
@@ -71541,7 +71541,7 @@
 	call GetItemName
 	ld hl, $7077
 	call Function105a
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_8afeb
 	ld a, [$cf75]
 	call Function8b154
@@ -77268,7 +77268,7 @@
 	call Function90783
 	ld hl, $4886
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr nc, .asm_9072e
 	call Function90783
 	jr .asm_906e8
@@ -77295,7 +77295,7 @@
 	call Function90783
 	ld hl, $48a4
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr nc, .asm_90773
 	call Function90783
 	jr .asm_9072e
@@ -77543,7 +77543,7 @@
 	call Function1ad2
 	ld hl, $4a44
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_90936
 	ld a, [DefaultFlypoint]
 	ld [StringBuffer2], a
@@ -81382,8 +81382,8 @@
 	ld hl, UnknownText_9311f
 	call PrintText
 	call Function1d58
-	ld bc, $e0c
-	call Function1dd2
+	lb bc, 14, 12
+	call PlaceYesNoBox
 	ld a, [$cfa9]
 	dec a
 	call Function1c17
@@ -94973,7 +94973,7 @@
 Functione01b5: ; e01b5
 	ld hl, UnknownText_0xe01cd
 	call Functione0489
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_e01c7
 	call Functione0366
 	call Functione01b0
@@ -95177,7 +95177,7 @@
 	call ClearSprites
 	ld hl, UnknownText_0xe0356
 	call Functione0489
-	call Function1dcf
+	call YesNoBox
 	jr nc, .asm_e0330
 	call Functione01b0
 	ret
@@ -96629,8 +96629,8 @@
 	ld de, $74f4
 	call Functione2a6e
 	call Function1d6e
-	ld bc, $e0b
-	call Function1dd2
+	lb bc, 14, 11
+	call PlaceYesNoBox
 	ld a, [$cfa9]
 	dec a
 	call Function1c07
@@ -96867,8 +96867,8 @@
 	ld de, $74f4
 	call Functione2a6e
 	call Function1d6e
-	ld bc, $e0b
-	call Function1dd2
+	lb bc, 14, 11
+	call PlaceYesNoBox
 	ld a, [$cfa9]
 	dec a
 	call Function1c07
@@ -102762,7 +102762,7 @@
 	jr nz, .asm_fcc03
 	ld a, $0
 	call Functionfcf38
-	call Function1dcf
+	call YesNoBox
 	ld a, $1
 	jr c, .asm_fcc03
 	ld b, $6
@@ -105583,7 +105583,7 @@
 	call Function10219f
 	ld hl, $61d6
 	call Function1d4f
-	call Function1dcf
+	call YesNoBox
 	call Function1c07
 	jr c, .asm_10217c
 	call Function1021b8
@@ -105686,7 +105686,7 @@
 	jr z, .asm_10369b
 	ld hl, $775d
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_103696
 	callba Function8b1e1
 	jr nc, .asm_103690
@@ -105710,7 +105710,7 @@
 	jr nz, .asm_1036b5
 	ld hl, $7762
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_1036b5
 	call Function1036f9
 	call Functiona36
@@ -105857,7 +105857,7 @@
 	jr z, .asm_1037de
 	ld hl, $77e6
 	call PrintText
-	call Function1dcf
+	call YesNoBox
 	jr c, .asm_1037de
 	ld a, $1
 	ld [ScriptVar], a