#ifndef GAME_STATE_H #define GAME_STATE_H #include #include "player.h" #include "def.h" #include "enemy.h" #include "tower.h" extern const enemy_spawner_t DEFAULT_ENEMY_SPAWNER; #define ENEMY_COUNT_MAX 1000 #define TOWER_COUNT_MAX 100 #define MAX_BEAM_COUNT 100 /* extern const int ENEMY_COUNT_MAX; */ /* extern const int TOWER_COUNT_MAX; */ typedef struct GameState { player_t player; tower_t towers[TOWER_COUNT_MAX]; int tower_count; enemy_t enemies[ENEMY_COUNT_MAX]; int enemy_count; tower_beam_t beams[MAX_BEAM_COUNT]; int beam_count; enemy_spawner_t spawner; Texture2D *textures; RenderTexture2D bg_tiles; } gs_t; float mouse_x(gs_t *gs); float mouse_y(gs_t *gs); void add_tower(gs_t *gs, tower_t tower); void add_enemy(gs_t *gs, enemy_t enemy); void add_beam(gs_t *gs, tower_beam_t beam); void kill_enemy(gs_t *gs, int index); void update_game(gs_t *gs, float dt); void draw_game(gs_t *gs); void paint_tile(); #endif