all repos — katbug @ 10448750d0ae306f7a6287c6a6fab3c545a52bc6

side-scrolling infinite arcade game in C with SDL 1.2

Catbug.h (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
typedef struct catbug
{
  SDL_Surface* spriteSheet;
  unsigned short int frame;

  int x;
  int y;
  int vX;
  int vY;

  unsigned short int HP;
} Catbug;

Catbug* newCatbug(int x, int y);
void deleteCatbug(Catbug* target);

int isInRect(Catbug* self, SDL_Rect* box);
void moveCatbug(Catbug* self);
void drawCatbug(Catbug* self);