From e5268813dcbdc0d90a081b2223ebc21749038635 Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Fri, 7 Jul 2023 23:10:23 -0600 Subject: Better world --- src/entities/antifaShip.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/entities/antifaShip.c') diff --git a/src/entities/antifaShip.c b/src/entities/antifaShip.c index 1944053..f43a7df 100644 --- a/src/entities/antifaShip.c +++ b/src/entities/antifaShip.c @@ -1,28 +1,21 @@ #include "antifaShip.h" -#include +#include "game.h" -void initAntifaShip(Entity * entity) { - entity->model = LoadModel("/home/nathan/Documents/KillaFacsista/assets/antifaShip.obj"); +void initAntifaShip(Entity * entity, Game * game) { + entity->model = &game->assets.models[ANTIFA_SHIP_ASSET]; entity->useAcceleration = true; entity->acceleration = (EntityAcceleration){ .speedUp = 30.0, .speedDown = 15, - .rotationUp = (Vector3){0.6, 0.6, 0.6}, - .rotationDown = (Vector3){0.6, 0.6, 0.6} + .rotation = (Vector3){0.7, 0.7, 0.7} }; } void closeAntifaShip(Entity * entity) { - UnloadModel(entity->model); } void updateAntifaShip(Game * game, Entity * entity, EntityId id) { -} - -void drawAntifaShip(Game * game, Entity * entity, EntityId id) { - entityDraw(entity); - Vector3 stick = (Vector3){ GetGamepadAxisMovement(0, 1), -GetGamepadAxisMovement(0, 0), @@ -33,3 +26,7 @@ void drawAntifaShip(Game * game, Entity * entity, EntityId id) { entityJoystickControl(entity, stick, fabs(GetGamepadAxisMovement(0, 3) * 300.0)); } + +void drawAntifaShip(Game * game, Entity * entity, EntityId id) { + entityDraw(entity); +} -- cgit v1.2.3