Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danilolc committed May 20, 2023
1 parent 1cb9ea4 commit 07df09f
Show file tree
Hide file tree
Showing 18 changed files with 650 additions and 413 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
*.4bpp

/bin/
/build/

38 changes: 38 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Add OAMS
# Add sound (music, sfx)
# Game logic


PNG_FILES = $(wildcard gfx/*.png)

PNG_NAMES = $(addprefix build/, $(subst gfx/, ,$(basename $(PNG_FILES))))
PNG_FILES_MAP = $(addsuffix _map.bin, $(PNG_NAMES))
PNG_FILES_TILES = $(addsuffix _tiles.bin, $(PNG_NAMES))

all: output.gb

output.gb: main.asm.o
@rgblink -o $@ --map output.map main.asm.o
@rgbfix -v $@ -p 0xff
@echo DONE!

main.asm.o: main.asm
@echo ASSEMBLING
@rgbasm $^ -o $@ -l -H

main.asm: $(PNG_FILES_TILES)
@echo a

build/%_tiles.bin: gfx/%.png
@echo PNG file $*.png changed!
@mkdir -p build
@cp -f $^ build/$*.png
@./bin/png2asset build/$*.png -map -bin -keep_palette_order -noflip

clean:
@rm -r build
@rm output.gb
@rm main.asm.o
@rm output.map

.PHONY: all clean
32 changes: 29 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
rgbasm main.asm -o main.asm.o -l -H
rgblink -o output.gb --map output.map main.asm.o
rgbfix -v output.gb -p 0xff
#cp gfx/penguin.png build/penguin.png
#cp gfx/sd.png build/sd.png

#cp gfx/logo.png build/logo.png
#cp gfx/stars.png build/stars.png
#cp gfx/text.png build/text.png

#./bin/png2asset gfx/penguin.png -map -bin -keep_palette_order -noflip
#./bin/png2asset gfx/penguin.png -map -bin -keep_palette_order -noflip

#rgbasm main.asm -o main.asm.o -l -H
#rgblink -o output.gb --map output.map main.asm.o
#rgbfix -v output.gb -p 0xff

OUTPUT = output.gb
ASM_FILE = main.asm

all: $(OUTPUT)

$(OUTPUT): $(ASM_FILE)
rgblink -o $@ --map output.map main.asm.o
rgbfix -v $@ -p 0xff

$(ASM_FILE): $(PNG_FILES)
rgbasm $@ -o main.asm.o -l -H

$(PNG_FILES):
cp gfx/$@ build/$@
./bin/png2asset build/$@ -map -bin -keep_palette_order -noflip
40 changes: 36 additions & 4 deletions definitions/memory.inc
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
SECTION "hram0", HRAM
hTransition:
rLogoTransition:
db

rButtons:
db

OAMF_hram:
ds 5
OAMF_hram_end:
SECTION "wram0", WRAM0
OAM_Data_wram:
ds 160

MACRO setvblanki
ld hl, VBLANKF_wram + 1
ld a, LOW(\1)
ld [hli], a
ld a, HIGH(\1)
ld [hli], a
ENDM

;;;;;;;;;;;;;;; LOGO Screens
Screen1X:
db
Screen1Y:
Expand All @@ -20,10 +34,28 @@ Screen2Y:
db
Screen2C:
db
Position:
;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;; Spaceship
Ship1_PosXTimer: ; Timer: bit 7 direction, bit 6-0 timer
db

Ship2_PosYTimer:
db

Frame_Counter: ; Used to repeating actions, like "press start" blinking
db
;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;
InGame:
db





VBLANKF_wram:
ds 3
130 changes: 0 additions & 130 deletions gfx/duck.inc

This file was deleted.

Binary file added gfx/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gfx/penguin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gfx/sd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed gfx/sd_map.bin
Binary file not shown.
Binary file removed gfx/sd_tiles.bin
Binary file not shown.
Binary file added gfx/stars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 07df09f

Please sign in to comment.