Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switched to mode 4 #8

Merged
merged 8 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ code/build/*.map
#!code/build/soundbank.h
#!code/build/soundbank.bin
#!code/build/soundbank_bin.h
code/include
code/include/*.h
out/*.elf
out/*.gba
out/*.sav
out/*.sav
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "gba-link-connection-c"]
path = code/include/gba-link-connection-c
url = https://git.sr.ht/~exelotl/gba-link-connection-c
24 changes: 14 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ build_image: clean_docker
.PHONY: run
run: compile
mgba-qt -4 $$(pwd)/out/game.gba
# NanoBoyAdvance $$(pwd)/out/game.gba

# compiles the code into a .gba files, found in the /out folder
.PHONY: compile
Expand All @@ -26,7 +25,7 @@ compile: clean_out clean_sound

# gets include files from libgba and libtonc to the include folder
.PHONY: getincludes
getincludes:
getincludes:
-@docker run \
--cidfile=c.cid \
$(VENDORNAME)/$(PROJECTNAME)/$(CONTAINERNAME):dev \
Expand All @@ -37,27 +36,32 @@ getincludes:

# dont overwrite existing files
.PHONY: grit_all
grit_all:
grit_all:
for file in code/img/*.png; \
do test -f $${file%.*}.h || \
make grit img=$${file#*/} args="-ftc -gb -gB16"; \
make grit_mode4 img=$${file#*/}; \
done

# overwrite existing .c and .h files
.PHONY: grit_all_force
grit_all_force:
grit_all_force:
for file in code/img/*.png; \
do make grit img=$${file#*/} args="-ftc -gb -gB16"; \
do make grit_mode4 img=$${file#*/}; \
done

# example "make grit_gB16 img=img/pong_tc.png"
# example "make grit_mode3 img=img/pong_tc.png"
.PHONY: grit_mode3
grit_mode3:
grit_mode3:
make grit img=$(img) args="-ftc -gb -gB16"

# example "make grit_mode4 img=img/pong_tc.png"
.PHONY: grit_mode4
grit_mode4:
make grit img=$(img) args="-ftc -gb -gB8 -aw 240 -ah 160"

# example "make grit img=img/pong_tc.png args="-ftc -gb -gB16""
.PHONY: grit
grit:
grit:
docker run \
-v $$(pwd)/code:/${USER} \
-v $$(pwd)/out:/out \
Expand Down Expand Up @@ -89,7 +93,7 @@ clean_out:
clean_docker:
docker image rm -f $(VENDORNAME)/$(PROJECTNAME)/$(CONTAINERNAME):dev

# delete all h files from the include folder (from devkitarm)
# delete all h files from the include folder (from devkitarm)
.PHONY: deleteincludes
deleteincludes:
rm $$(pwd)/code/include/*.h
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ _____
* use `make grit img=[your path starting from the, excluding, /code folder] args="[your arguments]"`
* for example: `make grit img=img/pong_logo.png args="-ftc -gb -gB16"`
* after that just include the generated file and memcopy your image to the vram
* for example: `tonccpy(m3_mem, pong_logoBitmap, 76800)`
* for example: `tonccpy(m4_mem, pong_logoBitmap, 76800)`
_____

###### Repository created and maintained by [tolik518](https://github.com/tolik518).
Expand Down
Binary file modified code/audio/click.wav
Binary file not shown.
4,096 changes: 1,393 additions & 2,703 deletions code/img/title_0.c

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions code/img/title_0.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,096 changes: 1,393 additions & 2,703 deletions code/img/title_1.c

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions code/img/title_1.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,096 changes: 1,393 additions & 2,703 deletions code/img/title_2.c

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions code/img/title_2.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading