1 /** @file config.h Common configuration variables. 2 * 3 * @authors Copyright (c) 2014-2017 Jaakko Keränen <jaakko.keranen@iki.fi> 4 * 5 * @par License 6 * GPL: http://www.gnu.org/licenses/gpl.html 7 * 8 * <small>This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by the 10 * Free Software Foundation; either version 2 of the License, or (at your 11 * option) any later version. This program is distributed in the hope that it 12 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 14 * Public License for more details. You should have received a copy of the GNU 15 * General Public License along with this program; if not, see: 16 * http://www.gnu.org/licenses</small> 17 */ 18 19 #ifndef LIBCOMMON_CONFIG_H 20 #define LIBCOMMON_CONFIG_H 21 22 #include <de/types.h> 23 24 #if __JHEXEN__ 25 # include "h2def.h" 26 #else 27 # include "doomdef.h" 28 #endif 29 #include "hu_menu.h" 30 31 typedef struct libcommon_config_s { 32 // Player movement: 33 int alwaysRun; // Always run. 34 int noAutoAim; // No auto-aiming? 35 36 int lookSpring; 37 float lookSpeed; 38 byte povLookAround; 39 int useJLook; // Joy look (joy Y => viewpitch) 40 int jLookDeltaMode; 41 42 float turnSpeed; 43 float playerMoveSpeed; 44 45 int jumpEnabled; 46 float jumpPower; 47 int airborneMovement; 48 49 int cameraNoClip; 50 float bobView; 51 float bobWeapon; 52 int plrViewHeight; 53 54 // Gameplay: 55 byte switchSoundOrigin; 56 byte defaultRuleFastMonsters; 57 byte pushableMomentumLimitedToPusher; 58 59 // Weapons: 60 byte weaponCycleSequential; // if true multiple next/prev weapon impulses can be chained to allow the user to "count-click-switch". 61 int weaponOrder[NUM_WEAPON_TYPES]; 62 byte weaponNextMode; // if true use the weaponOrder for next/previous. 63 byte weaponAutoSwitch; 64 byte noWeaponAutoSwitchIfFiring; 65 byte ammoAutoSwitch; 66 67 // User interface: 68 int screenBlocks; 69 int setBlocks; 70 71 float menuScale; 72 int menuEffectFlags; 73 float menuShadow; 74 byte menuSlam; 75 byte menuShortcutsEnabled; 76 byte menuScaleMode; 77 int menuPatchReplaceMode; 78 byte menuGameSaveSuggestDescription; 79 byte menuCursorRotate; 80 81 float menuTextColors[MENU_COLOR_COUNT][3]; 82 float menuTextFlashColor[3]; 83 int menuTextFlashSpeed; 84 float menuTextGlitter; 85 86 byte echoMsg; 87 88 // HUD: 89 float statusbarScale; 90 float statusbarOpacity; 91 float statusbarCounterAlpha; 92 93 float filterStrength; 94 95 int hudFog; 96 int hudPatchReplaceMode; 97 float hudScale; // How to scale HUD data? 98 float hudColor[4]; 99 float hudIconAlpha; 100 float hudTimer; // Number of seconds until the hud/statusbar auto-hides. 101 102 byte hudShownCheatCounters; 103 float hudCheatCounterScale; 104 byte hudCheatCounterShowWithAutomap; ///< Only show when the automap is open. 105 106 int msgCount; 107 float msgScale; 108 float msgUptime; 109 int msgBlink; 110 int msgAlign; 111 float msgColor[3]; 112 113 char* chatMacros[10]; 114 byte chatBeep; 115 116 byte mapTitle; 117 byte hideIWADAuthor; 118 byte hideUnknownAuthor; 119 120 // Crosshair: 121 int xhair; 122 float xhairAngle; 123 float xhairSize; 124 byte xhairVitality; 125 float xhairColor[4]; 126 float xhairLineWidth; 127 128 /// Reference hue value for the crosshair at 0% health 129 float xhairLiveRed; 130 float xhairLiveGreen; 131 float xhairLiveBlue; 132 133 /// Reference hue value for the crosshair at 100% health 134 float xhairDeadRed; 135 float xhairDeadGreen; 136 float xhairDeadBlue; 137 138 // Automap: 139 float automapMobj[3]; 140 float automapL0[3]; 141 float automapL1[3]; 142 float automapL2[3]; 143 float automapL3[3]; 144 float automapBack[3]; 145 float automapOpacity; 146 byte automapNeverObscure; 147 float automapLineAlpha; 148 float automapLineWidth; ///< In fixed 320x200 pixels. 149 byte automapRotate; 150 int automapHudDisplay; 151 int automapCustomColors; 152 byte automapShowDoors; 153 float automapDoorGlow; 154 byte automapBabyKeys; 155 float automapZoomSpeed; 156 float automapPanSpeed; 157 byte automapPanResetOnOpen; 158 float automapOpenSeconds; 159 byte automapTitleAtBottom; 160 161 // Intermission: 162 byte inludeScaleMode; 163 int inludePatchReplaceMode; 164 165 // Savegames: 166 byte confirmQuickGameSave; 167 byte confirmRebornLoad; 168 byte loadLastSaveOnReborn; 169 170 // Multiplayer: 171 char * netEpisode; 172 Uri * netMap; 173 byte netSkill; 174 byte netColor; 175 int netGravity; // Custom gravity multiplier. 176 byte netDeathmatch; 177 byte netNoMonsters; 178 byte netJumping; 179 byte netMobDamageModifier; // Multiplier for non-player mobj damage. 180 byte netMobHealthModifier; // Health modifier for non-player mobjs. 181 byte netNoMaxZRadiusAttack; // Radius attacks are infinitely tall. 182 byte netNoMaxZMonsterMeleeAttack; // Melee attacks are infinitely tall. 183 184 } libcommon_config_t; 185 186 #endif // LIBCOMMON_CONFIG_H 187