gameboy/game/game.asm

40 lines
797 B
NASM

INCLUDE "game/text.asm"
INCLUDE "game/controller.asm"
; Shadow OAM, allows us to have a shadow copy of all sprites for
; editing whenever we want
SECTION "ram_shadowoam", WRAM0,ALIGN[8]
shadow_oam:
ds 160
shadow_oam_inuse:
ds 1
SECTION "Game Loop", ROM0
GameLoop:
ld de, FirstCutScene
call StartText
.mainloop ; Our main game loop
call UpdateController ; Update our controller
; Reset our oam sprites in use
xor a
ld [shadow_oam_inuse], a
; Call sprite handlers
; Call other handlers
call WaitVBlank
call DrawActiveText
call RunDMA
jr .mainloop
Section "Hello wrold string", ROM0
FirstCutScene:
; [ ]
db "...wake up...\n"
db "please wake up...", "#"
db "...we don't have\n"
db "time, wake up...", 0