coin.h 530 B

1234567891011121314151617181920212223242526
  1. #ifndef COIN_H
  2. #define COIN_H
  3. #include <gui/gui.h>
  4. #include "point.h"
  5. #include "barry.h"
  6. #define COINS_MAX 15
  7. typedef struct {
  8. float gravity;
  9. POINT point;
  10. } COIN;
  11. typedef struct {
  12. int count;
  13. POINT coins[COINS_MAX];
  14. } COIN_PATTERN;
  15. void coin_tick(COIN* const coins, BARRY* const barry, int* const poins);
  16. void spawn_random_coin(COIN* const coins);
  17. bool coin_colides(COIN* const coin, BARRY* const barry);
  18. void draw_coins(const COIN* coins, Canvas* const canvas, const GameSprites* sprites);
  19. #endif // COIN_H