forgotten commit. disabled until egl is adapted.
[AROS-Contrib.git] / fish / mosaic / mosaic.h
blobe16092b52c9b9c653b6ed0e33e2967bdd7586782
1 /*
2 * mosaic.h
3 * kirk johnson
4 * october 1990
5 */
7 #ifndef _MOSAIC_H_
8 #define _MOSAIC_H_
10 #include <stdio.h>
12 /* #define DEBUG */
14 #define AppName "mosaic"
16 #define BoardSize (24) /* width, in tiles */
17 #define NPieces (81) /* # pieces per game */
19 #define NTiles (BoardSize*BoardSize)
21 #define MaxUnameLen (30) /* eight chars per uname, max */
22 #define MaxScoreLen (5) /* five chars per score, max */
23 #define NHighScores (10) /* # of high scores kept */
24 #define NHelpLines (10) /* # of lines in help window */
26 #define MaxPossibleScore "34992"
29 typedef unsigned short Word;
31 typedef struct
33 char uname[MaxUnameLen+1]; /* username */
34 int score; /* score */
35 } NameAndScore;
37 void MoveBox (int MouseX, int MouseY);
38 void QuitGame(int rc);
39 void warning(char *msg);
40 void fatal(char *msg);
41 void ReadHighScores(void);
42 void WriteHighScores(void);
43 void CheckHighScore(void);
44 void AutoPlay(void);
45 void UpdateAndScore(int r, int c, Word score[]);
46 void PossiblyMerge(int i, int j);
47 int DropPiece(int r, int c, Word p);
48 void InitGame(void);
49 void drawTile(int r, int c);
50 void drawHighScores(void);
51 void drawNext(void);
52 void drawScore(void);
54 extern Word tile[NTiles]; /* the board */
55 extern Word piece[NPieces]; /* the "deck" of pieces */
56 extern Word nextpiece; /* index into the deck */
58 extern Word tscore[3]; /* total score */
59 extern Word pscore[3]; /* last piece score */
60 extern Word remain[3]; /* tiles remaining */
62 extern NameAndScore highscore[NHighScores];
64 #endif /* _MOSAIC_H_ */