diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e8271bda68..4e37c006f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,6 +23,16 @@ repos: ^binaries/data/mods/_test.sim/simulation/templates.illformed.xml| ^binaries/data/mods/public/maps/.*\.xml ) + - id: trailing-whitespace + exclude: | + (?x)( + ^libraries/| + ^source/third_party/glad/src| + ^source/tools/replayprofile/jquery| + ^source/tools/templatesanalyzer/tablefilter| + \.dae| + \.patch$ + ) - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.11.11 hooks: diff --git a/LICENSE.md b/LICENSE.md index bb2e5034eb..2c761e16c7 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -96,8 +96,8 @@ please inform Wildfire Games at webmaster at wildfiregames dot com. - source/tools/atlas/ - GPL version 2 (or later) - see license_gpl-2.0.txt -- binaries/data/mods/public/gui/prelobby/common/terms/ - binaries/data/mods/public/gui/userreport/Terms_and_Conditions.txt +- binaries/data/mods/public/gui/prelobby/common/terms/ + binaries/data/mods/public/gui/userreport/Terms_and_Conditions.txt binaries/data/mods/mod/gui/modio/Disclaimer.txt - Redistributing modified Terms and Conditions of online services may be within the licensing, but may not change the legality or enforceability of the terms of the service provider. diff --git a/binaries/data/config/dev.cfg b/binaries/data/config/dev.cfg index 1c261f9a10..9b148af063 100644 --- a/binaries/data/config/dev.cfg +++ b/binaries/data/config/dev.cfg @@ -7,5 +7,5 @@ ; order. The precense of this file suppresses loading of mods in the user mod ; path (see https://gitea.wildfiregames.com/0ad/0ad/wiki/GameDataPaths) if the same mod is ; present in binaries/data/mods. It also implies -noUserMod. -; This is done to make saved maps end up in the right mod folder (and in the -; game-relative data path) to commit them later on. +; This is done to make saved maps end up in the right mod folder (and in the +; game-relative data path) to commit them later on. diff --git a/binaries/data/mods/_test.minimal/shaders/instancing.vs b/binaries/data/mods/_test.minimal/shaders/instancing.vs index 013379124b..170bb8889b 100644 --- a/binaries/data/mods/_test.minimal/shaders/instancing.vs +++ b/binaries/data/mods/_test.minimal/shaders/instancing.vs @@ -2,7 +2,7 @@ vec4 InstancingPosition(vec4 position); void main() { - vec4 worldPos = InstancingPosition(gl_Vertex); + vec4 worldPos = InstancingPosition(gl_Vertex); gl_FrontColor = gl_Color; gl_TexCoord[0] = gl_MultiTexCoord0; diff --git a/binaries/data/mods/_test.minimal/shaders/instancing_base.vs b/binaries/data/mods/_test.minimal/shaders/instancing_base.vs index 4193b561bc..f8fc9c55bc 100644 --- a/binaries/data/mods/_test.minimal/shaders/instancing_base.vs +++ b/binaries/data/mods/_test.minimal/shaders/instancing_base.vs @@ -12,7 +12,7 @@ vec3 InstancingNormal(vec3 normal) tmp.x = dot(vec3(Instancing1), normal); tmp.y = dot(vec3(Instancing2), normal); tmp.z = dot(vec3(Instancing3), normal); - + return tmp; } @@ -24,6 +24,6 @@ vec4 InstancingPosition(vec4 position) tmp.x = dot(Instancing1, position); tmp.y = dot(Instancing2, position); tmp.z = dot(Instancing3, position); - + return vec4(tmp, 1.0); } diff --git a/binaries/data/mods/_test.minimal/shaders/instancing_light.vs b/binaries/data/mods/_test.minimal/shaders/instancing_light.vs index 6de60dd3be..1e9326374c 100644 --- a/binaries/data/mods/_test.minimal/shaders/instancing_light.vs +++ b/binaries/data/mods/_test.minimal/shaders/instancing_light.vs @@ -6,7 +6,7 @@ vec4 InstancingPosition(vec4 position); void main() { vec3 normal = InstancingNormal(gl_Normal); - vec4 worldPos = InstancingPosition(gl_Vertex); + vec4 worldPos = InstancingPosition(gl_Vertex); gl_FrontColor = vec4(lighting(normal),1.0) * gl_Color; gl_TexCoord[0] = gl_MultiTexCoord0; diff --git a/binaries/data/mods/_test.minimal/shaders/water_high.fs b/binaries/data/mods/_test.minimal/shaders/water_high.fs index 0768ce3a44..30fe5bfe01 100644 --- a/binaries/data/mods/_test.minimal/shaders/water_high.fs +++ b/binaries/data/mods/_test.minimal/shaders/water_high.fs @@ -28,36 +28,36 @@ void main() float t; // Temporary variable vec2 reflCoords, refrCoords; vec3 reflColor, refrColor, specular; - + n = normalize(texture2D(normalMap, gl_TexCoord[0].st).xzy - vec3(0.5, 0.5, 0.5)); l = -sunDir; v = normalize(cameraPos - worldPos); h = normalize(l + v); - + ndotl = dot(n, l); ndoth = dot(n, h); ndotv = dot(n, v); - + myMurkiness = murkiness * min(waterDepth / fullDepth, 1.0); - + fresnel = pow(1.0 - ndotv, 0.8); // A rather random Fresnel approximation - + refrCoords = 0.5 * (gl_TexCoord[2].xy / gl_TexCoord[2].w) + 0.5; // Unbias texture coords refrCoords -= 0.8 * waviness * n.xz / w; // Refractions can be slightly less wavy - + reflCoords = 0.5 * (gl_TexCoord[1].xy / gl_TexCoord[1].w) + 0.5; // Unbias texture coords reflCoords += waviness * n.xz / w; - - reflColor = mix(texture2D(reflectionMap, reflCoords).rgb, sunColor * reflectionTint, + + reflColor = mix(texture2D(reflectionMap, reflCoords).rgb, sunColor * reflectionTint, reflectionTintStrength); - + refrColor = (0.5 + 0.5*ndotl) * mix(texture2D(refractionMap, refrCoords).rgb, sunColor * tint, myMurkiness); - + specular = pow(max(0.0, ndoth), shininess) * sunColor * specularStrength; - + gl_FragColor.rgb = mix(refrColor + 0.3*specular, reflColor + specular, fresnel) * losMod; - + // Make alpha vary based on both depth (so it blends with the shore) and view angle (make it // become opaque faster at lower view angles so we can't look "underneath" the water plane) t = 18.0 * max(0.0, 0.7 - v.y); diff --git a/binaries/data/mods/_test.sim/simulation/data/pathfinder.xml b/binaries/data/mods/_test.sim/simulation/data/pathfinder.xml index 47eb0eba6b..195c350b82 100644 --- a/binaries/data/mods/_test.sim/simulation/data/pathfinder.xml +++ b/binaries/data/mods/_test.sim/simulation/data/pathfinder.xml @@ -3,7 +3,7 @@ 64 - + @@ -32,7 +32,7 @@ - +