| 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: |
| 30 |
* |
| 31 |
*----------------------------------------------------------------------------- |
| 32 |
*/ |
| 33 |
|
| 34 |
#ifndef __E6Y__ |
| 35 |
#define __E6Y__ |
| 36 |
|
| 37 |
#include <stdarg.h> |
| 38 |
|
| 39 |
#include "hu_lib.h" |
| 40 |
|
| 41 |
#define GL_COMBINE_ARB 0x8570 |
| 42 |
#define GL_RGB_SCALE_ARB 0x8573 |
| 43 |
|
| 44 |
#define FOV_CORRECTION_FACTOR (1.13776f) |
| 45 |
#define FOV90 (90) |
| 46 |
|
| 47 |
typedef struct camera_s |
| 48 |
{ |
| 49 |
fixed_t x; |
| 50 |
fixed_t y; |
| 51 |
fixed_t z; |
| 52 |
fixed_t PrevX; |
| 53 |
fixed_t PrevY; |
| 54 |
fixed_t PrevZ; |
| 55 |
angle_t angle; |
| 56 |
angle_t pitch; |
| 57 |
angle_t PrevAngle; |
| 58 |
angle_t PrevPitch; |
| 59 |
int type; |
| 60 |
} camera_t; |
| 61 |
|
| 62 |
extern dboolean wasWiped; |
| 63 |
|
| 64 |
extern int secretfound; |
| 65 |
extern int demo_tics_count; |
| 66 |
extern int demo_playerscount; |
| 67 |
extern char demo_len_st[80]; |
| 68 |
|
| 69 |
extern int mouse_handler; |
| 70 |
|
| 71 |
extern int gl_render_fov; |
| 72 |
extern float gl_render_ratio; |
| 73 |
extern float gl_render_fovratio; |
| 74 |
extern float gl_render_fovy; |
| 75 |
extern float gl_render_multiplier; |
| 76 |
void M_ChangeAspectRatio(void); |
| 77 |
void M_ChangeStretch(void); |
| 78 |
|
| 79 |
extern camera_t walkcamera; |
| 80 |
|
| 81 |
extern int PitchSign; |
| 82 |
extern angle_t viewpitch; |
| 83 |
extern float skyscale; |
| 84 |
extern float screen_skybox_zplane; |
| 85 |
extern float maxNoPitch[]; |
| 86 |
extern float tan_pitch; |
| 87 |
extern float skyUpAngle; |
| 88 |
extern float skyUpShift; |
| 89 |
extern float skyXShift; |
| 90 |
extern float skyYShift; |
| 91 |
|
| 92 |
void ParamsMatchingCheck(); |
| 93 |
void e6y_HandleSkip(void); |
| 94 |
void e6y_InitCommandLine(void); |
| 95 |
|
| 96 |
void P_WalkTicker (); |
| 97 |
void P_SyncWalkcam(dboolean sync_coords, dboolean sync_sight); |
| 98 |
void P_ResetWalkcam(void); |
| 99 |
|
| 100 |
extern dboolean sound_inited_once; |
| 101 |
void e6y_I_uSleep(unsigned long usecs); |
| 102 |
void G_SkipDemoStop(void); |
| 103 |
void G_SkipDemoStartCheck(void); |
| 104 |
void G_SkipDemoCheck(void); |
| 105 |
int G_ReloadLevel(void); |
| 106 |
int G_GotoNextLevel(void); |
| 107 |
int G_GotoPrevLevel(void); |
| 108 |
|
| 109 |
void M_ChangeSkyMode(void); |
| 110 |
|
| 111 |
void M_ChangeFOV(void); |
| 112 |
|
| 113 |
void M_ChangeSpeed(void); |
| 114 |
void M_ChangeScreenMultipleFactor(void); |
| 115 |
void M_ChangeInterlacedScanning(void); |
| 116 |
void M_MouseMLook(int choice); |
| 117 |
void M_MouseAccel(int choice); |
| 118 |
void CheckPitch(signed int *pitch); |
| 119 |
|
| 120 |
dboolean HaveMouseLook(void); |
| 121 |
|
| 122 |
extern float viewPitch; |
| 123 |
|
| 124 |
typedef struct prboom_comp_s |
| 125 |
{ |
| 126 |
unsigned int minver; |
| 127 |
unsigned int maxver; |
| 128 |
dboolean state; |
| 129 |
int arg_id; |
| 130 |
} prboom_comp_t; |
| 131 |
|
| 132 |
enum |
| 133 |
{ |
| 134 |
PC_MONSTER_AVOID_HAZARDS, |
| 135 |
PC_REMOVE_SLIME_TRAILS, |
| 136 |
PC_NO_DROPOFF, |
| 137 |
PC_TRUNCATED_SECTOR_SPECIALS, |
| 138 |
PC_BOOM_BRAINAWAKE, |
| 139 |
PC_PRBOOM_FRICTION, |
| 140 |
PC_REJECT_PAD_WITH_FF, |
| 141 |
PC_FORCE_LXDOOM_DEMO_COMPATIBILITY, |
| 142 |
PC_ALLOW_SSG_DIRECT, |
| 143 |
PC_TREAT_NO_CLIPPING_THINGS_AS_NOT_BLOCKING, |
| 144 |
PC_FORCE_INCORRECT_PROCESSING_OF_RESPAWN_FRAME_ENTRY, |
| 145 |
PC_FORCE_CORRECT_CODE_FOR_3_KEYS_DOORS_IN_MBF, |
| 146 |
PC_UNINITIALIZE_CRUSH_FIELD_FOR_STAIRS, |
| 147 |
PC_FORCE_BOOM_FINDNEXTHIGHESTFLOOR, |
| 148 |
PC_ALLOW_SKY_TRANSFER_IN_BOOM, |
| 149 |
PC_APPLY_GREEN_ARMOR_CLASS_TO_ARMOR_BONUSES, |
| 150 |
PC_APPLY_BLUE_ARMOR_CLASS_TO_MEGASPHERE, |
| 151 |
PC_FORCE_INCORRECT_BOBBING_IN_BOOM, |
| 152 |
PC_BOOM_DEH_PARSER, |
| 153 |
PC_MBF_REMOVE_THINKER_IN_KILLMOBJ, |
| 154 |
PC_DO_NOT_INHERIT_FRIENDLYNESS_FLAG_ON_SPAWN, |
| 155 |
PC_DO_NOT_USE_MISC12_FRAME_PARAMETERS_IN_A_MUSHROOM, |
| 156 |
PC_APPLY_MBF_CODEPOINTERS_TO_ANY_COMPLEVEL, |
| 157 |
PC_RESET_MONSTERSPAWNER_PARAMS_AFTER_LOADING, |
| 158 |
PC_MAX |
| 159 |
}; |
| 160 |
|
| 161 |
extern prboom_comp_t prboom_comp[]; |
| 162 |
|
| 163 |
int StepwiseSum(int value, int direction, int minval, int maxval, int defval); |
| 164 |
|
| 165 |
enum |
| 166 |
{ |
| 167 |
TT_ALLKILL, |
| 168 |
TT_ALLITEM, |
| 169 |
TT_ALLSECRET, |
| 170 |
|
| 171 |
TT_TIME, |
| 172 |
TT_TOTALTIME, |
| 173 |
TT_TOTALKILL, |
| 174 |
TT_TOTALITEM, |
| 175 |
TT_TOTALSECRET, |
| 176 |
|
| 177 |
TT_MAX |
| 178 |
}; |
| 179 |
|
| 180 |
typedef struct timetable_s |
| 181 |
{ |
| 182 |
char map[16]; |
| 183 |
|
| 184 |
int kill[MAX_MAXPLAYERS]; |
| 185 |
int item[MAX_MAXPLAYERS]; |
| 186 |
int secret[MAX_MAXPLAYERS]; |
| 187 |
|
| 188 |
int stat[TT_MAX]; |
| 189 |
} timetable_t; |
| 190 |
|
| 191 |
#ifdef _WIN32 |
| 192 |
const char* WINError(void); |
| 193 |
#endif |
| 194 |
|
| 195 |
extern int stats_level; |
| 196 |
extern int stroller; |
| 197 |
|
| 198 |
void e6y_G_DoCompleted(void); |
| 199 |
void e6y_WriteStats(void); |
| 200 |
|
| 201 |
void e6y_G_DoTeleportNewMap(void); |
| 202 |
void e6y_G_DoWorldDone(void); |
| 203 |
|
| 204 |
void I_ProcessWin32Mouse(void); |
| 205 |
void I_StartWin32Mouse(void); |
| 206 |
void I_EndWin32Mouse(void); |
| 207 |
int AccelerateMouse(int val); |
| 208 |
int AccelerateAnalog(float val); |
| 209 |
void AccelChanging(void); |
| 210 |
|
| 211 |
extern int mlooky; |
| 212 |
|
| 213 |
void e6y_G_Compatibility(void); |
| 214 |
|
| 215 |
const char* PathFindFileName(const char* pPath); |
| 216 |
|
| 217 |
//extern int viewMaxY; |
| 218 |
|
| 219 |
extern dboolean isskytexture; |
| 220 |
|
| 221 |
extern int levelstarttic; |
| 222 |
|
| 223 |
extern int force_singletics_to; |
| 224 |
|
| 225 |
int HU_DrawDemoProgress(int force); |
| 226 |
|
| 227 |
#ifdef _WIN32 |
| 228 |
int GetFullPath(const char* FileName, const char* ext, char *Buffer, size_t BufferLength); |
| 229 |
#endif |
| 230 |
|
| 231 |
void I_vWarning(const char *message, va_list argList); |
| 232 |
|
| 233 |
#define PRB_MB_OK 0x00000000 |
| 234 |
#define PRB_MB_OKCANCEL 0x00000001 |
| 235 |
#define PRB_MB_ABORTRETRYIGNORE 0x00000002 |
| 236 |
#define PRB_MB_YESNOCANCEL 0x00000003 |
| 237 |
#define PRB_MB_YESNO 0x00000004 |
| 238 |
#define PRB_MB_RETRYCANCEL 0x00000005 |
| 239 |
#define PRB_MB_DEFBUTTON1 0x00000000 |
| 240 |
#define PRB_MB_DEFBUTTON2 0x00000100 |
| 241 |
#define PRB_MB_DEFBUTTON3 0x00000200 |
| 242 |
#define PRB_IDOK 1 |
| 243 |
#define PRB_IDCANCEL 2 |
| 244 |
#define PRB_IDABORT 3 |
| 245 |
#define PRB_IDRETRY 4 |
| 246 |
#define PRB_IDIGNORE 5 |
| 247 |
#define PRB_IDYES 6 |
| 248 |
#define PRB_IDNO 7 |
| 249 |
int I_MessageBox(const char* text, unsigned int type); |
| 250 |
|
| 251 |
#endif |