Skip to content
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions Core/GameEngine/Include/Common/AudioEventInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ struct AudioEventInfo : public MemoryPoolObject
AudioType m_soundType; // This should be either Music, Streaming or SoundEffect


// DynamicAudioEventInfo interfacing functions
virtual Bool isLevelSpecific() const { return false; } ///< If true, this sound is only defined on the current level and can be deleted when that level ends
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() { return nullptr; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const { return nullptr; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class

/// Is this a permanent sound? That is, if I start this sound up, will it ever end
/// "on its own" or only if I explicitly kill it?
Bool isPermanentSound() const { return BitIsSet( m_control, AC_LOOP ) && (m_loopCount == 0 ); }
// DynamicAudioEventInfo interfacing functions
virtual Bool isLevelSpecific() const { return false; } ///< If true, this sound is only defined on the current level and can be deleted when that level ends
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() { return nullptr; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const { return nullptr; } ///< If this object is REALLY a DynamicAudioEventInfo, return a pointer to the derived class

/// Is this a permanent sound? That is, if I start this sound up, will it ever end
/// "on its own" or only if I explicitly kill it?
Bool isPermanentSound() const { return BitIsSet( m_control, AC_LOOP ) && (m_loopCount == 0 ); }

static const FieldParse m_audioEventInfo[]; ///< the parse table for INI definition
const FieldParse *getFieldParse() const { return m_audioEventInfo; }
Expand Down
10 changes: 5 additions & 5 deletions Core/GameEngine/Include/Common/AudioSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct AudioSettings
Int m_streamCount;
Bool m_use3DSoundRangeVolumeFade; // TheSuperHackers @feature Enables 3D sound range volume fade as originally intended
Real m_3DSoundRangeVolumeFadeExponent; // TheSuperHackers @feature Sets 3D sound range volume fade exponent for non-linear fade.
// The higher the exponent, the sharper the decline at the max range.
// The higher the exponent, the sharper the decline at the max range.
Int m_globalMinRange;
Int m_globalMaxRange;
Int m_drawableAmbientFrames;
Expand Down Expand Up @@ -96,10 +96,10 @@ struct AudioSettings
Real m_microphoneMaxPercentageBetweenGroundAndCamera;

//Handles changing sound volume whenever the camera is close to the microphone.
Real m_zoomMinDistance; //If we're closer than the minimum distance, then apply the full bonus no matter how close.
Real m_zoomMaxDistance; //The maximum distance from microphone we need to be before benefiting from any bonus.
Real m_zoomMinDistance; //If we're closer than the minimum distance, then apply the full bonus no matter how close.
Real m_zoomMaxDistance; //The maximum distance from microphone we need to be before benefiting from any bonus.

//NOTE: The higher this value is, the lower normal sounds will be! If you specify a sound volume value of 25%, then sounds will play
//NOTE: The higher this value is, the lower normal sounds will be! If you specify a sound volume value of 25%, then sounds will play
//between 75% and 100%, not 100% to 125%!
Real m_zoomSoundVolumePercentageAmount; //The amount of sound volume dedicated to zooming.
Real m_zoomSoundVolumePercentageAmount; //The amount of sound volume dedicated to zooming.
};
114 changes: 57 additions & 57 deletions Core/GameEngine/Include/Common/DynamicAudioEventInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,51 +39,51 @@ class Xfer;
*****************************************************************************/
class DynamicAudioEventInfo : public AudioEventInfo
{
// NOTE: This implementation would be a lot cleaner & safer if AudioEventInfo was better
// written. Ideally, AudioEventInfo would be a class, not a struct, and provide only
// "get" functions, not "set" functions except for the INI parsing. Then we could
// force people to go through our override...() functions.

MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DynamicAudioEventInfo, "DynamicAudioEventInfo" )

public:
DynamicAudioEventInfo();
explicit DynamicAudioEventInfo( const AudioEventInfo & baseInfo );

// DynamicAudioEventInfo interfacing function overrides
virtual Bool isLevelSpecific() const override;
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() override;
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const override;

// Change various fields from their default (INI) values
void overrideAudioName( const AsciiString & newName );
void overrideLoopFlag( Bool newLoopFlag );
void overrideLoopCount( Int newLoopCount );
void overrideVolume( Real newVolume );
void overrideMinVolume( Real newMinVolume );
void overrideMinRange( Real newMinRange );
void overrideMaxRange( Real newMaxRange );
void overridePriority( AudioPriority newPriority );

// Query fields to see if they have been changed from their INI values
Bool wasAudioNameOverriden() const;
Bool wasLoopFlagOverriden() const;
Bool wasLoopCountOverriden() const;
Bool wasVolumeOverriden() const;
Bool wasMinVolumeOverriden() const;
Bool wasMinRangeOverriden() const;
Bool wasMaxRangeOverriden() const;
Bool wasPriorityOverriden() const;

// Get the name of the audio event which this was based off of
const AsciiString & getOriginalName() const;

// Transfer all overridden fields except the customized name
void xferNoName( Xfer * xfer );

private:
// List of fields we can override
enum OverriddenFields CPP_11(: Int)
// NOTE: This implementation would be a lot cleaner & safer if AudioEventInfo was better
// written. Ideally, AudioEventInfo would be a class, not a struct, and provide only
// "get" functions, not "set" functions except for the INI parsing. Then we could
// force people to go through our override...() functions.

MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( DynamicAudioEventInfo, "DynamicAudioEventInfo" )

public:
DynamicAudioEventInfo();
explicit DynamicAudioEventInfo( const AudioEventInfo & baseInfo );

// DynamicAudioEventInfo interfacing function overrides
virtual Bool isLevelSpecific() const override;
virtual DynamicAudioEventInfo * getDynamicAudioEventInfo() override;
virtual const DynamicAudioEventInfo * getDynamicAudioEventInfo() const override;

// Change various fields from their default (INI) values
void overrideAudioName( const AsciiString & newName );
void overrideLoopFlag( Bool newLoopFlag );
void overrideLoopCount( Int newLoopCount );
void overrideVolume( Real newVolume );
void overrideMinVolume( Real newMinVolume );
void overrideMinRange( Real newMinRange );
void overrideMaxRange( Real newMaxRange );
void overridePriority( AudioPriority newPriority );

// Query fields to see if they have been changed from their INI values
Bool wasAudioNameOverriden() const;
Bool wasLoopFlagOverriden() const;
Bool wasLoopCountOverriden() const;
Bool wasVolumeOverriden() const;
Bool wasMinVolumeOverriden() const;
Bool wasMinRangeOverriden() const;
Bool wasMaxRangeOverriden() const;
Bool wasPriorityOverriden() const;

// Get the name of the audio event which this was based off of
const AsciiString & getOriginalName() const;

// Transfer all overridden fields except the customized name
void xferNoName( Xfer * xfer );

private:
// List of fields we can override
enum OverriddenFields CPP_11(: Int)
{
OVERRIDE_NAME = 0,
OVERRIDE_LOOP_FLAG,
Expand All @@ -96,58 +96,58 @@ class DynamicAudioEventInfo : public AudioEventInfo

OVERRIDE_COUNT // Keep list
};
// Warning: update xferNoName if you modify the enum list!
// Warning: update xferNoName if you modify the enum list!

BitFlags< OVERRIDE_COUNT > m_overriddenFields;
BitFlags< OVERRIDE_COUNT > m_overriddenFields;

// Retain the original name so we can look it up later
AsciiString m_originalName;
// Retain the original name so we can look it up later
AsciiString m_originalName;
};

/** Query: was overrideAudioName called? */
inline Bool DynamicAudioEventInfo::wasAudioNameOverriden() const
{
return m_overriddenFields.test( OVERRIDE_NAME );
return m_overriddenFields.test( OVERRIDE_NAME );
}

/** Query: was overrideLoopFlag called? */
inline Bool DynamicAudioEventInfo::wasLoopFlagOverriden() const
{
return m_overriddenFields.test( OVERRIDE_LOOP_FLAG );
return m_overriddenFields.test( OVERRIDE_LOOP_FLAG );
}

/** Query: was overrideLoopCount called? */
inline Bool DynamicAudioEventInfo::wasLoopCountOverriden() const
{
return m_overriddenFields.test( OVERRIDE_LOOP_COUNT );
return m_overriddenFields.test( OVERRIDE_LOOP_COUNT );
}

/** Query: was overrideVolume called? */
inline Bool DynamicAudioEventInfo::wasVolumeOverriden() const
{
return m_overriddenFields.test( OVERRIDE_VOLUME );
return m_overriddenFields.test( OVERRIDE_VOLUME );
}

/** Query: was overrideMinVolume called? */
inline Bool DynamicAudioEventInfo::wasMinVolumeOverriden() const
{
return m_overriddenFields.test( OVERRIDE_MIN_VOLUME );
return m_overriddenFields.test( OVERRIDE_MIN_VOLUME );
}

/** Query: was overrideMinRange called? */
inline Bool DynamicAudioEventInfo::wasMinRangeOverriden() const
{
return m_overriddenFields.test( OVERRIDE_MIN_RANGE );
return m_overriddenFields.test( OVERRIDE_MIN_RANGE );
}

/** Query: was overrideMaxRange called? */
inline Bool DynamicAudioEventInfo::wasMaxRangeOverriden() const
{
return m_overriddenFields.test( OVERRIDE_MAX_RANGE );
return m_overriddenFields.test( OVERRIDE_MAX_RANGE );
}

/** Query: was overridePriority called? */
inline Bool DynamicAudioEventInfo::wasPriorityOverriden() const
{
return m_overriddenFields.test( OVERRIDE_PRIORITY );
return m_overriddenFields.test( OVERRIDE_PRIORITY );
}
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ struct FileInfo {
//===============================
class FileSystem : public SubsystemInterface
{
FileSystem(const FileSystem&);
FileSystem& operator=(const FileSystem&);
FileSystem(const FileSystem&);
FileSystem& operator=(const FileSystem&);

public:
FileSystem();
Expand Down
16 changes: 8 additions & 8 deletions Core/GameEngine/Include/Common/GameAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ class AudioManager : public SubsystemInterface
// on zoom.
virtual void set3DVolumeAdjustment( Real volumeAdjustment );

virtual Bool has3DSensitiveStreamsPlaying() const = 0;
virtual Bool has3DSensitiveStreamsPlaying() const = 0;

virtual void *getHandleForBink() = 0;
virtual void releaseHandleForBink() = 0;
virtual void *getHandleForBink() = 0;
virtual void releaseHandleForBink() = 0;

// this function will play an audio event rts by loading it into memory. It should not be used
// by anything except for the load screens.
Expand All @@ -262,7 +262,7 @@ class AudioManager : public SubsystemInterface
virtual void processRequestList();

virtual AudioEventInfo *newAudioEventInfo( AsciiString newEventName );
virtual void addAudioEventInfo( AudioEventInfo * newEventInfo );
virtual void addAudioEventInfo( AudioEventInfo * newEventInfo );
virtual AudioEventInfo *findAudioEventInfo( AsciiString eventName ) const;

const AudioSettings *getAudioSettings() const;
Expand Down Expand Up @@ -303,7 +303,7 @@ class AudioManager : public SubsystemInterface

// For Worldbuilder, to build lists from which to select
virtual void findAllAudioEventsOfType( AudioType audioType, std::vector<AudioEventInfo*>& allEvents );
virtual const AudioEventInfoHash & getAllAudioEvents() const { return m_allAudioEventInfo; }
virtual const AudioEventInfoHash & getAllAudioEvents() const { return m_allAudioEventInfo; }

Real getZoomVolume() const { return m_zoomVolume; }
protected:
Expand All @@ -323,10 +323,10 @@ class AudioManager : public SubsystemInterface
// For tracking purposes
virtual AudioHandle allocateNewHandle();

// Remove all AudioEventInfo's with the m_isLevelSpecific flag
virtual void removeLevelSpecificAudioEventInfos();
// Remove all AudioEventInfo's with the m_isLevelSpecific flag
virtual void removeLevelSpecificAudioEventInfos();

void removeAllAudioRequests();
void removeAllAudioRequests();

protected:
AudioSettings *m_audioSettings;
Expand Down
6 changes: 3 additions & 3 deletions Core/GameEngine/Include/Common/INI.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ typedef void (*BuildMultiIniFieldProc)(MultiIniFieldParse& p);
//-------------------------------------------------------------------------------------------------
class INI
{
INI(const INI&);
INI& operator=(const INI&);
INI(const INI&);
INI& operator=(const INI&);

public:

Expand Down Expand Up @@ -219,7 +219,7 @@ class INI
static void parseObjectCreationListDefinition( INI* ini );
static void parseMultiplayerSettingsDefinition( INI* ini );
static void parseMultiplayerColorDefinition( INI* ini );
static void parseMultiplayerStartingMoneyChoiceDefinition( INI* ini );
static void parseMultiplayerStartingMoneyChoiceDefinition( INI* ini );
static void parseOnlineChatColorDefinition( INI* ini );
static void parseMapCacheDefinition( INI* ini );
static void parseVideoDefinition( INI* ini );
Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/Common/MapObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class WorldHeightMapInterfaceClass
{
public:

virtual Int getBorderSize() = 0;
virtual Real getSeismicZVelocity(Int xIndex, Int yIndex) const = 0;
virtual void setSeismicZVelocity(Int xIndex, Int yIndex, Real value) = 0;
virtual Real getBilinearSampleSeismicZVelocity( Int x, Int y) = 0;
virtual Int getBorderSize() = 0;
virtual Real getSeismicZVelocity(Int xIndex, Int yIndex) const = 0;
virtual void setSeismicZVelocity(Int xIndex, Int yIndex, Real value) = 0;
virtual Real getBilinearSampleSeismicZVelocity( Int x, Int y) = 0;

};

Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/Common/Radar.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class Radar : public Snapshot,
Bool getLastEventLoc( Coord3D *eventPos ); ///< get last event loc (if any)
void tryUnderAttackEvent( const Object *obj ); ///< try to make an "under attack" event if it's the proper time
void tryInfiltrationEvent( const Object *obj ); ///< try to make an "infiltration" event if it's the proper time
Bool tryEvent( RadarEventType event, const Coord3D *pos ); ///< try to make a "stealth" event
Bool tryEvent( RadarEventType event, const Coord3D *pos ); ///< try to make a "stealth" event

// adding and removing objects from the radar
virtual Bool addObject( Object *obj ); ///< add object to radar
Expand Down
8 changes: 4 additions & 4 deletions Core/GameEngine/Include/Common/UserPreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class LANPreferences : public UserPreferences
Int getNumRemoteIPs(); // convenience function
UnicodeString getRemoteIPEntry(Int i); // convenience function

Bool getSuperweaponRestricted() const;
Money getStartingCash() const;
void setSuperweaponRestricted( Bool superweaponRestricted);
void setStartingCash( const Money & startingCash );
Bool getSuperweaponRestricted() const;
Money getStartingCash() const;
void setSuperweaponRestricted( Bool superweaponRestricted);
void setStartingCash( const Money & startingCash );
};
Loading
Loading