Skip to content

Commit

Permalink
Add brew-volley example
Browse files Browse the repository at this point in the history
  • Loading branch information
SpookyIluha committed Aug 25, 2023
1 parent f8af020 commit 6cf626e
Show file tree
Hide file tree
Showing 14 changed files with 650 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
all: audioplayer cpptest ctest dfsdemo fontdemo gldemo mixertest mptest mputest rdpqdemo rspqdemo spritemap test timers vrutest vtest pixelshader eepromfstest overlays
clean: audioplayer-clean cpptest-clean ctest-clean dfsdemo-clean fontdemo-clean gldemo-clean mixertest-clean mptest-clean mputest-clean rdpqdemo-clean rspqdemo-clean spritemap-clean test-clean timers-clean vrutest-clean vtest-clean pixelshader-clean eepromfstest-clean overlays-clean
all: audioplayer brew_volley cpptest ctest dfsdemo fontdemo gldemo mixertest mptest mputest rdpqdemo rspqdemo spritemap test timers vrutest vtest pixelshader eepromfstest overlays
clean: audioplayer-clean brew_volley-clean cpptest-clean ctest-clean dfsdemo-clean fontdemo-clean gldemo-clean mixertest-clean mptest-clean mputest-clean rdpqdemo-clean rspqdemo-clean spritemap-clean test-clean timers-clean vrutest-clean vtest-clean pixelshader-clean eepromfstest-clean overlays-clean

audioplayer:
$(MAKE) -C audioplayer
audioplayer-clean:
$(MAKE) -C audioplayer clean

brew_volley:
$(MAKE) -C brew-volley
brew_volley-clean:
$(MAKE) -C brew-volley clean

cpptest:
$(MAKE) -C cpptest
cpptest-clean:
Expand Down
4 changes: 4 additions & 0 deletions examples/brew-volley/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
filesystem/
*.z64
*.z64
58 changes: 58 additions & 0 deletions examples/brew-volley/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
TARGET=brew_volley
BUILD_DIR=build
FSYSTEM_DIR=filesystem
include $(N64_INST)/include/n64.mk

src = main.c
assets_xm = $(wildcard assets/*.xm)
assets_wav = $(wildcard assets/*.wav)
assets_png = $(wildcard assets/*.png)
assets_ttf = $(wildcard assets/*.ttf)

assets_conv = $(addprefix filesystem/,$(notdir $(assets_xm:%.xm=%.xm64))) \
$(addprefix filesystem/,$(notdir $(assets_wav:%.wav=%.wav64))) \
$(addprefix filesystem/,$(notdir $(assets_ttf:%.ttf=%.font64))) \
$(addprefix filesystem/,$(notdir $(assets_png:%.png=%.sprite)))

#N64_CFLAGS = -Wno-error
AUDIOCONV_FLAGS ?=
MKSPRITE_FLAGS ?=

all: $(TARGET).z64

filesystem/%.xm64: assets/%.xm
@mkdir -p $(dir $@)
@echo " [AUDIO] $@"
@$(N64_AUDIOCONV) $(AUDIOCONV_FLAGS) -o filesystem $<

filesystem/%.wav64: assets/%.wav
@mkdir -p $(dir $@)
@echo " [AUDIO] $@"
@$(N64_AUDIOCONV) --wav-compress 1 -o filesystem $<

filesystem/%.sprite: assets/%.png
@mkdir -p $(dir $@)
@echo " [SPRITE] $@"
@$(N64_MKSPRITE) --format RGBA32 $(MKSPRITE_FLAGS) -o filesystem "$<"

filesystem/%.font64: assets/%.ttf
@mkdir -p $(dir $@)
@echo " [FONT] $@"
@$(N64_MKFONT) $(MKFONT_FLAGS) -o filesystem "$<"

filesystem/n64brew.sprite: MKSPRITE_FLAGS=--format RGBA32 --tiles 32,32
filesystem/background.sprite: MKSPRITE_FLAGS=--format RGBA16 --tiles 32,32
filesystem/Pacifico.font64: MKFONT_FLAGS+=--size 32

$(BUILD_DIR)/$(TARGET).dfs: $(assets_conv)
$(BUILD_DIR)/$(TARGET).elf: $(src:%.c=$(BUILD_DIR)/%.o)

$(TARGET).z64: N64_ROM_TITLE="N64brew GameJam 4"
$(TARGET).z64: $(BUILD_DIR)/$(TARGET).dfs

clean:
rm -rf $(BUILD_DIR) $(FSYSTEM_DIR) $(TARGET).z64

-include $(wildcard $(BUILD_DIR)/*.d)

.PHONY: all clean
17 changes: 17 additions & 0 deletions examples/brew-volley/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Brew Volley

This is a modified MULLER Marian's (tfmoe__) entry for the N64brew Game Jam #4 (a.k.a N64brew Summer Game Jam). Released as a Libdragon example with the permission from the author.

The game should be played with two controllers.

This example shows how one can easily build a simple game with unstable Libdragon SDK using RDPQ library.

# Assets attributions

Music: Be Chillin' by Alexander Nakarada ["(www.serpentsoundstudios.com)"](http://www.serpentsoundstudios.com) Licensed under ["Creative Commons: By Attribution 4.0 License"](http://creativecommons.org/licenses/by/4.0/)

Background: ["Coconut tree near shore within mountain range" by Elizeu Dias](https://unsplash.com/photos/RN6ts8IZ4_0) Licensed under Unsplash license.

Code is licensed under Unlicense.

Everything else in this example is licensed under CC0.
Binary file added examples/brew-volley/assets/Pacifico.ttf
Binary file not shown.
Binary file added examples/brew-volley/assets/background.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 added examples/brew-volley/assets/ball.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 added examples/brew-volley/assets/halt.wav
Binary file not shown.
Binary file added examples/brew-volley/assets/hit.wav
Binary file not shown.
Binary file added examples/brew-volley/assets/music.wav
Binary file not shown.
Binary file added examples/brew-volley/assets/n64brew.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 added examples/brew-volley/assets/net.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 added examples/brew-volley/assets/win.wav
Binary file not shown.
Loading

0 comments on commit 6cf626e

Please sign in to comment.