Code Monkey home page Code Monkey logo

flipperzero_tetris_game's People

Contributors

ahumeniy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flipperzero_tetris_game's Issues

Back button as spin?

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.

Dolphin_Deed

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

Compile error on firmware 0.72

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.

Compile error on firmware 0.79.1

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.