1 /* Reconstructed Commander Keen 4-6 Source Code
\r
2 * Copyright (C) 2021 K1n9_Duk3
\r
4 * This file is primarily based on:
\r
5 * Catacomb 3-D Source Code
\r
6 * Copyright (C) 1993-2014 Flat Rock Software
\r
8 * This program is free software; you can redistribute it and/or modify
\r
9 * it under the terms of the GNU General Public License as published by
\r
10 * the Free Software Foundation; either version 2 of the License, or
\r
11 * (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU General Public License along
\r
19 * with this program; if not, write to the Free Software Foundation, Inc.,
\r
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
25 // ID_US.h - Header file for the User Manager
\r
27 // By Jason Blochowiak
\r
31 #include "ID_Types.h"
\r
38 #define __DEBUG_UserMgr__
\r
41 //#define HELPTEXTLINKED
\r
46 #define MaxHelpLines 500
\r
48 #define MaxHighName 57
\r
56 char name[MaxHighName + 1];
\r
61 #define MaxGameName 32
\r
62 #define MaxSaveGames 6
\r
68 char name[MaxGameName + 1];
\r
71 #define MaxString 128 // Maximum input string size
\r
78 } WindowRec; // Record used to save & restore screen windows
\r
88 // Hack import for TED launch support
\r
89 extern boolean tedlevel;
\r
90 extern word tedlevelnum;
\r
91 extern void TEDDeath(void);
\r
93 extern boolean ingame, // Set by game code if a game is in progress
\r
94 abortgame, // Set if a game load failed
\r
95 loadedgame, // Set if the current game was loaded
\r
101 extern char *abortprogram; // Set to error msg if program is dying
\r
102 extern GameDiff restartgame; // Normally gd_Continue, else starts game
\r
103 extern word PrintX,PrintY; // Current printing location in the window
\r
104 extern word WindowX,WindowY,// Current location of window
\r
105 WindowW,WindowH;// Current size of window
\r
107 extern boolean Button0,Button1,
\r
109 extern int CursorX,CursorY;
\r
111 extern void (*USL_MeasureString)(char far *,word *,word *),
\r
112 (*USL_DrawString)(char far *);
\r
114 extern boolean (*USL_SaveGame)(int),(*USL_LoadGame)(int);
\r
115 extern void (*USL_ResetGame)(void);
\r
116 extern SaveGame Games[MaxSaveGames];
\r
117 extern HighScore Scores[];
\r
119 #define US_HomeWindow() {PrintX = WindowX; PrintY = WindowY;}
\r
121 extern void US_Startup(void),
\r
124 US_InitRndT(boolean randomize),
\r
125 US_SetLoadSaveHooks(boolean (*load)(int),
\r
126 boolean (*save)(int),
\r
127 void (*reset)(void)),
\r
128 US_TextScreen(void),
\r
129 US_UpdateTextScreen(void),
\r
130 US_FinishTextScreen(void),
\r
131 US_ControlPanel(void),
\r
132 US_DrawWindow(word x,word y,word w,word h),
\r
133 US_CenterWindow(word,word),
\r
134 US_SaveWindow(WindowRec *win),
\r
135 US_RestoreWindow(WindowRec *win),
\r
136 US_ClearWindow(void),
\r
137 US_SetPrintRoutines(void (*measure)(char far *,word *,word *),
\r
138 void (*print)(char far *)),
\r
139 US_PrintCentered(char *s),
\r
140 US_CPrint(char *s),
\r
141 US_CPrintLine(char *s),
\r
143 US_PrintUnsigned(longword n),
\r
144 US_PrintSigned(long n),
\r
145 US_StartCursor(void),
\r
146 US_ShutCursor(void),
\r
147 US_ControlPanel(void),
\r
148 US_CheckHighScore(long score,word other),
\r
149 US_DisplayHighScores(int which);
\r
150 extern boolean US_UpdateCursor(void),
\r
151 US_LineInput(int x,int y,char *buf,char *def,boolean escok,
\r
152 int maxchars,int maxwidth);
\r
153 extern int US_CheckParm(char *parm,char **strings),
\r
156 extern boolean US_ParmPresent(char *arg);
\r
158 void USL_PrintInCenter(char *s,Rect r);
\r
159 char *USL_GiveSaveName(word game);
\r