35 lines
718 B
C
35 lines
718 B
C
#ifndef _GAME_H_INCLUDE_
|
|
#define _GAME_H_INCLUDE_
|
|
#include "world.h"
|
|
|
|
#define MOUSE_COUNT 5
|
|
|
|
struct game {
|
|
// X speed of the cat
|
|
int catx;
|
|
// Y speed of the cat
|
|
int caty;
|
|
// X position of the cat
|
|
int catx_position;
|
|
// Y position of the cat
|
|
int caty_position;
|
|
// X position of the mouse
|
|
int mousex[MOUSE_COUNT];
|
|
// Y position of the mouse
|
|
int mousey[MOUSE_COUNT];
|
|
// Mouse state: 0 = alive, 1 = eaten
|
|
int mouse_eaten[MOUSE_COUNT];
|
|
// Number of caught mice
|
|
int caught;
|
|
// Obstacles
|
|
int obstaclex[10];
|
|
int obstacley[10];
|
|
// Funky message
|
|
char message[100];
|
|
};
|
|
|
|
void* init_game();
|
|
int game_event(struct event* event, void* game);
|
|
|
|
#endif
|