Skip to content

[GEN][ZH] Cleans up inconsistencies #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ class ArchiveFileSystem : public SubsystemInterface

// Unprotected this for copy-protection routines
AsciiString getArchiveFilenameForFile(const AsciiString& filename) const;

void loadMods( void );

protected:
Expand Down
12 changes: 6 additions & 6 deletions Generals/Code/GameEngine/Include/Common/BuildAssistant.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ class BuildAssistant : public SubsystemInterface

enum LocalLegalToBuildOptions
{
TERRAIN_RESTRICTIONS = 0x00000001, ///< Check for basic terrain restrictions
CLEAR_PATH = 0x00000002, ///< Must be able to path find to location
NO_OBJECT_OVERLAP = 0X00000004, ///< Can't overlap enemy objects, or locally controled objects that can't move out of the way
USE_QUICK_PATHFIND = 0x00000008, ///< Use the quick pathfind method for CLEAR_PATH
SHROUD_REVEALED = 0x00000010, ///< Check to make sure the shroud is revealed
NO_ENEMY_OBJECT_OVERLAP=0x00000020, ///< Can't overlap enemy objects only.
TERRAIN_RESTRICTIONS = 0x00000001, ///< Check for basic terrain restrictions
CLEAR_PATH = 0x00000002, ///< Must be able to path find to location
NO_OBJECT_OVERLAP = 0X00000004, ///< Can't overlap enemy objects, or locally controled objects that can't move out of the way
USE_QUICK_PATHFIND = 0x00000008, ///< Use the quick pathfind method for CLEAR_PATH
SHROUD_REVEALED = 0x00000010, ///< Check to make sure the shroud is revealed
NO_ENEMY_OBJECT_OVERLAP = 0x00000020, ///< Can't overlap enemy objects only.
};

public:
Expand Down
2 changes: 0 additions & 2 deletions Generals/Code/GameEngine/Include/Common/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ class FileSystem : public SubsystemInterface
void loadMusicFilesFromCD();
void unloadMusicFilesFromCD();
protected:


};

extern FileSystem* TheFileSystem;
Expand Down
7 changes: 2 additions & 5 deletions Generals/Code/GameEngine/Include/Common/GameMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ private: \
public: /* include this line at the end to reset visibility to 'public' */



// ----------------------------------------------------------------------------
/**
This class is provided as a simple and safe way to integrate C++ object allocation
Expand Down Expand Up @@ -768,7 +767,6 @@ class MemoryPoolObject
};



// INLINING ///////////////////////////////////////////////////////////////////

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -890,10 +888,9 @@ class STLSpecialAlloc
static void deallocate(void* __p, size_t);
};

#endif //DISABLE_GAMEMEMORY
#endif // DISABLE_GAMEMEMORY


// ----------------------------------------------------------------------------
/**
A simple utility class to ensure exception safety; this holds a MemoryPoolObject
and deletes it in its destructor. Especially useful for iterators!
Expand All @@ -910,7 +907,6 @@ class MemoryPoolObjectHolder
};


// ----------------------------------------------------------------------------
/**
Sometimes you want to make a class's destructor protected so that it can only
be destroyed under special circumstances. MemoryPoolObject short-circuits this
Expand All @@ -924,4 +920,5 @@ ARGVIS: void deleteInstance() { MemoryPoolObject::deleteInstance(); } public:

#define EMPTY_DTOR(CLASS) inline CLASS::~CLASS() { }


#endif // _GAME_MEMORY_H_
3 changes: 1 addition & 2 deletions Generals/Code/GameEngine/Include/Common/GlobalData.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class GlobalData : public SubsystemInterface
UnsignedInt m_unlookPersistDuration; ///< How long after unlook until the sighting info executes the undo

Bool m_shouldUpdateTGAToDDS; ///< Should we attempt to update old TGAs to DDS stuff on loadup?

UnsignedInt m_doubleClickTimeMS; ///< What is the maximum amount of time that can seperate two clicks in order
///< for us to generate a double click message?

Expand Down Expand Up @@ -486,7 +486,6 @@ class GlobalData : public SubsystemInterface

Bool m_isBreakableMovie; ///< if we enter a breakable movie, set this flag
Bool m_breakTheMovie; ///< The user has hit escape!

AsciiString m_modDir;
AsciiString m_modBIG;

Expand Down
1 change: 0 additions & 1 deletion Generals/Code/GameEngine/Include/Common/KindOf.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ enum KindOfType
KINDOF_DONT_AUTO_CRUSH_INFANTRY, ///< These units don't try to crush the infantry if ai.

KINDOF_COUNT // total number of kindofs

};

typedef BitFlags<KINDOF_COUNT> KindOfMaskType;
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/Common/MiscAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ struct MiscAudio
};


#endif /* _MISCAUDIO_H_ */
#endif /* _MISCAUDIO_H_ */
1 change: 0 additions & 1 deletion Generals/Code/GameEngine/Include/Common/Money.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ class Money : public Snapshot
void setPlayerIndex(Int ndx) { m_playerIndex = ndx; }

protected:

// snapshot methods
virtual void crc( Xfer *xfer );
virtual void xfer( Xfer *xfer );
Expand Down
2 changes: 0 additions & 2 deletions Generals/Code/GameEngine/Include/Common/PlayerTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class PlayerTemplate
Int getSpecialPowerShortcutButtonCount( void ) const {return m_specialPowerShortcutButtonCount; }

AsciiString getLoadScreenMusic( void ) const {return m_loadScreenMusic; }


static const FieldParse* getFieldParse();

Expand Down Expand Up @@ -200,7 +199,6 @@ class PlayerTemplateStore : public SubsystemInterface
const PlayerTemplate* getNthPlayerTemplate(Int i) const;
const PlayerTemplate* findPlayerTemplate(NameKeyType namekey) const;
inline Int getPlayerTemplateCount() const { return m_playerTemplates.size(); }


// This function will fill outStringList with all the sides found in all the templates
void getAllSideStrings(AsciiStringList *outStringList);
Expand Down
4 changes: 1 addition & 3 deletions Generals/Code/GameEngine/Include/Common/StackDump.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@

#ifndef IG_DEGBUG_STACKTRACE
#define IG_DEBUG_STACKTRACE 1
#endif

#endif // Unsure about this one -ML 3/25/03
#if defined(_DEBUG) || defined(_INTERNAL) || defined(IG_DEBUG_STACKTRACE)

// Writes a stackdump (provide a callback : gets called per line)
Expand Down Expand Up @@ -71,5 +70,4 @@ __inline void DumpExceptionInfo( unsigned int u, EXCEPTION_POINTERS* e_info ) {}

extern AsciiString g_LastErrorDump;


#endif // __STACKDUMP_H_
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/Common/ThingTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ class ThingTemplate : public Overridable
const FXList* getPerUnitFX(const AsciiString& fxName) const;

UnsignedInt getThreatValue() const { return m_threatValue; }
UnsignedInt getMaxSimultaneousOfType() const { return m_maxSimultaneousOfType; }
UnsignedInt getMaxSimultaneousOfType() const { return m_maxSimultaneousOfType; }

void validate();

Expand Down
1 change: 0 additions & 1 deletion Generals/Code/GameEngine/Include/GameClient/CommandXlat.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ enum FilterModes
FM_VIEW_MB_END_PAN_ALPHA, // Moton blur on screen pan (for camera tracks object mode)



// NOTE: This has to be the last entry in this enum.
// Add new entries before this one. jba.
FM_VIEW_MB_PAN_ALPHA, // Moton blur on screen pan (for camera tracks object mode)
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/GameClient/ControlBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ enum GUICommandType
GUI_COMMAND_FIRE_WEAPON, ///< fire a weapon
GUI_COMMAND_SPECIAL_POWER, ///< do a special power
GUI_COMMAND_PURCHASE_SCIENCE, ///< purchase science
GUI_COMMAND_HACK_INTERNET, ///< Hey author, write me!
GUI_COMMAND_HACK_INTERNET, ///< gain income from the ether (by hacking the internet)
GUI_COMMAND_TOGGLE_OVERCHARGE, ///< Overcharge command for power plants
#ifdef ALLOW_SURRENDER
GUI_COMMAND_POW_RETURN_TO_PRISON, ///< POW Truck, return to prison
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/GameClient/Eva.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ class Eva : public SubsystemInterface

extern Eva *TheEva;

#endif /* __EVA_H__ */
#endif /* __EVA_H__ */
1 change: 0 additions & 1 deletion Generals/Code/GameEngine/Include/GameClient/GameClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ class GameClient : public SubsystemInterface,
virtual TerrainVisual *createTerrainVisual( void ) = 0; ///< Factory for TerrainVisual classes. Called during init to instance TheTerrainVisual
virtual Keyboard *createKeyboard( void ) = 0; ///< factory for the keyboard
virtual Mouse *createMouse( void ) = 0; ///< factory for the mouse

virtual void setFrameRate(Real msecsPerFrame) = 0;

// ----------------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Include/GameClient/InGameUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
#include "Common/GameType.h"
#include "Common/MessageStream.h" // for GameMessageTranslator
#include "Common/SpecialPowerType.h"
#include "Common/Snapshot.h"
#include "Common/STLTypedefs.h"
#include "Common/SubsystemInterface.h"
#include "Common/UnicodeString.h"
#include "GameClient/DisplayString.h"
#include "GameClient/Mouse.h"
#include "GameClient/RadiusDecal.h"
#include "GameClient/View.h"
#include "Common/Snapshot.h"

// FORWARD DECLARATIONS ///////////////////////////////////////////////////////////////////////////
class Drawable;
Expand Down Expand Up @@ -118,7 +118,7 @@ static const char *TheRadiusCursorNames[] =
"CARPETBOMB",
"DAISYCUTTER",
"PARADROP",
"SPYSATELLITE",
"SPYSATELLITE",

"NUCLEARMISSILE",
"EMPPULSE",
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/GameClient/Mouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class Mouse : public SubsystemInterface
void mouseNotifyResolutionChange(void);

Bool isClick(const ICoord2D *anchor, const ICoord2D *dest, UnsignedInt previousMouseClick, UnsignedInt currentMouseClick);

AsciiString m_tooltipFontName; ///< tooltip font
Int m_tooltipFontSize; ///< tooltip font
Bool m_tooltipFontIsBold; ///< tooltip font
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class TerrainVisual : public Snapshot,
// Modify height.
//
virtual void setRawMapHeight(const ICoord2D *gridPos, Int height)=0;

/// Replace the skybox texture
virtual void replaceSkyboxTextures(const AsciiString *oldTexName[NumSkyboxTextures], const AsciiString *newTexName[NumSkyboxTextures])=0;

Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Include/GameClient/View.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ class View : public Snapshot
virtual void setFadeParameters(Int fadeFrames, Int direction) { };
virtual void set3DWireFrameMode(Bool enable) { };

virtual void resetCamera(const Coord3D *location, Int frames) {}; ///< Move camera to location, and reset to default angle & zoom.
virtual void rotateCamera(Real rotations, Int frames) {}; ///< Rotate camera about current viewpoint.
virtual void resetCamera(const Coord3D *location, Int frames) {}; ///< Move camera to location, and reset to default angle & zoom.
virtual void rotateCamera(Real rotations, Int frames) {}; ///< Rotate camera about current viewpoint.
virtual void rotateCameraTowardObject(ObjectID id, Int milliseconds, Int holdMilliseconds) {}; ///< Rotate camera to face an object, and hold on it
virtual void rotateCameraTowardPosition(const Coord3D *pLoc, Int milliseconds) {}; ///< Rotate camera to face a location.
virtual Bool isTimeFrozen(void){ return false;} ///< Freezes time during the next camera movement.
Expand Down
3 changes: 2 additions & 1 deletion Generals/Code/GameEngine/Include/GameLogic/AI.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ class Weapon;
// TheSuperHackers @compile xezon 22/03/2025 Renames AI_PASSIVE to not conflict with macro in ws2def.h

// Note - written out in save/load xfer and .map files, don't change these numbers.
enum AttitudeType {
enum AttitudeType
{
ATTITUDE_SLEEP = -2,
ATTITUDE_PASSIVE=-1,
ATTITUDE_NORMAL=0,
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/GameLogic/Damage.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "Common/GameType.h"
#include "Common/Snapshot.h"


// FORWARD REFERENCES /////////////////////////////////////////////////////////////////////////////
class Object;
class INI;
Expand Down Expand Up @@ -215,7 +216,6 @@ static const char *TheDeathNames[] =
"DETONATED",
"SPLATTED",
"POISONED_BETA",

"EXTRA_2",
"EXTRA_3",
"EXTRA_4",
Expand Down
2 changes: 2 additions & 0 deletions Generals/Code/GameEngine/Include/GameLogic/GameLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class GhostObjectManager;
class CommandButton;
enum BuildableStatus;


typedef const CommandButton* ConstCommandButtonPtr;

// What kind of game we're in.
Expand All @@ -88,6 +89,7 @@ enum
CRC_RECALC
};


/// Function pointers for use by GameLogic callback functions.
typedef void (*GameLogicFuncPtr)( Object *obj, void *userData );
typedef std::hash_map<ObjectID, Object *, rts::hash<ObjectID>, rts::equal_to<ObjectID> > ObjectPtrHash;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ class ParkingPlaceBehaviorInterface
Coord3D parkingSpace;
Real parkingOrientation;
Coord3D runwayPrep;
Coord3D runwayStart;
Coord3D runwayEnd;
Coord3D runwayStart;
Coord3D runwayEnd;
Coord3D runwayApproach;
Coord3D hangarInternal;
Real hangarInternalOrient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// //
////////////////////////////////////////////////////////////////////////////////

// FILE: VeterancyCrateCollide.h /////////////////////////////////////////////////////////////////////////
// FILE: ConvertToCarBombCrateCollide.h /////////////////////////////////////////////////////////////////////////
// Author: Kris Morness, April 2002
// Desc: A crate (actually a terrorist - mobile crate) that converts a car into a carbomb, activating
// it's weapon and then activating it's AI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class EMPUpdateModuleData : public UpdateModuleData
RGBColor m_startColor;
RGBColor m_endColor;
const ParticleSystemTemplate *m_disableFXParticleSystem;
Real m_sparksPerCubicFoot; //<just like it sounds
Real m_sparksPerCubicFoot; //<just like it sounds

EMPUpdateModuleData()
{
Expand Down
4 changes: 2 additions & 2 deletions Generals/Code/GameEngine/Include/GameLogic/Module/FXListDie.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class FXList;
class FXListDieModuleData : public DieModuleData
{
public:
const FXList *m_defaultDeathFX; ///< default fx to make
Bool m_orientToObject;
const FXList *m_defaultDeathFX; ///< default fx to make
Bool m_orientToObject;

FXListDieModuleData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#define __FireWeaponWhenDeadBehavior_H_

// INCLUDES ///////////////////////////////////////////////////////////////////////////////////////

#include "GameLogic/Module/BehaviorModule.h"
#include "GameLogic/Module/DieModule.h"
#include "GameLogic/Module/UpgradeModule.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class GarrisonContainModuleData : public OpenContainModuleData
Real m_framesForFullHeal;
Bool m_mobileGarrison;
Bool m_immuneToClearBuildingAttacks;

InitialRoster m_initialRoster;

GarrisonContainModuleData( void );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "GameLogic/Module/DieModule.h"
#include "GameLogic/Module/UpgradeModule.h"


//-------------------------------------------------------------------------------------------------
class GenerateMinefieldBehaviorModuleData : public BehaviorModuleData
{
Expand Down Expand Up @@ -110,10 +109,10 @@ class GenerateMinefieldBehavior : public BehaviorModule,


private:
Coord3D m_target;
Bool m_hasTarget;
Bool m_generated;
Coord3D m_target;
Bool m_hasTarget;
Bool m_generated;

const Coord3D* getMinefieldTarget() const;
void placeMines();
void placeMinesInFootprint(const GeometryInfo& geom, const ThingTemplate* mineTemplate);
Expand Down
12 changes: 6 additions & 6 deletions Generals/Code/GameEngine/Include/GameLogic/Module/OCLUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ class ObjectCreationList;
class OCLUpdateModuleData : public UpdateModuleData
{
public:
const ObjectCreationList *m_ocl;
UnsignedInt m_minDelay;
UnsignedInt m_maxDelay;
Bool m_isCreateAtEdge; ///< Otherwise, it is created on top of myself
const ObjectCreationList * m_ocl;
UnsignedInt m_minDelay;
UnsignedInt m_maxDelay;
Bool m_isCreateAtEdge; ///< Otherwise, it is created on top of myself

OCLUpdateModuleData();

Expand Down Expand Up @@ -74,8 +74,8 @@ class OCLUpdate : public UpdateModule

protected:

UnsignedInt m_nextCreationFrame;
UnsignedInt m_timerStartedFrame;
UnsignedInt m_nextCreationFrame;
UnsignedInt m_timerStartedFrame;

Bool shouldCreate();
void setNextCreationFrame();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class PhysicsBehaviorModuleData : public UpdateModuleData
Real m_minFallSpeedForDamage;
Real m_fallHeightDamageFactor;
Real m_pitchRollYawFactor;

const WeaponTemplate* m_vehicleCrashesIntoBuildingWeaponTemplate;
const WeaponTemplate* m_vehicleCrashesIntoNonBuildingWeaponTemplate;

Expand Down
Loading