* taniwha gets medieval on extern

This commit is contained in:
Bill Currie 2001-10-28 04:23:37 +00:00
parent f3fe1cec87
commit 78a3e398d5
151 changed files with 1190 additions and 1328 deletions

View file

@ -35,6 +35,12 @@ extern qboolean envmap;
extern int c_brush_polys, c_alias_polys;
extern float r_world_matrix[16];
extern float modelalpha;
extern vec3_t shadecolor;
extern vec3_t lightspot;
void R_RotateForEntity (struct entity_s *e);
void glrmain_init (void);
int R_InitGraphTextures (int base);
#endif // __QF_GL_rmain_h

View file

@ -37,4 +37,6 @@ void R_DrawBrushModel (struct entity_s *e);
void R_DrawWorld (void);
void R_RenderBrushPoly (msurface_t *fa);
void glrsurf_init (void);
#endif // __QF_GL_rsurf_h

View file

@ -34,6 +34,8 @@
#define SKY_TEX 2000 // Quake 2 environment sky
extern qboolean skyloaded;
void R_DrawSky (void);
void R_DrawSkyChain (msurface_t *s);

View file

@ -36,10 +36,20 @@
extern int gl_alpha_format;
extern int gl_solid_format;
extern int gl_lightmap_format;
extern int gl_filter_min;
extern int gl_filter_max;
extern int part_tex_dot;
extern int part_tex_smoke;
extern int part_tex_spark;
void GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean alpha);
void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboolean alpha);
int GL_LoadTexture (const char *identifier, int width, int height, byte *data, qboolean mipmap, qboolean alpha, int bytesperpixel);
int GL_FindTexture (const char *identifier);
void GL_TextureMode_f (void);
void GDT_Init (void);
#endif // __gl_textures_h

View file

@ -80,6 +80,7 @@ extern old_console_t con_chat;
extern old_console_t *con; // point to either con_main or con_chat
extern int con_ormask;
extern int con_linewidth;
extern int con_totallines;
extern qboolean con_initialized;

View file

@ -53,4 +53,8 @@ void Draw_AltString (int x, int y, const char *str);
qpic_t *Draw_PicFromWad (const char *name);
qpic_t *Draw_CachePic (const char *path, qboolean alpha);
void GL_Set2D (void);
extern byte *draw_chars;
#endif // _DRAW_H

View file

@ -29,6 +29,8 @@
#ifndef __QF_input_h_
#define __QF_input_h_
#include "QF/keys.h"
typedef struct {
vec3_t angles;
vec3_t position;
@ -60,6 +62,8 @@ void IN_ModeChanged (void);
void IN_HandlePause (qboolean paused);
extern struct cvar_s *in_grab;
extern struct cvar_s *in_amp;
extern struct cvar_s *in_pre_amp;
extern struct cvar_s *m_filter;
extern struct cvar_s *in_freelook;
extern struct cvar_s *sensitivity;
@ -76,4 +80,6 @@ void IN_LL_Ungrab_Input (void);
void IN_LL_SendKeyEvents (void);
void IN_LL_ClearStates (void);
extern kbutton_t in_strafe, in_klook, in_speed, in_mlook;
#endif // __QF_input_h_

View file

@ -36,303 +36,303 @@
typedef enum {
/* The keyboard syms have been cleverly chosen to map to ASCII */
K_UNKNOWN = 0,
K_FIRST = 0,
K_BACKSPACE = 8,
K_TAB = 9,
K_CLEAR = 12,
K_RETURN = 13,
K_PAUSE = 19,
K_ESCAPE = 27,
K_SPACE = 32,
K_EXCLAIM = 33,
K_QUOTEDBL = 34,
K_HASH = 35,
K_DOLLAR = 36,
K_AMPERSAND = 38,
K_QUOTE = 39,
K_LEFTPAREN = 40,
K_RIGHTPAREN = 41,
K_ASTERISK = 42,
K_PLUS = 43,
K_COMMA = 44,
K_MINUS = 45,
K_PERIOD = 46,
K_SLASH = 47,
K_0 = 48,
K_1 = 49,
K_2 = 50,
K_3 = 51,
K_4 = 52,
K_5 = 53,
K_6 = 54,
K_7 = 55,
K_8 = 56,
K_9 = 57,
K_COLON = 58,
K_SEMICOLON = 59,
K_LESS = 60,
K_EQUALS = 61,
K_GREATER = 62,
K_QUESTION = 63,
K_AT = 64,
QFK_UNKNOWN = 0,
QFK_FIRST = 0,
QFK_BACKSPACE = 8,
QFK_TAB = 9,
QFK_CLEAR = 12,
QFK_RETURN = 13,
QFK_PAUSE = 19,
QFK_ESCAPE = 27,
QFK_SPACE = 32,
QFK_EXCLAIM = 33,
QFK_QUOTEDBL = 34,
QFK_HASH = 35,
QFK_DOLLAR = 36,
QFK_AMPERSAND = 38,
QFK_QUOTE = 39,
QFK_LEFTPAREN = 40,
QFK_RIGHTPAREN = 41,
QFK_ASTERISK = 42,
QFK_PLUS = 43,
QFK_COMMA = 44,
QFK_MINUS = 45,
QFK_PERIOD = 46,
QFK_SLASH = 47,
QFK_0 = 48,
QFK_1 = 49,
QFK_2 = 50,
QFK_3 = 51,
QFK_4 = 52,
QFK_5 = 53,
QFK_6 = 54,
QFK_7 = 55,
QFK_8 = 56,
QFK_9 = 57,
QFK_COLON = 58,
QFK_SEMICOLON = 59,
QFK_LESS = 60,
QFK_EQUALS = 61,
QFK_GREATER = 62,
QFK_QUESTION = 63,
QFK_AT = 64,
/*
Skip uppercase letters
*/
K_LEFTBRACKET = 91,
K_BACKSLASH = 92,
K_RIGHTBRACKET = 93,
K_CARET = 94,
K_UNDERSCORE = 95,
K_BACKQUOTE = 96,
K_a = 97,
K_b = 98,
K_c = 99,
K_d = 100,
K_e = 101,
K_f = 102,
K_g = 103,
K_h = 104,
K_i = 105,
K_j = 106,
K_k = 107,
K_l = 108,
K_m = 109,
K_n = 110,
K_o = 111,
K_p = 112,
K_q = 113,
K_r = 114,
K_s = 115,
K_t = 116,
K_u = 117,
K_v = 118,
K_w = 119,
K_x = 120,
K_y = 121,
K_z = 122,
K_DELETE = 127,
QFK_LEFTBRACKET = 91,
QFK_BACKSLASH = 92,
QFK_RIGHTBRACKET = 93,
QFK_CARET = 94,
QFK_UNDERSCORE = 95,
QFK_BACKQUOTE = 96,
QFK_a = 97,
QFK_b = 98,
QFK_c = 99,
QFK_d = 100,
QFK_e = 101,
QFK_f = 102,
QFK_g = 103,
QFK_h = 104,
QFK_i = 105,
QFK_j = 106,
QFK_k = 107,
QFK_l = 108,
QFK_m = 109,
QFK_n = 110,
QFK_o = 111,
QFK_p = 112,
QFK_q = 113,
QFK_r = 114,
QFK_s = 115,
QFK_t = 116,
QFK_u = 117,
QFK_v = 118,
QFK_w = 119,
QFK_x = 120,
QFK_y = 121,
QFK_z = 122,
QFK_DELETE = 127,
/* End of ASCII mapped keysyms */
/* International keyboard syms */
K_WORLD_0 = 160, /* 0xA0 */
K_WORLD_1 = 161,
K_WORLD_2 = 162,
K_WORLD_3 = 163,
K_WORLD_4 = 164,
K_WORLD_5 = 165,
K_WORLD_6 = 166,
K_WORLD_7 = 167,
K_WORLD_8 = 168,
K_WORLD_9 = 169,
K_WORLD_10 = 170,
K_WORLD_11 = 171,
K_WORLD_12 = 172,
K_WORLD_13 = 173,
K_WORLD_14 = 174,
K_WORLD_15 = 175,
K_WORLD_16 = 176,
K_WORLD_17 = 177,
K_WORLD_18 = 178,
K_WORLD_19 = 179,
K_WORLD_20 = 180,
K_WORLD_21 = 181,
K_WORLD_22 = 182,
K_WORLD_23 = 183,
K_WORLD_24 = 184,
K_WORLD_25 = 185,
K_WORLD_26 = 186,
K_WORLD_27 = 187,
K_WORLD_28 = 188,
K_WORLD_29 = 189,
K_WORLD_30 = 190,
K_WORLD_31 = 191,
K_WORLD_32 = 192,
K_WORLD_33 = 193,
K_WORLD_34 = 194,
K_WORLD_35 = 195,
K_WORLD_36 = 196,
K_WORLD_37 = 197,
K_WORLD_38 = 198,
K_WORLD_39 = 199,
K_WORLD_40 = 200,
K_WORLD_41 = 201,
K_WORLD_42 = 202,
K_WORLD_43 = 203,
K_WORLD_44 = 204,
K_WORLD_45 = 205,
K_WORLD_46 = 206,
K_WORLD_47 = 207,
K_WORLD_48 = 208,
K_WORLD_49 = 209,
K_WORLD_50 = 210,
K_WORLD_51 = 211,
K_WORLD_52 = 212,
K_WORLD_53 = 213,
K_WORLD_54 = 214,
K_WORLD_55 = 215,
K_WORLD_56 = 216,
K_WORLD_57 = 217,
K_WORLD_58 = 218,
K_WORLD_59 = 219,
K_WORLD_60 = 220,
K_WORLD_61 = 221,
K_WORLD_62 = 222,
K_WORLD_63 = 223,
K_WORLD_64 = 224,
K_WORLD_65 = 225,
K_WORLD_66 = 226,
K_WORLD_67 = 227,
K_WORLD_68 = 228,
K_WORLD_69 = 229,
K_WORLD_70 = 230,
K_WORLD_71 = 231,
K_WORLD_72 = 232,
K_WORLD_73 = 233,
K_WORLD_74 = 234,
K_WORLD_75 = 235,
K_WORLD_76 = 236,
K_WORLD_77 = 237,
K_WORLD_78 = 238,
K_WORLD_79 = 239,
K_WORLD_80 = 240,
K_WORLD_81 = 241,
K_WORLD_82 = 242,
K_WORLD_83 = 243,
K_WORLD_84 = 244,
K_WORLD_85 = 245,
K_WORLD_86 = 246,
K_WORLD_87 = 247,
K_WORLD_88 = 248,
K_WORLD_89 = 249,
K_WORLD_90 = 250,
K_WORLD_91 = 251,
K_WORLD_92 = 252,
K_WORLD_93 = 253,
K_WORLD_94 = 254,
K_WORLD_95 = 255, /* 0xFF */
QFK_WORLD_0 = 160, /* 0xA0 */
QFK_WORLD_1 = 161,
QFK_WORLD_2 = 162,
QFK_WORLD_3 = 163,
QFK_WORLD_4 = 164,
QFK_WORLD_5 = 165,
QFK_WORLD_6 = 166,
QFK_WORLD_7 = 167,
QFK_WORLD_8 = 168,
QFK_WORLD_9 = 169,
QFK_WORLD_10 = 170,
QFK_WORLD_11 = 171,
QFK_WORLD_12 = 172,
QFK_WORLD_13 = 173,
QFK_WORLD_14 = 174,
QFK_WORLD_15 = 175,
QFK_WORLD_16 = 176,
QFK_WORLD_17 = 177,
QFK_WORLD_18 = 178,
QFK_WORLD_19 = 179,
QFK_WORLD_20 = 180,
QFK_WORLD_21 = 181,
QFK_WORLD_22 = 182,
QFK_WORLD_23 = 183,
QFK_WORLD_24 = 184,
QFK_WORLD_25 = 185,
QFK_WORLD_26 = 186,
QFK_WORLD_27 = 187,
QFK_WORLD_28 = 188,
QFK_WORLD_29 = 189,
QFK_WORLD_30 = 190,
QFK_WORLD_31 = 191,
QFK_WORLD_32 = 192,
QFK_WORLD_33 = 193,
QFK_WORLD_34 = 194,
QFK_WORLD_35 = 195,
QFK_WORLD_36 = 196,
QFK_WORLD_37 = 197,
QFK_WORLD_38 = 198,
QFK_WORLD_39 = 199,
QFK_WORLD_40 = 200,
QFK_WORLD_41 = 201,
QFK_WORLD_42 = 202,
QFK_WORLD_43 = 203,
QFK_WORLD_44 = 204,
QFK_WORLD_45 = 205,
QFK_WORLD_46 = 206,
QFK_WORLD_47 = 207,
QFK_WORLD_48 = 208,
QFK_WORLD_49 = 209,
QFK_WORLD_50 = 210,
QFK_WORLD_51 = 211,
QFK_WORLD_52 = 212,
QFK_WORLD_53 = 213,
QFK_WORLD_54 = 214,
QFK_WORLD_55 = 215,
QFK_WORLD_56 = 216,
QFK_WORLD_57 = 217,
QFK_WORLD_58 = 218,
QFK_WORLD_59 = 219,
QFK_WORLD_60 = 220,
QFK_WORLD_61 = 221,
QFK_WORLD_62 = 222,
QFK_WORLD_63 = 223,
QFK_WORLD_64 = 224,
QFK_WORLD_65 = 225,
QFK_WORLD_66 = 226,
QFK_WORLD_67 = 227,
QFK_WORLD_68 = 228,
QFK_WORLD_69 = 229,
QFK_WORLD_70 = 230,
QFK_WORLD_71 = 231,
QFK_WORLD_72 = 232,
QFK_WORLD_73 = 233,
QFK_WORLD_74 = 234,
QFK_WORLD_75 = 235,
QFK_WORLD_76 = 236,
QFK_WORLD_77 = 237,
QFK_WORLD_78 = 238,
QFK_WORLD_79 = 239,
QFK_WORLD_80 = 240,
QFK_WORLD_81 = 241,
QFK_WORLD_82 = 242,
QFK_WORLD_83 = 243,
QFK_WORLD_84 = 244,
QFK_WORLD_85 = 245,
QFK_WORLD_86 = 246,
QFK_WORLD_87 = 247,
QFK_WORLD_88 = 248,
QFK_WORLD_89 = 249,
QFK_WORLD_90 = 250,
QFK_WORLD_91 = 251,
QFK_WORLD_92 = 252,
QFK_WORLD_93 = 253,
QFK_WORLD_94 = 254,
QFK_WORLD_95 = 255, /* 0xFF */
/* Numeric keypad */
K_KP0 = 256,
K_KP1 = 257,
K_KP2 = 258,
K_KP3 = 259,
K_KP4 = 260,
K_KP5 = 261,
K_KP6 = 262,
K_KP7 = 263,
K_KP8 = 264,
K_KP9 = 265,
K_KP_PERIOD = 266,
K_KP_DIVIDE = 267,
K_KP_MULTIPLY = 268,
K_KP_MINUS = 269,
K_KP_PLUS = 270,
K_KP_ENTER = 271,
K_KP_EQUALS = 272,
QFK_KP0 = 256,
QFK_KP1 = 257,
QFK_KP2 = 258,
QFK_KP3 = 259,
QFK_KP4 = 260,
QFK_KP5 = 261,
QFK_KP6 = 262,
QFK_KP7 = 263,
QFK_KP8 = 264,
QFK_KP9 = 265,
QFK_KP_PERIOD = 266,
QFK_KP_DIVIDE = 267,
QFK_KP_MULTIPLY = 268,
QFK_KP_MINUS = 269,
QFK_KP_PLUS = 270,
QFK_KP_ENTER = 271,
QFK_KP_EQUALS = 272,
/* Arrows + Home/End pad */
K_UP = 273,
K_DOWN = 274,
K_RIGHT = 275,
K_LEFT = 276,
K_INSERT = 277,
K_HOME = 278,
K_END = 279,
K_PAGEUP = 280,
K_PAGEDOWN = 281,
QFK_UP = 273,
QFK_DOWN = 274,
QFK_RIGHT = 275,
QFK_LEFT = 276,
QFK_INSERT = 277,
QFK_HOME = 278,
QFK_END = 279,
QFK_PAGEUP = 280,
QFK_PAGEDOWN = 281,
/* Function keys */
K_F1 = 282,
K_F2 = 283,
K_F3 = 284,
K_F4 = 285,
K_F5 = 286,
K_F6 = 287,
K_F7 = 288,
K_F8 = 289,
K_F9 = 290,
K_F10 = 291,
K_F11 = 292,
K_F12 = 293,
K_F13 = 294,
K_F14 = 295,
K_F15 = 296,
QFK_F1 = 282,
QFK_F2 = 283,
QFK_F3 = 284,
QFK_F4 = 285,
QFK_F5 = 286,
QFK_F6 = 287,
QFK_F7 = 288,
QFK_F8 = 289,
QFK_F9 = 290,
QFK_F10 = 291,
QFK_F11 = 292,
QFK_F12 = 293,
QFK_F13 = 294,
QFK_F14 = 295,
QFK_F15 = 296,
/* Key state modifier keys */
K_NUMLOCK = 300,
K_CAPSLOCK = 301,
K_SCROLLOCK = 302,
K_RSHIFT = 303,
K_LSHIFT = 304,
K_RCTRL = 305,
K_LCTRL = 306,
K_RALT = 307,
K_LALT = 308,
K_RMETA = 309,
K_LMETA = 310,
K_LSUPER = 311, /* Left "Windows" key */
K_RSUPER = 312, /* Right "Windows" key */
K_MODE = 313, /* "Alt Gr" key */
K_COMPOSE = 314, /* Multi-key compose key */
QFK_NUMLOCK = 300,
QFK_CAPSLOCK = 301,
QFK_SCROLLOCK = 302,
QFK_RSHIFT = 303,
QFK_LSHIFT = 304,
QFK_RCTRL = 305,
QFK_LCTRL = 306,
QFK_RALT = 307,
QFK_LALT = 308,
QFK_RMETA = 309,
QFK_LMETA = 310,
QFK_LSUPER = 311, /* Left "Windows" key */
QFK_RSUPER = 312, /* Right "Windows" key */
QFK_MODE = 313, /* "Alt Gr" key */
QFK_COMPOSE = 314, /* Multi-key compose key */
/* Miscellaneous function keys */
K_HELP = 315,
K_PRINT = 316,
K_SYSREQ = 317,
K_BREAK = 318,
K_MENU = 319,
K_POWER = 320, /* Power Macintosh power key */
K_EURO = 321, /* Some european keyboards */
QFK_HELP = 315,
QFK_PRINT = 316,
QFK_SYSREQ = 317,
QFK_BREAK = 318,
QFK_MENU = 319,
QFK_POWER = 320, /* Power Macintosh power key */
QFK_EURO = 321, /* Some european keyboards */
/* Add any other keys here */
//
// mouse buttons generate virtual keys
//
M_BUTTON1,
M_BUTTON2,
M_BUTTON3,
M_WHEEL_UP,
M_WHEEL_DOWN,
QFM_BUTTON1,
QFM_BUTTON2,
QFM_BUTTON3,
QFM_WHEEL_UP,
QFM_WHEEL_DOWN,
//
// joystick buttons
//
J_BUTTON1,
J_BUTTON2,
J_BUTTON3,
J_BUTTON4,
J_BUTTON5,
J_BUTTON6,
J_BUTTON7,
J_BUTTON8,
J_BUTTON9,
J_BUTTON10,
J_BUTTON11,
J_BUTTON12,
J_BUTTON13,
J_BUTTON14,
J_BUTTON15,
J_BUTTON16,
J_BUTTON17,
J_BUTTON18,
J_BUTTON19,
J_BUTTON20,
J_BUTTON21,
J_BUTTON22,
J_BUTTON23,
J_BUTTON24,
J_BUTTON25,
J_BUTTON26,
J_BUTTON27,
J_BUTTON28,
J_BUTTON29,
J_BUTTON30,
J_BUTTON31,
J_BUTTON32,
QFJ_BUTTON1,
QFJ_BUTTON2,
QFJ_BUTTON3,
QFJ_BUTTON4,
QFJ_BUTTON5,
QFJ_BUTTON6,
QFJ_BUTTON7,
QFJ_BUTTON8,
QFJ_BUTTON9,
QFJ_BUTTON10,
QFJ_BUTTON11,
QFJ_BUTTON12,
QFJ_BUTTON13,
QFJ_BUTTON14,
QFJ_BUTTON15,
QFJ_BUTTON16,
QFJ_BUTTON17,
QFJ_BUTTON18,
QFJ_BUTTON19,
QFJ_BUTTON20,
QFJ_BUTTON21,
QFJ_BUTTON22,
QFJ_BUTTON23,
QFJ_BUTTON24,
QFJ_BUTTON25,
QFJ_BUTTON26,
QFJ_BUTTON27,
QFJ_BUTTON28,
QFJ_BUTTON29,
QFJ_BUTTON30,
QFJ_BUTTON31,
QFJ_BUTTON32,
K_LAST
QFK_LAST
} knum_t;
typedef struct
@ -369,8 +369,8 @@ typedef enum {key_game, key_console, key_message, key_none} keydest_t;
extern keydest_t key_dest;
extern imt_t game_target;
extern char *keybindings[IMT_LAST][K_LAST];
extern int keydown[K_LAST];
extern char *keybindings[IMT_LAST][QFK_LAST];
extern int keydown[QFK_LAST];
extern int key_lastpress;
extern char chat_buffer[];
@ -391,4 +391,9 @@ void Key_ClearTyping (void);
float Key_KeyState (kbutton_t *key);
const char *Key_KeynumToString (knum_t keynum);
#define MAXCMDLINE 256
extern char key_lines[32][MAXCMDLINE];
extern int edit_line;
extern int key_linepos;
#endif // _KEYS_H

View file

@ -463,4 +463,21 @@ void Mod_ProcessTexture(miptex_t *mt, texture_t *tx);
void Mod_LoadLighting (lump_t *l);
int Mod_CalcFullbright (byte *in, byte *out, int pixels);
void *Mod_LoadAliasFrame (void *pin, int posenum, maliasframedesc_t *frame);
void *Mod_LoadAliasGroup (void *pin, int posenum, maliasframedesc_t *frame);
void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype,
int *pskinindex);
void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m,
int _s);
extern struct cvar_s *gl_mesh_cache;
extern struct cvar_s *gl_subdivide_size;
extern model_t *loadmodel;
extern char loadname[32];
extern const int mod_lightmap_bytes;
extern byte *mod_base;
extern byte mod_novis[MAX_MAP_LEAFS / 8];
#endif // _MODEL_H

View file

@ -78,7 +78,7 @@ typedef struct snd_render_funcs_s {
} snd_render_funcs_t;
typedef struct snd_render_data_s {
struct model_s ***worldmodel;
struct model_s **worldmodel;
double *host_frametime;
int *viewentity;

View file

@ -191,6 +191,8 @@ void PR_DumpState (progs_t *pr);
void PR_StackTrace (progs_t * pr);
extern struct cvar_s *pr_debug;
extern struct cvar_s *pr_deadbeef_locals;
extern struct cvar_s *pr_boundscheck;
//
// PR Cmds stuff

View file

@ -62,6 +62,7 @@ int MipColor (int r, int g, int b);
int SCR_ModalMessage (const char *text);
extern float scr_con_current;
extern float scr_centertime_off;
extern float scr_conlines; // lines of console to display
extern int scr_fullupdate; // set to 0 to force full redraw
@ -86,4 +87,6 @@ extern struct qpic_s *scr_ram;
extern struct qpic_s *scr_net;
extern struct qpic_s *scr_turtle;
extern struct cvar_s *show_fps, *show_time;
#endif // __screen_h

View file

@ -74,4 +74,6 @@ void Skin_Process (skin_t *skin, struct tex_s *);
skin_t *Skin_NewTempSkin (void);
void Skin_ClearTempSkins (void);
extern char allskins[128];
#endif

View file

@ -108,7 +108,9 @@ typedef struct
int dataofs; // chunk starts this many bytes from file start
} wavinfo_t;
void S_Init (void);
struct model_s;
void S_Init (struct model_s **worldmodel, int *viewentity,
double *host_frametime);
void S_Init_Cvars (void);
void S_Startup (void);
void S_Shutdown (void);
@ -223,4 +225,6 @@ void S_O_UnblockSound (void);
void S_AmbientOff (void);
void S_AmbientOn (void);
extern struct model_s **snd_worldmodel;
#endif // _SOUND_H

View file

@ -39,6 +39,9 @@ extern byte *vid_basepal;
extern byte *vid_colormap;
extern struct cvar_s *vid_fullscreen;
extern struct cvar_s *vid_system_gamma;
extern struct cvar_s *vid_width;
extern struct cvar_s *vid_height;
typedef struct vrect_s {
int x,y,width,height;
@ -86,6 +89,7 @@ extern qboolean vid_gamma_avail;
// called at startup and after any gamma correction
void VID_SetPalette (unsigned char *palette);
void VID_Init8bitPalette (void);
// called for bonus and pain flashes, and for underwater color changes
void VID_ShiftPalette (unsigned char *palette);
@ -132,4 +136,9 @@ double VID_GetGamma (void);
qboolean VID_SetGamma (double);
void VID_UpdateGamma (struct cvar_s *);
void GL_Init_Common (void);
void GL_Pre_Init (void);
void VID_MakeColormaps (int fullbrights, byte *pal);
#endif // __vid_h_

View file

@ -252,9 +252,12 @@ void R_GenTile (msurface_t *psurf, void *pdest);
#define SKYSIZE (1 << SKYSHIFT)
#define SKYMASK (SKYSIZE - 1)
extern float d_zitable[65536];
extern float skyspeed, skyspeed2;
extern float skytime;
extern int d_aflatcolor;
extern int c_surf;
extern vrect_t scr_vrect;

View file

@ -63,10 +63,23 @@ void R_ParticleExplosion2 (vec3_t org, int colorStart, int colorLength);
void R_LavaSplash (vec3_t org);
void R_TeleportSplash (vec3_t org);
void R_PushDlights (vec3_t entorigin);
struct cvar_s;
void R_MaxDlightsCheck (struct cvar_s *var);
void R_Particles_Init_Cvars (void);
void R_InitParticles (void);
inline void R_ClearParticles (void);
void R_DrawParticles (void);
struct cvar_s;
void R_MaxParticlesCheck (struct cvar_s *r_particles,
struct cvar_s *cl_max_particles);
extern short r_maxparticles;
extern short numparticles;
extern struct particle_s *active_particles;
extern struct particle_s *free_particles;
extern struct particle_s *particles;
extern struct particle_s **freeparticles;
#define MAX_FIRES 128 // rocket flames

View file

@ -170,4 +170,7 @@ typedef struct edge_s
medge_t *owner;
} edge_t;
#define NUMVERTEXNORMALS 162
extern float r_avertexnormals[NUMVERTEXNORMALS][3];
#endif // _R_SHARED_H

View file

@ -52,4 +52,6 @@ void V_ParseDamage (void);
void V_SetContentsColor (int contents);
void V_CalcBlend (void);
extern float v_blend[4];
#endif // __view_h_

View file

@ -51,7 +51,6 @@ static general_funcs_t plugin_info_general_funcs;
//static cd_data_t plugin_info_cd_data;
static cd_funcs_t plugin_info_cd_funcs;
extern HWND mainwindow;
static qboolean cdValid = false;
static qboolean playing = false;

View file

@ -65,16 +65,12 @@ void SND_Init_Cvars ();
// Internal sound data & structures ===========================================
extern channel_t channels[MAX_CHANNELS];
extern int total_channels;
//extern double host_frametime; // From host.h
int snd_blocked = 0;
static qboolean snd_ambient = 1;
extern qboolean snd_initialized;
// pointer should go away
extern volatile dma_t *shm;
vec3_t listener_origin;
vec3_t listener_forward;
@ -83,7 +79,6 @@ vec3_t listener_up;
vec_t sound_nominal_clip_dist = 1000.0;
int soundtime; // sample PAIRS
extern int paintedtime; // sample PAIRS
#define MAX_SFX 512
sfx_t *known_sfx; // hunk allocated [MAX_SFX]
@ -93,10 +88,6 @@ sfx_t *ambient_sfx[NUM_AMBIENTS];
int sound_started = 0;
extern cvar_t *snd_loadas8bit;
extern cvar_t *snd_interp;
extern cvar_t *bgmvolume;
extern cvar_t *volume;
cvar_t *ambient_fade;
cvar_t *ambient_level;
@ -644,11 +635,11 @@ SND_UpdateAmbientSounds (void)
return;
// calc ambient sound levels
if (!**plugin_info_snd_render_data.worldmodel) // FIXME: eww
if (!*plugin_info_snd_render_data.worldmodel)
return;
l = Mod_PointInLeaf (listener_origin,
**plugin_info_snd_render_data.worldmodel);
*plugin_info_snd_render_data.worldmodel);
if (!l || !ambient_level->value) {
for (ambient_channel = 0; ambient_channel < NUM_AMBIENTS;
ambient_channel++)

View file

@ -49,16 +49,7 @@ sound_funcs_t plugin_info_sound_funcs;
void SND_Init_Cvars (void);
extern int paintedtime; // sample PAIRS
extern int total_channels;
extern channel_t channels[MAX_CHANNELS];
extern volatile dma_t *shm;
extern qboolean snd_initialized;
extern cvar_t *bgmvolume;
extern cvar_t *volume;
extern cvar_t *snd_interp;
extern cvar_t *snd_loadas8bit;
void

View file

@ -70,13 +70,10 @@ plugin_list_t snd_render_list[] = {
};
// FIXME: ewwwies
extern double host_frametime; // From host.h
extern int snd_viewentity;
extern struct model_s **snd_worldmodel;
void
S_Init (void)
S_Init (struct model_s **worldmodel, int *viewentity, double *host_frametime)
{
S_Init_Cvars ();
if (!*snd_output->string || !*snd_render->string) {
@ -98,10 +95,10 @@ S_Init (void)
PI_UnloadPlugin (snd_output_module);
snd_output_module = NULL;
} else {
snd_render_module->data->snd_render->worldmodel = &snd_worldmodel;
snd_render_module->data->snd_render->viewentity = &snd_viewentity;
snd_render_module->data->snd_render->worldmodel = worldmodel;
snd_render_module->data->snd_render->viewentity = viewentity;
snd_render_module->data->snd_render->host_frametime =
&host_frametime;
host_frametime;
snd_output_module->data->snd_output->soundtime
= snd_render_module->data->snd_render->soundtime;

View file

@ -65,7 +65,6 @@ console_t con_chat;
console_t *con; // point to either con_main or con_chat
int con_totallines; // total lines in console scrollback
extern int con_linewidth; // characters across screen
float con_cursorspeed = 4;
@ -83,9 +82,6 @@ qboolean con_debuglog;
#define MAXCMDLINE 256
extern char key_lines[32][MAXCMDLINE];
extern int edit_line;
extern int key_linepos;
qboolean con_initialized;

View file

@ -44,7 +44,6 @@ static const char rcsid[] =
#include "QF/cvar.h"
//FIXME eww
extern int con_linewidth;
/*

View file

@ -91,7 +91,7 @@ Con_ProcessInputLine (inputline_t *il, int ch)
char *text;
switch (ch) {
case K_RETURN:
case QFK_RETURN:
if (il->enter)
il->enter (il->lines[il->edit_line] + 1);
il->edit_line = (il->edit_line + 1) % il->num_lines;
@ -100,31 +100,31 @@ Con_ProcessInputLine (inputline_t *il, int ch)
il->lines[il->edit_line][1] = 0;
il->linepos = 1;
break;
case K_TAB:
case QFK_TAB:
if (il->complete)
il->complete (il);
break;
case K_BACKSPACE:
case QFK_BACKSPACE:
if (il->linepos > 1) {
strcpy (il->lines[il->edit_line] + il->linepos - 1,
il->lines[il->edit_line] + il->linepos);
il->linepos--;
}
break;
case K_DELETE:
case QFK_DELETE:
if (il->linepos < strlen (il->lines[il->edit_line]))
strcpy (il->lines[il->edit_line] + il->linepos,
il->lines[il->edit_line] + il->linepos + 1);
break;
case K_RIGHT:
case QFK_RIGHT:
if (il->linepos < strlen (il->lines[il->edit_line]))
il->linepos++;
break;
case K_LEFT:
case QFK_LEFT:
if (il->linepos > 1)
il->linepos--;
break;
case K_UP:
case QFK_UP:
{
int j = (il->history_line + il->num_lines - 1) % il->num_lines;
if (j == il->edit_line || !il->lines[j][1])
@ -134,7 +134,7 @@ Con_ProcessInputLine (inputline_t *il, int ch)
strcpy (il->lines[il->edit_line], il->lines[il->history_line]);
il->linepos = strlen (il->lines[il->edit_line]);
break;
case K_DOWN:
case QFK_DOWN:
if (il->history_line == il->edit_line)
break; // don't let it wrap
il->history_line = (il->history_line + 1) % il->num_lines;
@ -147,10 +147,10 @@ Con_ProcessInputLine (inputline_t *il, int ch)
il->linepos = strlen (il->lines[il->edit_line]);
}
break;
case K_HOME:
case QFK_HOME:
il->linepos = 1;
break;
case K_END:
case QFK_END:
il->linepos = strlen (il->lines[il->edit_line]);
break;
default:

View file

@ -65,7 +65,6 @@ static const char rcsid[] =
#include "compat.h"
extern int con_linewidth;
#ifdef HAVE_CURSES_H
static int use_curses = 1;
@ -370,41 +369,41 @@ C_ProcessInput (void)
case KEY_ENTER:
case '\n':
case '\r':
ch = K_RETURN;
ch = QFK_RETURN;
break;
case '\t':
ch = K_TAB;
ch = QFK_TAB;
break;
case KEY_BACKSPACE:
case '\b':
ch = K_BACKSPACE;
ch = QFK_BACKSPACE;
break;
case KEY_DC:
ch = K_DELETE;
ch = QFK_DELETE;
break;
case KEY_RIGHT:
ch = K_RIGHT;
ch = QFK_RIGHT;
break;
case KEY_LEFT:
ch = K_LEFT;
ch = QFK_LEFT;
break;
case KEY_UP:
ch = K_UP;
ch = QFK_UP;
break;
case KEY_DOWN:
ch = K_DOWN;
ch = QFK_DOWN;
break;
case KEY_HOME:
ch = K_HOME;
ch = QFK_HOME;
break;
case KEY_END:
ch = K_END;
ch = QFK_END;
break;
case KEY_NPAGE:
ch = K_PAGEDOWN;
ch = QFK_PAGEDOWN;
break;
case KEY_PPAGE:
ch = K_PAGEUP;
ch = QFK_PAGEUP;
break;
default:
if (ch < 0 || ch >= 256)

View file

@ -47,7 +47,6 @@ static const char rcsid[] =
#include "compat.h"
extern cvar_t *pr_deadbeef_locals;
void
@ -242,7 +241,6 @@ PR_LeaveFunction (progs_t * pr)
#define OPB (pr->pr_globals[st->b])
#define OPC (pr->pr_globals[st->c])
extern cvar_t *pr_boundscheck;
/*
PR_ExecuteProgram

View file

@ -51,7 +51,6 @@ static const char rcsid[] =
ALIAS MODEL DISPLAY LIST GENERATION
*/
extern cvar_t *gl_mesh_cache;
model_t *aliasmodel;
aliashdr_t *paliashdr;

View file

@ -45,26 +45,20 @@ static const char rcsid[] =
#include "QF/qendian.h"
#include "QF/skin.h"
#include "QF/sys.h"
#include "QF/vid.h"
#include "QF/GL/qf_textures.h"
byte player_8bit_texels[320 * 200];
extern model_t *loadmodel;
extern char loadname[];
/*
ALIAS MODELS
*/
extern aliashdr_t *pheader;
extern stvert_t stverts[MAXALIASVERTS];
extern mtriangle_t triangles[MAXALIASTRIS];
// a pose is a single set of vertexes. a frame may be
// an animating sequence of poses
extern trivertx_t *poseverts[MAXALIASFRAMES];
extern int posenum;
//=========================================================
@ -78,7 +72,6 @@ typedef struct {
short x, y;
} floodfill_t;
extern unsigned int d_8to24table[];
// must be a power of 2
#define FLOODFILL_FIFO_SIZE 0x1000
@ -240,7 +233,7 @@ Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype, int *pskinindex)
}
void *
Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
Mod_LoadAliasFrame (void *pin, int posenum, maliasframedesc_t *frame)
{
trivertx_t *pinframe;
int i;
@ -269,7 +262,7 @@ Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
}
void *
Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame)
Mod_LoadAliasGroup (void *pin, int posenum, maliasframedesc_t *frame)
{
daliasgroup_t *pingroup;
int i, numframes;

View file

@ -51,13 +51,6 @@ static const char rcsid[] =
#include "d_iface.h"
#include "r_local.h"
extern char loadname[];
extern model_t *loadmodel;
void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype,
int *pskinindex);
void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *model, int size);
/*
ALIAS MODELS
@ -73,9 +66,6 @@ mtriangle_t triangles[MAXALIASTRIS];
trivertx_t *poseverts[MAXALIASFRAMES];
int posenum = 0;
void *Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame);
void *Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame);
//=========================================================================
@ -197,10 +187,12 @@ Mod_LoadAliasModel (model_t *mod, void *buffer, cache_allocator_t allocator)
if (frametype == ALIAS_SINGLE) {
pframetype = (daliasframetype_t *)
Mod_LoadAliasFrame (pframetype + 1, &pheader->frames[i]);
Mod_LoadAliasFrame (pframetype + 1, posenum,
&pheader->frames[i]);
} else {
pframetype = (daliasframetype_t *)
Mod_LoadAliasGroup (pframetype + 1, &pheader->frames[i]);
Mod_LoadAliasGroup (pframetype + 1, posenum,
&pheader->frames[i]);
}
}

View file

@ -46,22 +46,15 @@ static const char rcsid[] =
#include "d_iface.h"
extern char loadname[];
extern model_t *loadmodel;
/*
ALIAS MODELS
*/
extern aliashdr_t *pheader;
extern stvert_t stverts[MAXALIASVERTS];
extern mtriangle_t triangles[MAXALIASTRIS];
// a pose is a single set of vertexes. a frame may be
// an animating sequence of poses
extern trivertx_t *poseverts[MAXALIASFRAMES];
extern int posenum;
void *
@ -197,7 +190,7 @@ GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m, int _s)
}
void *
Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
Mod_LoadAliasFrame (void *pin, int posenum, maliasframedesc_t *frame)
{
trivertx_t *pframe, *pinframe;
int i, j;
@ -235,7 +228,7 @@ Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
}
void *
Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame)
Mod_LoadAliasGroup (void *pin, int posenum, maliasframedesc_t *frame)
{
daliasgroup_t *pingroup;
maliasgroup_t *paliasgroup;
@ -279,7 +272,7 @@ Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame)
for (i = 0; i < numframes; i++) {
maliasframedesc_t temp_frame;
ptemp = Mod_LoadAliasFrame (ptemp, &temp_frame);
ptemp = Mod_LoadAliasFrame (ptemp, i, &temp_frame);
memcpy (&paliasgroup->frames[i], &temp_frame,
sizeof(paliasgroup->frames[i]));
}

View file

@ -48,22 +48,15 @@ static const char rcsid[] =
#include "compat.h"
#include "d_iface.h"
extern char loadname[];
extern model_t *loadmodel;
/*
ALIAS MODELS
*/
extern aliashdr_t *pheader;
extern stvert_t stverts[MAXALIASVERTS];
extern mtriangle_t triangles[MAXALIASTRIS];
// a pose is a single set of vertexes. a frame may be
// an animating sequence of poses
extern trivertx_t *poseverts[MAXALIASFRAMES];
extern int posenum;
void *
@ -191,7 +184,7 @@ GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr, void *_m, int _s)
}
void *
Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
Mod_LoadAliasFrame (void *pin, int posenum, maliasframedesc_t *frame)
{
trivertx_t *pframe, *pinframe;
int i, j;
@ -230,7 +223,7 @@ Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
}
void *
Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame)
Mod_LoadAliasGroup (void *pin, int posenum, maliasframedesc_t *frame)
{
daliasgroup_t *pingroup;
maliasgroup_t *paliasgroup;
@ -274,7 +267,7 @@ Mod_LoadAliasGroup (void *pin, maliasframedesc_t *frame)
for (i = 0; i < numframes; i++) {
maliasframedesc_t temp_frame;
ptemp = Mod_LoadAliasFrame (ptemp, &temp_frame);
ptemp = Mod_LoadAliasFrame (ptemp, i, &temp_frame);
memcpy (&paliasgroup->frames[i], &temp_frame,
sizeof(paliasgroup->frames[i]));
}

View file

@ -50,10 +50,7 @@ static const char rcsid[] =
int Mod_Fullbright (byte * skin, int width, int height, char *name);
extern model_t *loadmodel;
extern char loadname[];
extern byte *mod_base;
const int mod_lightmap_bytes = 3;

View file

@ -46,17 +46,14 @@ static const char rcsid[] =
#include "QF/cvar.h"
#include "QF/model.h"
#include "QF/qendian.h"
#include "QF/render.h"
#include "QF/sys.h"
#include "compat.h"
extern struct texture_s *r_notexture_mip;
void R_InitSky (struct texture_s *mt);
extern model_t *loadmodel;
extern char loadname[];
extern const int mod_lightmap_bytes;
byte mod_novis[MAX_MAP_LEAFS / 8];

View file

@ -42,9 +42,6 @@ static const char rcsid[] =
#include "QF/model.h"
extern model_t *loadmodel;
extern char loadname[];
extern byte *mod_base;
const int mod_lightmap_bytes = 1; // was extern const int mod_lightmap_bytes;

View file

@ -42,9 +42,6 @@ static const char rcsid[] =
#include "QF/model.h"
extern model_t *loadmodel;
extern char loadname[];
extern byte *mod_base;
const int mod_lightmap_bytes = 1;

View file

@ -64,7 +64,6 @@ int mod_numknown;
cvar_t *gl_subdivide_size;
cvar_t *gl_mesh_cache;
extern byte mod_novis[MAX_MAP_LEAFS / 8];
texture_t *r_notexture_mip;

View file

@ -46,8 +46,6 @@ static const char rcsid[] =
#include "compat.h"
extern model_t *loadmodel;
extern char loadname[];
void *
Mod_LoadSpriteFrame (void *pin, mspriteframe_t **ppframe, int framenum)

View file

@ -37,8 +37,6 @@ static const char rcsid[] =
#include "compat.h"
extern model_t *loadmodel;
extern char loadname[];
void *Mod_LoadSpriteFrame (void *pin, mspriteframe_t **ppframe,
int framenum);

View file

@ -46,8 +46,6 @@ static const char rcsid[] =
#include "d_iface.h"
extern model_t *loadmodel;
extern char loadname[];
void *

View file

@ -46,8 +46,6 @@ static const char rcsid[] =
#include "d_iface.h"
extern model_t *loadmodel;
extern char loadname[];
void *

View file

@ -52,7 +52,6 @@ static const char rcsid[] =
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS)
extern int errno;
#endif
/* Match STRING against the filename pattern PATTERN, returning zero if

View file

@ -51,6 +51,8 @@ static const char rcsid[] =
#include "QF/vid.h"
#include "QF/GL/defines.h"
#include "QF/GL/funcs.h"
#include "QF/GL/qf_rmain.h"
#include "QF/GL/qf_rsurf.h"
#include "QF/GL/qf_screen.h"
#include "QF/GL/qf_textures.h"
#include "QF/GL/qf_vid.h"
@ -98,12 +100,6 @@ static int numcachepics;
static byte menuplyr_pixels[4096];
extern byte *vid_basepal;
extern int gl_filter_max, gl_filter_min;
extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor,
*r_lightmap_components;
qpic_t *
Draw_PicFromWad (const char *name)
{
@ -232,9 +228,6 @@ Draw_TextBox (int x, int y, int width, int lines)
Draw_Pic (cx, cy + 8, p);
}
extern void glrmain_init (void);
extern void glrsurf_init (void);
extern void GL_TextureMode_f (void);
void
Draw_Init (void)

View file

@ -50,8 +50,8 @@ static const char rcsid[] =
#include "r_cvar.h"
#include "r_dynamic.h"
#include "r_shared.h"
#include "view.h"
extern float v_blend[4];
void

View file

@ -49,6 +49,7 @@ static const char rcsid[] =
#include "QF/GL/defines.h"
#include "QF/GL/funcs.h"
#include "QF/GL/qf_explosions.h"
#include "QF/GL/qf_textures.h"
#include "compat.h"
#include "r_cvar.h"
@ -58,9 +59,6 @@ static const char rcsid[] =
int ramp[8] = { 0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61 };
extern int part_tex_dot, part_tex_smoke, part_tex_spark;
extern short r_maxparticles, numparticles;
extern particle_t *particles, **freeparticles;
inline particle_t *

View file

@ -57,10 +57,6 @@ static int graph_index;
static int graph_size[NUM_GRAPH_TEXTURES];
static int graph_width[NUM_GRAPH_TEXTURES];
extern byte *draw_chars; // 8*8 graphic characters
extern cvar_t *r_netgraph;
extern cvar_t *r_netgraph_alpha;
extern cvar_t *r_netgraph_box;
int

View file

@ -75,12 +75,7 @@ typedef struct {
int *order;
} vert_order_t;
extern vec3_t lightspot;
extern float modelalpha;
extern vec3_t shadecolor;
#define NUMVERTEXNORMALS 162
float r_avertexnormals[NUMVERTEXNORMALS][3] = {
#include "anorms.h"

View file

@ -52,6 +52,7 @@ static const char rcsid[] =
#include "QF/GL/qf_rmain.h"
#include "QF/GL/qf_rsurf.h"
#include "QF/GL/qf_screen.h"
#include "QF/GL/qf_textures.h"
#include "QF/GL/qf_vid.h"
#include "r_dynamic.h"
@ -63,11 +64,7 @@ varray_t2f_c4ub_v3f_t varray[MAX_VARRAY_VERTS];
qboolean VID_Is8bit (void);
void R_InitBubble (void);
extern cvar_t *gl_lerp_anim;
extern cvar_t *r_netgraph;
extern void GDT_Init ();
extern int R_InitGraphTextures (int base);
/*

View file

@ -149,10 +149,7 @@ int scr_center_lines;
int scr_erase_lines;
int scr_erase_center;
extern float v_blend[4];
extern int sb_lines;
extern void GL_Set2D (void);
/*
@ -399,8 +396,6 @@ SCR_DrawTurtle (int swap)
Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
}
extern cvar_t *show_fps;
extern cvar_t *show_time;
void
SCR_DrawFPS (int swap)
@ -667,7 +662,6 @@ MipColor (int r, int g, int b)
}
// in gl_draw.c
extern byte *draw_chars; // 8*8 graphic characters
void
SCR_DrawCharToSnap (int num, byte * dest, int width)

View file

@ -62,8 +62,6 @@ int alphaskytexture;
// Set to true if a valid skybox is loaded --KB
qboolean skyloaded = false;
extern int skytexturenum;
extern model_t *loadmodel;
void

View file

@ -105,8 +105,6 @@ struct box_def {
struct face_def face[6];
};
extern qboolean skyloaded;
extern vec5_t skyvec[6][4];
/*

View file

@ -177,9 +177,6 @@ static glformat_t formats[] = {
int gl_alpha_format = 4, gl_lightmap_format = 4, gl_solid_format = 3;
extern unsigned char d_15to8table[65536];
extern int gl_filter_min, gl_filter_max;
extern cvar_t *gl_picmip;
void
@ -508,7 +505,6 @@ GL_Upload8_EXT (byte * data, int width, int height, qboolean mipmap,
#endif
}
extern qboolean VID_Is8bit (void);
void
GL_Upload8 (byte * data, int width, int height, qboolean mipmap, qboolean alpha)

View file

@ -42,8 +42,6 @@ static const char rcsid[] =
msurface_t *warpface;
extern cvar_t *gl_subdivide_size;
extern model_t *loadmodel;
void

View file

@ -38,6 +38,7 @@ static const char rcsid[] =
#include "QF/cvar.h"
#include "r_cvar.h"
#include "r_dynamic.h"
cvar_t *cl_crossx;
@ -129,11 +130,7 @@ cvar_t *scr_showram;
cvar_t *scr_showturtle;
cvar_t *scr_viewsize;
extern unsigned int r_maxparticles;
extern cvar_t *gl_sky_divide; // FIXME
extern void R_MaxParticlesCheck (cvar_t *r_particles, cvar_t *cl_max_particles);
extern void R_MaxDlightsCheck (cvar_t *var);
static void

View file

@ -40,7 +40,6 @@ static const char rcsid[] =
#define MAX_TIMINGS 100
extern float mouse_x, mouse_y;
int graphval;

View file

@ -44,8 +44,6 @@ short r_maxparticles, numparticles;
particle_t *active_particles, *free_particles, *particles, **freeparticles;
vec3_t r_pright, r_pup, r_ppn;
extern cvar_t *cl_max_particles;
extern cvar_t *r_particles;
/*
@ -130,11 +128,9 @@ R_DarkFieldParticles (entity_t *ent)
}
}
#define NUMVERTEXNORMALS 162
static float beamlength = 16;
static vec3_t avelocities[NUMVERTEXNORMALS];
extern float r_avertexnormals[NUMVERTEXNORMALS][3];
void
R_EntityParticles (entity_t *ent)

View file

@ -40,7 +40,6 @@ static const char rcsid[] =
static int miplevel;
float scale_for_mip;
extern int screenwidth;
int ubasestep, errorterm, erroradjustup, erroradjustdown, vstartscan;
vec3_t transformed_modelorg;

View file

@ -47,7 +47,6 @@ float d_scalemip[NUM_MIPS - 1];
static float basemip[NUM_MIPS - 1] = { 1.0, 0.5 * 0.8, 0.25 * 0.8 };
extern int d_aflatcolor;
void (*d_drawspans) (espan_t *pspan);

View file

@ -121,7 +121,6 @@ int scr_fullupdate;
int clearconsole;
int clearnotify;
extern int sb_lines;
viddef_t vid; // global video state
@ -344,7 +343,6 @@ SCR_CalcRefdef (void)
R_ViewChanged (&vrect, r_lineadj, vid.aspect);
}
extern float v_blend[4];
void
SCR_ApplyBlend (void) // Used to be V_UpdatePalette
@ -450,8 +448,6 @@ SCR_DrawTurtle (int swap)
Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
}
extern cvar_t *show_fps;
extern cvar_t *show_time;
void
SCR_DrawFPS (int swap)
@ -721,7 +717,6 @@ MipColor (int r, int g, int b)
}
// in draw.c
extern byte *draw_chars; // 8*8 graphic characters
void
SCR_DrawCharToSnap (int num, byte * dest, int width)

View file

@ -83,8 +83,6 @@ static aedge_t aedges[12] = {
{0, 5}, {1, 4}, {2, 7}, {3, 6}
};
#define NUMVERTEXNORMALS 162
float r_avertexnormals[NUMVERTEXNORMALS][3] = {
#include "anorms.h"
};

View file

@ -65,7 +65,6 @@ espan_t *span_p, *max_span_p;
int r_currentkey;
extern int screenwidth;
int current_iv;

View file

@ -48,8 +48,6 @@ int ramp1[8] = { 0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61 };
int ramp2[8] = { 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66 };
int ramp3[8] = { 0x6d, 0x6b, 6, 5, 4, 3 };
extern unsigned int r_maxparticles;
extern particle_t *active_particles, *free_particles, *particles;
void

View file

@ -41,7 +41,6 @@ static const char rcsid[] =
static int miplevel;
float scale_for_mip;
extern int screenwidth;
int ubasestep, errorterm, erroradjustup, erroradjustdown, vstartscan;
vec3_t transformed_modelorg;

View file

@ -47,7 +47,6 @@ float d_scalemip[NUM_MIPS - 1];
static float basemip[NUM_MIPS - 1] = { 1.0, 0.5 * 0.8, 0.25 * 0.8 };
extern int d_aflatcolor;
float d_zitable[65536];

View file

@ -47,7 +47,6 @@ int r_turb_spancount;
void D_DrawTurbulentSpan (void);
extern float d_zitable[65536];
/*

View file

@ -41,7 +41,6 @@ static int sprite_height;
static int minindex, maxindex;
static sspan_t *sprite_spans;
extern float d_zitable[65536];
void

View file

@ -121,7 +121,6 @@ int scr_fullupdate;
int clearconsole;
int clearnotify;
extern int sb_lines;
viddef_t vid; // global video state
@ -344,7 +343,6 @@ SCR_CalcRefdef (void)
R_ViewChanged (&vrect, r_lineadj, vid.aspect);
}
extern float v_blend[4];
void
SCR_ApplyBlend (void) // Used to be V_UpdatePalette
@ -517,8 +515,6 @@ SCR_DrawTurtle (int swap)
Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
}
extern cvar_t *show_fps;
extern cvar_t *show_time;
void
SCR_DrawFPS (int swap)
@ -741,7 +737,6 @@ MipColor (int r, int g, int b)
}
// in draw.c
extern byte *draw_chars; // 8*8 graphic characters
void
SCR_DrawCharToSnap (int num, byte * dest, int width)

View file

@ -83,8 +83,6 @@ static aedge_t aedges[12] = {
{0, 5}, {1, 4}, {2, 7}, {3, 6}
};
#define NUMVERTEXNORMALS 162
float r_avertexnormals[NUMVERTEXNORMALS][3] = {
#include "anorms.h"
};

View file

@ -65,7 +65,6 @@ espan_t *span_p, *max_span_p;
int r_currentkey;
extern int screenwidth;
int current_iv;

View file

@ -141,7 +141,6 @@ void SetVisibilityByPassages (void);
cvar_t *r_draworder;
extern cvar_t *scr_fov;
void R_LoadSky_f (void);

View file

@ -48,8 +48,6 @@ int ramp1[8] = { 0x6f, 0x6d, 0x6b, 0x69, 0x67, 0x65, 0x63, 0x61 };
int ramp2[8] = { 0x6f, 0x6e, 0x6d, 0x6c, 0x6b, 0x6a, 0x68, 0x66 };
int ramp3[8] = { 0x6d, 0x6b, 6, 5, 4, 3 };
extern unsigned int r_maxparticles;
extern particle_t *active_particles, *free_particles, *particles;
void

View file

@ -102,7 +102,6 @@ static qboolean vidmode_avail = false;
static qboolean vidmode_active = false;
extern cvar_t *vid_system_gamma;
qboolean vid_fullscreen_active;
static qboolean vid_context_created = false;
static int window_x, window_y, window_saved;

View file

@ -208,11 +208,10 @@ static int FillScanRates(struct VideoMode *vmode);
static void Usage(void);
int main(int argc, char *argv[]);
extern void Con_Printf (const char *fmt, ...);
#define Die Con_Printf
#define puts(s) Con_Printf("%s\n",(s))
#define printf Con_Printf
#define Die Sys_Printf
#define puts(s) Sys_Printf("%s\n",(s))
#define printf Sys_Printf
/* Open the Frame Buffer Device */

View file

@ -104,23 +104,23 @@ IN_LL_SendKeyEvents (void)
switch (k) {
case '\r':
case '\n':
k = K_RETURN;
k = QFK_RETURN;
break;
case '\033':
if (read(0, buf, 2) != 2)
break;
switch (buf[1]) {
case 'A':
k = K_UP;
k = QFK_UP;
break;
case 'B':
k = K_DOWN;
k = QFK_DOWN;
break;
case 'C':
k = K_RIGHT;
k = QFK_RIGHT;
break;
case 'D':
k = K_LEFT;
k = QFK_LEFT;
break;
}
break;

View file

@ -46,7 +46,6 @@ static const char rcsid[] =
#include "compat.h"
extern cvar_t *in_grab;
int old_windowed_mouse;
@ -68,703 +67,703 @@ IN_LL_SendKeyEvents (void)
unicode = event.key.keysym.unicode;
switch (sym) {
case SDLK_UNKNOWN:
ksym = K_UNKNOWN;
ksym = QFK_UNKNOWN;
break;
case SDLK_BACKSPACE:
ksym = K_BACKSPACE;
ksym = QFK_BACKSPACE;
break;
case SDLK_TAB:
ksym = K_TAB;
ksym = QFK_TAB;
break;
case SDLK_CLEAR:
ksym = K_CLEAR;
ksym = QFK_CLEAR;
break;
case SDLK_RETURN:
ksym = K_RETURN;
ksym = QFK_RETURN;
break;
case SDLK_PAUSE:
ksym = K_PAUSE;
ksym = QFK_PAUSE;
break;
case SDLK_ESCAPE:
ksym = K_ESCAPE;
ksym = QFK_ESCAPE;
break;
case SDLK_SPACE:
ksym = K_SPACE;
ksym = QFK_SPACE;
break;
case SDLK_EXCLAIM:
ksym = K_EXCLAIM;
ksym = QFK_EXCLAIM;
break;
case SDLK_QUOTEDBL:
ksym = K_QUOTEDBL;
ksym = QFK_QUOTEDBL;
break;
case SDLK_HASH:
ksym = K_HASH;
ksym = QFK_HASH;
break;
case SDLK_DOLLAR:
ksym = K_DOLLAR;
ksym = QFK_DOLLAR;
break;
case SDLK_AMPERSAND:
ksym = K_AMPERSAND;
ksym = QFK_AMPERSAND;
break;
case SDLK_QUOTE:
ksym = K_QUOTE;
ksym = QFK_QUOTE;
break;
case SDLK_LEFTPAREN:
ksym = K_LEFTPAREN;
ksym = QFK_LEFTPAREN;
break;
case SDLK_RIGHTPAREN:
ksym = K_RIGHTPAREN;
ksym = QFK_RIGHTPAREN;
break;
case SDLK_ASTERISK:
ksym = K_ASTERISK;
ksym = QFK_ASTERISK;
break;
case SDLK_PLUS:
ksym = K_PLUS;
ksym = QFK_PLUS;
break;
case SDLK_COMMA:
ksym = K_COMMA;
ksym = QFK_COMMA;
break;
case SDLK_MINUS:
ksym = K_MINUS;
ksym = QFK_MINUS;
break;
case SDLK_PERIOD:
ksym = K_PERIOD;
ksym = QFK_PERIOD;
break;
case SDLK_SLASH:
ksym = K_SLASH;
ksym = QFK_SLASH;
break;
case SDLK_0:
ksym = K_0;
ksym = QFK_0;
break;
case SDLK_1:
ksym = K_1;
ksym = QFK_1;
break;
case SDLK_2:
ksym = K_2;
ksym = QFK_2;
break;
case SDLK_3:
ksym = K_3;
ksym = QFK_3;
break;
case SDLK_4:
ksym = K_4;
ksym = QFK_4;
break;
case SDLK_5:
ksym = K_5;
ksym = QFK_5;
break;
case SDLK_6:
ksym = K_6;
ksym = QFK_6;
break;
case SDLK_7:
ksym = K_7;
ksym = QFK_7;
break;
case SDLK_8:
ksym = K_8;
ksym = QFK_8;
break;
case SDLK_9:
ksym = K_9;
ksym = QFK_9;
break;
case SDLK_COLON:
ksym = K_COLON;
ksym = QFK_COLON;
break;
case SDLK_SEMICOLON:
ksym = K_SEMICOLON;
ksym = QFK_SEMICOLON;
break;
case SDLK_LESS:
ksym = K_LESS;
ksym = QFK_LESS;
break;
case SDLK_EQUALS:
ksym = K_EQUALS;
ksym = QFK_EQUALS;
break;
case SDLK_GREATER:
ksym = K_GREATER;
ksym = QFK_GREATER;
break;
case SDLK_QUESTION:
ksym = K_QUESTION;
ksym = QFK_QUESTION;
break;
case SDLK_AT:
ksym = K_AT;
ksym = QFK_AT;
break;
case SDLK_LEFTBRACKET:
ksym = K_LEFTBRACKET;
ksym = QFK_LEFTBRACKET;
break;
case SDLK_BACKSLASH:
ksym = K_BACKSLASH;
ksym = QFK_BACKSLASH;
break;
case SDLK_RIGHTBRACKET:
ksym = K_RIGHTBRACKET;
ksym = QFK_RIGHTBRACKET;
break;
case SDLK_CARET:
ksym = K_CARET;
ksym = QFK_CARET;
break;
case SDLK_UNDERSCORE:
ksym = K_UNDERSCORE;
ksym = QFK_UNDERSCORE;
break;
case SDLK_BACKQUOTE:
ksym = K_BACKQUOTE;
ksym = QFK_BACKQUOTE;
break;
case SDLK_a:
ksym = K_a;
ksym = QFK_a;
break;
case SDLK_b:
ksym = K_b;
ksym = QFK_b;
break;
case SDLK_c:
ksym = K_c;
ksym = QFK_c;
break;
case SDLK_d:
ksym = K_d;
ksym = QFK_d;
break;
case SDLK_e:
ksym = K_e;
ksym = QFK_e;
break;
case SDLK_f:
ksym = K_f;
ksym = QFK_f;
break;
case SDLK_g:
ksym = K_g;
ksym = QFK_g;
break;
case SDLK_h:
ksym = K_h;
ksym = QFK_h;
break;
case SDLK_i:
ksym = K_i;
ksym = QFK_i;
break;
case SDLK_j:
ksym = K_j;
ksym = QFK_j;
break;
case SDLK_k:
ksym = K_k;
ksym = QFK_k;
break;
case SDLK_l:
ksym = K_l;
ksym = QFK_l;
break;
case SDLK_m:
ksym = K_m;
ksym = QFK_m;
break;
case SDLK_n:
ksym = K_n;
ksym = QFK_n;
break;
case SDLK_o:
ksym = K_o;
ksym = QFK_o;
break;
case SDLK_p:
ksym = K_p;
ksym = QFK_p;
break;
case SDLK_q:
ksym = K_q;
ksym = QFK_q;
break;
case SDLK_r:
ksym = K_r;
ksym = QFK_r;
break;
case SDLK_s:
ksym = K_s;
ksym = QFK_s;
break;
case SDLK_t:
ksym = K_t;
ksym = QFK_t;
break;
case SDLK_u:
ksym = K_u;
ksym = QFK_u;
break;
case SDLK_v:
ksym = K_v;
ksym = QFK_v;
break;
case SDLK_w:
ksym = K_w;
ksym = QFK_w;
break;
case SDLK_x:
ksym = K_x;
ksym = QFK_x;
break;
case SDLK_y:
ksym = K_y;
ksym = QFK_y;
break;
case SDLK_z:
ksym = K_z;
ksym = QFK_z;
break;
case SDLK_DELETE:
ksym = K_DELETE;
ksym = QFK_DELETE;
break;
case SDLK_WORLD_0:
ksym = K_WORLD_0;
ksym = QFK_WORLD_0;
break;
case SDLK_WORLD_1:
ksym = K_WORLD_1;
ksym = QFK_WORLD_1;
break;
case SDLK_WORLD_2:
ksym = K_WORLD_2;
ksym = QFK_WORLD_2;
break;
case SDLK_WORLD_3:
ksym = K_WORLD_3;
ksym = QFK_WORLD_3;
break;
case SDLK_WORLD_4:
ksym = K_WORLD_4;
ksym = QFK_WORLD_4;
break;
case SDLK_WORLD_5:
ksym = K_WORLD_5;
ksym = QFK_WORLD_5;
break;
case SDLK_WORLD_6:
ksym = K_WORLD_6;
ksym = QFK_WORLD_6;
break;
case SDLK_WORLD_7:
ksym = K_WORLD_7;
ksym = QFK_WORLD_7;
break;
case SDLK_WORLD_8:
ksym = K_WORLD_8;
ksym = QFK_WORLD_8;
break;
case SDLK_WORLD_9:
ksym = K_WORLD_9;
ksym = QFK_WORLD_9;
break;
case SDLK_WORLD_10:
ksym = K_WORLD_10;
ksym = QFK_WORLD_10;
break;
case SDLK_WORLD_11:
ksym = K_WORLD_11;
ksym = QFK_WORLD_11;
break;
case SDLK_WORLD_12:
ksym = K_WORLD_12;
ksym = QFK_WORLD_12;
break;
case SDLK_WORLD_13:
ksym = K_WORLD_13;
ksym = QFK_WORLD_13;
break;
case SDLK_WORLD_14:
ksym = K_WORLD_14;
ksym = QFK_WORLD_14;
break;
case SDLK_WORLD_15:
ksym = K_WORLD_15;
ksym = QFK_WORLD_15;
break;
case SDLK_WORLD_16:
ksym = K_WORLD_16;
ksym = QFK_WORLD_16;
break;
case SDLK_WORLD_17:
ksym = K_WORLD_17;
ksym = QFK_WORLD_17;
break;
case SDLK_WORLD_18:
ksym = K_WORLD_18;
ksym = QFK_WORLD_18;
break;
case SDLK_WORLD_19:
ksym = K_WORLD_19;
ksym = QFK_WORLD_19;
break;
case SDLK_WORLD_20:
ksym = K_WORLD_20;
ksym = QFK_WORLD_20;
break;
case SDLK_WORLD_21:
ksym = K_WORLD_21;
ksym = QFK_WORLD_21;
break;
case SDLK_WORLD_22:
ksym = K_WORLD_22;
ksym = QFK_WORLD_22;
break;
case SDLK_WORLD_23:
ksym = K_WORLD_23;
ksym = QFK_WORLD_23;
break;
case SDLK_WORLD_24:
ksym = K_WORLD_24;
ksym = QFK_WORLD_24;
break;
case SDLK_WORLD_25:
ksym = K_WORLD_25;
ksym = QFK_WORLD_25;
break;
case SDLK_WORLD_26:
ksym = K_WORLD_26;
ksym = QFK_WORLD_26;
break;
case SDLK_WORLD_27:
ksym = K_WORLD_27;
ksym = QFK_WORLD_27;
break;
case SDLK_WORLD_28:
ksym = K_WORLD_28;
ksym = QFK_WORLD_28;
break;
case SDLK_WORLD_29:
ksym = K_WORLD_29;
ksym = QFK_WORLD_29;
break;
case SDLK_WORLD_30:
ksym = K_WORLD_30;
ksym = QFK_WORLD_30;
break;
case SDLK_WORLD_31:
ksym = K_WORLD_31;
ksym = QFK_WORLD_31;
break;
case SDLK_WORLD_32:
ksym = K_WORLD_32;
ksym = QFK_WORLD_32;
break;
case SDLK_WORLD_33:
ksym = K_WORLD_33;
ksym = QFK_WORLD_33;
break;
case SDLK_WORLD_34:
ksym = K_WORLD_34;
ksym = QFK_WORLD_34;
break;
case SDLK_WORLD_35:
ksym = K_WORLD_35;
ksym = QFK_WORLD_35;
break;
case SDLK_WORLD_36:
ksym = K_WORLD_36;
ksym = QFK_WORLD_36;
break;
case SDLK_WORLD_37:
ksym = K_WORLD_37;
ksym = QFK_WORLD_37;
break;
case SDLK_WORLD_38:
ksym = K_WORLD_38;
ksym = QFK_WORLD_38;
break;
case SDLK_WORLD_39:
ksym = K_WORLD_39;
ksym = QFK_WORLD_39;
break;
case SDLK_WORLD_40:
ksym = K_WORLD_40;
ksym = QFK_WORLD_40;
break;
case SDLK_WORLD_41:
ksym = K_WORLD_41;
ksym = QFK_WORLD_41;
break;
case SDLK_WORLD_42:
ksym = K_WORLD_42;
ksym = QFK_WORLD_42;
break;
case SDLK_WORLD_43:
ksym = K_WORLD_43;
ksym = QFK_WORLD_43;
break;
case SDLK_WORLD_44:
ksym = K_WORLD_44;
ksym = QFK_WORLD_44;
break;
case SDLK_WORLD_45:
ksym = K_WORLD_45;
ksym = QFK_WORLD_45;
break;
case SDLK_WORLD_46:
ksym = K_WORLD_46;
ksym = QFK_WORLD_46;
break;
case SDLK_WORLD_47:
ksym = K_WORLD_47;
ksym = QFK_WORLD_47;
break;
case SDLK_WORLD_48:
ksym = K_WORLD_48;
ksym = QFK_WORLD_48;
break;
case SDLK_WORLD_49:
ksym = K_WORLD_49;
ksym = QFK_WORLD_49;
break;
case SDLK_WORLD_50:
ksym = K_WORLD_50;
ksym = QFK_WORLD_50;
break;
case SDLK_WORLD_51:
ksym = K_WORLD_51;
ksym = QFK_WORLD_51;
break;
case SDLK_WORLD_52:
ksym = K_WORLD_52;
ksym = QFK_WORLD_52;
break;
case SDLK_WORLD_53:
ksym = K_WORLD_53;
ksym = QFK_WORLD_53;
break;
case SDLK_WORLD_54:
ksym = K_WORLD_54;
ksym = QFK_WORLD_54;
break;
case SDLK_WORLD_55:
ksym = K_WORLD_55;
ksym = QFK_WORLD_55;
break;
case SDLK_WORLD_56:
ksym = K_WORLD_56;
ksym = QFK_WORLD_56;
break;
case SDLK_WORLD_57:
ksym = K_WORLD_57;
ksym = QFK_WORLD_57;
break;
case SDLK_WORLD_58:
ksym = K_WORLD_58;
ksym = QFK_WORLD_58;
break;
case SDLK_WORLD_59:
ksym = K_WORLD_59;
ksym = QFK_WORLD_59;
break;
case SDLK_WORLD_60:
ksym = K_WORLD_60;
ksym = QFK_WORLD_60;
break;
case SDLK_WORLD_61:
ksym = K_WORLD_61;
ksym = QFK_WORLD_61;
break;
case SDLK_WORLD_62:
ksym = K_WORLD_62;
ksym = QFK_WORLD_62;
break;
case SDLK_WORLD_63:
ksym = K_WORLD_63;
ksym = QFK_WORLD_63;
break;
case SDLK_WORLD_64:
ksym = K_WORLD_64;
ksym = QFK_WORLD_64;
break;
case SDLK_WORLD_65:
ksym = K_WORLD_65;
ksym = QFK_WORLD_65;
break;
case SDLK_WORLD_66:
ksym = K_WORLD_66;
ksym = QFK_WORLD_66;
break;
case SDLK_WORLD_67:
ksym = K_WORLD_67;
ksym = QFK_WORLD_67;
break;
case SDLK_WORLD_68:
ksym = K_WORLD_68;
ksym = QFK_WORLD_68;
break;
case SDLK_WORLD_69:
ksym = K_WORLD_69;
ksym = QFK_WORLD_69;
break;
case SDLK_WORLD_70:
ksym = K_WORLD_70;
ksym = QFK_WORLD_70;
break;
case SDLK_WORLD_71:
ksym = K_WORLD_71;
ksym = QFK_WORLD_71;
break;
case SDLK_WORLD_72:
ksym = K_WORLD_72;
ksym = QFK_WORLD_72;
break;
case SDLK_WORLD_73:
ksym = K_WORLD_73;
ksym = QFK_WORLD_73;
break;
case SDLK_WORLD_74:
ksym = K_WORLD_74;
ksym = QFK_WORLD_74;
break;
case SDLK_WORLD_75:
ksym = K_WORLD_75;
ksym = QFK_WORLD_75;
break;
case SDLK_WORLD_76:
ksym = K_WORLD_76;
ksym = QFK_WORLD_76;
break;
case SDLK_WORLD_77:
ksym = K_WORLD_77;
ksym = QFK_WORLD_77;
break;
case SDLK_WORLD_78:
ksym = K_WORLD_78;
ksym = QFK_WORLD_78;
break;
case SDLK_WORLD_79:
ksym = K_WORLD_79;
ksym = QFK_WORLD_79;
break;
case SDLK_WORLD_80:
ksym = K_WORLD_80;
ksym = QFK_WORLD_80;
break;
case SDLK_WORLD_81:
ksym = K_WORLD_81;
ksym = QFK_WORLD_81;
break;
case SDLK_WORLD_82:
ksym = K_WORLD_82;
ksym = QFK_WORLD_82;
break;
case SDLK_WORLD_83:
ksym = K_WORLD_83;
ksym = QFK_WORLD_83;
break;
case SDLK_WORLD_84:
ksym = K_WORLD_84;
ksym = QFK_WORLD_84;
break;
case SDLK_WORLD_85:
ksym = K_WORLD_85;
ksym = QFK_WORLD_85;
break;
case SDLK_WORLD_86:
ksym = K_WORLD_86;
ksym = QFK_WORLD_86;
break;
case SDLK_WORLD_87:
ksym = K_WORLD_87;
ksym = QFK_WORLD_87;
break;
case SDLK_WORLD_88:
ksym = K_WORLD_88;
ksym = QFK_WORLD_88;
break;
case SDLK_WORLD_89:
ksym = K_WORLD_89;
ksym = QFK_WORLD_89;
break;
case SDLK_WORLD_90:
ksym = K_WORLD_90;
ksym = QFK_WORLD_90;
break;
case SDLK_WORLD_91:
ksym = K_WORLD_91;
ksym = QFK_WORLD_91;
break;
case SDLK_WORLD_92:
ksym = K_WORLD_92;
ksym = QFK_WORLD_92;
break;
case SDLK_WORLD_93:
ksym = K_WORLD_93;
ksym = QFK_WORLD_93;
break;
case SDLK_WORLD_94:
ksym = K_WORLD_94;
ksym = QFK_WORLD_94;
break;
case SDLK_WORLD_95:
ksym = K_WORLD_95;
ksym = QFK_WORLD_95;
break;
case SDLK_KP0:
ksym = K_KP0;
ksym = QFK_KP0;
break;
case SDLK_KP1:
ksym = K_KP1;
ksym = QFK_KP1;
break;
case SDLK_KP2:
ksym = K_KP2;
ksym = QFK_KP2;
break;
case SDLK_KP3:
ksym = K_KP3;
ksym = QFK_KP3;
break;
case SDLK_KP4:
ksym = K_KP4;
ksym = QFK_KP4;
break;
case SDLK_KP5:
ksym = K_KP5;
ksym = QFK_KP5;
break;
case SDLK_KP6:
ksym = K_KP6;
ksym = QFK_KP6;
break;
case SDLK_KP7:
ksym = K_KP7;
ksym = QFK_KP7;
break;
case SDLK_KP8:
ksym = K_KP8;
ksym = QFK_KP8;
break;
case SDLK_KP9:
ksym = K_KP9;
ksym = QFK_KP9;
break;
case SDLK_KP_PERIOD:
ksym = K_KP_PERIOD;
ksym = QFK_KP_PERIOD;
break;
case SDLK_KP_DIVIDE:
ksym = K_KP_DIVIDE;
ksym = QFK_KP_DIVIDE;
break;
case SDLK_KP_MULTIPLY:
ksym = K_KP_MULTIPLY;
ksym = QFK_KP_MULTIPLY;
break;
case SDLK_KP_MINUS:
ksym = K_KP_MINUS;
ksym = QFK_KP_MINUS;
break;
case SDLK_KP_PLUS:
ksym = K_KP_PLUS;
ksym = QFK_KP_PLUS;
break;
case SDLK_KP_ENTER:
ksym = K_KP_ENTER;
ksym = QFK_KP_ENTER;
break;
case SDLK_KP_EQUALS:
ksym = K_KP_EQUALS;
ksym = QFK_KP_EQUALS;
break;
case SDLK_UP:
ksym = K_UP;
ksym = QFK_UP;
break;
case SDLK_DOWN:
ksym = K_DOWN;
ksym = QFK_DOWN;
break;
case SDLK_RIGHT:
ksym = K_RIGHT;
ksym = QFK_RIGHT;
break;
case SDLK_LEFT:
ksym = K_LEFT;
ksym = QFK_LEFT;
break;
case SDLK_INSERT:
ksym = K_INSERT;
ksym = QFK_INSERT;
break;
case SDLK_HOME:
ksym = K_HOME;
ksym = QFK_HOME;
break;
case SDLK_END:
ksym = K_END;
ksym = QFK_END;
break;
case SDLK_PAGEUP:
ksym = K_PAGEUP;
ksym = QFK_PAGEUP;
break;
case SDLK_PAGEDOWN:
ksym = K_PAGEDOWN;
ksym = QFK_PAGEDOWN;
break;
case SDLK_F1:
ksym = K_F1;
ksym = QFK_F1;
break;
case SDLK_F2:
ksym = K_F2;
ksym = QFK_F2;
break;
case SDLK_F3:
ksym = K_F3;
ksym = QFK_F3;
break;
case SDLK_F4:
ksym = K_F4;
ksym = QFK_F4;
break;
case SDLK_F5:
ksym = K_F5;
ksym = QFK_F5;
break;
case SDLK_F6:
ksym = K_F6;
ksym = QFK_F6;
break;
case SDLK_F7:
ksym = K_F7;
ksym = QFK_F7;
break;
case SDLK_F8:
ksym = K_F8;
ksym = QFK_F8;
break;
case SDLK_F9:
ksym = K_F9;
ksym = QFK_F9;
break;
case SDLK_F10:
ksym = K_F10;
ksym = QFK_F10;
break;
case SDLK_F11:
ksym = K_F11;
ksym = QFK_F11;
break;
case SDLK_F12:
ksym = K_F12;
ksym = QFK_F12;
break;
case SDLK_F13:
ksym = K_F13;
ksym = QFK_F13;
break;
case SDLK_F14:
ksym = K_F14;
ksym = QFK_F14;
break;
case SDLK_F15:
ksym = K_F15;
ksym = QFK_F15;
break;
case SDLK_NUMLOCK:
ksym = K_NUMLOCK;
ksym = QFK_NUMLOCK;
break;
case SDLK_CAPSLOCK:
ksym = K_CAPSLOCK;
ksym = QFK_CAPSLOCK;
break;
case SDLK_SCROLLOCK:
ksym = K_SCROLLOCK;
ksym = QFK_SCROLLOCK;
break;
case SDLK_RSHIFT:
ksym = K_RSHIFT;
ksym = QFK_RSHIFT;
break;
case SDLK_LSHIFT:
ksym = K_LSHIFT;
ksym = QFK_LSHIFT;
break;
case SDLK_RCTRL:
ksym = K_RCTRL;
ksym = QFK_RCTRL;
break;
case SDLK_LCTRL:
ksym = K_LCTRL;
ksym = QFK_LCTRL;
break;
case SDLK_RALT:
ksym = K_RALT;
ksym = QFK_RALT;
break;
case SDLK_LALT:
ksym = K_LALT;
ksym = QFK_LALT;
break;
case SDLK_RMETA:
ksym = K_RMETA;
ksym = QFK_RMETA;
break;
case SDLK_LMETA:
ksym = K_LMETA;
ksym = QFK_LMETA;
break;
case SDLK_LSUPER:
ksym = K_LSUPER;
ksym = QFK_LSUPER;
break;
case SDLK_RSUPER:
ksym = K_RSUPER;
ksym = QFK_RSUPER;
break;
case SDLK_MODE:
ksym = K_MODE;
ksym = QFK_MODE;
break;
case SDLK_COMPOSE:
ksym = K_COMPOSE;
ksym = QFK_COMPOSE;
break;
case SDLK_HELP:
ksym = K_HELP;
ksym = QFK_HELP;
break;
case SDLK_PRINT:
ksym = K_PRINT;
ksym = QFK_PRINT;
break;
case SDLK_SYSREQ:
ksym = K_SYSREQ;
ksym = QFK_SYSREQ;
break;
case SDLK_BREAK:
ksym = K_BREAK;
ksym = QFK_BREAK;
break;
case SDLK_MENU:
ksym = K_MENU;
ksym = QFK_MENU;
break;
case SDLK_POWER:
ksym = K_POWER;
ksym = QFK_POWER;
break;
case SDLK_EURO:
ksym = K_EURO;
ksym = QFK_EURO;
break;
case SDLK_LAST:
ksym = K_LAST;
ksym = QFK_LAST;
break;
default:
ksym = K_UNKNOWN;
ksym = QFK_UNKNOWN;
break;
}
if (unicode > 255)
@ -784,16 +783,16 @@ IN_LL_SendKeyEvents (void)
case 1:
case 2:
case 3:
Key_Event (M_BUTTON1 + but - 1, 0,
Key_Event (QFM_BUTTON1 + but - 1, 0,
event.type == SDL_MOUSEBUTTONDOWN);
break;
case 4:
Key_Event (M_WHEEL_UP, 0, true);
Key_Event (M_WHEEL_UP, 0, false);
Key_Event (QFM_WHEEL_UP, 0, true);
Key_Event (QFM_WHEEL_UP, 0, false);
break;
case 5:
Key_Event (M_WHEEL_DOWN, 0, true);
Key_Event (M_WHEEL_DOWN, 0, false);
Key_Event (QFM_WHEEL_DOWN, 0, true);
Key_Event (QFM_WHEEL_DOWN, 0, false);
break;
}
break;

View file

@ -96,19 +96,19 @@ keyhandler (int scancode, int state)
if (ascii > 255)
ascii = 0;
switch (key) {
case K_RSHIFT:
case QFK_RSHIFT:
shifts &= mask;
shifts |= press;
break;
case K_LSHIFT:
case QFK_LSHIFT:
shifts &= ROTL(mask, 1);
shifts |= ROTL(press, 1);
break;
case K_RCTRL:
case QFK_RCTRL:
shifts &= ROTL(mask, 2);
shifts |= ROTL(press, 2);
break;
case K_LCTRL:
case QFK_LCTRL:
shifts &= ROTL(mask, 3);
shifts |= ROTL(press, 3);
break;
@ -128,11 +128,11 @@ mousehandler (int buttonstate, int dx, int dy, int dz, int drx, int dry,
in_mouse_x += dx;
in_mouse_y += dy;
if (drx > 0) {
Key_Event (M_WHEEL_UP, 0, 1);
Key_Event (M_WHEEL_UP, 0, 0);
Key_Event (QFM_WHEEL_UP, 0, 1);
Key_Event (QFM_WHEEL_UP, 0, 0);
} else if (drx < 0) {
Key_Event (M_WHEEL_DOWN, 0, 1);
Key_Event (M_WHEEL_DOWN, 0, 0);
Key_Event (QFM_WHEEL_DOWN, 0, 1);
Key_Event (QFM_WHEEL_DOWN, 0, 0);
}
}
@ -167,7 +167,7 @@ IN_InitKeyboard (void)
scantokey[0][i] = ' ';
}
scantokey[0][1] = K_ESCAPE;
scantokey[0][1] = QFK_ESCAPE;
scantokey[0][2] = '1';
scantokey[0][3] = '2';
scantokey[0][4] = '3';
@ -180,8 +180,8 @@ IN_InitKeyboard (void)
scantokey[0][11] = '0';
scantokey[0][12] = '-';
scantokey[0][13] = '=';
scantokey[0][14] = K_BACKSPACE;
scantokey[0][15] = K_TAB;
scantokey[0][14] = QFK_BACKSPACE;
scantokey[0][15] = QFK_TAB;
scantokey[0][16] = 'q';
scantokey[0][17] = 'w';
scantokey[0][18] = 'e';
@ -194,8 +194,8 @@ IN_InitKeyboard (void)
scantokey[0][25] = 'p';
scantokey[0][26] = '[';
scantokey[0][27] = ']';
scantokey[0][28] = K_RETURN;
scantokey[0][29] = K_LCTRL; /* left */
scantokey[0][28] = QFK_RETURN;
scantokey[0][29] = QFK_LCTRL; /* left */
scantokey[0][30] = 'a';
scantokey[0][31] = 's';
scantokey[0][32] = 'd';
@ -208,7 +208,7 @@ IN_InitKeyboard (void)
scantokey[0][39] = ';';
scantokey[0][40] = '\'';
scantokey[0][41] = '`';
scantokey[0][42] = K_LSHIFT; /* left */
scantokey[0][42] = QFK_LSHIFT; /* left */
scantokey[0][43] = '\\';
scantokey[0][44] = 'z';
scantokey[0][45] = 'x';
@ -220,58 +220,58 @@ IN_InitKeyboard (void)
scantokey[0][51] = ',';
scantokey[0][52] = '.';
scantokey[0][53] = '/';
scantokey[0][54] = K_RSHIFT; /* right */
scantokey[0][55] = K_KP_MULTIPLY;
scantokey[0][56] = K_LALT; /* left */
scantokey[0][54] = QFK_RSHIFT; /* right */
scantokey[0][55] = QFK_KP_MULTIPLY;
scantokey[0][56] = QFK_LALT; /* left */
scantokey[0][57] = ' ';
scantokey[0][58] = K_CAPSLOCK;
scantokey[0][59] = K_F1;
scantokey[0][60] = K_F2;
scantokey[0][61] = K_F3;
scantokey[0][62] = K_F4;
scantokey[0][63] = K_F5;
scantokey[0][64] = K_F6;
scantokey[0][65] = K_F7;
scantokey[0][66] = K_F8;
scantokey[0][67] = K_F9;
scantokey[0][68] = K_F10;
scantokey[0][69] = K_NUMLOCK;
scantokey[0][70] = K_SCROLLOCK;
scantokey[0][71] = K_KP7;
scantokey[0][72] = K_KP8;
scantokey[0][73] = K_KP9;
scantokey[0][74] = K_KP_MINUS;
scantokey[0][75] = K_KP4;
scantokey[0][76] = K_KP5;
scantokey[0][77] = K_KP6;
scantokey[0][79] = K_KP1;
scantokey[0][78] = K_KP_PLUS;
scantokey[0][80] = K_KP2;
scantokey[0][81] = K_KP3;
scantokey[0][82] = K_KP0;
scantokey[0][83] = K_KP_PERIOD;
scantokey[0][58] = QFK_CAPSLOCK;
scantokey[0][59] = QFK_F1;
scantokey[0][60] = QFK_F2;
scantokey[0][61] = QFK_F3;
scantokey[0][62] = QFK_F4;
scantokey[0][63] = QFK_F5;
scantokey[0][64] = QFK_F6;
scantokey[0][65] = QFK_F7;
scantokey[0][66] = QFK_F8;
scantokey[0][67] = QFK_F9;
scantokey[0][68] = QFK_F10;
scantokey[0][69] = QFK_NUMLOCK;
scantokey[0][70] = QFK_SCROLLOCK;
scantokey[0][71] = QFK_KP7;
scantokey[0][72] = QFK_KP8;
scantokey[0][73] = QFK_KP9;
scantokey[0][74] = QFK_KP_MINUS;
scantokey[0][75] = QFK_KP4;
scantokey[0][76] = QFK_KP5;
scantokey[0][77] = QFK_KP6;
scantokey[0][79] = QFK_KP1;
scantokey[0][78] = QFK_KP_PLUS;
scantokey[0][80] = QFK_KP2;
scantokey[0][81] = QFK_KP3;
scantokey[0][82] = QFK_KP0;
scantokey[0][83] = QFK_KP_PERIOD;
/* 84 to 86 not used */
scantokey[0][87] = K_F11;
scantokey[0][88] = K_F12;
scantokey[0][87] = QFK_F11;
scantokey[0][88] = QFK_F12;
/* 89 to 95 not used */
scantokey[0][96] = K_KP_ENTER; /* keypad enter */
scantokey[0][97] = K_RCTRL; /* right */
scantokey[0][98] = K_KP_DIVIDE;
scantokey[0][99] = K_PRINT; /* print screen */
scantokey[0][100] = K_RALT; /* right */
scantokey[0][96] = QFK_KP_ENTER; /* keypad enter */
scantokey[0][97] = QFK_RCTRL; /* right */
scantokey[0][98] = QFK_KP_DIVIDE;
scantokey[0][99] = QFK_PRINT; /* print screen */
scantokey[0][100] = QFK_RALT; /* right */
scantokey[0][101] = K_PAUSE; /* break */
scantokey[0][102] = K_HOME;
scantokey[0][103] = K_UP;
scantokey[0][104] = K_PAGEUP;
scantokey[0][105] = K_LEFT;
scantokey[0][106] = K_RIGHT;
scantokey[0][107] = K_END;
scantokey[0][108] = K_DOWN;
scantokey[0][109] = K_PAGEDOWN;
scantokey[0][110] = K_INSERT;
scantokey[0][111] = K_DELETE;
scantokey[0][119] = K_PAUSE;
scantokey[0][101] = QFK_PAUSE; /* break */
scantokey[0][102] = QFK_HOME;
scantokey[0][103] = QFK_UP;
scantokey[0][104] = QFK_PAGEUP;
scantokey[0][105] = QFK_LEFT;
scantokey[0][106] = QFK_RIGHT;
scantokey[0][107] = QFK_END;
scantokey[0][108] = QFK_DOWN;
scantokey[0][109] = QFK_PAGEDOWN;
scantokey[0][110] = QFK_INSERT;
scantokey[0][111] = QFK_DELETE;
scantokey[0][119] = QFK_PAUSE;
memcpy (scantokey[1], scantokey[0], sizeof (scantokey[1]));
memcpy (scantokey[2], scantokey[0], sizeof (scantokey[2]));
@ -428,24 +428,24 @@ IN_LL_SendKeyEvents (void)
/* Perform button actions */
if ((mouse_buttonstate & MOUSE_LEFTBUTTON) &&
!(mouse_oldbuttonstate & MOUSE_LEFTBUTTON))
Key_Event (M_BUTTON1, 0, true);
Key_Event (QFM_BUTTON1, 0, true);
else if (!(mouse_buttonstate & MOUSE_LEFTBUTTON) &&
(mouse_oldbuttonstate & MOUSE_LEFTBUTTON))
Key_Event (M_BUTTON1, 0, false);
Key_Event (QFM_BUTTON1, 0, false);
if ((mouse_buttonstate & MOUSE_RIGHTBUTTON) &&
!(mouse_oldbuttonstate & MOUSE_RIGHTBUTTON))
Key_Event (M_BUTTON2, 0, true);
Key_Event (QFM_BUTTON2, 0, true);
else if (!(mouse_buttonstate & MOUSE_RIGHTBUTTON) &&
(mouse_oldbuttonstate & MOUSE_RIGHTBUTTON))
Key_Event (M_BUTTON2, 0, false);
Key_Event (QFM_BUTTON2, 0, false);
if ((mouse_buttonstate & MOUSE_MIDDLEBUTTON) &&
!(mouse_oldbuttonstate & MOUSE_MIDDLEBUTTON))
Key_Event (M_BUTTON3, 0, true);
Key_Event (QFM_BUTTON3, 0, true);
else if (!(mouse_buttonstate & MOUSE_MIDDLEBUTTON) &&
(mouse_oldbuttonstate & MOUSE_MIDDLEBUTTON))
Key_Event (M_BUTTON3, 0, false);
Key_Event (QFM_BUTTON3, 0, false);
mouse_oldbuttonstate = mouse_buttonstate;
}

View file

@ -60,8 +60,6 @@ HRESULT (WINAPI * pDirectInputCreate) (HINSTANCE hinst, DWORD dwVersion,
void VID_UpdateWindowStatus (int window_x, int window_y);
extern DEVMODE win_gdevmode;
extern qboolean win_canalttab;
// mouse public variables
unsigned int uiWheelMessage;
@ -126,11 +124,6 @@ static DIDATAFORMAT df = {
};
// forward-referenced functions, joy
extern void JOY_Command(void);
extern void JOY_Init_Cvars(void);
extern void JOY_Init (void);
extern void JOY_AdvancedUpdate_f (void);
extern void JOY_Move (void);
void

View file

@ -141,224 +141,224 @@ XLateKey (XKeyEvent * ev, int *k, int *u)
switch (keysym) {
case XK_KP_Page_Up:
key = K_KP9;
key = QFK_KP9;
break;
case XK_Page_Up:
key = K_PAGEUP;
key = QFK_PAGEUP;
break;
case XK_KP_Page_Down:
key = K_KP3;
key = QFK_KP3;
break;
case XK_Page_Down:
key = K_PAGEDOWN;
key = QFK_PAGEDOWN;
break;
case XK_KP_Home:
key = K_KP7;
key = QFK_KP7;
break;
case XK_Home:
key = K_HOME;
key = QFK_HOME;
break;
case XK_KP_End:
key = K_KP1;
key = QFK_KP1;
break;
case XK_End:
key = K_END;
key = QFK_END;
break;
case XK_KP_Left:
key = K_KP4;
key = QFK_KP4;
break;
case XK_Left:
key = K_LEFT;
key = QFK_LEFT;
break;
case XK_KP_Right:
key = K_KP6;
key = QFK_KP6;
break;
case XK_Right:
key = K_RIGHT;
key = QFK_RIGHT;
break;
case XK_KP_Down:
key = K_KP2;
key = QFK_KP2;
break;
case XK_Down:
key = K_DOWN;
key = QFK_DOWN;
break;
case XK_KP_Up:
key = K_KP8;
key = QFK_KP8;
break;
case XK_Up:
key = K_UP;
key = QFK_UP;
break;
case XK_Escape:
key = K_ESCAPE;
key = QFK_ESCAPE;
break;
case XK_KP_Enter:
key = K_KP_ENTER;
key = QFK_KP_ENTER;
break;
case XK_Return:
key = K_RETURN;
key = QFK_RETURN;
break;
case XK_Tab:
key = K_TAB;
key = QFK_TAB;
break;
case XK_F1:
key = K_F1;
key = QFK_F1;
break;
case XK_F2:
key = K_F2;
key = QFK_F2;
break;
case XK_F3:
key = K_F3;
key = QFK_F3;
break;
case XK_F4:
key = K_F4;
key = QFK_F4;
break;
case XK_F5:
key = K_F5;
key = QFK_F5;
break;
case XK_F6:
key = K_F6;
key = QFK_F6;
break;
case XK_F7:
key = K_F7;
key = QFK_F7;
break;
case XK_F8:
key = K_F8;
key = QFK_F8;
break;
case XK_F9:
key = K_F9;
key = QFK_F9;
break;
case XK_F10:
key = K_F10;
key = QFK_F10;
break;
case XK_F11:
key = K_F11;
key = QFK_F11;
break;
case XK_F12:
key = K_F12;
key = QFK_F12;
break;
case XK_BackSpace:
key = K_BACKSPACE;
key = QFK_BACKSPACE;
break;
case XK_KP_Delete:
key = K_KP_PERIOD;
key = QFK_KP_PERIOD;
break;
case XK_Delete:
key = K_DELETE;
key = QFK_DELETE;
break;
case XK_Pause:
key = K_PAUSE;
key = QFK_PAUSE;
break;
case XK_Shift_L:
key = K_LSHIFT;
key = QFK_LSHIFT;
break;
case XK_Shift_R:
key = K_RSHIFT;
key = QFK_RSHIFT;
break;
case XK_Execute:
case XK_Control_L:
key = K_LCTRL;
key = QFK_LCTRL;
break;
case XK_Control_R:
key = K_LCTRL;
key = QFK_LCTRL;
break;
case XK_Mode_switch:
case XK_Alt_L:
key = K_LALT;
key = QFK_LALT;
break;
case XK_Meta_L:
key = K_LMETA;
key = QFK_LMETA;
break;
case XK_Alt_R:
key = K_RALT;
key = QFK_RALT;
break;
case XK_Meta_R:
key = K_RMETA;
key = QFK_RMETA;
break;
case XK_Caps_Lock:
key = K_CAPSLOCK;
key = QFK_CAPSLOCK;
break;
case XK_KP_Begin:
key = K_KP5;
key = QFK_KP5;
break;
case XK_Scroll_Lock:
key = K_SCROLLOCK;
key = QFK_SCROLLOCK;
break;
case XK_Num_Lock:
key = K_NUMLOCK;
key = QFK_NUMLOCK;
break;
case XK_Insert:
key = K_INSERT;
key = QFK_INSERT;
break;
case XK_KP_Insert:
key = K_KP0;
key = QFK_KP0;
break;
case XK_KP_Multiply:
key = K_KP_MULTIPLY;
key = QFK_KP_MULTIPLY;
break;
case XK_KP_Add:
key = K_KP_PLUS;
key = QFK_KP_PLUS;
break;
case XK_KP_Subtract:
key = K_KP_MINUS;
key = QFK_KP_MINUS;
break;
case XK_KP_Divide:
key = K_KP_DIVIDE;
key = QFK_KP_DIVIDE;
break;
/* For Sun keyboards */
case XK_F27:
key = K_HOME;
key = QFK_HOME;
break;
case XK_F29:
key = K_PAGEUP;
key = QFK_PAGEUP;
break;
case XK_F33:
key = K_END;
key = QFK_END;
break;
case XK_F35:
key = K_PAGEDOWN;
key = QFK_PAGEDOWN;
break;
/* Some high ASCII symbols, for azerty keymaps */
case XK_twosuperior:
key = K_WORLD_18;
key = QFK_WORLD_18;
break;
case XK_eacute:
key = K_WORLD_63;
key = QFK_WORLD_63;
break;
case XK_section:
key = K_WORLD_7;
key = QFK_WORLD_7;
break;
case XK_egrave:
key = K_WORLD_72;
key = QFK_WORLD_72;
break;
case XK_ccedilla:
key = K_WORLD_71;
key = QFK_WORLD_71;
break;
case XK_agrave:
key = K_WORLD_64;
key = QFK_WORLD_64;
break;
default:
@ -405,13 +405,13 @@ event_button (XEvent * event)
case 1:
case 2:
case 3:
Key_Event (M_BUTTON1 + but - 1, 0, event->type == ButtonPress);
Key_Event (QFM_BUTTON1 + but - 1, 0, event->type == ButtonPress);
break;
case 4:
Key_Event (M_WHEEL_UP, 0, event->type == ButtonPress);
Key_Event (QFM_WHEEL_UP, 0, event->type == ButtonPress);
break;
case 5:
Key_Event (M_WHEEL_DOWN, 0, event->type == ButtonPress);
Key_Event (QFM_WHEEL_DOWN, 0, event->type == ButtonPress);
break;
}
}

View file

@ -49,8 +49,6 @@ cvar_t *joy_enable; // Joystick enabling flag
cvar_t *joy_amp; // Joystick amplification
cvar_t *joy_pre_amp; // Joystick pre-amplification
extern cvar_t *in_amp;
extern cvar_t *in_pre_amp;
qboolean joy_found = false;
qboolean joy_active = false;

View file

@ -63,11 +63,11 @@ JOY_Read (void)
if (joy_buttons[event.number].current >
joy_buttons[event.number].old) {
Key_Event (J_BUTTON1 + event.number, 0, true);
Key_Event (QFJ_BUTTON1 + event.number, 0, true);
} else {
if (joy_buttons[event.number].current <
joy_buttons[event.number].old) {
Key_Event (J_BUTTON1 + event.number, 0, false);
Key_Event (QFJ_BUTTON1 + event.number, 0, false);
}
}
joy_buttons[event.number].old = joy_buttons[event.number].current;

View file

@ -57,7 +57,6 @@ static const char rcsid[] =
cvar_t *cl_chatmode;
cvar_t *in_bind_imt;
#define MAXCMDLINE 256
char key_lines[32][MAXCMDLINE];
int key_linepos;
int key_lastpress;
@ -68,8 +67,8 @@ int history_line = 0;
keydest_t key_dest = key_console;
imt_t game_target = IMT_CONSOLE;
char *keybindings[IMT_LAST][K_LAST];
int keydown[K_LAST];
char *keybindings[IMT_LAST][QFK_LAST];
int keydown[QFK_LAST];
qboolean chat_team;
char chat_buffer[MAXCMDLINE];
@ -111,276 +110,276 @@ typedef struct {
} keyname_t;
keyname_t keynames[] = {
{ "K_UNKNOWN", K_UNKNOWN },
{ "K_FIRST", K_FIRST },
{ "K_BACKSPACE", K_BACKSPACE },
{ "K_TAB", K_TAB },
{ "K_CLEAR", K_CLEAR },
{ "K_RETURN", K_RETURN },
{ "K_PAUSE", K_PAUSE },
{ "K_ESCAPE", K_ESCAPE },
{ "K_SPACE", K_SPACE },
{ "K_EXCLAIM", K_EXCLAIM },
{ "K_QUOTEDBL", K_QUOTEDBL },
{ "K_HASH", K_HASH },
{ "K_DOLLAR", K_DOLLAR },
{ "K_AMPERSAND", K_AMPERSAND },
{ "K_QUOTE", K_QUOTE },
{ "K_LEFTPAREN", K_LEFTPAREN },
{ "K_RIGHTPAREN", K_RIGHTPAREN },
{ "K_ASTERISK", K_ASTERISK },
{ "K_PLUS", K_PLUS },
{ "K_COMMA", K_COMMA },
{ "K_MINUS", K_MINUS },
{ "K_PERIOD", K_PERIOD },
{ "K_SLASH", K_SLASH },
{ "K_0", K_0 },
{ "K_1", K_1 },
{ "K_2", K_2 },
{ "K_3", K_3 },
{ "K_4", K_4 },
{ "K_5", K_5 },
{ "K_6", K_6 },
{ "K_7", K_7 },
{ "K_8", K_8 },
{ "K_9", K_9 },
{ "K_COLON", K_COLON },
{ "K_SEMICOLON", K_SEMICOLON },
{ "K_LESS", K_LESS },
{ "K_EQUALS", K_EQUALS },
{ "K_GREATER", K_GREATER },
{ "K_QUESTION", K_QUESTION },
{ "K_AT", K_AT },
{ "K_LEFTBRACKET", K_LEFTBRACKET },
{ "K_BACKSLASH", K_BACKSLASH },
{ "K_RIGHTBRACKET", K_RIGHTBRACKET },
{ "K_CARET", K_CARET },
{ "K_UNDERSCORE", K_UNDERSCORE },
{ "K_BACKQUOTE", K_BACKQUOTE },
{ "K_a", K_a },
{ "K_b", K_b },
{ "K_c", K_c },
{ "K_d", K_d },
{ "K_e", K_e },
{ "K_f", K_f },
{ "K_g", K_g },
{ "K_h", K_h },
{ "K_i", K_i },
{ "K_j", K_j },
{ "K_k", K_k },
{ "K_l", K_l },
{ "K_m", K_m },
{ "K_n", K_n },
{ "K_o", K_o },
{ "K_p", K_p },
{ "K_q", K_q },
{ "K_r", K_r },
{ "K_s", K_s },
{ "K_t", K_t },
{ "K_u", K_u },
{ "K_v", K_v },
{ "K_w", K_w },
{ "K_x", K_x },
{ "K_y", K_y },
{ "K_z", K_z },
{ "K_DELETE", K_DELETE },
{ "K_WORLD_0", K_WORLD_0 },
{ "K_WORLD_1", K_WORLD_1 },
{ "K_WORLD_2", K_WORLD_2 },
{ "K_WORLD_3", K_WORLD_3 },
{ "K_WORLD_4", K_WORLD_4 },
{ "K_WORLD_5", K_WORLD_5 },
{ "K_WORLD_6", K_WORLD_6 },
{ "K_WORLD_7", K_WORLD_7 },
{ "K_WORLD_8", K_WORLD_8 },
{ "K_WORLD_9", K_WORLD_9 },
{ "K_WORLD_10", K_WORLD_10 },
{ "K_WORLD_11", K_WORLD_11 },
{ "K_WORLD_12", K_WORLD_12 },
{ "K_WORLD_13", K_WORLD_13 },
{ "K_WORLD_14", K_WORLD_14 },
{ "K_WORLD_15", K_WORLD_15 },
{ "K_WORLD_16", K_WORLD_16 },
{ "K_WORLD_17", K_WORLD_17 },
{ "K_WORLD_18", K_WORLD_18 },
{ "K_WORLD_19", K_WORLD_19 },
{ "K_WORLD_20", K_WORLD_20 },
{ "K_WORLD_21", K_WORLD_21 },
{ "K_WORLD_22", K_WORLD_22 },
{ "K_WORLD_23", K_WORLD_23 },
{ "K_WORLD_24", K_WORLD_24 },
{ "K_WORLD_25", K_WORLD_25 },
{ "K_WORLD_26", K_WORLD_26 },
{ "K_WORLD_27", K_WORLD_27 },
{ "K_WORLD_28", K_WORLD_28 },
{ "K_WORLD_29", K_WORLD_29 },
{ "K_WORLD_30", K_WORLD_30 },
{ "K_WORLD_31", K_WORLD_31 },
{ "K_WORLD_32", K_WORLD_32 },
{ "K_WORLD_33", K_WORLD_33 },
{ "K_WORLD_34", K_WORLD_34 },
{ "K_WORLD_35", K_WORLD_35 },
{ "K_WORLD_36", K_WORLD_36 },
{ "K_WORLD_37", K_WORLD_37 },
{ "K_WORLD_38", K_WORLD_38 },
{ "K_WORLD_39", K_WORLD_39 },
{ "K_WORLD_40", K_WORLD_40 },
{ "K_WORLD_41", K_WORLD_41 },
{ "K_WORLD_42", K_WORLD_42 },
{ "K_WORLD_43", K_WORLD_43 },
{ "K_WORLD_44", K_WORLD_44 },
{ "K_WORLD_45", K_WORLD_45 },
{ "K_WORLD_46", K_WORLD_46 },
{ "K_WORLD_47", K_WORLD_47 },
{ "K_WORLD_48", K_WORLD_48 },
{ "K_WORLD_49", K_WORLD_49 },
{ "K_WORLD_50", K_WORLD_50 },
{ "K_WORLD_51", K_WORLD_51 },
{ "K_WORLD_52", K_WORLD_52 },
{ "K_WORLD_53", K_WORLD_53 },
{ "K_WORLD_54", K_WORLD_54 },
{ "K_WORLD_55", K_WORLD_55 },
{ "K_WORLD_56", K_WORLD_56 },
{ "K_WORLD_57", K_WORLD_57 },
{ "K_WORLD_58", K_WORLD_58 },
{ "K_WORLD_59", K_WORLD_59 },
{ "K_WORLD_60", K_WORLD_60 },
{ "K_WORLD_61", K_WORLD_61 },
{ "K_WORLD_62", K_WORLD_62 },
{ "K_WORLD_63", K_WORLD_63 },
{ "K_WORLD_64", K_WORLD_64 },
{ "K_WORLD_65", K_WORLD_65 },
{ "K_WORLD_66", K_WORLD_66 },
{ "K_WORLD_67", K_WORLD_67 },
{ "K_WORLD_68", K_WORLD_68 },
{ "K_WORLD_69", K_WORLD_69 },
{ "K_WORLD_70", K_WORLD_70 },
{ "K_WORLD_71", K_WORLD_71 },
{ "K_WORLD_72", K_WORLD_72 },
{ "K_WORLD_73", K_WORLD_73 },
{ "K_WORLD_74", K_WORLD_74 },
{ "K_WORLD_75", K_WORLD_75 },
{ "K_WORLD_76", K_WORLD_76 },
{ "K_WORLD_77", K_WORLD_77 },
{ "K_WORLD_78", K_WORLD_78 },
{ "K_WORLD_79", K_WORLD_79 },
{ "K_WORLD_80", K_WORLD_80 },
{ "K_WORLD_81", K_WORLD_81 },
{ "K_WORLD_82", K_WORLD_82 },
{ "K_WORLD_83", K_WORLD_83 },
{ "K_WORLD_84", K_WORLD_84 },
{ "K_WORLD_85", K_WORLD_85 },
{ "K_WORLD_86", K_WORLD_86 },
{ "K_WORLD_87", K_WORLD_87 },
{ "K_WORLD_88", K_WORLD_88 },
{ "K_WORLD_89", K_WORLD_89 },
{ "K_WORLD_90", K_WORLD_90 },
{ "K_WORLD_91", K_WORLD_91 },
{ "K_WORLD_92", K_WORLD_92 },
{ "K_WORLD_93", K_WORLD_93 },
{ "K_WORLD_94", K_WORLD_94 },
{ "K_WORLD_95", K_WORLD_95 },
{ "K_KP0", K_KP0 },
{ "K_KP1", K_KP1 },
{ "K_KP2", K_KP2 },
{ "K_KP3", K_KP3 },
{ "K_KP4", K_KP4 },
{ "K_KP5", K_KP5 },
{ "K_KP6", K_KP6 },
{ "K_KP7", K_KP7 },
{ "K_KP8", K_KP8 },
{ "K_KP9", K_KP9 },
{ "K_KP_PERIOD", K_KP_PERIOD },
{ "K_KP_DIVIDE", K_KP_DIVIDE },
{ "K_KP_MULTIPLY", K_KP_MULTIPLY },
{ "K_KP_MINUS", K_KP_MINUS },
{ "K_KP_PLUS", K_KP_PLUS },
{ "K_KP_ENTER", K_KP_ENTER },
{ "K_KP_EQUALS", K_KP_EQUALS },
{ "K_UP", K_UP },
{ "K_DOWN", K_DOWN },
{ "K_RIGHT", K_RIGHT },
{ "K_LEFT", K_LEFT },
{ "K_INSERT", K_INSERT },
{ "K_HOME", K_HOME },
{ "K_END", K_END },
{ "K_PAGEUP", K_PAGEUP },
{ "K_PAGEDOWN", K_PAGEDOWN },
{ "K_F1", K_F1 },
{ "K_F2", K_F2 },
{ "K_F3", K_F3 },
{ "K_F4", K_F4 },
{ "K_F5", K_F5 },
{ "K_F6", K_F6 },
{ "K_F7", K_F7 },
{ "K_F8", K_F8 },
{ "K_F9", K_F9 },
{ "K_F10", K_F10 },
{ "K_F11", K_F11 },
{ "K_F12", K_F12 },
{ "K_F13", K_F13 },
{ "K_F14", K_F14 },
{ "K_F15", K_F15 },
{ "K_NUMLOCK", K_NUMLOCK },
{ "K_CAPSLOCK", K_CAPSLOCK },
{ "K_SCROLLOCK", K_SCROLLOCK },
{ "K_RSHIFT", K_RSHIFT },
{ "K_LSHIFT", K_LSHIFT },
{ "K_RCTRL", K_RCTRL },
{ "K_LCTRL", K_LCTRL },
{ "K_RALT", K_RALT },
{ "K_LALT", K_LALT },
{ "K_RMETA", K_RMETA },
{ "K_LMETA", K_LMETA },
{ "K_LSUPER", K_LSUPER },
{ "K_RSUPER", K_RSUPER },
{ "K_MODE", K_MODE },
{ "K_COMPOSE", K_COMPOSE },
{ "K_HELP", K_HELP },
{ "K_PRINT", K_PRINT },
{ "K_SYSREQ", K_SYSREQ },
{ "K_BREAK", K_BREAK },
{ "K_MENU", K_MENU },
{ "K_POWER", K_POWER },
{ "K_EURO", K_EURO },
{ "M_BUTTON1", M_BUTTON1 },
{ "M_BUTTON2", M_BUTTON2 },
{ "M_BUTTON3", M_BUTTON3 },
{ "M_WHEEL_UP", M_WHEEL_UP },
{ "M_WHEEL_DOWN", M_WHEEL_DOWN },
{ "K_UNKNOWN", QFK_UNKNOWN },
{ "K_FIRST", QFK_FIRST },
{ "K_BACKSPACE", QFK_BACKSPACE },
{ "K_TAB", QFK_TAB },
{ "K_CLEAR", QFK_CLEAR },
{ "K_RETURN", QFK_RETURN },
{ "K_PAUSE", QFK_PAUSE },
{ "K_ESCAPE", QFK_ESCAPE },
{ "K_SPACE", QFK_SPACE },
{ "K_EXCLAIM", QFK_EXCLAIM },
{ "K_QUOTEDBL", QFK_QUOTEDBL },
{ "K_HASH", QFK_HASH },
{ "K_DOLLAR", QFK_DOLLAR },
{ "K_AMPERSAND", QFK_AMPERSAND },
{ "K_QUOTE", QFK_QUOTE },
{ "K_LEFTPAREN", QFK_LEFTPAREN },
{ "K_RIGHTPAREN", QFK_RIGHTPAREN },
{ "K_ASTERISK", QFK_ASTERISK },
{ "K_PLUS", QFK_PLUS },
{ "K_COMMA", QFK_COMMA },
{ "K_MINUS", QFK_MINUS },
{ "K_PERIOD", QFK_PERIOD },
{ "K_SLASH", QFK_SLASH },
{ "K_0", QFK_0 },
{ "K_1", QFK_1 },
{ "K_2", QFK_2 },
{ "K_3", QFK_3 },
{ "K_4", QFK_4 },
{ "K_5", QFK_5 },
{ "K_6", QFK_6 },
{ "K_7", QFK_7 },
{ "K_8", QFK_8 },
{ "K_9", QFK_9 },
{ "K_COLON", QFK_COLON },
{ "K_SEMICOLON", QFK_SEMICOLON },
{ "K_LESS", QFK_LESS },
{ "K_EQUALS", QFK_EQUALS },
{ "K_GREATER", QFK_GREATER },
{ "K_QUESTION", QFK_QUESTION },
{ "K_AT", QFK_AT },
{ "K_LEFTBRACKET", QFK_LEFTBRACKET },
{ "K_BACKSLASH", QFK_BACKSLASH },
{ "K_RIGHTBRACKET", QFK_RIGHTBRACKET },
{ "K_CARET", QFK_CARET },
{ "K_UNDERSCORE", QFK_UNDERSCORE },
{ "K_BACKQUOTE", QFK_BACKQUOTE },
{ "K_a", QFK_a },
{ "K_b", QFK_b },
{ "K_c", QFK_c },
{ "K_d", QFK_d },
{ "K_e", QFK_e },
{ "K_f", QFK_f },
{ "K_g", QFK_g },
{ "K_h", QFK_h },
{ "K_i", QFK_i },
{ "K_j", QFK_j },
{ "K_k", QFK_k },
{ "K_l", QFK_l },
{ "K_m", QFK_m },
{ "K_n", QFK_n },
{ "K_o", QFK_o },
{ "K_p", QFK_p },
{ "K_q", QFK_q },
{ "K_r", QFK_r },
{ "K_s", QFK_s },
{ "K_t", QFK_t },
{ "K_u", QFK_u },
{ "K_v", QFK_v },
{ "K_w", QFK_w },
{ "K_x", QFK_x },
{ "K_y", QFK_y },
{ "K_z", QFK_z },
{ "K_DELETE", QFK_DELETE },
{ "K_WORLD_0", QFK_WORLD_0 },
{ "K_WORLD_1", QFK_WORLD_1 },
{ "K_WORLD_2", QFK_WORLD_2 },
{ "K_WORLD_3", QFK_WORLD_3 },
{ "K_WORLD_4", QFK_WORLD_4 },
{ "K_WORLD_5", QFK_WORLD_5 },
{ "K_WORLD_6", QFK_WORLD_6 },
{ "K_WORLD_7", QFK_WORLD_7 },
{ "K_WORLD_8", QFK_WORLD_8 },
{ "K_WORLD_9", QFK_WORLD_9 },
{ "K_WORLD_10", QFK_WORLD_10 },
{ "K_WORLD_11", QFK_WORLD_11 },
{ "K_WORLD_12", QFK_WORLD_12 },
{ "K_WORLD_13", QFK_WORLD_13 },
{ "K_WORLD_14", QFK_WORLD_14 },
{ "K_WORLD_15", QFK_WORLD_15 },
{ "K_WORLD_16", QFK_WORLD_16 },
{ "K_WORLD_17", QFK_WORLD_17 },
{ "K_WORLD_18", QFK_WORLD_18 },
{ "K_WORLD_19", QFK_WORLD_19 },
{ "K_WORLD_20", QFK_WORLD_20 },
{ "K_WORLD_21", QFK_WORLD_21 },
{ "K_WORLD_22", QFK_WORLD_22 },
{ "K_WORLD_23", QFK_WORLD_23 },
{ "K_WORLD_24", QFK_WORLD_24 },
{ "K_WORLD_25", QFK_WORLD_25 },
{ "K_WORLD_26", QFK_WORLD_26 },
{ "K_WORLD_27", QFK_WORLD_27 },
{ "K_WORLD_28", QFK_WORLD_28 },
{ "K_WORLD_29", QFK_WORLD_29 },
{ "K_WORLD_30", QFK_WORLD_30 },
{ "K_WORLD_31", QFK_WORLD_31 },
{ "K_WORLD_32", QFK_WORLD_32 },
{ "K_WORLD_33", QFK_WORLD_33 },
{ "K_WORLD_34", QFK_WORLD_34 },
{ "K_WORLD_35", QFK_WORLD_35 },
{ "K_WORLD_36", QFK_WORLD_36 },
{ "K_WORLD_37", QFK_WORLD_37 },
{ "K_WORLD_38", QFK_WORLD_38 },
{ "K_WORLD_39", QFK_WORLD_39 },
{ "K_WORLD_40", QFK_WORLD_40 },
{ "K_WORLD_41", QFK_WORLD_41 },
{ "K_WORLD_42", QFK_WORLD_42 },
{ "K_WORLD_43", QFK_WORLD_43 },
{ "K_WORLD_44", QFK_WORLD_44 },
{ "K_WORLD_45", QFK_WORLD_45 },
{ "K_WORLD_46", QFK_WORLD_46 },
{ "K_WORLD_47", QFK_WORLD_47 },
{ "K_WORLD_48", QFK_WORLD_48 },
{ "K_WORLD_49", QFK_WORLD_49 },
{ "K_WORLD_50", QFK_WORLD_50 },
{ "K_WORLD_51", QFK_WORLD_51 },
{ "K_WORLD_52", QFK_WORLD_52 },
{ "K_WORLD_53", QFK_WORLD_53 },
{ "K_WORLD_54", QFK_WORLD_54 },
{ "K_WORLD_55", QFK_WORLD_55 },
{ "K_WORLD_56", QFK_WORLD_56 },
{ "K_WORLD_57", QFK_WORLD_57 },
{ "K_WORLD_58", QFK_WORLD_58 },
{ "K_WORLD_59", QFK_WORLD_59 },
{ "K_WORLD_60", QFK_WORLD_60 },
{ "K_WORLD_61", QFK_WORLD_61 },
{ "K_WORLD_62", QFK_WORLD_62 },
{ "K_WORLD_63", QFK_WORLD_63 },
{ "K_WORLD_64", QFK_WORLD_64 },
{ "K_WORLD_65", QFK_WORLD_65 },
{ "K_WORLD_66", QFK_WORLD_66 },
{ "K_WORLD_67", QFK_WORLD_67 },
{ "K_WORLD_68", QFK_WORLD_68 },
{ "K_WORLD_69", QFK_WORLD_69 },
{ "K_WORLD_70", QFK_WORLD_70 },
{ "K_WORLD_71", QFK_WORLD_71 },
{ "K_WORLD_72", QFK_WORLD_72 },
{ "K_WORLD_73", QFK_WORLD_73 },
{ "K_WORLD_74", QFK_WORLD_74 },
{ "K_WORLD_75", QFK_WORLD_75 },
{ "K_WORLD_76", QFK_WORLD_76 },
{ "K_WORLD_77", QFK_WORLD_77 },
{ "K_WORLD_78", QFK_WORLD_78 },
{ "K_WORLD_79", QFK_WORLD_79 },
{ "K_WORLD_80", QFK_WORLD_80 },
{ "K_WORLD_81", QFK_WORLD_81 },
{ "K_WORLD_82", QFK_WORLD_82 },
{ "K_WORLD_83", QFK_WORLD_83 },
{ "K_WORLD_84", QFK_WORLD_84 },
{ "K_WORLD_85", QFK_WORLD_85 },
{ "K_WORLD_86", QFK_WORLD_86 },
{ "K_WORLD_87", QFK_WORLD_87 },
{ "K_WORLD_88", QFK_WORLD_88 },
{ "K_WORLD_89", QFK_WORLD_89 },
{ "K_WORLD_90", QFK_WORLD_90 },
{ "K_WORLD_91", QFK_WORLD_91 },
{ "K_WORLD_92", QFK_WORLD_92 },
{ "K_WORLD_93", QFK_WORLD_93 },
{ "K_WORLD_94", QFK_WORLD_94 },
{ "K_WORLD_95", QFK_WORLD_95 },
{ "K_KP0", QFK_KP0 },
{ "K_KP1", QFK_KP1 },
{ "K_KP2", QFK_KP2 },
{ "K_KP3", QFK_KP3 },
{ "K_KP4", QFK_KP4 },
{ "K_KP5", QFK_KP5 },
{ "K_KP6", QFK_KP6 },
{ "K_KP7", QFK_KP7 },
{ "K_KP8", QFK_KP8 },
{ "K_KP9", QFK_KP9 },
{ "K_KP_PERIOD", QFK_KP_PERIOD },
{ "K_KP_DIVIDE", QFK_KP_DIVIDE },
{ "K_KP_MULTIPLY", QFK_KP_MULTIPLY },
{ "K_KP_MINUS", QFK_KP_MINUS },
{ "K_KP_PLUS", QFK_KP_PLUS },
{ "K_KP_ENTER", QFK_KP_ENTER },
{ "K_KP_EQUALS", QFK_KP_EQUALS },
{ "K_UP", QFK_UP },
{ "K_DOWN", QFK_DOWN },
{ "K_RIGHT", QFK_RIGHT },
{ "K_LEFT", QFK_LEFT },
{ "K_INSERT", QFK_INSERT },
{ "K_HOME", QFK_HOME },
{ "K_END", QFK_END },
{ "K_PAGEUP", QFK_PAGEUP },
{ "K_PAGEDOWN", QFK_PAGEDOWN },
{ "K_F1", QFK_F1 },
{ "K_F2", QFK_F2 },
{ "K_F3", QFK_F3 },
{ "K_F4", QFK_F4 },
{ "K_F5", QFK_F5 },
{ "K_F6", QFK_F6 },
{ "K_F7", QFK_F7 },
{ "K_F8", QFK_F8 },
{ "K_F9", QFK_F9 },
{ "K_F10", QFK_F10 },
{ "K_F11", QFK_F11 },
{ "K_F12", QFK_F12 },
{ "K_F13", QFK_F13 },
{ "K_F14", QFK_F14 },
{ "K_F15", QFK_F15 },
{ "K_NUMLOCK", QFK_NUMLOCK },
{ "K_CAPSLOCK", QFK_CAPSLOCK },
{ "K_SCROLLOCK", QFK_SCROLLOCK },
{ "K_RSHIFT", QFK_RSHIFT },
{ "K_LSHIFT", QFK_LSHIFT },
{ "K_RCTRL", QFK_RCTRL },
{ "K_LCTRL", QFK_LCTRL },
{ "K_RALT", QFK_RALT },
{ "K_LALT", QFK_LALT },
{ "K_RMETA", QFK_RMETA },
{ "K_LMETA", QFK_LMETA },
{ "K_LSUPER", QFK_LSUPER },
{ "K_RSUPER", QFK_RSUPER },
{ "K_MODE", QFK_MODE },
{ "K_COMPOSE", QFK_COMPOSE },
{ "K_HELP", QFK_HELP },
{ "K_PRINT", QFK_PRINT },
{ "K_SYSREQ", QFK_SYSREQ },
{ "K_BREAK", QFK_BREAK },
{ "K_MENU", QFK_MENU },
{ "K_POWER", QFK_POWER },
{ "K_EURO", QFK_EURO },
{ "M_BUTTON1", QFM_BUTTON1 },
{ "M_BUTTON2", QFM_BUTTON2 },
{ "M_BUTTON3", QFM_BUTTON3 },
{ "M_WHEEL_UP", QFM_WHEEL_UP },
{ "M_WHEEL_DOWN", QFM_WHEEL_DOWN },
{ "J_BUTTON1", J_BUTTON1 },
{ "J_BUTTON2", J_BUTTON2 },
{ "J_BUTTON3", J_BUTTON3 },
{ "J_BUTTON4", J_BUTTON4 },
{ "J_BUTTON5", J_BUTTON5 },
{ "J_BUTTON6", J_BUTTON6 },
{ "J_BUTTON7", J_BUTTON7 },
{ "J_BUTTON8", J_BUTTON8 },
{ "J_BUTTON9", J_BUTTON9 },
{ "J_BUTTON10", J_BUTTON10 },
{ "J_BUTTON11", J_BUTTON11 },
{ "J_BUTTON12", J_BUTTON12 },
{ "J_BUTTON13", J_BUTTON13 },
{ "J_BUTTON14", J_BUTTON14 },
{ "J_BUTTON15", J_BUTTON15 },
{ "J_BUTTON16", J_BUTTON16 },
{ "J_BUTTON17", J_BUTTON17 },
{ "J_BUTTON18", J_BUTTON18 },
{ "J_BUTTON19", J_BUTTON19 },
{ "J_BUTTON20", J_BUTTON20 },
{ "J_BUTTON21", J_BUTTON21 },
{ "J_BUTTON22", J_BUTTON22 },
{ "J_BUTTON23", J_BUTTON23 },
{ "J_BUTTON24", J_BUTTON24 },
{ "J_BUTTON25", J_BUTTON25 },
{ "J_BUTTON26", J_BUTTON26 },
{ "J_BUTTON27", J_BUTTON27 },
{ "J_BUTTON28", J_BUTTON28 },
{ "J_BUTTON29", J_BUTTON29 },
{ "J_BUTTON30", J_BUTTON30 },
{ "J_BUTTON31", J_BUTTON31 },
{ "J_BUTTON32", J_BUTTON32 },
{ "J_BUTTON1", QFJ_BUTTON1 },
{ "J_BUTTON2", QFJ_BUTTON2 },
{ "J_BUTTON3", QFJ_BUTTON3 },
{ "J_BUTTON4", QFJ_BUTTON4 },
{ "J_BUTTON5", QFJ_BUTTON5 },
{ "J_BUTTON6", QFJ_BUTTON6 },
{ "J_BUTTON7", QFJ_BUTTON7 },
{ "J_BUTTON8", QFJ_BUTTON8 },
{ "J_BUTTON9", QFJ_BUTTON9 },
{ "J_BUTTON10", QFJ_BUTTON10 },
{ "J_BUTTON11", QFJ_BUTTON11 },
{ "J_BUTTON12", QFJ_BUTTON12 },
{ "J_BUTTON13", QFJ_BUTTON13 },
{ "J_BUTTON14", QFJ_BUTTON14 },
{ "J_BUTTON15", QFJ_BUTTON15 },
{ "J_BUTTON16", QFJ_BUTTON16 },
{ "J_BUTTON17", QFJ_BUTTON17 },
{ "J_BUTTON18", QFJ_BUTTON18 },
{ "J_BUTTON19", QFJ_BUTTON19 },
{ "J_BUTTON20", QFJ_BUTTON20 },
{ "J_BUTTON21", QFJ_BUTTON21 },
{ "J_BUTTON22", QFJ_BUTTON22 },
{ "J_BUTTON23", QFJ_BUTTON23 },
{ "J_BUTTON24", QFJ_BUTTON24 },
{ "J_BUTTON25", QFJ_BUTTON25 },
{ "J_BUTTON26", QFJ_BUTTON26 },
{ "J_BUTTON27", QFJ_BUTTON27 },
{ "J_BUTTON28", QFJ_BUTTON28 },
{ "J_BUTTON29", QFJ_BUTTON29 },
{ "J_BUTTON30", QFJ_BUTTON30 },
{ "J_BUTTON31", QFJ_BUTTON31 },
{ "J_BUTTON32", QFJ_BUTTON32 },
{NULL, 0}
};
@ -469,7 +468,7 @@ Key_Console (knum_t key, short unicode)
if (Key_Game (key, unicode))
return;
if (unicode == '\x0D' || key == K_RETURN) {
if (unicode == '\x0D' || key == QFK_RETURN) {
// backslash text are commands, else
if (!strncmp(key_lines[edit_line], "//", 2))
goto no_lf;
@ -510,7 +509,7 @@ no_lf:
return;
}
if (key == K_DELETE) {
if (key == QFK_DELETE) {
if (key_linepos < strlen (key_lines[edit_line])) {
memmove(key_lines[edit_line] + key_linepos,
key_lines[edit_line] + key_linepos + 1,
@ -519,17 +518,17 @@ no_lf:
return;
}
if (key == K_RIGHT) {
if (key == QFK_RIGHT) {
if (key_linepos < strlen (key_lines[edit_line]))
key_linepos++;
return;
}
if (key == K_LEFT) {
if (key == QFK_LEFT) {
if (key_linepos > 1)
key_linepos--;
return;
}
if (key == K_UP) {
if (key == QFK_UP) {
do {
history_line = (history_line - 1) & 31;
} while (history_line != edit_line && !key_lines[history_line][1]);
@ -539,7 +538,7 @@ no_lf:
key_linepos = strlen (key_lines[edit_line]);
return;
}
if (key == K_DOWN) {
if (key == QFK_DOWN) {
if (history_line == edit_line)
return;
do {
@ -556,22 +555,22 @@ no_lf:
return;
}
if (key == K_PAGEUP || key == M_WHEEL_UP) {
if (key == QFK_PAGEUP || key == QFM_WHEEL_UP) {
con->display -= 2;
return;
}
if (key == K_PAGEDOWN || key == M_WHEEL_DOWN) {
if (key == QFK_PAGEDOWN || key == QFM_WHEEL_DOWN) {
con->display += 2;
if (con->display > con->current)
con->display = con->current;
return;
}
if (key == K_HOME) {
if (key == QFK_HOME) {
key_linepos = 1;
return;
}
if (key == K_END) {
if (key == QFK_END) {
key_linepos = strlen (key_lines[edit_line]);
return;
}
@ -596,7 +595,7 @@ Key_Message (knum_t key, short unicode)
if (keydown[key] != 1)
return;
if (unicode == '\x0D' || key == K_RETURN) {
if (unicode == '\x0D' || key == QFK_RETURN) {
if (chat_team)
Cbuf_AddText ("say_team \"");
else
@ -611,7 +610,7 @@ Key_Message (knum_t key, short unicode)
return;
}
if (unicode == '\x1b' || key == K_ESCAPE) {
if (unicode == '\x1b' || key == QFK_ESCAPE) {
key_dest = key_game;
game_target = IMT_0;
chat_bufferlen = 0;
@ -643,7 +642,7 @@ Key_Message (knum_t key, short unicode)
Key_StringToIMTnum
Returns an imt number to be used to index imtbindings[] by looking at
the given string. Single ascii characters return themselves, while
the K_* names are matched up.
the QFK_* names are matched up.
*/
int
Key_StringToIMTnum (const char *str)
@ -663,7 +662,7 @@ Key_StringToIMTnum (const char *str)
/*
Key_IMTnumToString
Returns a string (a K_* name) for the given imtnum.
Returns a string (a QFK_* name) for the given imtnum.
FIXME: handle quote special (general escape sequence?)
*/
char *
@ -686,7 +685,7 @@ Key_IMTnumToString (const int imtnum)
Returns a key number to be used to index keybindings[] by looking at
the given string. Single ascii characters return themselves, while
the K_* names are matched up.
the QFK_* names are matched up.
*/
int
Key_StringToKeynum (const char *str)
@ -706,7 +705,7 @@ Key_StringToKeynum (const char *str)
/*
Key_KeynumToString
Returns a string (a K_* name) for the given keynum.
Returns a string (a QFK_* name) for the given keynum.
FIXME: handle quote special (general escape sequence?)
*/
const char *
@ -760,7 +759,7 @@ Key_Unbindall_f (void)
int i, j;
for (j = 0; j < IMT_LAST; j++)
for (i = 0; i < K_LAST; i++)
for (i = 0; i < QFK_LAST; i++)
Key_SetBinding (j, i, NULL);
}
@ -914,7 +913,7 @@ Key_WriteBindings (VFile *f)
const char *bind;
for (j = 0; j < IMT_LAST; j++)
for (i = 0; i < K_LAST; i++)
for (i = 0; i < QFK_LAST; i++)
if ((bind = Key_GetBinding(j, i)))
Qprintf (f, "in_bind %s %s \"%s\"\n", Key_IMTnumToString (j),
Key_KeynumToString (i), bind);
@ -939,7 +938,7 @@ Key_Event (knum_t key, short unicode, qboolean down)
key_lastpress = key;
// handle escape specially, so the user can never unbind it
if (unicode == '\x1b' || key == K_ESCAPE) {
if (unicode == '\x1b' || key == QFK_ESCAPE) {
if (!down || (keydown[key] > 1))
return;
switch (key_dest) {
@ -980,7 +979,7 @@ Key_ClearStates (void)
{
int i;
for (i = 0; i < K_LAST; i++) {
for (i = 0; i < QFK_LAST; i++) {
if (keydown[i])
Key_Event (i, 0, false);
keydown[i] = false;

View file

@ -43,7 +43,6 @@ static const char rcsid[] =
#include "compat.h"
#include "view.h"
extern viddef_t vid; // global video state
/* Software and hardware gamma support */
byte gammatable[256];

View file

@ -83,15 +83,11 @@ void (* qf_fxMesaMakeCurrent) (fxMesaContext ctx);
// FIXME!!!!! This belongs in include/qfgl_ext.h -- deek
typedef void (GLAPIENTRY * QF_3DfxSetDitherModeEXT) (GrDitherMode_t mode);
extern cvar_t *vid_system_gamma;
static fxMesaContext fc = NULL;
int VID_options_items = 0;
extern void GL_Pre_Init (void);
extern void GL_Init_Common (void);
extern void VID_Init8bitPalette (void);
void

View file

@ -87,8 +87,6 @@ cvar_t *gl_screenshot_byte_swap;
cvar_t *vid_mode;
cvar_t *vid_use8bit;
extern byte gammatable[256];
extern qboolean GLF_Init ();
static void

View file

@ -39,9 +39,7 @@ static const char rcsid[] =
#include "compat.h"
extern viddef_t vid; // global video state
extern int scr_width, scr_height;
unsigned short d_8to16table[256];
unsigned int d_8to24table[256];

View file

@ -67,7 +67,6 @@ static vmode_t vesa_modes[MAX_VESA_MODES] =
static vesa_extra_t vesa_extra[MAX_VESA_MODES];
static char names[MAX_VESA_MODES][10];
extern regs_t regs;
static int VID_currentpage;
static int VID_displayedpage;

View file

@ -75,14 +75,15 @@ static const char rcsid[] =
#include "fbset.h"
extern void ReadModeDB(void);
extern struct VideoMode *FindVideoMode(const char *name);
void ConvertFromVideoMode(const struct VideoMode *vmode,
struct fb_var_screeninfo *var);
void ConvertToVideoMode(const struct fb_var_screeninfo *var,
struct VideoMode *vmode);
struct VideoMode *FindVideoMode(const char *name);
extern struct VideoMode *VideoModes;
int fbset_main (int argc, const char *argv[]);
void ReadModeDB (void);
static struct VideoMode current_mode;
static char current_name[32];
static int num_modes;
@ -205,7 +206,6 @@ VID_NumModes_f (void)
int VID_SetMode (const char *name, unsigned char *palette);
extern void fbset_main (int argc, const char **argv);
static void
VID_fbset_f (void)

View file

@ -86,16 +86,9 @@ XVisualInfo* (* qfglXChooseVisual) (Display *dpy, int screen, int *attribList);
GLXContext (* qfglXCreateContext) (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
Bool (* qfglXMakeCurrent) (Display *dpy, GLXDrawable drawable, GLXContext ctx);
extern void GL_Pre_Init (void);
extern void GL_Init_Common (void);
extern void VID_Init8bitPalette (void);
/*-----------------------------------------------------------------------*/
extern const char *gl_vendor;
extern const char *gl_renderer;
extern const char *gl_version;
extern const char *gl_extensions;
void

View file

@ -56,8 +56,6 @@ static const char rcsid[] =
#define MAX_MODE_LIST 30
#define VID_ROW_SIZE 3
extern void (*vid_menudrawfn) (void);
extern void (*vid_menukeyfn) (int);
/* Unused */
int VGA_width, VGA_height, VGA_rowbytes, VGA_bufferrowbytes,
@ -66,7 +64,6 @@ byte *VGA_pagebase;
qboolean dibonly;
extern qboolean Minimized;
HWND mainwindow;
@ -93,7 +90,6 @@ static qboolean palette_changed, syscolchg, vid_mode_set, hide_window,
pal_is_nostatic;
static HICON hIcon;
extern viddef_t vid; // global video state
#define MODE_WINDOWED 0
#define MODE_SETTABLE_WINDOW 2
@ -115,7 +111,6 @@ cvar_t *block_switch;
cvar_t *vid_window_x;
cvar_t *vid_window_y;
extern cvar_t *in_grab;
typedef struct {
int width;
@ -2752,12 +2747,6 @@ MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return lRet;
}
extern void M_Menu_Options_f (void);
extern void M_Print (int cx, int cy, char *str);
extern void M_PrintWhite (int cx, int cy, char *str);
extern void M_DrawCharacter (int cx, int line, int num);
extern void M_DrawTransPic (int x, int y, qpic_t *pic);
extern void M_DrawPic (int x, int y, qpic_t *pic);
static int vid_line, vid_wmodes;

View file

@ -58,8 +58,6 @@ HWND mainwindow;
// static float oldin_grab = 0;
extern cvar_t *vid_system_gamma;
extern viddef_t vid; // global video state
int modestate; // FIXME: just to avoid cross-compile errors - remove later

View file

@ -60,7 +60,6 @@ HWND mainwindow;
// static float oldin_grab = 0;
cvar_t *vid_bitdepth;
extern viddef_t vid; // global video state
int modestate; // FIXME: just to avoid cross-compile errors - remove later
@ -74,7 +73,6 @@ byte *VGA_pagebase;
static SDL_Surface *screen = NULL;
static SDL_Surface *rendersurface = NULL;
extern void VID_MakeColormaps (int fullbrights, byte *pal);
void

View file

@ -64,14 +64,10 @@ HWND mainwindow;
#define WARP_WIDTH 320
#define WARP_HEIGHT 200
extern cvar_t *vid_system_gamma;
int VID_options_items = 1;
int modestate;
extern void GL_Pre_Init (void);
extern void GL_Init_Common (void);
extern void VID_Init8bitPalette (void);
void

View file

@ -65,7 +65,6 @@ static const char rcsid[] =
void VGA_UpdatePlanarScreen (void *srcbuffer);
extern cvar_t *vid_system_gamma;
static int num_modes, current_mode;
static vga_modeinfo *modes;

View file

@ -39,7 +39,6 @@ static const char rcsid[] =
#include "vid_dos.h"
#include <dpmi.h>
extern regs_t regs;
int VGA_width, VGA_height, VGA_rowbytes, VGA_bufferrowbytes;
byte *VGA_pagebase;

View file

@ -55,13 +55,7 @@ static const char rcsid[] =
#include "resource.h"
#include "sbar.h"
extern void GL_Pre_Init (void);
extern void GL_Init_Common (void);
extern void VID_Init8bitPalette (void);
extern void GL_Common_Init_Cvars (void);
extern void (*vid_menudrawfn) (void);
extern void (*vid_menukeyfn) (int);
HGLRC (GLAPIENTRY *qf_wglCreateContext) (HDC);
BOOL (GLAPIENTRY *qf_wglDeleteContext) (HGLRC);
@ -106,10 +100,6 @@ lmode_t lowresmodes[] = {
{512, 384},
};
extern const char *gl_vendor;
extern const char *gl_renderer;
extern const char *gl_version;
extern const char *gl_extensions;
// FIXME: Only used by MGL ..
qboolean DDActive;
@ -144,9 +134,7 @@ HDC maindc;
HWND WINAPI InitializeWindow (HINSTANCE hInstance, int nCmdShow);
LONG CDAudio_MessageHandler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern viddef_t vid; // global video state
extern float gldepthmin, gldepthmax;
modestate_t modestate = MS_UNINIT;
@ -159,7 +147,6 @@ void GL_Init (void);
//====================================
extern cvar_t *in_grab;
int window_center_x, window_center_y, window_x, window_y, window_width,
window_height;

View file

@ -35,7 +35,6 @@ static const char rcsid[] =
#include "QF/vid.h"
extern HWND mainwindow;
void
VID_RaiseWindow (void)

View file

@ -79,7 +79,6 @@ static const char rcsid[] =
#include "context_x11.h"
#include "dga_check.h"
extern viddef_t vid; // global video state
static Colormap x_cmap;
static GC x_gc;
@ -108,8 +107,6 @@ static int shiftmask_fl = 0;
static long r_shift, g_shift, b_shift;
static unsigned long r_mask, g_mask, b_mask;
extern cvar_t *vid_width;
extern cvar_t *vid_height;
static void

View file

@ -32,6 +32,7 @@
#include <stdio.h>
#include "QF/info.h"
#include "QF/input.h"
#include "QF/mathlib.h"
#include "QF/model.h"
#include "QF/sound.h"
@ -257,6 +258,14 @@ extern struct cvar_s *m_forward;
extern struct cvar_s *m_side;
extern struct cvar_s *cl_name;
extern struct cvar_s *cl_writecfg;
extern struct cvar_s *cl_cshift_bonus;
extern struct cvar_s *cl_cshift_contents;
extern struct cvar_s *cl_cshift_damage;
extern struct cvar_s *cl_cshift_powerup;
extern struct cvar_s *noskins;
#define MAX_TEMP_ENTITIES 64 // lightning bolts, etc
#define MAX_STATIC_ENTITIES 128 // torches, etc
@ -267,6 +276,8 @@ extern client_state_t cl;
extern entity_t cl_entities[MAX_EDICTS];
extern entity_t cl_static_entities[MAX_STATIC_ENTITIES];
extern int fps_count;
/*
cl_main
@ -334,7 +345,7 @@ void V_UpdatePalette (void);
void V_Register (void);
void V_ParseDamage (void);
void V_SetContentsColor (int contents);
void V_PrepBlend (void);
/*
cl_tent
@ -346,6 +357,10 @@ void CL_Init_Entity (struct entity_s *ent);
void CL_ParseTEnt (void);
void CL_SignonReply (void);
extern kbutton_t in_left, in_right, in_forward, in_back;
extern kbutton_t in_lookup, in_lookdown, in_moveleft, in_moveright;
extern kbutton_t in_use, in_jump, in_attack;
extern kbutton_t in_up, in_down;
extern double realtime;

View file

@ -50,6 +50,8 @@ extern struct cvar_s *developer;
extern struct cvar_s *pausable;
extern int viewentity;
extern qboolean host_initialized; // true if into command execution
extern double host_frametime;
extern int host_framecount; // incremented every frame, never reset
@ -60,6 +62,8 @@ void Host_ClearMemory (void);
void Host_ServerFrame (void);
void Host_InitCommands (void);
void Host_Init (quakeparms_t *parms);
void Host_Skin_Init (void);
void Host_Skin_Init_Cvars (void);
void Host_Shutdown(void);
void Host_Error (const char *error, ...) __attribute__((format(printf,1,2)));
void Host_EndGame (const char *message, ...) __attribute__((format(printf,1,2)));

Some files were not shown because too many files have changed in this diff Show more