1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
#ifndef GAME_H
#define GAME_H
#include "gbdefs.h"
/**********************************************************************/
/* Game Object Structure */
/**********************************************************************/
typedef struct _GameObject GameObject;
struct _GameObject {
gint x;
gint y;
gint type;
gint oldx;
gint oldy;
GameObject *next;
GameObject *prev;
};
/**********************************************************************/
/**********************************************************************/
/* Exported functions */
/**********************************************************************/
void init_game (void);
void quit_game (void);
void game_keypress (gint);
void show_scores (void);
void start_new_game (void);
gboolean mouse_cb (GtkWidget * widget, GdkEventButton * e, gpointer data);
gboolean move_cb (GtkWidget * widget, GdkEventMotion * e, gpointer data);
/**********************************************************************/
/**********************************************************************/
/* Exported Variables */
/**********************************************************************/
extern gint game_state;
extern gint arena[GAME_WIDTH][GAME_HEIGHT];
/**********************************************************************/
#endif /* GAME_H */
|