jblanked 1 год назад
Родитель
Сommit
bb1a5a7729
3 измененных файлов с 28 добавлено и 28 удалено
  1. 3 3
      callback/callback.c
  2. 24 24
      game/icon.c
  3. 1 1
      game/world.c

+ 3 - 3
callback/callback.c

@@ -659,7 +659,7 @@ static bool fetch_world_list(FlipperHTTP *fhttp)
         STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/world_list.json");
 
     fhttp->save_received_data = true;
-    return flipper_http_get_request_with_headers(fhttp, "https://www.flipsocial.net/api/world/v2/list/10/", "{\"Content-Type\":\"application/json\"}");
+    return flipper_http_get_request_with_headers(fhttp, "https://www.flipsocial.net/api/world/v3/list/10/", "{\"Content-Type\":\"application/json\"}");
 }
 static bool start_game_thread(void *context)
 {
@@ -837,7 +837,7 @@ static bool flip_world_fetch_game(DataLoaderModel *model)
 
         model->fhttp->save_received_data = true;
         char url[128];
-        snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v2/get/world/%s/", furi_string_get_cstr(first_world));
+        snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v3/get/world/%s/", furi_string_get_cstr(first_world));
         furi_string_free(world_list);
         furi_string_free(first_world);
         return flipper_http_get_request_with_headers(model->fhttp, url, "{\"Content-Type\":\"application/json\"}");
@@ -1426,7 +1426,7 @@ static bool flip_world_fetch_worlds(DataLoaderModel *model)
         sizeof(model->fhttp->file_path),
         STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/world_list_full.json");
     model->fhttp->save_received_data = true;
-    return flipper_http_get_request_with_headers(model->fhttp, "https://www.flipsocial.net/api/world/v2/get/10/", "{\"Content-Type\":\"application/json\"}");
+    return flipper_http_get_request_with_headers(model->fhttp, "https://www.flipsocial.net/api/world/v3/get/10/", "{\"Content-Type\":\"application/json\"}");
 }
 static char *flip_world_parse_worlds(DataLoaderModel *model)
 {

+ 24 - 24
game/icon.c

@@ -244,18 +244,18 @@ IconContext *get_icon_context(const char *name)
     {
         return icon_generic_alloc("lake_top_right", &I_icon_lake_top_right_24x22px, 24, 22);
     }
-    // else if (strcmp(name, "rock_large") == 0)
-    // {
-    //     return icon_generic_alloc("rock_large", &I_icon_rock_large_18x19px, 18, 19);
-    // }
-    // else if (strcmp(name, "rock_medium") == 0)
-    // {
-    //     return icon_generic_alloc("rock_medium", &I_icon_rock_medium_16x14px, 16, 14);
-    // }
-    // else if (strcmp(name, "rock_small") == 0)
-    // {
-    //     return icon_generic_alloc("rock_small", &I_icon_rock_small_10x8px, 10, 8);
-    // }
+    else if (strcmp(name, "rock_large") == 0)
+    {
+        return icon_generic_alloc("rock_large", &I_icon_rock_large_18x19px, 18, 19);
+    }
+    else if (strcmp(name, "rock_medium") == 0)
+    {
+        return icon_generic_alloc("rock_medium", &I_icon_rock_medium_16x14px, 16, 14);
+    }
+    else if (strcmp(name, "rock_small") == 0)
+    {
+        return icon_generic_alloc("rock_small", &I_icon_rock_small_10x8px, 10, 8);
+    }
 
     // If no match is found
     FURI_LOG_E("Game", "Icon not found: %s", name);
@@ -376,18 +376,18 @@ const char *icon_get_id(const Icon *icon)
     {
         return "lake_top_right";
     }
-    // else if (icon == &I_icon_rock_large_18x19px)
-    // {
-    //     return "rock_large";
-    // }
-    // else if (icon == &I_icon_rock_medium_16x14px)
-    // {
-    //     return "rock_medium";
-    // }
-    // else if (icon == &I_icon_rock_small_10x8px)
-    // {
-    //     return "rock_small";
-    // }
+    else if (icon == &I_icon_rock_large_18x19px)
+    {
+        return "rock_large";
+    }
+    else if (icon == &I_icon_rock_medium_16x14px)
+    {
+        return "rock_medium";
+    }
+    else if (icon == &I_icon_rock_small_10x8px)
+    {
+        return "rock_small";
+    }
 
     // If no match is found
     FURI_LOG_E("Game", "Icon ID not found for given icon pointer.");

+ 1 - 1
game/world.c

@@ -174,7 +174,7 @@ FuriString *fetch_world(const char *name)
     }
 
     char url[256];
-    snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v2/get/world/%s/", name);
+    snprintf(url, sizeof(url), "https://www.flipsocial.net/api/world/v3/get/world/%s/", name);
     snprintf(fhttp->file_path, sizeof(fhttp->file_path), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_world/worlds/%s.json", name);
     fhttp->save_received_data = true;
     if (!flipper_http_get_request_with_headers(fhttp, url, "{\"Content-Type\": \"application/json\"}"))