~nytpu/ankano unlisted

ff090c0859f847d23a4c99fed7c44c6f1cb036d4 — nytpu 4 months ago 434f17f
remove broken text engine and temporarily remove structs due to incompatibility with current rgbds versions
2 files changed, 2 insertions(+), 54 deletions(-)

M include/defines.asm
D src/text.asm
M include/defines.asm => include/defines.asm +2 -1
@@ 13,7 13,8 @@
INCLUDE "hardware.inc/hardware.inc"
	rev_Check_hardware_inc 3.0

INCLUDE "rgbds-structs/structs.asm"
; structs is broken on newest rgbds version
;INCLUDE "rgbds-structs/structs.asm"

;INCLUDE "gb-vwf/vwf.asm"


D src/text.asm => src/text.asm +0 -53
@@ 1,53 0,0 @@
; Copyright (C) 2020 nytpu
; This file is licensed under the terms of the MIT License.
; For more license details, see LICENSE or <https://mit-license.org/>.

INCLUDE "defines.asm"

	newcharmap primary_font
FONTCHARS equs "0123456789ABCDEFGHUJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz .!?:-"
CURCHAR = 0
REPT STRLEN("{FONTCHARS}")
	charmap STRSUB("{FONTCHARS}", CURCHAR + 1, 1), CURCHAR
CURCHAR = CURCHAR + 1
ENDR

SECTION "Font Tiles", ROMX
FontTiles:
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]
	ldh [hTempByte], a
	ld a, BANK(FontTiles)
	ldh [hCurROMBank], a
	ld [rROMB0], a

	ld de, FontTiles
	ld hl, _VRAM8800
INCLUDE "res/font.2bpp.pb16.size"
	ld bc, NB_PB16_BLOCKS
	PURGE NB_PB16_BLOCKS
	call pb16_unpack_block

	; restore old bank
	ldh a, [hTempByte]
	ldh [hCurROMBank], a
	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