Просмотр исходного кода

remove draw_spawn_icon and draw_spawn_icon_line

jblanked 9 месяцев назад
Родитель
Сommit
8f0089dabd
1 измененных файлов с 33 добавлено и 34 удалено
  1. 33 34
      game/draw.c

+ 33 - 34
game/draw.c

@@ -47,40 +47,39 @@ void draw_username(Canvas *canvas, Vector pos, char *username)
 }
 
 // Draw an icon at a specific position (with collision detection)
-void draw_spawn_icon(GameManager *manager, Level *level, const char *icon_id, float x, float y)
-{
-    snprintf(draw_g_name, sizeof(draw_g_name), "%s", icon_id);
-    Entity *e = level_add_entity(level, &icon_desc);
-    entity_pos_set(e, (Vector){x, y});
-    UNUSED(manager);
-}
-// Draw a line of icons at a specific position (with collision detection)
-void draw_spawn_icon_line(GameManager *manager, Level *level, const char *icon_id, float x, float y, uint8_t amount, bool horizontal, uint8_t spacing)
-{
-    for (int i = 0; i < amount; i++)
-    {
-        if (horizontal)
-        {
-            // check if element is outside the world
-            if (x + (i * spacing) > WORLD_WIDTH)
-            {
-                break;
-            }
-
-            draw_spawn_icon(manager, level, icon_id, x + (i * spacing), y);
-        }
-        else
-        {
-            // check if element is outside the world
-            if (y + (i * spacing) > WORLD_HEIGHT)
-            {
-                break;
-            }
-
-            draw_spawn_icon(manager, level, icon_id, x, y + (i * spacing));
-        }
-    }
-}
+// void draw_spawn_icon(GameManager *manager, Level *level, float x, float y)
+// {
+//     Entity *e = level_add_entity(level, &icon_desc);
+//     entity_pos_set(e, (Vector){x, y});
+//     UNUSED(manager);
+// }
+// // Draw a line of icons at a specific position (with collision detection)
+// void draw_spawn_icon_line(GameManager *manager, Level *level, float x, float y, uint8_t amount, bool horizontal, uint8_t spacing)
+// {
+//     for (int i = 0; i < amount; i++)
+//     {
+//         if (horizontal)
+//         {
+//             // check if element is outside the world
+//             if (x + (i * spacing) > WORLD_WIDTH)
+//             {
+//                 break;
+//             }
+
+//             draw_spawn_icon(manager, level, icon_id, x + (i * spacing), y);
+//         }
+//         else
+//         {
+//             // check if element is outside the world
+//             if (y + (i * spacing) > WORLD_HEIGHT)
+//             {
+//                 break;
+//             }
+
+//             draw_spawn_icon(manager, level, icon_id, x, y + (i * spacing));
+//         }
+//     }
+// }
 
 static void draw_menu(GameManager *manager, Canvas *canvas)
 {