shithub: pokecrystal

Download patch

ref: 3c7ba37de72795e46c76f791b50b4a3d89ba0c2c
parent: 3203ad7d50f6558cba8494a4e93d095d16c5e0d2
author: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>
date: Tue Jan 30 09:47:14 EST 2018

Fix wVirtualOAM labels, part 1.

--- a/engine/battle_anims/functions.asm
+++ b/engine/battle_anims/functions.asm
@@ -1611,7 +1611,7 @@
 	ld hl, BATTLEANIMSTRUCT_10
 	add hl, bc
 	ld e, [hl]
-	ld hl, hPushOAM ; $ff80
+	ld hl, hTransferVirtualOAM ; $ff80
 	add hl, de
 	ld e, l
 	ld d, h
@@ -2104,7 +2104,7 @@
 	ld hl, BATTLEANIMSTRUCT_0F
 	add hl, bc
 	ld e, [hl]
-	ld hl, hPushOAM ; $ff80
+	ld hl, hTransferVirtualOAM ; $ff80
 	add hl, de
 	ld e, l
 	ld d, h
@@ -3332,7 +3332,7 @@
 	ld hl, BATTLEANIMSTRUCT_0F
 	add hl, bc
 	ld e, [hl]
-	ld hl, hPushOAM ; $ff80
+	ld hl, hTransferVirtualOAM ; $ff80
 	add hl, de
 	ld e, l
 	ld d, h
--- a/engine/routines/loadpushoam.asm
+++ b/engine/routines/loadpushoam.asm
@@ -1,5 +1,5 @@
-LoadPushOAM:: ; 4031
-	ld c, hPushOAM - $ff00
+WriteOAMDMACodeToHRAM:: ; 4031
+	ld c, hTransferVirtualOAM - $ff00
 	ld b, .PushOAMEnd - .PushOAM
 	ld hl, .PushOAM
 .loop
--- a/home/init.asm
+++ b/home/init.asm
@@ -103,10 +103,10 @@
 	call ClearsScratch
 
 
-	ld a, BANK(LoadPushOAM)
+	ld a, BANK(WriteOAMDMACodeToHRAM)
 	rst Bankswitch
 
-	call LoadPushOAM
+	call WriteOAMDMACodeToHRAM
 
 	xor a
 	ld [hMapAnims], a
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -113,7 +113,7 @@
 	ld a, [hOAMUpdate]
 	and a
 	jr nz, .done_oam
-	call hPushOAM
+	call hTransferVirtualOAM
 .done_oam
 
 
@@ -192,7 +192,7 @@
 	call UpdateBGMap
 	call Serve2bppRequest_VBlank
 
-	call hPushOAM
+	call hTransferVirtualOAM
 .done
 
 	xor a
@@ -282,7 +282,7 @@
 	call UpdateBGMap
 	call Serve2bppRequest_VBlank
 
-	call hPushOAM
+	call hTransferVirtualOAM
 .done
 
 	xor a
@@ -338,7 +338,7 @@
 	call UpdateBGMap
 	call Serve2bppRequest
 
-	call hPushOAM
+	call hTransferVirtualOAM
 
 	call Joypad
 
--- a/hram.asm
+++ b/hram.asm
@@ -2,7 +2,7 @@
 ; "ld a, [hAddress]" and "ld [hAddress], a" will
 ; use the more efficient "ldh" instruction.
 
-hPushOAM           EQU $ff80 ; 10 bytes
+hTransferVirtualOAM           EQU $ff80 ; 10 bytes
 
 hROMBankBackup     EQU $ff8a
 hBuffer            EQU $ff8b