Skip to content

Commit

Permalink
fix save data not saving correctly sometimes, update default material…
Browse files Browse the repository at this point in the history
…s to use bools instead of ints.
  • Loading branch information
Klemmbaustein committed Apr 4, 2024
1 parent f53877e commit 0d8ef1e
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,4 @@
### Fixes
- Fixed some issues with point lights.
- Fixed issues with shadows.
- Fixed an issue with the default movement.
- Fixed an issue with the default movement.
6 changes: 3 additions & 3 deletions EditorContent/Materials/Arrows_Blue.jsmat
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <0 0 0>
float u_specularSize = 0
float u_specularStrength = 0
vector3 u_emissive = <0 0 1>
int u_useTexture = 0
bool u_useTexture = 0
6 changes: 3 additions & 3 deletions EditorContent/Materials/Arrows_Green.jsmat
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <0 0 0>
float u_specularSize = 0
float u_specularStrength = 0
vector3 u_emissive = <0 1 0>
int u_useTexture = 0
bool u_useTexture = 0
6 changes: 3 additions & 3 deletions EditorContent/Materials/Arrows_Red.jsmat
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <0 0 0>
float u_specularSize = 0
float u_specularStrength = 0
vector3 u_emissive = <1 0 0>
int u_useTexture = 0
bool u_useTexture = 0
6 changes: 3 additions & 3 deletions EditorContent/Materials/CollisionVisualize/Collider.jsmat
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Default material parameters:
string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <1 0.5 0>
float u_specularSize = 0
float u_specularStrength = 0
vector3 u_emissive = <0 0 0>
int u_useTexture = 0
bool u_useTexture = 0
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Default material parameters:
string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <0 1 0.5>
float u_specularSize = 0
float u_specularStrength = 0
vector3 u_emissive = <0 0 0>
int u_useTexture = 0
bool u_useTexture = 0
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Default material parameters:
string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <0 0.5 1>
float u_specularSize = 0
float u_specularStrength = 0
vector3 u_emissive = <0 0 0>
int u_useTexture = 0
bool u_useTexture = 0
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Default material parameters:
string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <1 0.2 0>
float u_specularSize = 0
float u_specularStrength = 0
vector3 u_emissive = <0 0 0>
int u_useTexture = 0
bool u_useTexture = 0
8 changes: 4 additions & 4 deletions EditorContent/Materials/EngineDefaultPhong.jsmat
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <1 1 1>
float u_specularSize = 0
float u_specularStrength = 0
int u_reverseNormal = 1
bool u_reverseNormal = 1
vector3 u_emissive = <0 0 0>
int u_useTexture = 0
bool u_useTexture = 0
4 changes: 2 additions & 2 deletions EditorContent/Materials/Reflective.jsmat
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

string VertexShader = basic.vert
string FragmentShader = basic.frag
int UseShadowCutout = 0
int IsTranslucent = 0
bool UseShadowCutout = 0
bool IsTranslucent = 0

// Material specific parameters:
vector3 u_diffuse = <0.5 0.5 0.5>
Expand Down
3 changes: 2 additions & 1 deletion EngineSource/Engine/File/SaveData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SaveData::SaveData(std::string SaveName, std::string Extension, bool InSaveFolde
IsNew = FileIsNew;
}

SaveData SaveData::ParseString(const std::string& Str)
SaveData SaveData::ParseString(std::string Str)
{
SaveData OutData;
std::string CurrentString;
Expand All @@ -61,6 +61,7 @@ SaveData SaveData::ParseString(const std::string& Str)

char Last = 0;
bool InComment = false;
Str.append(" ");

for (char c : Str)
{
Expand Down
2 changes: 1 addition & 1 deletion EngineSource/Engine/File/SaveData.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct SaveData

SaveData();
SaveData(std::string SaveName, std::string Extension = "kesv", bool InSaveFolder = true, bool ShouldSaveOnClose = true);
static SaveData ParseString(const std::string& Str);
static SaveData ParseString(std::string Str);

std::string SerializeString() const;

Expand Down

0 comments on commit 0d8ef1e

Please sign in to comment.