Add static keyword to ease inout sine function
This commit is contained in:
150
game/systems/systems.h
Normal file
150
game/systems/systems.h
Normal file
@@ -0,0 +1,150 @@
|
||||
#ifndef PIXELDEFENSE_SYSTEMS_H
|
||||
#define PIXELDEFENSE_SYSTEMS_H
|
||||
|
||||
#include <flecs.h>
|
||||
|
||||
#include "components.h"
|
||||
|
||||
typedef struct Game Game;
|
||||
|
||||
/**********************************
|
||||
* Utils
|
||||
**********************************/
|
||||
|
||||
bool entitySetPath(const ecs_entity_t entity, const Vector2 target, Game *game);
|
||||
|
||||
/**********************************
|
||||
* AI systems
|
||||
**********************************/
|
||||
|
||||
/*
|
||||
* 0: Game (singleton)
|
||||
* 1: UnitAction
|
||||
*/
|
||||
void handleUnitActionsSystem(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 0: Game (singleton)
|
||||
* 1: UnitAI
|
||||
* 2: UnitAction
|
||||
*/
|
||||
void updateUnitAISystem(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 0: Game (singleton)
|
||||
* 1: UnitAction
|
||||
*/
|
||||
void updateUnitActionsSystem(ecs_iter_t *it);
|
||||
|
||||
|
||||
/**********************************
|
||||
* Entity Systems
|
||||
**********************************/
|
||||
|
||||
/* Observer (for removing TargetPosition)
|
||||
* 0: Game (singleton) for object pool
|
||||
* 1: Path
|
||||
*/
|
||||
void entityPathRemove(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 0: Game (singleton) for entity map
|
||||
* 1: Position
|
||||
* 2: Size
|
||||
* 3: Velocity (only entities with velocity change position)
|
||||
* 4: SpatialGridID
|
||||
*/
|
||||
void entityUpdateSpatialID(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 0: Game (singleton) for collisions
|
||||
* 1: Position
|
||||
* 2: Rotation
|
||||
* 3: Velocity
|
||||
* 4: Steering
|
||||
*/
|
||||
void entityUpdateKinematic(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 1: Position
|
||||
* 2: Rotation
|
||||
* 3: Velocity
|
||||
* 4: TargetPosition
|
||||
* 5: Steering
|
||||
*/
|
||||
void entityMoveToTarget(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 0: Game (singleton) for object pool
|
||||
* 1: Path
|
||||
*/
|
||||
void entityFollowPath(ecs_iter_t *it);
|
||||
|
||||
|
||||
/*
|
||||
* 1: Animation
|
||||
* 2: TextureRegion
|
||||
*/
|
||||
void entityUpdateAnimationState(ecs_iter_t *it);
|
||||
/*
|
||||
* 0:
|
||||
* 1: Animation
|
||||
* 2: TextureRegion
|
||||
*/
|
||||
void entityUpdateAnimation(ecs_iter_t *it);
|
||||
|
||||
|
||||
/*
|
||||
* 1: Position
|
||||
* 2: Size
|
||||
*/
|
||||
void renderColliders(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 1: Position
|
||||
* 2: Rotation
|
||||
*/
|
||||
void renderRotationDirection(ecs_iter_t *it);
|
||||
|
||||
/*
|
||||
* 1: Path
|
||||
*/
|
||||
void renderDebugPath(ecs_iter_t *it);
|
||||
|
||||
/**********************************
|
||||
* Event Systems
|
||||
**********************************/
|
||||
|
||||
i32 harvestEvent(ecs_entity_t entity, HarvestEvent event);
|
||||
|
||||
|
||||
/**********************************
|
||||
* Input systems
|
||||
**********************************/
|
||||
|
||||
/*
|
||||
* Task:
|
||||
* 0: Game (singleton)
|
||||
* 0: InputState (singleton)
|
||||
*/
|
||||
void updatePlayerInput();
|
||||
|
||||
/*
|
||||
* Task (rendering above ground):
|
||||
* 0: Game (singleton)
|
||||
* 0: InputState (singleton)
|
||||
*/
|
||||
void drawPlayerInputUIGround();
|
||||
|
||||
/*
|
||||
* Task (rendering on top):
|
||||
* 0: Game (singleton)
|
||||
* 0: InputState (singleton)
|
||||
*/
|
||||
void drawPlayerInputUI();
|
||||
|
||||
/**********************************
|
||||
* UI systems
|
||||
**********************************/
|
||||
|
||||
#endif //PIXELDEFENSE_SYSTEMS_H
|
||||
Reference in New Issue
Block a user