home *** CD-ROM | disk | FTP | other *** search
- #ifndef _MINE_H
- #define _MINE_H
-
- #ifdef OLDGCC
- /*
- * a bug in the gcc port -- it doesn't save %a4, as it isn't
- * supposed to be destroyed; SysTraps() however do this casually;
- * place these macros in EventHandler routines and callback functions.
- *
- * the egcs port doesn't have it anymore :-)
- */
- register void *reg_a4 asm("%a4");
- # define CALLBACK_PROLOGUE \
- void *save_a4 = reg_a4; asm("move.l %%a5,%%a4; sub.l #edata,%%a4" : :);
- # define CALLBACK_EPILOGUE reg_a4 = save_a4;
- #else
- # define CALLBACK_PROLOGUE
- # define CALLBACK_EPILOGUE
- #endif
-
- // max board dimensions
- #define WIDTH 26
- #define HEIGHT 24
-
- #define NAMLEN 11
-
- typedef int (*func) (SWord, SWord);
-
- typedef struct {
- int version;
- Byte options;
- Byte level;
- Byte minefield[WIDTH][HEIGHT];
- Byte done;
- Short seconds;
- struct {
- char name[NAMLEN];
- int score;
- ULong date;
- } hscore[12][5]; // 12 level a 5 high score entries
- } Game;
-
- extern long score;
- extern Game game;
-
- enum { IsRunning, IsWon, IsLost, IsFinishedWon, IsFinishedLost,
- IsToBeStarted, Restart, HighScoreWon, HighScoreLost };
-
- #endif
-