A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 328 lines 8.8 kB view raw
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: 28 * Internally used data structures for virtually everything, 29 * key definitions, lots of other stuff. 30 * 31 *-----------------------------------------------------------------------------*/ 32 33#ifndef __DOOMDEF__ 34#define __DOOMDEF__ 35 36#include "rockmacros.h" 37 38// killough 4/25/98: Make gcc extensions mean nothing on other compilers 39#ifndef __GNUC__ 40#define __attribute__(x) 41#endif 42 43// 44// Global parameters/defines. 45// 46// DOOM version 47enum { DVERSION = 110 }; 48 49// Game mode handling - identify IWAD version 50// to handle IWAD dependend animations etc. 51enum { 52 shareware, // DOOM 1 shareware, E1, M9 53 registered, // DOOM 1 registered, E3, M27 54 commercial, // DOOM 2 retail, E1 M34 (DOOM 2 german edition not handled) 55 retail, // DOOM 1 retail, E4, M36 56 indetermined // Well, no IWAD found. 57}; 58typedef unsigned GameMode_t; 59 60// Mission packs - might be useful for TC stuff? 61enum { 62 doom, // DOOM 1 63 doom2, // DOOM 2 64 pack_tnt, // TNT mission pack 65 pack_plut, // Plutonia pack 66 none 67}; 68typedef unsigned GameMission_t; 69 70// Identify language to use, software localization. 71enum { 72 english, 73 french, 74 german, 75 unknown 76}; 77typedef unsigned Language_t; 78 79// 80// For resize of screen, at start of game. 81// 82 83#define BASE_WIDTH 320 84 85// It is educational but futile to change this 86// scaling e.g. to 2. Drawing of status bar, 87// menues etc. is tied to the scale implied 88// by the graphics. 89 90#define INV_ASPECT_RATIO 0.625 // 0.75, ideally 91 92// killough 2/8/98: MAX versions for maximum screen sizes 93// allows us to avoid the overhead of dynamic allocation 94// when multiple screen sizes are supported 95 96#if(LCD_HEIGHT>LCD_WIDTH) 97extern int rotate_screen; 98// proff 08/17/98: Changed for high-res 99#define MAX_SCREENWIDTH LCD_HEIGHT 100#define MAX_SCREENHEIGHT LCD_HEIGHT 101extern int SCREENWIDTH; 102extern int SCREENHEIGHT; 103#else 104// proff 08/17/98: Changed for high-res 105#define MAX_SCREENWIDTH LCD_WIDTH 106#define MAX_SCREENHEIGHT LCD_HEIGHT 107#define SCREENWIDTH LCD_WIDTH 108#define SCREENHEIGHT LCD_HEIGHT 109#endif 110 111// The maximum number of players, multiplayer/networking. 112#define MAXPLAYERS 4 113 114// phares 5/14/98: 115// DOOM Editor Numbers (aka doomednum in mobj_t) 116 117#define DEN_PLAYER5 4001 118#define DEN_PLAYER6 4002 119#define DEN_PLAYER7 4003 120#define DEN_PLAYER8 4004 121 122// State updates, number of tics / second. 123#define TICRATE 35 124 125// The current state of the game: whether we are playing, gazing 126// at the intermission screen, the game final animation, or a demo. 127 128enum { 129 GS_LEVEL, 130 GS_INTERMISSION, 131 GS_FINALE, 132 GS_DEMOSCREEN 133}; 134typedef unsigned gamestate_t; 135 136// 137// Difficulty/skill settings/filters. 138// 139 140// Skill flags. 141#define MTF_EASY 1 142#define MTF_NORMAL 2 143#define MTF_HARD 4 144// Deaf monsters/do not react to sound. 145#define MTF_AMBUSH 8 146 147/* killough 11/98 */ 148#define MTF_NOTSINGLE 16 149#define MTF_NOTDM 32 150#define MTF_NOTCOOP 64 151#define MTF_FRIEND 128 152#define MTF_RESERVED 256 153 154enum { 155 sk_none=-1, //jff 3/24/98 create unpicked skill setting 156 sk_baby=0, 157 sk_easy, 158 sk_medium, 159 sk_hard, 160 sk_nightmare 161}; 162typedef int skill_t; 163 164// 165// Key cards. 166// 167 168enum { 169 it_bluecard, 170 it_yellowcard, 171 it_redcard, 172 it_blueskull, 173 it_yellowskull, 174 it_redskull, 175 NUMCARDS 176}; 177typedef unsigned card_t; 178 179// The defined weapons, including a marker 180// indicating user has not changed weapon. 181enum { 182 wp_fist, 183 wp_pistol, 184 wp_shotgun, 185 wp_chaingun, 186 wp_missile, 187 wp_plasma, 188 wp_bfg, 189 wp_chainsaw, 190 wp_supershotgun, 191 192 NUMWEAPONS, 193 wp_nochange // No pending weapon change. 194}; 195typedef unsigned weapontype_t; 196 197// Ammunition types defined. 198enum { 199 am_clip, // Pistol / chaingun ammo. 200 am_shell, // Shotgun / double barreled shotgun. 201 am_cell, // Plasma rifle, BFG. 202 am_misl, // Missile launcher. 203 NUMAMMO, 204 am_noammo // Unlimited for chainsaw / fist. 205}; 206 207typedef unsigned ammotype_t; 208 209// Power up artifacts. 210enum { 211 pw_invulnerability, 212 pw_strength, 213 pw_invisibility, 214 pw_ironfeet, 215 pw_allmap, 216 pw_infrared, 217 NUMPOWERS 218}; 219typedef unsigned powertype_t; 220 221// Power up durations (how many seconds till expiration). 222enum { 223 INVULNTICS = (30*TICRATE), 224 INVISTICS = (60*TICRATE), 225 INFRATICS = (120*TICRATE), 226 IRONTICS = (60*TICRATE) 227}; 228typedef unsigned powerduration_t; 229 230// 231// DOOM keyboard definition. 232// This is the stuff configured by Setup.Exe. 233// Most key data are simple ascii (uppercased). 234// 235#define KEY_RIGHTARROW 0xae 236#define KEY_LEFTARROW 0xac 237#define KEY_UPARROW 0xad 238#define KEY_DOWNARROW 0xaf 239#define KEY_ESCAPE 0x1B 240#define KEY_ENTER 0x60 // Changed due to button reconfig - 0x0D 241#define KEY_TAB 0x61 // Changed due to button reconfig - 0x09 242#define KEY_F1 (0x80+0x3b) 243#define KEY_F2 (0x80+0x3c) 244#define KEY_F3 (0x80+0x3d) 245#define KEY_F4 (0x80+0x3e) 246#define KEY_F5 (0x80+0x3f) 247#define KEY_F6 (0x80+0x40) 248#define KEY_F7 (0x80+0x41) 249#define KEY_F8 (0x80+0x42) 250#define KEY_F9 (0x80+0x43) 251#define KEY_F10 (0x80+0x44) 252#define KEY_F11 (0x80+0x57) 253#define KEY_F12 (0x80+0x58) 254#define KEY_BACKSPACE 0x7F 255#define KEY_PAUSE 0xff 256#define KEY_EQUALS 0x3d 257#define KEY_MINUS 0x2d 258#define KEY_RSHIFT (0x80+0x36) 259#define KEY_RCTRL (0x80+0x1d) 260#define KEY_RALT (0x80+0x38) 261#define KEY_LALT KEY_RALT 262#define KEY_CAPSLOCK 0xba // phares 263 264// phares 3/2/98: 265#define KEY_INSERT 0xd2 266#define KEY_HOME 0xc7 267#define KEY_PAGEUP 0xc9 268#define KEY_PAGEDOWN 0xd1 269#define KEY_DEL 0xc8 270#define KEY_END 0xcf 271#define KEY_SCROLLLOCK 0xc6 272#define KEY_SPACEBAR 0x20 273// phares 3/2/98 274 275#define KEY_NUMLOCK 0xC5 // killough 3/6/98 276 277// cph - Add the numeric keypad keys, as suggested by krose 4/22/99: 278// The way numbers are assigned to keys is a mess, but it's too late to 279// change that easily. At least these additions are don neatly. 280// Codes 0x100-0x200 are reserved for number pad 281 282#define KEY_KEYPAD0 (0x100 + '0') 283#define KEY_KEYPAD1 (0x100 + '1') 284#define KEY_KEYPAD2 (0x100 + '2') 285#define KEY_KEYPAD3 (0x100 + '3') 286#define KEY_KEYPAD4 (0x100 + '4') 287#define KEY_KEYPAD5 (0x100 + '5') 288#define KEY_KEYPAD6 (0x100 + '6') 289#define KEY_KEYPAD7 (0x100 + '7') 290#define KEY_KEYPAD8 (0x100 + '8') 291#define KEY_KEYPAD9 (0x100 + '9') 292#define KEY_KEYPADENTER (0x100 + KEY_ENTER) 293#define KEY_KEYPADDIVIDE (0x100 + '/') 294#define KEY_KEYPADMULTIPLY (0x100 + '*') 295#define KEY_KEYPADMINUS (0x100 + '-') 296#define KEY_KEYPADPLUS (0x100 + '+') 297#define KEY_KEYPADPERIOD (0x100 + '.') 298 299// phares 4/19/98: 300// Defines Setup Screen groups that config variables appear in. 301// Used when resetting the defaults for every item in a Setup group. 302 303enum { 304 ss_none, 305 ss_keys, 306 ss_weap, 307 ss_stat, 308 ss_auto, 309 ss_enem, 310 ss_mess, 311 ss_chat, 312 ss_gen, /* killough 10/98 */ 313 ss_comp, /* killough 10/98 */ 314 ss_max 315}; 316typedef unsigned ss_types; 317 318// phares 3/20/98: 319// 320// Player friction is variable, based on controlling 321// linedefs. More friction can create mud, sludge, 322// magnetized floors, etc. Less friction can create ice. 323 324#define MORE_FRICTION_MOMENTUM 15000 // mud factor based on momentum 325#define ORIG_FRICTION 0xE800 // original value 326#define ORIG_FRICTION_FACTOR 2048 // original value 327 328#endif // __DOOMDEF__