Skip to content

Commit

Permalink
Rework includes. Remove some redundant includes
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Nov 8, 2024
1 parent fa4f12b commit ea20465
Show file tree
Hide file tree
Showing 60 changed files with 134 additions and 176 deletions.
1 change: 0 additions & 1 deletion cl_dll/GameStudioModelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <cassert>
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "com_model.h"
#include "studio.h"
#include "entity_state.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/GameStudioModelRenderer_Sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <assert.h>
#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "com_model.h"
#include "studio.h"
#include "entity_state.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/StudioModelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "com_model.h"
#include "studio.h"
#include "entity_state.h"
Expand Down
2 changes: 1 addition & 1 deletion cl_dll/cl_fx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#ifndef CL_FX_H
#define CL_FX_H

#include "cl_dll.h"
#include "com_model.h"
#include "fx_types.h"
#include "vector.h"

void LoadDefaultSprites();

Expand Down
1 change: 1 addition & 0 deletions cl_dll/cl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//
#if !defined(CL_UTIL_H)
#define CL_UTIL_H
#include "cl_dll.h"
#include "exportdef.h"
#include "cvardef.h"
#include "color_utils.h"
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/com_weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include "hud.h"
#include "cl_util.h"
#include "com_weapons.h"

#include "const.h"
#include "entity_state.h"
#include "r_efx.h"

Expand Down
1 change: 0 additions & 1 deletion cl_dll/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_types.h"
#include "studio_event.h" // def. of mstudioevent_t
#include "r_efx.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/ev_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"

Expand Down
2 changes: 0 additions & 2 deletions cl_dll/ev_hldm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "entity_types.h"
#include "usercmd.h"
#include "pm_defs.h"
#include "pm_materials.h"

Expand Down
1 change: 0 additions & 1 deletion cl_dll/hl/hl_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "../demo.h"

#include "demo_api.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"

Expand Down
1 change: 0 additions & 1 deletion cl_dll/in_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "camera.h"
#include "in_defs.h"

Expand Down
1 change: 0 additions & 1 deletion cl_dll/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ extern "C"
}
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "camera.h"
#include "in_defs.h"
//#include "view.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/input_goldsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "const.h"
#include "camera.h"
#include "in_defs.h"
#include "keydefs.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/status_icons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "parsemsg.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/studio_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "com_model.h"
#include "studio_util.h"

Expand Down
1 change: 0 additions & 1 deletion cl_dll/tri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

// Triangle rendering apis are in gEngfuncs.pTriAPI

#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "triangleapi.h"
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/vgui_ClassMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "camera.h"
#include "in_defs.h"
#include "parsemsg.h"
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/vgui_CustomObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "camera.h"
#include "in_defs.h"
#include "parsemsg.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/vgui_MOTDWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "cl_util.h"
#include "camera.h"
#include "kbutton.h"
#include "const.h"

#include "vgui_int.h"
#include "vgui_TeamFortressViewport.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/vgui_ScorePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "vgui_TeamFortressViewport.h"
Expand Down
1 change: 0 additions & 1 deletion cl_dll/vgui_SpectatorPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "hud.h"
#include "cl_util.h"
#include "const.h"
#include "entity_state.h"
#include "cl_entity.h"
#include "pm_shared.h"
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/vgui_TeamFortressViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "camera.h"
#include "in_defs.h"
#include "parsemsg.h"
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/vgui_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include "camera.h"
#include "kbutton.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"
#include "camera.h"
#include "in_defs.h"
#include "vgui_TeamFortressViewport.h"
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "hud.h"
#include "cl_util.h"
#include "cvardef.h"
#include "usercmd.h"
#include "const.h"

#include "entity_state.h"
#include "cl_entity.h"
Expand Down
2 changes: 2 additions & 0 deletions common/beamdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#if !defined(BEAMDEF_H)
#define BEAMDEF_H

#include "vector.h"

#define FBEAM_STARTENTITY 0x00000001
#define FBEAM_ENDENTITY 0x00000002
#define FBEAM_FADEIN 0x00000004
Expand Down
9 changes: 9 additions & 0 deletions common/cl_entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
#if !defined(CL_ENTITY_H)
#define CL_ENTITY_H

#include "com_model.h"
#include "common_types.h"
#include "vector.h"

typedef struct
{
unsigned r, g, b, a;
} colorVec;

typedef struct efrag_s
{
struct mleaf_s *leaf;
Expand Down
3 changes: 3 additions & 0 deletions common/com_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#if !defined( COM_MODEL_H )
#define COM_MODEL_H

#include "common_types.h"
#include "vector.h"

#define STUDIO_RENDER 1
#define STUDIO_EVENTS 2

Expand Down
2 changes: 2 additions & 0 deletions common/common_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#ifndef COMMON_TYPES_H
#define COMMON_TYPES_H

typedef int qboolean;

typedef unsigned char byte;

typedef struct
Expand Down
91 changes: 3 additions & 88 deletions common/const.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#define CONST_H

#include "common_types.h"
#include "vector.h"
#include "const_render.h"
#include "const_sound.h"

//
// Constants shared by the engine and dlls
Expand Down Expand Up @@ -623,42 +626,6 @@
#define CONTENT_LAVA -5
#define CONTENT_SKY -6

// channels
#define CHAN_AUTO 0
#define CHAN_WEAPON 1
#define CHAN_VOICE 2
#define CHAN_ITEM 3
#define CHAN_BODY 4
#define CHAN_STREAM 5 // allocate stream channel from the static or dynamic area
#define CHAN_STATIC 6 // allocate channel from the static area
#define CHAN_NETWORKVOICE_BASE 7 // voice data coming across the network
#define CHAN_NETWORKVOICE_END 500 // network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END).
#define CHAN_BOT 501 // channel used for bot chatter.

// attenuation values
#define ATTN_NONE 0
#define ATTN_NORM 0.8f
#define ATTN_IDLE 2.0f
#define ATTN_STATIC 1.25f

// pitch values
#define PITCH_NORM 100 // non-pitch shifted
#define PITCH_LOW 95 // other values are possible - 0-255, where 255 is very high
#define PITCH_HIGH 120

// volume values
#define VOL_NORM 1.0f

// plats
#define PLAT_LOW_TRIGGER 1

// Trains
#define SF_TRAIN_WAIT_RETRIGGER 1
#define SF_TRAIN_SETORIGIN 2
#define SF_TRAIN_START_ON 4 // Train is initially moving
#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used SF_TRAIN_SETORIGINefine SF_TRAIN_RESPECT_ORIGIN 32
#define SF_TRAIN_NO_DAMAGE 64

// buttons
#define IN_ATTACK (1<<0)
#define IN_JUMP (1<<1)
Expand Down Expand Up @@ -703,61 +670,9 @@
#define TE_BOUNCE_SHELL 1
#define TE_BOUNCE_SHOTSHELL 2

// Rendering constants
enum
{
kRenderNormal, // src
kRenderTransColor, // c*a+dest*(1-a)
kRenderTransTexture, // src*a+dest*(1-a)
kRenderGlow, // src*a+dest -- No Z buffer checks
kRenderTransAlpha, // src*srca+dest*(1-srca)
kRenderTransAdd, // src*a+dest
kRenderWorldGlow // Same as kRenderGlow but not fixed size in screen space
};

enum
{
kRenderFxNone = 0,
kRenderFxPulseSlow,
kRenderFxPulseFast,
kRenderFxPulseSlowWide,
kRenderFxPulseFastWide,
kRenderFxFadeSlow,
kRenderFxFadeFast,
kRenderFxSolidSlow,
kRenderFxSolidFast,
kRenderFxStrobeSlow,
kRenderFxStrobeFast,
kRenderFxStrobeFaster,
kRenderFxFlickerSlow,
kRenderFxFlickerFast,
kRenderFxNoDissipation,
kRenderFxDistort, // Distort/scale/translate flicker
kRenderFxHologram, // kRenderFxDistort + distance fade
kRenderFxDeadPlayer, // kRenderAmt is the player index
kRenderFxExplode, // Scale up really big!
kRenderFxGlowShell, // Glowing Shell
kRenderFxClampMinScale, // Keep this sprite from getting very small (SPRITES only!)
kRenderFxLightMultiplier //CTM !!!CZERO added to tell the studiorender that the value in iuser2 is a lightmultiplier
};

typedef unsigned int func_t;
typedef int string_t;

#undef true
#undef false

#if !__cplusplus
typedef enum { false, true } qboolean;
#else
typedef int qboolean;
#endif

typedef struct
{
unsigned r, g, b, a;
} colorVec;

typedef struct link_s
{
struct link_s *prev, *next;
Expand Down
Loading

0 comments on commit ea20465

Please sign in to comment.