Skip to content

Commit 2d4329a

Browse files
committed
Clean up
1 parent 1654687 commit 2d4329a

3 files changed

Lines changed: 0 additions & 188 deletions

File tree

GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialPowerDesignatorUpdate.h

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -67,59 +67,19 @@ class SpecialPowerDesignatorUpdate : public RadiusDecalBehavior
6767
SpecialPowerDesignatorUpdate( Thing *thing, const ModuleData* moduleData );
6868
// virtual destructor prototype provided by memory pool declaration
6969

70-
//void createRadiusDecal( void );
71-
//void killRadiusDecal( void );
72-
7370
// UpdateModuleInterface
7471
virtual UpdateSleepTime update();
7572

76-
// virtual DisabledMaskType getDisabledTypesToProcess() const { return getSpecialPowerDesignatorUpdateModuleData()->m_worksWhileContained ? DISABLEDMASK_ALL : MAKE_DISABLED_MASK(DISABLED_HELD); }
77-
7873
Real getDesignatorRadius() { return getSpecialPowerDesignatorUpdateModuleData()->m_designatorRadius; }
7974

8075
Bool isValidDesignatorForSpecialPower(const SpecialPowerTemplate* templ);
8176

82-
//void setActive(bool status);
83-
8477
void triggerSpecialPower();
8578

8679
protected:
8780

88-
//virtual void upgradeImplementation()
89-
//{
90-
// createRadiusDecal();
91-
// setWakeFrame(getObject(), UPDATE_SLEEP_NONE);
92-
//}
93-
94-
//virtual void getUpgradeActivationMasks(UpgradeMaskType& activation, UpgradeMaskType& conflicting) const
95-
//{
96-
// getSpecialPowerDesignatorUpdateModuleData()->m_upgradeMuxData.getUpgradeActivationMasks(activation, conflicting);
97-
//}
98-
99-
//virtual void performUpgradeFX()
100-
//{
101-
// getSpecialPowerDesignatorUpdateModuleData()->m_upgradeMuxData.performUpgradeFX(getObject());
102-
//}
103-
104-
//virtual void processUpgradeRemoval()
105-
//{
106-
// // I can't take it any more. Let the record show that I think the UpgradeMux multiple inheritence is CRAP.
107-
// getSpecialPowerDesignatorUpdateModuleData()->m_upgradeMuxData.muxDataProcessUpgradeRemoval(getObject());
108-
//}
109-
110-
//virtual Bool requiresAllActivationUpgrades() const
111-
//{
112-
// return getSpecialPowerDesignatorUpdateModuleData()->m_upgradeMuxData.m_requiresAllTriggers;
113-
//}
114-
115-
//inline Bool isUpgradeActive() const { return isAlreadyUpgraded(); }
116-
117-
//virtual Bool isSubObjectsUpgrade() { return false; }
118-
11981
private:
12082

121-
Bool m_targetingActive; // We are currently looking for targets
122-
12383
UnsignedInt m_statusClearFrame;
12484

12585
};

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -3251,15 +3251,12 @@ void InGameUI::setGUICommand( const CommandButton *command )
32513251

32523252
// Target designator checks
32533253
if (m_designatorCommand && m_designatorCommand != m_pendingGUICommand) {
3254-
//hideDesignatorDecals();
32553254
m_designatorCommand = NULL;
32563255
}
32573256

32583257
if (command && BitIsSet(command->getOptions(), COMMAND_OPTION_NEED_TARGET)) {
32593258
const SpecialPowerTemplate* sp = command->getSpecialPowerTemplate();
32603259
if (sp != nullptr && sp->isNeedsTargetDesignator()) {
3261-
/* m_showDesignatorDecals = TRUE;
3262-
showDesignatorDecals(command->getSpecialPowerTemplate());*/
32633260
m_designatorCommand = command;
32643261
}
32653262
}
@@ -6449,51 +6446,6 @@ void InGameUI::drawPlayerInfoList()
64496446
}
64506447
}
64516448

6452-
// ----------------------------------------------------------
6453-
//static void showDesignatorDecal(Object* obj, void* userData)
6454-
//{
6455-
// //SpecialPowerTemplate *powerTemplate = (SpecialPowerTemplate*)userData;
6456-
// static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY("SpecialPowerDesignatorUpdate");
6457-
//
6458-
// if (obj) {
6459-
// SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule(key_SpecialPowerDesignatorUpdate);
6460-
// if (update) { // && update->getSpecialPowerTemplate() == powerTemplate) {
6461-
// //update->showDesignatorDecal(true);
6462-
//
6463-
// Drawable* draw = obj->getDrawable();
6464-
// draw->setTerrainDecal(TERRAIN_DECAL_RING);
6465-
// Real size = 3.0f * update->getDesignatorRadius();
6466-
// draw->setTerrainDecalSize(size, size);
6467-
//
6468-
// // if (update->getSpecialPowerTemplate() == powerTemplate) {
6469-
//
6470-
// // Real distSqr = ThePartitionManager->getDistanceSquared(obj2, loc, FROM_CENTER_2D);
6471-
// // Real dist = sqrt(distSqr);
6472-
// // if (dist <= update->getDesignatorRadius()) {
6473-
// // isDesignatorInRange = true;
6474-
// // break;
6475-
// // }
6476-
// // }
6477-
// }
6478-
// }
6479-
//}
6480-
//
6481-
//static void hideDesignatorDecal(Object* obj, void* userData)
6482-
//{
6483-
// //SpecialPowerTemplate *powerTemplate = (SpecialPowerTemplate*)userData;
6484-
// static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY("SpecialPowerDesignatorUpdate");
6485-
//
6486-
// if (obj) {
6487-
// SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule(key_SpecialPowerDesignatorUpdate);
6488-
// if (update) { // && update->getSpecialPowerTemplate() == powerTemplate) {
6489-
// //update->showDesignatorDecal(false);
6490-
// Drawable* draw = obj->getDrawable();
6491-
// draw->setTerrainDecal(TERRAIN_DECAL_NONE);
6492-
// }
6493-
// }
6494-
//}
6495-
6496-
64976449
// -------------
64986450
// -------------
64996451
const SpecialPowerTemplate* InGameUI::getTargetDesignatorPower()
@@ -6505,47 +6457,3 @@ const SpecialPowerTemplate* InGameUI::getTargetDesignatorPower()
65056457
}
65066458
// -------------
65076459
// -------------
6508-
//void InGameUI::showDesignatorDecals(const SpecialPowerTemplate* powerTemplate) {
6509-
//
6510-
// static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY("SpecialPowerDesignatorUpdate");
6511-
//
6512-
// PartitionFilterSamePlayer filterPlayer(ThePlayerList->getLocalPlayer());
6513-
// PartitionFilterAlive filterAlive;
6514-
// PartitionFilterAcceptByKindOf filterKindOf(MAKE_KINDOF_MASK(KINDOF_TARGET_DESIGNATOR), KINDOFMASK_NONE);
6515-
// PartitionFilter* filters[] = { &filterPlayer, &filterAlive, &filterKindOf, NULL };
6516-
// // scan objects on entire map
6517-
// ObjectIterator* iter = ThePartitionManager->iterateAllObjects(filters);
6518-
// Object* obj;
6519-
// MemoryPoolObjectHolder hold(iter);
6520-
// for (obj = iter->first(); obj; obj = iter->next()) {
6521-
//
6522-
// SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule(key_SpecialPowerDesignatorUpdate);
6523-
// if (update) {
6524-
// if (update->isValidDesignatorForSpecialPower(powerTemplate)) {
6525-
// update->setActive(true);
6526-
// }
6527-
// }
6528-
// }
6529-
//}
6530-
//
6531-
//void InGameUI::hideDesignatorDecals() { //const SpecialPowerTemplate *powerTemplate) {
6532-
// //ThePlayerList->getLocalPlayer()->iterateObjects( hideDesignatorDecal, &powerTemplate );
6533-
//
6534-
// static NameKeyType key_SpecialPowerDesignatorUpdate = NAMEKEY("SpecialPowerDesignatorUpdate");
6535-
//
6536-
// PartitionFilterSamePlayer filterPlayer(ThePlayerList->getLocalPlayer());
6537-
// PartitionFilterAlive filterAlive;
6538-
// PartitionFilterAcceptByKindOf filterKindOf(MAKE_KINDOF_MASK(KINDOF_TARGET_DESIGNATOR), KINDOFMASK_NONE);
6539-
// PartitionFilter* filters[] = { &filterPlayer, &filterAlive, &filterKindOf, NULL };
6540-
// // scan objects on entire map
6541-
// ObjectIterator* iter = ThePartitionManager->iterateAllObjects(filters);
6542-
// Object* obj;
6543-
// MemoryPoolObjectHolder hold(iter);
6544-
// for (obj = iter->first(); obj; obj = iter->next()) {
6545-
//
6546-
// SpecialPowerDesignatorUpdate* update = (SpecialPowerDesignatorUpdate*)obj->findUpdateModule(key_SpecialPowerDesignatorUpdate);
6547-
// if (update) {
6548-
// update->setActive(false);
6549-
// }
6550-
// }
6551-
//}

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialPowerDesignatorUpdate.cpp

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ SpecialPowerDesignatorUpdateModuleData::SpecialPowerDesignatorUpdateModuleData()
6060
{ "SpecialPowerTemplate", INI::parseSpecialPowerTemplate, NULL, offsetof(SpecialPowerDesignatorUpdateModuleData, m_specialPowerTemplate) },
6161
{ "DesignatorRadius", INI::parseReal, NULL, offsetof(SpecialPowerDesignatorUpdateModuleData, m_designatorRadius) },
6262
{ "AlwaysShowDecal", INI::parseBool, NULL, offsetof(SpecialPowerDesignatorUpdateModuleData, m_alwaysShowDecal) },
63-
// { "WorksWhileContained", INI::parseBool, NULL, offsetof(SpecialPowerDesignatorUpdateModuleData, m_worksWhileContained) },
6463
{ "TriggerStatusTime", INI::parseDurationUnsignedInt, NULL, offsetof(SpecialPowerDesignatorUpdateModuleData, m_triggerStatusTime) },
6564
{ "TriggerStatusType", ObjectStatusMaskType::parseSingleBitFromINI, NULL, offsetof(SpecialPowerDesignatorUpdateModuleData, m_triggerStatusType) },
6665
{ "DecalRadius", INI::parseReal, NULL, offsetof( RadiusDecalBehaviorModuleData, m_decalRadius) },
@@ -76,17 +75,7 @@ SpecialPowerDesignatorUpdateModuleData::SpecialPowerDesignatorUpdateModuleData()
7675
//-------------------------------------------------------------------------------------------------
7776
SpecialPowerDesignatorUpdate::SpecialPowerDesignatorUpdate( Thing *thing, const ModuleData* moduleData ) : RadiusDecalBehavior( thing, moduleData )
7877
{
79-
m_targetingActive = false;
8078
m_statusClearFrame = 0;
81-
82-
/*if (getSpecialPowerDesignatorUpdateModuleData()->m_initiallyActive)
83-
{
84-
giveSelfUpgrade();
85-
}
86-
else {
87-
clearDecal();
88-
setWakeFrame(getObject(), UPDATE_SLEEP_FOREVER);
89-
}*/
9079
}
9180

9281
//-------------------------------------------------------------------------------------------------
@@ -95,34 +84,6 @@ SpecialPowerDesignatorUpdate::~SpecialPowerDesignatorUpdate( void )
9584
{
9685
}
9786

98-
//-------------------------------------------------------------------------------------------------
99-
//-------------------------------------------------------------------------------------------------
100-
//void SpecialPowerDesignatorUpdate::createRadiusDecal( void )
101-
//{
102-
// const SpecialPowerDesignatorUpdateModuleData* data = getSpecialPowerDesignatorUpdateModuleData();
103-
//
104-
// if (data->m_alwaysShowDecal || m_targetingActive) {
105-
// RadiusDecalBehavior::createRadiusDecal();
106-
// }
107-
// else {
108-
// setWakeFrame(getObject(), UPDATE_SLEEP_FOREVER);
109-
// }
110-
//}
111-
//-------------------------------------------------------------------------------------------------
112-
//-------------------------------------------------------------------------------------------------
113-
//void SpecialPowerDesignatorUpdate::setActive(bool status)
114-
//{
115-
// DEBUG_LOG((">>> SpecialPowerDesignatorUpdate::setActive = %d", status));
116-
//
117-
// const SpecialPowerDesignatorUpdateModuleData* data = getSpecialPowerDesignatorUpdateModuleData();
118-
//
119-
// m_targetingActive = status;
120-
//
121-
// if (!status && !data->m_alwaysShowDecal)
122-
// clearDecal();
123-
//
124-
// setWakeFrame(getObject(), UPDATE_SLEEP_NONE);
125-
//}
12687
//-------------------------------------------------------------------------------------------------
12788
//-------------------------------------------------------------------------------------------------
12889
void SpecialPowerDesignatorUpdate::triggerSpecialPower()
@@ -137,28 +98,12 @@ void SpecialPowerDesignatorUpdate::triggerSpecialPower()
13798

13899
FXList::doFXObj(data->m_triggerFX, getObject());
139100
}
140-
//
141-
////-------------------------------------------------------------------------------------------------
142-
////-------------------------------------------------------------------------------------------------
143-
//void SpecialPowerDesignatorUpdate::killRadiusDecal()
144-
//{
145-
// clearDecal();
146-
// setWakeFrame(getObject(), UPDATE_SLEEP_FOREVER);
147-
//}
148-
//
149-
//// -----------------------------------------------------------------------------------------------
150-
//void SpecialPowerDesignatorUpdate::clearDecal()
151-
//{
152-
// m_radiusDecal.clear();
153-
//}
154-
//
155101
//-------------------------------------------------------------------------------------------------
156102
//-------------------------------------------------------------------------------------------------
157103
UpdateSleepTime SpecialPowerDesignatorUpdate::update( void )
158104
{
159105
const SpecialPowerDesignatorUpdateModuleData* data = getSpecialPowerDesignatorUpdateModuleData();
160106

161-
//UpdateSleepTime result = UPDATE_SLEEP_FOREVER;
162107
// First handle status
163108
if (m_statusClearFrame > 0 && data->m_triggerStatusType != OBJECT_STATUS_NONE) {
164109
if (TheGameLogic->getFrame() == m_statusClearFrame) {
@@ -216,7 +161,6 @@ void SpecialPowerDesignatorUpdate::xfer( Xfer *xfer )
216161
// extend base class
217162
RadiusDecalBehavior::xfer( xfer );
218163

219-
xfer->xferBool(&m_targetingActive);
220164
xfer->xferUnsignedInt(&m_statusClearFrame);
221165

222166

0 commit comments

Comments
 (0)