~ubuntu-branches/ubuntu/karmic/rott/karmic-proposed

« back to all changes in this revision

Viewing changes to rott/_rt_menu.h

  • Committer: Bazaar Package Importer
  • Author(s): Fabian Greffrath
  • Date: 2008-01-27 20:00:00 UTC
  • mfrom: (1.1.1 upstream) (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080127200000-myle9y0099o45sfv
Tags: 1.0+dfsg-2
* debian/patches/01-custom-datapath.dpatch,
  debian/patches/13-improve-makefile.dpatch:
  + Changed DATADIR back to "/usr/share/games/rott/".

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
Copyright (C) 1994-1995 Apogee Software, Ltd.
3
 
 
4
 
This program is free software; you can redistribute it and/or
5
 
modify it under the terms of the GNU General Public License
6
 
as published by the Free Software Foundation; either version 2
7
 
of the License, or (at your option) any later version.
8
 
 
9
 
This program is distributed in the hope that it will be useful,
10
 
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
 
 
13
 
See the GNU General Public License for more details.
14
 
 
15
 
You should have received a copy of the GNU General Public License
16
 
along with this program; if not, write to the Free Software
17
 
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
 
 
19
 
*/
20
 
#ifndef _rt_menu_private
21
 
#define _rt_menu_private
22
 
 
23
 
//******************************************************************************
24
 
//
25
 
// Private Header for RT_MENU.C
26
 
//
27
 
//******************************************************************************
28
 
 
29
 
#include "rt_in.h"
30
 
 
31
 
//
32
 
// Specific Menu defines
33
 
//
34
 
 
35
 
#define BORDCOLOR       0x29
36
 
#define BORD2COLOR      0x23
37
 
#define DEACTIVE        0x2b
38
 
#define BKGDCOLOR       0x2d
39
 
#define STRIPE          0x2c
40
 
 
41
 
 
42
 
#define SENSITIVE       60
43
 
#define CENTER          SENSITIVE*2
44
 
 
45
 
 
46
 
#define MENU_X          32
47
 
#define MENU_Y          16
48
 
#define MENU_W          235
49
 
#define MENU_H          14*9+4
50
 
 
51
 
 
52
 
#define LSM_X           180      //32
53
 
#define LSM_Y           16
54
 
#define LSM_W           80       //176
55
 
#define LSM_H           10*14+8
56
 
 
57
 
#define LSA_X           96
58
 
#define LSA_Y           80
59
 
#define LSA_W           130
60
 
#define LSA_H           42
61
 
 
62
 
 
63
 
#define SM_X            32
64
 
#define SM_Y            52
65
 
#define SM_W            252
66
 
#define SM_H            35
67
 
 
68
 
#define SM_Y1           20
69
 
#define SM_H1           4*14-9
70
 
#define SM_Y2           SM_Y1+5*14
71
 
#define SM_H2           4*14-9
72
 
#define SM_Y3           SM_Y2+5*14
73
 
#define SM_H3           3*14-9
74
 
 
75
 
 
76
 
#define CTL_X           19
77
 
#define CTL_Y           32
78
 
#define CTL_W           284
79
 
#define CTL_H           105
80
 
 
81
 
 
82
 
#define CST_X           20
83
 
#define CST_Y           43
84
 
#define CST_START       60
85
 
#define CST_SPC         60
86
 
 
87
 
 
88
 
#define TUF_X           0
89
 
#define TUF_Y           32
90
 
 
91
 
 
92
 
#define HLP_X           34
93
 
#define HLP_Y           63
94
 
#define HLP_W           264
95
 
#define HLP_H           51
96
 
 
97
 
 
98
 
#define MU_X            32
99
 
#define MU_Y            22
100
 
#define MU_W            252
101
 
#define MU_H            118
102
 
 
103
 
 
104
 
#define FX_X            32
105
 
#define FX_Y            16
106
 
#define FX_W            252
107
 
#define FX_H            130
108
 
 
109
 
 
110
 
#define MP_X            55//32
111
 
#define MP_Y            60
112
 
#define MP_W            252
113
 
#define MP_H            35
114
 
 
115
 
 
116
 
#define X1_X            55
117
 
#define X1_Y            25
118
 
#define X1_W            252
119
 
 
120
 
#define X2_X            55
121
 
#define X2_Y            65
122
 
#define X2_W            252
123
 
#define X2_H            35
124
 
 
125
 
#define X3_X            55
126
 
#define X3_Y            65
127
 
#define X3_W            252
128
 
#define X3_H            35
129
 
 
130
 
#define LEVSEL_X            32
131
 
#define LEVSEL_Y            22
132
 
#define LEVSEL_W            252
133
 
#define LEVSEL_H            118
134
 
#define MAXCUSTOM       12
135
 
 
136
 
#define STARTITEM       newgame
137
 
 
138
 
//
139
 
// General defines
140
 
//
141
 
#define CP_SemiActive      4
142
 
#define CP_Highlight       5
143
 
 
144
 
#define OUTOFRANGE         100
145
 
#define ESCPRESSED         -1
146
 
#define PAGEUP             -2
147
 
#define PAGEDOWN           -3
148
 
#define NOTAVAILABLECOLOR  7
149
 
#define NEXTPAGECOLOR      16
150
 
#define NORMALCOLOR        21
151
 
#define DIMMEDCOLOR        24
152
 
#define ACTIVECOLOR        241
153
 
#define HIGHLIGHTCOLOR     1
154
 
 
155
 
#define MouseInt 0x33
156
 
#define GAMESVD      "There's already a game\n" \
157
 
                     "saved at this position.\n"\
158
 
                     "Overwrite?"
159
 
#define COLOR        235
160
 
 
161
 
#define CUSTOMX      76
162
 
 
163
 
#define NUMSAVEGAMES 14
164
 
 
165
 
#define PWORDX 58
166
 
#define PWORDY 46
167
 
//#define PBOXX  68
168
 
#define PBOXX  ( ( 288 - PBOXW ) / 2 )
169
 
#define PBOXY  71
170
 
#define PBOXW  115
171
 
#define PSTRW  110
172
 
#define PBOXH  12
173
 
 
174
 
 
175
 
#define QUICKSAVEBACKUP ("rottgamf.rot")
176
 
//******************************************************************************
177
 
//
178
 
// ENUMS
179
 
//
180
 
//******************************************************************************
181
 
 
182
 
typedef struct
183
 
{
184
 
   int allowed[4];
185
 
} CustomCtrls;
186
 
 
187
 
// FOR INPUT TYPES
188
 
enum {MOUSE, JOYSTICK, KEYBOARDBTNS, KEYBOARDMOVE, SPECIAL1, SPECIAL2};
189
 
 
190
 
 
191
 
//******************************************************************************
192
 
//
193
 
// GLOBALS
194
 
//
195
 
//******************************************************************************
196
 
 
197
 
static byte *ScanNames[] =    // Scan code names with single chars
198
 
{
199
 
   "?","?","1","2","3","4","5","6","7","8","9","0","-","+","?","?",
200
 
   "Q","W","E","R","T","Y","U","I","O","P","[","]","|","?","A","S",
201
 
   "D","F","G","H","J","K","L",";","\"","?","?","?","Z","X","C","V",
202
 
   "B","N","M",",",".","/","?","?","?","?","?","?","?","?","?","?",
203
 
   "?","?","?","?","?","?","?","?","\xf","?","-","\x15","5","\x11","+","?",
204
 
   "\x13","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?",
205
 
   "?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?",
206
 
   "?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?"
207
 
};
208
 
 
209
 
 
210
 
static byte ExtScanCodes[] = // Scan codes with >1 char names
211
 
{
212
 
   1,    0xe,  0xf,  0x1d, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
213
 
   0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x57, 0x58, 0x46, 0x1c, 0x36,
214
 
   0x37, 0x38, 0x47, 0x49, 0x4f, 0x51, 0x52, 0x53, 0x45, 0x48,
215
 
   0x50, 0x4b, 0x4d, 0x00
216
 
};
217
 
 
218
 
static byte *ExtScanNames[] = // Names corresponding to ExtScanCodes
219
 
{
220
 
   "Esc","BkSp","Tab","Ctrl","Space","CapLk","F1","F2","F3","F4",
221
 
   "F5","F6","F7","F8","F9","F10","F11","F12","SclLk","Enter","Shift",
222
 
   "PrtSc","Alt","Home","PgUp","End","PgDn","Ins","Del","NumLk","Up",
223
 
   "Down","Left","Right",""
224
 
};
225
 
 
226
 
 
227
 
//******************************************************************************
228
 
//
229
 
// PROTOTYPES
230
 
//
231
 
//******************************************************************************
232
 
 
233
 
void MouseSensitivity (void);
234
 
void DoThreshold (void);
235
 
byte * IN_GetScanName (ScanCode scan);
236
 
void DisplayInfo (int which);
237
 
 
238
 
void PrintLSEntry (int w);
239
 
 
240
 
void DrawHalfStep (int x, int y);
241
 
 
242
 
void DrawCtlScreen (void);
243
 
void DrawCtlButtons (void);
244
 
void DrawSoundMenu (void);
245
 
void DrawCustomScreen (void);
246
 
void DrawLoadSaveScreen (int loadsave);
247
 
void DrawLoadSaveScreenAlt (int loadsave);
248
 
void DrawMusicMenu (void);
249
 
void DrawNewGame (void);
250
 
void DrawNewGameDiff (int w);
251
 
void DrawNewPlayerDiff (int w);
252
 
void DrawFXMenu (void);
253
 
void DrawFXButtons (void);
254
 
void DrawCustomJoystick (void);
255
 
void DrawCustomMouse (void);
256
 
void DrawCustomSpecial (void);
257
 
void DrawCustomMenu (void);
258
 
void DrawPlayerMenu (void);
259
 
 
260
 
void DoMainMenu (void);
261
 
 
262
 
boolean CP_DisplayMsg (char *s, int number);
263
 
void CP_EndGame (void);
264
 
int CP_SaveGame (void);
265
 
void CP_Control (void);
266
 
void CP_Sound (void);
267
 
void CP_ChangeView (void);
268
 
void CP_DoubleClickSpeed( void );
269
 
void CP_ErrorMsg( char *title, char *error, int font );
270
 
void CP_Quit (int which);
271
 
void CP_NewGame (void);
272
 
void CP_Music (void);
273
 
void CP_FX (void);
274
 
void CP_MCports (void);
275
 
void CP_FXMenu (void);
276
 
void CP_Custom (void);
277
 
void CP_Keyboard (void);
278
 
void CP_Mouse (void);
279
 
void CP_Joystick (void);
280
 
void CP_Special (void);
281
 
void CP_OrderInfo( void );
282
 
 
283
 
void DefineMouseBtns1 (void);
284
 
void DefineMouseBtns2 (void);
285
 
void DefineKeyBtns1 (void);
286
 
void DefineKeyBtns2 (void);
287
 
void DefineKeyMove1 (void);
288
 
void DefineKeyMove2 (void);
289
 
void DefineJoyBtns1 (void);
290
 
void DefineJoyBtns2 (void);
291
 
void DefineSpecialBtns1 (void);
292
 
void DefineSpecialBtns2 (void);
293
 
 
294
 
void DrawSTMenuBuf (int x, int y, int w, int h, boolean up);
295
 
 
296
 
void MusicVolume (void);
297
 
void FXVolume (void);
298
 
 
299
 
void DefineKey( void );
300
 
void DefineJoyBtn( void );
301
 
void DefineMouseBtn( void );
302
 
 
303
 
void DrawControlMenu (void);
304
 
void CP_ControlMenu (void);
305
 
void DrawOptionsMenu (void);
306
 
void CP_OptionsMenu (void);
307
 
void DrawOptionsButtons (void);
308
 
void MenuFlipSpeed (void);
309
 
void DrawDetailMenu (void);
310
 
void CP_DetailMenu (void);
311
 
void DrawBattleMenu (void);
312
 
void CP_BattleMenu (void);
313
 
void MCERROR (void);
314
 
 
315
 
void DrawKeyboardMenu (void);
316
 
void CP_KeyboardMenu (void);
317
 
boolean SliderMenu( int *number, int upperbound, int lowerbound, int erasex,
318
 
   int erasey, int erasew, int numadjust, char *blockname,
319
 
   void (*routine) (int w), char *title, char *left, char *right );
320
 
 
321
 
void DrawF1Help (void);
322
 
void CP_F1Help (void);
323
 
void CP_ScreenSize( void );
324
 
 
325
 
void CP_ViolenceMenu (void);
326
 
void DrawViolenceLevelMenu (void);
327
 
void DrawViolenceLevelPWord (void);
328
 
 
329
 
void DrawViolenceLevel (void);
330
 
void CP_ViolenceLevel (void);
331
 
 
332
 
void DrawPWMenu (void);
333
 
void CP_PWMenu (void);
334
 
 
335
 
void DrawBattleModes (void);
336
 
void CP_BattleModes (void);
337
 
 
338
 
void DrawBattleOptions (void);
339
 
void CP_BattleOptions (void);
340
 
 
341
 
void DrawGravityMenu (void);
342
 
void CP_GravityOptions (void);
343
 
void DrawSpeedMenu (void);
344
 
void CP_SpeedOptions (void);
345
 
void DrawAmmoPerWeaponMenu (void);
346
 
void CP_AmmoPerWeaponOptions (void);
347
 
void DrawHitPointsMenu (void);
348
 
void CP_HitPointsOptions (void);
349
 
void DrawSpawnControlMenu (void);
350
 
void DrawSpawnControlButtons (void);
351
 
void CP_SpawnControlOptions (void);
352
 
void DrawLightLevelMenu (void);
353
 
void CP_LightLevelOptions (void);
354
 
void DrawPointGoalMenu (void);
355
 
void CP_PointGoalOptions (void);
356
 
void DrawDangerMenu (void);
357
 
void CP_DangerOptions (void);
358
 
void DrawTimeLimitMenu (void);
359
 
void CP_TimeLimitOptions (void);
360
 
void PrintBattleOption( boolean inmenu, int x, int y, char *text );
361
 
 
362
 
void CP_OnePlayerWarningMessage( void );
363
 
 
364
 
void DrawMultiPageCustomMenu( char *title, void ( *redrawfunc )( void ) );
365
 
 
366
 
#endif