Skip to content

Commit

Permalink
organize + cleanup
Browse files Browse the repository at this point in the history
move files to subfolders and merge nearly empty files
  • Loading branch information
wootguy committed Nov 19, 2024
1 parent e1374aa commit c547e43
Show file tree
Hide file tree
Showing 46 changed files with 42 additions and 602 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ include_directories(${CMAKE_SOURCE_DIR}/dlls/net)
include_directories(${CMAKE_SOURCE_DIR}/dlls/hooks)
include_directories(${CMAKE_SOURCE_DIR}/dlls/util)
include_directories(${CMAKE_SOURCE_DIR}/dlls/game)
include_directories(${CMAKE_SOURCE_DIR}/dlls/player)
include_directories(${CMAKE_SOURCE_DIR}/dlls/)

include_directories(${CMAKE_SOURCE_DIR}/rehlds)
Expand Down
1 change: 0 additions & 1 deletion dlls/CGlobalState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "cbase.h"
#include "decals.h"
#include "CBasePlayer.h"
#include "ent_globals.h"

CGlobalState gGlobalState;

Expand Down
22 changes: 11 additions & 11 deletions dlls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set(MONSTER_HDR
monster/CBaseGruntOp4.h
monster/CBaseMonster.h
monster/CBaseTurret.h
monster/CCineMonster.h
monster/CFlyingMonster.h
monster/CGargantua.h
monster/CHornet.h
Expand All @@ -28,6 +29,7 @@ set(MONSTER_HDR
monster/monsterevent.h
monster/monsters.h
monster/schedule.h
monster/nodes.h
)
set(MONSTER_SRC
monster/CBaseMonster.cpp
Expand All @@ -38,7 +40,7 @@ set(MONSTER_SRC
monster/CCineAI.cpp
monster/CCineMonster.cpp
monster/CScriptedSentence.cpp
nodes.cpp
monster/nodes.cpp
)
set(MONSTER_MISC_SRC
monster/CActAnimating.cpp
Expand Down Expand Up @@ -81,6 +83,7 @@ set(MONSTER_HUMAN_SRC
monster/CHWGrunt.cpp
monster/CMassn.cpp
monster/COtis.cpp
monster/CPlayerMonster.cpp
monster/CScientist.cpp
)
set(MONSTER_ALIEN_SRC
Expand Down Expand Up @@ -299,11 +302,7 @@ set(FUNC_SRC

set(ENTITY_HDR
cbase.h
ent_globals.h
nodes.h
CKeyValue.h
scripted.h
scriptevent.h
monster/scriptevent.h
path/CPathCorner.h
path/CPathTrack.h
../engine/progs.h
Expand Down Expand Up @@ -410,6 +409,7 @@ set(UTIL_HDR
util/Bsp.h
util/bsptypes.h
util/bsplimits.h
util/CKeyValue.h
util/CommandArgs.h
util/debug.h
util/eng_wrappers.h
Expand Down Expand Up @@ -454,16 +454,16 @@ set(PLAYER_HDR
../pm_shared/pm_materials.h
../pm_shared/pm_movevars.h
../pm_shared/pm_shared.h
CBasePlayer.h
CBaseSpectator.h
player/CBasePlayer.h
player/CBaseSpectator.h
)
set(PLAYER_SRC
../pm_shared/pm_shared.cpp
../pm_shared/pm_debug.cpp
../pm_shared/pm_math.cpp
CBaseDMStart.cpp
CBasePlayer.cpp
CBaseSpectator.cpp
player/CBaseDMStart.cpp
player/CBasePlayer.cpp
player/CBaseSpectator.cpp
)
set(HOOKS_HDR
../engine/custom.h
Expand Down
20 changes: 20 additions & 0 deletions dlls/cbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,17 @@ class EXPORT CBaseAnimating : public CBaseDelay
//
#define SF_ITEM_USE_ONLY 256 // ITEM_USE_ONLY = BUTTON_USE_ONLY = DOOR_USE_ONLY!!!

#define MAX_SENTENCE_PARTS 32

struct SentencePart {
string_t file; // name of the sound file
uint8_t volume; // 0-100
uint8_t pitch; // 0-255
uint8_t start; // 0-100 (can't implement for vanilla hl clients)
uint8_t end; // 0-100
uint8_t tempo; // 0-100 (can't implement for vanilla hl clients)
};

class EXPORT CBaseToggle : public CBaseAnimating
{
public:
Expand Down Expand Up @@ -610,6 +621,13 @@ class EXPORT CBaseToggle : public CBaseAnimating

int m_bitsDamageInflict; // DMG_ damage type that the door or tigger does

SentencePart m_customSentence[MAX_SENTENCE_PARTS];
string_t m_customSentenceFolder; // folder where sentence sounds are found
int m_customSentenceLastIdx; // last sentence part that was played
int m_customSentenceCount; // number of words in the custom sentence
float m_customSentenceTime; // time the custom sentence was started
float m_customSentenceAttn; // attenuation for the current custom sentence

virtual int Save( CSave &save );
virtual int Restore( CRestore &restore );

Expand All @@ -628,6 +646,7 @@ class EXPORT CBaseToggle : public CBaseAnimating
virtual CBaseToggle* MyTogglePointer(void) { return this; }

// monsters use this, but so could buttons for instance
void ParseSentence(const char* pszSentence, float volume, float attenuation);
virtual void PlaySentence(const char* pszSentence, float duration, float volume, float attenuation);
virtual void PlayScriptedSentence(const char* pszSentence, float duration, float volume, float attenuation, BOOL bConcurrent, CBaseEntity* pListener);
virtual void SentenceStop(void);
Expand Down Expand Up @@ -859,6 +878,7 @@ typedef struct _SelAmmo
BYTE Ammo2;
} SelAmmo;

extern edict_t* g_pBodyQueueHead;

// this moved here from world.cpp, to allow classes to be derived from it
//=======================
Expand Down
22 changes: 0 additions & 22 deletions dlls/doors.h

This file was deleted.

6 changes: 0 additions & 6 deletions dlls/ent_globals.h

This file was deleted.

1 change: 0 additions & 1 deletion dlls/env/CCorpse.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "ent_globals.h"
#include "bodyque.h"
#include "CBaseMonster.h"

Expand Down
1 change: 0 additions & 1 deletion dlls/func/CBaseButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "util.h"
#include "cbase.h"
#include "saverestore.h"
#include "doors.h"
#include "CBaseButton.h"

// CBaseButton
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CBaseDoor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"
#include "CBaseButton.h"
#include "CBaseDoor.h"

Expand Down
1 change: 0 additions & 1 deletion dlls/func/CButtonTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "util.h"
#include "cbase.h"
#include "saverestore.h"
#include "doors.h"

#define SF_BTARGET_USE 0x0001
#define SF_BTARGET_ON 0x0002
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CFuncConveyor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"
#include "CFuncWall.h"

#define SF_CONVEYOR_VISUAL 0x0001
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CFuncIllusionary.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"

/*QUAKED func_illusionary (0 .5 .8) ?
A simple entity that looks solid but lets you walk through it.
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CFuncMonsterClip.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"
#include "CFuncWall.h"

// -------------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CFuncRotating.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"

#define SF_BRUSH_ACCDCC 16// brush should accelerate and decelerate when toggled
#define SF_BRUSH_HURT 32// rotating brush that inflicts pain based on rotation speed
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CFuncWallToggle.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"
#include "CFuncWall.h"

#define SF_WALL_START_OFF 0x0001
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CMomentaryDoor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"
#include "CBaseButton.h"
#include "CBaseDoor.h"

Expand Down
1 change: 0 additions & 1 deletion dlls/func/CMomentaryRotButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "util.h"
#include "cbase.h"
#include "saverestore.h"
#include "doors.h"
#include "CBaseButton.h"

// Make this button behave like a door (HACKHACK)
Expand Down
1 change: 0 additions & 1 deletion dlls/func/CRotDoor.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "doors.h"
#include "CBaseButton.h"
#include "CBaseDoor.h"

Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/CBarney.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "CTalkSquadMonster.h"
#include "schedule.h"
#include "defaultai.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "weapons.h"
#include "env/CSoundEnt.h"

Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/CBaseMonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "CBreakable.h"
#include "nodes.h"
#include "saverestore.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "CTalkSquadMonster.h"
#include "gamerules.h"
#include "defaultai.h"
Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/CCineAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "cbase.h"
#include "monsters.h"
#include "schedule.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "defaultai.h"


Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/CCineMonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#endif

#include "schedule.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "defaultai.h"

#define CLASSNAME "scripted_sequence"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dlls/monster/CFurniture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "cbase.h"
#include "monsters.h"
#include "schedule.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "defaultai.h"

//=========================================================
Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/COtis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "CTalkSquadMonster.h"
#include "schedule.h"
#include "defaultai.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "weapons.h"
#include "CSoundEnt.h"

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dlls/monster/CScientist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "CTalkSquadMonster.h"
#include "schedule.h"
#include "defaultai.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "animation.h"
#include "env/CSoundEnt.h"

Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/CScriptedSentence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "cbase.h"
#include "monsters.h"
#include "schedule.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "defaultai.h"

class CScriptedSentence : public CBaseToggle
Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/CTalkSquadMonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "schedule.h"
#include "CTalkSquadMonster.h"
#include "defaultai.h"
#include "scripted.h"
#include "CCineMonster.h"
#include "env/CSoundEnt.h"
#include "animation.h"
#include "plane.h"
Expand Down
2 changes: 1 addition & 1 deletion dlls/monster/defaultai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "defaultai.h"
#include "env/CSoundEnt.h"
#include "nodes.h"
#include "scripted.h"
#include "CCineMonster.h"

//=========================================================
// Fail
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c547e43

Please sign in to comment.