mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-19 20:34:19 -07:00
more fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
App(
|
||||
appid="APPS_Calculator",
|
||||
appid="calculator",
|
||||
name="Calculator",
|
||||
apptype=FlipperAppType.EXTERNAL,
|
||||
entry_point="calculator_app",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -415,12 +415,12 @@ static void make_move(uint8_t file1, uint8_t rank1, uint8_t file2, uint8_t rank2
|
||||
move2str(white_move_str, game, game->moveListLen - 1);
|
||||
notify_click();
|
||||
black_move_str[0] = 0;
|
||||
anim = furi_hal_os_tick();
|
||||
anim = furi_get_tick();
|
||||
thinking = true;
|
||||
}
|
||||
|
||||
static int32_t make_ai_move(void* context) {
|
||||
UNUSED(context);
|
||||
UNUSED(context);
|
||||
// thinking = true;
|
||||
int depth = 1;
|
||||
Move move;
|
||||
@@ -431,7 +431,7 @@ static int32_t make_ai_move(void* context) {
|
||||
move2str(black_move_str, game, game->moveListLen - 1);
|
||||
notify_click();
|
||||
thinking = false;
|
||||
anim = furi_hal_os_tick();
|
||||
anim = furi_get_tick();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ static void run_ai_thread() {
|
||||
}
|
||||
|
||||
static void chess_draw_callback(Canvas* canvas, void* ctx) {
|
||||
UNUSED(ctx);
|
||||
UNUSED(ctx);
|
||||
should_update_screen = false;
|
||||
canvas_clear(canvas);
|
||||
|
||||
@@ -508,7 +508,8 @@ static void chess_draw_callback(Canvas* canvas, void* ctx) {
|
||||
// }
|
||||
|
||||
char str[28];
|
||||
sprintf(str, "%d. %s %s", (game->moveListLen + 1) / 2, white_move_str, black_move_str);
|
||||
snprintf(
|
||||
str, 28, "%d. %s %s", (game->moveListLen + 1) / 2, white_move_str, black_move_str);
|
||||
canvas_draw_str(canvas, 75, 12, str);
|
||||
}
|
||||
|
||||
@@ -526,7 +527,7 @@ static void chess_draw_callback(Canvas* canvas, void* ctx) {
|
||||
int x = col * 8;
|
||||
int y = row * 8;
|
||||
|
||||
int dt = furi_hal_get_tick() - anim;
|
||||
int dt = furi_get_tick() - anim;
|
||||
if(anim && dt >= 300) {
|
||||
anim = 0;
|
||||
}
|
||||
@@ -564,7 +565,7 @@ static void chess_draw_callback(Canvas* canvas, void* ctx) {
|
||||
}
|
||||
|
||||
static void chess_input_callback(InputEvent* event, void* ctx) {
|
||||
UNUSED(ctx);
|
||||
UNUSED(ctx);
|
||||
if(event->type == InputTypeShort) {
|
||||
if(event->key == InputKeyLeft) {
|
||||
sel.col = (sel.col == 0) ? 0 : sel.col - 1;
|
||||
|
||||
@@ -7,6 +7,6 @@ App(
|
||||
requires=["gui"],
|
||||
stack_size=1 * 1024,
|
||||
order=150,
|
||||
fap_icon="mjigIcon.png",
|
||||
fap_icon="../../plugins/mousejacker/mouse_10px.png",
|
||||
fap_category="Misc",
|
||||
)
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Reference in New Issue
Block a user