diff --git a/chess/smallchesslib.h b/chess/smallchesslib.h index 802ec7fb5a0..0382cfc9d38 100644 --- a/chess/smallchesslib.h +++ b/chess/smallchesslib.h @@ -3515,4 +3515,4 @@ uint8_t SCL_boardMoveIsLegal(SCL_Board board, uint8_t squareFrom, uint8_t square return SCL_squareSetContains(moves, squareTo); } -#endif // guard \ No newline at end of file +#endif // guard diff --git a/flipchess.h b/flipchess.h index 761f66731b1..88495752add 100644 --- a/flipchess.h +++ b/flipchess.h @@ -19,7 +19,7 @@ #define FLIPCHESS_VERSION "v1.11" #define TEXT_BUFFER_SIZE 96 -#define TEXT_SIZE (TEXT_BUFFER_SIZE - 1) +#define TEXT_SIZE (TEXT_BUFFER_SIZE - 1) typedef struct { Gui* gui; @@ -65,7 +65,10 @@ typedef enum { FlipChessPlayerAI3 = 3, } FlipChessPlayerMode; -typedef enum { FlipChessTextInputDefault, FlipChessTextInputGame } FlipChessTextInputState; +typedef enum { + FlipChessTextInputDefault, + FlipChessTextInputGame +} FlipChessTextInputState; typedef enum { FlipChessStatusNone = 0, diff --git a/helpers/flipchess_custom_event.h b/helpers/flipchess_custom_event.h index 4391a2fa62b..098160a0a4e 100644 --- a/helpers/flipchess_custom_event.h +++ b/helpers/flipchess_custom_event.h @@ -13,4 +13,4 @@ typedef enum { FlipChessCustomEventScene1Right, FlipChessCustomEventScene1Ok, FlipChessCustomEventScene1Back, -} FlipChessCustomEvent; \ No newline at end of file +} FlipChessCustomEvent; diff --git a/helpers/flipchess_file.c b/helpers/flipchess_file.c index 99aee49750f..f2acde35441 100644 --- a/helpers/flipchess_file.c +++ b/helpers/flipchess_file.c @@ -3,15 +3,15 @@ #include // #define FLIPCHESS_APP_BASE_FOLDER APP_BOARDA_PATH("flipchess") -#define FLIPCHESS_APP_BASE_FOLDER EXT_PATH("apps_data/flipchess") +#define FLIPCHESS_APP_BASE_FOLDER EXT_PATH("apps_data/flipchess") #define FLIPCHESS_APP_BASE_FOLDER_PATH(path) FLIPCHESS_APP_BASE_FOLDER "/" path -#define FLIPCHESS_BOARD_FILE_NAME "board_fen.txt" -#define FLIPCHESS_BOARD_FILE_NAME_BAK "board_fen.bak" -#define FLIPCHESS_BOARD_PATH FLIPCHESS_APP_BASE_FOLDER_PATH(FLIPCHESS_BOARD_FILE_NAME) -#define FLIPCHESS_BOARD_PATH_BAK FLIPCHESS_APP_BASE_FOLDER_PATH(FLIPCHESS_BOARD_FILE_NAME_BAK) +#define FLIPCHESS_BOARD_FILE_NAME "board_fen.txt" +#define FLIPCHESS_BOARD_FILE_NAME_BAK "board_fen.bak" +#define FLIPCHESS_BOARD_PATH FLIPCHESS_APP_BASE_FOLDER_PATH(FLIPCHESS_BOARD_FILE_NAME) +#define FLIPCHESS_BOARD_PATH_BAK FLIPCHESS_APP_BASE_FOLDER_PATH(FLIPCHESS_BOARD_FILE_NAME_BAK) #define FILE_MAX_PATH_LEN 48 -#define FILE_MAX_CHARS 94 +#define FILE_MAX_CHARS 94 bool flipchess_has_file(const FlipChessFile file_type, const char* file_name, const bool remove) { bool ret = false; diff --git a/helpers/flipchess_file.h b/helpers/flipchess_file.h index 1550b2e2d43..b29a25bc239 100644 --- a/helpers/flipchess_file.h +++ b/helpers/flipchess_file.h @@ -12,4 +12,4 @@ bool flipchess_save_file( const FlipChessFile file_type, const char* file_name, const bool append, - const bool overwrite); \ No newline at end of file + const bool overwrite); diff --git a/helpers/flipchess_voice.cpp b/helpers/flipchess_voice.cpp index 9e0c199087a..0ef416e74e8 100644 --- a/helpers/flipchess_voice.cpp +++ b/helpers/flipchess_voice.cpp @@ -34,4 +34,4 @@ void flipchess_voice_a_strange_game() { voice.say("A STRANGE GAME... THE ONLY WINNING MOVE IS NOT TO PLAY."); furi_hal_speaker_release(); } -} \ No newline at end of file +} diff --git a/sam/stm32_sam.cpp b/sam/stm32_sam.cpp index cd36ec64820..3dd369171e7 100644 --- a/sam/stm32_sam.cpp +++ b/sam/stm32_sam.cpp @@ -3304,7 +3304,8 @@ void STM32SAM::AddInflection(unsigned char mem48, unsigned char phase1) { // FIXME: Explain this fix better, it's not obvious // ML : A =, fixes a problem with invalid pitch with '.' - while((A = pitches[X]) == 127) X++; + while((A = pitches[X]) == 127) + X++; pos48398: //48398: CLC @@ -3787,7 +3788,8 @@ int STM32SAM::Parser1() { Y = 0; // CLEAR THE STRESS TABLE - for(i = 0; i < 256; i++) stress[i] = 0; + for(i = 0; i < 256; i++) + stress[i] = 0; // THIS CODE MATCHES THE PHONEME LETTERS TO THE TABLE // pos41078: @@ -5628,7 +5630,7 @@ void STM32SAM::setThroat(unsigned char _throat /* = 128 */) { #include #include -#define FURI_HAL_SPEAKER_TIMER TIM16 +#define FURI_HAL_SPEAKER_TIMER TIM16 #define FURI_HAL_SPEAKER_CHANNEL LL_TIM_CHANNEL_CH1 void STM32SAM::begin(void) { diff --git a/sam/stm32_sam.h b/sam/stm32_sam.h index 910227ac36a..c9d5326d9f1 100644 --- a/sam/stm32_sam.h +++ b/sam/stm32_sam.h @@ -93,4 +93,4 @@ class STM32SAM { }; // STM32SAM class -#endif \ No newline at end of file +#endif diff --git a/scenes/flipchess_scene_config.h b/scenes/flipchess_scene_config.h index a1cc0d51d81..4b030dc214b 100644 --- a/scenes/flipchess_scene_config.h +++ b/scenes/flipchess_scene_config.h @@ -1,4 +1,4 @@ ADD_SCENE(flipchess, startscreen, Startscreen) ADD_SCENE(flipchess, menu, Menu) ADD_SCENE(flipchess, scene_1, Scene_1) -ADD_SCENE(flipchess, settings, Settings) \ No newline at end of file +ADD_SCENE(flipchess, settings, Settings) diff --git a/scenes/flipchess_scene_menu.c b/scenes/flipchess_scene_menu.c index 448bfc62e26..c2e193ac3b7 100644 --- a/scenes/flipchess_scene_menu.c +++ b/scenes/flipchess_scene_menu.c @@ -88,4 +88,4 @@ bool flipchess_scene_menu_on_event(void* context, SceneManagerEvent event) { void flipchess_scene_menu_on_exit(void* context) { FlipChess* app = context; submenu_reset(app->submenu); -} \ No newline at end of file +} diff --git a/scenes/flipchess_scene_scene_1.c b/scenes/flipchess_scene_scene_1.c index 11e96b5827b..0029f6e7742 100644 --- a/scenes/flipchess_scene_scene_1.c +++ b/scenes/flipchess_scene_scene_1.c @@ -52,4 +52,4 @@ void flipchess_scene_scene_1_on_exit(void* context) { if(app->import_game == 1 && strlen(app->import_game_text) > 0) { flipchess_save_file(app->import_game_text, FlipChessFileBoard, NULL, false, true); } -} \ No newline at end of file +} diff --git a/scenes/flipchess_scene_settings.c b/scenes/flipchess_scene_settings.c index 51833b99c11..127050ff8e7 100644 --- a/scenes/flipchess_scene_settings.c +++ b/scenes/flipchess_scene_settings.c @@ -2,7 +2,7 @@ #include "../helpers/flipchess_voice.h" #include -#define TEXT_LABEL_ON "ON" +#define TEXT_LABEL_ON "ON" #define TEXT_LABEL_OFF "OFF" const char* const haptic_text[2] = { @@ -99,4 +99,4 @@ void flipchess_scene_settings_on_exit(void* context) { FlipChess* app = context; variable_item_list_set_selected_item(app->variable_item_list, 0); variable_item_list_reset(app->variable_item_list); -} \ No newline at end of file +} diff --git a/scenes/flipchess_scene_startscreen.c b/scenes/flipchess_scene_startscreen.c index f9dfde720eb..b417e137579 100644 --- a/scenes/flipchess_scene_startscreen.c +++ b/scenes/flipchess_scene_startscreen.c @@ -64,4 +64,4 @@ void flipchess_scene_startscreen_on_exit(void* context) { if(app->sound == 1) { flipchess_voice_shall_we_play(); } -} \ No newline at end of file +} diff --git a/views/flipchess_scene_1.c b/views/flipchess_scene_1.c index 630e9afa771..b44b6e46f17 100644 --- a/views/flipchess_scene_1.c +++ b/views/flipchess_scene_1.c @@ -10,16 +10,16 @@ #include "../helpers/flipchess_voice.h" #include "../helpers/flipchess_haptic.h" -#define SCL_960_CASTLING 0 // setting to 1 compiles a 960 version of smolchess -#define XBOARD_DEBUG 0 // will create files with xboard communication +#define SCL_960_CASTLING 0 // setting to 1 compiles a 960 version of smolchess +#define XBOARD_DEBUG 0 // will create files with xboard communication #define SCL_EVALUATION_FUNCTION SCL_boardEvaluateStatic -#define SCL_DEBUG_AI 0 +#define SCL_DEBUG_AI 0 #include "../chess/smallchesslib.h" -#define ENABLE_960 0 // setting to 1 enables 960 chess -#define MAX_TEXT_LEN 15 // 15 = max length of text -#define MAX_TEXT_BUF (MAX_TEXT_LEN + 1) // max length of text + null terminator +#define ENABLE_960 0 // setting to 1 enables 960 chess +#define MAX_TEXT_LEN 15 // 15 = max length of text +#define MAX_TEXT_BUF (MAX_TEXT_LEN + 1) // max length of text + null terminator #define THREAD_WAIT_TIME 20 // time to wait for draw thread to finish struct FlipChessScene1 { @@ -231,15 +231,14 @@ uint8_t flipchess_turn(FlipChessScene1Model* model) { // Color check before allowing piece selection char piece = model->game.board[model->squareSelected]; if(piece != '.' && - SCL_pieceIsWhite(piece) == SCL_boardWhitesTurn(model->game.board)) { + SCL_pieceIsWhite(piece) == SCL_boardWhitesTurn(model->game.board)) { model->squareFrom = model->squareSelected; model->turnState = 1; } } else if(model->turnState == 1 && model->squareSelected != 255) { // Validate before executing - if(SCL_boardMoveIsLegal(model->game.board, - model->squareFrom, - model->squareSelected)) { + if(SCL_boardMoveIsLegal( + model->game.board, model->squareFrom, model->squareSelected)) { model->squareTo = model->squareSelected; model->turnState = 2; model->squareSelectedLast = model->squareSelected; @@ -665,8 +664,7 @@ void flipchess_scene_1_exit(void* context) { furi_assert(context); FlipChessScene1* instance = (FlipChessScene1*)context; - with_view_model( - instance->view, FlipChessScene1Model * model, { model->paramExit = 0; }, true); + with_view_model(instance->view, FlipChessScene1Model * model, { model->paramExit = 0; }, true); } void flipchess_scene_1_enter(void* context) { @@ -727,8 +725,7 @@ FlipChessScene1* flipchess_scene_1_alloc() { void flipchess_scene_1_free(FlipChessScene1* instance) { furi_assert(instance); - with_view_model( - instance->view, FlipChessScene1Model * model, { UNUSED(model); }, true); + with_view_model(instance->view, FlipChessScene1Model * model, { UNUSED(model); }, true); view_free(instance->view); free(instance); @@ -737,4 +734,4 @@ void flipchess_scene_1_free(FlipChessScene1* instance) { View* flipchess_scene_1_get_view(FlipChessScene1* instance) { furi_assert(instance); return instance->view; -} \ No newline at end of file +} diff --git a/views/flipchess_scene_1.h b/views/flipchess_scene_1.h index a57a90781aa..4273e5a9eb2 100644 --- a/views/flipchess_scene_1.h +++ b/views/flipchess_scene_1.h @@ -16,4 +16,4 @@ View* flipchess_scene_1_get_view(FlipChessScene1* flipchess_static); FlipChessScene1* flipchess_scene_1_alloc(); -void flipchess_scene_1_free(FlipChessScene1* flipchess_static); \ No newline at end of file +void flipchess_scene_1_free(FlipChessScene1* flipchess_static); diff --git a/views/flipchess_startscreen.c b/views/flipchess_startscreen.c index 5b1c3c7614e..963b3384d83 100644 --- a/views/flipchess_startscreen.c +++ b/views/flipchess_startscreen.c @@ -148,8 +148,7 @@ FlipChessStartscreen* flipchess_startscreen_alloc() { void flipchess_startscreen_free(FlipChessStartscreen* instance) { furi_assert(instance); - with_view_model( - instance->view, FlipChessStartscreenModel * model, { UNUSED(model); }, true); + with_view_model(instance->view, FlipChessStartscreenModel * model, { UNUSED(model); }, true); view_free(instance->view); free(instance); } diff --git a/views/flipchess_startscreen.h b/views/flipchess_startscreen.h index 7c6203569ba..a4905a36c43 100644 --- a/views/flipchess_startscreen.h +++ b/views/flipchess_startscreen.h @@ -16,4 +16,4 @@ View* flipchess_startscreen_get_view(FlipChessStartscreen* flipchess_static); FlipChessStartscreen* flipchess_startscreen_alloc(); -void flipchess_startscreen_free(FlipChessStartscreen* flipchess_static); \ No newline at end of file +void flipchess_startscreen_free(FlipChessStartscreen* flipchess_static);