Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
29c641b
Add self-contained x64 DX9 client builds
swgsais Jul 11, 2026
84638bd
Vendor x64 libjpeg dependency
swgsais Jul 14, 2026
893d1e2
Add reproducible x64 build prerequisites
swgsais Jul 14, 2026
f65c391
Implement JUCE x64 audio backend
swgsais Jul 15, 2026
23147c6
Add SDL3 multi-controller input support
swgsais Jul 15, 2026
801b4ae
Handle multiple Visual Studio instances in setup
swgsais Jul 16, 2026
9775041
Merge x64-dx9-vanilla-juce into x64-dx9-vanilla
swgsais Jul 16, 2026
9090f64
Merge JUCE audio and InputReborn controller support
swgsais Jul 16, 2026
9fdf077
Validate vendored JUCE codec sources
swgsais Jul 16, 2026
cab1a8e
Update keybinds with joystick number
Jul 16, 2026
921af88
Store call stack addresses at pointer width
swgsais Jul 25, 2026
c594481
Use fixed-width counts in the NetworkId and Unicode packed maps
swgsais Jul 25, 2026
a304839
Default Platform to x64
swgsais Jul 25, 2026
56d9948
Turn off the per-allocation debug instrumentation
swgsais Jul 25, 2026
bec1d97
Add the DX9 to DX11 port plan
swgsais Jul 25, 2026
2e05997
Fix the lockBackBuffer rect and grant the DX11 backend friendship
swgsais Jul 25, 2026
73abb3f
Add the DX11 standup sequence
swgsais Jul 25, 2026
a9e375b
Verify the Gl_api layout at load, and drop two dead pieces of it
swgsais Jul 25, 2026
f4c5dea
Add the Direct3d11 project: gl11 builds, loads, and refuses honestly
swgsais Jul 25, 2026
d023c4f
Build the Headless backend as gl00, the second Gl_api implementation
swgsais Jul 25, 2026
cd88535
Bring up the DX11 device and swap chain
swgsais Jul 25, 2026
6a5bd8d
Render to an offscreen scene target, and read frames back out
swgsais Jul 26, 2026
286e32a
Add always-on metrics, GPU timing, and the debug-only Gl_api slots
swgsais Jul 26, 2026
4d761ca
Add the state object caches, with DX9's tables copied index for index
swgsais Jul 26, 2026
b8dd939
Promote the shader constant register enums into clientGraphics
swgsais Jul 26, 2026
6619fb2
Add the shader compile chokepoint and the constant ABI guard
swgsais Jul 26, 2026
e714c57
Add the constant register file, and move the per-draw matrices out of it
swgsais Jul 26, 2026
111c2bf
Record the C8 findings against the plan
swgsais Jul 26, 2026
dc0cc8c
Add the vertex descriptor map and the static vertex and index buffers
swgsais Jul 26, 2026
beebb36
Add the dynamic vertex and index rings
swgsais Jul 26, 2026
80e6620
Add the input layout cache, and stop under-reporting the stream count
swgsais Jul 26, 2026
9ddbcf1
Bind geometry, and add the single pre-draw chokepoint
swgsais Jul 26, 2026
e7a66ff
Record the C9 findings against the plan
swgsais Jul 26, 2026
395b31a
Fill in the two missing texture format table entries
swgsais Jul 26, 2026
ceb6f37
DX11 C10: textures, the format map, and the pixel converter
swgsais Jul 26, 2026
660dd33
DX11: record what blocks C11, and that the DX9 baseline is not vanilla
swgsais Jul 26, 2026
30e09b2
Correct the C11 blocker note: the corpus is present, and size the asm…
swgsais Jul 26, 2026
1b2a23d
DX11 C11a: shader source transforms, and the HLSL corpus measured
swgsais Jul 26, 2026
ed58ecb
DX11: scope the assembly translation, and find a broken include in th…
swgsais Jul 26, 2026
cf41ddf
Add asm2hlsl: the Direct3D 9 assembly to HLSL converter
swgsais Jul 26, 2026
de12a1b
DX11: report which d3dcompiler the process actually loaded
swgsais Jul 26, 2026
a746a04
DX11 C11b: vertex and pixel program classes, with no texture-coordina…
swgsais Jul 26, 2026
563b218
DX11 C11c: shader implementation data, pass state resolved to state o…
swgsais Jul 26, 2026
43881f5
DX11: wire shader reflection into the pixel program, and add sampler …
swgsais Jul 26, 2026
04a395a
DX11 C11d: static shader data, and the texture-coordinate routing is …
swgsais Jul 26, 2026
34c4438
DX11 C12: the alpha test, as a clip driven from constant buffer b1
swgsais Jul 26, 2026
8446d67
DX11 C13: the twenty-five draw entry points
swgsais Jul 26, 2026
bd96bcc
DX11 C14: the transform chain, without which nothing has a position
swgsais Jul 26, 2026
e078415
DX11 C15: the light manager
swgsais Jul 26, 2026
5d2cd50
DX11 C16: render targets, and the viewport register the UI needs
swgsais Jul 26, 2026
cd9e0f6
DX11 C17: eight more slots, and a vertex cache optimiser written out …
swgsais Jul 26, 2026
cb53191
DX11 C18: fog, as symmetric vertex/pixel injection
swgsais Jul 26, 2026
83a7a84
asm2hlsl: define the macro the converted vertex programs use
swgsais Jul 26, 2026
6c0c92c
DX11 C19: the hardware cursor, WIC image containers, and a banner tha…
swgsais Jul 26, 2026
7a7e39f
DX11 C20: point sprites, via one geometry shader rather than a genera…
swgsais Jul 26, 2026
f601b38
Correct the transform count in Direct3d11_ShaderSource.h
swgsais Jul 26, 2026
c93d92c
DX11 C21: the client runs -- five bugs the first run found
swgsais Jul 26, 2026
6548158
DX11 C22: the black screen diagnosed -- D3D11 links stages by REGISTE…
swgsais Jul 26, 2026
fa245a2
DX11 C23: the screen is no longer black -- one canonical interpolant …
swgsais Jul 26, 2026
58db34f
asm2hlsl: resolve the corpus the way the client does -- searchTOC, an…
swgsais Jul 26, 2026
d2855b5
DX11 C24: block-aligned texture uploads -- the debug layer is now silent
swgsais Jul 26, 2026
d0e2262
DX11 C25: in-world at last -- the geometry shader was the stage I for…
swgsais Jul 26, 2026
246e8ab
DX11 C26: the state cache was allowed to lie, and one path took it up…
swgsais Jul 27, 2026
d1d8cd7
DX11 C27: a sampler's dimension is an asset property, not a guess
swgsais Jul 27, 2026
3dbc14a
DX11 C28: the last nonzero gate is a first-use compile hitch, now mea…
swgsais Jul 27, 2026
9f638ba
DX11 C29: one implementation of "what D3DCompile is given"
swgsais Jul 27, 2026
7031323
DX11 C30: precompiled DXBC, keyed by content so it cannot go stale
swgsais Jul 27, 2026
cfb62b5
DX11 C31: the world was multiplied by a zero matrix
swgsais Jul 27, 2026
7f2f969
DX11 C32: a partial MAP_WRITE_DISCARD destroyed every constant above …
swgsais Jul 27, 2026
7d08b03
Translate a masked assignment component-wise, as D3D9 does
swgsais Jul 27, 2026
9fd998b
DX11 C33: the constant ABI guard was checking almost nothing
swgsais Jul 27, 2026
6c2f7ee
DX11 C34: pair a sampler with its texture by name, and the world has …
swgsais Jul 27, 2026
c695c44
DX11 C35: clamp COLOR interpolants, as D3D9's hardware did
swgsais Jul 27, 2026
8bf947c
DX11 C36: a hitch detector, and it exonerates the renderer
swgsais Jul 27, 2026
5828a6c
Direct3d11: hash a vertex shader's input signature once, not once per…
swgsais Jul 28, 2026
fca5d0e
Direct3d11: report the light count as a per-frame max, not the last b…
swgsais Jul 28, 2026
3d69fbc
Direct3d11: skip redundant index buffer binds
swgsais Jul 28, 2026
2b4f71e
Direct3d11: account for a frame's whole wall time, not only the parts…
swgsais Jul 28, 2026
48a28b6
Direct3d11: stop flooring scene ambient at 0.3, which is what washes …
swgsais Jul 28, 2026
0069601
Direct3d11: split streamed-resource time by what is doing the work
swgsais Jul 28, 2026
b736e03
Direct3d11: measure all four parts of a frame instead of inferring on…
swgsais Jul 28, 2026
78e2cb2
Direct3d11: time the draw submits, so a slow scene names what was slow
swgsais Jul 28, 2026
17f67a1
Direct3d11: stop ScopedTimer truncating every call to a whole microse…
swgsais Jul 28, 2026
1dbbdac
Direct3d11: time the binds and the dynamic rings, closing the in-scen…
swgsais Jul 28, 2026
9681438
Direct3d11: split the texture upload by which pass is costing the time
swgsais Jul 28, 2026
9f9d805
clientGame: step the simulation at a fixed rate instead of once per r…
swgsais Jul 28, 2026
4056928
clientGame: count stale and duplicate server transforms for the player
swgsais Jul 28, 2026
64a5780
clientGame: step the world's update on the fixed schedule, not just G…
swgsais Jul 28, 2026
02a6c2d
Take the diagnostic overhead out of the shipping client
swgsais Jul 28, 2026
fb664dc
clientGame: throttle the transform send rate instead of the simulation
swgsais Jul 28, 2026
e46a8c3
clientGraphics: stop reporting a recovered palette clamp as a shader …
swgsais Jul 28, 2026
5b058d2
Direct3d11: a fog kill switch, which identified the distant terrain f…
swgsais Jul 28, 2026
2474d48
Direct3d11: honour a pass's fog colour override
swgsais Jul 28, 2026
f584a11
Direct3d11: restore D3D9's half-pixel offset for 2D, which was seamin…
swgsais Jul 28, 2026
3ab0473
Add x64 and Direct3D 11 client support
swgsais Aug 14, 2026
0b23a43
engine: strict data by default, with one explicit opt-out
kennethlong Aug 15, 2026
803baa9
clientGraphics: Gl_dll.def must include Production.h -- its own #if P…
kennethlong Aug 15, 2026
969086b
Direct3d11: the window reveal must activate -- drop SWP_NOACTIVATE
kennethlong Aug 15, 2026
749e132
fix(combat): c0000005 in updateDeferredCombatActions — erase-then-inc…
kennethlong Jun 12, 2026
ed25b55
fix(d3d9): D3DCREATE_FPU_PRESERVE — 32-bit cantina portal see-through
kennethlong Jun 21, 2026
62c849d
fix(sharedfile): lock SearchCache map + fail-loud zlib (async-load co…
kennethlong Jul 2, 2026
296a489
fix(38-09): CuiMediator::garbageCollect re-entrancy guard — ROOT of t…
kennethlong Jun 23, 2026
452800e
fix(clientUserInterface): snapshot mediators in updateMediatorEnabled…
kennethlong Jun 20, 2026
f60aece
fix(38-08): guard SwgCuiHudWindowManagerGround::handlePerformDeactiva…
kennethlong Jun 23, 2026
6fa5456
fix(33-06): guard NULL reticle mediators in SwgCuiAllTargets::perform…
kennethlong Jun 18, 2026
42c02f6
fix(threading): zone-in heap corruption -- lock terrain ShaderCache n…
kennethlong Jul 3, 2026
cdb33b6
fix(threading): CONSULT-56 follow-up audit -- TreeFile snapshot reads…
kennethlong Jul 3, 2026
287520f
clientGame: the snapshot delete drain has never deleted anything -- r…
kennethlong Aug 15, 2026
f0f8954
clientSkeletalAnimation: the ARGB==0 white rewrite paints loading cha…
kennethlong Aug 15, 2026
bdb49bc
Direct3d11: port DX9's draw-time alpha-fade overrides -- the fade was…
kennethlong Aug 15, 2026
5f546e5
swgClientUserInterface: ten late-NGE Options widgets FATAL against th…
kennethlong Aug 15, 2026
1096899
Direct3d11: back unsatisfied vertex shader inputs with a phantom stre…
kennethlong Aug 15, 2026
ca5f857
Direct3d11: a data shader that fails to build is a warning, not a dea…
kennethlong Aug 15, 2026
42e6dc4
Direct3d11: the served vertex constants include declares a feature ma…
kennethlong Aug 15, 2026
59cac25
Direct3d11: the two inherited lighting patches become opt-in -- the d…
kennethlong Aug 15, 2026
ea934eb
Direct3d11: the synthesised hemisphere becomes opt-in -- it erased ev…
kennethlong Aug 15, 2026
7a68cef
clientGame: narrow snapshot template and object classes before use --…
kennethlong Aug 15, 2026
16664d1
sharedCollision: a shallow footprint graze of an uncrossable floor se…
kennethlong Aug 15, 2026
9f1aaf1
sharedFile: give the asynchronous loader's callback drain a per-frame…
kennethlong Aug 15, 2026
43ab083
clientGame: spread a cell's interior-layout object creation across fr…
kennethlong Aug 15, 2026
d9e9949
clientGame: give the world-snapshot create/delete drain a wall-time b…
kennethlong Aug 15, 2026
a8bcb7c
clientGame: a per-frame stall watchdog with an audio-safe stack sampler
kennethlong Aug 15, 2026
b4939cb
sharedFile: TreeFileFactory buffers the whole file instead of streami…
kennethlong Aug 15, 2026
eb6450b
clientGraphics: buffer a .dds in ONE read instead of one read per mip
kennethlong Aug 15, 2026
411b3cb
clientTerrain: budget the terrain warm-up instead of doing it all in …
kennethlong Aug 15, 2026
49dfd6f
clientGame: the stall log must stay readable while the client is running
kennethlong Aug 16, 2026
880bc83
clientAudio: streamed assets decode off the game thread, header-first
kennethlong Aug 16, 2026
fb6d166
clientAudio: count the callback lock-misses -- the dropout, measured
kennethlong Aug 16, 2026
eb23081
clientAudio: cached-sample decode moves OUTSIDE the audio lock
kennethlong Aug 16, 2026
09b596e
clientAudio: dropout lines are timestamped and unthrottled -- one lin…
kennethlong Aug 16, 2026
3941515
clientAudio: per-frame setters stop taking the audio lock -- and a mi…
kennethlong Aug 16, 2026
d28bf8c
clientAudio: the audio lock stops being held across I/O -- the dropou…
kennethlong Aug 16, 2026
a322bab
clientAudio: the callback waits up to 1ms for the lock before declari…
kennethlong Aug 16, 2026
c532330
clientAudio: the callback wait yields once the spin outlives a runnin…
kennethlong Aug 16, 2026
3c46a39
clientDirectInput: F12 as a backup screenshot trigger -- Windows 11 e…
kennethlong Aug 16, 2026
0d9c7c6
Direct3d11: WIC screenshots convert explicitly -- SetPixelFormat nego…
kennethlong Aug 16, 2026
6fe000d
dpvs, sharedCollision, clientGame: the six portal see-through fixes -…
kennethlong Aug 16, 2026
87bc5ff
Direct3d11: a re-bake seeds from the existing manifest -- coverage ca…
kennethlong Aug 16, 2026
89d6b6b
Direct3d11: the seeded manifest parse keeps multi-word program names …
kennethlong Aug 16, 2026
02ce5d0
sharedObject: cells attach as non-children again -- the stock cellLoa…
kennethlong Aug 16, 2026
d56f282
clientGame, sharedUtility: the world-snapshot parse is phased across …
kennethlong Aug 16, 2026
5f019e7
sharedFile: loose-searchPath negative cache + file manifest -- the pr…
kennethlong Aug 16, 2026
008fb8b
clientAudio, clientGame, clientUserInterface, swgClientUserInterface:…
kennethlong Aug 16, 2026
1223aba
dpvs: the six see-through fixes never reached the binary -- make dpvs…
kennethlong Aug 16, 2026
af0ca4f
direct3d9, clientGraphics: replace the D3D9 renderer wholesale with t…
kennethlong Aug 16, 2026
5a92514
direct3d9: pixel shaders compile from PSRC source -- the wholesale wa…
kennethlong Aug 16, 2026
72a3d7b
build: Debug|x64 builds and links for the first time; the build scrip…
kennethlong Aug 16, 2026
d33c851
direct3d11: embed the asm2hlsl corpus so a stock dataset renders with…
kennethlong Aug 16, 2026
71e5835
direct3d11: the embedded c_ambient carries the stock cell semantics -…
kennethlong Aug 17, 2026
e287aa3
clientGraphics, direct3d11, direct3d9: the Gl_api v35 tail slots -- c…
kennethlong Aug 17, 2026
82313b4
engine: the toolkit advertise surface -- GetEngineHookPoints, contrac…
kennethlong Aug 17, 2026
16c86ea
Merge pull request #4 from Galaxies-Reborn/toolkit-advertise
swgsais Aug 18, 2026
a709a88
Merge pull request #3 from Galaxies-Reborn/toolkit-advertise
swgsais Aug 18, 2026
5119b4e
Merge pull request #5 from Galaxies-Reborn/strict-data-defaults
swgsais Aug 18, 2026
a66063c
Merge x64-dx11-vanilla development history
swgsais Aug 19, 2026
3604400
Added feature to use entertainer captcha percent from the server config
wrussandrews May 13, 2026
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
42 changes: 42 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
Language: Cpp
BasedOnStyle: Microsoft

# SWG source uses Allman braces and tab-based indentation.
BreakBeforeBraces: Allman
UseTab: Always
IndentWidth: 4
TabWidth: 4
AccessModifierOffset: -4
NamespaceIndentation: All
IndentCaseLabels: true

# Keep source-oriented declarations stable while formatting touched ranges.
PointerAlignment: Right
SortIncludes: Never
ColumnLimit: 0

# Braced constructs must not collapse back onto one line.
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
...
---
Language: ObjC
BasedOnStyle: Microsoft
BreakBeforeBraces: Allman
UseTab: Always
IndentWidth: 4
TabWidth: 4
AccessModifierOffset: -4
NamespaceIndentation: All
IndentCaseLabels: true
PointerAlignment: Right
SortIncludes: Never
ColumnLimit: 0
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
...
43 changes: 42 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ src/game/server/application/SwgDatabaseServer/src/shared/generated/Schema.h
exe/win32/.exe
.kdev*
lib/
!src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.7/lib/
!src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.7/lib/**
obj/
*.kdev4
.depend
Expand Down Expand Up @@ -77,4 +79,43 @@ src/external/3rd/library/udplibrary/UdpLibrary.cpp.PVS-Studio.cfg
src/external/3rd/library/udplibrary/UdpLibrary.cpp.PVS-Studio.cmd
src/external/3rd/library/udplibrary/UdpLibrary.cpp~RF869406.TMP
src/external/3rd/library/wolfssl/
src/build/win32/.vs/*
src/build/win32/.vs/*

# Self-contained x64 client dependencies and compatibility libraries.
!deps/
!deps/x64/
!deps/x64/**
!deps/win32/
!deps/win32/**
!deps/build-prerequisites/
!deps/build-prerequisites/**
!mss64-stub/
!mss64-stub/**

# Prepared Qt 3 source is vendored, but its generated build products are not.
!deps/qt3-win64-src/
!deps/qt3-win64-src/**
deps/source-cache/
deps/qt3-win64-src/.qmake.cache
deps/qt3-win64-src/.qtwinconfig
deps/qt3-win64-src/bin/*.dll
deps/qt3-win64-src/bin/*.exe
deps/qt3-win64-src/lib/
deps/qt3-win64-src/misc/configure/tmp/
deps/qt3-win64-src/misc/link_includes/tmp/
deps/qt3-win64-src/qmake/tmp/
deps/qt3-win64-src/src/.qmake.internal.cache
deps/qt3-win64-src/src/Makefile
deps/qt3-win64-src/src/Makefile.main
deps/qt3-win64-src/src/moc/Makefile
deps/qt3-win64-src/src/moc/*.obj
deps/qt3-win64-src/src/tmp/

# Local MSBuild and helper outputs.
src/build/win32/x64/
**/build/win32/x64/
**/x64/Release/
scripts/__pycache__/
mss64-stub/*.exp
deps/x64/lib/lgLcd.lib
deps/x64/lib/lgLcd_stubs.obj
35 changes: 35 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Keep command-line project builds deterministic while allowing callers to
select either Win32 or x64 explicitly. -->
<PropertyGroup>
<Platform Condition="'$(Platform)' == ''">x64</Platform>
<SwgAudioBackend Condition="'$(SwgAudioBackend)' == ''">Juce</SwgAudioBackend>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'x64'">
<SwgDependenciesDir>$(MSBuildThisFileDirectory)deps\x64</SwgDependenciesDir>
<SwgX64DependenciesDir>$(SwgDependenciesDir)</SwgX64DependenciesDir>
<SwgCompatibilityDependencies>swg-stubs.lib;vivoxSharedWrapper.lib;libxml2.lib;pcre.lib;</SwgCompatibilityDependencies>
<SwgAudioBackendDependencies Condition="'$(SwgAudioBackend)' == 'Miles'">mss64.lib;</SwgAudioBackendDependencies>
<SwgPlatformLibraryDirectories>$(DXSDK_DIR)Lib\x64;$(WindowsSDK_LibraryPath_x64);$(SwgDependenciesDir)\lib;$(MSBuildThisFileDirectory)mss64-stub;</SwgPlatformLibraryDirectories>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'Win32'">
<SwgDependenciesDir>$(MSBuildThisFileDirectory)deps\win32</SwgDependenciesDir>
<SwgCompatibilityDependencies>vivoxSharedWrapper.lib;libxml2.lib;pcre.lib;</SwgCompatibilityDependencies>
<SwgPlatformLibraryDirectories>$(DXSDK_DIR)Lib\x86;$(WindowsSDK_LibraryPath_x86);$(SwgDependenciesDir)\lib;</SwgPlatformLibraryDirectories>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_AUTO_PTR_ETC=1;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)' == 'Win32'">
<ClCompile>
<PreprocessorDefinitions>_HAS_AUTO_PTR_ETC=1;_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(MSBuildThisFileDirectory)src\external\3rd\library\stlport453\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
</Project>
57 changes: 57 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ValidateSwgBuildProperties" BeforeTargets="PrepareForBuild">
<Error Condition="'$(SwgAudioBackend)' != 'Juce' and '$(SwgAudioBackend)' != 'Miles'"
Text="SwgAudioBackend must be Juce or Miles (received '$(SwgAudioBackend)')." />
</Target>

<PropertyGroup Condition="'$(Platform)' == 'x64'">
<OutDir>$(MSBuildThisFileDirectory)src\build\win32\x64\$(Configuration)\</OutDir>
<IntDir>$(OutDir)obj\$(MSBuildProjectName)\</IntDir>
<SwgOutputSuffix Condition="'$(Configuration)' == 'Release'">r</SwgOutputSuffix>
<SwgOutputSuffix Condition="'$(Configuration)' == 'Optimized'">o</SwgOutputSuffix>
<SwgOutputSuffix Condition="'$(Configuration)' == 'Debug'">d</SwgOutputSuffix>
<TargetName Condition="'$(MSBuildProjectName)' == 'SwgClient'">SwgClient_$(SwgOutputSuffix)</TargetName>
<TargetName Condition="'$(MSBuildProjectName)' == 'Direct3d9'">gl05_$(SwgOutputSuffix)</TargetName>
<TargetName Condition="'$(MSBuildProjectName)' == 'Direct3d9_ffp'">gl06_$(SwgOutputSuffix)</TargetName>
<TargetName Condition="'$(MSBuildProjectName)' == 'Direct3d9_vsps'">gl07_$(SwgOutputSuffix)</TargetName>
<TargetName Condition="'$(MSBuildProjectName)' == 'Direct3d11'">gl11_$(SwgOutputSuffix)</TargetName>
<TargetName Condition="'$(MSBuildProjectName)' == 'Headless'">gl00_$(SwgOutputSuffix)</TargetName>
</PropertyGroup>

<ItemDefinitionGroup Condition="'$(Platform)' == 'x64'">
<ClCompile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<PrecompiledHeaderOutputFile>$(IntDir)$(MSBuildProjectName).pch</PrecompiledHeaderOutputFile>
<ProgramDataBaseFileName>$(IntDir)$(MSBuildProjectName).pdb</ProgramDataBaseFileName>
</ClCompile>
<ResourceCompile>
<ResourceOutputFileName>$(IntDir)%(Filename).res</ResourceOutputFileName>
</ResourceCompile>
<Bscmake>
<OutputFile>$(IntDir)$(MSBuildProjectName).bsc</OutputFile>
</Bscmake>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' and '$(ConfigurationType)' == 'StaticLibrary'">
<Lib>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Lib>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' and '$(ConfigurationType)' == 'DynamicLibrary'">
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
</ItemDefinitionGroup>

<ItemDefinitionGroup Condition="'$(Platform)' == 'x64' and '$(ConfigurationType)' == 'Application'">
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
</Link>
</ItemDefinitionGroup>
</Project>
53 changes: 47 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,60 @@
# Client/Tools Repo
This repository contains the source for the SWG Client as well as the tools that support certain aspects of development.

## Build Instructions
This repository is configured for use with Visual Studio using msbuild/solutions and is currently ONLY compatible with **Visual Studio 2013**. To setup your environment, acquire the community or professional edition (NOT the express edition) of Visual Studio 2013 and clone this repository to your machine. Open Visual Studio 2013 and use `File > Open > Project/Solution` and navigate to the path where you cloned the repository then select the solution file located at `src/build/win32/swg.sln`. Please note that all SWG applications are only compatible with win32.
## Build Instructions
The legacy Win32 projects were originally configured for **Visual Studio 2013**. The gameplay client can now be built as Win32 or x64 with both the Direct3D 9 and Direct3D 11 renderer plug-ins. SDL3 multi-controller input is enabled in both architectures. JUCE audio is the default build choice; the legacy Miles path remains selectable.

The project has 3 configurations for building the applications:
* **Release** which is the version intended for public dissemination and gameplay. You may recognize this as the `_r` in the client name `SwgClient_r.exe`.
* **Optimized** which is similar to the release client but has additional options and displays in-game for testing and is ideal for Quality Assurance or Support related activities. For example, this configuration allows for additional options like targeting static world objects, printing object information in the user interface, and releasing the camera from player attachment for custom views.
* **Debug** which is a development client that has extra features for testing and extensive logging and reporting. This build isn't particularly useful for any present application.

At present, only the `Release` version of the projects will build, but we're working on cleaning up the remainder of the configurations. As a temporary solution to accessing the features of the optimized version, you can set the constant in `production.h` to `0` regardless of the configuration.
`Release` is the primary validated configuration. `Optimized` and `Debug` remain available for development and may expose pre-existing tool or third-party dependency issues.

To build the client, find the `SwgClient` project in solution explorer and right click then select `Build`. Note that other projects may have similar names (like `ClientGame`) but these are shared across multiple tools. The actual game client you need for playing the game is the `SwgClient` project.

## Shared Files
To build the client, find the `SwgClient` project in solution explorer and right click then select `Build`. Note that other projects may have similar names (like `ClientGame`) but these are shared across multiple tools. The actual game client you need for playing the game is the `SwgClient` project.

### Client Build Script

Check the build environment:

```powershell
.\scripts\Test-ClientBuildPrerequisites.ps1
```

The required environment is Visual Studio or Build Tools with the selected MSVC toolset, a Windows SDK, and the Microsoft DirectX SDK (June 2010). Architecture-specific SDL3 inputs and the x64 compatibility libraries are vendored under `deps`.

Build the complete Release matrix (Win32 and x64, with DX9 and DX11) using JUCE audio:

```powershell
.\scripts\Build-Client.ps1
```

Build a specific architecture and require a specific renderer output:

```powershell
.\scripts\Build-Client.ps1 -Architecture x86 -Renderer DX9
.\scripts\Build-Client.ps1 -Architecture x64 -Renderer DX11
```

Select the legacy audio path instead of the default JUCE backend:

```powershell
.\scripts\Build-Client.ps1 -Architecture All -AudioBackend Miles
```

`-Architecture` accepts `x86`, `x64`, or `All`; `-Renderer` accepts `DX9`, `DX11`, or `All`; and `-AudioBackend` accepts `Juce` or `Miles`. A gameplay-client solution build produces its renderer dependencies together, while `-Renderer` controls which output set the script requires and verifies. The script also checks every selected executable and renderer DLL for the expected PE machine type.

JUCE 8 modules are dual-licensed under AGPLv3 or the commercial JUCE license. Distributors must select and comply with an applicable JUCE licensing path; see `src/external/3rd/library/JUCE-8.0.14/LICENSE.md`. A Miles build requires a compatible licensed Miles runtime; the included x64 compatibility stubs satisfy the build but are not a full audio implementation.

SDL input is enabled by default and supports multiple independent controllers. See the [multi-controller input guide](docs/inputreborn.md) for runtime configuration and keymap compatibility.

## Source Style

First-party C and C++ use Allman braces with tab-based indentation. The repository `.clang-format` file is the formatting authority for new and changed first-party source. Vendored dependencies under `deps` and `src/external/3rd` retain their upstream formatting so they remain reviewable against their source releases.

Numeric values that encode a limit, capacity, interval, unit conversion, binary layout, or other policy must use a typed, descriptive `constexpr` instead of an untyped enum or an unexplained literal. Literal values may remain where they are intrinsic to an API, a mathematical identity, an indexed component, or a data table; non-obvious derivations should be documented beside the owning constant.

## Shared Files
Please note that certain projects and files are prepended with `shared` which means they are files that are used in both the game engine ([the `src` repository](https://github.com/swg-source/src)) and the client. There are many enums, for instance, that must match between the client and server or there may be crashes, errors, unintended functionality or some combination thereof. ***If you make changes to any of these shared files, you must make the changes both in the src and in client-tools.***

## Deprecated Components
Expand Down
112 changes: 112 additions & 0 deletions deps/build-prerequisites/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"schemaVersion": 1,
"profile": "win32-x64-dx9-dx11",
"cachePath": "deps/source-cache/build-prerequisites",
"visualStudio": {
"versionRange": "[18.0,19.0)",
"platformToolset": "v145",
"workload": "Microsoft.VisualStudio.Workload.VCTools",
"requiredComponents": [
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
]
},
"windowsSdk": {
"minimumVersion": "10.0.19041.0"
},
"vendoredInputs": [
"deps/win32/include/SDL3/SDL.h",
"deps/win32/bin/SDL3.dll",
"deps/win32/lib/SDL3.lib",
"deps/x64/include/SDL3/SDL.h",
"deps/x64/include/libjpeg-turbo/jpeglib.h",
"deps/x64/bin/SDL3.dll",
"deps/x64/lib/d3d9.lib",
"deps/x64/lib/d3dx9.lib",
"deps/x64/lib/dinput8.lib",
"deps/x64/lib/dpvs.lib",
"deps/x64/lib/dsound.lib",
"deps/x64/lib/DxErr.lib",
"deps/x64/lib/dxguid.lib",
"deps/x64/lib/jpeg-static.lib",
"deps/x64/lib/lcdui.lib",
"deps/x64/lib/libEverQuestTCG.lib",
"deps/x64/lib/libMozilla.lib",
"deps/x64/lib/libxml2.lib",
"deps/x64/lib/pcre.lib",
"deps/x64/lib/SDL3.lib",
"deps/x64/lib/vivoxSharedWrapper.lib",
"deps/x64/lib/swg-stubs.lib",
"deps/x64/lib/graphics-stubs.lib",
"deps/x64/lib/tzname_compat.lib",
"mss64-stub/mss64.lib",
"mss64-stub/mss64.dll",
"src/external/3rd/library/JUCE-8.0.14/modules/juce_core/juce_core.cpp",
"src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_devices/juce_audio_devices.cpp",
"src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_formats/juce_audio_formats.cpp",
"src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.7/lib/analysis.c",
"src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.7/lib/books/coupled/res_books_51.h",
"src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.7/lib/modes/setup_44.h",
"src/external/3rd/library/JUCE-8.0.14/modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.7/lib/vorbisfile.c"
],
"packages": [
{
"id": "visual-studio-build-tools",
"displayName": "Visual Studio Build Tools 2026",
"fileName": "vs_BuildTools.exe",
"url": "https://aka.ms/vs/18/stable/vs_BuildTools.exe",
"sourceReferenceUrl": "https://aka.ms/vs/stable/vs_BuildTools.exe",
"scopes": ["build"],
"mutable": true,
"bytes": null,
"sha256": null,
"expectedPublisher": "Microsoft Corporation",
"installMode": "visual-studio",
"installArguments": [
"--quiet",
"--wait",
"--norestart",
"--nocache",
"--add",
"Microsoft.VisualStudio.Workload.VCTools",
"--includeRecommended"
]
},
{
"id": "windows-10-sdk",
"displayName": "Windows 10 SDK 10.0.19041",
"fileName": "winsdksetup.exe",
"url": "https://go.microsoft.com/fwlink/?linkid=2311805",
"scopes": ["build"],
"mutable": true,
"bytes": null,
"sha256": null,
"expectedPublisher": "Microsoft Corporation",
"installMode": "interactive"
},
{
"id": "directx-sdk-june-2010",
"displayName": "DirectX SDK (June 2010)",
"fileName": "DXSDK_Jun10.exe",
"url": "https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe",
"scopes": ["build"],
"mutable": false,
"bytes": 599455936,
"sha256": "705271DC83BFEE54D9B94E028426E288D5F070784B7446D164F48ECFBB2A02CB",
"expectedPublisher": "Microsoft Corporation",
"installMode": "interactive"
},
{
"id": "directx-runtime-june-2010",
"displayName": "DirectX End-User Runtimes (June 2010)",
"fileName": "directx_Jun2010_redist.exe",
"url": "https://download.microsoft.com/download/8/4/a/84a35bf1-dafe-4ae8-82af-ad2ae20b6b14/directx_Jun2010_redist.exe",
"scopes": ["runtime"],
"mutable": false,
"bytes": 100275120,
"sha256": "053F76DCBB28802E23341B6A787E3B0791C0FA5C8D4D011B1044172DBF89C73B",
"expectedPublisher": "Microsoft Corporation",
"installMode": "directx-redist"
}
]
}
Loading