Skip to content

Commit

Permalink
OAM improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dreams897 committed Jun 19, 2023
1 parent b8c4f01 commit ab04d13
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions home/update_sprites.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ UpdateSprites::
ld a, [wUpdateSpritesEnabled]
dec a
ret nz
ld hl, hSkipOAMUpdates
set 0, [hl]
homecall _UpdateSprites
ld hl, hSkipOAMUpdates
res 0, [hl]
ret
6 changes: 5 additions & 1 deletion home/vblank.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ VBlank::
call RedrawRowOrColumn
call VBlankCopy
call VBlankCopyDouble
;call UpdateMovingBgTiles
;call UpdateMovingBgTiles
ld a, [hSkipOAMUpdates]
bit 0, a
jr nz, .skipOAM
call hDMARoutine
rst $10 ; HAX: VBlank hook (loads palettes)
nop
Expand All @@ -42,6 +45,7 @@ VBlank::
nop
nop
;call PrepareOAMData
.skipOAM
nop
nop
nop
Expand Down
2 changes: 1 addition & 1 deletion ram/hram.asm
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ hWhoseTurn:: db ; 0 on player's turn, 1 on enemy's turn

hClearLetterPrintingDelayFlags:: db

ds 1
hSkipOAMUpdates:: db

; bit 0: draw HP fraction to the right of bar instead of below (for party menu)
; bit 1: menu is double spaced
Expand Down

0 comments on commit ab04d13

Please sign in to comment.