scientist.h 637 B

1234567891011121314151617181920212223242526272829
  1. #ifndef SCIENTIST_H
  2. #define SCIENTIST_H
  3. #include "point.h"
  4. #include "game_sprites.h"
  5. #include <gui/gui.h>
  6. #define SCIENTIST_VELOCITY_MIN -0.5f
  7. #define SCIENTIST_VELOCITY_MAX 0.5f
  8. #define SCIENTISTS_MAX 6
  9. typedef enum {
  10. ScientistStateAlive,
  11. ScientistStateDead,
  12. } ScientistState;
  13. typedef struct {
  14. bool visible;
  15. POINTF point;
  16. float velocity_x;
  17. ScientistState state;
  18. } SCIENTIST;
  19. void scientist_tick(SCIENTIST* const scientist);
  20. void spawn_random_scientist(SCIENTIST* const scientists);
  21. void draw_scientists(const SCIENTIST* scientists, Canvas* const canvas, const GameSprites* sprites);
  22. #endif // SCIENTIST_H