Revert sprite-based stairs back to tile-based stairs
This commit is contained in:
@@ -9,26 +9,24 @@ SCRIPTS_DIR = scripts
|
||||
BUILD_DIR = build
|
||||
|
||||
# C source files
|
||||
SRCS = $(SRC_DIR)/main.c $(SRC_DIR)/engine.c $(SRC_DIR)/globals.c $(SRC_DIR)/maze.c $(SRC_DIR)/sound.c $(SRC_DIR)/render.c $(SRC_DIR)/player_logic.c $(SRC_DIR)/enemy_logic.c $(SRC_DIR)/tiles.c $(SRC_DIR)/player.c $(SRC_DIR)/enemy.c $(SRC_DIR)/gameover.c $(SRC_DIR)/victory.c $(SRC_DIR)/stamina.c $(SRC_DIR)/title_bg.c $(SRC_DIR)/stairs_sprite.c
|
||||
SRCS = $(SRC_DIR)/main.c $(SRC_DIR)/engine.c $(SRC_DIR)/globals.c $(SRC_DIR)/maze.c $(SRC_DIR)/sound.c $(SRC_DIR)/render.c $(SRC_DIR)/player_logic.c $(SRC_DIR)/enemy_logic.c $(SRC_DIR)/tiles.c $(SRC_DIR)/player.c $(SRC_DIR)/enemy.c $(SRC_DIR)/gameover.c $(SRC_DIR)/victory.c $(SRC_DIR)/stamina.c $(SRC_DIR)/title_bg.c
|
||||
|
||||
all: $(BUILD_DIR)/hello_iso.gb $(BUILD_DIR)/test_gameover.gb $(BUILD_DIR)/test_sprite_stairs.gb
|
||||
all: $(BUILD_DIR)/hello_iso.gb $(BUILD_DIR)/test_gameover.gb
|
||||
|
||||
# Generate image assets
|
||||
generate_images: $(SCRIPTS_DIR)/generate_assets.py $(SCRIPTS_DIR)/generate_enemy.py $(SCRIPTS_DIR)/generate_stairs_sprite.py
|
||||
generate_images: $(SCRIPTS_DIR)/generate_assets.py $(SCRIPTS_DIR)/generate_enemy.py
|
||||
cd $(ASSETS_DIR) && python3 ../$(SCRIPTS_DIR)/generate_assets.py
|
||||
cd $(ASSETS_DIR) && python3 ../$(SCRIPTS_DIR)/generate_enemy.py
|
||||
cd $(ASSETS_DIR) && python3 ../$(SCRIPTS_DIR)/generate_stairs_sprite.py
|
||||
|
||||
# Convert image assets to C source files
|
||||
generate_c_assets: generate_images
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/tiles.png -c $(SRC_DIR)/tiles.c -map -bpp 2 -noflip -keep_palette_order
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/player.png -c $(SRC_DIR)/player.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order -spr8x16
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/enemy.png -c $(SRC_DIR)/enemy.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order -sp 0x10 -spr8x16
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/gameover.png -c $(SRC_DIR)/gameover.c -bpp 2 -noflip -keep_palette_order -spr8x16
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/victory.png -c $(SRC_DIR)/victory.c -bpp 2 -noflip -keep_palette_order -spr8x16
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/stamina.png -c $(SRC_DIR)/stamina.c -bpp 2 -noflip -keep_palette_order -spr8x16
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/player.png -c $(SRC_DIR)/player.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/enemy.png -c $(SRC_DIR)/enemy.c -sw 16 -sh 16 -bpp 2 -noflip -keep_palette_order -sp 0x10
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/gameover.png -c $(SRC_DIR)/gameover.c -bpp 2 -noflip -keep_palette_order
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/victory.png -c $(SRC_DIR)/victory.c -bpp 2 -noflip -keep_palette_order
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/stamina.png -c $(SRC_DIR)/stamina.c -bpp 2 -noflip -keep_palette_order
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/title_bg.png -c $(SRC_DIR)/title_bg.c -map -bpp 2 -noflip -keep_palette_order -max_palettes 1
|
||||
$(PNG2ASSET) $(ASSETS_DIR)/stairs_sprite.png -c $(SRC_DIR)/stairs_sprite.c -sw 32 -sh 16 -bpp 2 -noflip -keep_palette_order -spr8x16
|
||||
|
||||
# Main ROM target
|
||||
$(BUILD_DIR)/hello_iso.gb: generate_c_assets $(SRCS)
|
||||
@@ -40,11 +38,6 @@ $(BUILD_DIR)/test_gameover.gb: generate_c_assets $(SRC_DIR)/test_gameover_render
|
||||
mkdir -p $(BUILD_DIR)
|
||||
$(LCC) -Wa-l -Wl-m -Wl-j -o $(BUILD_DIR)/test_gameover.gb $(SRC_DIR)/test_gameover_render.c $(SRC_DIR)/player.c $(SRC_DIR)/enemy.c $(SRC_DIR)/gameover.c $(SRC_DIR)/stamina.c
|
||||
|
||||
# Sprite Stairs Test ROM target
|
||||
$(BUILD_DIR)/test_sprite_stairs.gb: generate_c_assets $(SRCS)
|
||||
mkdir -p $(BUILD_DIR)
|
||||
$(LCC) -DUSE_SPRITE_STAIRS $(LCCFLAGS) -o $(BUILD_DIR)/test_sprite_stairs.gb $(SRCS)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD_DIR)/*
|
||||
rm -f $(SRC_DIR)/tiles.c $(SRC_DIR)/tiles.h
|
||||
@@ -54,4 +47,3 @@ clean:
|
||||
rm -f $(SRC_DIR)/victory.c $(SRC_DIR)/victory.h
|
||||
rm -f $(SRC_DIR)/stamina.c $(SRC_DIR)/stamina.h
|
||||
rm -f $(SRC_DIR)/title_bg.c $(SRC_DIR)/title_bg.h
|
||||
rm -f $(SRC_DIR)/stairs_sprite.c $(SRC_DIR)/stairs_sprite.h
|
||||
|
||||
Reference in New Issue
Block a user