ahumeniy / flipperzero_tetris_game Goto Github PK
View Code? Open in Web Editor NEWTetris game for Flipper Zero
Tetris game for Flipper Zero
As of Official Stable 0.85.2, DOLPHIN_DEED has changed to dolphin_deed. To fix, change DOLPHIN_DEED to dolphin_deed on line 394 of tetris_game.c
LoadAppManifest, line 33, in file "/home/cds/src/flipperzero-firmware/scripts/fbt_tools/fbt_apps.py"
CC applications_user/flipperzero_tetris_game/tetris_game.c
applications_user/flipperzero_tetris_game/tetris_game.c: In function 'tetris_game_app':
applications_user/flipperzero_tetris_game/tetris_game.c:394:5: error: implicit declaration of function 'DOLPHIN_DEED' [-Werror=implicit-function-declaration]
394 | DOLPHIN_DEED(DolphinDeedPluginGameStart);
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
scons: *** [build/f7-firmware-D/.extapps/tetris/tetris_game.o] Error 1
Trying to compile in latest firmware, I get the following error:
CC applications_user/tetris_game/tetris_game.c
applications_user/tetris_game/tetris_game.c: In function 'tetris_game_app':
applications_user/tetris_game/tetris_game.c:423:21: error: enumeration value 'InputKeyMAX' not handled in switch [-Werror=switch]
423 | switch(event.input.key) {
| ^~~~~~
cc1: all warnings being treated as errors
ICONS build/f7-firmware-D/assets/compiled/assets_icons.c
PROTO assets/protobuf/application.proto
DOLPHIN blocking
DOLPHIN internal
scons: *** [build/f7-firmware-D/.extapps/Tetris/tetris_game.o] Error 1
Resolved by adding
default:
break;
to end of switch.
Please add up to instantly drop the piece in play.
Is it possible to make the back button tap spin the opposite way as the confirm button?
Then tap and hold back would become exit.
Attempting to compile on latest firmware, I received the following error:
LoadAppManifest, line 32, in file "/home/cds/source/flipperzero-firmware/scripts/fbt_tools/fbt_apps.py"
CC applications_user/flipperzero_tetris_game/tetris_game.c
applications_user/flipperzero_tetris_game/tetris_game.c: In function 'tetris_game_render_callback':
applications_user/flipperzero_tetris_game/tetris_game.c:126:39: error: implicit declaration of function 'acquire_mutex' [-Werror=implicit-function-declaration]
126 | const TetrisState* tetris_state = acquire_mutex((ValueMutex*)ctx, 25);
| ^~~~~~~~~~~~~
applications_user/flipperzero_tetris_game/tetris_game.c:126:54: error: 'ValueMutex' undeclared (first use in this function)
126 | const TetrisState* tetris_state = acquire_mutex((ValueMutex*)ctx, 25);
| ^~~~~~~~~~
applications_user/flipperzero_tetris_game/tetris_game.c:126:54: note: each undeclared identifier is reported only once for each function it appears in
applications_user/flipperzero_tetris_game/tetris_game.c:126:65: error: expected expression before ')' token
126 | const TetrisState* tetris_state = acquire_mutex((ValueMutex*)ctx, 25);
| ^
applications_user/flipperzero_tetris_game/tetris_game.c:158:5: error: implicit declaration of function 'release_mutex' [-Werror=implicit-function-declaration]
158 | release_mutex((ValueMutex*)ctx, tetris_state);
| ^~~~~~~~~~~~~
applications_user/flipperzero_tetris_game/tetris_game.c:158:31: error: expected expression before ')' token
158 | release_mutex((ValueMutex*)ctx, tetris_state);
| ^
applications_user/flipperzero_tetris_game/tetris_game.c:125:69: error: unused parameter 'ctx' [-Werror=unused-parameter]
125 | tic void tetris_game_render_callback(Canvas* const canvas, void* ctx) {
| ~~~~~~^~~
applications_user/flipperzero_tetris_game/tetris_game.c: In function 'tetris_game_app':
applications_user/flipperzero_tetris_game/tetris_game.c:357:5: error: unknown type name 'ValueMutex'
357 | ValueMutex state_mutex;
| ^~~~~~~~~~
applications_user/flipperzero_tetris_game/tetris_game.c:358:9: error: implicit declaration of function 'init_mutex' [-Werror=implicit-function-declaration]
358 | if(!init_mutex(&state_mutex, tetris_state, sizeof(TetrisState))) {
| ^~~~~~~~~~
applications_user/flipperzero_tetris_game/tetris_game.c:394:51: error: implicit declaration of function 'acquire_mutex_block' [-Werror=implicit-function-declaration]
394 | TetrisState* tetris_state = (TetrisState*)acquire_mutex_block(&state_mutex);
| ^~~~~~~~~~~~~~~~~~~
applications_user/flipperzero_tetris_game/tetris_game.c:470:5: error: implicit declaration of function 'delete_mutex' [-Werror=implicit-function-declaration]
470 | delete_mutex(&state_mutex);
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
PREGEN build/f7-firmware-D/sdk_origin.i
scons: *** [build/f7-firmware-D/.extapps/Tetris/tetris_game.o] Error 1
SDKSRC build/f7-firmware-D/sdk_origin.i
********** FBT ERRORS **********
build/f7-firmware-D/.extapps/Tetris/tetris_game.o: Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.