summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/g_game.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom/g_game.h')
-rw-r--r--apps/plugins/doom/g_game.h192
1 files changed, 192 insertions, 0 deletions
diff --git a/apps/plugins/doom/g_game.h b/apps/plugins/doom/g_game.h
new file mode 100644
index 0000000000..6a2d3dcd97
--- /dev/null
+++ b/apps/plugins/doom/g_game.h
@@ -0,0 +1,192 @@
1/* Emacs style mode select -*- C++ -*-
2 *-----------------------------------------------------------------------------
3 *
4 *
5 * PrBoom a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2000 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 * 02111-1307, USA.
26 *
27 * DESCRIPTION: Main game control interface.
28 *-----------------------------------------------------------------------------*/
29
30#ifndef __G_GAME__
31#define __G_GAME__
32
33#include "doomdef.h"
34#include "d_event.h"
35#include "d_ticcmd.h"
36
37//
38// GAME
39//
40
41// killough 5/2/98: number of bytes reserved for saving options
42#define GAME_OPTION_SIZE 64
43
44boolean G_Responder(event_t *ev);
45boolean G_CheckDemoStatus(void);
46boolean G_CheckDemoStatus(void);
47void G_DeathMatchSpawnPlayer(int playernum);
48void G_InitNew(skill_t skill, int episode, int map);
49void G_DeferedInitNew(skill_t skill, int episode, int map);
50void G_DeferedPlayDemo(const char *demo); // CPhipps - const
51void G_LoadGame(int slot, boolean is_command); // killough 5/15/98
52void G_ForcedLoadGame(void); // killough 5/15/98: forced loadgames
53void G_DoLoadGame(void);
54void G_SaveGame(int slot, char *description); // Called by M_Responder.
55void G_BeginRecording(void);
56// CPhipps - const on these string params
57void G_RecordDemo(const char *name); // Only called by startup code.
58void G_PlayDemo(const char *name);
59void G_TimeDemo(const char *name);
60void G_ExitLevel(void);
61void G_SecretExitLevel(void);
62void G_WorldDone(void);
63void G_EndGame(void); /* cph - make m_menu.c call a G_* function for this */
64void G_Ticker(void);
65void G_ReloadDefaults(void); // killough 3/1/98: loads game defaults
66void G_SaveGameName(char *, size_t, int, boolean); /* killough 3/22/98: sets savegame filename */
67void G_SetFastParms(int); // killough 4/10/98: sets -fast parameters
68void G_DoNewGame(void);
69void G_DoReborn(int playernum);
70void G_DoPlayDemo(void);
71void G_DoCompleted(void);
72void G_ReadDemoTiccmd(ticcmd_t *cmd);
73void G_WriteDemoTiccmd(ticcmd_t *cmd);
74void G_DoWorldDone(void);
75void G_Compatibility(void);
76const byte *G_ReadOptions(const byte *demo_p); /* killough 3/1/98 - cph: const byte* */
77byte *G_WriteOptions(byte *demo_p); // killough 3/1/98
78void G_PlayerReborn(int player);
79void G_InitNew(skill_t skill, int episode, int map);
80void G_RestartLevel(void); // CPhipps - menu involked level restart
81void G_DoLoadGame(void);
82void G_DoVictory(void);
83void G_BuildTiccmd (ticcmd_t* cmd); // CPhipps - move decl to header
84void G_ChangedPlayerColour(int pn, int cl); // CPhipps - On-the-fly player colour changing
85void G_MakeSpecialEvent(buttoncode_t bc, ...); /* cph - new event stuff */
86
87// killough 1/18/98: Doom-style printf; killough 4/25/98: add gcc attributes
88// CPhipps - renames to doom_printf to avoid name collision with glibc
89void doom_printf(const char *, ...) __attribute__((format(printf,1,2)));
90
91// killough 5/2/98: moved from m_misc.c:
92
93extern int key_right;
94extern int key_left;
95extern int key_up;
96extern int key_down;
97extern int key_menu_right; // phares 3/7/98
98extern int key_menu_left; // |
99extern int key_menu_up; // V
100extern int key_menu_down;
101extern int key_menu_backspace; // ^
102extern int key_menu_escape; // |
103extern int key_menu_enter; // phares 3/7/98
104extern int key_strafeleft;
105extern int key_straferight;
106
107extern int key_fire;
108extern int key_use;
109extern int key_strafe;
110extern int key_speed;
111extern int key_escape; // phares
112extern int key_savegame; // |
113extern int key_loadgame; // V
114extern int key_autorun;
115extern int key_reverse;
116extern int key_zoomin;
117extern int key_zoomout;
118extern int key_chat;
119extern int key_backspace;
120extern int key_enter;
121extern int key_help;
122extern int key_soundvolume;
123extern int key_hud;
124extern int key_quicksave;
125extern int key_endgame;
126extern int key_messages;
127extern int key_quickload;
128extern int key_quit;
129extern int key_gamma;
130extern int key_spy;
131extern int key_pause;
132extern int key_setup;
133extern int key_forward;
134extern int key_leftturn;
135extern int key_rightturn;
136extern int key_backward;
137extern int key_weapon;
138extern int key_weapontoggle;
139extern int key_weapon1;
140extern int key_weapon2;
141extern int key_weapon3;
142extern int key_weapon4;
143extern int key_weapon5;
144extern int key_weapon6;
145extern int key_weapon7;
146extern int key_weapon8;
147extern int key_weapon9;
148extern int destination_keys[MAXPLAYERS];
149extern int key_map_right;
150extern int key_map_left;
151extern int key_map_up;
152extern int key_map_down;
153extern int key_map_zoomin;
154extern int key_map_zoomout;
155extern int key_map;
156extern int key_map_gobig;
157extern int key_map_follow;
158extern int key_map_mark; // ^
159extern int key_map_clear; // |
160extern int key_map_grid; // phares
161extern int key_map_rotate; // cph - map rotation
162extern int key_map_overlay;// cph - map overlay
163extern int key_screenshot; // killough 2/22/98 -- add key for screenshot
164extern int autorun; // always running? // phares
165
166extern int joybfire;
167extern int joybuse;
168extern int joybstrafe;
169extern int joybspeed;
170
171extern int mousebfire;
172extern int mousebstrafe;
173extern int mousebforward;
174
175
176extern int defaultskill; //jff 3/24/98 default skill
177extern boolean haswolflevels; //jff 4/18/98 wolf levels present
178
179extern int bodyquesize; // killough 2/8/98: adustable corpse limit
180
181// killough 5/2/98: moved from d_deh.c:
182// Par times (new item with BOOM) - from g_game.c
183extern int pars[4][10]; // hardcoded array size
184extern int cpars[32]; // hardcoded array size
185// CPhipps - Make savedesciption visible in wider scope
186#define SAVEDESCLEN 32
187extern char savedescription[SAVEDESCLEN]; // Description to save in savegame
188
189/* cph - compatibility level strings */
190extern const char * comp_lev_str[];
191
192#endif