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