From 78a3e398d5050b11637054a9a5da2794ed3e5bd2 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 28 Oct 2001 04:23:37 +0000 Subject: [PATCH] * taniwha gets medieval on extern --- include/QF/GL/qf_rmain.h | 6 + include/QF/GL/qf_rsurf.h | 2 + include/QF/GL/qf_sky.h | 2 + include/QF/GL/qf_textures.h | 10 + include/QF/console.h | 1 + include/QF/draw.h | 4 + include/QF/input.h | 6 + include/QF/keys.h | 549 +++++++++++------------ include/QF/model.h | 17 + include/QF/plugin/snd_render.h | 2 +- include/QF/progs.h | 2 + include/QF/screen.h | 3 + include/QF/skin.h | 2 + include/QF/sound.h | 6 +- include/QF/vid.h | 9 + include/d_iface.h | 3 + include/r_dynamic.h | 13 + include/r_shared.h | 3 + include/view.h | 2 + libs/audio/cd/cd_win.c | 1 - libs/audio/renderer/snd_dma.c | 13 +- libs/audio/renderer/snd_null.c | 9 - libs/audio/snd.c | 11 +- libs/console/client.c | 4 - libs/console/complete.c | 1 - libs/console/inputline.c | 20 +- libs/console/server.c | 25 +- libs/gamecode/engine/pr_exec.c | 2 - libs/models/alias/gl_mesh.c | 1 - libs/models/alias/gl_model_alias.c | 13 +- libs/models/alias/model_alias.c | 16 +- libs/models/alias/sw32_model_alias.c | 13 +- libs/models/alias/sw_model_alias.c | 13 +- libs/models/brush/gl_model_brush.c | 3 - libs/models/brush/model_brush.c | 5 +- libs/models/brush/sw32_model_brush.c | 3 - libs/models/brush/sw_model_brush.c | 3 - libs/models/model.c | 1 - libs/models/sprite/gl_model_sprite.c | 2 - libs/models/sprite/model_sprite.c | 2 - libs/models/sprite/sw32_model_sprite.c | 2 - libs/models/sprite/sw_model_sprite.c | 2 - libs/util/fnmatch.c | 1 - libs/video/renderer/gl/gl_draw.c | 11 +- libs/video/renderer/gl/gl_dyn_fires.c | 2 +- libs/video/renderer/gl/gl_dyn_part.c | 4 +- libs/video/renderer/gl/gl_graph.c | 4 - libs/video/renderer/gl/gl_mod_alias.c | 5 - libs/video/renderer/gl/gl_rmisc.c | 5 +- libs/video/renderer/gl/gl_screen.c | 6 - libs/video/renderer/gl/gl_sky.c | 2 - libs/video/renderer/gl/gl_sky_clip.c | 2 - libs/video/renderer/gl/gl_textures.c | 4 - libs/video/renderer/gl/gl_warp.c | 2 - libs/video/renderer/r_cvar.c | 5 +- libs/video/renderer/r_graph.c | 1 - libs/video/renderer/r_part.c | 4 - libs/video/renderer/sw/d_edge.c | 1 - libs/video/renderer/sw/d_init.c | 1 - libs/video/renderer/sw/screen.c | 5 - libs/video/renderer/sw/sw_ralias.c | 2 - libs/video/renderer/sw/sw_redge.c | 1 - libs/video/renderer/sw/sw_rpart.c | 2 - libs/video/renderer/sw32/d_edge.c | 1 - libs/video/renderer/sw32/d_init.c | 1 - libs/video/renderer/sw32/d_scan.c | 1 - libs/video/renderer/sw32/d_sprite.c | 1 - libs/video/renderer/sw32/screen.c | 5 - libs/video/renderer/sw32/sw32_ralias.c | 2 - libs/video/renderer/sw32/sw32_redge.c | 1 - libs/video/renderer/sw32/sw32_rmain.c | 1 - libs/video/renderer/sw32/sw32_rpart.c | 2 - libs/video/targets/context_x11.c | 1 - libs/video/targets/fbset.c | 7 +- libs/video/targets/in_fbdev.c | 10 +- libs/video/targets/in_sdl.c | 477 ++++++++++---------- libs/video/targets/in_svgalib.c | 136 +++--- libs/video/targets/in_win.c | 7 - libs/video/targets/in_x11.c | 134 +++--- libs/video/targets/joy.c | 2 - libs/video/targets/joy_linux.c | 4 +- libs/video/targets/keys.c | 583 ++++++++++++------------- libs/video/targets/vid.c | 1 - libs/video/targets/vid_3dfxsvga.c | 4 - libs/video/targets/vid_common_gl.c | 2 - libs/video/targets/vid_common_sw32.c | 2 - libs/video/targets/vid_ext.c | 1 - libs/video/targets/vid_fbdev.c | 8 +- libs/video/targets/vid_glx.c | 7 - libs/video/targets/vid_mgl.c | 11 - libs/video/targets/vid_sdl.c | 2 - libs/video/targets/vid_sdl32.c | 2 - libs/video/targets/vid_sgl.c | 4 - libs/video/targets/vid_svgalib.c | 1 - libs/video/targets/vid_vga.c | 1 - libs/video/targets/vid_wgl.c | 13 - libs/video/targets/vid_win.c | 1 - libs/video/targets/vid_x11.c | 3 - nq/include/client.h | 17 +- nq/include/host.h | 4 + nq/include/net.h | 3 + nq/include/server.h | 1 + nq/source/cl_cam.c | 5 - nq/source/cl_input.c | 3 +- nq/source/cl_parse.c | 6 +- nq/source/cl_screen.c | 1 - nq/source/cl_view.c | 6 - nq/source/console.c | 3 - nq/source/host.c | 11 +- nq/source/host_skin.c | 1 - nq/source/mplpc.c | 1 - nq/source/net_bw.c | 1 - nq/source/net_main.c | 1 - nq/source/net_udp.c | 1 - nq/source/net_vcr.c | 4 +- nq/source/net_wipx.c | 2 - nq/source/skin.c | 1 - nq/source/sv_ded.c | 3 +- nq/source/sv_main.c | 1 - nq/source/sv_user.c | 5 +- qw/include/cl_cam.h | 1 + qw/include/cl_input.h | 7 + qw/include/cl_main.h | 9 + qw/include/cl_parse.h | 7 + qw/include/client.h | 4 + qw/include/net.h | 2 + qw/include/pmove.h | 3 + qw/include/server.h | 19 + qw/source/cl_cam.c | 6 +- qw/source/cl_demo.c | 1 - qw/source/cl_ents.c | 5 - qw/source/cl_input.c | 2 - qw/source/cl_main.c | 6 +- qw/source/cl_parse.c | 11 +- qw/source/cl_pred.c | 1 - qw/source/cl_screen.c | 1 - qw/source/cl_skin.c | 1 - qw/source/cl_view.c | 8 +- qw/source/console.c | 3 - qw/source/game.c | 1 - qw/source/net_chan.c | 1 - qw/source/net_packetlog.c | 1 - qw/source/net_udp.c | 2 - qw/source/pmovetst.c | 2 - qw/source/skin.c | 2 +- qw/source/sv_ccmds.c | 1 - qw/source/sv_ents.c | 1 - qw/source/sv_main.c | 3 - qw/source/sv_send.c | 3 - qw/source/sv_user.c | 6 - qw/source/teamplay.c | 1 - 151 files changed, 1190 insertions(+), 1328 deletions(-) diff --git a/include/QF/GL/qf_rmain.h b/include/QF/GL/qf_rmain.h index 5ecc52827..40190ed75 100644 --- a/include/QF/GL/qf_rmain.h +++ b/include/QF/GL/qf_rmain.h @@ -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 diff --git a/include/QF/GL/qf_rsurf.h b/include/QF/GL/qf_rsurf.h index e823076de..bf5aaee30 100644 --- a/include/QF/GL/qf_rsurf.h +++ b/include/QF/GL/qf_rsurf.h @@ -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 diff --git a/include/QF/GL/qf_sky.h b/include/QF/GL/qf_sky.h index ea0103df0..88952ba55 100644 --- a/include/QF/GL/qf_sky.h +++ b/include/QF/GL/qf_sky.h @@ -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); diff --git a/include/QF/GL/qf_textures.h b/include/QF/GL/qf_textures.h index 8cdee298b..a071896bf 100644 --- a/include/QF/GL/qf_textures.h +++ b/include/QF/GL/qf_textures.h @@ -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 diff --git a/include/QF/console.h b/include/QF/console.h index 0142eb06e..7ed18b511 100644 --- a/include/QF/console.h +++ b/include/QF/console.h @@ -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; diff --git a/include/QF/draw.h b/include/QF/draw.h index db61f48a7..1498784f7 100644 --- a/include/QF/draw.h +++ b/include/QF/draw.h @@ -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 diff --git a/include/QF/input.h b/include/QF/input.h index 39b437793..59b5a88a9 100644 --- a/include/QF/input.h +++ b/include/QF/input.h @@ -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_ diff --git a/include/QF/keys.h b/include/QF/keys.h index ebbff0d94..9fc96dc6b 100644 --- a/include/QF/keys.h +++ b/include/QF/keys.h @@ -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 diff --git a/include/QF/model.h b/include/QF/model.h index 4290b45bb..4b42c3022 100644 --- a/include/QF/model.h +++ b/include/QF/model.h @@ -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 diff --git a/include/QF/plugin/snd_render.h b/include/QF/plugin/snd_render.h index 98f0006df..fa03667c2 100644 --- a/include/QF/plugin/snd_render.h +++ b/include/QF/plugin/snd_render.h @@ -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; diff --git a/include/QF/progs.h b/include/QF/progs.h index 670945923..07a30b9d0 100644 --- a/include/QF/progs.h +++ b/include/QF/progs.h @@ -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 diff --git a/include/QF/screen.h b/include/QF/screen.h index 85eba8eec..b8857b1fb 100644 --- a/include/QF/screen.h +++ b/include/QF/screen.h @@ -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 diff --git a/include/QF/skin.h b/include/QF/skin.h index 564693b69..0f4756c5b 100644 --- a/include/QF/skin.h +++ b/include/QF/skin.h @@ -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 diff --git a/include/QF/sound.h b/include/QF/sound.h index 99fa2bfd0..fd2ccb0b1 100644 --- a/include/QF/sound.h +++ b/include/QF/sound.h @@ -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 diff --git a/include/QF/vid.h b/include/QF/vid.h index 5e1599aed..b1edc6102 100644 --- a/include/QF/vid.h +++ b/include/QF/vid.h @@ -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_ diff --git a/include/d_iface.h b/include/d_iface.h index 2191d82de..3817dce40 100644 --- a/include/d_iface.h +++ b/include/d_iface.h @@ -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; diff --git a/include/r_dynamic.h b/include/r_dynamic.h index ce8bd24f3..e291f1a42 100644 --- a/include/r_dynamic.h +++ b/include/r_dynamic.h @@ -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 diff --git a/include/r_shared.h b/include/r_shared.h index 291376f82..10173d6ef 100644 --- a/include/r_shared.h +++ b/include/r_shared.h @@ -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 diff --git a/include/view.h b/include/view.h index 5e03a5ea5..8d81bccdb 100644 --- a/include/view.h +++ b/include/view.h @@ -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_ diff --git a/libs/audio/cd/cd_win.c b/libs/audio/cd/cd_win.c index a8c5e7404..5b0f1648f 100644 --- a/libs/audio/cd/cd_win.c +++ b/libs/audio/cd/cd_win.c @@ -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; diff --git a/libs/audio/renderer/snd_dma.c b/libs/audio/renderer/snd_dma.c index 76ed13422..46aabc5e5 100644 --- a/libs/audio/renderer/snd_dma.c +++ b/libs/audio/renderer/snd_dma.c @@ -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++) diff --git a/libs/audio/renderer/snd_null.c b/libs/audio/renderer/snd_null.c index 8a2c42e2e..0d17d8dc2 100644 --- a/libs/audio/renderer/snd_null.c +++ b/libs/audio/renderer/snd_null.c @@ -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 diff --git a/libs/audio/snd.c b/libs/audio/snd.c index c5f55c8cd..ad8ee9444 100644 --- a/libs/audio/snd.c +++ b/libs/audio/snd.c @@ -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; diff --git a/libs/console/client.c b/libs/console/client.c index ba87b108a..d046335ff 100644 --- a/libs/console/client.c +++ b/libs/console/client.c @@ -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; diff --git a/libs/console/complete.c b/libs/console/complete.c index 580ec0f07..cecffe1e2 100644 --- a/libs/console/complete.c +++ b/libs/console/complete.c @@ -44,7 +44,6 @@ static const char rcsid[] = #include "QF/cvar.h" //FIXME eww -extern int con_linewidth; /* diff --git a/libs/console/inputline.c b/libs/console/inputline.c index ccefe24fc..8cc09e276 100644 --- a/libs/console/inputline.c +++ b/libs/console/inputline.c @@ -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: diff --git a/libs/console/server.c b/libs/console/server.c index 27bf82b70..ab270fd56 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -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) diff --git a/libs/gamecode/engine/pr_exec.c b/libs/gamecode/engine/pr_exec.c index 8151850e0..2a1954382 100644 --- a/libs/gamecode/engine/pr_exec.c +++ b/libs/gamecode/engine/pr_exec.c @@ -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 diff --git a/libs/models/alias/gl_mesh.c b/libs/models/alias/gl_mesh.c index e90434769..f32c5db12 100644 --- a/libs/models/alias/gl_mesh.c +++ b/libs/models/alias/gl_mesh.c @@ -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; diff --git a/libs/models/alias/gl_model_alias.c b/libs/models/alias/gl_model_alias.c index adbc47197..c7cfd77a9 100644 --- a/libs/models/alias/gl_model_alias.c +++ b/libs/models/alias/gl_model_alias.c @@ -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; diff --git a/libs/models/alias/model_alias.c b/libs/models/alias/model_alias.c index 21e626c1c..0b7fa87ff 100644 --- a/libs/models/alias/model_alias.c +++ b/libs/models/alias/model_alias.c @@ -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]); } } diff --git a/libs/models/alias/sw32_model_alias.c b/libs/models/alias/sw32_model_alias.c index 5aceb3a79..ddad74937 100644 --- a/libs/models/alias/sw32_model_alias.c +++ b/libs/models/alias/sw32_model_alias.c @@ -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])); } diff --git a/libs/models/alias/sw_model_alias.c b/libs/models/alias/sw_model_alias.c index 9f3048026..8990e0365 100644 --- a/libs/models/alias/sw_model_alias.c +++ b/libs/models/alias/sw_model_alias.c @@ -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])); } diff --git a/libs/models/brush/gl_model_brush.c b/libs/models/brush/gl_model_brush.c index 7dbea778a..917594b00 100644 --- a/libs/models/brush/gl_model_brush.c +++ b/libs/models/brush/gl_model_brush.c @@ -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; diff --git a/libs/models/brush/model_brush.c b/libs/models/brush/model_brush.c index c4bcdca0a..f65cd51e0 100644 --- a/libs/models/brush/model_brush.c +++ b/libs/models/brush/model_brush.c @@ -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]; diff --git a/libs/models/brush/sw32_model_brush.c b/libs/models/brush/sw32_model_brush.c index 09b673df6..f16060991 100644 --- a/libs/models/brush/sw32_model_brush.c +++ b/libs/models/brush/sw32_model_brush.c @@ -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; diff --git a/libs/models/brush/sw_model_brush.c b/libs/models/brush/sw_model_brush.c index 6b09f6054..0613c6b3a 100644 --- a/libs/models/brush/sw_model_brush.c +++ b/libs/models/brush/sw_model_brush.c @@ -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; diff --git a/libs/models/model.c b/libs/models/model.c index e5e370caf..e60509e75 100644 --- a/libs/models/model.c +++ b/libs/models/model.c @@ -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; diff --git a/libs/models/sprite/gl_model_sprite.c b/libs/models/sprite/gl_model_sprite.c index 9cca8689d..a5629906b 100644 --- a/libs/models/sprite/gl_model_sprite.c +++ b/libs/models/sprite/gl_model_sprite.c @@ -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) diff --git a/libs/models/sprite/model_sprite.c b/libs/models/sprite/model_sprite.c index 2f801ec41..1e045b592 100644 --- a/libs/models/sprite/model_sprite.c +++ b/libs/models/sprite/model_sprite.c @@ -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); diff --git a/libs/models/sprite/sw32_model_sprite.c b/libs/models/sprite/sw32_model_sprite.c index 91d61b4c6..cc05ab011 100644 --- a/libs/models/sprite/sw32_model_sprite.c +++ b/libs/models/sprite/sw32_model_sprite.c @@ -46,8 +46,6 @@ static const char rcsid[] = #include "d_iface.h" -extern model_t *loadmodel; -extern char loadname[]; void * diff --git a/libs/models/sprite/sw_model_sprite.c b/libs/models/sprite/sw_model_sprite.c index c69b102a4..53bd0ab5a 100644 --- a/libs/models/sprite/sw_model_sprite.c +++ b/libs/models/sprite/sw_model_sprite.c @@ -46,8 +46,6 @@ static const char rcsid[] = #include "d_iface.h" -extern model_t *loadmodel; -extern char loadname[]; void * diff --git a/libs/util/fnmatch.c b/libs/util/fnmatch.c index 9ba07ab9e..1e81ac57b 100644 --- a/libs/util/fnmatch.c +++ b/libs/util/fnmatch.c @@ -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 diff --git a/libs/video/renderer/gl/gl_draw.c b/libs/video/renderer/gl/gl_draw.c index 215fdf04f..f176a2bed 100644 --- a/libs/video/renderer/gl/gl_draw.c +++ b/libs/video/renderer/gl/gl_draw.c @@ -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) diff --git a/libs/video/renderer/gl/gl_dyn_fires.c b/libs/video/renderer/gl/gl_dyn_fires.c index 3946f3a3b..b259c2c29 100644 --- a/libs/video/renderer/gl/gl_dyn_fires.c +++ b/libs/video/renderer/gl/gl_dyn_fires.c @@ -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 diff --git a/libs/video/renderer/gl/gl_dyn_part.c b/libs/video/renderer/gl/gl_dyn_part.c index cfbcff9ef..d04694278 100644 --- a/libs/video/renderer/gl/gl_dyn_part.c +++ b/libs/video/renderer/gl/gl_dyn_part.c @@ -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 * diff --git a/libs/video/renderer/gl/gl_graph.c b/libs/video/renderer/gl/gl_graph.c index a7ca19b30..358aad4c6 100644 --- a/libs/video/renderer/gl/gl_graph.c +++ b/libs/video/renderer/gl/gl_graph.c @@ -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 diff --git a/libs/video/renderer/gl/gl_mod_alias.c b/libs/video/renderer/gl/gl_mod_alias.c index 4e2f4858d..60756726a 100644 --- a/libs/video/renderer/gl/gl_mod_alias.c +++ b/libs/video/renderer/gl/gl_mod_alias.c @@ -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" diff --git a/libs/video/renderer/gl/gl_rmisc.c b/libs/video/renderer/gl/gl_rmisc.c index 66b0b2baf..91779c20d 100644 --- a/libs/video/renderer/gl/gl_rmisc.c +++ b/libs/video/renderer/gl/gl_rmisc.c @@ -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); /* diff --git a/libs/video/renderer/gl/gl_screen.c b/libs/video/renderer/gl/gl_screen.c index 00c71bc5d..4e5beb1b6 100644 --- a/libs/video/renderer/gl/gl_screen.c +++ b/libs/video/renderer/gl/gl_screen.c @@ -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) diff --git a/libs/video/renderer/gl/gl_sky.c b/libs/video/renderer/gl/gl_sky.c index e730fdff9..8221570e6 100644 --- a/libs/video/renderer/gl/gl_sky.c +++ b/libs/video/renderer/gl/gl_sky.c @@ -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 diff --git a/libs/video/renderer/gl/gl_sky_clip.c b/libs/video/renderer/gl/gl_sky_clip.c index 4860faa4c..8ce7f705c 100644 --- a/libs/video/renderer/gl/gl_sky_clip.c +++ b/libs/video/renderer/gl/gl_sky_clip.c @@ -105,8 +105,6 @@ struct box_def { struct face_def face[6]; }; -extern qboolean skyloaded; -extern vec5_t skyvec[6][4]; /* diff --git a/libs/video/renderer/gl/gl_textures.c b/libs/video/renderer/gl/gl_textures.c index cae8b488c..abec5805d 100644 --- a/libs/video/renderer/gl/gl_textures.c +++ b/libs/video/renderer/gl/gl_textures.c @@ -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) diff --git a/libs/video/renderer/gl/gl_warp.c b/libs/video/renderer/gl/gl_warp.c index 30fc7e35a..d771b0c12 100644 --- a/libs/video/renderer/gl/gl_warp.c +++ b/libs/video/renderer/gl/gl_warp.c @@ -42,8 +42,6 @@ static const char rcsid[] = msurface_t *warpface; -extern cvar_t *gl_subdivide_size; -extern model_t *loadmodel; void diff --git a/libs/video/renderer/r_cvar.c b/libs/video/renderer/r_cvar.c index 691576b10..bed51f047 100644 --- a/libs/video/renderer/r_cvar.c +++ b/libs/video/renderer/r_cvar.c @@ -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 diff --git a/libs/video/renderer/r_graph.c b/libs/video/renderer/r_graph.c index 4d996e8ef..c4b8133da 100644 --- a/libs/video/renderer/r_graph.c +++ b/libs/video/renderer/r_graph.c @@ -40,7 +40,6 @@ static const char rcsid[] = #define MAX_TIMINGS 100 -extern float mouse_x, mouse_y; int graphval; diff --git a/libs/video/renderer/r_part.c b/libs/video/renderer/r_part.c index a6772e486..e4ad0dc89 100644 --- a/libs/video/renderer/r_part.c +++ b/libs/video/renderer/r_part.c @@ -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) diff --git a/libs/video/renderer/sw/d_edge.c b/libs/video/renderer/sw/d_edge.c index 6a082a203..50392fb7b 100644 --- a/libs/video/renderer/sw/d_edge.c +++ b/libs/video/renderer/sw/d_edge.c @@ -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; diff --git a/libs/video/renderer/sw/d_init.c b/libs/video/renderer/sw/d_init.c index 9949706f6..b9d5a4450 100644 --- a/libs/video/renderer/sw/d_init.c +++ b/libs/video/renderer/sw/d_init.c @@ -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); diff --git a/libs/video/renderer/sw/screen.c b/libs/video/renderer/sw/screen.c index 88db5d3da..9da59c5b6 100644 --- a/libs/video/renderer/sw/screen.c +++ b/libs/video/renderer/sw/screen.c @@ -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) diff --git a/libs/video/renderer/sw/sw_ralias.c b/libs/video/renderer/sw/sw_ralias.c index 2a9ce18b7..9770cb6d9 100644 --- a/libs/video/renderer/sw/sw_ralias.c +++ b/libs/video/renderer/sw/sw_ralias.c @@ -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" }; diff --git a/libs/video/renderer/sw/sw_redge.c b/libs/video/renderer/sw/sw_redge.c index c1e5225b8..d9af5989d 100644 --- a/libs/video/renderer/sw/sw_redge.c +++ b/libs/video/renderer/sw/sw_redge.c @@ -65,7 +65,6 @@ espan_t *span_p, *max_span_p; int r_currentkey; -extern int screenwidth; int current_iv; diff --git a/libs/video/renderer/sw/sw_rpart.c b/libs/video/renderer/sw/sw_rpart.c index 52feecd42..133d0e7d5 100644 --- a/libs/video/renderer/sw/sw_rpart.c +++ b/libs/video/renderer/sw/sw_rpart.c @@ -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 diff --git a/libs/video/renderer/sw32/d_edge.c b/libs/video/renderer/sw32/d_edge.c index c6d76e6be..c91d32146 100644 --- a/libs/video/renderer/sw32/d_edge.c +++ b/libs/video/renderer/sw32/d_edge.c @@ -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; diff --git a/libs/video/renderer/sw32/d_init.c b/libs/video/renderer/sw32/d_init.c index 77a45d9e5..deff60b22 100644 --- a/libs/video/renderer/sw32/d_init.c +++ b/libs/video/renderer/sw32/d_init.c @@ -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]; diff --git a/libs/video/renderer/sw32/d_scan.c b/libs/video/renderer/sw32/d_scan.c index 98911e5e2..d3b372d1c 100644 --- a/libs/video/renderer/sw32/d_scan.c +++ b/libs/video/renderer/sw32/d_scan.c @@ -47,7 +47,6 @@ int r_turb_spancount; void D_DrawTurbulentSpan (void); -extern float d_zitable[65536]; /* diff --git a/libs/video/renderer/sw32/d_sprite.c b/libs/video/renderer/sw32/d_sprite.c index 44e6fc266..d4d473d22 100644 --- a/libs/video/renderer/sw32/d_sprite.c +++ b/libs/video/renderer/sw32/d_sprite.c @@ -41,7 +41,6 @@ static int sprite_height; static int minindex, maxindex; static sspan_t *sprite_spans; -extern float d_zitable[65536]; void diff --git a/libs/video/renderer/sw32/screen.c b/libs/video/renderer/sw32/screen.c index cb828e58c..ab083abb4 100644 --- a/libs/video/renderer/sw32/screen.c +++ b/libs/video/renderer/sw32/screen.c @@ -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) diff --git a/libs/video/renderer/sw32/sw32_ralias.c b/libs/video/renderer/sw32/sw32_ralias.c index a293852e0..0a20023df 100644 --- a/libs/video/renderer/sw32/sw32_ralias.c +++ b/libs/video/renderer/sw32/sw32_ralias.c @@ -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" }; diff --git a/libs/video/renderer/sw32/sw32_redge.c b/libs/video/renderer/sw32/sw32_redge.c index d25571078..e9ce3dff0 100644 --- a/libs/video/renderer/sw32/sw32_redge.c +++ b/libs/video/renderer/sw32/sw32_redge.c @@ -65,7 +65,6 @@ espan_t *span_p, *max_span_p; int r_currentkey; -extern int screenwidth; int current_iv; diff --git a/libs/video/renderer/sw32/sw32_rmain.c b/libs/video/renderer/sw32/sw32_rmain.c index c52ef7ab9..422cb2769 100644 --- a/libs/video/renderer/sw32/sw32_rmain.c +++ b/libs/video/renderer/sw32/sw32_rmain.c @@ -141,7 +141,6 @@ void SetVisibilityByPassages (void); cvar_t *r_draworder; -extern cvar_t *scr_fov; void R_LoadSky_f (void); diff --git a/libs/video/renderer/sw32/sw32_rpart.c b/libs/video/renderer/sw32/sw32_rpart.c index 4530d07d6..5c293f0ce 100644 --- a/libs/video/renderer/sw32/sw32_rpart.c +++ b/libs/video/renderer/sw32/sw32_rpart.c @@ -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 diff --git a/libs/video/targets/context_x11.c b/libs/video/targets/context_x11.c index 9a52beeda..3b4fd0478 100644 --- a/libs/video/targets/context_x11.c +++ b/libs/video/targets/context_x11.c @@ -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; diff --git a/libs/video/targets/fbset.c b/libs/video/targets/fbset.c index e5726c0d6..c0f8e826d 100644 --- a/libs/video/targets/fbset.c +++ b/libs/video/targets/fbset.c @@ -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 */ diff --git a/libs/video/targets/in_fbdev.c b/libs/video/targets/in_fbdev.c index 9f39fd6e6..cf36c396b 100644 --- a/libs/video/targets/in_fbdev.c +++ b/libs/video/targets/in_fbdev.c @@ -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; diff --git a/libs/video/targets/in_sdl.c b/libs/video/targets/in_sdl.c index 5a4fc4556..0a400015d 100644 --- a/libs/video/targets/in_sdl.c +++ b/libs/video/targets/in_sdl.c @@ -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; diff --git a/libs/video/targets/in_svgalib.c b/libs/video/targets/in_svgalib.c index 37c4ed343..73ee3e534 100644 --- a/libs/video/targets/in_svgalib.c +++ b/libs/video/targets/in_svgalib.c @@ -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; } diff --git a/libs/video/targets/in_win.c b/libs/video/targets/in_win.c index 82659597e..abd35bd6b 100644 --- a/libs/video/targets/in_win.c +++ b/libs/video/targets/in_win.c @@ -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 diff --git a/libs/video/targets/in_x11.c b/libs/video/targets/in_x11.c index 0a3e964ac..8b8c63c0e 100644 --- a/libs/video/targets/in_x11.c +++ b/libs/video/targets/in_x11.c @@ -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; } } diff --git a/libs/video/targets/joy.c b/libs/video/targets/joy.c index ccf1b6381..27fec2409 100644 --- a/libs/video/targets/joy.c +++ b/libs/video/targets/joy.c @@ -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; diff --git a/libs/video/targets/joy_linux.c b/libs/video/targets/joy_linux.c index 2ce90c329..6ad31370e 100644 --- a/libs/video/targets/joy_linux.c +++ b/libs/video/targets/joy_linux.c @@ -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; diff --git a/libs/video/targets/keys.c b/libs/video/targets/keys.c index 289086ba7..54bf93444 100644 --- a/libs/video/targets/keys.c +++ b/libs/video/targets/keys.c @@ -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; diff --git a/libs/video/targets/vid.c b/libs/video/targets/vid.c index ad7eeacc8..0559a6836 100644 --- a/libs/video/targets/vid.c +++ b/libs/video/targets/vid.c @@ -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]; diff --git a/libs/video/targets/vid_3dfxsvga.c b/libs/video/targets/vid_3dfxsvga.c index 53d081434..86f3a521e 100644 --- a/libs/video/targets/vid_3dfxsvga.c +++ b/libs/video/targets/vid_3dfxsvga.c @@ -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 diff --git a/libs/video/targets/vid_common_gl.c b/libs/video/targets/vid_common_gl.c index 7c7595e4d..5ad807071 100644 --- a/libs/video/targets/vid_common_gl.c +++ b/libs/video/targets/vid_common_gl.c @@ -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 diff --git a/libs/video/targets/vid_common_sw32.c b/libs/video/targets/vid_common_sw32.c index 55f14e27f..d6f5cf9a5 100644 --- a/libs/video/targets/vid_common_sw32.c +++ b/libs/video/targets/vid_common_sw32.c @@ -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]; diff --git a/libs/video/targets/vid_ext.c b/libs/video/targets/vid_ext.c index 869473ae2..715f9bbd5 100644 --- a/libs/video/targets/vid_ext.c +++ b/libs/video/targets/vid_ext.c @@ -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; diff --git a/libs/video/targets/vid_fbdev.c b/libs/video/targets/vid_fbdev.c index 583918a6c..c247bf944 100644 --- a/libs/video/targets/vid_fbdev.c +++ b/libs/video/targets/vid_fbdev.c @@ -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) diff --git a/libs/video/targets/vid_glx.c b/libs/video/targets/vid_glx.c index ecb65e849..dacb1aa0b 100644 --- a/libs/video/targets/vid_glx.c +++ b/libs/video/targets/vid_glx.c @@ -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 diff --git a/libs/video/targets/vid_mgl.c b/libs/video/targets/vid_mgl.c index 7c0b06e36..3fbe059d9 100644 --- a/libs/video/targets/vid_mgl.c +++ b/libs/video/targets/vid_mgl.c @@ -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; diff --git a/libs/video/targets/vid_sdl.c b/libs/video/targets/vid_sdl.c index cba777963..afd43f4e1 100644 --- a/libs/video/targets/vid_sdl.c +++ b/libs/video/targets/vid_sdl.c @@ -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 diff --git a/libs/video/targets/vid_sdl32.c b/libs/video/targets/vid_sdl32.c index 43b6437b9..ed9571bc7 100644 --- a/libs/video/targets/vid_sdl32.c +++ b/libs/video/targets/vid_sdl32.c @@ -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 diff --git a/libs/video/targets/vid_sgl.c b/libs/video/targets/vid_sgl.c index 7e4d7a0bb..22b2cad4f 100644 --- a/libs/video/targets/vid_sgl.c +++ b/libs/video/targets/vid_sgl.c @@ -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 diff --git a/libs/video/targets/vid_svgalib.c b/libs/video/targets/vid_svgalib.c index 73c095065..7b748306b 100644 --- a/libs/video/targets/vid_svgalib.c +++ b/libs/video/targets/vid_svgalib.c @@ -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; diff --git a/libs/video/targets/vid_vga.c b/libs/video/targets/vid_vga.c index e6ddb20b4..128bcf023 100644 --- a/libs/video/targets/vid_vga.c +++ b/libs/video/targets/vid_vga.c @@ -39,7 +39,6 @@ static const char rcsid[] = #include "vid_dos.h" #include -extern regs_t regs; int VGA_width, VGA_height, VGA_rowbytes, VGA_bufferrowbytes; byte *VGA_pagebase; diff --git a/libs/video/targets/vid_wgl.c b/libs/video/targets/vid_wgl.c index de032907e..c2d90c3c5 100644 --- a/libs/video/targets/vid_wgl.c +++ b/libs/video/targets/vid_wgl.c @@ -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; diff --git a/libs/video/targets/vid_win.c b/libs/video/targets/vid_win.c index 557268d38..0d9f8bba2 100644 --- a/libs/video/targets/vid_win.c +++ b/libs/video/targets/vid_win.c @@ -35,7 +35,6 @@ static const char rcsid[] = #include "QF/vid.h" -extern HWND mainwindow; void VID_RaiseWindow (void) diff --git a/libs/video/targets/vid_x11.c b/libs/video/targets/vid_x11.c index 6a04a3fba..ab4e41c30 100644 --- a/libs/video/targets/vid_x11.c +++ b/libs/video/targets/vid_x11.c @@ -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 diff --git a/nq/include/client.h b/nq/include/client.h index b7743ad6f..1525c24c8 100644 --- a/nq/include/client.h +++ b/nq/include/client.h @@ -32,6 +32,7 @@ #include #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; diff --git a/nq/include/host.h b/nq/include/host.h index f7032e0bd..e55b9ce86 100644 --- a/nq/include/host.h +++ b/nq/include/host.h @@ -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))); diff --git a/nq/include/net.h b/nq/include/net.h index 670557780..80427d2ff 100644 --- a/nq/include/net.h +++ b/nq/include/net.h @@ -31,6 +31,7 @@ #include "QF/gcc_attr.h" #include "QF/sizebuf.h" +#include "QF/vfile.h" struct qsockaddr { @@ -358,4 +359,6 @@ extern struct cvar_s *config_modem_init; extern struct cvar_s *config_modem_hangup; extern struct cvar_s *hostname; +extern VFile *vcrFile; + #endif // __net_h diff --git a/nq/include/server.h b/nq/include/server.h index 88102d1f7..e260a7ded 100644 --- a/nq/include/server.h +++ b/nq/include/server.h @@ -222,6 +222,7 @@ extern client_t *host_client; extern jmp_buf host_abortserver; extern double host_time; +extern float scr_centertime_off; extern edict_t *sv_player; diff --git a/nq/source/cl_cam.c b/nq/source/cl_cam.c index a62935f08..fc1655228 100644 --- a/nq/source/cl_cam.c +++ b/nq/source/cl_cam.c @@ -47,11 +47,6 @@ vec3_t camera_angles = {0,0,0}; vec3_t player_origin = {0,0,0}; vec3_t player_angles = {0,0,0}; -extern kbutton_t in_mlook, in_klook; -extern kbutton_t in_left, in_right, in_forward, in_back; -extern kbutton_t in_lookup, in_lookdown; -extern kbutton_t in_moveleft, in_moveright; -extern kbutton_t in_strafe, in_speed; qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1, vec3_t p2, trace_t *trace); diff --git a/nq/source/cl_input.c b/nq/source/cl_input.c index 775d69211..28925e3a9 100644 --- a/nq/source/cl_input.c +++ b/nq/source/cl_input.c @@ -44,6 +44,7 @@ static const char rcsid[] = #include "QF/keys.h" #include "QF/msg.h" +#include "chase.h" #include "client.h" #include "compat.h" #include "host.h" @@ -65,7 +66,6 @@ static const char rcsid[] = state bit 2 is edge triggered on the down to up transition */ -extern kbutton_t in_strafe, in_mlook, in_klook, in_speed; kbutton_t in_left, in_right, in_forward, in_back; kbutton_t in_lookup, in_lookdown, in_moveleft, in_moveright; @@ -460,7 +460,6 @@ CL_AdjustAngles (void) } -extern cvar_t *chase_active; /* CL_BaseMove diff --git a/nq/source/cl_parse.c b/nq/source/cl_parse.c index 64481cd4e..f5a283241 100644 --- a/nq/source/cl_parse.c +++ b/nq/source/cl_parse.c @@ -215,8 +215,6 @@ CL_KeepaliveMessage (void) SZ_Clear (&cls.message); } -struct model_s **snd_worldmodel = &cl.worldmodel; - void CL_ParseServerInfo (void) { @@ -646,7 +644,7 @@ CL_ParseStaticSound (void) #define SHOWNET(x) if(cl_shownet->int_val==2)Con_Printf ("%3i:%s\n", net_message->readcount-1, x); -int snd_viewentity; +int viewentity; void CL_ParseServerMessage (void) @@ -742,7 +740,7 @@ CL_ParseServerMessage (void) case svc_setview: cl.viewentity = MSG_ReadShort (net_message); - snd_viewentity = cl.viewentity; // FIXME: evil hack + viewentity = cl.viewentity; // FIXME: evil hack break; case svc_lightstyle: diff --git a/nq/source/cl_screen.c b/nq/source/cl_screen.c index 90d544f47..4ef945b1c 100644 --- a/nq/source/cl_screen.c +++ b/nq/source/cl_screen.c @@ -49,7 +49,6 @@ static const char rcsid[] = #include "client.h" #include "sbar.h" -extern void V_PrepBlend (void); void diff --git a/nq/source/cl_view.c b/nq/source/cl_view.c index d3ed43d3a..86981df3c 100644 --- a/nq/source/cl_view.c +++ b/nq/source/cl_view.c @@ -52,10 +52,6 @@ static const char rcsid[] = especially when crossing a water boudnary. */ -extern cvar_t *cl_cshift_bonus; -extern cvar_t *cl_cshift_contents; -extern cvar_t *cl_cshift_damage; -extern cvar_t *cl_cshift_powerup; cvar_t *scr_ofsx; cvar_t *scr_ofsy; @@ -87,8 +83,6 @@ cvar_t *v_kickpitch; float v_dmg_time, v_dmg_roll, v_dmg_pitch; float v_blend[4]; -extern cvar_t *vid_gamma; -extern int in_forward, in_forward2, in_back; cshift_t cshift_empty = { {130, 80, 50}, 0}; cshift_t cshift_water = { {130, 80, 50}, 128}; diff --git a/nq/source/console.c b/nq/source/console.c index 8d821b9b5..a838b3cee 100644 --- a/nq/source/console.c +++ b/nq/source/console.c @@ -76,9 +76,6 @@ qboolean con_debuglog; #define MAXCMDLINE 256 -extern char key_lines[32][MAXCMDLINE]; -extern int edit_line; -extern int key_linepos; qboolean con_initialized; diff --git a/nq/source/host.c b/nq/source/host.c index 1a6a245b7..c9b9940e2 100644 --- a/nq/source/host.c +++ b/nq/source/host.c @@ -50,16 +50,12 @@ static const char rcsid[] = #include "chase.h" #include "compat.h" #include "host.h" -#include "r_local.h" +#include "r_dynamic.h" #include "sbar.h" #include "server.h" #include "sv_progs.h" #include "view.h" -extern void R_Particles_Init_Cvars (void); -extern void R_Init_Cvars (void); -extern void Host_Skin_Init (void); -extern void Host_Skin_Init_Cvars (void); /* A server can always be started, even if the system started out as a client @@ -117,8 +113,6 @@ cvar_t *temp1; cvar_t *cl_demospeed; -extern cvar_t *cl_writecfg; -extern int fps_count; void @@ -767,7 +761,6 @@ Host_Frame (float time) Con_Printf ("serverprofile: %2i clients %2i msec\n", c, m); } -extern VFile *vcrFile; #define VCR_SIGNATURE 0x56435231 // "VCR1" @@ -979,7 +972,7 @@ Host_Init (quakeparms_t *parms) SCR_Init (); R_Init (); - S_Init (); + S_Init (&cl.worldmodel, &viewentity, &host_frametime); CDAudio_Init (); Sbar_Init (); diff --git a/nq/source/host_skin.c b/nq/source/host_skin.c index aefed210b..922892e1f 100644 --- a/nq/source/host_skin.c +++ b/nq/source/host_skin.c @@ -57,7 +57,6 @@ cvar_t *topcolor; cvar_t *bottomcolor; cvar_t *cl_color; -extern char allskins[128]; void diff --git a/nq/source/mplpc.c b/nq/source/mplpc.c index c1ad7c9d8..fd4694df8 100644 --- a/nq/source/mplpc.c +++ b/nq/source/mplpc.c @@ -246,7 +246,6 @@ int MGenSanityCheck (void); #include #include -extern short flat_selector; #define SOCKET_MAP_QUEUE 41 diff --git a/nq/source/net_bw.c b/nq/source/net_bw.c index fce56f12d..a2eed5e94 100644 --- a/nq/source/net_bw.c +++ b/nq/source/net_bw.c @@ -245,7 +245,6 @@ static BW_ethdevinfo_t ethdevinfo; static int netmask; static struct in_addr bcastaddr; -extern regs_t regs; static int net_acceptsocket = -1; // socket for fielding new diff --git a/nq/source/net_main.c b/nq/source/net_main.c index 8a7bd8e1c..c7b38dbc0 100644 --- a/nq/source/net_main.c +++ b/nq/source/net_main.c @@ -558,7 +558,6 @@ struct { int len; } vcrGetMessage; -extern void PrintStats (qsocket_t * s); int NET_GetMessage (qsocket_t * sock) diff --git a/nq/source/net_udp.c b/nq/source/net_udp.c index 19bfcb69f..dc06b48a6 100644 --- a/nq/source/net_udp.c +++ b/nq/source/net_udp.c @@ -103,7 +103,6 @@ static const char rcsid[] = #endif //extern int gethostname (char *, int); -extern int close (int); static int net_acceptsocket = -1; // socket for fielding new // connections diff --git a/nq/source/net_vcr.c b/nq/source/net_vcr.c index af68ea429..5bb8eae02 100644 --- a/nq/source/net_vcr.c +++ b/nq/source/net_vcr.c @@ -32,12 +32,12 @@ static const char rcsid[] = #endif #include "QF/msg.h" +#include "QF/sys.h" + #include "net.h" #include "net_vcr.h" -#include "QF/sys.h" #include "server.h" -extern VFile *vcrFile; // This is the playback portion of the VCR. It reads the file produced // by the recorder and plays it back to the host. The recording contains diff --git a/nq/source/net_wipx.c b/nq/source/net_wipx.c index f032c5f7d..4230f3e00 100644 --- a/nq/source/net_wipx.c +++ b/nq/source/net_wipx.c @@ -43,8 +43,6 @@ static int net_acceptsocket = -1; // socket for fielding new static int net_controlsocket; static struct qsockaddr broadcastaddr; -extern qboolean winsock_initialized; -extern WSADATA winsockdata; #define IPXSOCKETS 18 static int ipxsocket[IPXSOCKETS]; diff --git a/nq/source/skin.c b/nq/source/skin.c index a62452116..99556ae42 100644 --- a/nq/source/skin.c +++ b/nq/source/skin.c @@ -51,7 +51,6 @@ static const char rcsid[] = #define MAX_TEMP_SKINS 64 //XXX dynamic? -extern cvar_t *noskins; // XXX FIXME, this shouldn't be here? cvar_t *baseskin; diff --git a/nq/source/sv_ded.c b/nq/source/sv_ded.c index 4365c0335..f977dbef4 100644 --- a/nq/source/sv_ded.c +++ b/nq/source/sv_ded.c @@ -53,6 +53,7 @@ cvar_t *cl_writecfg; cvar_t *chase_active; int fps_count; +int viewentity; qboolean scr_disabled_for_loading; @@ -245,7 +246,7 @@ SCR_Init (void) } void -S_Init (void) +S_Init (struct model_s **worldmodel, int *viewentity, double *host_frametime) { } diff --git a/nq/source/sv_main.c b/nq/source/sv_main.c index f7bc03d39..963a653d7 100644 --- a/nq/source/sv_main.c +++ b/nq/source/sv_main.c @@ -906,7 +906,6 @@ SV_SaveSpawnparms (void) } } -extern float scr_centertime_off; /* SV_SpawnServer diff --git a/nq/source/sv_user.c b/nq/source/sv_user.c index 8ee7321e7..74a3a11fb 100644 --- a/nq/source/sv_user.c +++ b/nq/source/sv_user.c @@ -44,6 +44,9 @@ static const char rcsid[] = #include "view.h" #include "world.h" +extern cvar_t *cl_rollangle; //FIXME +extern cvar_t *cl_rollspeed; //FIXME + edict_t *sv_player; cvar_t *sv_edgefriction; @@ -63,8 +66,6 @@ qboolean onground; usercmd_t cmd; cvar_t *sv_idealpitchscale; -extern cvar_t *cl_rollspeed; -extern cvar_t *cl_rollangle; #define MAX_FORWARD 6 diff --git a/qw/include/cl_cam.h b/qw/include/cl_cam.h index 9f433a587..d162bbd9d 100644 --- a/qw/include/cl_cam.h +++ b/qw/include/cl_cam.h @@ -41,6 +41,7 @@ extern int autocam; extern int spec_track; // player# of who we are tracking +extern struct cvar_s *chase_active; qboolean Cam_DrawViewModel(void); qboolean Cam_DrawPlayer(int playernum); diff --git a/qw/include/cl_input.h b/qw/include/cl_input.h index a6f850b8b..2e1ef689d 100644 --- a/qw/include/cl_input.h +++ b/qw/include/cl_input.h @@ -29,6 +29,8 @@ #ifndef _CL_INPUT_H #define _CL_INPUT_H +#include "QF/input.h" + #include "protocol.h" void CL_Input_Init (void); @@ -45,4 +47,9 @@ int CL_ReadFromServer (void); void CL_WriteToServer (usercmd_t *cmd); void CL_BaseMove (usercmd_t *cmd); +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; + #endif diff --git a/qw/include/cl_main.h b/qw/include/cl_main.h index 2dfe8875a..918b841d5 100644 --- a/qw/include/cl_main.h +++ b/qw/include/cl_main.h @@ -47,4 +47,13 @@ void CL_BeginServerConnect(void); extern char emodel_name[], pmodel_name[], prespawn_name[], modellist_name[], soundlist_name[]; +extern struct cvar_s *cl_timeframes; +extern struct cvar_s *cl_predict_players; +extern struct cvar_s *cl_solid_players; +extern struct cvar_s *cl_autoexec; +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; + #endif // _CL_MAIN_H diff --git a/qw/include/cl_parse.h b/qw/include/cl_parse.h index 1a23b1e0f..2e90e84ea 100644 --- a/qw/include/cl_parse.h +++ b/qw/include/cl_parse.h @@ -37,6 +37,13 @@ struct skin_s; extern int packet_latency[NET_TIMINGS]; +extern int parsecountmod; +extern double parsecounttime; +extern int cl_playerindex; +extern int cl_flagindex; +extern int cl_spikeindex; +extern int viewentity; + int CL_CalcNet (void); void CL_ParseServerMessage (void); void CL_NewTranslation (int slot, struct skin_s *skin); diff --git a/qw/include/client.h b/qw/include/client.h index eba58ce63..f7d897e96 100644 --- a/qw/include/client.h +++ b/qw/include/client.h @@ -310,6 +310,8 @@ extern struct cvar_s *cl_model_crcs; extern struct cvar_s *show_ping; extern struct cvar_s *show_pl; +extern struct cvar_s *skin; + #define MAX_STATIC_ENTITIES 128 // torches, etc @@ -332,6 +334,8 @@ void CL_UpdateScreen (double realtime); void CL_SetState (cactive_t state); +void V_PrepBlend (void); + #define RSSHOT_WIDTH 320 #define RSSHOT_HEIGHT 200 diff --git a/qw/include/net.h b/qw/include/net.h index 91e5f8e95..08bf376c3 100644 --- a/qw/include/net.h +++ b/qw/include/net.h @@ -141,4 +141,6 @@ void Analyze_Client_Packet (const byte *data, int len); extern struct cvar_s *net_packetlog; +extern qboolean is_server; + #endif // _NET_H diff --git a/qw/include/pmove.h b/qw/include/pmove.h index 92ac29d61..bb363547d 100644 --- a/qw/include/pmove.h +++ b/qw/include/pmove.h @@ -110,6 +110,9 @@ extern int onground; extern int waterlevel; extern int watertype; +extern vec3_t player_mins; +extern vec3_t player_maxs; + void PlayerMove (void); void Pmove_Init (void); void Pmove_Init_Cvars (void); diff --git a/qw/include/server.h b/qw/include/server.h index 3a4cc7a8f..fe7279ced 100644 --- a/qw/include/server.h +++ b/qw/include/server.h @@ -519,6 +519,7 @@ void SV_TogglePause (const char *msg); typedef enum {RD_NONE, RD_CLIENT, RD_PACKET} redirect_t; void SV_BeginRedirect (redirect_t rd); void SV_EndRedirect (void); +extern redirect_t sv_redirected; // // sv_ccmds.c @@ -548,4 +549,22 @@ void ClientReliableWrite_String(client_t *cl, const char *s); void ClientReliableWrite_SZ(client_t *cl, void *data, int len); void Cvar_Info (struct cvar_s *var); + +extern struct cvar_s *sv_timekick; +extern struct cvar_s *sv_timekick_fuzz; +extern struct cvar_s *sv_timekick_interval; +extern struct cvar_s *sv_maxrate; +extern struct cvar_s *sv_timestamps; +extern struct cvar_s *sv_timefmt; +extern struct cvar_s *sv_phs; +extern int fp_messages; +extern int fp_persecond; +extern int fp_secondsdead; +extern struct cvar_s *pausable; +extern struct cvar_s *nouse; + +extern char fp_msg[255]; + +extern int sv_nailmodel, sv_supernailmodel, sv_playermodel; + #endif // _SERVER_H diff --git a/qw/source/cl_cam.c b/qw/source/cl_cam.c index 6e38a86d3..1b85dbb82 100644 --- a/qw/source/cl_cam.c +++ b/qw/source/cl_cam.c @@ -49,6 +49,7 @@ static const char rcsid[] = #include "QF/msg.h" #include "cl_cam.h" +#include "cl_input.h" #include "client.h" #include "compat.h" #include "pmove.h" @@ -74,11 +75,6 @@ vec3_t camera_angles = {0,0,0}; vec3_t player_origin = {0,0,0}; vec3_t player_angles = {0,0,0}; -extern kbutton_t in_mlook, in_klook; -extern kbutton_t in_left, in_right, in_forward, in_back; -extern kbutton_t in_lookup, in_lookdown; -extern kbutton_t in_moveleft, in_moveright; -extern kbutton_t in_strafe, in_speed; cvar_t *chase_back; cvar_t *chase_up; diff --git a/qw/source/cl_demo.c b/qw/source/cl_demo.c index 2bcdcd34a..ee573bbac 100644 --- a/qw/source/cl_demo.c +++ b/qw/source/cl_demo.c @@ -64,7 +64,6 @@ int timedemo_count; double *cl_timeframes_array; #define CL_TIMEFRAMES_ARRAYBLOCK 4096 -extern cvar_t *cl_timeframes; void CL_FinishTimeDemo (void); void CL_TimeFrames_Reset (void); diff --git a/qw/source/cl_ents.c b/qw/source/cl_ents.c index 88687b935..41eb91459 100644 --- a/qw/source/cl_ents.c +++ b/qw/source/cl_ents.c @@ -70,8 +70,6 @@ entity_t cl_packet_ents[512]; // FIXME: magic number entity_t cl_flag_ents[MAX_CLIENTS]; entity_t cl_player_ents[MAX_CLIENTS]; -extern cvar_t *cl_predict_players; -extern cvar_t *cl_solid_players; void @@ -541,7 +539,6 @@ typedef struct { projectile_t cl_projectiles[MAX_PROJECTILES]; int cl_num_projectiles; -extern int cl_spikeindex; void CL_ClearProjectiles (void) @@ -611,8 +608,6 @@ CL_LinkProjectiles (void) } } -extern double parsecounttime; -extern int cl_spikeindex, cl_playerindex, cl_flagindex, parsecountmod; void CL_ParsePlayerinfo (void) diff --git a/qw/source/cl_input.c b/qw/source/cl_input.c index 34ffab418..013a857b0 100644 --- a/qw/source/cl_input.c +++ b/qw/source/cl_input.c @@ -75,7 +75,6 @@ cvar_t *cl_nodelta; state bit 2 is edge triggered on the down to up transition */ -extern kbutton_t in_speed, in_strafe, in_klook, in_mlook; kbutton_t in_left, in_right, in_forward, in_back; kbutton_t in_lookup, in_lookdown, in_moveleft, in_moveright; @@ -476,7 +475,6 @@ CL_AdjustAngles (void) } -extern cvar_t *chase_active; /* CL_BaseMove diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index dc5f62c51..56164ba96 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -166,9 +166,7 @@ cvar_t *rate; cvar_t *noaim; cvar_t *msg; -extern cvar_t *cl_hightrack; -extern void R_Particles_Init_Cvars (void); client_static_t cls; client_state_t cl; @@ -1673,7 +1671,7 @@ Host_Init (void) SCR_Init (); R_Init (); - S_Init (); + S_Init (&cl.worldmodel, &viewentity, &host_frametime); Sbar_Init (); CL_Skin_Init (); @@ -1684,7 +1682,7 @@ Host_Init (void) SCR_Init (); R_Init (); - S_Init (); + S_Init (&cl.worldmodel, &viewentity, &host_frametime); CDAudio_Init (); Sbar_Init (); diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index b74559efc..097ca9261 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -154,12 +154,13 @@ int oldparsecountmod; int parsecountmod; double parsecounttime; +int viewentity; + int cl_spikeindex, cl_playerindex, cl_flagindex; int cl_h_playerindex, cl_gib1index, cl_gib2index, cl_gib3index; int packet_latency[NET_TIMINGS]; -extern cvar_t *cl_autoexec; int @@ -246,8 +247,6 @@ CL_CheckOrDownloadFile (const char *filename) return false; } -struct model_s **snd_worldmodel = &cl.worldmodel; - void Model_NextDownload (void) { @@ -642,10 +641,6 @@ CL_ParsePrint (void) void Draw_ClearCache (void); void CL_ClearBaselines (void); // LordHavoc: BIG BUG-FIX! -// FIXME: Evil hack that doesn't deserve to see the light of day. -// (pending merge of nq and qw client_stat_t's) -int snd_viewentity; - void CL_ParseServerData (void) { @@ -714,7 +709,7 @@ CL_ParseServerData (void) // FIXME: evil hack so NQ and QW can share sound code cl.viewentity = cl.playernum + 1; - snd_viewentity = cl.playernum + 1; + viewentity = cl.playernum + 1; // get the full level name strncpy (cl.levelname, serverdata.levelname, sizeof (cl.levelname) - 1); diff --git a/qw/source/cl_pred.c b/qw/source/cl_pred.c index 4ae50a6a8..106e0dffa 100644 --- a/qw/source/cl_pred.c +++ b/qw/source/cl_pred.c @@ -47,7 +47,6 @@ cvar_t *cl_nopred; cvar_t *cl_pushlatency; cvar_t *cl_nostatpred; -extern frame_t *view_frame; void diff --git a/qw/source/cl_screen.c b/qw/source/cl_screen.c index 3a3e612d6..246198286 100644 --- a/qw/source/cl_screen.c +++ b/qw/source/cl_screen.c @@ -119,7 +119,6 @@ static SCR_Func scr_funcs[] = { }; -extern void V_PrepBlend (void); void CL_UpdateScreen (double realtime) diff --git a/qw/source/cl_skin.c b/qw/source/cl_skin.c index 44f1d3c2c..df25dd66c 100644 --- a/qw/source/cl_skin.c +++ b/qw/source/cl_skin.c @@ -55,7 +55,6 @@ cvar_t *skin; cvar_t *topcolor; cvar_t *bottomcolor; -extern char allskins[128]; void diff --git a/qw/source/cl_view.c b/qw/source/cl_view.c index 0cd742f1c..4fa6bd656 100644 --- a/qw/source/cl_view.c +++ b/qw/source/cl_view.c @@ -41,6 +41,7 @@ static const char rcsid[] = #include "QF/vid.h" #include "bothdefs.h" +#include "cl_main.h" #include "client.h" #include "compat.h" #include "host.h" @@ -81,7 +82,6 @@ cvar_t *v_idlescale; float v_dmg_time, v_dmg_roll, v_dmg_pitch; float v_blend[4]; -extern int in_forward, in_forward2, in_back; frame_t *view_frame; player_state_t *view_message; @@ -92,11 +92,6 @@ cshift_t cshift_slime = { {0, 25, 5}, 150}; cshift_t cshift_lava = { {255, 80, 0}, 150}; cshift_t cshift_bonus = { {215, 186, 60}, 50}; -extern cvar_t *cl_cshift_bonus; -extern cvar_t *cl_cshift_contents; -extern cvar_t *cl_cshift_damage; -extern cvar_t *cl_cshift_powerup; -extern cvar_t *vid_gamma; float @@ -622,7 +617,6 @@ V_CalcIntermissionRefdef (void) #include "cl_cam.h" -extern cvar_t *chase_active; void V_CalcRefdef (void) diff --git a/qw/source/console.c b/qw/source/console.c index 7b6c79a94..8e4785168 100644 --- a/qw/source/console.c +++ b/qw/source/console.c @@ -75,9 +75,6 @@ qboolean con_initialized; #define MAXCMDLINE 256 -extern char key_lines[32][MAXCMDLINE]; -extern int edit_line; -extern int key_linepos; void diff --git a/qw/source/game.c b/qw/source/game.c index 1b1f3fe1d..0b81a29c7 100644 --- a/qw/source/game.c +++ b/qw/source/game.c @@ -49,7 +49,6 @@ static const char rcsid[] = #include "game.h" #include "server.h" -extern qboolean is_server; /* diff --git a/qw/source/net_chan.c b/qw/source/net_chan.c index d5400d7ee..0f863127c 100644 --- a/qw/source/net_chan.c +++ b/qw/source/net_chan.c @@ -104,7 +104,6 @@ cvar_t *showpackets; cvar_t *showdrop; cvar_t *qport; -extern qboolean is_server; void Netchan_Init (void) diff --git a/qw/source/net_packetlog.c b/qw/source/net_packetlog.c index c933a8334..a57485e43 100644 --- a/qw/source/net_packetlog.c +++ b/qw/source/net_packetlog.c @@ -63,7 +63,6 @@ cvar_t *net_packetlog; cvar_t *net_loglevel; //extern server_t sv; -extern qboolean is_server; int Net_LogStart (const char *fname); diff --git a/qw/source/net_udp.c b/qw/source/net_udp.c index dd51ca29f..a06edcf5b 100644 --- a/qw/source/net_udp.c +++ b/qw/source/net_udp.c @@ -107,8 +107,6 @@ byte net_message_buffer[MAX_UDP_PACKET]; WSADATA winsockdata; #endif -extern cvar_t *net_packetlog; -extern qboolean is_server; void diff --git a/qw/source/pmovetst.c b/qw/source/pmovetst.c index e9f716795..de9c1fe34 100644 --- a/qw/source/pmovetst.c +++ b/qw/source/pmovetst.c @@ -49,8 +49,6 @@ static hull_t box_hull; static dclipnode_t box_clipnodes[6]; static mplane_t box_planes[6]; -extern vec3_t player_mins; -extern vec3_t player_maxs; /* diff --git a/qw/source/skin.c b/qw/source/skin.c index 8a691db80..34183f418 100644 --- a/qw/source/skin.c +++ b/qw/source/skin.c @@ -51,7 +51,7 @@ static const char rcsid[] = #define MAX_TEMP_SKINS 64 //XXX dynamic? -extern cvar_t *noskins; // XXX FIXME, this shouldn't be here? +extern cvar_t *noskins; //FIXME shouldn't be here cvar_t *baseskin; diff --git a/qw/source/sv_ccmds.c b/qw/source/sv_ccmds.c index 7558fc897..807ee0a9c 100644 --- a/qw/source/sv_ccmds.c +++ b/qw/source/sv_ccmds.c @@ -59,7 +59,6 @@ qboolean sv_allow_cheats; int fp_messages = 4, fp_persecond = 4, fp_secondsdead = 10; char fp_msg[255] = { 0 }; cvar_t *sv_leetnickmatch; -extern redirect_t sv_redirected; static qboolean match_char (char a, char b) diff --git a/qw/source/sv_ents.c b/qw/source/sv_ents.c index 4f3749583..43a616c08 100644 --- a/qw/source/sv_ents.c +++ b/qw/source/sv_ents.c @@ -109,7 +109,6 @@ SV_FatPVS (vec3_t org) edict_t *nails[MAX_NAILS]; int numnails; -extern int sv_nailmodel, sv_supernailmodel, sv_playermodel; qboolean SV_AddNailUpdate (edict_t *ent) diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index 3f5f0a2c8..9d2bdd246 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -140,9 +140,6 @@ cvar_t *sv_phs; cvar_t *pausable; -extern cvar_t *sv_timekick; -extern cvar_t *sv_timekick_fuzz; -extern cvar_t *sv_timekick_interval; cvar_t *sv_minqfversion; // Minimum QF version allowed to // connect diff --git a/qw/source/sv_send.c b/qw/source/sv_send.c index acb9125a9..1852f39d5 100644 --- a/qw/source/sv_send.c +++ b/qw/source/sv_send.c @@ -64,9 +64,6 @@ char outputbuf[8000]; int con_printf_no_log; redirect_t sv_redirected; -extern cvar_t *sv_phs; -extern cvar_t *sv_timestamps; -extern cvar_t *sv_timefmt; void SV_FlushRedirect (void) diff --git a/qw/source/sv_user.c b/qw/source/sv_user.c index e137af464..3c3e938ad 100644 --- a/qw/source/sv_user.c +++ b/qw/source/sv_user.c @@ -75,13 +75,8 @@ cvar_t *sv_timekick_interval; cvar_t *sv_kickfake; -extern cvar_t *sv_maxrate; -extern vec3_t player_mins; -extern int fp_messages, fp_persecond, fp_secondsdead; -extern char fp_msg[]; -extern cvar_t *pausable; void SV_FullClientUpdateToClient (client_t *client, client_t *cl); @@ -1450,7 +1445,6 @@ SV_PreRunCmd (void) /* SV_RunCmd */ -extern qboolean nouse; // 1999-10-29 +USE fix by Maddes void SV_RunCmd (usercmd_t *ucmd, qboolean inside) diff --git a/qw/source/teamplay.c b/qw/source/teamplay.c index b5a4ebeac..444a3db9e 100644 --- a/qw/source/teamplay.c +++ b/qw/source/teamplay.c @@ -59,7 +59,6 @@ cvar_t *cl_gibfilter; cvar_t *cl_parsesay; cvar_t *cl_nofake; -extern cvar_t *skin; void