Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Core/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ set(GAMEENGINE_SRC
# Include/GameLogic/Module/CostModifierUpgrade.h
# Include/GameLogic/Module/CountermeasuresBehavior.h
# Include/GameLogic/Module/BattlePlanBonusBehavior.h
# Include/GameLogic/Module/EnergyShieldBehavior.h
# Include/GameLogic/Module/CrateCollide.h
# Include/GameLogic/Module/CreateCrateDie.h
# Include/GameLogic/Module/CreateModule.h
Expand Down Expand Up @@ -344,6 +345,7 @@ set(GAMEENGINE_SRC
# Include/GameLogic/Module/HighlanderBody.h
# Include/GameLogic/Module/HijackerUpdate.h
# Include/GameLogic/Module/HiveStructureBody.h
# Include/GameLogic/Module/ShieldBody.h
# Include/GameLogic/Module/HordeUpdate.h
# Include/GameLogic/Module/ImmortalBody.h
# Include/GameLogic/Module/InactiveBody.h
Expand Down Expand Up @@ -854,6 +856,7 @@ set(GAMEENGINE_SRC
# Source/GameLogic/Object/Behavior/BunkerBusterBehavior.cpp
# Source/GameLogic/Object/Behavior/CountermeasuresBehavior.cpp
# Source/GameLogic/Object/Behavior/BattlePlanBonusBehavior.cpp
# Source/GameLogic/Object/Behavior/EnergyShieldBehavior.cpp
# Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp
# Source/GameLogic/Object/Behavior/FireWeaponWhenDamagedBehavior.cpp
# Source/GameLogic/Object/Behavior/FireWeaponWhenDeadBehavior.cpp
Expand All @@ -880,6 +883,7 @@ set(GAMEENGINE_SRC
# Source/GameLogic/Object/Body/BodyModule.cpp
# Source/GameLogic/Object/Body/HighlanderBody.cpp
# Source/GameLogic/Object/Body/HiveStructureBody.cpp
# Source/GameLogic/Object/Body/ShieldBody.cpp
# Source/GameLogic/Object/Body/ImmortalBody.cpp
# Source/GameLogic/Object/Body/InactiveBody.cpp
# Source/GameLogic/Object/Body/StructureBody.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ static PoolSizeRec PoolSizes[] =
{ "NeutronBlastBehavior", 4096, 32 },
{ "CountermeasuresBehavior", 256, 32 },
{ "BattlePlanBonusBehavior", 256, 32 },
{ "EnergyShieldBehavior", 256, 32 },
{ "BaseRegenerateUpdate", 128, 32 },
{ "BoneFXDamage", 64, 32 },
{ "BoneFXUpdate", 64, 32 },
Expand Down Expand Up @@ -253,6 +254,7 @@ static PoolSizeRec PoolSizes[] =
{ "SquishCollide", 512, 32 },
{ "StructureBody", 512, 64 },
{ "HiveStructureBody", 64, 32 }, //Stinger sites
{ "ShieldBody", 128, 32 },
{ "StructureCollapseUpdate", 32, 32 },
{ "StructureToppleUpdate", 32, 32 },
{ "SupplyCenterCreate", 32, 32 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
#include "GameLogic/Module/ImmortalBody.h"
#include "GameLogic/Module/StructureBody.h"
#include "GameLogic/Module/HiveStructureBody.h"
#include "GameLogic/Module/ShieldBody.h"

// contain includes
// (none)
Expand Down
4 changes: 4 additions & 0 deletions GeneralsMD/Code/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ set(GAMEENGINE_SRC
Include/GameLogic/Module/UnitProductionBonusUpgrade.h
Include/GameLogic/Module/CountermeasuresBehavior.h
Include/GameLogic/Module/BattlePlanBonusBehavior.h
Include/GameLogic/Module/EnergyShieldBehavior.h
Include/GameLogic/Module/CrateCollide.h
Include/GameLogic/Module/CreateCrateDie.h
Include/GameLogic/Module/CreateModule.h
Expand Down Expand Up @@ -349,6 +350,7 @@ set(GAMEENGINE_SRC
Include/GameLogic/Module/HighlanderBody.h
Include/GameLogic/Module/HijackerUpdate.h
Include/GameLogic/Module/HiveStructureBody.h
Include/GameLogic/Module/ShieldBody.h
Include/GameLogic/Module/HordeUpdate.h
Include/GameLogic/Module/ImmortalBody.h
Include/GameLogic/Module/InactiveBody.h
Expand Down Expand Up @@ -871,6 +873,7 @@ set(GAMEENGINE_SRC
Source/GameLogic/Object/Behavior/BunkerBusterBehavior.cpp
Source/GameLogic/Object/Behavior/CountermeasuresBehavior.cpp
Source/GameLogic/Object/Behavior/BattlePlanBonusBehavior.cpp
Source/GameLogic/Object/Behavior/EnergyShieldBehavior.cpp
Source/GameLogic/Object/Behavior/DumbProjectileBehavior.cpp
Source/GameLogic/Object/Behavior/FreeFallProjectileBehavior.cpp
Source/GameLogic/Object/Behavior/FireWeaponWhenDamagedBehavior.cpp
Expand Down Expand Up @@ -900,6 +903,7 @@ set(GAMEENGINE_SRC
Source/GameLogic/Object/Body/BodyModule.cpp
Source/GameLogic/Object/Body/HighlanderBody.cpp
Source/GameLogic/Object/Body/HiveStructureBody.cpp
Source/GameLogic/Object/Body/ShieldBody.cpp
Source/GameLogic/Object/Body/ImmortalBody.cpp
Source/GameLogic/Object/Body/InactiveBody.cpp
Source/GameLogic/Object/Body/StructureBody.cpp
Expand Down
2 changes: 2 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ class GlobalData : public SubsystemInterface
Real m_ammoPipScaleFactor;
Real m_containerPipScaleFactor;

Real m_progressBarYOffset;

UnsignedInt m_historicDamageLimit;

//Settings for terrain tracks left by vehicles with treads or wheels
Expand Down
4 changes: 2 additions & 2 deletions GeneralsMD/Code/GameEngine/Include/Common/KindOf.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ enum KindOfType CPP_11(: Int)
KINDOF_ENABLE_INFANTRY_LIGHTING, ///< Enable infantry-style ambient lighting for this object
KINDOF_DISABLE_INFANTRY_LIGHTING, ///< Use regular lighting on this infantry object

KINDOF_SHOW_PROGRESS_BAR, ///< Show progress bar for this unit (Shields, deploy, teleport, etc.)

KINDOF_VTOL,
KINDOF_LARGE_AIRCRAFT,
KINDOF_MEDIUM_AIRCRAFT,
Expand Down Expand Up @@ -209,8 +211,6 @@ enum KindOfType CPP_11(: Int)
KINDOF_EXTRA14,
KINDOF_EXTRA15,
KINDOF_EXTRA16,
KINDOF_EXTRA17,
KINDOF_EXTRA18,


KINDOF_COUNT // total number of kindofs
Expand Down
22 changes: 22 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/Common/ThingTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,28 @@ static const char* AmmoPipsStyleNames[] =
};
#endif // end DEFINE_AMMO_PIPS_STYLE_NAMES

// ---
//enum ProgressBarStyle CPP_11(: Int)
//{
// PROGRESS_BAR_NONE = 0, ///< Default. No progress bar
// PROGRESS_BAR_SHIELD, ///< large white bar
// PROGRESS_BAR_SHIELD, ///< like default, but show a single pip only (full or empty)
// AMMO_PIPS_THIN, ///< like default, but half width
//
// AMMO_PIPS_NUM_TYPES // leave this last
//};
//#ifdef DEFINE_PROGRESS_BAR_STYLE_NAMES
//static const char* ProgressBarStyleNames[] =
//{
// "DEFAULT",
// "PERCENTAGE_BAR",
// "SINGLE",
// "THIN",
//
// NULL
//};
//#endif // end DEFINE_PROGRESS_BAR_STYLE_NAMES

//-------------------------------------------------------------------------------------------------
enum ModuleParseMode CPP_11(: Int)
{
Expand Down
3 changes: 3 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,9 @@ class Drawable : public Thing,
void drawContained( const IRegion2D *healthBarRegion ); ///< draw icons
void drawVeterancy( const IRegion2D *healthBarRegion ); ///< draw veterency information

//new:
void drawProgress(const IRegion2D* healthBarRegion); ///< draw progress bar (shield, deploy, teleport, etc.)

void drawEmoticon( const IRegion2D* healthBarRegion );
void drawHealthBar( const IRegion2D* healthBarRegion ); ///< draw heath bar
void drawHealing( const IRegion2D* healthBarRegion ); ///< draw icons
Expand Down
18 changes: 11 additions & 7 deletions GeneralsMD/Code/GameEngine/Include/GameLogic/Module/ActiveBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,15 @@ class ActiveBody : public BodyModule

protected:

UnsignedInt m_nextDamageFXTime;
DamageType m_lastDamageFXDone;
DamageInfo m_lastDamageInfo; ///< store the last DamageInfo object that we received
UnsignedInt m_lastDamageTimestamp; ///< frame of last damage dealt
UnsignedInt m_lastHealingTimestamp; ///< frame of last healing dealt
Bool m_lastDamageCleared;

void validateArmorAndDamageFX() const;
void doDamageFX( const DamageInfo *damageInfo );
virtual void doDamageFX( const DamageInfo *damageInfo );

void createParticleSystems( const AsciiString &boneBaseName,
const ParticleSystemTemplate *systemTemplate,
Expand All @@ -160,6 +167,8 @@ class ActiveBody : public BodyModule

virtual void applyChronoParticleSystems(void);

inline const Armor getCurrentArmor() const { return m_curArmor; }

private:

Real m_currentHealth; ///< health of the object
Expand All @@ -170,14 +179,9 @@ class ActiveBody : public BodyModule
Real m_currentChronoDamage; ///< Same as Subdual, but for CHRONO_GUN

BodyDamageType m_curDamageState; ///< last known damage state
UnsignedInt m_nextDamageFXTime;
DamageType m_lastDamageFXDone;
DamageInfo m_lastDamageInfo; ///< store the last DamageInfo object that we received
UnsignedInt m_lastDamageTimestamp; ///< frame of last damage dealt
UnsignedInt m_lastHealingTimestamp; ///< frame of last healing dealt

Bool m_frontCrushed;
Bool m_backCrushed;
Bool m_lastDamageCleared;
Bool m_indestructible; ///< is this object indestructible?
Bool m_damageFXOverride;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class StealthUpdate;
class SpyVisionUpdate;
// -----------------
class BattlePlanBonusBehaviorInterface;
class EnergyShieldBehaviorInterface;

//-------------------------------------------------------------------------------------------------
class BehaviorModuleData : public ModuleData
Expand Down Expand Up @@ -142,6 +143,7 @@ class BehaviorModuleInterface
virtual const CountermeasuresBehaviorInterface* getCountermeasuresBehaviorInterface() const = 0;

virtual BattlePlanBonusBehaviorInterface* getBattlePlanBonusBehaviorInterface() = 0;
virtual EnergyShieldBehaviorInterface* getEnergyShieldBehaviorInterface() = 0;

};

Expand Down Expand Up @@ -197,7 +199,8 @@ class BehaviorModule : public ObjectModule, public BehaviorModuleInterface
virtual SpawnBehaviorInterface* getSpawnBehaviorInterface() { return NULL; }
virtual CountermeasuresBehaviorInterface* getCountermeasuresBehaviorInterface() { return NULL; }
virtual const CountermeasuresBehaviorInterface* getCountermeasuresBehaviorInterface() const { return NULL; }
virtual BattlePlanBonusBehaviorInterface* getBattlePlanBonusBehaviorInterface() { return NULL; };
virtual BattlePlanBonusBehaviorInterface* getBattlePlanBonusBehaviorInterface() { return NULL; }
virtual EnergyShieldBehaviorInterface* getEnergyShieldBehaviorInterface() { return NULL; }

protected:

Expand Down
Loading