shithub: pokecrystal

Download patch

ref: 79184bc71846127b9a4ac20f50c4a5b646e90f20
parent: 3cdfac7994f501cb1d8fbcdf9c64e9ce258afe30
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sat Apr 4 11:38:44 EDT 2020

Miscellaneous fixes:

- `hSecondsBackup` -> `hUnusedBackup`
- `ld bc, hBGMapAddress + 1` -> `bccoord -1, -2, 0`
- Identify some `.asm_XXX` labels

--- a/engine/menus/intro_menu.asm
+++ b/engine/menus/intro_menu.asm
@@ -110,13 +110,13 @@
 	call ByteFill
 
 	ldh a, [rLY]
-	ldh [hSecondsBackup], a
+	ldh [hUnusedBackup], a
 	call DelayFrame
 	ldh a, [hRandomSub]
 	ld [wPlayerID], a
 
 	ldh a, [rLY]
-	ldh [hSecondsBackup], a
+	ldh [hUnusedBackup], a
 	call DelayFrame
 	ldh a, [hRandomAdd]
 	ld [wPlayerID + 1], a
--- a/engine/menus/scrolling_menu.asm
+++ b/engine/menus/scrolling_menu.asm
@@ -244,16 +244,16 @@
 	ld a, [wScrollingMenuListSize]
 	inc a
 	cp b
-	jr c, .asm_2475a
-	jr nc, .asm_24763
+	jr c, .wrap
+	jr nc, .done
 
-.asm_2475a
+.wrap
 	xor a
 	ld [wMenuScrollPosition], a
 	ld a, $1
 	ld [wMenuCursorBuffer], a
 
-.asm_24763
+.done
 	ret
 
 ScrollingMenu_InitFlags:
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -1128,7 +1128,7 @@
 	ld h, a
 	inc de
 	push hl
-	ld bc, hBGMapAddress + 1
+	bccoord -1, -2, 0
 	add hl, bc
 	ld a, [de]
 	inc de
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -140,7 +140,7 @@
 	rst Bankswitch
 
 	ldh a, [hSeconds]
-	ldh [hSecondsBackup], a
+	ldh [hUnusedBackup], a
 
 	ret
 
--- a/hram.asm
+++ b/hram.asm
@@ -146,7 +146,7 @@
 hRandomAdd:: db ; ffe1
 hRandomSub:: db ; ffe2
 
-hSecondsBackup:: db ; ffe3
+hUnusedBackup:: db ; ffe3
 
 hBattleTurn:: ; ffe4
 ; Which trainer's turn is it? 0: player, 1: opponent trainer