Skip to content

Commit

Permalink
Merge branch 'master' into install-scripts-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dGr8LookinSparky committed Mar 27, 2021
2 parents efe688c + 2305d17 commit 819b4fa
Show file tree
Hide file tree
Showing 723 changed files with 59,399 additions and 41,898 deletions.
51 changes: 51 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
* text=auto

/source/game-assets/*.cfg text eol=crlf
/source/game-assets/*.config text eol=crlf
/source/game-assets/*.dat text eol=crlf
/source/game-assets/*.txt text eol=crlf
/source/game-assets/*.armour text eol=crlf
/source/game-assets/*.md text eol=crlf
/source/game-assets/*.menu text eol=crlf
/source/game-assets/*.h text eol=crlf
/source/game-assets/*.lua text eol=crlf
/source/game-assets/*.ase text eol=crlf
/source/game-assets/*.skin text eol=crlf
/source/game-assets/*all-wcprops text eol=crlf
/source/game-assets/*entries text eol=crlf
/source/game-assets/*format text eol=crlf
/source/game-assets/*.fragment text eol=crlf
/source/game-assets/*.vertex text eol=crlf
/source/game-assets/*.shader text eol=crlf
/source/game-assets/*.mtr text eol=crlf
/source/game-assets/*.particle text eol=crlf
/source/game-assets/*.trail text eol=crlf
/source/game-assets/*.voice text eol=crlf
/source/game-assets/*.map text eol=crlf
/source/game-assets/*.arena text eol=crlf
/source/game-assets/*.bot text eol=crlf

/source/map-assets/*.cfg text eol=crlf
/source/game-assets/*.config text eol=crlf
/source/map-assets/*.dat text eol=crlf
/source/map-assets/*.txt text eol=crlf
/source/map-assets/*.armour text eol=crlf
/source/map-assets/*.md text eol=crlf
/source/map-assets/*.menu text eol=crlf
/source/map-assets/*.h text eol=crlf
/source/map-assets/*.lua text eol=crlf
/source/map-assets/*.ase text eol=crlf
/source/map-assets/*.skin text eol=crlf
/source/map-assets/*all-wcprops text eol=crlf
/source/map-assets/*entries text eol=crlf
/source/map-assets/*format text eol=crlf
/source/map-assets/*.fragment text eol=crlf
/source/map-assets/*.vertex text eol=crlf
/source/map-assets/*.shader text eol=crlf
/source/game-assets/*.mtr text eol=crlf
/source/map-assets/*.particle text eol=crlf
/source/map-assets/*.trail text eol=crlf
/source/map-assets/*.voice text eol=crlf
/source/map-assets/*.map text eol=crlf
/source/map-assets/*.arena text eol=crlf
/source/map-assets/*.bot text eol=crlf
19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ source/game-assets/*
!source/map-assets/default
!source/game-assets/default

*.swp
*tags

# CMake
####################
source/game-logic/main
source/game-logic/CMakeCache.txt
source/game-logic/CMakeFiles
Expand All @@ -19,8 +24,18 @@ source/game-logic/CPackSourceConfig.cmake
source/game-logic/Makefile
source/game-logic/cmake_install.cmake

*.swp
*tags
*CMakeFiles
*CMakeCache.txt
*CPackConfig.cmake
*CPackSourceConfig.cmake
*cmake_install.cmake
*CTestTestFile.cmake

# Visual Studio build files
####################
*.vcxproj
*.vcxproj.filters
*.sln

# OS X
####################
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "source/OpenWolf-Engine"]
path = source/OpenWolf-Engine
url = ../OpenWolf-Engine.git

[submodule "default-paks-test"]
path = default-paks-test
url = https://github.com/GrangerHub/Stellar-Prey-Default-Paks-Test.git
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ To see other options, run:
./sp-tools.sh help run
```

## Debugging

The built binaries can be debugged with the `debug` subcommand:

```bash
./sp-tools.sh debug client
```

To see other options, run:

```bash
./sp-tools.sh help debug
```

## More help

For more details on how to manage and use this repo, check:
Expand Down
1 change: 0 additions & 1 deletion default-paks-test
Submodule default-paks-test deleted from fa66b0
2 changes: 1 addition & 1 deletion source/OpenWolf-Engine
Submodule OpenWolf-Engine updated 284 files
3 changes: 1 addition & 2 deletions source/game-assets/default/gui/menus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
loadMenu { "gui/menus/serverinfo.menu" }
loadMenu { "gui/menus/loading.menu" }
loadMenu { "gui/menus/autoupdate.menu" }
loadMenu { "gui/menus/profilefirstrun.menu" }

loadMenu { "gui/menus/profilefirstrun.menu" }
}
118 changes: 118 additions & 0 deletions source/game-assets/default/gui/menus/autoupdate.menu
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#include "gui/menudef.h"
#include "gui/hud/common/colours.cfg"

{
#define W 135
#define H 235
#define X 204
#define Y 160
#define BORDER 30

menuDef
{
name "autoupdate"
visible MENU_FALSE
aspectBias ASPECT_NONE
fullscreen MENU_FALSE
rect X Y W H
focusColor COMMON_GOLD_R COMMON_GOLD_G COMMON_GOLD_B COMMON_FULLALPHA
visible MENU_TRUE
style MENU_TRUE
border MENU_TRUE
popup

onOpen
{
hide main;
show autoupdate;
}
onESC
{
close autoupdate;
open main;
}

itemDef
{
name acwindow
group grpControlbutton
rect 0 2 235 135
style WINDOW_STYLE_FILLED
border 1
bordercolor .5 .5 .5 .5
forecolor 1 1 1 1
backcolor 0 0 0 .85
visible 1
decoration
}

itemDef
{
name acwindow2
group grpControlbutton
rect 2 4 231 20
style WINDOW_STYLE_FILLED
border 1
bordercolor .1 .1 .1 .2
forecolor 1 1 1 1
backcolor .3 0.5 0.2 .55
visible 1
decoration
}


itemDef
{
name acconfirm
text "An update is avaliable for your game!"
style 0
textscale .25
textstyle 3
rect 66 0 110 20
textalign 1
textalignx 0
textaligny 0
decoration
forecolor 1 1 1 1
visible 1
}

itemDef
{
name yes
text "Update now"
type 1
textscale .3
style WINDOW_STYLE_FILLED
rect 45 60 50 20
textalign 1
textalignx 0
textaligny -5
forecolor 1 1 1 1
backcolor .3 0.5 0.2 .55
border 1
bordercolor .1 .1 .1 .3
visible 1
action { getautoupdate ; close autoupdate }
}

itemDef
{
name no
text "Cancel"
type 1
textscale .3
style WINDOW_STYLE_FILLED
border 1
bordercolor .1 .1 .1 .3
rect 142 60 50 20
textalign 1
textalignx 0
textaligny -5
forecolor 1 1 1 1
backcolor .3 0.5 0.2 .55
visible 1
action { open frontend ; close autoupdate }
}
}
}
63 changes: 63 additions & 0 deletions source/game-assets/default/renderProgs/anaglyph.fragment
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
uniform sampler2D u_TextureMap;
uniform sampler2D u_LevelsMap;
uniform vec4 u_Color;
uniform vec2 u_AutoExposureMinMax;
uniform vec3 u_ToneMinAvgMaxLinear;

uniform vec4 u_ViewInfo; // zfar / znear, zfar
uniform vec2 u_Dimensions;
uniform vec4 u_Local0; // depthScale, 0, 0, 0

varying vec2 var_TexCoords;
varying vec4 var_ViewInfo; // zfar / znear, zfar
varying vec2 var_Dimensions;
varying vec4 var_Local0; // depthScale, 0, 0, 0

vec2 texCoord = var_TexCoords;

float near = u_ViewInfo.x;
float far = u_ViewInfo.y;
float viewWidth = var_Dimensions.x;
float viewHeight = var_Dimensions.y;

//float depthScale = 12.0
float AnaglyphSeperation = var_Local0.r;
float AnaglyphRed = var_Local0.g;
float AnaglyphGreen = var_Local0.b;
float AnaglyphBlue = var_Local0.a;

void main(void)
{
vec2 Depth = vec2(1.0f / viewWidth, 1.0f / viewHeight); // calculated from screen size now
vec4 Anaglyph = texture2D(u_TextureMap, texCoord).rgba;

// Setting RGB channel colors
float red = dot(Anaglyph.rgb, vec3(2.55, 0, 0));
float green = dot(Anaglyph.rgb, vec3(0, 2.55, 0));
float blue = dot(Anaglyph.rgb, vec3(0, 0, 2.55));

// Setting the RGB channel powers
vec4 red2 = vec4(red) * 0.111;
vec4 green2 = vec4(green) * 0.111;
vec4 blue2 = vec4(blue) * 0.111;

// Left Eye (Red)
vec4 LeftEye = texture2D(u_TextureMap, vec2(texCoord + (vec2(-AnaglyphSeperation,0)*Depth))).rgba;
red2 = max(red2, LeftEye) - vec4(AnaglyphRed);

// Right Eye (Cyan)
vec4 RightEye = texture2D(u_TextureMap, vec2(texCoord + (vec2(AnaglyphSeperation,0)*Depth))).rgba;
green2 = max(green2, RightEye) - vec4(AnaglyphGreen);
blue2 = max(blue2, RightEye) - vec4(AnaglyphBlue);
vec4 cyan = (green2 + blue2) / 2.0;

// Combine
Anaglyph.r = cyan.r;
Anaglyph.g = red2.g;
Anaglyph.b = red2.b;
// Anaglyph.a = max(red2.a,cyan.a);
Anaglyph.a = 1.0;

gl_FragColor = Anaglyph;
// gl_FragColor = red2;
}
22 changes: 22 additions & 0 deletions source/game-assets/default/renderProgs/anaglyph.vertex
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
attribute vec3 attr_Position;
attribute vec4 attr_TexCoord0;

uniform mat4 u_ModelViewProjectionMatrix;

uniform vec4 u_ViewInfo; // zfar / znear, zfar
uniform vec2 u_Dimensions;
uniform vec4 u_Local0; // depthScale, 0, 0, 0

varying vec2 var_TexCoords;
varying vec4 var_ViewInfo; // zfar / znear, zfar
varying vec2 var_Dimensions;
varying vec4 var_Local0; // depthScale, 0, 0, 0

void main()
{
gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
var_TexCoords = attr_TexCoord0.st;
var_ViewInfo = u_ViewInfo;
var_Dimensions = u_Dimensions.st;
var_Local0 = u_Local0.rgba;
}
33 changes: 33 additions & 0 deletions source/game-assets/default/renderProgs/anamorphic_blur.fragment
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
uniform sampler2D u_DiffuseMap;

varying vec4 var_Local0; // scan_pixel_size_x, scan_pixel_size_y, scan_width, is_ssgi
varying vec2 var_Dimensions;
varying vec2 var_TexCoords;

void main(void)
{
float NUM_VALUES = 1.0;
vec2 PIXEL_OFFSET = vec2(1.0 / var_Dimensions.x, 1.0 / var_Dimensions.y);

vec3 col0 = texture2D(u_DiffuseMap, var_TexCoords.xy).rgb;
//gl_FragColor.rgb = vec3(0.0, 0.0, 0.0);
gl_FragColor.rgb = col0.rgb;

for (float width = 1.0; width <= var_Local0.z; width += 1.0)
{
float dist_mult = clamp(1.0 - (width / var_Local0.z), 0.0, 1.0);
vec3 col1 = texture2D(u_DiffuseMap, var_TexCoords.xy + ((var_Local0.xy * width) * PIXEL_OFFSET)).rgb;
vec3 col2 = texture2D(u_DiffuseMap, var_TexCoords.xy - ((var_Local0.xy * width) * PIXEL_OFFSET)).rgb;
vec3 add_color = ((col0 / 2) + ((col1 + col2) * (dist_mult * 2.0))) / 4;

vec3 BLUE_SHIFT_MOD = vec3(0.333, 0.333, 3.0);
vec3 add_color_blue = clamp(add_color * (BLUE_SHIFT_MOD * (1.0 - clamp(dist_mult*3.5, 0.0, 1.0))), 0.0, 1.0);
add_color.rgb += clamp(((add_color + add_color + add_color_blue) * 0.37), 0.0, 1.0);

gl_FragColor.rgb += add_color;
NUM_VALUES += 1.0;
}

gl_FragColor.rgb /= NUM_VALUES;//var_Local0.z;
gl_FragColor.a = 1.0;
}
21 changes: 21 additions & 0 deletions source/game-assets/default/renderProgs/anamorphic_blur.vertex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
attribute vec3 attr_Position;

uniform vec4 u_Local0;
uniform vec2 u_Dimensions;

uniform mat4 u_ModelViewProjectionMatrix;

attribute vec4 attr_TexCoord0;

varying vec4 var_Local0;
varying vec2 var_Dimensions;

varying vec2 var_TexCoords;

void main(void)
{
gl_Position = u_ModelViewProjectionMatrix * vec4(attr_Position, 1.0);
var_TexCoords = attr_TexCoord0.st;
var_Dimensions = u_Dimensions;
var_Local0 = u_Local0;
}

0 comments on commit 819b4fa

Please sign in to comment.