Skip to content

Commit

Permalink
Fix wVirtualOAM labels, part 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
luckytyphlosion committed Jan 30, 2018
1 parent 3203ad7 commit 3c7ba37
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions engine/battle_anims/functions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ Functioncd913: ; cd913 (33:5913)
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
Expand Down Expand Up @@ -2104,7 +2104,7 @@ asm_cdbfa: ; cdbfa (33:5bfa)
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
Expand Down Expand Up @@ -3332,7 +3332,7 @@ Functionce306: ; ce306 (33:6306)
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
Expand Down
4 changes: 2 additions & 2 deletions engine/routines/loadpushoam.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
LoadPushOAM:: ; 4031
ld c, hPushOAM - $ff00
WriteOAMDMACodeToHRAM:: ; 4031
ld c, hTransferVirtualOAM - $ff00
ld b, .PushOAMEnd - .PushOAM
ld hl, .PushOAM
.loop
Expand Down
4 changes: 2 additions & 2 deletions home/init.asm
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ Init:: ; 17d
call ClearsScratch


ld a, BANK(LoadPushOAM)
ld a, BANK(WriteOAMDMACodeToHRAM)
rst Bankswitch

call LoadPushOAM
call WriteOAMDMACodeToHRAM

xor a
ld [hMapAnims], a
Expand Down
8 changes: 4 additions & 4 deletions home/vblank.asm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ VBlank0:: ; 2b1
ld a, [hOAMUpdate]
and a
jr nz, .done_oam
call hPushOAM
call hTransferVirtualOAM
.done_oam


Expand Down Expand Up @@ -192,7 +192,7 @@ VBlank1:: ; 337
call UpdateBGMap
call Serve2bppRequest_VBlank

call hPushOAM
call hTransferVirtualOAM
.done

xor a
Expand Down Expand Up @@ -282,7 +282,7 @@ VBlank3:: ; 396
call UpdateBGMap
call Serve2bppRequest_VBlank

call hPushOAM
call hTransferVirtualOAM
.done

xor a
Expand Down Expand Up @@ -338,7 +338,7 @@ VBlank4:: ; 3df
call UpdateBGMap
call Serve2bppRequest

call hPushOAM
call hTransferVirtualOAM

call Joypad

Expand Down
2 changes: 1 addition & 1 deletion hram.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3c7ba37

Please sign in to comment.