~nytpu/ankano unlisted

3ca75555dfc4c1aac4be0ceb79bc8ee4a4f0f55d — nytpu 5 months ago c993228
fix
5 files changed, 17 insertions(+), 5 deletions(-)

M include/defines.asm
M src/header.asm
M src/intro.asm
M src/loop.asm
M src/text.asm
M include/defines.asm => include/defines.asm +0 -1
@@ 61,4 61,3 @@ error: MACRO
		jr \1, @-1
	ENDC
ENDM


M src/header.asm => src/header.asm +1 -2
@@ 1,5 1,5 @@
; Copyright (C) 2020 nytpu
; This file incorporates code from: 
; This file incorporates code from:
; Copyright (C) 2018-2020 Eldred Habert
;
; This file is licensed under the terms of the MIT License.


@@ 146,4 146,3 @@ wShadowOAM::
SECTION "Stack", WRAM0[$E000 - STACK_SIZE]
	ds STACK_SIZE
wStackBottom:


M src/intro.asm => src/intro.asm +1 -1
@@ 6,8 6,8 @@ INCLUDE "defines.asm"

SECTION "Intro", ROMX
; render the intro scene
; @destroy all
Intro::
	; TODO: animate intro logo
	; TODO: create start screen
	jp EnterMainLoop


M src/loop.asm => src/loop.asm +3 -1
@@ 5,6 5,8 @@
INCLUDE "defines.asm"

SECTION "Game Loop", ROM0
; initialize stuff for main game loop
; @destroy all
EnterMainLoop::
	di
	; wait for vblank and turn lcd off


@@ 38,7 40,7 @@ INCLUDE "res/spritemap.2bpp.pb16.size"
	ld b, NB_PB16_BLOCKS
	PURGE NB_PB16_BLOCKS
	call pb16_unpack_block
	

	ld a, LCDCF_ON | LCDCF_BGON | LCDCF_BG9800 | LCDCF_BG8800
	ldh [rLCDC], a


M src/text.asm => src/text.asm +12 -0
@@ 18,6 18,9 @@ INCBIN "res/font.2bpp.pb16"
.end

SECTION "Text Engine", ROM0
; loads font tiles into vram bank
; @param hl start of vram block to copy to
; @destroy all
InitTextEngine::
	; save current bank then change
	ldh a, [hCurROMBank]


@@ 39,3 42,12 @@ INCLUDE "res/font.2bpp.pb16.size"
	ld [rROMB0], a
	ret

; display text to screen
; @param hl start of vram to copy to
; @param de pointer to start of text string
DispText::
	ldh a, [hCurROMBank]
	ldh [hTempByte], a
	ldh a, BANK(Strings)
	ldh [hCurROMBank], a
	ld [rROMB0], a