Add static keyword to ease inout sine function

This commit is contained in:
2023-12-29 13:43:01 +01:00
parent 4c39e621fe
commit aa3bfbf823
6 changed files with 7 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ static f32 bzEaseInSine(f32 x) {
static f32 bzEaseOutSine(f32 x) {
return sinf((x * M_PI) / 2.0f);
}
f32 bzEaseInOutSine(f32 x) {
static f32 bzEaseInOutSine(f32 x) {
return -(-cosf(M_PI * x) - 1) / 2.0f;
}

View File

@@ -24,10 +24,7 @@ void updateUnitAISystem(ecs_iter_t *it) {
ecs_entity_t entity = it->entities[i];
Action *firstAction = action[i].first;
if (firstAction)
unitAI[i].action = firstAction;
else
unitAI[i].action = NULL;
unitAI[i].action = firstAction;
updateUnitAI(entity, &unitAI[i], game);
}

View File

@@ -111,6 +111,11 @@ void renderRotationDirection(ecs_iter_t *it);
*/
void renderDebugPath(ecs_iter_t *it);
/**********************************
* Event Systems
**********************************/
i32 harvestEvent(ecs_entity_t entity, HarvestEvent event);
/**********************************