refactor: header file for every module
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef BIRDS_H
|
||||
#define BIRDS_H
|
||||
|
||||
#include <raylib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "engineAnimation.h"
|
||||
#include "enginePhysics.h"
|
||||
#include "engineSprite.h"
|
||||
|
||||
typedef enum { FLYING, BIRDS_TEX_COUNT } BirdsTextureID;
|
||||
|
||||
#define MAX_BIRDS 100
|
||||
|
||||
typedef struct {
|
||||
int count;
|
||||
Sprite sprite[MAX_BIRDS];
|
||||
Animation animation[MAX_BIRDS];
|
||||
Physics physics[MAX_BIRDS];
|
||||
bool arrived[MAX_BIRDS];
|
||||
Vector2 destPos[MAX_BIRDS];
|
||||
} Birds;
|
||||
|
||||
Birds CreateBirds(Camera2D *camera);
|
||||
void UpdateBirds(Birds *birds, Camera2D *camera);
|
||||
void RenderBirds(Birds *birds);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user