QUOTE: Kindness is always fashionable.

boss.h - freezo - A retro platform game

freezo

A retro platform game
git clone git@soophie.de:/srv/git/freezo
log | files | refs | readme

boss.h (568B)


      1 #pragma once
      2 
      3 typedef struct Boss boss_t;
      4 
      5 #include "game.h"
      6 #include "util.h"
      7 
      8 #define BOSS_WIDTH  12 * SCALE
      9 #define BOSS_HEIGHT 12 * SCALE
     10 #define BOSS_SPEED 0.5
     11 #define BOSS_FLOAT_TIME 80
     12 #define BOSS_RANGE 6 * TILE_WIDTH
     13 
     14 typedef enum {
     15   BOSS_TEST,
     16 } boss_e;
     17 
     18 struct Boss {
     19   pos_t pos;
     20   boss_e type;
     21   int dir;
     22   int float_timer;
     23   bool is_angry;
     24 };
     25 
     26 boss_t *boss_create(pos_t pos, boss_e type);
     27 void boss_update(boss_t *boss, game_t *game);
     28 void boss_draw(boss_t *boss, game_t *game);
     29 void boss_kill(boss_t *boss, game_t *game);
     30 void boss_free(boss_t *boss);