]> 4ch.mooo.com Git - 16.git/blob - src/lib/16_us.h_
forgot to add it to reinitlibs
[16.git] / src / lib / 16_us.h_
1 //\r
2 //      ID Engine\r
3 //      ID_US.h - Header file for the User Manager\r
4 //      v1.0d1w\r
5 //      By Jason Blochowiak\r
6 //      Open Watcom port by sparky4\r
7 //\r
8 \r
9 #ifndef __16_US__\r
10 #define __16_US__\r
11 \r
12 #include "src/lib/16_head.h"\r
13 \r
14 #ifdef  __DEBUG__\r
15 #define __DEBUG_UserMgr__\r
16 #endif\r
17 \r
18 //#define       HELPTEXTLINKED\r
19 \r
20 #define MaxX    320\r
21 #define MaxY    200\r
22 \r
23 #define MaxHelpLines    500\r
24 \r
25 #define MaxHighName     57\r
26 #define MaxScores       7\r
27 typedef struct\r
28                 {\r
29                         char    name[MaxHighName + 1];\r
30                         long    score;\r
31                         word    completed,episode;\r
32                 } HighScore;\r
33 \r
34 #define MaxGameName             32\r
35 #define MaxSaveGames    6\r
36 typedef struct\r
37                 {\r
38                         char    signature[4];\r
39                         word    *oldtest;\r
40                         boolean present;\r
41                         char    name[MaxGameName + 1];\r
42                 } SaveGame;\r
43 \r
44 #define MaxString       128     // Maximum input string size\r
45 \r
46 typedef struct\r
47                 {\r
48                         int     x,y,\r
49                                 w,h,\r
50                                 px,py;\r
51                 } WindowRec;    // Record used to save & restore screen windows\r
52 \r
53 typedef enum\r
54                 {\r
55                         gd_Continue,\r
56                         gd_Easy,\r
57                         gd_Normal,\r
58                         gd_Hard\r
59                 } GameDiff;\r
60 \r
61 //      Hack import for TED launch support\r
62 extern  boolean         tedlevel;\r
63 extern  int                     tedlevelnum;\r
64 extern  void            TEDDeath(void);\r
65 \r
66 extern  boolean         ingame,         // Set by game code if a game is in progress\r
67                                         abortgame,      // Set if a game load failed\r
68                                         loadedgame,     // Set if the current game was loaded\r
69                                         NoWait,\r
70                                         HighScoresDirty;\r
71 extern  char            *abortprogram;  // Set to error msg if program is dying\r
72 extern  GameDiff        restartgame;    // Normally gd_Continue, else starts game\r
73 extern  word            PrintX,PrintY;  // Current printing location in the window\r
74 extern  word            WindowX,WindowY,// Current location of window\r
75                                         WindowW,WindowH;// Current size of window\r
76 \r
77 extern  boolean         Button0,Button1,\r
78                                         CursorBad;\r
79 extern  int                     CursorX,CursorY;\r
80 \r
81 extern  void            (*USL_MeasureString)(char far *,word *,word *),\r
82                                         (*USL_DrawString)(char far *);\r
83 \r
84 extern  boolean         (*USL_SaveGame)(int),(*USL_LoadGame)(int);\r
85 extern  void            (*USL_ResetGame)(void);\r
86 extern  SaveGame        Games[MaxSaveGames];\r
87 extern  HighScore       Scores[];\r
88 \r
89 #define US_HomeWindow() {PrintX = WindowX; PrintY = WindowY;}\r
90 \r
91 extern  void    US_Startup(void),\r
92                                 US_Setup(void),\r
93                                 US_Shutdown(void),\r
94                                 US_InitRndT(boolean randomize),\r
95                                 US_SetLoadSaveHooks(boolean (*load)(int),\r
96                                                                         boolean (*save)(int),\r
97                                                                         void (*reset)(void)),\r
98                                 US_TextScreen(void),\r
99                                 US_UpdateTextScreen(void),\r
100                                 US_FinishTextScreen(void),\r
101                                 US_DrawWindow(word x,word y,word w,word h),\r
102                                 US_CenterWindow(word,word),\r
103                                 US_SaveWindow(WindowRec *win),\r
104                                 US_RestoreWindow(WindowRec *win),\r
105                                 US_ClearWindow(void),\r
106                                 US_SetPrintRoutines(void (*measure)(char far *,word *,word *),\r
107                                                                         void (*print)(char far *)),\r
108                                 US_PrintCentered(char far *s),\r
109                                 US_CPrint(char far *s),\r
110                                 US_CPrintLine(char far *s),\r
111                                 US_Print(char far *s),\r
112                                 US_PrintUnsigned(word n),\r
113                                 US_PrintSigned(long n),\r
114                                 US_StartCursor(void),\r
115                                 US_ShutCursor(void),\r
116                                 US_CheckHighScore(long score,word other),\r
117                                 US_DisplayHighScores(int which);\r
118 extern  boolean US_UpdateCursor(void),\r
119                                 US_LineInput(int x,int y,char *buf,char *def,boolean escok,\r
120                                                                 int maxchars,int maxwidth);\r
121 extern  int             US_CheckParm(char *parm,char **strings),\r
122                                 US_RndT(void);\r
123 \r
124                 void    USL_PrintInCenter(char far *s,Rect r);\r
125                 char    *USL_GiveSaveName(word game);\r
126 #endif\r