123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
- /*
- ===========================================================================
- Doom 3 BFG Edition GPL Source Code
- Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
- This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
- Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
- In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
- If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
- ===========================================================================
- */
- #ifndef __DOOMDEF__
- #define __DOOMDEF__
- #include <stdio.h>
- #include <string.h>
- #include "../../neo/sys/sys_public.h"
- //
- // Global parameters/defines.
- //
- // DOOM version
- enum { VERSION = 111 };
- // Game mode handling - identify IWAD version
- // to handle IWAD dependend animations etc.
- typedef enum
- {
- shareware, // DOOM 1 shareware, E1, M9
- registered, // DOOM 1 registered, E3, M27
- commercial, // DOOM 2 retail, E1 M34
- // DOOM 2 german edition not handled
- retail, // DOOM 1 retail, E4, M36
- indetermined // Well, no IWAD found.
-
- } GameMode_t;
- // Mission packs - might be useful for TC stuff?
- typedef enum
- {
- doom, // DOOM 1
- doom2, // DOOM 2
- pack_tnt, // TNT mission pack
- pack_plut, // Plutonia pack
- pack_master, // Master levels
- pack_nerve, // Nerve levels
-
- none
- } GameMission_t;
- // Identify language to use, software localization.
- typedef enum
- {
- english,
- german,
- unknown
- } Language_t;
- // If rangecheck is undefined,
- // most parameter validation debugging code will not be compiled
- #ifdef _DEBUG
- #define RANGECHECK
- #endif
- // Do or do not use external soundserver.
- // The sndserver binary to be run separately
- // has been introduced by Dave Taylor.
- // The integrated sound support is experimental,
- // and unfinished. Default is synchronous.
- // Experimental asynchronous timer based is
- // handled by SNDINTR.
- #define SNDSERV 1
- //#define SNDINTR 1
- // This one switches between MIT SHM (no proper mouse)
- // and XFree86 DGA (mickey sampling). The original
- // linuxdoom used SHM, which is default.
- //#define X11_DGA 1
- //
- // For resize of screen, at start of game.
- // It will not work dynamically, see visplanes.
- //
- //#define BASE_WIDTH 320
- // It is educational but futile to change this
- // scaling e.g. to 2. Drawing of status bar,
- // menues etc. is tied to the scale implied
- // by the graphics.
- #define SCREEN_MUL 1
- #define INV_ASPECT_RATIO 0.625 // 0.75, ideally
- // Defines suck. C sucks.
- // C++ might sucks for OOP, but it sure is a better C.
- // So there.
- //#define SCREENWIDTH 320//320
- //SCREEN_MUL*BASE_WIDTH //320
- //#define SCREENHEIGHT 200//200
- //(int)(SCREEN_MUL*BASE_WIDTH*INV_ASPECT_RATIO) //200
- // The maximum number of players, multiplayer/networking.
- #define MAXPLAYERS 4
- // State updates, number of tics / second.
- #define TICRATE 35
- // The current state of the game: whether we are
- // playing, gazing at the intermission screen,
- // the game final animation, or a demo.
- typedef enum
- {
- GS_LEVEL,
- GS_INTERMISSION,
- GS_FINALE,
- GS_DEMOSCREEN
- } gamestate_t;
- //
- // Difficulty/skill settings/filters.
- //
- // Skill flags.
- #define MTF_EASY 1
- #define MTF_NORMAL 2
- #define MTF_HARD 4
- // Deaf monsters/do not react to sound.
- #define MTF_AMBUSH 8
- typedef enum
- {
- sk_baby,
- sk_easy,
- sk_medium,
- sk_hard,
- sk_nightmare
- } skill_t;
- //
- // Key cards.
- //
- typedef enum
- {
- it_bluecard,
- it_yellowcard,
- it_redcard,
- it_blueskull,
- it_yellowskull,
- it_redskull,
-
- NUMCARDS
-
- } card_t;
- // The defined weapons,
- // including a marker indicating
- // user has not changed weapon.
- typedef enum
- {
- wp_fist,
- wp_pistol,
- wp_shotgun,
- wp_chaingun,
- wp_missile,
- wp_plasma,
- wp_bfg,
- wp_chainsaw,
- wp_supershotgun,
- NUMWEAPONS,
-
- // No pending weapon change.
- wp_nochange
- } weapontype_t;
- // Ammunition types defined.
- typedef enum
- {
- am_clip, // Pistol / chaingun ammo.
- am_shell, // Shotgun / double barreled shotgun.
- am_cell, // Plasma rifle, BFG.
- am_misl, // Missile launcher.
- NUMAMMO,
- am_noammo // Unlimited for chainsaw / fist.
- } ammotype_t;
- // Power up artifacts.
- typedef enum
- {
- pw_invulnerability,
- pw_strength,
- pw_invisibility,
- pw_ironfeet,
- pw_allmap,
- pw_infrared,
- NUMPOWERS
-
- } powertype_t;
- //
- // Power up durations,
- // how many seconds till expiration,
- // assuming TICRATE is 35 ticks/second.
- //
- typedef enum
- {
- INVULNTICS = (30*TICRATE),
- INVISTICS = (60*TICRATE),
- INFRATICS = (120*TICRATE),
- IRONTICS = (60*TICRATE)
-
- } powerduration_t;
- //
- // DOOM keyboard definition.
- // This is the stuff configured by Setup.Exe.
- // Most key data are simple ascii (uppercased).
- //
- #define KEY_RIGHTARROW K_RIGHTARROW
- #define KEY_LEFTARROW K_LEFTARROW
- #define KEY_UPARROW K_UPARROW
- #define KEY_DOWNARROW K_DOWNARROW
- #define KEY_ESCAPE K_ESCAPE
- #define KEY_ENTER K_ENTER
- #define KEY_TAB K_TAB
- #define KEY_F1 K_F1
- #define KEY_F2 K_F2
- #define KEY_F3 K_F3
- #define KEY_F4 K_F4
- #define KEY_F5 K_F5
- #define KEY_F6 K_F6
- #define KEY_F7 K_F7
- #define KEY_F8 K_F8
- #define KEY_F9 K_F9
- #define KEY_F10 K_F10
- #define KEY_F11 K_F11
- #define KEY_F12 K_F12
- #define KEY_BACKSPACE K_BACKSPACE
- #define KEY_PAUSE 0xff
- #define KEY_EQUALS K_EQUALS
- #define KEY_MINUS K_MINUS
- #define KEY_RSHIFT K_RSHIFT
- #define KEY_RCTRL K_RCTRL
- #define KEY_RALT K_RALT
- #define KEY_LALT K_LALT
- // DOOM basic types (qboolean),
- // and max/min values.
- //#include "doomtype.h"
- // Fixed point.
- //#include "m_fixed.h"
- // Endianess handling.
- //#include "m_swap.h"
- // Binary Angles, sine/cosine/atan lookups.
- //#include "tables.h"
- // Event type.
- //#include "d_event.h"
- // Game function, skills.
- //#include "g_game.h"
- // All external data is defined here.
- //#include "doomdata.h"
- // All important printed strings.
- // Language selection (message strings).
- //#include "dstrings.h"
- // Player is a special actor.
- //struct player_s;
- //#include "d_items.h"
- //#include "d_player.h"
- //#include "p_mobj.h"
- //#include "d_net.h"
- // PLAY
- //#include "p_tick.h"
- // Header, generated by sound utility.
- // The utility was written by Dave Taylor.
- //#include "sounds.h"
- #endif // __DOOMDEF__
|