feat: Random airfield spawning

This commit is contained in:
2026-04-16 22:50:27 +01:00
parent 965c0f393c
commit 49dd53f8e4
11 changed files with 76 additions and 10 deletions

View File

@@ -9,6 +9,7 @@
#include "sim/world.hpp"
#include "sim/aircraft.hpp"
#include "sim/airfield.hpp"
#include "sim/af_spawner.hpp"
static SDL_Window *window;
static SDL_Renderer *sdl_renderer;
@@ -46,7 +47,7 @@ int main(int argc, char *argv[])
// World init
dxd::sim::World world = dxd::sim::World({ .x = 10, .y = 10 });
world.add_obj(new dxd::sim::Aircraft({ 0, 0 }, 1, 5));
world.add_obj(new dxd::sim::Airfield({ 15, 0 }));
world.add_obj(new dxd::sim::AFSpawner());
SDL_Event event;
bool running = true;