shithub: pokecrystal

Download patch

ref: c22e26808314a4c7a631a9a35b2b69d6d0b0e150
parent: 317188b35f6ca58e2857fb483c36f000d2f348b2
author: mid-kid <esteve.varela@gmail.com>
date: Wed Feb 19 14:08:40 EST 2020

RTC -> UpdateTimeAndPals

Rename clear misnomer.
Most of the related functions in that file aren't really aptly named but
I don't know good names right now.

--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -92,7 +92,7 @@
 	ld h, [hl]
 	ld l, a
 
-	ld a, $5
+	ld a, $05 ; grass block
 	ld [hli], a
 	ld [hld], a
 	ld bc, SCREEN_WIDTH
--- a/engine/link/link_trade.asm
+++ b/engine/link/link_trade.asm
@@ -240,7 +240,7 @@
 	ret
 
 .loop2
-	call RTC
+	call UpdateTimeAndPals
 	call .TryAnims
 	ret c
 	ld a, [w2DMenuFlags1]
--- a/engine/menus/menu.asm
+++ b/engine/menus/menu.asm
@@ -344,7 +344,7 @@
 
 Do2DMenuRTCJoypad:
 .loopRTC
-	call RTC
+	call UpdateTimeAndPals
 	call Menu_WasButtonPressed
 	ret c
 	ld a, [w2DMenuFlags1]
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -295,7 +295,7 @@
 	ldh a, [hJoyPressed]
 	and A_BUTTON | B_BUTTON
 	ret nz
-	call RTC
+	call UpdateTimeAndPals
 	jr .loop
 
 WaitButton::
@@ -413,7 +413,7 @@
 	ldh a, [hJoyPressed]
 	and A_BUTTON | B_BUTTON
 	jr nz, .received_input
-	call RTC
+	call UpdateTimeAndPals
 	ld a, $1
 	ldh [hBGMapMode], a
 	call DelayFrame
--- a/home/names.asm
+++ b/home/names.asm
@@ -125,7 +125,7 @@
 	ld e, a
 	ld h, 0
 	ld l, a
-	add hl, hl ; hl = hl * 4
+	add hl, hl ; hl = hl * 2
 	add hl, hl ; hl = hl * 4
 	add hl, de ; hl = (hl*4) + de
 	add hl, hl ; hl = (5*hl) + (5*hl)
--- a/home/rtc.asm
+++ b/home/rtc.asm
@@ -1,4 +1,4 @@
-RTC::
+UpdateTimeAndPals::
 ; update time and time-sensitive palettes
 
 ; rtc enabled?