mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- prettification of a few files
This commit is contained in:
parent
65a812e316
commit
4984bc8c5f
5 changed files with 105 additions and 7 deletions
|
@ -37,6 +37,7 @@
|
||||||
#include "g_levellocals.h"
|
#include "g_levellocals.h"
|
||||||
|
|
||||||
CVAR (Bool, cl_spreaddecals, true, CVAR_ARCHIVE)
|
CVAR (Bool, cl_spreaddecals, true, CVAR_ARCHIVE)
|
||||||
|
CVAR(Bool, var_pushers, true, CVAR_SERVERINFO);
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
|
|
|
@ -48,6 +48,12 @@ IMPLEMENT_POINTERS_START(DPillar)
|
||||||
IMPLEMENT_POINTER(m_Interp_Ceiling)
|
IMPLEMENT_POINTER(m_Interp_Ceiling)
|
||||||
IMPLEMENT_POINTERS_END
|
IMPLEMENT_POINTERS_END
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPillar::OnDestroy()
|
void DPillar::OnDestroy()
|
||||||
{
|
{
|
||||||
if (m_Interp_Ceiling != nullptr)
|
if (m_Interp_Ceiling != nullptr)
|
||||||
|
@ -63,6 +69,12 @@ void DPillar::OnDestroy()
|
||||||
Super::OnDestroy();
|
Super::OnDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPillar::Serialize(FSerializer &arc)
|
void DPillar::Serialize(FSerializer &arc)
|
||||||
{
|
{
|
||||||
Super::Serialize (arc);
|
Super::Serialize (arc);
|
||||||
|
@ -77,6 +89,12 @@ void DPillar::Serialize(FSerializer &arc)
|
||||||
("interp_ceiling", m_Interp_Ceiling);
|
("interp_ceiling", m_Interp_Ceiling);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPillar::Tick ()
|
void DPillar::Tick ()
|
||||||
{
|
{
|
||||||
EMoveResult r, s;
|
EMoveResult r, s;
|
||||||
|
@ -114,6 +132,12 @@ void DPillar::Tick ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPillar::Construct(sector_t *sector, EPillar type, double speed, double floordist, double ceilingdist, int crush, bool hexencrush)
|
void DPillar::Construct(sector_t *sector, EPillar type, double speed, double floordist, double ceilingdist, int crush, bool hexencrush)
|
||||||
{
|
{
|
||||||
Super::Construct(sector);
|
Super::Construct(sector);
|
||||||
|
@ -205,6 +229,12 @@ void DPillar::Construct(sector_t *sector, EPillar type, double speed, double flo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool FLevelLocals::EV_DoPillar (DPillar::EPillar type, line_t *line, int tag,
|
bool FLevelLocals::EV_DoPillar (DPillar::EPillar type, line_t *line, int tag,
|
||||||
double speed, double height, double height2, int crush, bool hexencrush)
|
double speed, double height, double height2, int crush, bool hexencrush)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,6 +41,12 @@ static FRandom pr_doplat ("DoPlat");
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DPlat, false, false)
|
IMPLEMENT_CLASS(DPlat, false, false)
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPlat::Serialize(FSerializer &arc)
|
void DPlat::Serialize(FSerializer &arc)
|
||||||
{
|
{
|
||||||
Super::Serialize (arc);
|
Super::Serialize (arc);
|
||||||
|
@ -56,6 +62,12 @@ void DPlat::Serialize(FSerializer &arc)
|
||||||
("tag", m_Tag);
|
("tag", m_Tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPlat::PlayPlatSound (const char *sound)
|
void DPlat::PlayPlatSound (const char *sound)
|
||||||
{
|
{
|
||||||
if (m_Sector->Flags & SECF_SILENTMOVE) return;
|
if (m_Sector->Flags & SECF_SILENTMOVE) return;
|
||||||
|
@ -74,9 +86,12 @@ void DPlat::PlayPlatSound (const char *sound)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Move a plat up and down
|
// Move a plat up and down
|
||||||
//
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPlat::Tick ()
|
void DPlat::Tick ()
|
||||||
{
|
{
|
||||||
EMoveResult res;
|
EMoveResult res;
|
||||||
|
@ -200,6 +215,12 @@ void DPlat::Tick ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPlat::Reactivate()
|
void DPlat::Reactivate()
|
||||||
{
|
{
|
||||||
if (m_Type == platToggle) //jff 3/14/98 reactivate toggle type
|
if (m_Type == platToggle) //jff 3/14/98 reactivate toggle type
|
||||||
|
@ -208,6 +229,11 @@ void DPlat::Reactivate()
|
||||||
m_Status = m_OldStatus;
|
m_Status = m_OldStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPlat::Stop()
|
void DPlat::Stop()
|
||||||
{
|
{
|
||||||
|
@ -215,16 +241,25 @@ void DPlat::Stop()
|
||||||
m_Status = in_stasis;
|
m_Status = in_stasis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPlat::Construct (sector_t *sector)
|
void DPlat::Construct (sector_t *sector)
|
||||||
{
|
{
|
||||||
Super::Construct(sector);
|
Super::Construct(sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Do Platforms
|
// Do Platforms
|
||||||
// [RH] Changed amount to height and added delay,
|
// [RH] Changed amount to height and added delay,
|
||||||
// lip, change, tag, and speed parameters.
|
// lip, change, tag, and speed parameters.
|
||||||
//
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool FLevelLocals::EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type, double height, double speed, int delay, int lip, int change)
|
bool FLevelLocals::EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type, double height, double speed, int delay, int lip, int change)
|
||||||
{
|
{
|
||||||
DPlat *plat;
|
DPlat *plat;
|
||||||
|
@ -402,6 +437,12 @@ bool FLevelLocals::EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type, doub
|
||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void FLevelLocals::ActivateInStasisPlat (int tag)
|
void FLevelLocals::ActivateInStasisPlat (int tag)
|
||||||
{
|
{
|
||||||
DPlat *scan;
|
DPlat *scan;
|
||||||
|
@ -414,6 +455,12 @@ void FLevelLocals::ActivateInStasisPlat (int tag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void FLevelLocals::EV_StopPlat (int tag, bool remove)
|
void FLevelLocals::EV_StopPlat (int tag, bool remove)
|
||||||
{
|
{
|
||||||
DPlat *scan;
|
DPlat *scan;
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include "p_spec_thinkers.h"
|
#include "p_spec_thinkers.h"
|
||||||
#include "maploader/maploader.h"
|
#include "maploader/maploader.h"
|
||||||
|
|
||||||
CVAR(Bool, var_pushers, true, CVAR_SERVERINFO);
|
EXTERN_CVAR(Bool, var_pushers);
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DPusher, false, true)
|
IMPLEMENT_CLASS(DPusher, false, true)
|
||||||
|
|
||||||
|
@ -47,6 +47,12 @@ IMPLEMENT_POINTERS_START(DPusher)
|
||||||
IMPLEMENT_POINTER(m_Source)
|
IMPLEMENT_POINTER(m_Source)
|
||||||
IMPLEMENT_POINTERS_END
|
IMPLEMENT_POINTERS_END
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPusher::Serialize(FSerializer &arc)
|
void DPusher::Serialize(FSerializer &arc)
|
||||||
{
|
{
|
||||||
Super::Serialize (arc);
|
Super::Serialize (arc);
|
||||||
|
@ -59,7 +65,7 @@ void DPusher::Serialize(FSerializer &arc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// PUSH/PULL EFFECT
|
// PUSH/PULL EFFECT
|
||||||
//
|
//
|
||||||
|
@ -102,13 +108,14 @@ void DPusher::Serialize(FSerializer &arc)
|
||||||
// to have the PUSH_MASK bit set. If this bit is turned off by a switch
|
// to have the PUSH_MASK bit set. If this bit is turned off by a switch
|
||||||
// at run-time, the effect will not occur. The controlling sector for
|
// at run-time, the effect will not occur. The controlling sector for
|
||||||
// types 1 & 2 is the sector containing the MT_PUSH/MT_PULL Thing.
|
// types 1 & 2 is the sector containing the MT_PUSH/MT_PULL Thing.
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
#define PUSH_FACTOR 128
|
|
||||||
|
|
||||||
/////////////////////////////
|
|
||||||
//
|
//
|
||||||
// Add a push thinker to the thinker list
|
// Add a push thinker to the thinker list
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPusher::Construct (DPusher::EPusher type, line_t *l, int magnitude, int angle,
|
void DPusher::Construct (DPusher::EPusher type, line_t *l, int magnitude, int angle,
|
||||||
AActor *source, int affectee)
|
AActor *source, int affectee)
|
||||||
|
@ -140,11 +147,13 @@ int DPusher::CheckForSectorMatch (EPusher type, int tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// T_Pusher looks for all objects that are inside the radius of
|
// T_Pusher looks for all objects that are inside the radius of
|
||||||
// the effect.
|
// the effect.
|
||||||
//
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void DPusher::Tick ()
|
void DPusher::Tick ()
|
||||||
{
|
{
|
||||||
sector_t *sec;
|
sector_t *sec;
|
||||||
|
@ -292,6 +301,11 @@ void DPusher::Tick ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void FLevelLocals::AdjustPusher(int tag, int magnitude, int angle, bool wind)
|
void FLevelLocals::AdjustPusher(int tag, int magnitude, int angle, bool wind)
|
||||||
{
|
{
|
||||||
|
|
|
@ -161,6 +161,12 @@ class DPusher : public DThinker
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DPusher, DThinker)
|
DECLARE_CLASS (DPusher, DThinker)
|
||||||
HAS_OBJECT_POINTERS
|
HAS_OBJECT_POINTERS
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PUSH_FACTOR = 128
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum EPusher
|
enum EPusher
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue