+++ /dev/null
-/* Reconstructed Commander Keen 4-6 Source Code\r
- * Copyright (C) 2021 K1n9_Duk3\r
- *\r
- * This file is primarily based on:\r
- * Catacomb 3-D Source Code\r
- * Copyright (C) 1993-2014 Flat Rock Software\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License along\r
- * with this program; if not, write to the Free Software Foundation, Inc.,\r
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
- */\r
-\r
-//\r
-// ID Engine\r
-// ID_US.h - Header file for the User Manager\r
-// v1.0d1\r
-// By Jason Blochowiak\r
-//\r
-\r
-#ifndef __TYPES__\r
-#include "ID_Types.h"\r
-#endif\r
-\r
-#ifndef __ID_US__\r
-#define __ID_US__\r
-\r
-#ifdef __DEBUG__\r
-#define __DEBUG_UserMgr__\r
-#endif\r
-\r
-//#define HELPTEXTLINKED\r
-\r
-#define MaxX 320\r
-#define MaxY 200\r
-\r
-#define MaxHelpLines 500\r
-\r
-#define MaxHighName 57\r
-#ifdef CAT3D\r
-#define MaxScores 7\r
-#else\r
-#define MaxScores 8\r
-#endif\r
-typedef struct\r
- {\r
- char name[MaxHighName + 1];\r
- long score;\r
- word completed;\r
- } HighScore;\r
-\r
-#define MaxGameName 32\r
-#define MaxSaveGames 6\r
-typedef struct\r
- {\r
- char signature[4];\r
- word *oldtest;\r
- boolean present;\r
- char name[MaxGameName + 1];\r
- } SaveGame;\r
-\r
-#define MaxString 128 // Maximum input string size\r
-\r
-typedef struct\r
- {\r
- int x,y,\r
- w,h,\r
- px,py;\r
- } WindowRec; // Record used to save & restore screen windows\r
-\r
-typedef enum\r
- {\r
- gd_Continue,\r
- gd_Easy,\r
- gd_Normal,\r
- gd_Hard\r
- } GameDiff;\r
-\r
-// Hack import for TED launch support\r
-extern boolean tedlevel;\r
-extern word tedlevelnum;\r
-extern void TEDDeath(void);\r
-\r
-extern boolean ingame, // Set by game code if a game is in progress\r
- abortgame, // Set if a game load failed\r
- loadedgame, // Set if the current game was loaded\r
-#ifdef KEEN6\r
- checkpassed,\r
-#endif\r
- NoWait,\r
- HighScoresDirty;\r
-extern char *abortprogram; // Set to error msg if program is dying\r
-extern GameDiff restartgame; // Normally gd_Continue, else starts game\r
-extern word PrintX,PrintY; // Current printing location in the window\r
-extern word WindowX,WindowY,// Current location of window\r
- WindowW,WindowH;// Current size of window\r
-\r
-extern boolean Button0,Button1,\r
- CursorBad;\r
-extern int CursorX,CursorY;\r
-\r
-extern void (*USL_MeasureString)(char far *,word *,word *),\r
- (*USL_DrawString)(char far *);\r
-\r
-extern boolean (*USL_SaveGame)(int),(*USL_LoadGame)(int);\r
-extern void (*USL_ResetGame)(void);\r
-extern SaveGame Games[MaxSaveGames];\r
-extern HighScore Scores[];\r
-\r
-#define US_HomeWindow() {PrintX = WindowX; PrintY = WindowY;}\r
-\r
-extern void US_Startup(void),\r
- US_Setup(void),\r
- US_Shutdown(void),\r
- US_InitRndT(boolean randomize),\r
- US_SetLoadSaveHooks(boolean (*load)(int),\r
- boolean (*save)(int),\r
- void (*reset)(void)),\r
- US_TextScreen(void),\r
- US_UpdateTextScreen(void),\r
- US_FinishTextScreen(void),\r
- US_ControlPanel(void),\r
- US_DrawWindow(word x,word y,word w,word h),\r
- US_CenterWindow(word,word),\r
- US_SaveWindow(WindowRec *win),\r
- US_RestoreWindow(WindowRec *win),\r
- US_ClearWindow(void),\r
- US_SetPrintRoutines(void (*measure)(char far *,word *,word *),\r
- void (*print)(char far *)),\r
- US_PrintCentered(char *s),\r
- US_CPrint(char *s),\r
- US_CPrintLine(char *s),\r
- US_Print(char *s),\r
- US_PrintUnsigned(longword n),\r
- US_PrintSigned(long n),\r
- US_StartCursor(void),\r
- US_ShutCursor(void),\r
- US_ControlPanel(void),\r
- US_CheckHighScore(long score,word other),\r
- US_DisplayHighScores(int which);\r
-extern boolean US_UpdateCursor(void),\r
- US_LineInput(int x,int y,char *buf,char *def,boolean escok,\r
- int maxchars,int maxwidth);\r
-extern int US_CheckParm(char *parm,char **strings),\r
- US_RndT(void);\r
-\r
-extern boolean US_ParmPresent(char *arg);\r
-\r
- void USL_PrintInCenter(char *s,Rect r);\r
- char *USL_GiveSaveName(word game);\r
-#endif\r