From: Lukas Krickl Date: Fri, 4 Oct 2024 17:31:01 +0000 (+0200) Subject: Added test build to makefile X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=6687f916ee0bce17a60f2c1be3067091ad47dfcb;p=gbrg%2F.git Added test build to makefile --- diff --git a/makefile b/makefile index fb776a8..ae213ba 100644 --- a/makefile +++ b/makefile @@ -6,6 +6,10 @@ all: mkdir -p $(BDIR) ulas -v -o $(BDIR)/$(BIN) -l bin/rg.lst -s bin/rg.mlb -S mlb -i ./src -i ./tiles src/main.s +test: + mkdir -p $(BDIR) + ulas -v -o $(BDIR)/test$(BIN) -D TEST_BUILD -l bin/testrg.lst -s bin/testrg.mlb -S mlb -i ./src -i ./tiles src/main.s + .PHONY: tiles tiles: ./tools/png2chr.py assets/tiles0.png > tiles/tileset0.inc diff --git a/src/main.s b/src/main.s index a77c47e..680a127 100644 --- a/src/main.s +++ b/src/main.s @@ -23,6 +23,8 @@ entry: call enableinterrupts + ; main for gameply +#ifndef TEST_BUILD main: @forever: ld a, [frame_ready] @@ -32,6 +34,14 @@ main: xor a, a ld [frame_ready], a jr @forever REL +#endif + + ; main for test-runner build +#ifdef TEST_BUILD +main: +@forever: + jr @forever REL +#endif #include "video.s" #include "mem.s" diff --git a/src/ui.s b/src/ui.s index 6479c6a..eb1beab 100644 --- a/src/ui.s +++ b/src/ui.s @@ -32,7 +32,9 @@ ui_init: ret - ; draws a UI bar + ; draws a UI bar + ; the bar will be filled up to hp/mp + ; al others will be empty ; inputs: ; hl: screen location ; [de]: ptr to hp/mp where hp/mp max is [de+1]