ref: 1531993b0570f1a0af92a0238f4b871d233fa46f
dir: /src/doomdef.h/
// Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // // $Id: doomdef.h 488 2006-05-20 16:16:35Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard // // This program 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 2 // of the License, or (at your option) any later version. // // This program 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 this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. // // DESCRIPTION: // Internally used data structures for virtually everything, // lots of other stuff. // //----------------------------------------------------------------------------- #ifndef __DOOMDEF__ #define __DOOMDEF__ #include <stdio.h> #include <string.h> // // Global parameters/defines. // // DOOM version #define DOOM_VERSION 109 // Version code for cph's longtics hack ("v1.91") #define DOOM_191_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 none } GameMission_t; // What version are we emulating? typedef enum { exe_doom_1_9, // Doom 1.9: used for shareware, registered and commercial exe_ultimate, // Ultimate Doom (retail) exe_final, // Final Doom } GameVersion_t; // Identify language to use, software localization. typedef enum { english, french, german, unknown } Language_t; // If rangecheck is undefined, // most parameter validation debugging code will not be compiled #define RANGECHECK // 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 //SCREEN_MUL*BASE_WIDTH //320 #define SCREENHEIGHT 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_noitems = -1, // the "-skill 0" hack sk_baby = 0, 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; // fraggle: moved key definitions to a separate file #include "doomkeys.h" // DOOM basic types (boolean), // 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__ //----------------------------------------------------------------------------- // // $Log$ // Revision 1.11 2006/01/06 19:26:02 fraggle // Fix the "-skill 0" hack commonly used under DOS // // Revision 1.10 2006/01/01 23:53:15 fraggle // Remove GS_WAITINGSTART gamestate. This will be independent of the main // loop to avoid interfering with the main game code too much. // // Revision 1.9 2005/12/30 18:58:22 fraggle // Fix client code to correctly send reply to server on connection. // Add "waiting screen" while waiting for the game to start. // Hook in the new networking code into the main game code. // // Revision 1.8 2005/10/24 18:50:39 fraggle // Allow the game version to emulate to be specified from the command line // and set compatibility options accordingly. // // Revision 1.7 2005/09/04 17:33:43 fraggle // Support demos recorded with cph's modified "v1.91" doom exe - which // contain higher resolution angleturn // // Revision 1.6 2005/08/04 22:55:08 fraggle // Use DOOM_VERSION to define the Doom version (don't conflict with // automake's config.h). Display GPL message instead of anti-piracy // messages. // // Revision 1.5 2005/08/04 21:48:32 fraggle // Turn on compiler optimisation and warning options // Add SDL_mixer sound code // // Revision 1.4 2005/07/24 02:14:04 fraggle // Move to SDL for graphics. // Translate key scancodes to correct internal format when reading // settings from config file - backwards compatible with config files // for original exes // // Revision 1.3 2005/07/23 19:29:45 fraggle // Put version number back to 1.9 // // Revision 1.2 2005/07/23 16:44:55 fraggle // Update copyright to GNU GPL // // Revision 1.1.1.1 2005/07/23 16:19:43 fraggle // Initial import // // //-----------------------------------------------------------------------------