Skip to content

Commit

Permalink
OpenDingux port, dual OPK, version bump, readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
szymor committed Apr 21, 2022
1 parent 288fb49 commit 133e73a
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ zlib1.dll
*.d
yatka.opk
yatka.zip
release/
38 changes: 38 additions & 0 deletions Makefile.gcw0
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.PHONY: all clean opk

BIN_BASE = /opt/gcw0/bin/
PROJECT = yatka-gcw0
OPK_NAME = yatka.opk
SRC = src/main.c src/data_persistence.c src/video.c src/sound.c \
src/state_gameover.c src/state_settings.c src/randomizer.c \
src/state_mainmenu.c src/skin.c
OBJ = $(SRC:.c=.o)
DEP = $(SRC:.c=.d)
CFLAGS = -Iinc -D_RETROFW -Ofast
LDFLAGS = -s $(shell $(BIN_BASE)pkg-config --libs sdl SDL_image SDL_ttf SDL_mixer)
CC = mipsel-linux-gcc

all: opk

opk: $(OPK_NAME)

$(PROJECT): $(OBJ)
$(CC) -o $(PROJECT) $(OBJ) $(LDFLAGS)

$(OPK_NAME): $(PROJECT) skins sfx music icon.png README.md LICENSE.md yatka.gcw0.desktop
mksquashfs $^ $@ -noappend -no-xattrs

src/%.o: src/%.c
$(CC) $(CFLAGS) -c -o $@ $<

src/%.d: src/%.c
@set -e; \
rm -f $@; \
$(CC) -MM $(CFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,src/\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$

clean:
rm -rf $(PROJECT) $(OBJ) $(DEP) src/*.d.* $(OPK_NAME)

-include $(DEP)
2 changes: 1 addition & 1 deletion Makefile.retrofw
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all clean opk

BIN_BASE = /opt/retrofw/bin/
PROJECT = yatka
PROJECT = yatka-retrofw
OPK_NAME = yatka.opk
SRC = src/main.c src/data_persistence.c src/video.c src/sound.c \
src/state_gameover.c src/state_settings.c src/randomizer.c \
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ I do not cover the topic in detail because there are many better sources on that
- some tetromino randomizers thanks to Simon Laroche ([link](https://simon.lc/the-history-of-tetris-randomizers))
- SRS wall kicks thanks to [Tetris Wiki](https://tetris.fandom.com/wiki/SRS)
- Elektronika60, Dotkom and Gamboi skins by GuineaSquiggle
- bug reporting by Apacz

## ideas / plans
- [v0.9] ports for other platforms
- [v0.9] better joystick support
- better joystick support (menu navigation, tetromino speed proportional to knob angle, on/off option, etc.)
- line clear animation (TGM?)
- new KiCAD skin with no tetromino stats (I got bored with them)
- some kind of system promoting sponsoring the project (sponsor-defined wishes shown during gameplay?)
Expand All @@ -85,3 +85,4 @@ I do not cover the topic in detail because there are many better sources on that

## sponsors
- Saikazu
- Loaderrr
31 changes: 31 additions & 0 deletions build-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/env bash

rm -rf release
mkdir release
TEMP=$PATH

# Miyoo
source path-miyoo
make -f Makefile.bittboy zip
mv yatka.zip release/yatka-bittboy.zip
make -f Makefile.bittboy clean
export PATH=$TEMP

# RetroFW + OpenDingux (dual opk)
source path-retrofw
make -f Makefile.retrofw yatka-retrofw
mv yatka-retrofw yatka
make -f Makefile.retrofw clean
mv yatka yatka-retrofw
export PATH=$TEMP

source path-gcw0
make -f Makefile.gcw0 yatka-gcw0
mv yatka-gcw0 yatka
make -f Makefile.gcw0 clean
mv yatka yatka-gcw0
export PATH=$TEMP

mksquashfs skins sfx music icon.png README.md LICENSE.md yatka.gcw0.desktop yatka-gcw0 yatka.retrofw.desktop yatka-retrofw yatka-dual.opk -noappend -no-xattrs
mv yatka-dual.opk release/
rm -f yatka-retrofw yatka-gcw0
11 changes: 11 additions & 0 deletions yatka.gcw0.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Desktop Entry]
Name=YATKA
Comment=Yet Another Tetris Klone in Action
Exec=yatka-gcw0
Terminal=false
Type=Game
StartupNotify=true
Icon=icon
Categories=games;
Version=20220421
X-OD-Manual=README.md
4 changes: 2 additions & 2 deletions yatka.retrofw.desktop
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[Desktop Entry]
Name=YATKA
Comment=Yet Another Tetris Klone in Action
Exec=yatka
Exec=yatka-retrofw
Terminal=false
Type=Game
StartupNotify=true
Icon=icon
Categories=games;
Version=20210906
Version=20220421
X-OD-Manual=README.md

0 comments on commit 133e73a

Please sign in to comment.