summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/wolf3d/id_us.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/progs/wolf3d/id_us.h')
-rw-r--r--apps/plugins/sdl/progs/wolf3d/id_us.h101
1 files changed, 101 insertions, 0 deletions
diff --git a/apps/plugins/sdl/progs/wolf3d/id_us.h b/apps/plugins/sdl/progs/wolf3d/id_us.h
new file mode 100644
index 0000000000..84958631f7
--- /dev/null
+++ b/apps/plugins/sdl/progs/wolf3d/id_us.h
@@ -0,0 +1,101 @@
1//
2// ID Engine
3// ID_US.h - Header file for the User Manager
4// v1.0d1
5// By Jason Blochowiak
6//
7
8#ifndef __ID_US__
9#define __ID_US__
10
11#ifdef __DEBUG__
12#define __DEBUG_UserMgr__
13#endif
14
15//#define HELPTEXTLINKED
16
17#define MaxX 320
18#define MaxY 200
19
20#define MaxHelpLines 500
21
22#define MaxHighName 57
23#define MaxScores 7
24typedef struct
25{
26 char name[MaxHighName + 1];
27 int32_t score;
28 word completed,episode;
29} HighScore;
30
31#define MaxGameName 32
32#define MaxSaveGames 6
33typedef struct
34{
35 char signature[4];
36 word *oldtest;
37 boolean present;
38 char name[MaxGameName + 1];
39} SaveGame;
40
41#define MaxString 128 // Maximum input string size
42
43typedef struct
44{
45 int x,y,
46 w,h,
47 px,py;
48} WindowRec; // Record used to save & restore screen windows
49
50extern boolean ingame, // Set by game code if a game is in progress
51 loadedgame; // Set if the current game was loaded
52extern word PrintX,PrintY; // Current printing location in the window
53extern word WindowX,WindowY,// Current location of window
54 WindowW,WindowH;// Current size of window
55
56extern void (*USL_MeasureString)(const char *,word *,word *);
57extern void (*USL_DrawString)(const char *);
58
59extern boolean (*USL_SaveGame)(int),(*USL_LoadGame)(int);
60extern void (*USL_ResetGame)(void);
61extern SaveGame Games[MaxSaveGames];
62extern HighScore Scores[];
63
64#define US_HomeWindow() {PrintX = WindowX; PrintY = WindowY;}
65
66void US_Startup(void);
67void US_Shutdown(void);
68void US_TextScreen(void),
69 US_UpdateTextScreen(void),
70 US_FinishTextScreen(void);
71void US_DrawWindow(word x,word y,word w,word h);
72void US_CenterWindow(word,word);
73void US_SaveWindow(WindowRec *win),
74 US_RestoreWindow(WindowRec *win);
75void US_ClearWindow(void);
76void US_SetPrintRoutines(void (*measure)(const char *,word *,word *),
77 void (*print)(const char *));
78void US_PrintCentered(const char *s),
79 US_CPrint(const char *s),
80 US_CPrintLine(const char *s),
81 US_Print(const char *s);
82void US_Printf(const char *formatStr, ...);
83void US_CPrintf(const char *formatStr, ...);
84
85void US_PrintUnsigned(longword n);
86void US_PrintSigned(int32_t n);
87void US_StartCursor(void),
88 US_ShutCursor(void);
89void US_CheckHighScore(int32_t score,word other);
90void US_DisplayHighScores(int which);
91extern boolean US_UpdateCursor(void);
92boolean US_LineInput(int x,int y,char *buf,const char *def,boolean escok,
93 int maxchars,int maxwidth);
94
95void USL_PrintInCenter(const char *s,Rect r);
96char *USL_GiveSaveName(word game);
97
98void US_InitRndT(int randomize);
99int US_RndT();
100
101#endif