From d41b89d42bc703ee2fc394d17e17b731f8cb59d7 Mon Sep 17 00:00:00 2001 From: braxi Date: Mon, 9 Sep 2024 20:08:45 +0200 Subject: [PATCH] beginning of source tree restructurization --- "build_map_aitest \342\200\224 kopia.BAT" | 11 - .../cl_temp_entities \342\200\224 kopia.c" | 1748 ----------------- src/engine.vcxproj.filters | 383 ---- src/{ => engine/OLD}/null/cl_null.c | 0 src/{ => engine/OLD}/null/glimp_null.c | 0 src/{ => engine/OLD}/null/in_null.c | 0 src/{ => engine/OLD}/null/snddma_null.c | 0 src/{ => engine/OLD}/null/sys_null.c | 0 src/{ => engine/OLD}/null/vid_null.c | 0 .../OLD/pragma_dedsv.vcxproj.filters} | 0 .../OLD/pragma_dedsv.vcxproj.vcxproj} | 0 src/{ => engine}/client/cgame/cg_builtins.c | 0 src/{ => engine}/client/cgame/cg_dlights.c | 0 src/{ => engine}/client/cgame/cg_entities.c | 0 src/{ => engine}/client/cgame/cg_events.c | 0 src/{ => engine}/client/cgame/cg_flash.c | 0 .../client/cgame/cg_lightstyles.c | 0 src/{ => engine}/client/cgame/cg_local.h | 0 src/{ => engine}/client/cgame/cg_main.c | 0 src/{ => engine}/client/cgame/cg_model.c | 0 src/{ => engine}/client/cgame/cg_oldfx.c | 0 src/{ => engine}/client/cgame/cg_particles.c | 0 .../client/cgame/cg_temp_entities.c | 0 src/{ => engine}/client/cgame/cg_tempents.c | 0 src/{ => engine}/client/cgame/cg_weapon.c | 0 src/{ => engine}/client/cgame/cg_world.c | 0 src/{ => engine}/client/cgame/cgame.h | 0 .../client/cgame/progdefs_client.h | 0 src/{ => engine}/client/cl_cinematic.c | 0 src/{ => engine}/client/cl_console.c | 0 src/{ => engine}/client/cl_download.c | 0 src/{ => engine}/client/cl_entities.c | 0 src/{ => engine}/client/cl_graph.c | 0 src/{ => engine}/client/cl_input.c | 0 src/{ => engine}/client/cl_keys.c | 0 src/{ => engine}/client/cl_main.c | 0 src/{ => engine}/client/cl_parse.c | 0 src/{ => engine}/client/cl_predict.c | 0 src/{ => engine}/client/cl_screen.c | 0 src/{ => engine}/client/cl_view.c | 0 src/{ => engine}/client/client.h | 2 +- src/{ => engine}/client/console.h | 0 src/{ => engine}/client/fx/effects.h | 0 src/{ => engine}/client/fx/fx_load.c | 0 src/{ => engine}/client/fx/fx_local.h | 0 src/{ => engine}/client/fx/fx_main.c | 0 src/{ => engine}/client/fx/fx_play.c | 0 src/{ => engine}/client/input.h | 0 src/{ => engine}/client/keys.h | 0 src/{ => engine}/client/screen.h | 0 src/{ => engine}/client/snd_dma.c | 0 src/{ => engine}/client/snd_loc.h | 0 src/{ => engine}/client/snd_mem.c | 0 src/{ => engine}/client/snd_mix.c | 0 src/{ => engine}/client/sound.h | 0 src/{ => engine}/client/ui/gui.h | 0 src/{ => engine}/client/ui/ui_action.c | 0 src/{ => engine}/client/ui/ui_builtins.c | 0 src/{ => engine}/client/ui/ui_centermsg.c | 0 src/{ => engine}/client/ui/ui_load.c | 0 src/{ => engine}/client/ui/ui_local.h | 0 src/{ => engine}/client/ui/ui_main.c | 0 src/{ => engine}/client/vid.h | 0 src/{qcommon => engine}/cmd.c | 2 +- src/{qcommon => engine}/cmodel.c | 2 +- src/{platform => engine}/linux_main.c | 0 src/{platform => engine}/linux_net.c | 0 src/{platform => engine}/linux_shared.c | 0 src/{qcommon => engine}/net_chan.c | 2 +- src/{qcommon => engine}/net_msg.c | 0 src/{platform => engine}/pragma.ico | Bin src/{platform => engine}/pragma.rc | 0 src/{ => engine}/pragma_config.h | 13 +- .../pragma_engine.filters} | 0 .../pragma_engine.vcxproj} | 69 +- src/engine/pragma_engine.vcxproj.filters | 134 ++ src/{platform => engine}/resource.h | 0 src/{ => engine}/script/progdefs_server.h | 0 src/{ => engine}/script/progdefs_ui.h | 0 src/{ => engine}/script/qc_opcodes.h | 0 src/{ => engine}/script/qc_opnames.h | 0 src/{ => engine}/script/scr_builtins_math.c | 2 +- src/{ => engine}/script/scr_builtins_shared.c | 2 +- src/{ => engine}/script/scr_debug.c | 2 +- src/{ => engine}/script/scr_exec.c | 2 +- src/{ => engine}/script/scr_main.c | 2 +- src/{ => engine}/script/scr_utils.c | 0 src/{ => engine}/script/script_internals.h | 0 src/{ => engine}/script/scriptvm.h | 0 src/{ => engine}/server/server.h | 2 +- src/{ => engine}/server/sv_ai.c | 0 src/{ => engine}/server/sv_builtins.c | 0 src/{ => engine}/server/sv_ccmds.c | 0 src/{ => engine}/server/sv_devtools.c | 0 src/{ => engine}/server/sv_game.h | 0 src/{ => engine}/server/sv_gentity.c | 0 src/{ => engine}/server/sv_init.c | 0 src/{ => engine}/server/sv_load.c | 0 src/{ => engine}/server/sv_main.c | 0 src/{ => engine}/server/sv_physics.c | 0 src/{ => engine}/server/sv_script.c | 0 src/{ => engine}/server/sv_send.c | 0 src/{ => engine}/server/sv_user.c | 0 src/{ => engine}/server/sv_world.c | 0 src/{ => engine}/server/sv_write.c | 0 src/{platform => engine}/vid_dll.c | 4 +- src/{platform => engine}/win_input.c | 4 +- src/{platform => engine}/win_main.c | 2 +- src/{platform => engine}/win_net.c | 0 src/{platform => engine}/win_sound.c | 6 +- src/{platform => engine}/winquake.rc | 0 src/pragma.sln | 14 +- .../{bg_navigation.c => astar_navigation.c} | 0 src/qcommon/{files.c => filesystem.c} | 0 src/qcommon/model_cache.c | 4 +- src/qcommon/{bg_modeldef.c => model_def.c} | 0 .../winquake.h => qcommon/pragma_windows.h} | 0 src/qcommon/qcommon.h | 2 +- src/qcommon/shared.h | 2 +- .../win_shared.c => qcommon/shared_windows.c} | 2 +- src/{renderer_gl2 => renderer}/TODO.md | 0 src/{renderer_gl2 => renderer}/glad_gl21.c | 0 .../include/KHR/khrplatform_gl21.h | 0 .../include/glad/glad_21.h | 0 .../pragma_renderer.filters} | 0 .../pragma_renderer.vcxproj} | 2 +- src/{renderer_gl2 => renderer}/r_aliasmod.c | 0 src/{renderer_gl2 => renderer}/r_draw.c | 0 .../r_framebuffer.c | 0 src/{renderer_gl2 => renderer}/r_image.c | 0 src/{renderer_gl2 => renderer}/r_init.c | 0 src/{renderer_gl2 => renderer}/r_light.c | 0 src/{renderer_gl2 => renderer}/r_lightmap.c | 0 src/{renderer_gl2 => renderer}/r_local.h | 0 src/{renderer_gl2 => renderer}/r_main.c | 0 src/{renderer_gl2 => renderer}/r_mesh.c | 0 src/{renderer_gl2 => renderer}/r_misc.c | 0 src/{renderer_gl2 => renderer}/r_model.c | 0 src/{renderer_gl2 => renderer}/r_model.h | 0 src/{renderer_gl2 => renderer}/r_progs.c | 0 src/{renderer_gl2 => renderer}/r_shadow.c | 0 src/{renderer_gl2 => renderer}/r_state.c | 0 src/{renderer_gl2 => renderer}/r_testmod.c | 0 src/{renderer_gl2 => renderer}/r_text.c | 0 .../r_vertexbuffer.c | 0 src/{renderer_gl2 => renderer}/r_warp.c | 0 src/{renderer_gl2 => renderer}/r_world.c | 0 src/{renderer_gl2 => renderer}/renderer.def | 0 src/{renderer_gl2 => renderer}/warpsin.h | 0 src/{renderer_gl2 => renderer}/win_glw.h | 0 src/{renderer_gl2 => renderer}/win_opengl.c | 2 +- src/{renderer_gl2 => renderer}/win_qgl.c | 0 src/{renderer_gl2 => renderer}/win_qgl.h | 0 153 files changed, 205 insertions(+), 2217 deletions(-) delete mode 100644 "build_map_aitest \342\200\224 kopia.BAT" delete mode 100644 "src/client/cl_temp_entities \342\200\224 kopia.c" delete mode 100644 src/engine.vcxproj.filters rename src/{ => engine/OLD}/null/cl_null.c (100%) rename src/{ => engine/OLD}/null/glimp_null.c (100%) rename src/{ => engine/OLD}/null/in_null.c (100%) rename src/{ => engine/OLD}/null/snddma_null.c (100%) rename src/{ => engine/OLD}/null/sys_null.c (100%) rename src/{ => engine/OLD}/null/vid_null.c (100%) rename src/{pragma_server.vcxproj.filters => engine/OLD/pragma_dedsv.vcxproj.filters} (100%) rename src/{pragma_server.vcxproj => engine/OLD/pragma_dedsv.vcxproj.vcxproj} (100%) rename src/{ => engine}/client/cgame/cg_builtins.c (100%) rename src/{ => engine}/client/cgame/cg_dlights.c (100%) rename src/{ => engine}/client/cgame/cg_entities.c (100%) rename src/{ => engine}/client/cgame/cg_events.c (100%) rename src/{ => engine}/client/cgame/cg_flash.c (100%) rename src/{ => engine}/client/cgame/cg_lightstyles.c (100%) rename src/{ => engine}/client/cgame/cg_local.h (100%) rename src/{ => engine}/client/cgame/cg_main.c (100%) rename src/{ => engine}/client/cgame/cg_model.c (100%) rename src/{ => engine}/client/cgame/cg_oldfx.c (100%) rename src/{ => engine}/client/cgame/cg_particles.c (100%) rename src/{ => engine}/client/cgame/cg_temp_entities.c (100%) rename src/{ => engine}/client/cgame/cg_tempents.c (100%) rename src/{ => engine}/client/cgame/cg_weapon.c (100%) rename src/{ => engine}/client/cgame/cg_world.c (100%) rename src/{ => engine}/client/cgame/cgame.h (100%) rename src/{ => engine}/client/cgame/progdefs_client.h (100%) rename src/{ => engine}/client/cl_cinematic.c (100%) rename src/{ => engine}/client/cl_console.c (100%) rename src/{ => engine}/client/cl_download.c (100%) rename src/{ => engine}/client/cl_entities.c (100%) rename src/{ => engine}/client/cl_graph.c (100%) rename src/{ => engine}/client/cl_input.c (100%) rename src/{ => engine}/client/cl_keys.c (100%) rename src/{ => engine}/client/cl_main.c (100%) rename src/{ => engine}/client/cl_parse.c (100%) rename src/{ => engine}/client/cl_predict.c (100%) rename src/{ => engine}/client/cl_screen.c (100%) rename src/{ => engine}/client/cl_view.c (100%) rename src/{ => engine}/client/client.h (99%) rename src/{ => engine}/client/console.h (100%) rename src/{ => engine}/client/fx/effects.h (100%) rename src/{ => engine}/client/fx/fx_load.c (100%) rename src/{ => engine}/client/fx/fx_local.h (100%) rename src/{ => engine}/client/fx/fx_main.c (100%) rename src/{ => engine}/client/fx/fx_play.c (100%) rename src/{ => engine}/client/input.h (100%) rename src/{ => engine}/client/keys.h (100%) rename src/{ => engine}/client/screen.h (100%) rename src/{ => engine}/client/snd_dma.c (100%) rename src/{ => engine}/client/snd_loc.h (100%) rename src/{ => engine}/client/snd_mem.c (100%) rename src/{ => engine}/client/snd_mix.c (100%) rename src/{ => engine}/client/sound.h (100%) rename src/{ => engine}/client/ui/gui.h (100%) rename src/{ => engine}/client/ui/ui_action.c (100%) rename src/{ => engine}/client/ui/ui_builtins.c (100%) rename src/{ => engine}/client/ui/ui_centermsg.c (100%) rename src/{ => engine}/client/ui/ui_load.c (100%) rename src/{ => engine}/client/ui/ui_local.h (100%) rename src/{ => engine}/client/ui/ui_main.c (100%) rename src/{ => engine}/client/vid.h (100%) rename src/{qcommon => engine}/cmd.c (99%) rename src/{qcommon => engine}/cmodel.c (99%) rename src/{platform => engine}/linux_main.c (100%) rename src/{platform => engine}/linux_net.c (100%) rename src/{platform => engine}/linux_shared.c (100%) rename src/{qcommon => engine}/net_chan.c (99%) rename src/{qcommon => engine}/net_msg.c (100%) rename src/{platform => engine}/pragma.ico (100%) rename src/{platform => engine}/pragma.rc (100%) rename src/{ => engine}/pragma_config.h (88%) rename src/{engine.filters => engine/pragma_engine.filters} (100%) rename src/{engine.vcxproj => engine/pragma_engine.vcxproj} (88%) create mode 100644 src/engine/pragma_engine.vcxproj.filters rename src/{platform => engine}/resource.h (100%) rename src/{ => engine}/script/progdefs_server.h (100%) rename src/{ => engine}/script/progdefs_ui.h (100%) rename src/{ => engine}/script/qc_opcodes.h (100%) rename src/{ => engine}/script/qc_opnames.h (100%) rename src/{ => engine}/script/scr_builtins_math.c (99%) rename src/{ => engine}/script/scr_builtins_shared.c (99%) rename src/{ => engine}/script/scr_debug.c (99%) rename src/{ => engine}/script/scr_exec.c (99%) rename src/{ => engine}/script/scr_main.c (99%) rename src/{ => engine}/script/scr_utils.c (100%) rename src/{ => engine}/script/script_internals.h (100%) rename src/{ => engine}/script/scriptvm.h (100%) rename src/{ => engine}/server/server.h (99%) rename src/{ => engine}/server/sv_ai.c (100%) rename src/{ => engine}/server/sv_builtins.c (100%) rename src/{ => engine}/server/sv_ccmds.c (100%) rename src/{ => engine}/server/sv_devtools.c (100%) rename src/{ => engine}/server/sv_game.h (100%) rename src/{ => engine}/server/sv_gentity.c (100%) rename src/{ => engine}/server/sv_init.c (100%) rename src/{ => engine}/server/sv_load.c (100%) rename src/{ => engine}/server/sv_main.c (100%) rename src/{ => engine}/server/sv_physics.c (100%) rename src/{ => engine}/server/sv_script.c (100%) rename src/{ => engine}/server/sv_send.c (100%) rename src/{ => engine}/server/sv_user.c (100%) rename src/{ => engine}/server/sv_world.c (100%) rename src/{ => engine}/server/sv_write.c (100%) rename src/{platform => engine}/vid_dll.c (99%) rename src/{platform => engine}/win_input.c (98%) rename src/{platform => engine}/win_main.c (99%) rename src/{platform => engine}/win_net.c (100%) rename src/{platform => engine}/win_sound.c (99%) rename src/{platform => engine}/winquake.rc (100%) rename src/qcommon/{bg_navigation.c => astar_navigation.c} (100%) rename src/qcommon/{files.c => filesystem.c} (100%) rename src/qcommon/{bg_modeldef.c => model_def.c} (100%) rename src/{platform/winquake.h => qcommon/pragma_windows.h} (100%) rename src/{platform/win_shared.c => qcommon/shared_windows.c} (99%) rename src/{renderer_gl2 => renderer}/TODO.md (100%) rename src/{renderer_gl2 => renderer}/glad_gl21.c (100%) rename src/{renderer_gl2 => renderer}/include/KHR/khrplatform_gl21.h (100%) rename src/{renderer_gl2 => renderer}/include/glad/glad_21.h (100%) rename src/{renderer_gl2/renderer_gl2.vcxproj.filters => renderer/pragma_renderer.filters} (100%) rename src/{renderer_gl2/renderer_gl2.vcxproj => renderer/pragma_renderer.vcxproj} (99%) rename src/{renderer_gl2 => renderer}/r_aliasmod.c (100%) rename src/{renderer_gl2 => renderer}/r_draw.c (100%) rename src/{renderer_gl2 => renderer}/r_framebuffer.c (100%) rename src/{renderer_gl2 => renderer}/r_image.c (100%) rename src/{renderer_gl2 => renderer}/r_init.c (100%) rename src/{renderer_gl2 => renderer}/r_light.c (100%) rename src/{renderer_gl2 => renderer}/r_lightmap.c (100%) rename src/{renderer_gl2 => renderer}/r_local.h (100%) rename src/{renderer_gl2 => renderer}/r_main.c (100%) rename src/{renderer_gl2 => renderer}/r_mesh.c (100%) rename src/{renderer_gl2 => renderer}/r_misc.c (100%) rename src/{renderer_gl2 => renderer}/r_model.c (100%) rename src/{renderer_gl2 => renderer}/r_model.h (100%) rename src/{renderer_gl2 => renderer}/r_progs.c (100%) rename src/{renderer_gl2 => renderer}/r_shadow.c (100%) rename src/{renderer_gl2 => renderer}/r_state.c (100%) rename src/{renderer_gl2 => renderer}/r_testmod.c (100%) rename src/{renderer_gl2 => renderer}/r_text.c (100%) rename src/{renderer_gl2 => renderer}/r_vertexbuffer.c (100%) rename src/{renderer_gl2 => renderer}/r_warp.c (100%) rename src/{renderer_gl2 => renderer}/r_world.c (100%) rename src/{renderer_gl2 => renderer}/renderer.def (100%) rename src/{renderer_gl2 => renderer}/warpsin.h (100%) rename src/{renderer_gl2 => renderer}/win_glw.h (100%) rename src/{renderer_gl2 => renderer}/win_opengl.c (99%) rename src/{renderer_gl2 => renderer}/win_qgl.c (100%) rename src/{renderer_gl2 => renderer}/win_qgl.h (100%) diff --git "a/build_map_aitest \342\200\224 kopia.BAT" "b/build_map_aitest \342\200\224 kopia.BAT" deleted file mode 100644 index 55d80cf2..00000000 --- "a/build_map_aitest \342\200\224 kopia.BAT" +++ /dev/null @@ -1,11 +0,0 @@ -cd ./tools/ericw-tools - -set gamedir=main -set mapfile=bench - -qbsp -qbism ../../build/%gamedir%/maps/%mapfile% -vis -threads 8 ../../build/%gamedir%/maps/%mapfile% -light -threads 8 -extra -bounce -dirt -world_units_per_luxel 4 ../../build/%gamedir%/maps/%mapfile% - -pause - diff --git "a/src/client/cl_temp_entities \342\200\224 kopia.c" "b/src/client/cl_temp_entities \342\200\224 kopia.c" deleted file mode 100644 index 56571cb9..00000000 --- "a/src/client/cl_temp_entities \342\200\224 kopia.c" +++ /dev/null @@ -1,1748 +0,0 @@ -/* -pragma -Copyright (C) 2023-2024 BraXi. - -Quake 2 Engine 'Id Tech 2' -Copyright (C) 1997-2001 Id Software, Inc. - -See the attached GNU General Public License v2 for more details. -*/ - -// cl_tent.c -- client side temporary entities - -#include "client.h" - -typedef enum -{ - ex_free, ex_explosion, ex_misc, ex_flash, ex_mflash, ex_poly, ex_poly2 -} exptype_t; - -#define MAX_EXPLOSIONS 64 -#define MAX_LASERS 64 -#define MAX_BEAMS 64 - -typedef struct -{ - exptype_t type; - rentity_t ent; - - int frames; - float light; - vec3_t lightcolor; - float start; - int baseframe; -} explosion_t; -explosion_t cl_explosions[MAX_EXPLOSIONS]; - -typedef struct -{ - int entity; - int dest_entity; - struct model_s *model; - int endtime; - vec3_t offset; - vec3_t start, end; -} beam_t; -beam_t cl_beams[MAX_BEAMS]; -beam_t cl_playerbeams[MAX_BEAMS];//PMM - added this for player-linked beams. Currently only used by the plasma beam - -typedef struct -{ - rentity_t ent; - int endtime; -} laser_t; -laser_t cl_lasers[MAX_LASERS]; - -cl_sustain_t cl_sustains[MAX_SUSTAINS]; - -extern void CL_TeleportParticles (vec3_t org); - -void CL_BlasterParticles (vec3_t org, vec3_t dir); -void CL_ExplosionParticles (vec3_t org); -void CL_BFGExplosionParticles (vec3_t org); -// RAFAEL - -struct sfx_s *cl_sfx_ric1; -struct sfx_s *cl_sfx_ric2; -struct sfx_s *cl_sfx_ric3; -struct sfx_s *cl_sfx_lashit; -struct sfx_s *cl_sfx_spark5; -struct sfx_s *cl_sfx_spark6; -struct sfx_s *cl_sfx_spark7; -struct sfx_s *cl_sfx_railg; -struct sfx_s *cl_sfx_rockexp; -struct sfx_s *cl_sfx_grenexp; -struct sfx_s *cl_sfx_watrexp; -// RAFAEL -struct sfx_s *cl_sfx_plasexp; -struct sfx_s *cl_sfx_footsteps[4]; - -struct model_s *cl_mod_explode; -struct model_s *cl_mod_impact_small; -struct model_s *cl_mod_parasite_segment; -struct model_s *cl_mod_grapple_cable; -struct model_s *cl_mod_parasite_tip; -struct model_s *cl_mod_explo4; -struct model_s *cl_mod_bfg_explo; -// RAFAEL -struct model_s *cl_mod_plasmaexplo; - -//ROGUE -struct sfx_s *cl_sfx_lightning; -struct sfx_s *cl_sfx_disrexp; -struct model_s *cl_mod_lightning; -struct model_s *cl_mod_heatbeam; -struct model_s *cl_mod_monster_heatbeam; -struct model_s *cl_mod_explo4_big; - - -struct model_s* cl_mod_view_muzzleflash; -struct model_s* cl_mod_world_muzzleflash; -//ROGUE -/* -================= -CL_RegisterTEntSounds -================= -*/ -void CL_RegisterTEntSounds (void) -{ - int i; - char name[MAX_QPATH]; - - - cl_sfx_ric1 = S_RegisterSound ("world/ric1.wav"); - cl_sfx_ric2 = S_RegisterSound ("world/ric2.wav"); - cl_sfx_ric3 = S_RegisterSound ("world/ric3.wav"); - cl_sfx_lashit = S_RegisterSound("weapons/lashit.wav"); - cl_sfx_spark5 = S_RegisterSound ("world/spark5.wav"); - cl_sfx_spark6 = S_RegisterSound ("world/spark6.wav"); - cl_sfx_spark7 = S_RegisterSound ("world/spark7.wav"); - cl_sfx_railg = S_RegisterSound ("weapons/railgf1a.wav"); - cl_sfx_rockexp = S_RegisterSound ("weapons/rocklx1a.wav"); - cl_sfx_grenexp = S_RegisterSound ("weapons/grenlx1a.wav"); - cl_sfx_watrexp = S_RegisterSound ("weapons/xpld_wat.wav"); - cl_sfx_lightning = S_RegisterSound("weapons/tesla.wav"); - cl_sfx_disrexp = S_RegisterSound("weapons/disrupthit.wav"); - - S_RegisterSound ("player/land1.wav"); - S_RegisterSound ("player/fall2.wav"); - S_RegisterSound ("player/fall1.wav"); - - for (i=0 ; i<4 ; i++) - { - Com_sprintf (name, sizeof(name), "player/step%i.wav", i+1); - cl_sfx_footsteps[i] = S_RegisterSound (name); - } - - -} - -/* -================= -CL_RegisterTEntModels -================= -*/ -void CL_RegisterTEntModels (void) -{ - cl_mod_view_muzzleflash = re.RegisterModel("models/fx/v_muzzleflash.md3"); - cl_mod_world_muzzleflash = re.RegisterModel("models/fx/w_muzzleflash.md3"); - - cl_mod_impact_small = re.RegisterModel("models/fx/impact_small.md3"); - - cl_mod_explode = NULL; // re.RegisterModel("sprites/explosion1.spr"); // re.RegisterModel("models/objects/explode/tris.md2"); - cl_mod_parasite_segment = NULL; // re.RegisterModel ("models/monsters/parasite/segment/tris.md2"); - cl_mod_grapple_cable = NULL; // re.RegisterModel ("models/ctf/segment/tris.md2"); - cl_mod_parasite_tip = NULL; // re.RegisterModel ("models/monsters/parasite/tip/tris.md2"); - cl_mod_explo4 = NULL; // re.RegisterModel ("models/objects/r_explode/tris.md2"); - cl_mod_bfg_explo = NULL; // re.RegisterModel ("sprites/s_bfg2.sp2"); - - cl_mod_explo4_big = NULL; // re.RegisterModel ("models/objects/r_explode2/tris.md2"); - cl_mod_lightning = NULL; // re.RegisterModel ("models/proj/lightning/tris.md2"); - cl_mod_heatbeam = NULL; // re.RegisterModel ("models/proj/beam/tris.md2"); - cl_mod_monster_heatbeam = NULL; // re.RegisterModel ("models/proj/widowbeam/tris.md2"); -} - -/* -================= -CL_ClearTEnts -================= -*/ -void CL_ClearTEnts (void) -{ - memset (cl_beams, 0, sizeof(cl_beams)); - memset (cl_explosions, 0, sizeof(cl_explosions)); - memset (cl_lasers, 0, sizeof(cl_lasers)); - memset (cl_playerbeams, 0, sizeof(cl_playerbeams)); - memset (cl_sustains, 0, sizeof(cl_sustains)); -} - -/* -================= -CL_AllocExplosion -================= -*/ -explosion_t *CL_AllocExplosion (void) -{ - int i; - int time; - int index; - - for (i = 0; i < MAX_EXPLOSIONS; i++) - { - if (cl_explosions[i].type == ex_free) - { - memset (&cl_explosions[i], 0, sizeof (cl_explosions[i])); - return &cl_explosions[i]; - } - } - -// find the oldest explosion - time = cl.time; - index = 0; - - for (i = 0; i < MAX_EXPLOSIONS; i++) - { - if (cl_explosions[i].start < time) - { - time = cl_explosions[i].start; - index = i; - } - } - memset (&cl_explosions[index], 0, sizeof (cl_explosions[index])); - return &cl_explosions[index]; -} - -/* -================= -CL_SmokeAndFlash -================= -*/ -void CL_SmokeAndFlash(vec3_t origin) -{ - - explosion_t *ex; - - ex = CL_AllocExplosion (); - VectorCopy (origin, ex->ent.origin); - ex->type = ex_flash; - ex->ent.renderfx = (RF_TRANSLUCENT|RF_FULLBRIGHT); - ex->ent.alpha = 0.7f; - ex->frames = 2; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->ent.model = cl_mod_impact_small; -} - -/* -================= -CL_ParseParticles -================= -*/ -void CL_ParseParticles (void) // UNUSED -{ - int count; - vec3_t pos, dir; - vec3_t color; - - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - - color[0] = MSG_ReadByte (&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - - count = MSG_ReadByte (&net_message); - - CL_ParticleEffect (pos, dir, color, count); -} - -/* -================= -CL_ParseBeam -================= -*/ -int CL_ParseBeam (struct model_s *model) -{ - int ent; - vec3_t start, end; - beam_t *b; - int i; - - ent = MSG_ReadShort (&net_message); - - MSG_ReadPos (&net_message, start); - MSG_ReadPos (&net_message, end); - -// override any beam with the same entity - for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++) - if (b->entity == ent) - { - b->entity = ent; - b->model = model; - b->endtime = cl.time + 200; - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorClear (b->offset); - return ent; - } - -// find a free beam - for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++) - { - if (!b->model || b->endtime < cl.time) - { - b->entity = ent; - b->model = model; - b->endtime = cl.time + 200; - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorClear (b->offset); - return ent; - } - } - Com_Printf ("beam list overflow!\n"); - return ent; -} - -/* -================= -CL_ParseBeam2 -================= -*/ -int CL_ParseBeam2 (struct model_s *model) -{ - int ent; - vec3_t start, end, offset; - beam_t *b; - int i; - - ent = MSG_ReadShort (&net_message); - - MSG_ReadPos (&net_message, start); - MSG_ReadPos (&net_message, end); - MSG_ReadPos (&net_message, offset); - -// Com_Printf ("end- %f %f %f\n", end[0], end[1], end[2]); - -// override any beam with the same entity - - for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++) - if (b->entity == ent) - { - b->entity = ent; - b->model = model; - b->endtime = cl.time + 200; - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorCopy (offset, b->offset); - return ent; - } - -// find a free beam - for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++) - { - if (!b->model || b->endtime < cl.time) - { - b->entity = ent; - b->model = model; - b->endtime = cl.time + 200; - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorCopy (offset, b->offset); - return ent; - } - } - Com_Printf ("beam list overflow!\n"); - return ent; -} - -// ROGUE -/* -================= -CL_ParsePlayerBeam - - adds to the cl_playerbeam array instead of the cl_beams array -================= -*/ -int CL_ParsePlayerBeam (struct model_s *model) -{ - int ent; - vec3_t start, end, offset; - beam_t *b; - int i; - - ent = MSG_ReadShort (&net_message); - - MSG_ReadPos (&net_message, start); - MSG_ReadPos (&net_message, end); - if (model == cl_mod_heatbeam) - { - VectorSet(offset, 2, 7, -3); // PMM - network optimization - } - else if (model == cl_mod_monster_heatbeam) - { - model = cl_mod_heatbeam; - VectorSet(offset, 0, 0, 0); - } - else - MSG_ReadPos (&net_message, offset); - -// Com_Printf ("end- %f %f %f\n", end[0], end[1], end[2]); - -// override any beam with the same entity -// PMM - For player beams, we only want one per player (entity) so.. - for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++) - { - if (b->entity == ent) - { - b->entity = ent; - b->model = model; - b->endtime = cl.time + 200; - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorCopy (offset, b->offset); - return ent; - } - } - -// find a free beam - for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++) - { - if (!b->model || b->endtime < cl.time) - { - b->entity = ent; - b->model = model; - b->endtime = cl.time + SV_FRAMETIME_MSEC; // PMM - this needs to be 100 to prevent multiple heatbeams - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorCopy (offset, b->offset); - return ent; - } - } - Com_Printf ("beam list overflow!\n"); - return ent; -} -//rogue - -/* -================= -CL_ParseLightning -================= -*/ -int CL_ParseLightning (struct model_s *model) -{ - int srcEnt, destEnt; - vec3_t start, end; - beam_t *b; - int i; - - srcEnt = MSG_ReadShort (&net_message); - destEnt = MSG_ReadShort (&net_message); - - MSG_ReadPos (&net_message, start); - MSG_ReadPos (&net_message, end); - -// override any beam with the same source AND destination entities - for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++) - if (b->entity == srcEnt && b->dest_entity == destEnt) - { -// Com_Printf("%d: OVERRIDE %d -> %d\n", cl.time, srcEnt, destEnt); - b->entity = srcEnt; - b->dest_entity = destEnt; - b->model = model; - b->endtime = cl.time + 200; - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorClear (b->offset); - return srcEnt; - } - -// find a free beam - for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++) - { - if (!b->model || b->endtime < cl.time) - { -// Com_Printf("%d: NORMAL %d -> %d\n", cl.time, srcEnt, destEnt); - b->entity = srcEnt; - b->dest_entity = destEnt; - b->model = model; - b->endtime = cl.time + 200; - VectorCopy (start, b->start); - VectorCopy (end, b->end); - VectorClear (b->offset); - return srcEnt; - } - } - Com_Printf ("beam list overflow!\n"); - return srcEnt; -} - -/* -================= -CL_ParseLaser -================= -*/ -void CL_ParseLaser (int colors) -{ - vec3_t start; - vec3_t end; - laser_t *l; - int i; - - MSG_ReadPos (&net_message, start); - MSG_ReadPos (&net_message, end); - - for (i=0, l=cl_lasers ; i< MAX_LASERS ; i++, l++) - { - if (l->endtime < cl.time) - { - l->ent.renderfx = RF_TRANSLUCENT | RF_BEAM; - VectorCopy (start, l->ent.origin); - VectorCopy (end, l->ent.oldorigin); - l->ent.alpha = 0.30; - l->ent.skinnum = (colors >> ((rand() % 4)*8)) & 0xff; - l->ent.model = NULL; - l->ent.frame = 4; - l->endtime = cl.time + SV_FRAMETIME_MSEC; - return; - } - } -} - -//============= -//ROGUE -void CL_ParseSteam (void) -{ - vec3_t pos, dir; - int id, i; - vec3_t color; //int r; - int cnt; - int magnitude; - cl_sustain_t *s, *free_sustain; - - id = MSG_ReadShort (&net_message); // an id of -1 is an instant effect - if (id != -1) // sustains - { -// Com_Printf ("Sustain effect id %d\n", id); - free_sustain = NULL; - for (i=0, s=cl_sustains; iid == 0) - { - free_sustain = s; - break; - } - } - if (free_sustain) - { - s->id = id; - s->count = MSG_ReadByte (&net_message); - MSG_ReadPos (&net_message, s->org); - MSG_ReadDir (&net_message, s->dir); - - color[0] = MSG_ReadByte (&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - VectorCopy(color, s->color);//s->color = r & 0xff; - - s->magnitude = MSG_ReadShort (&net_message); - s->endtime = cl.time + MSG_ReadLong (&net_message); - s->think = CL_ParticleSteamEffect2; - s->thinkinterval = SV_FRAMETIME_MSEC; - s->nextthink = cl.time; - } - else - { -// Com_Printf ("No free sustains!\n"); - // FIXME - read the stuff anyway - cnt = MSG_ReadByte (&net_message); - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - color[0] = MSG_ReadByte (&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - magnitude = MSG_ReadShort (&net_message); - magnitude = MSG_ReadLong (&net_message); // really interval - } - } - else // instant - { - cnt = MSG_ReadByte (&net_message); - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - color[0] = MSG_ReadByte(&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - magnitude = MSG_ReadShort (&net_message); - CL_ParticleSteamEffect (pos, dir, color, cnt, magnitude); - } -} - -void CL_ParseWidow (void) -{ - vec3_t pos; - int id, i; - cl_sustain_t *s, *free_sustain; - - id = MSG_ReadShort (&net_message); - - free_sustain = NULL; - for (i=0, s=cl_sustains; iid == 0) - { - free_sustain = s; - break; - } - } - if (free_sustain) - { - s->id = id; - MSG_ReadPos (&net_message, s->org); - s->endtime = cl.time + 2100; - s->think = CL_Widowbeamout; - s->thinkinterval = 1; - s->nextthink = cl.time; - } - else // no free sustains - { - // FIXME - read the stuff anyway - MSG_ReadPos (&net_message, pos); - } -} - -void CL_ParseNuke (void) -{ - vec3_t pos; - int i; - cl_sustain_t *s, *free_sustain; - - free_sustain = NULL; - for (i=0, s=cl_sustains; iid == 0) - { - free_sustain = s; - break; - } - } - if (free_sustain) - { - s->id = 21000; - MSG_ReadPos (&net_message, s->org); - s->endtime = cl.time + 1000; - s->think = CL_Nukeblast; - s->thinkinterval = 1; - s->nextthink = cl.time; - } - else // no free sustains - { - // FIXME - read the stuff anyway - MSG_ReadPos (&net_message, pos); - } -} - -//ROGUE -//============= - - -/* -================= -CL_ParseTEnt -================= -*/ -//static byte splash_color[] = {0x00, 0xe0, 0xb0, 0x50, 0xd0, 0xe0, 0xe8}; -static vec3_t splash_color[] = -{ - {0.0, 0.0, 0.0}, - {1.000000, 0.670588, 0.027451}, - {0.466667, 0.482353, 0.811765}, - {0.482353, 0.372549, 0.294118}, - {0.000000, 1.000000, 0.000000}, - {1.000000, 0.670588,0.027451}, - {0.607843, 0.121569, 0.000000} -}; - -void CL_ParseTEnt (void) -{ - int type; - vec3_t pos, pos2, dir; - explosion_t *ex; - int cnt; - vec3_t color; - int r; - int ent; - int magnitude; - - type = MSG_ReadByte (&net_message); - -// cgame->ParseTempEnt(type); - - switch (type) - { - case TE_BLOOD: // bullet hitting flesh - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - VectorSet(color, 0.607843, 0.121569, 0.000000); - CL_ParticleEffect (pos, dir, color, 60); - break; - - case TE_GUNSHOT: // bullet hitting wall - case TE_SPARKS: - case TE_BULLET_SPARKS: - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - if (type == TE_GUNSHOT) - { - VectorSet(color, 0.6, 0.5, 0.5); - CL_ParticleEffect(pos, dir, color, 40); - } - else - { - VectorSet(color, 1.000000, 0.670588, 0.027451); - CL_ParticleEffect(pos, dir, color, 6); - } - - - if (type != TE_SPARKS) - { - CL_SmokeAndFlash(pos); - - // impact sound - cnt = rand()&15; - if (cnt == 1) - S_StartSound (pos, 0, 0, cl_sfx_ric1, 1, ATTN_NORM, 0); - else if (cnt == 2) - S_StartSound (pos, 0, 0, cl_sfx_ric2, 1, ATTN_NORM, 0); - else if (cnt == 3) - S_StartSound (pos, 0, 0, cl_sfx_ric3, 1, ATTN_NORM, 0); - } - - break; - - case TE_SCREEN_SPARKS: - case TE_SHIELD_SPARKS: - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - if (type == TE_SCREEN_SPARKS) - VectorSet(color, 0.000000, 1.000000, 0.000000); - else - VectorSet(color, 0.466667, 0.482353, 0.811765); - CL_ParticleEffect(pos, dir, color, 40); - //FIXME : replace or remove this sound - S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); - break; - - case TE_FLAME: - MSG_ReadPos(&net_message, pos); - CL_FlameEffects(NULL, pos); - break; - - case TE_SHOTGUN: // bullet hitting wall - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - VectorSet(color, 0.000000, 0.000000, 0.000000); - CL_ParticleEffect (pos, dir, color, 20); - CL_SmokeAndFlash(pos); - break; - - case TE_SPLASH: // bullet hitting water - cnt = MSG_ReadByte (&net_message); - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - r = MSG_ReadByte (&net_message); - if (r > 6) - VectorClear(color); // color = 0x00; - else - VectorCopy(splash_color[r], color); - - CL_ParticleEffect (pos, dir, color, cnt); - - if (r == SPLASH_SPARKS) - { - r = rand() & 3; - if (r == 0) - S_StartSound (pos, 0, 0, cl_sfx_spark5, 1, ATTN_STATIC, 0); - else if (r == 1) - S_StartSound (pos, 0, 0, cl_sfx_spark6, 1, ATTN_STATIC, 0); - else - S_StartSound (pos, 0, 0, cl_sfx_spark7, 1, ATTN_STATIC, 0); - } - break; - - case TE_LASER_SPARKS: - cnt = MSG_ReadByte (&net_message); - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - color[0] = MSG_ReadByte (&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - CL_ParticleEffect2 (pos, dir, color, cnt); - break; - - // RAFAEL - case TE_BLUEHYPERBLASTER: - MSG_ReadPos (&net_message, pos); - MSG_ReadPos (&net_message, dir); - CL_BlasterParticles (pos, dir); - break; - - case TE_BLASTER: // blaster hitting wall - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - CL_BlasterParticles (pos, dir); - - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->ent.angles[0] = acos(dir[2])/M_PI*180; - // PMM - fixed to correct for pitch of 0 - if (dir[0]) - ex->ent.angles[1] = atan2(dir[1], dir[0])/M_PI*180; - else if (dir[1] > 0) - ex->ent.angles[1] = 90; - else if (dir[1] < 0) - ex->ent.angles[1] = 270; - else - ex->ent.angles[1] = 0; - - ex->type = ex_misc; - ex->ent.renderfx = RF_FULLBRIGHT|RF_TRANSLUCENT; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 150; - ex->lightcolor[0] = 1; - ex->lightcolor[1] = 1; - ex->ent.model = cl_mod_explode; - ex->frames = 4; - S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); - break; - - case TE_RAILTRAIL: // railgun effect - MSG_ReadPos (&net_message, pos); - MSG_ReadPos (&net_message, pos2); - CL_RailTrail (pos, pos2); - S_StartSound (pos2, 0, 0, cl_sfx_railg, 1, ATTN_NORM, 0); - break; - - case TE_EXPLOSION2: - case TE_GRENADE_EXPLOSION: - case TE_GRENADE_EXPLOSION_WATER: - MSG_ReadPos (&net_message, pos); - - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->type = ex_poly; - ex->ent.renderfx = RF_FULLBRIGHT; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 350; - ex->lightcolor[0] = 1.0; - ex->lightcolor[1] = 0.5; - ex->lightcolor[2] = 0.5; - ex->ent.model = cl_mod_explo4; - ex->frames = 19; - ex->baseframe = 30; - ex->ent.angles[1] = rand() % 360; - CL_ExplosionParticles (pos); - if (type == TE_GRENADE_EXPLOSION_WATER) - S_StartSound (pos, 0, 0, cl_sfx_watrexp, 1, ATTN_NORM, 0); - else - S_StartSound (pos, 0, 0, cl_sfx_grenexp, 1, ATTN_NORM, 0); - break; - - // RAFAEL - case TE_PLASMA_EXPLOSION: - MSG_ReadPos (&net_message, pos); - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->type = ex_poly; - ex->ent.renderfx = RF_FULLBRIGHT; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 350; - ex->lightcolor[0] = 1.0; - ex->lightcolor[1] = 0.5; - ex->lightcolor[2] = 0.5; - ex->ent.angles[1] = rand() % 360; - ex->ent.model = cl_mod_explo4; - if (frand() < 0.5) - ex->baseframe = 15; - ex->frames = 15; - CL_ExplosionParticles (pos); - S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0); - break; - - case TE_EXPLOSION1: - MSG_ReadPos(&net_message, pos); - extern void CL_ExplosionParticles(vec3_t org); - CL_ExplosionParticles(pos); - - ex = CL_AllocExplosion(); - VectorCopy(pos, ex->ent.origin); - ex->type = ex_flash; - ex->frames = 10; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 100 + (rand() % 75); - VectorSet(ex->lightcolor, 1.000000, 0.670588, 0.027451); - break; - - case TE_EXPLOSION1_BIG: // PMM - case TE_ROCKET_EXPLOSION: - case TE_ROCKET_EXPLOSION_WATER: - case TE_EXPLOSION1_NP: // PMM - MSG_ReadPos (&net_message, pos); - - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->type = ex_poly; - ex->ent.renderfx = RF_FULLBRIGHT; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 350; - ex->lightcolor[0] = 1.0; - ex->lightcolor[1] = 0.5; - ex->lightcolor[2] = 0.5; - ex->ent.angles[1] = rand() % 360; - if (type != TE_EXPLOSION1_BIG) // PMM - ex->ent.model = cl_mod_explo4; // PMM - else - ex->ent.model = cl_mod_explo4_big; - if (frand() < 0.5) - ex->baseframe = 15; - ex->frames = 15; - if ((type != TE_EXPLOSION1_BIG) && (type != TE_EXPLOSION1_NP)) // PMM - CL_ExplosionParticles (pos); // PMM - if (type == TE_ROCKET_EXPLOSION_WATER) - S_StartSound (pos, 0, 0, cl_sfx_watrexp, 1, ATTN_NORM, 0); - else - S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0); - break; - - case TE_BFG_EXPLOSION: - MSG_ReadPos (&net_message, pos); - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->type = ex_poly; - ex->ent.renderfx = RF_FULLBRIGHT; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 350; - ex->lightcolor[0] = 0.0; - ex->lightcolor[1] = 1.0; - ex->lightcolor[2] = 0.0; - ex->ent.model = cl_mod_bfg_explo; - ex->ent.renderfx |= RF_TRANSLUCENT; - ex->ent.alpha = 0.30; - ex->frames = 4; - break; - - case TE_BFG_BIGEXPLOSION: - MSG_ReadPos (&net_message, pos); - CL_BFGExplosionParticles (pos); - break; - - case TE_BFG_LASER: - CL_ParseLaser (0xd0d1d2d3); - break; - - case TE_BUBBLETRAIL: - MSG_ReadPos (&net_message, pos); - MSG_ReadPos (&net_message, pos2); - CL_BubbleTrail (pos, pos2); - break; - - case TE_PARASITE_ATTACK: - case TE_MEDIC_CABLE_ATTACK: - ent = CL_ParseBeam (cl_mod_parasite_segment); - break; - - case TE_BOSSTPORT: // boss teleporting to station - MSG_ReadPos (&net_message, pos); - CL_BigTeleportParticles (pos); - S_StartSound (pos, 0, 0, S_RegisterSound ("effects/teleport.wav"), 1, ATTN_NONE, 0); - break; - - case TE_GRAPPLE_CABLE: - ent = CL_ParseBeam2 (cl_mod_grapple_cable); - break; - - // RAFAEL - case TE_WELDING_SPARKS: - cnt = MSG_ReadByte (&net_message); - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - color[0] = MSG_ReadByte(&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - CL_ParticleEffect2 (pos, dir, color, cnt); - - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->type = ex_flash; - // note to self - // we need a better no draw flag - ex->ent.renderfx = RF_BEAM; - ex->start = cl.frame.servertime - 0.1; - ex->light = 100 + (rand()%75); - ex->lightcolor[0] = 1.0; - ex->lightcolor[1] = 1.0; - ex->lightcolor[2] = 0.3; - ex->ent.model = cl_mod_impact_small; - ex->frames = 2; - break; - - case TE_GREENBLOOD: - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - VectorSet(color, 1.000000, 0.749020, 0.058824); - CL_ParticleEffect2 (pos, dir, color, 30); - break; - - // RAFAEL - case TE_TUNNEL_SPARKS: - cnt = MSG_ReadByte (&net_message); - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - color[0] = MSG_ReadByte(&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - CL_ParticleEffect3 (pos, dir, color, cnt); - break; - -//============= -//PGM - // PMM -following code integrated for flechette (different color) - case TE_BLASTER2: // green blaster hitting wall - case TE_FLECHETTE: // flechette - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - - // PMM - if (type == TE_BLASTER2) - VectorSet(color, 0.000000, 1.000000, 0.000000); - else - VectorSet(color, 0.529412, 0.654902, 0.717647); - - CL_BlasterParticles2(pos, dir, color); - - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->ent.angles[0] = acos(dir[2])/M_PI*180; - // PMM - fixed to correct for pitch of 0 - if (dir[0]) - ex->ent.angles[1] = atan2(dir[1], dir[0])/M_PI*180; - else if (dir[1] > 0) - ex->ent.angles[1] = 90; - else if (dir[1] < 0) - ex->ent.angles[1] = 270; - else - ex->ent.angles[1] = 0; - - ex->type = ex_misc; - ex->ent.renderfx = RF_FULLBRIGHT|RF_TRANSLUCENT; - - // PMM - if (type == TE_BLASTER2) - ex->ent.skinnum = 1; - else // flechette - ex->ent.skinnum = 2; - - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 150; - // PMM - if (type == TE_BLASTER2) - ex->lightcolor[1] = 1; - else // flechette - { - ex->lightcolor[0] = 0.19; - ex->lightcolor[1] = 0.41; - ex->lightcolor[2] = 0.75; - } - ex->ent.model = cl_mod_explode; - ex->frames = 4; - S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); - break; - - - case TE_LIGHTNING: - ent = CL_ParseLightning (cl_mod_lightning); - S_StartSound (NULL, ent, CHAN_WEAPON, cl_sfx_lightning, 1, ATTN_NORM, 0); - break; - - case TE_DEBUGTRAIL: - MSG_ReadPos (&net_message, pos); - MSG_ReadPos (&net_message, pos2); - CL_DebugTrail (pos, pos2); - break; - - case TE_PLAIN_EXPLOSION: - MSG_ReadPos (&net_message, pos); - - ex = CL_AllocExplosion (); - VectorCopy (pos, ex->ent.origin); - ex->type = ex_poly; - ex->ent.renderfx = RF_FULLBRIGHT; - ex->start = cl.frame.servertime - SV_FRAMETIME_MSEC; - ex->light = 350; - ex->lightcolor[0] = 1.0; - ex->lightcolor[1] = 0.5; - ex->lightcolor[2] = 0.5; - ex->ent.angles[1] = rand() % 360; - ex->ent.model = cl_mod_explo4; - if (frand() < 0.5) - ex->baseframe = 15; - ex->frames = 15; - if (type == TE_ROCKET_EXPLOSION_WATER) - S_StartSound (pos, 0, 0, cl_sfx_watrexp, 1, ATTN_NORM, 0); - else - S_StartSound (pos, 0, 0, cl_sfx_rockexp, 1, ATTN_NORM, 0); - break; - - case TE_FLASHLIGHT: - MSG_ReadPos(&net_message, pos); - ent = MSG_ReadShort(&net_message); - CL_Flashlight(ent, pos); - break; - - case TE_FORCEWALL: - MSG_ReadPos(&net_message, pos); - MSG_ReadPos(&net_message, pos2); - color[0] = MSG_ReadByte (&net_message) / 255.0; - color[1] = MSG_ReadByte(&net_message) / 255.0; - color[2] = MSG_ReadByte(&net_message) / 255.0; - //color = MSG_ReadByte (&net_message); - CL_ForceWall(pos, pos2, color); - break; - - case TE_HEATBEAM: - ent = CL_ParsePlayerBeam (cl_mod_heatbeam); - break; - - case TE_MONSTER_HEATBEAM: - ent = CL_ParsePlayerBeam (cl_mod_monster_heatbeam); - break; - - case TE_HEATBEAM_SPARKS: - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - cnt = 50; // cnt = MSG_ReadByte (&net_message); - magnitude = 60; // magnitude = MSG_ReadShort (&net_message); - VectorSet(color, 0.482353, 0.482353, 0.482353); - CL_ParticleSteamEffect (pos, dir, color, cnt, magnitude); - S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); - break; - - case TE_HEATBEAM_STEAM: - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - cnt = 20; - VectorSet(color, 1.000000, 0.670588, 0.027451); - magnitude = 60; - CL_ParticleSteamEffect (pos, dir, color, cnt, magnitude); - S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); - break; - - case TE_STEAM: - CL_ParseSteam(); - break; - - case TE_BUBBLETRAIL2: - cnt = 8; - MSG_ReadPos (&net_message, pos); - MSG_ReadPos (&net_message, pos2); - CL_BubbleTrail2 (pos, pos2, cnt); - S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); - break; - - case TE_MOREBLOOD: - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - VectorSet(color, 0.607843, 0.121569, 0.000000); - CL_ParticleEffect (pos, dir, color, 250); - break; - - case TE_CHAINFIST_SMOKE: - dir[0]=0; dir[1]=0; dir[2]=1; - MSG_ReadPos(&net_message, pos); - CL_ParticleSmokeEffect (pos, dir, 0, 20, 20); - break; - - case TE_ELECTRIC_SPARKS: - MSG_ReadPos (&net_message, pos); - MSG_ReadDir (&net_message, dir); - VectorSet(color, 0.074510, 0.294118, 0.403922); - CL_ParticleEffect (pos, dir, color, 40); - //FIXME : replace or remove this sound - S_StartSound (pos, 0, 0, cl_sfx_lashit, 1, ATTN_NORM, 0); - break; - - case TE_TRACKER_EXPLOSION: - MSG_ReadPos (&net_message, pos); - CL_ColorFlash (pos, 0, 150, -1, -1, -1); - VectorClear(color); - CL_ColorExplosionParticles (pos, color); - S_StartSound (pos, 0, 0, cl_sfx_disrexp, 1, ATTN_NORM, 0); - break; - - case TE_TELEPORT_EFFECT: - case TE_DBALL_GOAL: - MSG_ReadPos (&net_message, pos); - CL_TeleportParticles (pos); - break; - - case TE_WIDOWBEAMOUT: - CL_ParseWidow (); - break; - - case TE_NUKEBLAST: - CL_ParseNuke (); - break; - - case TE_WIDOWSPLASH: - MSG_ReadPos (&net_message, pos); - CL_WidowSplash (pos); - break; -//PGM -//============== - - default: - Com_Error (ERR_DROP, "CL_ParseTEnt: bad temp entity %i\n", type); - } -} - -/* -================= -CL_AddBeams -================= -*/ -void CL_AddBeams (void) -{ - int i,j; - beam_t *b; - vec3_t dist, org; - float d; - rentity_t ent; - float yaw, pitch; - float forward; - float len, steps; - float model_length; - -// update beams - for (i=0, b=cl_beams ; i< MAX_BEAMS ; i++, b++) - { - if (!b->model || b->endtime < cl.time) - continue; - - // if coming from the player, update the start position - if (b->entity == cl.playernum+1) // entity 0 is the world - { - VectorCopy (cl.refdef.vieworg, b->start); - b->start[2] -= 22; // adjust for view height - } - VectorAdd (b->start, b->offset, org); - - // calculate pitch and yaw - VectorSubtract (b->end, org, dist); - - if (dist[1] == 0 && dist[0] == 0) - { - yaw = 0; - if (dist[2] > 0) - pitch = 90; - else - pitch = 270; - } - else - { - // PMM - fixed to correct for pitch of 0 - if (dist[0]) - yaw = (atan2(dist[1], dist[0]) * 180 / M_PI); - else if (dist[1] > 0) - yaw = 90; - else - yaw = 270; - if (yaw < 0) - yaw += 360; - - forward = sqrt (dist[0]*dist[0] + dist[1]*dist[1]); - pitch = (atan2(dist[2], forward) * -180.0 / M_PI); - if (pitch < 0) - pitch += 360.0; - } - - // add new entities for the beams - d = VectorNormalize(dist); - - memset (&ent, 0, sizeof(ent)); - if (b->model == cl_mod_lightning) - { - model_length = 35.0; - d-= 20.0; // correction so it doesn't end in middle of tesla - } - else - { - model_length = 30.0; - } - steps = ceil(d/model_length); - len = (d-model_length)/(steps-1); - - // PMM - special case for lightning model .. if the real length is shorter than the model, - // flip it around & draw it from the end to the start. This prevents the model from going - // through the tesla mine (instead it goes through the target) - if ((b->model == cl_mod_lightning) && (d <= model_length)) - { -// Com_Printf ("special case\n"); - VectorCopy (b->end, ent.origin); - // offset to push beam outside of tesla model (negative because dist is from end to start - // for this beam) -// for (j=0 ; j<3 ; j++) -// ent.origin[j] -= dist[j]*10.0; - ent.model = b->model; - ent.renderfx = RF_FULLBRIGHT; - ent.angles[0] = pitch; - ent.angles[1] = yaw; - ent.angles[2] = rand()%360; - V_AddEntity (&ent); - return; - } - while (d > 0) - { - VectorCopy (org, ent.origin); - ent.model = b->model; - if (b->model == cl_mod_lightning) - { - ent.renderfx = RF_FULLBRIGHT; - ent.angles[0] = -pitch; - ent.angles[1] = yaw + 180.0; - ent.angles[2] = rand()%360; - } - else - { - ent.angles[0] = pitch; - ent.angles[1] = yaw; - ent.angles[2] = rand()%360; - } - -// Com_Printf("B: %d -> %d\n", b->entity, b->dest_entity); - V_AddEntity (&ent); - - for (j=0 ; j<3 ; j++) - org[j] += dist[j]*len; - d -= model_length; - } - } -} - - -/* -// Com_Printf ("Endpoint: %f %f %f\n", b->end[0], b->end[1], b->end[2]); -// Com_Printf ("Pred View Angles: %f %f %f\n", cl.predicted_angles[0], cl.predicted_angles[1], cl.predicted_angles[2]); -// Com_Printf ("Act View Angles: %f %f %f\n", cl.refdef.viewangles[0], cl.refdef.viewangles[1], cl.refdef.viewangles[2]); -// VectorCopy (cl.predicted_origin, b->start); -// b->start[2] += 22; // adjust for view height -// if (fabs(cl.refdef.vieworg[2] - b->start[2]) >= 10) { -// b->start[2] = cl.refdef.vieworg[2]; -// } - -// Com_Printf ("Time: %d %d %f\n", cl.time, cls.realtime, cls.frametime); -*/ - -extern cvar_t *cl_hand; - -/* -================= -ROGUE - draw player locked beams -CL_AddPlayerBeams -================= -*/ -void CL_AddPlayerBeams (void) -{ - int i,j; - beam_t *b; - vec3_t dist, org; - float d; - rentity_t ent; - float yaw, pitch; - float forward; - float len, steps; - int framenum; - float model_length; - - float hand_multiplier; - frame_t *oldframe; - player_state_t *ps, *ops; - -//PMM - if (cl_hand) - { - if (cl_hand->value == 2) - hand_multiplier = 0; - else if (cl_hand->value == 1) - hand_multiplier = -1; - else - hand_multiplier = 1; - } - else - { - hand_multiplier = 1; - } -//PMM - -// update beams - for (i=0, b=cl_playerbeams ; i< MAX_BEAMS ; i++, b++) - { - vec3_t f,r,u; - if (!b->model || b->endtime < cl.time) - continue; - - if(cl_mod_heatbeam && (b->model == cl_mod_heatbeam)) - { - - // if coming from the player, update the start position - if (b->entity == cl.playernum+1) // entity 0 is the world - { - // set up gun position - // code straight out of CL_AddViewWeapon - ps = &cl.frame.playerstate; - j = (cl.frame.serverframe - 1) & UPDATE_MASK; - oldframe = &cl.frames[j]; - if (oldframe->serverframe != cl.frame.serverframe-1 || !oldframe->valid) - oldframe = &cl.frame; // previous frame was dropped or involid - ops = &oldframe->playerstate; - for (j=0 ; j<3 ; j++) - { - b->start[j] = cl.refdef.vieworg[j] + ops->viewmodel_offset[j] - + cl.lerpfrac * (ps->viewmodel_offset[j] - ops->viewmodel_offset[j]); - } - VectorMA (b->start, (hand_multiplier * b->offset[0]), cl.v_right, org); - VectorMA ( org, b->offset[1], cl.v_forward, org); - VectorMA ( org, b->offset[2], cl.v_up, org); - if ((cl_hand) && (cl_hand->value == 2)) { - VectorMA (org, -1, cl.v_up, org); - } - // FIXME - take these out when final - VectorCopy (cl.v_right, r); - VectorCopy (cl.v_forward, f); - VectorCopy (cl.v_up, u); - - } - else - VectorCopy (b->start, org); - } - else - { - // if coming from the player, update the start position - if (b->entity == cl.playernum+1) // entity 0 is the world - { - VectorCopy (cl.refdef.vieworg, b->start); - b->start[2] -= 22; // adjust for view height - } - VectorAdd (b->start, b->offset, org); - } - - // calculate pitch and yaw - VectorSubtract (b->end, org, dist); - -//PMM - if(cl_mod_heatbeam && (b->model == cl_mod_heatbeam) && (b->entity == cl.playernum+1)) - { - vec_t len; - - len = VectorLength (dist); - VectorScale (f, len, dist); - VectorMA (dist, (hand_multiplier * b->offset[0]), r, dist); - VectorMA (dist, b->offset[1], f, dist); - VectorMA (dist, b->offset[2], u, dist); - if ((cl_hand) && (cl_hand->value == 2)) { - VectorMA (org, -1, cl.v_up, org); - } - } -//PMM - - if (dist[1] == 0 && dist[0] == 0) - { - yaw = 0; - if (dist[2] > 0) - pitch = 90; - else - pitch = 270; - } - else - { - // PMM - fixed to correct for pitch of 0 - if (dist[0]) - yaw = (atan2(dist[1], dist[0]) * 180 / M_PI); - else if (dist[1] > 0) - yaw = 90; - else - yaw = 270; - if (yaw < 0) - yaw += 360; - - forward = sqrt (dist[0]*dist[0] + dist[1]*dist[1]); - pitch = (atan2(dist[2], forward) * -180.0 / M_PI); - if (pitch < 0) - pitch += 360.0; - } - - if (cl_mod_heatbeam && (b->model == cl_mod_heatbeam)) - { - if (b->entity != cl.playernum+1) - { - framenum = 2; -// Com_Printf ("Third person\n"); - ent.angles[0] = -pitch; - ent.angles[1] = yaw + 180.0; - ent.angles[2] = 0; -// Com_Printf ("%f %f - %f %f %f\n", -pitch, yaw+180.0, b->offset[0], b->offset[1], b->offset[2]); - AngleVectors(ent.angles, f, r, u); - - // if it's a non-origin offset, it's a player, so use the hardcoded player offset - if (!VectorCompare (b->offset, vec3_origin)) - { - VectorMA (org, -(b->offset[0])+1, r, org); - VectorMA (org, -(b->offset[1]), f, org); - VectorMA (org, -(b->offset[2])-10, u, org); - } - else - { - // if it's a monster, do the particle effect - CL_MonsterPlasma_Shell(b->start); - } - } - else - { - framenum = 1; - } - } - - // if it's the heatbeam, draw the particle effect - if ((cl_mod_heatbeam && (b->model == cl_mod_heatbeam) && (b->entity == cl.playernum+1))) - { - CL_Heatbeam (org, dist); - } - - // add new entities for the beams - d = VectorNormalize(dist); - - memset (&ent, 0, sizeof(ent)); - if (b->model == cl_mod_heatbeam) - { - model_length = 32.0; - } - else if (b->model == cl_mod_lightning) - { - model_length = 35.0; - d-= 20.0; // correction so it doesn't end in middle of tesla - } - else - { - model_length = 30.0; - } - steps = ceil(d/model_length); - len = (d-model_length)/(steps-1); - - // PMM - special case for lightning model .. if the real length is shorter than the model, - // flip it around & draw it from the end to the start. This prevents the model from going - // through the tesla mine (instead it goes through the target) - if ((b->model == cl_mod_lightning) && (d <= model_length)) - { -// Com_Printf ("special case\n"); - VectorCopy (b->end, ent.origin); - // offset to push beam outside of tesla model (negative because dist is from end to start - // for this beam) -// for (j=0 ; j<3 ; j++) -// ent.origin[j] -= dist[j]*10.0; - ent.model = b->model; - ent.renderfx = RF_FULLBRIGHT; - ent.angles[0] = pitch; - ent.angles[1] = yaw; - ent.angles[2] = rand()%360; - V_AddEntity (&ent); - return; - } - while (d > 0) - { - VectorCopy (org, ent.origin); - ent.model = b->model; - if(cl_mod_heatbeam && (b->model == cl_mod_heatbeam)) - { -// ent.flags = RF_FULLBRIGHT|RF_TRANSLUCENT; -// ent.alpha = 0.3; - ent.renderfx = RF_FULLBRIGHT; - ent.angles[0] = -pitch; - ent.angles[1] = yaw + 180.0; - ent.angles[2] = (cl.time) % 360; -// ent.angles[2] = rand()%360; - ent.frame = framenum; - } - else if (b->model == cl_mod_lightning) - { - ent.renderfx = RF_FULLBRIGHT; - ent.angles[0] = -pitch; - ent.angles[1] = yaw + 180.0; - ent.angles[2] = rand()%360; - } - else - { - ent.angles[0] = pitch; - ent.angles[1] = yaw; - ent.angles[2] = rand()%360; - } - -// Com_Printf("B: %d -> %d\n", b->entity, b->dest_entity); - V_AddEntity (&ent); - - for (j=0 ; j<3 ; j++) - org[j] += dist[j]*len; - d -= model_length; - } - } -} - -/* -================= -CL_AddExplosions -================= -*/ -void CL_AddExplosions (void) -{ - rentity_t *ent; - int i; - explosion_t *ex; - float frac; - int f; - - memset (&ent, 0, sizeof(ent)); - - for (i=0, ex=cl_explosions ; i< MAX_EXPLOSIONS ; i++, ex++) - { - if (ex->type == ex_free) - continue; - frac = (cl.time - ex->start)/SV_FRAMETIME_MSEC; - f = floor(frac); - - ent = &ex->ent; - - switch (ex->type) - { - case ex_mflash: - if (f >= ex->frames-1) - ex->type = ex_free; - break; - case ex_misc: - if (f >= ex->frames-1) - { - ex->type = ex_free; - break; - } - ent->alpha = 1.0 - frac/(ex->frames-1); - break; - case ex_flash: - if (f >= 1) - { - ex->type = ex_free; - break; - } - ent->alpha = 1.0; - break; - case ex_poly: - if (f >= ex->frames-1) - { - ex->type = ex_free; - break; - } - - ent->alpha = (16.0 - (float)f)/16.0; - - if (f < 10) - { - ent->skinnum = (f>>1); - if (ent->skinnum < 0) - ent->skinnum = 0; - } - else - { - ent->renderfx |= RF_TRANSLUCENT; - if (f < 13) - ent->skinnum = 5; - else - ent->skinnum = 6; - } - break; - case ex_poly2: - if (f >= ex->frames-1) - { - ex->type = ex_free; - break; - } - - ent->alpha = (5.0 - (float)f)/5.0; - ent->skinnum = 0; - ent->renderfx |= RF_TRANSLUCENT; - break; - } - - if (ex->type == ex_free) - continue; - if (ex->light) - { - V_AddLight (ent->origin, ex->light*ent->alpha, - ex->lightcolor[0], ex->lightcolor[1], ex->lightcolor[2]); - } - - VectorCopy (ent->origin, ent->oldorigin); - - if (f < 0) - f = 0; - ent->frame = ex->baseframe + f + 1; - ent->oldframe = ex->baseframe + f; - ent->backlerp = 1.0 - cl.lerpfrac; - - V_AddEntity (ent); - } -} - - -/* -================= -CL_AddLasers -================= -*/ -void CL_AddLasers (void) -{ - laser_t *l; - int i; - - for (i=0, l=cl_lasers ; i< MAX_LASERS ; i++, l++) - { - if (l->endtime >= cl.time) - V_AddEntity (&l->ent); - } -} - -/* PMM - CL_Sustains */ -void CL_ProcessSustain () -{ - cl_sustain_t *s; - int i; - - for (i=0, s=cl_sustains; i< MAX_SUSTAINS; i++, s++) - { - if (s->id) - if ((s->endtime >= cl.time) && (cl.time >= s->nextthink)) - { -// Com_Printf ("think %d %d %d\n", cl.time, s->v.nextthink, s->thinkinterval); - s->think (s); - } - else if (s->endtime < cl.time) - s->id = 0; - } -} - -/* -================= -CL_AddTEnts -================= -*/ -void CL_AddTEnts (void) -{ - CL_AddBeams (); - CL_AddPlayerBeams (); - CL_AddExplosions (); - CL_AddLasers (); - CL_ProcessSustain(); -} diff --git a/src/engine.vcxproj.filters b/src/engine.vcxproj.filters deleted file mode 100644 index 475a062c..00000000 --- a/src/engine.vcxproj.filters +++ /dev/null @@ -1,383 +0,0 @@ - - - - - client - - - client - - - client - - - client - - - client - - - client - - - client - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - common - - - platform - - - platform - - - platform - - - platform - - - platform - - - client - - - server - - - server - - - server - - - server - - - server - - - server - - - server - - - server - - - server - - - server - - - script - - - script - - - script - - - script - - - common - - - script - - - script - - - server - - - platform - - - client - - - server - - - client - - - client - - - server - - - server - - - common - - - client\cgame - - - client\cgame - - - client\ui - - - client\ui - - - client\ui - - - client - - - client\sound - - - client\sound - - - client\sound - - - client\fx - - - client\fx - - - client\fx - - - common - - - common - - - client\cgame - - - client\cgame - - - client\cgame - - - client\cgame - - - client\cgame - - - client\cgame - - - client\cgame - - - client\cgame - - - client\cgame - - - client\cgame - - - common - - - client\ui - - - client\cgame - - - client\cgame - - - common - - - - - client - - - client - - - client - - - client - - - client - - - client - - - server - - - server - - - script\headers - - - script\headers - - - script\headers - - - script\headers - - - script\headers - - - - script\headers - - - client\cgame - - - client\ui - - - client\ui - - - platform - - - client\sound - - - client\sound - - - client\fx - - - client\fx - - - client\cgame - - - client\cgame - - - common\inc - - - common\inc - - - common\inc - - - common\inc - - - common\inc - - - common\inc - - - common\inc - - - common\inc - - - common\inc - - - common - - - - - {1f586665-606b-4ad1-8e64-423c2089dc00} - - - {e064b09a-a4a4-4118-aa1a-e17a8c7f8413} - - - {3b3b4053-c0a8-4a0c-905c-91c3ac014760} - - - {fbe0844a-3483-4415-a6d0-02601ee598a6} - - - {5c3969ca-48d6-4121-895a-6b6a5db6767f} - - - {2b77c318-d5b8-47fd-99a7-de7f1659962e} - - - {355b264e-e96f-43f9-94c4-037e89a2a0e8} - - - {120cfd9c-8355-44d1-9928-17e8d0cbd104} - - - {6e289b86-d0c0-4358-a264-2e3f559db208} - - - {97e6b15e-4c1a-4883-95cb-0316412def22} - - - {d8b52cc2-7cf6-4c38-b50e-cbe4e63d2083} - - - - - platform - - - - - platform - - - \ No newline at end of file diff --git a/src/null/cl_null.c b/src/engine/OLD/null/cl_null.c similarity index 100% rename from src/null/cl_null.c rename to src/engine/OLD/null/cl_null.c diff --git a/src/null/glimp_null.c b/src/engine/OLD/null/glimp_null.c similarity index 100% rename from src/null/glimp_null.c rename to src/engine/OLD/null/glimp_null.c diff --git a/src/null/in_null.c b/src/engine/OLD/null/in_null.c similarity index 100% rename from src/null/in_null.c rename to src/engine/OLD/null/in_null.c diff --git a/src/null/snddma_null.c b/src/engine/OLD/null/snddma_null.c similarity index 100% rename from src/null/snddma_null.c rename to src/engine/OLD/null/snddma_null.c diff --git a/src/null/sys_null.c b/src/engine/OLD/null/sys_null.c similarity index 100% rename from src/null/sys_null.c rename to src/engine/OLD/null/sys_null.c diff --git a/src/null/vid_null.c b/src/engine/OLD/null/vid_null.c similarity index 100% rename from src/null/vid_null.c rename to src/engine/OLD/null/vid_null.c diff --git a/src/pragma_server.vcxproj.filters b/src/engine/OLD/pragma_dedsv.vcxproj.filters similarity index 100% rename from src/pragma_server.vcxproj.filters rename to src/engine/OLD/pragma_dedsv.vcxproj.filters diff --git a/src/pragma_server.vcxproj b/src/engine/OLD/pragma_dedsv.vcxproj.vcxproj similarity index 100% rename from src/pragma_server.vcxproj rename to src/engine/OLD/pragma_dedsv.vcxproj.vcxproj diff --git a/src/client/cgame/cg_builtins.c b/src/engine/client/cgame/cg_builtins.c similarity index 100% rename from src/client/cgame/cg_builtins.c rename to src/engine/client/cgame/cg_builtins.c diff --git a/src/client/cgame/cg_dlights.c b/src/engine/client/cgame/cg_dlights.c similarity index 100% rename from src/client/cgame/cg_dlights.c rename to src/engine/client/cgame/cg_dlights.c diff --git a/src/client/cgame/cg_entities.c b/src/engine/client/cgame/cg_entities.c similarity index 100% rename from src/client/cgame/cg_entities.c rename to src/engine/client/cgame/cg_entities.c diff --git a/src/client/cgame/cg_events.c b/src/engine/client/cgame/cg_events.c similarity index 100% rename from src/client/cgame/cg_events.c rename to src/engine/client/cgame/cg_events.c diff --git a/src/client/cgame/cg_flash.c b/src/engine/client/cgame/cg_flash.c similarity index 100% rename from src/client/cgame/cg_flash.c rename to src/engine/client/cgame/cg_flash.c diff --git a/src/client/cgame/cg_lightstyles.c b/src/engine/client/cgame/cg_lightstyles.c similarity index 100% rename from src/client/cgame/cg_lightstyles.c rename to src/engine/client/cgame/cg_lightstyles.c diff --git a/src/client/cgame/cg_local.h b/src/engine/client/cgame/cg_local.h similarity index 100% rename from src/client/cgame/cg_local.h rename to src/engine/client/cgame/cg_local.h diff --git a/src/client/cgame/cg_main.c b/src/engine/client/cgame/cg_main.c similarity index 100% rename from src/client/cgame/cg_main.c rename to src/engine/client/cgame/cg_main.c diff --git a/src/client/cgame/cg_model.c b/src/engine/client/cgame/cg_model.c similarity index 100% rename from src/client/cgame/cg_model.c rename to src/engine/client/cgame/cg_model.c diff --git a/src/client/cgame/cg_oldfx.c b/src/engine/client/cgame/cg_oldfx.c similarity index 100% rename from src/client/cgame/cg_oldfx.c rename to src/engine/client/cgame/cg_oldfx.c diff --git a/src/client/cgame/cg_particles.c b/src/engine/client/cgame/cg_particles.c similarity index 100% rename from src/client/cgame/cg_particles.c rename to src/engine/client/cgame/cg_particles.c diff --git a/src/client/cgame/cg_temp_entities.c b/src/engine/client/cgame/cg_temp_entities.c similarity index 100% rename from src/client/cgame/cg_temp_entities.c rename to src/engine/client/cgame/cg_temp_entities.c diff --git a/src/client/cgame/cg_tempents.c b/src/engine/client/cgame/cg_tempents.c similarity index 100% rename from src/client/cgame/cg_tempents.c rename to src/engine/client/cgame/cg_tempents.c diff --git a/src/client/cgame/cg_weapon.c b/src/engine/client/cgame/cg_weapon.c similarity index 100% rename from src/client/cgame/cg_weapon.c rename to src/engine/client/cgame/cg_weapon.c diff --git a/src/client/cgame/cg_world.c b/src/engine/client/cgame/cg_world.c similarity index 100% rename from src/client/cgame/cg_world.c rename to src/engine/client/cgame/cg_world.c diff --git a/src/client/cgame/cgame.h b/src/engine/client/cgame/cgame.h similarity index 100% rename from src/client/cgame/cgame.h rename to src/engine/client/cgame/cgame.h diff --git a/src/client/cgame/progdefs_client.h b/src/engine/client/cgame/progdefs_client.h similarity index 100% rename from src/client/cgame/progdefs_client.h rename to src/engine/client/cgame/progdefs_client.h diff --git a/src/client/cl_cinematic.c b/src/engine/client/cl_cinematic.c similarity index 100% rename from src/client/cl_cinematic.c rename to src/engine/client/cl_cinematic.c diff --git a/src/client/cl_console.c b/src/engine/client/cl_console.c similarity index 100% rename from src/client/cl_console.c rename to src/engine/client/cl_console.c diff --git a/src/client/cl_download.c b/src/engine/client/cl_download.c similarity index 100% rename from src/client/cl_download.c rename to src/engine/client/cl_download.c diff --git a/src/client/cl_entities.c b/src/engine/client/cl_entities.c similarity index 100% rename from src/client/cl_entities.c rename to src/engine/client/cl_entities.c diff --git a/src/client/cl_graph.c b/src/engine/client/cl_graph.c similarity index 100% rename from src/client/cl_graph.c rename to src/engine/client/cl_graph.c diff --git a/src/client/cl_input.c b/src/engine/client/cl_input.c similarity index 100% rename from src/client/cl_input.c rename to src/engine/client/cl_input.c diff --git a/src/client/cl_keys.c b/src/engine/client/cl_keys.c similarity index 100% rename from src/client/cl_keys.c rename to src/engine/client/cl_keys.c diff --git a/src/client/cl_main.c b/src/engine/client/cl_main.c similarity index 100% rename from src/client/cl_main.c rename to src/engine/client/cl_main.c diff --git a/src/client/cl_parse.c b/src/engine/client/cl_parse.c similarity index 100% rename from src/client/cl_parse.c rename to src/engine/client/cl_parse.c diff --git a/src/client/cl_predict.c b/src/engine/client/cl_predict.c similarity index 100% rename from src/client/cl_predict.c rename to src/engine/client/cl_predict.c diff --git a/src/client/cl_screen.c b/src/engine/client/cl_screen.c similarity index 100% rename from src/client/cl_screen.c rename to src/engine/client/cl_screen.c diff --git a/src/client/cl_view.c b/src/engine/client/cl_view.c similarity index 100% rename from src/client/cl_view.c rename to src/engine/client/cl_view.c diff --git a/src/client/client.h b/src/engine/client/client.h similarity index 99% rename from src/client/client.h rename to src/engine/client/client.h index 7f9569a9..bcd0a1da 100644 --- a/src/client/client.h +++ b/src/engine/client/client.h @@ -18,7 +18,7 @@ See the attached GNU General Public License v2 for more details. #include #include -#include "../qcommon/renderer.h" +#include "../../qcommon/renderer.h" #include "vid.h" #include "screen.h" diff --git a/src/client/console.h b/src/engine/client/console.h similarity index 100% rename from src/client/console.h rename to src/engine/client/console.h diff --git a/src/client/fx/effects.h b/src/engine/client/fx/effects.h similarity index 100% rename from src/client/fx/effects.h rename to src/engine/client/fx/effects.h diff --git a/src/client/fx/fx_load.c b/src/engine/client/fx/fx_load.c similarity index 100% rename from src/client/fx/fx_load.c rename to src/engine/client/fx/fx_load.c diff --git a/src/client/fx/fx_local.h b/src/engine/client/fx/fx_local.h similarity index 100% rename from src/client/fx/fx_local.h rename to src/engine/client/fx/fx_local.h diff --git a/src/client/fx/fx_main.c b/src/engine/client/fx/fx_main.c similarity index 100% rename from src/client/fx/fx_main.c rename to src/engine/client/fx/fx_main.c diff --git a/src/client/fx/fx_play.c b/src/engine/client/fx/fx_play.c similarity index 100% rename from src/client/fx/fx_play.c rename to src/engine/client/fx/fx_play.c diff --git a/src/client/input.h b/src/engine/client/input.h similarity index 100% rename from src/client/input.h rename to src/engine/client/input.h diff --git a/src/client/keys.h b/src/engine/client/keys.h similarity index 100% rename from src/client/keys.h rename to src/engine/client/keys.h diff --git a/src/client/screen.h b/src/engine/client/screen.h similarity index 100% rename from src/client/screen.h rename to src/engine/client/screen.h diff --git a/src/client/snd_dma.c b/src/engine/client/snd_dma.c similarity index 100% rename from src/client/snd_dma.c rename to src/engine/client/snd_dma.c diff --git a/src/client/snd_loc.h b/src/engine/client/snd_loc.h similarity index 100% rename from src/client/snd_loc.h rename to src/engine/client/snd_loc.h diff --git a/src/client/snd_mem.c b/src/engine/client/snd_mem.c similarity index 100% rename from src/client/snd_mem.c rename to src/engine/client/snd_mem.c diff --git a/src/client/snd_mix.c b/src/engine/client/snd_mix.c similarity index 100% rename from src/client/snd_mix.c rename to src/engine/client/snd_mix.c diff --git a/src/client/sound.h b/src/engine/client/sound.h similarity index 100% rename from src/client/sound.h rename to src/engine/client/sound.h diff --git a/src/client/ui/gui.h b/src/engine/client/ui/gui.h similarity index 100% rename from src/client/ui/gui.h rename to src/engine/client/ui/gui.h diff --git a/src/client/ui/ui_action.c b/src/engine/client/ui/ui_action.c similarity index 100% rename from src/client/ui/ui_action.c rename to src/engine/client/ui/ui_action.c diff --git a/src/client/ui/ui_builtins.c b/src/engine/client/ui/ui_builtins.c similarity index 100% rename from src/client/ui/ui_builtins.c rename to src/engine/client/ui/ui_builtins.c diff --git a/src/client/ui/ui_centermsg.c b/src/engine/client/ui/ui_centermsg.c similarity index 100% rename from src/client/ui/ui_centermsg.c rename to src/engine/client/ui/ui_centermsg.c diff --git a/src/client/ui/ui_load.c b/src/engine/client/ui/ui_load.c similarity index 100% rename from src/client/ui/ui_load.c rename to src/engine/client/ui/ui_load.c diff --git a/src/client/ui/ui_local.h b/src/engine/client/ui/ui_local.h similarity index 100% rename from src/client/ui/ui_local.h rename to src/engine/client/ui/ui_local.h diff --git a/src/client/ui/ui_main.c b/src/engine/client/ui/ui_main.c similarity index 100% rename from src/client/ui/ui_main.c rename to src/engine/client/ui/ui_main.c diff --git a/src/client/vid.h b/src/engine/client/vid.h similarity index 100% rename from src/client/vid.h rename to src/engine/client/vid.h diff --git a/src/qcommon/cmd.c b/src/engine/cmd.c similarity index 99% rename from src/qcommon/cmd.c rename to src/engine/cmd.c index b474a99f..912bec14 100644 --- a/src/qcommon/cmd.c +++ b/src/engine/cmd.c @@ -10,7 +10,7 @@ See the attached GNU General Public License v2 for more details. // cmd.c -- Quake script command processing module -#include "qcommon.h" +#include "../qcommon/qcommon.h" void Cmd_ForwardToServer (void); diff --git a/src/qcommon/cmodel.c b/src/engine/cmodel.c similarity index 99% rename from src/qcommon/cmodel.c rename to src/engine/cmodel.c index 268d0404..c250034f 100644 --- a/src/qcommon/cmodel.c +++ b/src/engine/cmodel.c @@ -10,7 +10,7 @@ See the attached GNU General Public License v2 for more details. // cmodel.c -- BSP model loading, collision handling -#include "qcommon.h" +#include "../qcommon/qcommon.h" qboolean bExtendedBSP = false; diff --git a/src/platform/linux_main.c b/src/engine/linux_main.c similarity index 100% rename from src/platform/linux_main.c rename to src/engine/linux_main.c diff --git a/src/platform/linux_net.c b/src/engine/linux_net.c similarity index 100% rename from src/platform/linux_net.c rename to src/engine/linux_net.c diff --git a/src/platform/linux_shared.c b/src/engine/linux_shared.c similarity index 100% rename from src/platform/linux_shared.c rename to src/engine/linux_shared.c diff --git a/src/qcommon/net_chan.c b/src/engine/net_chan.c similarity index 99% rename from src/qcommon/net_chan.c rename to src/engine/net_chan.c index 43d39175..3398863a 100644 --- a/src/qcommon/net_chan.c +++ b/src/engine/net_chan.c @@ -8,7 +8,7 @@ Copyright (C) 1997-2001 Id Software, Inc. See the attached GNU General Public License v2 for more details. */ -#include "qcommon.h" +#include "../qcommon/qcommon.h" /* diff --git a/src/qcommon/net_msg.c b/src/engine/net_msg.c similarity index 100% rename from src/qcommon/net_msg.c rename to src/engine/net_msg.c diff --git a/src/platform/pragma.ico b/src/engine/pragma.ico similarity index 100% rename from src/platform/pragma.ico rename to src/engine/pragma.ico diff --git a/src/platform/pragma.rc b/src/engine/pragma.rc similarity index 100% rename from src/platform/pragma.rc rename to src/engine/pragma.rc diff --git a/src/pragma_config.h b/src/engine/pragma_config.h similarity index 88% rename from src/pragma_config.h rename to src/engine/pragma_config.h index a608d3b0..f15cb671 100644 --- a/src/pragma_config.h +++ b/src/engine/pragma_config.h @@ -8,14 +8,21 @@ Copyright (C) 1997-2001 Id Software, Inc. See the attached GNU General Public License v2 for more details. */ +// +// MAIN CONFIGURATION FILE FOR ENGINE +// + + #pragma once #ifndef PRAGMA_CONFIG_INCLUDED #define PRAGMA_CONFIG_INCLUDED 1 -#define FIX_SQB 1 // "stupid quake bug" fix +// Enable "stupid quake bug" fix +#define FIX_SQB 1 -#define NEW_GUI 1 //new gui +// Include new gui system +#define NEW_GUI 1 // net protocol will use floats for coordinates instead of shorts, this applies to pmove too // this also fixes some of pmove issues like dragging players motion towards 0,0,0 and higher jumps @@ -25,7 +32,7 @@ See the attached GNU General Public License v2 for more details. // protocol can use shorts when modelindex or soundindex exceed byte #define PROTOCOL_EXTENDED_ASSETS 1 -// main engine directory to load assets from, the default 'game' +// main engine directory to load assets from (the default 'game' directory) #define BASEDIRNAME "main" // experimental -- use GLFW for windows and input instead of windows api [not implemented yet] diff --git a/src/engine.filters b/src/engine/pragma_engine.filters similarity index 100% rename from src/engine.filters rename to src/engine/pragma_engine.filters diff --git a/src/engine.vcxproj b/src/engine/pragma_engine.vcxproj similarity index 88% rename from src/engine.vcxproj rename to src/engine/pragma_engine.vcxproj index c6d178f3..e09668dd 100644 --- a/src/engine.vcxproj +++ b/src/engine/pragma_engine.vcxproj @@ -35,16 +35,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -53,9 +53,9 @@ - + @@ -92,25 +92,25 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - @@ -126,18 +126,17 @@ - - - - - - + + + + + - + - + 16.0 @@ -145,7 +144,7 @@ {a8e87a57-9f0a-4c40-82cf-531407b7843e} engine 10.0 - pragma + pragma_engine diff --git a/src/engine/pragma_engine.vcxproj.filters b/src/engine/pragma_engine.vcxproj.filters new file mode 100644 index 00000000..2df12566 --- /dev/null +++ b/src/engine/pragma_engine.vcxproj.filters @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {e064b09a-a4a4-4118-aa1a-e17a8c7f8413} + + + {fbe0844a-3483-4415-a6d0-02601ee598a6} + + + {5c3969ca-48d6-4121-895a-6b6a5db6767f} + + + + + + + + + \ No newline at end of file diff --git a/src/platform/resource.h b/src/engine/resource.h similarity index 100% rename from src/platform/resource.h rename to src/engine/resource.h diff --git a/src/script/progdefs_server.h b/src/engine/script/progdefs_server.h similarity index 100% rename from src/script/progdefs_server.h rename to src/engine/script/progdefs_server.h diff --git a/src/script/progdefs_ui.h b/src/engine/script/progdefs_ui.h similarity index 100% rename from src/script/progdefs_ui.h rename to src/engine/script/progdefs_ui.h diff --git a/src/script/qc_opcodes.h b/src/engine/script/qc_opcodes.h similarity index 100% rename from src/script/qc_opcodes.h rename to src/engine/script/qc_opcodes.h diff --git a/src/script/qc_opnames.h b/src/engine/script/qc_opnames.h similarity index 100% rename from src/script/qc_opnames.h rename to src/engine/script/qc_opnames.h diff --git a/src/script/scr_builtins_math.c b/src/engine/script/scr_builtins_math.c similarity index 99% rename from src/script/scr_builtins_math.c rename to src/engine/script/scr_builtins_math.c index 1864beac..407a9e95 100644 --- a/src/script/scr_builtins_math.c +++ b/src/engine/script/scr_builtins_math.c @@ -7,7 +7,7 @@ Copyright (C) 1997-2001 Id Software, Inc. See the attached GNU General Public License v2 for more details. */ -#include "../qcommon/qcommon.h" +#include "../../qcommon/qcommon.h" #include "script_internals.h" #define scr_random() ( ( rand() & 0x7fff ) / ( (float)0x7fff ) ) diff --git a/src/script/scr_builtins_shared.c b/src/engine/script/scr_builtins_shared.c similarity index 99% rename from src/script/scr_builtins_shared.c rename to src/engine/script/scr_builtins_shared.c index cb26b96f..70937f62 100644 --- a/src/script/scr_builtins_shared.c +++ b/src/engine/script/scr_builtins_shared.c @@ -7,7 +7,7 @@ Copyright (C) 1997-2001 Id Software, Inc. See the attached GNU General Public License v2 for more details. */ -#include "../qcommon/qcommon.h" +#include "../../qcommon/qcommon.h" #include "script_internals.h" extern void Scr_InitMathBuiltins(); diff --git a/src/script/scr_debug.c b/src/engine/script/scr_debug.c similarity index 99% rename from src/script/scr_debug.c rename to src/engine/script/scr_debug.c index 1197e25f..fe8584d0 100644 --- a/src/script/scr_debug.c +++ b/src/engine/script/scr_debug.c @@ -10,7 +10,7 @@ See the attached GNU General Public License v2 for more details. // scr_debug.c -#include "../qcommon/qcommon.h" +#include "../../qcommon/qcommon.h" #include "script_internals.h" diff --git a/src/script/scr_exec.c b/src/engine/script/scr_exec.c similarity index 99% rename from src/script/scr_exec.c rename to src/engine/script/scr_exec.c index 6c0518cf..3b3f64bc 100644 --- a/src/script/scr_exec.c +++ b/src/engine/script/scr_exec.c @@ -10,7 +10,7 @@ See the attached GNU General Public License v2 for more details. // scr_execution.c -#include "../qcommon/qcommon.h" +#include "../../qcommon/qcommon.h" #include "script_internals.h" extern ddef_t* ScrInternal_GlobalAtOfs(int ofs); diff --git a/src/script/scr_main.c b/src/engine/script/scr_main.c similarity index 99% rename from src/script/scr_main.c rename to src/engine/script/scr_main.c index 742d985c..845400e5 100644 --- a/src/script/scr_main.c +++ b/src/engine/script/scr_main.c @@ -9,7 +9,7 @@ See the attached GNU General Public License v2 for more details. */ // scr_main.c -#include "../qcommon/qcommon.h" +#include "../../qcommon/qcommon.h" #include "script_internals.h" cvar_t* vm_runaway; diff --git a/src/script/scr_utils.c b/src/engine/script/scr_utils.c similarity index 100% rename from src/script/scr_utils.c rename to src/engine/script/scr_utils.c diff --git a/src/script/script_internals.h b/src/engine/script/script_internals.h similarity index 100% rename from src/script/script_internals.h rename to src/engine/script/script_internals.h diff --git a/src/script/scriptvm.h b/src/engine/script/scriptvm.h similarity index 100% rename from src/script/scriptvm.h rename to src/engine/script/scriptvm.h diff --git a/src/server/server.h b/src/engine/server/server.h similarity index 99% rename from src/server/server.h rename to src/engine/server/server.h index dedcf43b..d58931e3 100644 --- a/src/server/server.h +++ b/src/engine/server/server.h @@ -13,7 +13,7 @@ See the attached GNU General Public License v2 for more details. //define PARANOID // speed sapping error checking -#include "../qcommon/qcommon.h" +#include "../../qcommon/qcommon.h" #include "sv_game.h" diff --git a/src/server/sv_ai.c b/src/engine/server/sv_ai.c similarity index 100% rename from src/server/sv_ai.c rename to src/engine/server/sv_ai.c diff --git a/src/server/sv_builtins.c b/src/engine/server/sv_builtins.c similarity index 100% rename from src/server/sv_builtins.c rename to src/engine/server/sv_builtins.c diff --git a/src/server/sv_ccmds.c b/src/engine/server/sv_ccmds.c similarity index 100% rename from src/server/sv_ccmds.c rename to src/engine/server/sv_ccmds.c diff --git a/src/server/sv_devtools.c b/src/engine/server/sv_devtools.c similarity index 100% rename from src/server/sv_devtools.c rename to src/engine/server/sv_devtools.c diff --git a/src/server/sv_game.h b/src/engine/server/sv_game.h similarity index 100% rename from src/server/sv_game.h rename to src/engine/server/sv_game.h diff --git a/src/server/sv_gentity.c b/src/engine/server/sv_gentity.c similarity index 100% rename from src/server/sv_gentity.c rename to src/engine/server/sv_gentity.c diff --git a/src/server/sv_init.c b/src/engine/server/sv_init.c similarity index 100% rename from src/server/sv_init.c rename to src/engine/server/sv_init.c diff --git a/src/server/sv_load.c b/src/engine/server/sv_load.c similarity index 100% rename from src/server/sv_load.c rename to src/engine/server/sv_load.c diff --git a/src/server/sv_main.c b/src/engine/server/sv_main.c similarity index 100% rename from src/server/sv_main.c rename to src/engine/server/sv_main.c diff --git a/src/server/sv_physics.c b/src/engine/server/sv_physics.c similarity index 100% rename from src/server/sv_physics.c rename to src/engine/server/sv_physics.c diff --git a/src/server/sv_script.c b/src/engine/server/sv_script.c similarity index 100% rename from src/server/sv_script.c rename to src/engine/server/sv_script.c diff --git a/src/server/sv_send.c b/src/engine/server/sv_send.c similarity index 100% rename from src/server/sv_send.c rename to src/engine/server/sv_send.c diff --git a/src/server/sv_user.c b/src/engine/server/sv_user.c similarity index 100% rename from src/server/sv_user.c rename to src/engine/server/sv_user.c diff --git a/src/server/sv_world.c b/src/engine/server/sv_world.c similarity index 100% rename from src/server/sv_world.c rename to src/engine/server/sv_world.c diff --git a/src/server/sv_write.c b/src/engine/server/sv_write.c similarity index 100% rename from src/server/sv_write.c rename to src/engine/server/sv_write.c diff --git a/src/platform/vid_dll.c b/src/engine/vid_dll.c similarity index 99% rename from src/platform/vid_dll.c rename to src/engine/vid_dll.c index f101ab37..ef02f294 100644 --- a/src/platform/vid_dll.c +++ b/src/engine/vid_dll.c @@ -14,8 +14,8 @@ See the attached GNU General Public License v2 for more details. #include #include -#include "..\client\client.h" -#include "winquake.h" +#include "client/client.h" +#include "../qcommon/pragma_windows.h" // Structure containing functions exported from refresh DLL refexport_t re; diff --git a/src/platform/win_input.c b/src/engine/win_input.c similarity index 98% rename from src/platform/win_input.c rename to src/engine/win_input.c index 4ae48ab7..be0f6dba 100644 --- a/src/platform/win_input.c +++ b/src/engine/win_input.c @@ -11,8 +11,8 @@ See the attached GNU General Public License v2 for more details. // win_input.c -- windows 95 mouse code // 02/21/97 JCB Added extended DirectInput code to support external controllers. -#include "../client/client.h" -#include "winquake.h" +#include "client/client.h" +#include "../qcommon/pragma_windows.h" extern unsigned sys_msg_time; diff --git a/src/platform/win_main.c b/src/engine/win_main.c similarity index 99% rename from src/platform/win_main.c rename to src/engine/win_main.c index a1ca532f..dbe0fb91 100644 --- a/src/platform/win_main.c +++ b/src/engine/win_main.c @@ -15,7 +15,7 @@ See the attached GNU General Public License v2 for more details. #ifdef DEDICATED_ONLY #include #else - #include "winquake.h" + #include "../qcommon/pragma_windows.h" #include "resource.h" #endif diff --git a/src/platform/win_net.c b/src/engine/win_net.c similarity index 100% rename from src/platform/win_net.c rename to src/engine/win_net.c diff --git a/src/platform/win_sound.c b/src/engine/win_sound.c similarity index 99% rename from src/platform/win_sound.c rename to src/engine/win_sound.c index 8955c49f..e2a512f5 100644 --- a/src/platform/win_sound.c +++ b/src/engine/win_sound.c @@ -10,9 +10,9 @@ See the attached GNU General Public License v2 for more details. #include -#include "../client/client.h" -#include "../client/snd_loc.h" -#include "winquake.h" +#include "client/client.h" +#include "client/snd_loc.h" +#include "../qcommon/pragma_windows.h" #define iDirectSoundCreate(a,b,c) pDirectSoundCreate(a,b,c) diff --git a/src/platform/winquake.rc b/src/engine/winquake.rc similarity index 100% rename from src/platform/winquake.rc rename to src/engine/winquake.rc diff --git a/src/pragma.sln b/src/pragma.sln index 0e2c8347..a62eb0cd 100644 --- a/src/pragma.sln +++ b/src/pragma.sln @@ -3,11 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.33801.447 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pragma", "engine.vcxproj", "{A8E87A57-9F0A-4C40-82CF-531407B7843E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pragma_engine", "engine\pragma_engine.vcxproj", "{A8E87A57-9F0A-4C40-82CF-531407B7843E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pragma_renderer", "renderer_gl2\renderer_gl2.vcxproj", "{5629A810-5D8D-410C-B8A2-E4A0CDE15AF4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pragma_dedsv", "pragma_server.vcxproj", "{0CA27754-F257-489E-B808-16610454DE81}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pragma_renderer", "renderer\pragma_renderer.vcxproj", "{5629A810-5D8D-410C-B8A2-E4A0CDE15AF4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -33,14 +31,6 @@ Global {5629A810-5D8D-410C-B8A2-E4A0CDE15AF4}.Release|x64.Build.0 = Release|x64 {5629A810-5D8D-410C-B8A2-E4A0CDE15AF4}.Release|x86.ActiveCfg = Release|Win32 {5629A810-5D8D-410C-B8A2-E4A0CDE15AF4}.Release|x86.Build.0 = Release|Win32 - {0CA27754-F257-489E-B808-16610454DE81}.Debug|x64.ActiveCfg = Debug|x64 - {0CA27754-F257-489E-B808-16610454DE81}.Debug|x64.Build.0 = Debug|x64 - {0CA27754-F257-489E-B808-16610454DE81}.Debug|x86.ActiveCfg = Debug|Win32 - {0CA27754-F257-489E-B808-16610454DE81}.Debug|x86.Build.0 = Debug|Win32 - {0CA27754-F257-489E-B808-16610454DE81}.Release|x64.ActiveCfg = Release|x64 - {0CA27754-F257-489E-B808-16610454DE81}.Release|x64.Build.0 = Release|x64 - {0CA27754-F257-489E-B808-16610454DE81}.Release|x86.ActiveCfg = Release|Win32 - {0CA27754-F257-489E-B808-16610454DE81}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/qcommon/bg_navigation.c b/src/qcommon/astar_navigation.c similarity index 100% rename from src/qcommon/bg_navigation.c rename to src/qcommon/astar_navigation.c diff --git a/src/qcommon/files.c b/src/qcommon/filesystem.c similarity index 100% rename from src/qcommon/files.c rename to src/qcommon/filesystem.c diff --git a/src/qcommon/model_cache.c b/src/qcommon/model_cache.c index 161c78f3..640f622f 100644 --- a/src/qcommon/model_cache.c +++ b/src/qcommon/model_cache.c @@ -16,8 +16,8 @@ the general idea here is to load assets once and for good because both server an */ #include "qcommon.h" -#include "../server/server.h" // so we know server state -#include "../client/client.h" // same, for renderer +#include "../engine/server/server.h" +#include "../engine/client/client.h" // same, for renderer #include "model_cache.h" diff --git a/src/qcommon/bg_modeldef.c b/src/qcommon/model_def.c similarity index 100% rename from src/qcommon/bg_modeldef.c rename to src/qcommon/model_def.c diff --git a/src/platform/winquake.h b/src/qcommon/pragma_windows.h similarity index 100% rename from src/platform/winquake.h rename to src/qcommon/pragma_windows.h diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index e5a227c2..1b9020d8 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -12,7 +12,7 @@ See the attached GNU General Public License v2 for more details. #pragma once #include "shared.h" -#include "../script/scriptvm.h" +#include "../engine/script/scriptvm.h" //============================================================================ diff --git a/src/qcommon/shared.h b/src/qcommon/shared.h index 50d974dd..664f8eaf 100644 --- a/src/qcommon/shared.h +++ b/src/qcommon/shared.h @@ -11,7 +11,7 @@ See the attached GNU General Public License v2 for more details. // q_shared.h -- included first by ALL program modules #pragma once -#include "../pragma_config.h" +#include "../engine/pragma_config.h" #include diff --git a/src/platform/win_shared.c b/src/qcommon/shared_windows.c similarity index 99% rename from src/platform/win_shared.c rename to src/qcommon/shared_windows.c index 3cccf93f..02f02d36 100644 --- a/src/platform/win_shared.c +++ b/src/qcommon/shared_windows.c @@ -16,7 +16,7 @@ See the attached GNU General Public License v2 for more details. #ifdef DEDICATED_ONLY #include #else - #include "winquake.h" + #include "pragma_windows.h" #endif #include diff --git a/src/renderer_gl2/TODO.md b/src/renderer/TODO.md similarity index 100% rename from src/renderer_gl2/TODO.md rename to src/renderer/TODO.md diff --git a/src/renderer_gl2/glad_gl21.c b/src/renderer/glad_gl21.c similarity index 100% rename from src/renderer_gl2/glad_gl21.c rename to src/renderer/glad_gl21.c diff --git a/src/renderer_gl2/include/KHR/khrplatform_gl21.h b/src/renderer/include/KHR/khrplatform_gl21.h similarity index 100% rename from src/renderer_gl2/include/KHR/khrplatform_gl21.h rename to src/renderer/include/KHR/khrplatform_gl21.h diff --git a/src/renderer_gl2/include/glad/glad_21.h b/src/renderer/include/glad/glad_21.h similarity index 100% rename from src/renderer_gl2/include/glad/glad_21.h rename to src/renderer/include/glad/glad_21.h diff --git a/src/renderer_gl2/renderer_gl2.vcxproj.filters b/src/renderer/pragma_renderer.filters similarity index 100% rename from src/renderer_gl2/renderer_gl2.vcxproj.filters rename to src/renderer/pragma_renderer.filters diff --git a/src/renderer_gl2/renderer_gl2.vcxproj b/src/renderer/pragma_renderer.vcxproj similarity index 99% rename from src/renderer_gl2/renderer_gl2.vcxproj rename to src/renderer/pragma_renderer.vcxproj index 12d39711..36fb2c30 100644 --- a/src/renderer_gl2/renderer_gl2.vcxproj +++ b/src/renderer/pragma_renderer.vcxproj @@ -181,7 +181,7 @@ - + diff --git a/src/renderer_gl2/r_aliasmod.c b/src/renderer/r_aliasmod.c similarity index 100% rename from src/renderer_gl2/r_aliasmod.c rename to src/renderer/r_aliasmod.c diff --git a/src/renderer_gl2/r_draw.c b/src/renderer/r_draw.c similarity index 100% rename from src/renderer_gl2/r_draw.c rename to src/renderer/r_draw.c diff --git a/src/renderer_gl2/r_framebuffer.c b/src/renderer/r_framebuffer.c similarity index 100% rename from src/renderer_gl2/r_framebuffer.c rename to src/renderer/r_framebuffer.c diff --git a/src/renderer_gl2/r_image.c b/src/renderer/r_image.c similarity index 100% rename from src/renderer_gl2/r_image.c rename to src/renderer/r_image.c diff --git a/src/renderer_gl2/r_init.c b/src/renderer/r_init.c similarity index 100% rename from src/renderer_gl2/r_init.c rename to src/renderer/r_init.c diff --git a/src/renderer_gl2/r_light.c b/src/renderer/r_light.c similarity index 100% rename from src/renderer_gl2/r_light.c rename to src/renderer/r_light.c diff --git a/src/renderer_gl2/r_lightmap.c b/src/renderer/r_lightmap.c similarity index 100% rename from src/renderer_gl2/r_lightmap.c rename to src/renderer/r_lightmap.c diff --git a/src/renderer_gl2/r_local.h b/src/renderer/r_local.h similarity index 100% rename from src/renderer_gl2/r_local.h rename to src/renderer/r_local.h diff --git a/src/renderer_gl2/r_main.c b/src/renderer/r_main.c similarity index 100% rename from src/renderer_gl2/r_main.c rename to src/renderer/r_main.c diff --git a/src/renderer_gl2/r_mesh.c b/src/renderer/r_mesh.c similarity index 100% rename from src/renderer_gl2/r_mesh.c rename to src/renderer/r_mesh.c diff --git a/src/renderer_gl2/r_misc.c b/src/renderer/r_misc.c similarity index 100% rename from src/renderer_gl2/r_misc.c rename to src/renderer/r_misc.c diff --git a/src/renderer_gl2/r_model.c b/src/renderer/r_model.c similarity index 100% rename from src/renderer_gl2/r_model.c rename to src/renderer/r_model.c diff --git a/src/renderer_gl2/r_model.h b/src/renderer/r_model.h similarity index 100% rename from src/renderer_gl2/r_model.h rename to src/renderer/r_model.h diff --git a/src/renderer_gl2/r_progs.c b/src/renderer/r_progs.c similarity index 100% rename from src/renderer_gl2/r_progs.c rename to src/renderer/r_progs.c diff --git a/src/renderer_gl2/r_shadow.c b/src/renderer/r_shadow.c similarity index 100% rename from src/renderer_gl2/r_shadow.c rename to src/renderer/r_shadow.c diff --git a/src/renderer_gl2/r_state.c b/src/renderer/r_state.c similarity index 100% rename from src/renderer_gl2/r_state.c rename to src/renderer/r_state.c diff --git a/src/renderer_gl2/r_testmod.c b/src/renderer/r_testmod.c similarity index 100% rename from src/renderer_gl2/r_testmod.c rename to src/renderer/r_testmod.c diff --git a/src/renderer_gl2/r_text.c b/src/renderer/r_text.c similarity index 100% rename from src/renderer_gl2/r_text.c rename to src/renderer/r_text.c diff --git a/src/renderer_gl2/r_vertexbuffer.c b/src/renderer/r_vertexbuffer.c similarity index 100% rename from src/renderer_gl2/r_vertexbuffer.c rename to src/renderer/r_vertexbuffer.c diff --git a/src/renderer_gl2/r_warp.c b/src/renderer/r_warp.c similarity index 100% rename from src/renderer_gl2/r_warp.c rename to src/renderer/r_warp.c diff --git a/src/renderer_gl2/r_world.c b/src/renderer/r_world.c similarity index 100% rename from src/renderer_gl2/r_world.c rename to src/renderer/r_world.c diff --git a/src/renderer_gl2/renderer.def b/src/renderer/renderer.def similarity index 100% rename from src/renderer_gl2/renderer.def rename to src/renderer/renderer.def diff --git a/src/renderer_gl2/warpsin.h b/src/renderer/warpsin.h similarity index 100% rename from src/renderer_gl2/warpsin.h rename to src/renderer/warpsin.h diff --git a/src/renderer_gl2/win_glw.h b/src/renderer/win_glw.h similarity index 100% rename from src/renderer_gl2/win_glw.h rename to src/renderer/win_glw.h diff --git a/src/renderer_gl2/win_opengl.c b/src/renderer/win_opengl.c similarity index 99% rename from src/renderer_gl2/win_opengl.c rename to src/renderer/win_opengl.c index 0298e37d..70622c64 100644 --- a/src/renderer_gl2/win_opengl.c +++ b/src/renderer/win_opengl.c @@ -25,7 +25,7 @@ See the attached GNU General Public License v2 for more details. #include #include "r_local.h" #include "win_glw.h" -#include "../platform/winquake.h" +#include "../qcommon/pragma_windows.h" qboolean GLimp_InitGL (void); diff --git a/src/renderer_gl2/win_qgl.c b/src/renderer/win_qgl.c similarity index 100% rename from src/renderer_gl2/win_qgl.c rename to src/renderer/win_qgl.c diff --git a/src/renderer_gl2/win_qgl.h b/src/renderer/win_qgl.h similarity index 100% rename from src/renderer_gl2/win_qgl.h rename to src/renderer/win_qgl.h