Skip to content

Commit

Permalink
GFX->Gfx and new push_oam.asm
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectroDeoxys committed Jul 30, 2024
1 parent 6739b46 commit b419dbc
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/gfx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ SECTION "Level Palettes", ROMX
INCLUDE "data/levels/palettes.asm"


SECTION "Animated Tile GFX", ROMX
SECTION "Animated Tile Gfx", ROMX

AnimatedTilesGfx::
AnimatedTiles1Gfx:: INCBIN "gfx/levels/animated/animated_tiles1.2bpp" ; ANIMATED_TILES_GFX_00
Expand Down Expand Up @@ -333,7 +333,7 @@ AnimatedTiles23Gfx:: INCBIN "gfx/levels/animated/animated_tiles23.2bpp" ; ANIMAT
AnimatedTiles24Gfx:: INCBIN "gfx/levels/animated/animated_tiles24.2bpp" ; ANIMATED_TILES_GFX_23


SECTION "Hidden Figure GFX", ROMX
SECTION "Hidden Figure Gfx", ROMX

HiddenFigure1Gfx:: INCBIN "gfx/enemies/hidden_figure1.2bpp"
HiddenFigure2Gfx:: INCBIN "gfx/enemies/hidden_figure2.2bpp"
Expand Down
1 change: 1 addition & 0 deletions src/home.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ INCLUDE "home/dpad_repeat.asm"
INCLUDE "home/vblank.asm"
INCLUDE "home/clear_memory.asm"
INCLUDE "home/joypad.asm"
INCLUDE "home/push_oam.asm"
INCLUDE "home/copy.asm"
INCLUDE "home/fade.asm"
INCLUDE "home/disable_lcd.asm"
Expand Down
4 changes: 2 additions & 2 deletions src/home/door_transition.asm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DoorTransition::
xor $1
ld [w3d506], a
jr z, .asm_96d
call Func_9a3
call .Func_9a3
jr .done
.asm_96d
ld hl, wPalFadeCounter
Expand All @@ -58,7 +58,7 @@ DoorTransition::
inc [hl]
jr .done

Func_9a3::
.Func_9a3:
ld a, [wPalFadeCounter]
cp $10
ret nc
Expand Down
2 changes: 2 additions & 0 deletions src/home/fade.asm
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,10 @@ VBlank_8bf::
ldh [rSCY], a
ld a, [wSCX]
ldh [rSCX], a

call LoadBGPalettesFromWRAM
call LoadOBPalettesFromWRAM

ld a, HIGH(wVirtualOAM)
call hTransferVirtualOAM
ret
9 changes: 0 additions & 9 deletions src/home/joypad.asm
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,3 @@ ENDR
ld a, P1F_GET_NONE
ldh [rP1], a
ret

PushOAM::
ldh [rDMA], a ; start DMA transfer (starts right after instruction)
ld a, 160 / (1 + 3) ; delay for a total of 160 cycles
.loop
dec a ; 1 cycle
jr nz, .loop ; 3 cycles
ret
.end
8 changes: 8 additions & 0 deletions src/home/push_oam.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PushOAM::
ldh [rDMA], a ; start DMA transfer (starts right after instruction)
ld a, 160 / (1 + 3) ; delay for a total of 160 cycles
.loop
dec a ; 1 cycle
jr nz, .loop ; 3 cycles
ret
.end
4 changes: 2 additions & 2 deletions src/layout.link
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ ROMX $33
"Level Palettes"
ROMX $34
"Update Animated Tiles"
"Animated Tile GFX"
"Animated Tile Gfx"
ROMX $35
"Clear Level"
ROMX $36
"Hidden Figure GFX"
"Hidden Figure Gfx"
"Game Over"
ROMX $37
"Perfect"
Expand Down

0 comments on commit b419dbc

Please sign in to comment.