From 39524cdb766660a7bf6d60379040349652cecc04 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 15 Jul 2015 15:48:44 -0400 Subject: More enumeration of constants, more annotations of scripts. --- home/menu.asm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'home/menu.asm') diff --git a/home/menu.asm b/home/menu.asm index 21ce9c515..3c28b95e5 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -2,11 +2,11 @@ LoadMenuDataHeader:: ; 0x1d35 - call Function1d3c + call CopyMenuDataHeader call Function1c00 ret -Function1d3c:: ; 0x1d3c +CopyMenuDataHeader:: ; 0x1d3c ld de, wcf81 ld bc, $0010 call CopyBytes @@ -48,7 +48,7 @@ MenuDataHeader_0x1d5f:: ; 1d5f Function1d67:: ; 1d67 call Function1d4f - call Function1c17 + call WriteBackup ret ; 1d6e @@ -71,11 +71,11 @@ Function1d7d:: ; 1d7d ret ; 1d81 -Function1d81:: ; 0x1d81 +InterpretMenu2:: ; 0x1d81 xor a ld [hBGMapMode], a call Function1cbb - call Function1ad2 + call DrawOnMap call Function1c89 call Function321c call Function1c66 @@ -97,8 +97,8 @@ Function1d81:: ; 0x1d81 Function1dab:: ; 1dab call LoadMenuDataHeader - call Function1d81 - call Function1c17 + call InterpretMenu2 + call WriteBackup ld a, [wcfa9] ret ; 1db8 @@ -138,7 +138,7 @@ _YesNoBox:: ; 1dd9 ; Return nc (yes) or c (no). push bc ld hl, YesNoMenuDataHeader - call Function1d3c + call CopyMenuDataHeader pop bc ld a, b cp $e @@ -158,11 +158,11 @@ _YesNoBox:: ; 1dd9 call Function1c00 Function1dfe:: ; 1dfe - call Function1d81 + call InterpretMenu2 push af ld c, $f call DelayFrames - call Function1c17 + call WriteBackup pop af jr c, .asm_1e16 ld a, [wcfa9] @@ -201,7 +201,7 @@ Function1e2e:: ; 1e2e Function1e35:: ; 1e35 push de - call Function1d3c + call CopyMenuDataHeader pop de ld a, [wcf83] ld h, a @@ -540,7 +540,7 @@ PlayClickSFX:: ; 2009 Function2012:: ; 2012 call Function1d4f - call Functiona46 + call CloseText call Function1c07 ret ; 201c @@ -559,7 +559,7 @@ Function201c:: ; 201c ret ; 202a -Function202a:: ; 202a +InterpretMenu:: ; 202a ld a, [hROMBank] ld [wcf94], a callba Function2400e -- cgit v1.2.3 From 60cd04b02300c288a01a2f78a44cb39cbe6861d1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 18 Jul 2015 23:45:39 -0400 Subject: Trainer data structure and field move functions Trainer data in map scripts is now a macro-defined structure. Field move functions in main.asm are now nearly completely annotated, with local references. Trailing white space deleted. --- home/menu.asm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'home/menu.asm') diff --git a/home/menu.asm b/home/menu.asm index 3c28b95e5..995d7c454 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -21,9 +21,9 @@ Function1d4b:: ; 1d4b ; 1d4f -Function1d4f:: ; 1d4f +MenuTextBox:: ; 1d4f push hl - call Function1d58 + call LoadMenuTextBox pop hl jp PrintText ; 1d57 @@ -32,7 +32,7 @@ Function1d57:: ; 1d57 ret ; 1d58 -Function1d58:: ; 1d58 +LoadMenuTextBox:: ; 1d58 ld hl, MenuDataHeader_0x1d5f call LoadMenuDataHeader ret @@ -46,8 +46,8 @@ MenuDataHeader_0x1d5f:: ; 1d5f db 0 ; default option ; 1d67 -Function1d67:: ; 1d67 - call Function1d4f +MenuTextBoxBackup:: ; 1d67 + call MenuTextBox call WriteBackup ret ; 1d6e @@ -252,7 +252,7 @@ MenuFunc_1e7f:: ; 0x1e7f MenuWriteText:: ; 0x1e8c xor a ld [hBGMapMode], a - call Function1ebd ; sort out the text + call Function1ebd ; sort out the text call Function1eda ; actually write it call Function2e31 ld a, [hOAMUpdate] @@ -530,7 +530,7 @@ Function1ff8:: ; 1ff8 ; 2009 -PlayClickSFX:: ; 2009 +PlayClickSFX:: ; 2009 push de ld de, SFX_READ_TEXT_2 call PlaySFX @@ -539,7 +539,7 @@ PlayClickSFX:: ; 2009 ; 0x2012 Function2012:: ; 2012 - call Function1d4f + call MenuTextBox call CloseText call Function1c07 ret -- cgit v1.2.3 From 94129b6b451fc7770ea75ffbdcbaab4967f513bd Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 19 Jul 2015 04:58:31 -0400 Subject: Finished the decoration attributes table Interpretation of the Decoration Attributes table is complete. Other changes include some more event flag and function naming, as well as a minor tweak to the person_events of every map. --- home/menu.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'home/menu.asm') diff --git a/home/menu.asm b/home/menu.asm index 995d7c454..e9b8abeac 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -95,7 +95,7 @@ InterpretMenu2:: ; 0x1d81 ret ; 0x1dab -Function1dab:: ; 1dab +GetMenu2:: ; 1dab call LoadMenuDataHeader call InterpretMenu2 call WriteBackup -- cgit v1.2.3 From bef792f2d21ccac0127aeffd9e0838aba81f44b6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 20 Jul 2015 03:51:52 -0400 Subject: More label updates, moved predefs to new file Also named most of the engine and event flag constants. --- home/menu.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'home/menu.asm') diff --git a/home/menu.asm b/home/menu.asm index e9b8abeac..26d47490b 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -67,7 +67,7 @@ MenuDataHeader_0x1d75:: ; 1d75 ; 1d7d Function1d7d:: ; 1d7d - call Function1c07 + call ExitMenu ret ; 1d81 @@ -541,7 +541,7 @@ PlayClickSFX:: ; 2009 Function2012:: ; 2012 call MenuTextBox call CloseText - call Function1c07 + call ExitMenu ret ; 201c -- cgit v1.2.3 From 471492b775fc2a0f5162f3d1c13c5472359beb14 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 20 Jul 2015 22:18:18 -0400 Subject: Reverted ld_hl_pointer macro --- home/menu.asm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'home/menu.asm') diff --git a/home/menu.asm b/home/menu.asm index 26d47490b..2b9885834 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -111,8 +111,9 @@ Function1db8:: ; 0x1db8 ld a, [hli] ld h, [hl] ld l, a +rept 2 inc hl - inc hl +endr pop af call GetNthString ld d, h @@ -439,8 +440,9 @@ Function1f8d:: ; 1f8d push de ld a, [MenuSelection] call Function1fb1 +rept 2 inc hl - inc hl +endr ld a, [hli] ld d, [hl] ld e, a @@ -451,8 +453,9 @@ Function1f8d:: ; 1f8d Function1f9e:: ; 1f9e call Function1fb1 +rept 2 inc hl - inc hl +endr ld a, [hli] ld d, [hl] ld e, a @@ -475,10 +478,9 @@ Function1fb1:: ; 1fb1 ld a, [hli] ld h, [hl] ld l, a +rept 4 add hl, de - add hl, de - add hl, de - add hl, de +endr ret ; 1fbf @@ -497,8 +499,9 @@ Function1fbf:: ; 1fbf ld [rSVBK], a xor a ld hl, $dfff +rept 2 ld [hld], a - ld [hld], a +endr ld a, l ld [wcf71], a ld a, h -- cgit v1.2.3