2021-05-13 12:36:07 +00:00
|
|
|
#include "debug_ui.h"
|
|
|
|
#include "raylib.h"
|
2021-08-09 13:35:47 +00:00
|
|
|
#include "vehicle.h"
|
2021-08-09 17:30:39 +00:00
|
|
|
#include "camera.h"
|
|
|
|
#include "world/world.h"
|
2021-05-13 14:12:18 +00:00
|
|
|
#include "game.h"
|
2021-05-13 12:36:07 +00:00
|
|
|
|
2021-08-09 17:30:39 +00:00
|
|
|
#include "modules/components.h"
|
|
|
|
|
2021-05-13 12:36:07 +00:00
|
|
|
static inline void
|
|
|
|
ActExitGame(void) {
|
2021-05-13 14:12:18 +00:00
|
|
|
game_request_close();
|
2021-08-09 13:35:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
ActSpawnCar(void) {
|
2021-08-09 17:30:39 +00:00
|
|
|
ecs_entity_t e = vehicle_spawn();
|
|
|
|
ecs_entity_t plr = camera_get().ent_id;
|
|
|
|
|
|
|
|
Position const* origin = ecs_get(world_ecs(), plr, Position);
|
|
|
|
Position * dest = ecs_get_mut(world_ecs(), e, Position, NULL);
|
|
|
|
*dest = *origin;
|
|
|
|
}
|