Hopefully last commit

This commit is contained in:
2025-06-11 23:01:05 +02:00
parent 78bccd6c6f
commit 8bbe17491b
74 changed files with 1306 additions and 516 deletions

View File

@@ -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