Hopefully last commit
This commit is contained in:
43
util/util.h
43
util/util.h
@@ -49,13 +49,50 @@ typedef struct MiniRect {
|
||||
int y;
|
||||
} MiniRect;
|
||||
|
||||
#define MAX_ENEMIES_PER_WAVE 16
|
||||
#define MAX_WAVES 128
|
||||
|
||||
// Define enemy types (expand as needed)
|
||||
typedef enum EnemyType {
|
||||
ENEMY_TYPE_NONE = 0,
|
||||
ENEMY_TYPE_FLYER,
|
||||
// Add more enemy types here
|
||||
} EnemyType;
|
||||
|
||||
typedef struct EnemyEntry {
|
||||
EnemyType type;
|
||||
int count;
|
||||
} EnemyEntry;
|
||||
|
||||
|
||||
typedef struct Wave {
|
||||
EnemyEntry enemies[MAX_ENEMIES_PER_WAVE];
|
||||
int enemyCount; // Number of different enemy types in this wave
|
||||
int timeUntilNext; // Time until the next wave (in ticks, ms, etc.)
|
||||
} Wave;
|
||||
|
||||
typedef struct WaveInfo {
|
||||
int waveCounter;
|
||||
int waveTimer;
|
||||
int waveCounter; // Current wave number (index)
|
||||
int waveTimer; // Countdown until next wave starts
|
||||
bool waveRunning; // Whether a wave is currently running
|
||||
Wave waves[MAX_WAVES]; // List of all waves
|
||||
int totalWaves; // Total number of defined waves
|
||||
} WaveInfo;
|
||||
|
||||
typedef enum ScreenType {
|
||||
SCREEN_MENU,
|
||||
SCREEN_CREDITS,
|
||||
SCREEN_GAME,
|
||||
SCREEN_FONTS,
|
||||
SCREEN_ATLAS,
|
||||
} ScreenType;
|
||||
|
||||
extern ScreenType screenType;
|
||||
|
||||
extern WaveInfo waveInfo;
|
||||
|
||||
void initWaveInfo(WaveInfo *info);
|
||||
|
||||
|
||||
typedef struct OrientedAnimation {
|
||||
SDL_Rect atlasRects[ORIENT_DIRECTION_COUNT][TILE_SIZE * 2];
|
||||
@@ -92,4 +129,6 @@ bool canMoveTo(SDL_Rect newRect);
|
||||
|
||||
bool canMoveWithRadius(SDL_Rect centerRect);
|
||||
|
||||
double angle_between_points_deg(double x1, double y1, double x2, double y2);
|
||||
|
||||
#endif //FACTORYGAME_UTIL_H
|
Reference in New Issue
Block a user