+typedef struct
+{
+ unsigned int x, y;
+ int eaten;
+} bonus_dot;
+
+
+/* This are tiles which can be placed to create a level. */
+struct tiles {
+ char block[TILEWIDTH * TILEHEIGHT + 1];
+ unsigned dirvec[4];
+ unsigned ndirs;
+ unsigned simular_to;
+};
+
+typedef struct
+{
+ unsigned short width, height;
+ unsigned short nrows, ncols;
+ short xs, ys, xb, yb;
+ short incx, incy;
+ GC stippledGC;
+ int graphics_format;
+ pacmanstruct pacman;
+ ghoststruct *ghosts;
+ unsigned int nghosts;
+ Pixmap pacmanPixmap[4][MAXMOUTH];
+ Pixmap pacmanMask[4][MAXMOUTH];
+ Pixmap pacman_ds[PAC_DEATH_FRAMES]; /* pacman death sequence */
+ Pixmap pacman_ds_mask[PAC_DEATH_FRAMES];
+ Pixmap ghostPixmap[4][MAXGDIR][MAXGWAG];
+ Pixmap ghostMask;
+ Pixmap s_ghostPixmap[MAXGFLASH][MAXGWAG]; /* Scared ghost Pixmaps */
+ Pixmap ghostEyes[MAXGDIR];
+ char level[LEVHEIGHT * LEVWIDTH];
+ unsigned int wallwidth;
+ unsigned int dotsleft;
+ int spritexs, spriteys, spritedx, spritedy;
+
+ GameState gamestate;
+ unsigned int timeleft;
+
+ char last_pac_stat[1024];
+
+ /* draw_pacman_sprite */
+ int pm_mouth;
+ int pm_mouth_delay;
+ int pm_open_mouth;
+ int pm_death_frame;
+ int pm_death_delay;
+
+ /* draw_ghost_sprite */
+ int gh_wag;
+ int gh_wag_count;
+
+ /* flash_bonus_dots */
+ int bd_flash_count;
+ int bd_on;
+
+ /* pacman_tick */
+ int ghost_scared_timer;
+ int flash_timer;
+ PacmanState old_pac_state;
+
+ /* pacman_level.c */
+ bonus_dot bonus_dots[NUM_BONUS_DOTS];
+ struct tiles *tiles;
+
+} pacmangamestruct;