aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-05-15 16:27:36 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-05-15 16:27:36 +0200
commit122654c1ef9d99af8210ce95dee4eb4d1bc04b67 (patch)
tree20315f7fab69df8d6fa5f7b6fef4556c57c7e5e7 /Makefile
parent2f1f5a23ea8a7cbace2c5e18996728adc572cbc0 (diff)
downloadjetpac.nes-122654c1ef9d99af8210ce95dee4eb4d1bc04b67.tar.gz
jetpac.nes-122654c1ef9d99af8210ce95dee4eb4d1bc04b67.zip
Define the notion of a level
This is for now just a variable that will be set during initialization, and that it can be influenced through the `LEVEL` make variable. Both the level and the level "kind" notions are used tracking, at least, which kind of enemy wave we have to send. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a00dc6b..91bd0dd 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,10 @@ endif
RUBY ?= ruby
HAS_RUBY := $(shell command -v $(RUBY) >/dev/null 2>&1 && echo true || echo false)
+##
+# Variables for building the game.
+LEVEL ?= 0
+
.PHONY: all
all: clean deps build
@@ -54,6 +58,7 @@ build: gen-values build-full build-partial build-pal
build-full:
$(Q) rm -f config/generated.s
$(Q) echo "HZ = 60" >> config/generated.s
+ $(Q) echo "LEVEL = $(LEVEL)" >> config/generated.s
$(E) " CC jetpac (NTSC)"
$(Q) $(CC65) $(CCOPTS) src/jetpac.s -C config/nrom.cfg -o "out/Jetpac (NTSC).nes"
@@ -63,6 +68,7 @@ build-partial:
$(Q) rm -f config/generated.s
$(Q) echo "PARTIAL = 1" >> config/generated.s
$(Q) echo "HZ = 60" >> config/generated.s
+ $(Q) echo "LEVEL = $(LEVEL)" >> config/generated.s
$(E) " CC jetpac (partial)"
$(Q) $(CC65) $(CCOPTS) src/jetpac.s -C config/nrom.cfg -o "out/Jetpac (DEV).nes"
@@ -72,6 +78,7 @@ build-pal:
$(Q) rm -f config/generated.s
$(Q) echo "PAL = 1" >> config/generated.s
$(Q) echo "HZ = 50" >> config/generated.s
+ $(Q) echo "LEVEL = $(LEVEL)" >> config/generated.s
$(E) " CC jetpac (PAL)"
$(Q) $(CC65) $(CCOPTS) src/jetpac.s -C config/nrom.cfg -o "out/Jetpac (PAL).nes"