1 /* Catacomb Armageddon Source Code
\r
2 * Copyright (C) 1993-2014 Flat Rock Software
\r
4 * This program is free software; you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation; either version 2 of the License, or
\r
7 * (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License along
\r
15 * with this program; if not, write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
21 // ID_US.h - Header file for the User Manager
\r
23 // By Jason Blochowiak
\r
27 #include "ID_Types.h"
\r
34 #define __DEBUG_UserMgr__
\r
37 //#define HELPTEXTLINKED
\r
39 #define MaxHelpLines 500
\r
41 #define MaxHighName 57
\r
45 char name[MaxHighName + 1];
\r
50 #define MaxGameName 32
\r
51 #define MaxSaveGames 6
\r
57 char name[MaxGameName + 1];
\r
60 #define MaxString 128 // Maximum input string size
\r
67 } WindowRec; // Record used to save & restore screen windows
\r
77 // Hack import for TED launch support
\r
78 extern boolean tedlevel;
\r
79 extern word tedlevelnum;
\r
80 extern void TEDDeath(void);
\r
82 extern word MaxX,MaxY; // MDM (GAMERS EDGE)
\r
84 extern boolean ingame, // Set by game code if a game is in progress
\r
85 abortgame, // Set if a game load failed
\r
86 loadedgame, // Set if the current game was loaded
\r
89 extern char *abortprogram; // Set to error msg if program is dying
\r
90 extern GameDiff restartgame; // Normally gd_Continue, else starts game
\r
91 extern word PrintX,PrintY; // Current printing location in the window
\r
92 extern word WindowX,WindowY,// Current location of window
\r
93 WindowW,WindowH;// Current size of window
\r
95 extern boolean Button0,Button1,
\r
97 extern int CursorX,CursorY;
\r
99 extern void (*USL_MeasureString)(char far *,word *,word *),
\r
100 (*USL_DrawString)(char far *);
\r
102 extern boolean (*USL_SaveGame)(int),(*USL_LoadGame)(int);
\r
103 extern void (*USL_ResetGame)(void);
\r
104 extern SaveGame Games[MaxSaveGames];
\r
105 extern HighScore Scores[];
\r
107 #define US_HomeWindow() {PrintX = WindowX; PrintY = WindowY;}
\r
109 extern void US_Startup(void),
\r
112 US_InitRndT(boolean randomize),
\r
113 US_SetLoadSaveHooks(boolean (*load)(int),
\r
114 boolean (*save)(int),
\r
115 void (*reset)(void)),
\r
116 US_TextScreen(void),
\r
117 US_UpdateTextScreen(void),
\r
118 US_FinishTextScreen(void),
\r
119 US_ControlPanel(void),
\r
120 US_DrawWindow(word x,word y,word w,word h),
\r
121 US_CenterWindow(word,word),
\r
122 US_SaveWindow(WindowRec *win),
\r
123 US_RestoreWindow(WindowRec *win),
\r
124 US_ClearWindow(void),
\r
125 US_SetPrintRoutines(void (*measure)(char far *,word *,word *),
\r
126 void (*print)(char far *)),
\r
127 US_PrintCentered(char *s),
\r
128 US_CPrint(char *s),
\r
129 US_CPrintLine(char *s),
\r
131 US_PrintUnsigned(longword n),
\r
132 US_PrintSigned(long n),
\r
133 US_StartCursor(void),
\r
134 US_ShutCursor(void),
\r
135 US_ControlPanel(void),
\r
136 US_CheckHighScore(long score,word other),
\r
137 US_DisplayHighScores(int which);
\r
138 extern boolean US_UpdateCursor(void),
\r
139 US_LineInput(int x,int y,char *buf,char *def,boolean escok,
\r
140 int maxchars,int maxwidth);
\r
141 extern int US_CheckParm(char *parm,char **strings),
\r
144 void USL_PrintInCenter(char *s,Rect r);
\r
145 char *USL_GiveSaveName(word game);
\r