Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
8bc8922
chore: Prevent conflict between clang-format and pre-C++11 nested tem…
DevGeniusCode Jun 19, 2026
e577fad
chore: Prevent conflict between clang-format and MSVC by wrapping inl…
githubawn Jun 19, 2026
a585917
bugfix(logic): Restore retail compatibility after change in Counterme…
Caball009 Jun 20, 2026
984db42
refactor(sortingrenderer): Replace custom doubly linked list with std…
stephanmeesters Jun 20, 2026
b2769b7
chore(sortingrenderer): Remove unused function Insert_VolumeParticle …
stephanmeesters Jun 21, 2026
a3cafc3
fix(update): Fix laser-to-target setup mistake in AssistedTargetingUp…
Stubbjax Jun 21, 2026
7bbd643
unify(messagestream): Move all client message translator files to Cor…
xezon Jun 21, 2026
81fffb3
refactor(audio): Simplify available audio samples management (#2773)
xezon Jun 21, 2026
a7447e5
unify(update): Parse template references in the AssistedTargetingUpda…
Stubbjax Jun 23, 2026
21cc640
bugfix(view): Fix view ray cast behavior for mouse picks and drawable…
xezon Jun 26, 2026
e6e8035
Merge remote-tracking branch 'thesuperhackers/main' into thesuperhack…
fbraz3 Jun 27, 2026
5c0d110
fix(audio-miniaudio): resolve compilation errors from upstream sync
fbraz3 Jun 27, 2026
58d2484
fix(audio-openal): resolve compilation errors from upstream sync
fbraz3 Jun 27, 2026
260b05b
chore(cmake-presets): revert linux default audio backend to OpenAL
fbraz3 Jun 27, 2026
2aa8e46
fix: calculate audio samples correctly and disable flatpak dxvk hud
fbraz3 Jun 27, 2026
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
49 changes: 0 additions & 49 deletions .github/prompts/clone-references.prompt.md

This file was deleted.

10 changes: 5 additions & 5 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
},
{
"name": "linux64-deploy",
"displayName": "Linux 64-bit DXVK/SDL3/MiniAudio Release",
"displayName": "Linux 64-bit DXVK/SDL3/OpenAL Release",
"inherits": "default-vcpkg",
"generator": "Ninja",
"hidden": false,
Expand All @@ -205,8 +205,8 @@
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"SAGE_USE_DX8": "OFF",
"SAGE_USE_SDL3": "ON",
"SAGE_USE_OPENAL": "OFF",
"SAGE_USE_MINIAUDIO": "ON",
"SAGE_USE_OPENAL": "ON",
"SAGE_USE_MINIAUDIO": "OFF",
"SAGE_USE_GLM": "ON",
"SAGE_UPDATE_CHECK": "ON",
"RTS_CRASHDUMP_ENABLE": "OFF",
Expand Down Expand Up @@ -406,8 +406,8 @@
{
"name": "linux64-deploy",
"configurePreset": "linux64-deploy",
"displayName": "Build Linux 64-bit DXVK/SDL3/MiniAudio Release",
"description": "Build Linux 64-bit with DXVK graphics, SDL3 windowing, and MiniAudio audio"
"displayName": "Build Linux 64-bit DXVK/SDL3/OpenAL Release",
"description": "Build Linux 64-bit with DXVK graphics, SDL3 windowing, and OpenAL audio"
},
{
"name": "linux64-openal",
Expand Down
38 changes: 19 additions & 19 deletions Core/GameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ set(GAMEENGINE_SRC
Include/GameClient/ClientInstance.h
Include/GameClient/ClientRandomValue.h
Include/GameClient/Color.h
# Include/GameClient/CommandXlat.h
Include/GameClient/CommandXlat.h
# Include/GameClient/ControlBar.h
# Include/GameClient/ControlBarResizer.h
# Include/GameClient/ControlBarScheme.h
Expand Down Expand Up @@ -190,10 +190,10 @@ set(GAMEENGINE_SRC
Include/GameClient/GlobalLanguage.h
Include/GameClient/GraphDraw.h
# Include/GameClient/GUICallbacks.h
# Include/GameClient/GUICommandTranslator.h
Include/GameClient/GUICommandTranslator.h
Include/GameClient/HeaderTemplate.h
# Include/GameClient/HintSpy.h
# Include/GameClient/HotKey.h
Include/GameClient/HintSpy.h
Include/GameClient/HotKey.h
Include/GameClient/Image.h
Include/GameClient/IMEManager.h
# Include/GameClient/InGameUI.h
Expand All @@ -202,22 +202,22 @@ set(GAMEENGINE_SRC
Include/GameClient/LanguageFilter.h
Include/GameClient/Line2D.h
Include/GameClient/LoadScreen.h
# Include/GameClient/LookAtXlat.h
Include/GameClient/LookAtXlat.h
Include/GameClient/MapUtil.h
# Include/GameClient/MessageBox.h
# Include/GameClient/MetaEvent.h
Include/GameClient/MetaEvent.h
Include/GameClient/Module/AnimatedParticleSysBoneClientUpdate.h
Include/GameClient/Module/BeaconClientUpdate.h
Include/GameClient/Module/SwayClientUpdate.h
Include/GameClient/Mouse.h
Include/GameClient/ParabolicEase.h
Include/GameClient/ParticleSys.h
# Include/GameClient/PlaceEventTranslator.h
Include/GameClient/PlaceEventTranslator.h
Include/GameClient/ProcessAnimateWindow.h
Include/GameClient/RadiusDecal.h
Include/GameClient/RayEffect.h
Include/GameClient/SelectionInfo.h
# Include/GameClient/SelectionXlat.h
Include/GameClient/SelectionXlat.h
# Include/GameClient/Shadow.h
# Include/GameClient/Shell.h
# Include/GameClient/ShellHooks.h
Expand All @@ -232,7 +232,7 @@ set(GAMEENGINE_SRC
Include/GameClient/Water.h
Include/GameClient/WindowLayout.h
Include/GameClient/WindowVideoManager.h
# Include/GameClient/WindowXlat.h
Include/GameClient/WindowXlat.h
Include/GameClient/WinInstanceData.h
# Include/GameLogic/AI.h
# Include/GameLogic/AIDock.h
Expand Down Expand Up @@ -705,7 +705,7 @@ set(GAMEENGINE_SRC
# Source/GameClient/Eva.cpp
Source/GameClient/FXList.cpp
# Source/GameClient/GameClient.cpp
# Source/GameClient/GameClientDispatch.cpp
Source/GameClient/GameClientDispatch.cpp
Source/GameClient/GameText.cpp
Source/GameClient/GlobalLanguage.cpp
Source/GameClient/GraphDraw.cpp
Expand Down Expand Up @@ -809,15 +809,15 @@ set(GAMEENGINE_SRC
Source/GameClient/LanguageFilter.cpp
Source/GameClient/Line2D.cpp
Source/GameClient/MapUtil.cpp
# Source/GameClient/MessageStream/CommandXlat.cpp
# Source/GameClient/MessageStream/GUICommandTranslator.cpp
# Source/GameClient/MessageStream/HintSpy.cpp
# Source/GameClient/MessageStream/HotKey.cpp
# Source/GameClient/MessageStream/LookAtXlat.cpp
# Source/GameClient/MessageStream/MetaEvent.cpp
# Source/GameClient/MessageStream/PlaceEventTranslator.cpp
# Source/GameClient/MessageStream/SelectionXlat.cpp
# Source/GameClient/MessageStream/WindowXlat.cpp
Source/GameClient/MessageStream/CommandXlat.cpp
Source/GameClient/MessageStream/GUICommandTranslator.cpp
Source/GameClient/MessageStream/HintSpy.cpp
Source/GameClient/MessageStream/HotKey.cpp
Source/GameClient/MessageStream/LookAtXlat.cpp
Source/GameClient/MessageStream/MetaEvent.cpp
Source/GameClient/MessageStream/PlaceEventTranslator.cpp
Source/GameClient/MessageStream/SelectionXlat.cpp
Source/GameClient/MessageStream/WindowXlat.cpp
Source/GameClient/ParabolicEase.cpp
Source/GameClient/RadiusDecal.cpp
Source/GameClient/SelectionInfo.cpp
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
// Type Defines
//----------------------------------------------------------------------------

typedef std::set<AsciiString, rts::less_than_nocase<AsciiString> > FilenameList;
typedef std::set<AsciiString, rts::less_than_nocase<AsciiString>/**/> FilenameList;
typedef FilenameList::iterator FilenameListIter;
typedef UnsignedByte FileInstance;

Expand Down Expand Up @@ -174,7 +174,7 @@ class FileSystem : public SubsystemInterface
typedef std::hash_map<
rts::string_key<AsciiString>, FileExistData,
rts::string_key_hash<AsciiString>,
rts::string_key_equal<AsciiString> > FileExistMap;
rts::string_key_equal<AsciiString>/**/> FileExistMap;

mutable FileExistMap m_fileExist;
mutable FastCriticalSectionClass m_fileExistMutex;
Expand Down
6 changes: 4 additions & 2 deletions Core/GameEngine/Include/Common/GameAudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct AudioRequest;
struct AudioSettings;
struct MiscAudio;

typedef std::hash_map<AsciiString, AudioEventInfo*, rts::hash<AsciiString>, rts::equal_to<AsciiString> > AudioEventInfoHash;
typedef std::hash_map<AsciiString, AudioEventInfo*, rts::hash<AsciiString>, rts::equal_to<AsciiString>/**/> AudioEventInfoHash;
typedef AudioEventInfoHash::iterator AudioEventInfoHashIt;
typedef UnsignedInt AudioHandle;

Expand Down Expand Up @@ -219,6 +219,8 @@ class AudioManager : public SubsystemInterface
virtual UnsignedInt getNum2DSamples() const = 0;
virtual UnsignedInt getNum3DSamples() const = 0;
virtual UnsignedInt getNumStreams() const = 0;
virtual UnsignedInt getNumAvailable2DSamples() const = 0;
virtual UnsignedInt getNumAvailable3DSamples() const = 0;

// Device Dependent calls to determine sound prioritization info
virtual Bool doesViolateLimit( AudioEventRTS *event ) const = 0;
Expand Down Expand Up @@ -339,7 +341,7 @@ class AudioManager : public SubsystemInterface

AudioEventInfoHash m_allAudioEventInfo;
AudioHandle theAudioHandlePool;
std::list<std::pair<AsciiString, Real> > m_adjustedVolumes;
std::list<std::pair<AsciiString, Real>/**/> m_adjustedVolumes;

Real m_musicVolume;
Real m_soundVolume;
Expand Down
17 changes: 0 additions & 17 deletions Core/GameEngine/Include/Common/GameSounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,6 @@ class SoundManager : public SubsystemInterface

virtual void addAudioEvent(AudioEventRTS *&eventToAdd); // pre-copied

virtual void notifyOf2DSampleStart();
virtual void notifyOf3DSampleStart();

virtual void notifyOf2DSampleCompletion();
virtual void notifyOf3DSampleCompletion();

virtual Int getAvailableSamples();
virtual Int getAvailable3DSamples();

// empty string means that this sound wasn't found or some error occurred. CHECK FOR EMPTY STRING.
virtual AsciiString getFilenameForPlayFromAudioEvent( const AudioEventRTS *eventToGetFrom );

Expand All @@ -87,12 +78,4 @@ class SoundManager : public SubsystemInterface
protected:
virtual Bool violatesVoice( AudioEventRTS *event );
virtual Bool isInterrupting( AudioEventRTS *event );


protected:
UnsignedInt m_num2DSamples;
UnsignedInt m_num3DSamples;

UnsignedInt m_numPlaying2DSamples;
UnsignedInt m_numPlaying3DSamples;
};
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/Common/STLTypedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ typedef std::vector<NamedRequest>::iterator VecNamedRequestsIt;
typedef std::vector<Bool> BoolVector;
typedef std::vector<Bool>::iterator BoolVectorIterator;

typedef std::map< NameKeyType, Real, std::less<NameKeyType> > ProductionChangeMap;
typedef std::map< NameKeyType, VeterancyLevel, std::less<NameKeyType> > ProductionVeterancyMap;
typedef std::map< NameKeyType, Real, std::less<NameKeyType>/**/> ProductionChangeMap;
typedef std::map< NameKeyType, VeterancyLevel, std::less<NameKeyType>/**/> ProductionVeterancyMap;

// Some useful, common hash and equal_to functors for use with hash_map
namespace rts
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameClient/FXList.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class FXListStore : public SubsystemInterface
private:

// use the hashing function for Ints.
typedef std::hash_map< NameKeyType, FXList, rts::hash<NameKeyType>, rts::equal_to<NameKeyType> > FXListMap;
typedef std::hash_map< NameKeyType, FXList, rts::hash<NameKeyType>, rts::equal_to<NameKeyType>/**/> FXListMap;

FXListMap m_fxmap;

Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Include/GameClient/ParticleSys.h
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,8 @@ class ParticleSystemManager : public SubsystemInterface,

typedef std::list<ParticleSystem*> ParticleSystemList;
typedef ParticleSystemList::iterator ParticleSystemListIt;
typedef std::hash_map<ParticleSystemID, ParticleSystem *, rts::hash<ParticleSystemID>, rts::equal_to<ParticleSystemID> > ParticleSystemIDMap;
typedef std::hash_map<AsciiString, ParticleSystemTemplate *, rts::hash<AsciiString>, rts::equal_to<AsciiString> > TemplateMap;
typedef std::hash_map<ParticleSystemID, ParticleSystem *, rts::hash<ParticleSystemID>, rts::equal_to<ParticleSystemID>/**/> ParticleSystemIDMap;
typedef std::hash_map<AsciiString, ParticleSystemTemplate *, rts::hash<AsciiString>, rts::equal_to<AsciiString>/**/> TemplateMap;

ParticleSystemManager();
virtual ~ParticleSystemManager() override;
Expand Down
23 changes: 15 additions & 8 deletions Core/GameEngine/Include/GameClient/View.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
#include "Common/GameType.h"
#include "Common/Snapshot.h"
#include "Lib/BaseType.h"
#include "WW3D2/camera.h"
#include "WW3D2/coltype.h" ///< we don't generally do this, but we need the W3D collision types
#include "WWMath/plane.h"
#include "WWMath/wwmath.h"

#define DEFAULT_VIEW_WIDTH 640
Expand Down Expand Up @@ -120,11 +122,12 @@ class View : public Snapshot
Bool (*callback)( Drawable *draw, void *userData ),
void *userData ) = 0;

/** project the 4 corners of this view into the world and return each point as a parameter,
the world points are at the requested Z */
virtual void getScreenCornerWorldPointsAtZ( Coord3D *topLeft, Coord3D *topRight,
/// Project the 4 corners of this view into the world and return each point as a parameter,
/// the world points are at the requested Z. Returns whether all corner view rays intersect
/// with the Z plane.
virtual PlaneClass::IntersectionResType getScreenCornerWorldPointsAtZ( Coord3D *topLeft, Coord3D *topRight,
Coord3D *bottomRight, Coord3D *bottomLeft,
Real z );
Real z, ViewportClass viewPort = ViewportClass() );

virtual void setWidth( Int width ) { m_width = width; }
virtual Int getWidth() { return m_width; }
Expand Down Expand Up @@ -240,8 +243,12 @@ class View : public Snapshot

Bool worldToScreen( const Coord3D *w, ICoord2D *s ) { return worldToScreenTriReturn( w, s ) == WTS_INSIDE_FRUSTUM; } ///< Transform world coordinate "w" into screen coordinate "s"
virtual WorldToScreenReturn worldToScreenTriReturn(const Coord3D *w, ICoord2D *s ) = 0; ///< Like worldToScreen(), but with a more informative return value
virtual void screenToTerrain( const ICoord2D *screen, Coord3D *world ) = 0; ///< transform screen coord to a point on the 3D terrain
virtual void screenToWorldAtZ( const ICoord2D *s, Coord3D *w, Real z ) = 0; ///< transform screen point to world point at the specified world Z value

/// Transform screen point to the viewed world position on the 3D terrain. Returns true when intersection exists.
virtual Bool screenToTerrain( const ICoord2D *screen, Coord3D *world ) = 0;

/// Transform screen point to the viewed world position at the specified world Z height. Returns the type of the intersection.
virtual PlaneClass::IntersectionResType screenToWorldAtZ( const ICoord2D *screen, Coord3D *world, Real z ) = 0;

virtual void getLocation ( ViewLocation *location ); ///< write the view's current location in to the view location object
virtual void setLocation ( const ViewLocation *location ); ///< set the view's current location from to the view location object
Expand Down Expand Up @@ -405,8 +412,8 @@ class ViewDummy : public View
{
return WTS_INVALID;
}
virtual void screenToTerrain( const ICoord2D *screen, Coord3D *world ) override {}
virtual void screenToWorldAtZ( const ICoord2D *s, Coord3D *w, Real z ) override {}
virtual Bool screenToTerrain( const ICoord2D *screen, Coord3D *world ) override { return false; }
virtual PlaneClass::IntersectionResType screenToWorldAtZ( const ICoord2D *screen, Coord3D *world, Real z ) override { return PlaneClass::NO_INTERSECTION; }
virtual void drawView() override {}
virtual void updateView() override {}
virtual void stepView() override {}
Expand Down
2 changes: 1 addition & 1 deletion Core/GameEngine/Include/GameClient/WindowVideoManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class WindowVideoManager : public SubsystemInterface
}
};

typedef std::hash_map< ConstGameWindowPtr, WindowVideo *, hashConstGameWindowPtr, std::equal_to<ConstGameWindowPtr> > WindowVideoMap;
typedef std::hash_map< ConstGameWindowPtr, WindowVideo *, hashConstGameWindowPtr, std::equal_to<ConstGameWindowPtr>/**/> WindowVideoMap;

WindowVideoMap m_playingVideos; ///< List of currently playin Videos
//WindowVideoMap m_pausedVideos; ///< List of currently paused Videos
Expand Down
4 changes: 2 additions & 2 deletions Core/GameEngine/Source/Common/Audio/GameAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ AudioHandle AudioManager::addAudioEvent(const AudioEventRTS *eventToAdd)
eventToAdd->setPlayingAudioIndex( audioEvent->getPlayingAudioIndex() );
audioEvent->generatePlayInfo(); // generate pitch shift and volume shift now as well

std::list<std::pair<AsciiString, Real> >::iterator it;
std::list<std::pair<AsciiString, Real>/**/>::iterator it;
for (it = m_adjustedVolumes.begin(); it != m_adjustedVolumes.end(); ++it) {
if (it->first == audioEvent->getEventName()) {
audioEvent->setVolume(it->second);
Expand Down Expand Up @@ -601,7 +601,7 @@ void AudioManager::setAudioEventVolumeOverride( AsciiString eventToAffect, Real
adjustVolumeOfPlayingAudio(eventToAffect, newVolume);
}

std::list<std::pair<AsciiString, Real> >::iterator it;
std::list<std::pair<AsciiString, Real>/**/>::iterator it;
for (it = m_adjustedVolumes.begin(); it != m_adjustedVolumes.end(); ++it) {
if (it->first == eventToAffect) {
if (newVolume == -1.0f) {
Expand Down
Loading
Loading