diff --git a/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.chm b/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.chm index 0c364c38..11543b21 100644 Binary files a/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.chm and b/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.chm differ diff --git a/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.pdf b/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.pdf index cdcf3e16..c465cc73 100644 Binary files a/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.pdf and b/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.pdf differ diff --git a/Vanda Engine Editor/Debug/Assets/Engine/Publish-Debug/publish-debug.exe b/Vanda Engine Editor/Debug/Assets/Engine/Publish-Debug/publish-debug.exe index 59b1fd7b..9f51202b 100644 Binary files a/Vanda Engine Editor/Debug/Assets/Engine/Publish-Debug/publish-debug.exe and b/Vanda Engine Editor/Debug/Assets/Engine/Publish-Debug/publish-debug.exe differ diff --git a/Vanda Engine Editor/Debug/Assets/Engine/Publish/publish.exe b/Vanda Engine Editor/Debug/Assets/Engine/Publish/publish.exe index 13cdba83..58a596ac 100644 Binary files a/Vanda Engine Editor/Debug/Assets/Engine/Publish/publish.exe and b/Vanda Engine Editor/Debug/Assets/Engine/Publish/publish.exe differ diff --git a/Vanda Engine Editor/Debug/Readme.txt b/Vanda Engine Editor/Debug/Readme.txt index f2ee1602..aed72811 100644 --- a/Vanda Engine Editor/Debug/Readme.txt +++ b/Vanda Engine Editor/Debug/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.5 +Vanda Engine 2.9.6 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org diff --git a/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.chm b/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.chm index 0c364c38..11543b21 100644 Binary files a/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.chm and b/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.chm differ diff --git a/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.pdf b/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.pdf index cdcf3e16..c465cc73 100644 Binary files a/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.pdf and b/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.pdf differ diff --git a/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish-Debug/publish-debug.exe b/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish-Debug/publish-debug.exe index 59b1fd7b..9f51202b 100644 Binary files a/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish-Debug/publish-debug.exe and b/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish-Debug/publish-debug.exe differ diff --git a/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish/publish.exe b/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish/publish.exe index 13cdba83..58a596ac 100644 Binary files a/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish/publish.exe and b/Vanda Engine Editor/VandaEngineEditor/Assets/Engine/Publish/publish.exe differ diff --git a/Vanda Engine Editor/VandaEngineEditor/EditProjectProperties.cpp b/Vanda Engine Editor/VandaEngineEditor/EditProjectProperties.cpp index 49e5a9be..f86a4f11 100644 --- a/Vanda Engine Editor/VandaEngineEditor/EditProjectProperties.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/EditProjectProperties.cpp @@ -149,7 +149,7 @@ void CEditProjectProperties::OnOK() } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", newProjectName, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", newProjectName, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); //save changes to projects.dat @@ -230,7 +230,7 @@ void CEditProjectProperties::OnOK() } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", newProject->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", newProject->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); //create new directory diff --git a/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/PerspectiveWindow.cpp b/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/PerspectiveWindow.cpp index 9513489a..275fe1bf 100644 --- a/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/PerspectiveWindow.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/PerspectiveWindow.cpp @@ -7638,6 +7638,216 @@ CInt SetDirectionalShadowLight(lua_State* L) return 0; } +CInt GetDirectionalShadowAlgorithm(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowAlgorithm() will be executed", COLOR_GREEN); + return 0; + } + + CChar algorithm[MAX_NAME_SIZE]; + + if (g_shadowProperties.m_shadowType == eSHADOW_SINGLE_HL) + { + Cpy(algorithm, "SHADOW_SINGLE_HL"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_SINGLE) + { + Cpy(algorithm, "SHADOW_SINGLE"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_MULTI_LEAK) + { + Cpy(algorithm, "SHADOW_MULTI_LEAK"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_MULTI_NOLEAK) + { + Cpy(algorithm, "SHADOW_MULTI_NOLEAK"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF) + { + Cpy(algorithm, "SHADOW_PCF"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_TRILIN) + { + Cpy(algorithm, "SHADOW_PCF_TRILIN"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_4TAP) + { + Cpy(algorithm, "SHADOW_PCF_4TAP"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_8TAP) + { + Cpy(algorithm, "SHADOW_PCF_8TAP"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_GAUSSIAN) + { + Cpy(algorithm, "SHADOW_PCF_GAUSSIAN"); + } + + lua_pushstring(L, algorithm); + + return 1; +} + +CInt GetDirectionalShadowNumberOfSplits(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowNumberOfSplits() will be executed", COLOR_GREEN); + return 0; + } + + CInt splits = 0; + + if (g_shadowProperties.m_shadowSplits == eSHADOW_1_SPLIT) + { + splits = 1; + } + else if (g_shadowProperties.m_shadowSplits == eSHADOW_2_SPLITS) + { + splits = 2; + } + else if (g_shadowProperties.m_shadowSplits == eSHADOW_3_SPLITS) + { + splits = 3; + } + else if (g_shadowProperties.m_shadowSplits == eSHADOW_4_SPLITS) + { + splits = 4; + } + + lua_pushinteger(L, splits); + + return 1; +} + +CInt GetDirectionalShadowWeightOfSplits(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowWeightOfSplits() will be executed", COLOR_GREEN); + return 0; + } + + CFloat value = g_shadowProperties.m_shadowSplitWeight; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowNearClipPlane(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowNearClipPlane() will be executed", COLOR_GREEN); + return 0; + } + + CFloat value = g_shadowProperties.m_shadowNearClipPlane; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowFarClipPlane(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowFarClipPlane() will be executed", COLOR_GREEN); + return 0; + } + + CFloat value = g_shadowProperties.m_shadowFarClipPlane; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowResolution(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowNumberOfSplits() will be executed", COLOR_GREEN); + return 0; + } + + CInt resolution = 0; + + if (g_shadowProperties.m_shadowResolution == eSHADOW_1024) + { + resolution = 1024; + } + else if (g_shadowProperties.m_shadowResolution == eSHADOW_2048) + { + resolution = 2048; + } + else if (g_shadowProperties.m_shadowResolution == eSHADOW_4096) + { + resolution = 4096; + } + + lua_pushinteger(L, resolution); + + return 1; +} + +CInt GetDirectionalShadowIntensity(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowIntensity() will be executed", COLOR_GREEN); + return 0; + } + + CFloat value = g_shadowProperties.m_intensity; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowLight(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDirectionalShadowLight() will be executed", COLOR_GREEN); + return 0; + } + + lua_pushstring(L, g_shadowProperties.m_directionalLightName); + + return 1; +} + + CInt SetLightAmbient(lua_State* L) { if (g_testScript) diff --git a/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/Scene.cpp b/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/Scene.cpp index 6ac29889..caab560d 100644 --- a/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/Scene.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/Scene.cpp @@ -144,7 +144,7 @@ CInt CScene::WriteZipFile(CChar* zipFileName, CChar* fileInZipName, CChar* fileI CChar temp[MAX_NAME_SIZE]; sprintf(temp, "\n%s %s %s", "Error in opening",fileInZipPath, "in zipfile"); zipCloseFileInZip(zf); - zipClose(zipOpen, "Vanda Engine 2.9.5"); + zipClose(zipOpen, "Vanda Engine 2.9.6"); free(buf); return -1; } @@ -157,7 +157,7 @@ CInt CScene::WriteZipFile(CChar* zipFileName, CChar* fileInZipName, CChar* fileI //sprintf(temp, "\n%s %s %s", "Error in opening",fileInZipPath, "for reading"); //PrintInfo( temp, COLOR_RED ); //zipCloseFileInZip(zf); - //zipClose(zf, "Vanda Engine 2.9.5"); + //zipClose(zf, "Vanda Engine 2.9.6"); //free(buf); //return -1; // } @@ -173,7 +173,7 @@ CInt CScene::WriteZipFile(CChar* zipFileName, CChar* fileInZipName, CChar* fileI CChar temp[MAX_NAME_SIZE]; sprintf(temp, "\n%s%s", "Error in reading ",fileInZipPath); zipCloseFileInZip(zf); - zipClose(zf, "Vanda Engine 2.9.5"); + zipClose(zf, "Vanda Engine 2.9.6"); free(buf); return -1; } @@ -188,7 +188,7 @@ CInt CScene::WriteZipFile(CChar* zipFileName, CChar* fileInZipName, CChar* fileI sprintf( temp, "\n%s%s%s", "Error in writing ", fileInZipPath, " in the zipfile"); zipCloseFileInZip(zf); - zipClose(zf, "Vanda Engine 2.9.5"); + zipClose(zf, "Vanda Engine 2.9.6"); free(buf); return -1; } @@ -198,7 +198,7 @@ CInt CScene::WriteZipFile(CChar* zipFileName, CChar* fileInZipName, CChar* fileI if (fin) fclose(fin); zipCloseFileInZip(zf); - zipClose(zf,"Vanda Engine 2.9.5"); + zipClose(zf,"Vanda Engine 2.9.6"); free(buf); return 1; } diff --git a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp index 73ed9943..cdac2b39 100644 --- a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp @@ -132,6 +132,15 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(SetDirectionalShadowIntensity, "SetDirectionalShadowIntensity(float shadowIntensity)"); Cpy(SetDirectionalShadowLight, "SetDirectionalShadowLight(string directionalLightName)"); + Cpy(GetDirectionalShadowAlgorithm, "string GetDirectionalShadowAlgorithm()"); + Cpy(GetDirectionalShadowNumberOfSplits, "int GetDirectionalShadowNumberOfSplits()"); + Cpy(GetDirectionalShadowWeightOfSplits, "double GetDirectionalShadowWeightOfSplits()"); + Cpy(GetDirectionalShadowNearClipPlane, "double GetDirectionalShadowNearClipPlane()"); + Cpy(GetDirectionalShadowFarClipPlane, "double GetDirectionalShadowFarClipPlane()"); + Cpy(GetDirectionalShadowResolution, "int GetDirectionalShadowResolution()"); + Cpy(GetDirectionalShadowIntensity, "double GetDirectionalShadowIntensity()"); + Cpy(GetDirectionalShadowLight, "string GetDirectionalShadowLight()"); + Cpy(SetLightAmbient, "SetLightAmbient(string lightObjectName, float red, float green, float blue)"); Cpy(SetLightDiffuse, "SetLightDiffuse(string lightObjectName, float red, float green, float blue)"); Cpy(SetLightSpecular, "SetLightSpecular(string lightObjectName, float red, float green, float blue)"); @@ -2582,7 +2591,38 @@ void CScriptEditorAddFunction::OnLvnItemchangedListFunctions(NMHDR *pNMHDR, LRES { m_richFunctionName.SetWindowTextA(GetCharacterControllerJumpPower); } - + else if (Cmp(szBuffer, "GetDirectionalShadowAlgorithm")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowAlgorithm); + } + else if (Cmp(szBuffer, "GetDirectionalShadowNumberOfSplits")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowNumberOfSplits); + } + else if (Cmp(szBuffer, "GetDirectionalShadowWeightOfSplits")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowWeightOfSplits); + } + else if (Cmp(szBuffer, "GetDirectionalShadowNearClipPlane")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowNearClipPlane); + } + else if (Cmp(szBuffer, "GetDirectionalShadowFarClipPlane")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowFarClipPlane); + } + else if (Cmp(szBuffer, "GetDirectionalShadowResolution")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowResolution); + } + else if (Cmp(szBuffer, "GetDirectionalShadowIntensity")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowIntensity); + } + else if (Cmp(szBuffer, "GetDirectionalShadowLight")) + { + m_richFunctionName.SetWindowTextA(GetDirectionalShadowLight); + } CInt end = m_richFunctionName.GetWindowTextLengthA(); m_richFunctionName.SetSel(0, end); @@ -2728,6 +2768,15 @@ BOOL CScriptEditorAddFunction::OnInitDialog() InsertItem("SetDirectionalShadowIntensity"); InsertItem("SetDirectionalShadowLight"); + InsertItem("GetDirectionalShadowAlgorithm"); + InsertItem("GetDirectionalShadowNumberOfSplits"); + InsertItem("GetDirectionalShadowWeightOfSplits"); + InsertItem("GetDirectionalShadowNearClipPlane"); + InsertItem("GetDirectionalShadowFarClipPlane"); + InsertItem("GetDirectionalShadowResolution"); + InsertItem("GetDirectionalShadowIntensity"); + InsertItem("GetDirectionalShadowLight"); + InsertItem("SetLightAmbient"); InsertItem("SetLightDiffuse"); InsertItem("SetLightSpecular"); diff --git a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h index 663ec4bb..2f7c8d36 100644 --- a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h +++ b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h @@ -144,6 +144,15 @@ class CScriptEditorAddFunction : public CDialog CChar SetDirectionalShadowIntensity[MAX_URI_SIZE]; CChar SetDirectionalShadowLight[MAX_URI_SIZE]; + CChar GetDirectionalShadowAlgorithm[MAX_URI_SIZE]; + CChar GetDirectionalShadowNumberOfSplits[MAX_URI_SIZE]; + CChar GetDirectionalShadowWeightOfSplits[MAX_URI_SIZE]; + CChar GetDirectionalShadowNearClipPlane[MAX_URI_SIZE]; + CChar GetDirectionalShadowFarClipPlane[MAX_URI_SIZE]; + CChar GetDirectionalShadowResolution[MAX_URI_SIZE]; + CChar GetDirectionalShadowIntensity[MAX_URI_SIZE]; + CChar GetDirectionalShadowLight[MAX_URI_SIZE]; + CChar SetLightAmbient[MAX_URI_SIZE]; CChar SetLightDiffuse[MAX_URI_SIZE]; CChar SetLightSpecular[MAX_URI_SIZE]; diff --git a/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h b/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h index cb22a902..cb7fcbc8 100644 --- a/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h +++ b/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h @@ -194,6 +194,15 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "SetDirectionalShadowIntensity", SetDirectionalShadowIntensity); lua_register(L, "SetDirectionalShadowLight", SetDirectionalShadowLight); + lua_register(L, "GetDirectionalShadowAlgorithm", GetDirectionalShadowAlgorithm); + lua_register(L, "GetDirectionalShadowNumberOfSplits", GetDirectionalShadowNumberOfSplits); + lua_register(L, "GetDirectionalShadowWeightOfSplits", GetDirectionalShadowWeightOfSplits); + lua_register(L, "GetDirectionalShadowNearClipPlane", GetDirectionalShadowNearClipPlane); + lua_register(L, "GetDirectionalShadowFarClipPlane", GetDirectionalShadowFarClipPlane); + lua_register(L, "GetDirectionalShadowResolution", GetDirectionalShadowResolution); + lua_register(L, "GetDirectionalShadowIntensity", GetDirectionalShadowIntensity); + lua_register(L, "GetDirectionalShadowLight", GetDirectionalShadowLight); + lua_register(L, "SetLightAmbient", SetLightAmbient); lua_register(L, "SetLightDiffuse", SetLightDiffuse); lua_register(L, "SetLightSpecular", SetLightSpecular); diff --git a/Vanda Engine Editor/VandaEngineEditor/SetCurrentProject.cpp b/Vanda Engine Editor/VandaEngineEditor/SetCurrentProject.cpp index 0b946e51..e50e61e3 100644 --- a/Vanda Engine Editor/VandaEngineEditor/SetCurrentProject.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/SetCurrentProject.cpp @@ -165,7 +165,7 @@ void CSetCurrentProject::OnOK() } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", szBuffer, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", szBuffer, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); //save the changes to projects.dat FILE *ProjectsFilePtr; diff --git a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc index 215794c9..d5019666 100644 --- a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc +++ b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc @@ -2894,7 +2894,7 @@ BEGIN LTEXT "Do not show this dialog at startup",IDC_STATIC,20,151,155,10 CONTROL "Tick",IDC_WELCOME_BUTTON_UNCHECK,"Button",BS_OWNERDRAW | WS_TABSTOP,5,149,12,12 CONTROL IDB_BITMAP7,IDC_STATIC,"Static",SS_BITMAP,2,3,77,19 - LTEXT "Version 2.9.5",IDC_STATIC,7,33,60,8 + LTEXT "Version 2.9.6",IDC_STATIC,7,33,60,8 LTEXT "© 2023 Ehsan Kamrani",IDC_STATIC,7,50,126,9 CONTROL "Tutorials",IDDONATE,"Button",BS_OWNERDRAW | WS_TABSTOP,15,91,52,16 LTEXT "To see the demo, please go to File | Open menu.",IDC_STATIC,9,69,167,9 @@ -3054,7 +3054,7 @@ CAPTION "About Vanda Engine" FONT 9, "Century Gothic", 400, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,241,114,50,16,WS_GROUP - LTEXT "VandaEngine Version 2.9.5",IDC_STATIC,103,7,123,8,SS_NOPREFIX + LTEXT "VandaEngine Version 2.9.6",IDC_STATIC,103,7,123,8,SS_NOPREFIX CONTROL IDB_BITMAP_SCENE_LIST,IDC_STATIC,"Static",SS_BITMAP,21,79,59,17 CONTROL IDB_BITMAP1,IDC_STATIC,"Static",SS_BITMAP,83,79,67,17 CONTROL IDB_BITMAP_OPENAL_LOGO,IDC_STATIC,"Static",SS_BITMAP,153,73,59,27 @@ -3631,12 +3631,12 @@ BEGIN BEGIN VALUE "CompanyName", "Ehsan Kamrani " VALUE "FileDescription", "Vanda Engine" - VALUE "FileVersion", "2.9.5" + VALUE "FileVersion", "2.9.6" VALUE "internalName", "VandaEngine.exe" VALUE "LegalCopyright", "(c) 2023 Ehsan Kamrani . All rights reserved." VALUE "OriginalFilename", "VandaEngine.exe" VALUE "ProductName", " Vanda Engine" - VALUE "ProductVersion", "2.9.5" + VALUE "ProductVersion", "2.9.6" END END BLOCK "VarFileInfo" diff --git a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditorDlg.cpp b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditorDlg.cpp index aa12b845..62dbf645 100644 --- a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditorDlg.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditorDlg.cpp @@ -27,7 +27,7 @@ #endif //Version = Max.Min.BugFixes; -CInt g_version = 295; +CInt g_version = 296; CChar g_edition[MAX_NAME_SIZE]; CBool g_useOriginalPathOfDAETextures = CFalse; @@ -1484,7 +1484,7 @@ BOOL CVandaEngineDlg::OnInitDialog() SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon - SetWindowText(_T("Vanda Engine 2.9.5")); + SetWindowText(_T("Vanda Engine 2.9.6")); // TODO: Add extra initialization here ShowWindow( SW_SHOWMAXIMIZED ); @@ -3066,7 +3066,7 @@ BOOL CVandaEngineDlg::OnInitDialog() } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; @@ -3127,7 +3127,7 @@ BOOL CVandaEngineDlg::OnInitDialog() PrintInfo("\nFatal Error(s) Occured. Go To View > Report", COLOR_RED); } else - PrintInfo( "\nVersion 2.9.5 initialized successfully" ); + PrintInfo( "\nVersion 2.9.6 initialized successfully" ); //CAboutDlg dlgAbout; //dlgAbout.DoModal(); ReleaseCapture(); @@ -3316,7 +3316,7 @@ BOOL CVandaEngineDlg::OnCommand(WPARAM wParam, LPARAM lParam) } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; } @@ -3402,7 +3402,7 @@ BOOL CVandaEngineDlg::OnCommand(WPARAM wParam, LPARAM lParam) g_shareGeometriesBetweenScenes = CFalse; CChar temp[256]; - sprintf(temp, "%s", "Vanda Engine 2.9.5 : Prefab Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.6 : Prefab Mode (Untitled)"); ex_pVandaEngineDlg->SetWindowTextA(temp); if (g_multipleView->IsPlayGameMode()) @@ -3476,7 +3476,7 @@ BOOL CVandaEngineDlg::OnCommand(WPARAM wParam, LPARAM lParam) SortButtons(); CChar temp[256]; - sprintf(temp, "%s", "Vanda Engine 2.9.5 : GUI Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.6 : GUI Mode (Untitled)"); ex_pVandaEngineDlg->SetWindowTextA(temp); if (g_multipleView->IsPlayGameMode()) @@ -7816,7 +7816,7 @@ CBool CVandaEngineDlg::OnMenuClickedNew( CBool askQuestion ) PrintInfo("\nScene cleared successfully"); CChar temp[256]; - sprintf(temp, "%s", "Vanda Engine 2.9.5 : GUI Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.6 : GUI Mode (Untitled)"); ex_pVandaEngineDlg->SetWindowTextA(temp); return CTrue; @@ -8264,7 +8264,7 @@ CBool CVandaEngineDlg::OnMenuClickedNew( CBool askQuestion ) if (g_projects[i]->m_isActive) { CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", g_projects[i]->m_name, " - ", "Untitled", ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", g_projects[i]->m_name, " - ", "Untitled", ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; } @@ -8273,7 +8273,7 @@ CBool CVandaEngineDlg::OnMenuClickedNew( CBool askQuestion ) else if (g_editorMode == eMODE_PREFAB) { CChar temp[256]; - sprintf(temp, "%s", "Vanda Engine 2.9.5 : Prefab Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.6 : Prefab Mode (Untitled)"); ex_pVandaEngineDlg->SetWindowTextA(temp); } @@ -10027,7 +10027,7 @@ CVoid CVandaEngineDlg::OnMenuClickedSaveGUIAs(CBool askQuestion) g_multipleView->RenderWindow(); //to save screenshot CChar temp[256]; - sprintf(temp, "%s%s%s", "Vanda Engine 2.9.5 : GUI Mode (", g_currentPackageAndGUIName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.6 : GUI Mode (", g_currentPackageAndGUIName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); if (m_dlgSaveGUIs) @@ -10869,7 +10869,7 @@ CVoid CVandaEngineDlg::OnMenuClickedSavePrefabAs(CBool askQuestion) g_multipleView->RenderWindow(); //to save screenshot CChar temp[256]; - sprintf(temp, "%s%s%s", "Vanda Engine 2.9.5 : Prefab Mode (", g_currentPackageAndPrefabName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.6 : Prefab Mode (", g_currentPackageAndPrefabName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); if (m_dlgSavePrefabs) @@ -14194,7 +14194,7 @@ CVoid CVandaEngineDlg::OnMenuClickedSaveAs(CBool askQuestion) } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; @@ -15381,7 +15381,7 @@ CBool CVandaEngineDlg::OnMenuClickedOpenGUI() ReleaseCapture(); CChar temp[256]; - sprintf(temp, "%s%s%s", "Vanda Engine 2.9.5 : GUI Mode (", guiAndPackageName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.6 : GUI Mode (", guiAndPackageName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); } @@ -17151,7 +17151,7 @@ CBool CVandaEngineDlg::OnMenuClickedOpenPrefab() } g_updateOctree = CTrue; CChar temp[256]; - sprintf(temp, "%s%s%s", "Vanda Engine 2.9.5 : Prefab Mode (", prefabAndPackageName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.6 : Prefab Mode (", prefabAndPackageName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); fclose(filePtr); @@ -19194,7 +19194,7 @@ CBool CVandaEngineDlg::OnMenuClickedOpenVScene(CBool askQuestion) } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.5 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.6 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; diff --git a/Vanda Engine Editor/VandaEngineEditor/stdafx.h b/Vanda Engine Editor/VandaEngineEditor/stdafx.h index 3610c26c..478b6ec8 100644 --- a/Vanda Engine Editor/VandaEngineEditor/stdafx.h +++ b/Vanda Engine Editor/VandaEngineEditor/stdafx.h @@ -225,6 +225,15 @@ CInt SetDirectionalShadowResolution(lua_State* L); CInt SetDirectionalShadowIntensity(lua_State* L); CInt SetDirectionalShadowLight(lua_State* L); +CInt GetDirectionalShadowAlgorithm(lua_State* L); +CInt GetDirectionalShadowNumberOfSplits(lua_State* L); +CInt GetDirectionalShadowWeightOfSplits(lua_State* L); +CInt GetDirectionalShadowNearClipPlane(lua_State* L); +CInt GetDirectionalShadowFarClipPlane(lua_State* L); +CInt GetDirectionalShadowResolution(lua_State* L); +CInt GetDirectionalShadowIntensity(lua_State* L); +CInt GetDirectionalShadowLight(lua_State* L); + CInt SetLightAmbient(lua_State* L); CInt SetLightDiffuse(lua_State* L); CInt SetLightSpecular(lua_State* L); diff --git a/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.chm b/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.chm index 0c364c38..11543b21 100644 Binary files a/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.chm and b/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.chm differ diff --git a/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.pdf b/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.pdf index cdcf3e16..c465cc73 100644 Binary files a/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.pdf and b/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.pdf differ diff --git a/Vanda Engine Editor/release/Assets/Engine/Publish-Debug/publish-debug.exe b/Vanda Engine Editor/release/Assets/Engine/Publish-Debug/publish-debug.exe index 59b1fd7b..9f51202b 100644 Binary files a/Vanda Engine Editor/release/Assets/Engine/Publish-Debug/publish-debug.exe and b/Vanda Engine Editor/release/Assets/Engine/Publish-Debug/publish-debug.exe differ diff --git a/Vanda Engine Editor/release/Assets/Engine/Publish/publish.exe b/Vanda Engine Editor/release/Assets/Engine/Publish/publish.exe index 13cdba83..58a596ac 100644 Binary files a/Vanda Engine Editor/release/Assets/Engine/Publish/publish.exe and b/Vanda Engine Editor/release/Assets/Engine/Publish/publish.exe differ diff --git a/Vanda Engine Editor/release/Readme.txt b/Vanda Engine Editor/release/Readme.txt index f2ee1602..aed72811 100644 --- a/Vanda Engine Editor/release/Readme.txt +++ b/Vanda Engine Editor/release/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.5 +Vanda Engine 2.9.6 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org diff --git a/Vanda Engine Win32/Debug/Readme.txt b/Vanda Engine Win32/Debug/Readme.txt index f2ee1602..aed72811 100644 --- a/Vanda Engine Win32/Debug/Readme.txt +++ b/Vanda Engine Win32/Debug/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.5 +Vanda Engine 2.9.6 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org diff --git a/Vanda Engine Win32/VandaEngineWin32/Main.cpp b/Vanda Engine Win32/VandaEngineWin32/Main.cpp index 244435f3..90223577 100644 --- a/Vanda Engine Win32/VandaEngineWin32/Main.cpp +++ b/Vanda Engine Win32/VandaEngineWin32/Main.cpp @@ -5097,6 +5097,144 @@ CInt SetDirectionalShadowLight(lua_State* L) return 0; } +CInt GetDirectionalShadowAlgorithm(lua_State* L) +{ + CChar algorithm[MAX_NAME_SIZE]; + + if (g_shadowProperties.m_shadowType == eSHADOW_SINGLE_HL) + { + Cpy(algorithm, "SHADOW_SINGLE_HL"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_SINGLE) + { + Cpy(algorithm, "SHADOW_SINGLE"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_MULTI_LEAK) + { + Cpy(algorithm, "SHADOW_MULTI_LEAK"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_MULTI_NOLEAK) + { + Cpy(algorithm, "SHADOW_MULTI_NOLEAK"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF) + { + Cpy(algorithm, "SHADOW_PCF"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_TRILIN) + { + Cpy(algorithm, "SHADOW_PCF_TRILIN"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_4TAP) + { + Cpy(algorithm, "SHADOW_PCF_4TAP"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_8TAP) + { + Cpy(algorithm, "SHADOW_PCF_8TAP"); + } + else if (g_shadowProperties.m_shadowType == eSHADOW_PCF_GAUSSIAN) + { + Cpy(algorithm, "SHADOW_PCF_GAUSSIAN"); + } + + lua_pushstring(L, algorithm); + + return 1; +} + +CInt GetDirectionalShadowNumberOfSplits(lua_State* L) +{ + CInt splits = 0; + + if (g_shadowProperties.m_shadowSplits == eSHADOW_1_SPLIT) + { + splits = 1; + } + else if (g_shadowProperties.m_shadowSplits == eSHADOW_2_SPLITS) + { + splits = 2; + } + else if (g_shadowProperties.m_shadowSplits == eSHADOW_3_SPLITS) + { + splits = 3; + } + else if (g_shadowProperties.m_shadowSplits == eSHADOW_4_SPLITS) + { + splits = 4; + } + + lua_pushinteger(L, splits); + + return 1; +} + +CInt GetDirectionalShadowWeightOfSplits(lua_State* L) +{ + CFloat value = g_shadowProperties.m_shadowSplitWeight; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowNearClipPlane(lua_State* L) +{ + CFloat value = g_shadowProperties.m_shadowNearClipPlane; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowFarClipPlane(lua_State* L) +{ + CFloat value = g_shadowProperties.m_shadowFarClipPlane; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowResolution(lua_State* L) +{ + CInt resolution = 0; + + if (g_shadowProperties.m_shadowResolution == eSHADOW_1024) + { + resolution = 1024; + } + else if (g_shadowProperties.m_shadowResolution == eSHADOW_2048) + { + resolution = 2048; + } + else if (g_shadowProperties.m_shadowResolution == eSHADOW_4096) + { + resolution = 4096; + } + + lua_pushinteger(L, resolution); + + return 1; +} + +CInt GetDirectionalShadowIntensity(lua_State* L) +{ + CFloat value = g_shadowProperties.m_intensity; + + lua_pushnumber(L, value); + + return 1; +} + +CInt GetDirectionalShadowLight(lua_State* L) +{ + lua_pushstring(L, g_shadowProperties.m_directionalLightName); + + return 1; +} + + CInt SetLightAmbient(lua_State* L) { //if (g_testScript) diff --git a/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h b/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h index 302f85a3..80cde8ff 100644 --- a/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h +++ b/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h @@ -183,6 +183,15 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "SetDirectionalShadowIntensity", SetDirectionalShadowIntensity); lua_register(L, "SetDirectionalShadowLight", SetDirectionalShadowLight); + lua_register(L, "GetDirectionalShadowAlgorithm", GetDirectionalShadowAlgorithm); + lua_register(L, "GetDirectionalShadowNumberOfSplits", GetDirectionalShadowNumberOfSplits); + lua_register(L, "GetDirectionalShadowWeightOfSplits", GetDirectionalShadowWeightOfSplits); + lua_register(L, "GetDirectionalShadowNearClipPlane", GetDirectionalShadowNearClipPlane); + lua_register(L, "GetDirectionalShadowFarClipPlane", GetDirectionalShadowFarClipPlane); + lua_register(L, "GetDirectionalShadowResolution", GetDirectionalShadowResolution); + lua_register(L, "GetDirectionalShadowIntensity", GetDirectionalShadowIntensity); + lua_register(L, "GetDirectionalShadowLight", GetDirectionalShadowLight); + lua_register(L, "SetLightAmbient", SetLightAmbient); lua_register(L, "SetLightDiffuse", SetLightDiffuse); lua_register(L, "SetLightSpecular", SetLightSpecular); diff --git a/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.cpp b/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.cpp index 02f73a93..07af0a2b 100644 --- a/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.cpp +++ b/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.cpp @@ -22,7 +22,7 @@ class COpenALSoundBuffer; //Edition.MaxVersion.MinVersion.BugFixes; -CInt g_version = 295; +CInt g_version = 296; CChar g_edition[MAX_NAME_SIZE]; CScene* g_currentScene = NULL; CInstancePrefab* g_currentInstancePrefab = NULL; diff --git a/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.rc b/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.rc index b44706e6..206526be 100644 --- a/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.rc +++ b/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.rc @@ -75,12 +75,12 @@ BEGIN BEGIN VALUE "CompanyName", "Ehsan Kamrani " VALUE "FileDescription", "Vanda Engine" - VALUE "FileVersion", "2.9.5" + VALUE "FileVersion", "2.9.6" VALUE "internalName", "VandaEngine.exe" VALUE "LegalCopyright", "(c) 2023 Vanda Engine. All rights reserved." VALUE "OriginalFilename", "VandaEngine.exe" VALUE "ProductName", " Vanda Engine" - VALUE "ProductVersion", "2.9.5" + VALUE "ProductVersion", "2.9.6" END END BLOCK "VarFileInfo" @@ -101,7 +101,7 @@ CAPTION "About" FONT 8, "System" BEGIN ICON 107,IDC_MYICON,14,9,16,16 - LTEXT "VandaEngine Version 2.9.5",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "VandaEngine Version 2.9.6",IDC_STATIC,49,10,119,8,SS_NOPREFIX LTEXT "Copyright (C) 2023",IDC_STATIC,49,20,119,8 DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP END diff --git a/Vanda Engine Win32/VandaEngineWin32/stdafx.h b/Vanda Engine Win32/VandaEngineWin32/stdafx.h index 6bcde65e..c4b38e8d 100644 --- a/Vanda Engine Win32/VandaEngineWin32/stdafx.h +++ b/Vanda Engine Win32/VandaEngineWin32/stdafx.h @@ -181,6 +181,15 @@ CInt SetDirectionalShadowResolution(lua_State* L); CInt SetDirectionalShadowIntensity(lua_State* L); CInt SetDirectionalShadowLight(lua_State* L); +CInt GetDirectionalShadowAlgorithm(lua_State* L); +CInt GetDirectionalShadowNumberOfSplits(lua_State* L); +CInt GetDirectionalShadowWeightOfSplits(lua_State* L); +CInt GetDirectionalShadowNearClipPlane(lua_State* L); +CInt GetDirectionalShadowFarClipPlane(lua_State* L); +CInt GetDirectionalShadowResolution(lua_State* L); +CInt GetDirectionalShadowIntensity(lua_State* L); +CInt GetDirectionalShadowLight(lua_State* L); + CInt SetLightAmbient(lua_State* L); CInt SetLightDiffuse(lua_State* L); CInt SetLightSpecular(lua_State* L); diff --git a/Vanda Engine Win32/release/Readme.txt b/Vanda Engine Win32/release/Readme.txt index f2ee1602..aed72811 100644 --- a/Vanda Engine Win32/release/Readme.txt +++ b/Vanda Engine Win32/release/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.5 +Vanda Engine 2.9.6 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org