jblanked 1 год назад
Родитель
Сommit
8b328e0bc7
5 измененных файлов с 6 добавлено и 12 удалено
  1. 1 0
      alloc/alloc.c
  2. 0 1
      alloc/alloc.h
  3. 4 3
      app.c
  4. 0 6
      flip_world.h
  5. 1 2
      game/enemy.c

+ 1 - 0
alloc/alloc.c

@@ -1,4 +1,5 @@
 #include <alloc/alloc.h>
+#include <callback/callback.h>
 
 /**
  * @brief Navigation callback for exiting the application

+ 0 - 1
alloc/alloc.h

@@ -1,6 +1,5 @@
 #pragma once
 #include <flip_world.h>
-#include <callback/callback.h>
 
 FlipWorldApp *flip_world_app_alloc();
 void flip_world_app_free(FlipWorldApp *app);

+ 4 - 3
app.c

@@ -1,4 +1,5 @@
 #include <alloc/alloc.h>
+#include <flip_storage/storage.h>
 
 // Entry point for the FlipWorld application
 int32_t flip_world_main(void *p)
@@ -63,7 +64,7 @@ int32_t flip_world_main(void *p)
             storage_common_mkdir(storage, directory_path);
 
             // copy the whole folder
-            char source_path[256];
+            char source_path[128];
             snprintf(source_path, sizeof(source_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world");
 
             if (storage_common_migrate(storage, source_path, directory_path) != FSE_OK)
@@ -109,7 +110,7 @@ int32_t flip_world_main(void *p)
     else
     {
         // transfer files over into the data folder (to bs used to load the player context)
-        char directory_path[256];
+        char directory_path[128];
         snprintf(directory_path, sizeof(directory_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/data");
 
         // Create the directory
@@ -117,7 +118,7 @@ int32_t flip_world_main(void *p)
         storage_common_mkdir(storage, directory_path);
 
         // copy the whole folder
-        char source_path[256];
+        char source_path[128];
         snprintf(source_path, sizeof(source_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world");
 
         if (storage_common_migrate(storage, source_path, directory_path) != FSE_OK)

+ 0 - 6
flip_world.h

@@ -2,12 +2,6 @@
 #include <font/font.h>
 #include <flipper_http/flipper_http.h>
 #include <easy_flipper/easy_flipper.h>
-#include <furi.h>
-#include <furi_hal.h>
-#include <gui/gui.h>
-#include <gui/view.h>
-#include <gui/modules/submenu.h>
-#include <gui/view_dispatcher.h>
 
 #define TAG "FlipWorld"
 #define VERSION 0.2

+ 1 - 2
game/enemy.c

@@ -108,8 +108,7 @@ static void enemy_start(Entity *self, GameManager *manager, void *context)
 // Enemy render function
 static void enemy_render(Entity *self, GameManager *manager, Canvas *canvas, void *context)
 {
-    UNUSED(manager);
-    if (!self || !context || !canvas)
+    if (!self || !context || !canvas || !manager)
         return;
 
     EnemyContext *enemy_context = (EnemyContext *)context;