diff --git a/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.chm b/Vanda Engine Editor/Debug/Assets/Docs/VandaEngineScriptingReferenceManual.chm index 76b219e2..0f762475 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 new file mode 100644 index 00000000..6e080470 Binary files /dev/null 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 fc9deffe..10cd9a1f 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 d6b31df6..b3e032b6 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 3ae7ced7..b3d7cf51 100644 --- a/Vanda Engine Editor/Debug/Readme.txt +++ b/Vanda Engine Editor/Debug/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.2 +Vanda Engine 2.9.3 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org diff --git a/Vanda Engine Editor/Debug/VandaEngineEditor.exp b/Vanda Engine Editor/Debug/VandaEngineEditor.exp new file mode 100644 index 00000000..a574411c Binary files /dev/null and b/Vanda Engine Editor/Debug/VandaEngineEditor.exp differ diff --git a/Vanda Engine Editor/Debug/VandaEngineEditor.lib b/Vanda Engine Editor/Debug/VandaEngineEditor.lib new file mode 100644 index 00000000..99561b08 Binary files /dev/null and b/Vanda Engine Editor/Debug/VandaEngineEditor.lib differ diff --git a/Vanda Engine Editor/VandaEngineEditor/AddEngineCamera.cpp b/Vanda Engine Editor/VandaEngineEditor/AddEngineCamera.cpp index 5aebad5c..c897693e 100644 --- a/Vanda Engine Editor/VandaEngineEditor/AddEngineCamera.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/AddEngineCamera.cpp @@ -75,6 +75,18 @@ void CAddEngineCamera::OnBnClickedOk() return; } + if (m_ncp <= 0.0) + { + MessageBox("Near clip plane must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + + if (m_fcp <= 0.0) + { + MessageBox("Far clip plane must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + CBool compare = CFalse; if (!m_strName.IsEmpty()) { diff --git a/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.chm b/Vanda Engine Editor/VandaEngineEditor/Assets/Docs/VandaEngineScriptingReferenceManual.chm index 76b219e2..0f762475 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 new file mode 100644 index 00000000..6e080470 Binary files /dev/null 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 fc9deffe..10cd9a1f 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 d6b31df6..b3e032b6 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/EditCurrentSceneOptions.cpp b/Vanda Engine Editor/VandaEngineEditor/EditCurrentSceneOptions.cpp index bb246339..b09d9de9 100644 --- a/Vanda Engine Editor/VandaEngineEditor/EditCurrentSceneOptions.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/EditCurrentSceneOptions.cpp @@ -201,7 +201,7 @@ void CEditCurrentSceneOptions::OnOK() return; } - if (m_menuCursorSize < 0.0f) + if (m_menuCursorSize < 0) { MessageBox("Cursor size must be greater than 0", "Vanda Engine Error", MB_OK | MB_ICONERROR); return; diff --git a/Vanda Engine Editor/VandaEngineEditor/EditDOF.cpp b/Vanda Engine Editor/VandaEngineEditor/EditDOF.cpp index 9265cf97..632c3851 100644 --- a/Vanda Engine Editor/VandaEngineEditor/EditDOF.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/EditDOF.cpp @@ -90,6 +90,17 @@ void CEditDOF::OnOK() else { GetInformation(); + if (m_focalDistance < 0.0) + { + MessageBox("Focal distance must be equal to or greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + if (m_focalRange < 0.0) + { + MessageBox("Focal range must be equal to or greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + g_dofProperties.m_dofFocalDistance = m_focalDistance; g_dofProperties.m_dofFocalRange = m_focalRange; diff --git a/Vanda Engine Editor/VandaEngineEditor/EditGeneralPhysXProperties.cpp b/Vanda Engine Editor/VandaEngineEditor/EditGeneralPhysXProperties.cpp index 51c5063a..4701d4a8 100644 --- a/Vanda Engine Editor/VandaEngineEditor/EditGeneralPhysXProperties.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/EditGeneralPhysXProperties.cpp @@ -210,32 +210,42 @@ void CEditGeneralPhysXProperties::OnOK() { if (m_fDefaultRestitution < 0.0f || m_fDefaultRestitution > 1.0f) { - MessageBox("restitution must be between 0 and 1", "Vanda Engine Error", MB_OK | MB_ICONERROR); + MessageBox("restitution must be in the range [0.0,1.0]", "Vanda Engine Error", MB_OK | MB_ICONERROR); return; } if (m_fDefaultStaticFriction < 0.0) { - MessageBox("static friction must be between 0 or higher", "Vanda Engine Error", MB_OK | MB_ICONERROR); + MessageBox("static friction must be equal to or greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); return; } if (m_fDefaultDynamicFriction < 0.0) { - MessageBox("dynamic friction must be between 0 or higher", "Vanda Engine Error", MB_OK | MB_ICONERROR); + MessageBox("dynamic friction must be equal to or greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); return; } if (m_fDefaultSkinWidth <= 0.0f) { - MessageBox("skin width must be greater than 0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + MessageBox("skin width must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + if (m_fCharacterSkinWidth <= 0.0f) + { + MessageBox("character skin width must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); return; } if (m_fCapsuleRadius <= 0.0f) { - MessageBox("capsule radius must be greater than 0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + MessageBox("capsule radius must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); return; } if (m_fCapsuleHeight <= 0.0f) { - MessageBox("capsule height must be greater than 0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + MessageBox("capsule height must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + if (m_fCharacterStepOffset < 0.0) + { + MessageBox("step offset must be equal to or greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); return; } diff --git a/Vanda Engine Editor/VandaEngineEditor/EditProjectProperties.cpp b/Vanda Engine Editor/VandaEngineEditor/EditProjectProperties.cpp index 6d147865..3899b26b 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.2 (", newProjectName, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", 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.2 (", newProject->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", 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 c304cca8..319376e2 100644 --- a/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/PerspectiveWindow.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/PerspectiveWindow.cpp @@ -3911,6 +3911,111 @@ CInt DeleteAllResources(lua_State* L) return 0; } +CInt PlayResourceSound(lua_State* L) +{ + if (g_testScript) + return 0; + + int argc = lua_gettop(L); + if (argc < 1) + { + PrintInfo("\nPlease specify at least 1 argument for PlayResourceSound()", COLOR_RED); + return 0; + } + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + for (int n = 1; n <= argc; ++n) + { + CBool foundTarget = CFalse; + + CChar luaToString[MAX_NAME_SIZE]; + Cpy(luaToString, lua_tostring(L, n)); + StringToUpper(luaToString); //package name + + CChar extension[MAX_NAME_SIZE]; + if (GetFileExtension(luaToString)) + { + Cpy(extension, GetFileExtension(luaToString)); + if (Cmp(extension, ".OGG")) + { + for (CUInt pr = 0; pr < g_projects.size(); pr++) + { + CBool foundTargetInCurrentProject = CFalse; + for (CUInt i = 0; i < g_projects[pr]->m_resourceNames.size(); i++) + { + for (CUInt j = 0; j < g_projects[pr]->m_resourceNames[i].size(); j++) + { + if (j == 0) + continue; //it's folder name + + CChar resourceFile[MAX_NAME_SIZE]; + sprintf(resourceFile, "%s_%s", g_projects[pr]->m_resourceNames[i].front().c_str(), g_projects[pr]->m_resourceNames[i][j].c_str()); + StringToUpper(resourceFile); + + if (Cmp(luaToString, resourceFile)) + { + foundTarget = CTrue; + foundTargetInCurrentProject = CTrue; + CChar message[MAX_NAME_SIZE]; + sprintf(message, "\nProject '%s' - PlayResourceSound() will play sound resource '%s'", g_projects[pr]->m_name, lua_tostring(L, n)); + PrintInfo(message, COLOR_GREEN); + break; + } + } + if (foundTargetInCurrentProject) + break; + } + } + } + } + if (!foundTarget) + { + CChar errorMessage[MAX_NAME_SIZE]; + sprintf(errorMessage, "\nPlayResourceSound() Error: Couldn't find '%s' sound resource in all projects", lua_tostring(L, n)); + PrintInfo(errorMessage, COLOR_RED); + } + } + return 0; + } + + for (int n = 1; n <= argc; ++n) + { + CChar luaToString[MAX_NAME_SIZE]; + Cpy(luaToString, lua_tostring(L, n)); + StringToUpper(luaToString); //package name + + CBool foundTarget = CFalse; + for (CUInt i = 0; i < g_resourceFiles.size(); i++) + { + if (g_resourceFiles[i]->GetSoundSource()) + { + CChar string[MAX_NAME_SIZE]; + Cpy(string, g_resourceFiles[i]->GetSoundSource()->GetName()); + StringToUpper(string); //package name + + if (Cmp(string, luaToString)) + { + g_soundSystem->PlayALSound(*(g_resourceFiles[i]->GetSoundSource()->GetSoundSource())); + //CChar temp[MAX_NAME_SIZE]; + //sprintf(temp, "%s%s%s", "\nSound '", g_resourceFiles[i]->GetSoundSource()->GetName(), "' was played."); + //PrintInfo(temp, COLOR_GREEN); + foundTarget = CTrue; + break; + } + } + } + if (!foundTarget) + { + CChar temp[MAX_NAME_SIZE]; + sprintf(temp, "%s%s%s", "\nPlayResourceSound() Error: Couldn't find the sound '", lua_tostring(L, n), "' to be played."); + PrintInfo(temp, COLOR_RED); + } + } + + return 0; +} + CInt PlayResourceSoundLoop(lua_State* L) { if (g_testScript) @@ -4505,6 +4610,13 @@ CInt ShowCursorIcon(lua_State* L) return 0; } + CFloat size = (CFloat)lua_tonumber(L, 2); + if (size <= 0.0) + { + PrintInfo("\nShowCursorIcon() Error: cursor size must be greater than 0.0", COLOR_RED); + return 0; + } + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) { CBool foundTarget = CFalse; @@ -5766,6 +5878,14 @@ CInt SetSelectionDistance(lua_State* L) PrintInfo("\nPlease specify 1 argument for SetSelectionDistance()", COLOR_RED); return 0; } + + CFloat distance = CFloat(lua_tonumber(L, 1)); + if (distance <= 0.0) + { + PrintInfo("\nSetSelectionDistance() Error: distance must be greater than 0.0", COLOR_RED); + return 0; + } + g_multipleView->SetSelectionDistance(CFloat(lua_tonumber(L, 1))); return 0; } @@ -6847,9 +6967,9 @@ CInt SetDepthOfFieldFocalDistance(lua_State* L) } CFloat value = (CFloat)lua_tonumber(L, 1); - if (value <= 0.0f) + if (value < 0.0f) { - PrintInfo("\nPlease specify a positive value for SetDepthOfFieldFocalDistance()", COLOR_RED); + PrintInfo("\nSetDepthOfFieldFocalDistance() Error: distance must be equal to or greater than 0.0", COLOR_RED); return 0; } @@ -6871,9 +6991,9 @@ CInt SetDepthOfFieldFocalRange(lua_State* L) } CFloat value = (CFloat)lua_tonumber(L, 1); - if (value <= 0.0f) + if (value < 0.0f) { - PrintInfo("\nPlease specify a positive value for SetDepthOfFieldFocalRange()", COLOR_RED); + PrintInfo("\nSetDepthOfFieldFocalRange() Error: range must be equal to or greater than 0.0", COLOR_RED); return 0; } @@ -6882,6 +7002,42 @@ CInt SetDepthOfFieldFocalRange(lua_State* L) return 0; } +CInt GetDepthOfFieldFocalDistance(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDepthOfFieldFocalDistance() will be executed", COLOR_GREEN); + return 0; + } + + CFloat focalDistance = g_dofProperties.m_dofFocalDistance; + + lua_pushnumber(L, focalDistance); + + return 1; +} + +CInt GetDepthOfFieldFocalRange(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDepthOfFieldFocalRange() will be executed", COLOR_GREEN); + return 0; + } + + CFloat focalRange = g_dofProperties.m_dofFocalRange; + + lua_pushnumber(L, focalRange); + + return 1; +} + //fog CInt EnableFog(lua_State* L) { @@ -6962,6 +7118,46 @@ CInt SetFogDensity(lua_State* L) return 0; } +CInt GetFogColor(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetFogColor() will be executed", COLOR_GREEN); + return 0; + } + + CFloat r = g_fogProperties.m_fogColor[0]; + CFloat g = g_fogProperties.m_fogColor[1]; + CFloat b = g_fogProperties.m_fogColor[2]; + + lua_pushnumber(L, r); + lua_pushnumber(L, g); + lua_pushnumber(L, b); + + return 3; +} + +CInt GetFogDensity(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetFogDensity() will be executed", COLOR_GREEN); + return 0; + } + + CFloat density = g_fogProperties.m_fogDensity; + + lua_pushnumber(L, density); + + return 1; +} + //bloom CInt EnableBloom(lua_State* L) { @@ -7034,6 +7230,46 @@ CInt SetBloomIntensity(lua_State* L) return 0; } +CInt GetBloomColor(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetBloomColor() will be executed", COLOR_GREEN); + return 0; + } + + CFloat r = g_bloomProperties.m_bloomColor[0]; + CFloat g = g_bloomProperties.m_bloomColor[1]; + CFloat b = g_bloomProperties.m_bloomColor[2]; + + lua_pushnumber(L, r); + lua_pushnumber(L, g); + lua_pushnumber(L, b); + + return 3; +} + +CInt GetBloomIntensity(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetBloomIntensity() will be executed", COLOR_GREEN); + return 0; + } + + CFloat intensity = g_bloomProperties.m_bloomIntensity; + + lua_pushnumber(L, intensity); + + return 1; +} + //shadow CInt EnableDirectionalShadow(lua_State* L) { @@ -7780,6 +8016,12 @@ CInt SetLightShininess(lua_State* L) CFloat shininess = (CFloat)lua_tonumber(L, 2); + if (shininess < 0.0) + { + PrintInfo("\nSetLightShininess() Error: shininess must be equal to or greater than 0.0", COLOR_RED); + return 0; + } + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) { if (!Cmp(luaToString, "THIS")) @@ -9806,7 +10048,7 @@ CInt SetDistanceBetweenPhysicsCameraAndCharacterController(lua_State* L) CFloat value = (CFloat)lua_tonumber(L, 1); - if (value < 0.0f) + if (value <= 0.0f) { PrintInfo("\nSetDistanceBetweenPhysicsCameraAndCharacterController() Error: argument must be greater than 0", COLOR_RED); return 0; @@ -9837,7 +10079,7 @@ CInt SetCharacterControllerCapsuleRadius(lua_State* L) CFloat value = (CFloat)lua_tonumber(L, 1); - if (value < 0.0f) + if (value <= 0.0f) { PrintInfo("\nSetCharacterControllerCapsuleRadius() Error: argument must be greater than 0", COLOR_RED); return 0; @@ -9868,7 +10110,7 @@ CInt SetCharacterControllerCapsuleHeight(lua_State* L) CFloat value = (CFloat)lua_tonumber(L, 1); - if (value < 0.0f) + if (value <= 0.0f) { PrintInfo("\nSetCharacterControllerCapsuleHeight() Error: argument must be greater than 0", COLOR_RED); return 0; @@ -9998,7 +10240,7 @@ CInt SetCharacterControllerStepOffset(lua_State* L) if (value < 0.0f) { - PrintInfo("\nSetCharacterControllerStepOffset() Error: argument must be greater than 0", COLOR_RED); + PrintInfo("\nSetCharacterControllerStepOffset() Error: argument must be equal to or greater than 0.0", COLOR_RED); return 0; } @@ -10132,6 +10374,24 @@ CInt SetCharacterControllerPosition(lua_State* L) return 0; } +CInt GetDistanceBetweenPhysicsCameraAndCharacterController(lua_State* L) +{ + if (g_testScript) + return 0; + + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) + { + PrintInfo("\nGetDistanceBetweenPhysicsCameraAndCharacterController() will be executed", COLOR_GREEN); + return 0; + } + + CFloat distance = g_physXProperties.m_fCameraCharacterDistance; + + lua_pushnumber(L, distance); + + return 1; +} + CInt GetCharacterControllerPosition(lua_State* L) { if (!gPhysXscene) @@ -28219,6 +28479,13 @@ CInt ShowMenuCursor(lua_State* L) { CInt size; size = lua_tointeger(L, 1); + + if (size <= 0) + { + PrintInfo("\nShowMenuCursor() Error: cursor size must be greater than 0", COLOR_RED); + return 0; + } + g_currentVSceneProperties.m_menuCursorSize = size; } @@ -31285,6 +31552,12 @@ CInt SetEngineCameraNearClipPlane(lua_State* L) CFloat ncp = (CFloat)lua_tonumber(L, 2); + if (ncp <= 0.0) + { + PrintInfo("\nSetEngineCameraNearClipPlane() Error: near clip plane must be greater than 0.0", COLOR_RED); + return 0; + } + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) { if (!Cmp(luaToString, "THIS")) @@ -31370,6 +31643,12 @@ CInt SetEngineCameraFarClipPlane(lua_State* L) CFloat fcp = (CFloat)lua_tonumber(L, 2); + if (fcp <= 0.0) + { + PrintInfo("\nSetEngineCameraFarClipPlane() Error: far clip plane must be greater than 0.0", COLOR_RED); + return 0; + } + if (g_editorMode == eMODE_PREFAB || g_editorMode == eMODE_GUI) { if (!Cmp(luaToString, "THIS")) diff --git a/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/Scene.cpp b/Vanda Engine Editor/VandaEngineEditor/GraphicsEngine/Scene.cpp index a01af80f..e2460ee1 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.2"); + zipClose(zipOpen, "Vanda Engine 2.9.3"); 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.2"); + //zipClose(zf, "Vanda Engine 2.9.3"); //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.2"); + zipClose(zf, "Vanda Engine 2.9.3"); 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.2"); + zipClose(zf, "Vanda Engine 2.9.3"); 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.2"); + zipClose(zf,"Vanda Engine 2.9.3"); free(buf); return 1; } @@ -1525,6 +1525,9 @@ CBool CScene::ExecuteNonCyclicAnimation(CInt id, CFloat delayIn, CFloat delayOut if( weight < EPSILON ) return CFalse; if( weight > 1.0f ) weight = 1.0f; + if (delayIn < 0.0) delayIn = 0.0; + if (delayOut < 0.0) delayOut = 0.0; + if( delayIn + delayOut > m_animationClips[id]->GetDuration() ) { CChar temp[MAX_NAME_SIZE]; diff --git a/Vanda Engine Editor/VandaEngineEditor/MainCharacterProperties.cpp b/Vanda Engine Editor/VandaEngineEditor/MainCharacterProperties.cpp index a9ea651a..9cde9df0 100644 --- a/Vanda Engine Editor/VandaEngineEditor/MainCharacterProperties.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/MainCharacterProperties.cpp @@ -256,6 +256,33 @@ void CMainCharacterProperties::OnBnClickedOk() } else { + if (m_fCameraCharacterDistance <= 0.0) + { + MessageBox("Camera distance must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + if (m_fCharacterSkinWidth <= 0.0f) + { + MessageBox("skin width must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + if (m_fCapsuleRadius <= 0.0f) + { + MessageBox("capsule radius must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + if (m_fCapsuleHeight <= 0.0f) + { + MessageBox("capsule height must be greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + if (m_fCharacterStepOffset < 0.0) + { + MessageBox("step offset must be equal to or greater than 0.0", "Vanda Engine Error", MB_OK | MB_ICONERROR); + return; + } + + m_physXProperties.m_fCameraCharacterDistance = atof(m_strCameraCharacterDistance); m_physXProperties.m_fCapsuleRadius = atof(m_strCapsuleRadius); m_physXProperties.m_fCapsuleHeight = atof(m_strCapsuleHeight); diff --git a/Vanda Engine Editor/VandaEngineEditor/ScriptEditor.cpp b/Vanda Engine Editor/VandaEngineEditor/ScriptEditor.cpp index 664bfa56..dee8ac3d 100644 --- a/Vanda Engine Editor/VandaEngineEditor/ScriptEditor.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/ScriptEditor.cpp @@ -282,11 +282,19 @@ BOOL CScriptEditor::OnCommand(WPARAM wParam, LPARAM lParam) CDelete(dlg); } - else if (wParam == ID_HELP_SCRIPT_REFERENCE_MANUAL) + else if (wParam == ID_HELP_SCRIPT_REFERENCE_MANUAL_CHM) { ShellExecute(NULL, "open", "Assets\\Docs\\VandaEngineScriptingReferenceManual.chm", NULL, NULL, SW_SHOWNORMAL); } - + else if (wParam == ID_HELP_SCRIPT_REFERENCE_MANUAL_PDF) + { + ShellExecute(NULL, "open", "Assets\\Docs\\VandaEngineScriptingReferenceManual.pdf", NULL, NULL, SW_SHOWNORMAL); + } + else if (wParam == ID_HELP_ONLINEHELP) + { + ShellExecute(NULL, "open", "https://vanda3d.org/scripting-reference-manual/", NULL, NULL, SW_SHOWNORMAL); + } + return CDialog::OnCommand(wParam, lParam); } diff --git a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp index ba6f6d47..0ad1ca28 100644 --- a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp +++ b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.cpp @@ -31,7 +31,7 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(ExecuteNonCyclicAnimation, "ExecuteNonCyclicAnimation(string prefabInstanceName, string animationClipName, float delayIn, float delayOut, float weightTarget, bool lock)"); Cpy(ReverseExecuteNonCyclicAnimation, "ReverseExecuteNonCyclicAnimation(string prefabInstanceName, string animationClipName)"); Cpy(RemoveNonCyclicAnimation, "RemoveNonCyclicAnimation(string prefabInstanceName, string animationClipName)"); - Cpy(GetAnimationClipDurationOfPrefabInstance, "GetAnimationClipDurationOfPrefabInstance(string prefabInstanceName, string animationClipName)"); + Cpy(GetAnimationClipDurationOfPrefabInstance, "double GetAnimationClipDurationOfPrefabInstance(string prefabInstanceName, string animationClipName)"); Cpy(PausePrefabInstanceAnimations, "PausePrefabInstanceAnimations(string prefabInstanceName)"); Cpy(ResumePrefabInstanceAnimations, "ResumePrefabInstanceAnimations(string prefabInstanceName)"); @@ -44,19 +44,20 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(ActivateImportedCameraOfPrefabInstance, "ActivateImportedCameraOfPrefabInstance(string prefabInstanceName, string prefabCameraName, float endTime[optional])"); Cpy(ActivateEngineCamera, "ActivateEngineCamera(string engineCameraName, float endTime[optional])"); Cpy(SetPhysicsCameraAngle, "SetPhysicsCameraAngle(float angleDegree)"); - Cpy(GetPhysicsCameraAngle, "GetPhysicsCameraAngle()"); + Cpy(GetPhysicsCameraAngle, "double GetPhysicsCameraAngle()"); Cpy(SetPhysicsCameraTilt, "SetPhysicsCameraTilt(float tiltDegree)"); Cpy(SetPhysicsCameraMaxTilt, "SetPhysicsCameraMaxTilt(float maxTiltDegree)"); Cpy(SetPhysicsCameraMinTilt, "SetPhysicsCameraMinTilt(float minTiltDegree)"); - Cpy(GetPhysicsCameraTilt, "GetPhysicsCameraTilt()"); - Cpy(GetPhysicsCameraMaxTilt, "GetPhysicsCameraMaxTilt()"); - Cpy(GetPhysicsCameraMinTilt, "GetPhysicsCameraMinTilt()"); + Cpy(GetPhysicsCameraTilt, "double GetPhysicsCameraTilt()"); + Cpy(GetPhysicsCameraMaxTilt, "double GetPhysicsCameraMaxTilt()"); + Cpy(GetPhysicsCameraMinTilt, "double GetPhysicsCameraMinTilt()"); Cpy(SetPhysicsCameraYaw, "SetPhysicsCameraYaw(float yawDegree)"); - Cpy(GetPhysicsCameraYaw, "GetPhysicsCameraYaw()"); + Cpy(GetPhysicsCameraYaw, "double GetPhysicsCameraYaw()"); Cpy(LoadResource, "LoadResource(string resourceDirectoryName, string resourceFileName)"); Cpy(DeleteResource, "DeleteResource(string resourceDirectoryName, string resourceFileName)"); Cpy(DeleteAllResources, "DeleteAllResources()"); + Cpy(PlayResourceSound, "PlayResourceSound(string resourceDirectoryName_resourceFileName.ogg)"); Cpy(PlayResourceSoundLoop, "PlayResourceSoundLoop(string resourceDirectoryName_resourceFileName.ogg)"); Cpy(PlayResourceSoundOnce, "PlayResourceSoundOnce(string resourceDirectoryName_resourceFileName.ogg)"); Cpy(StopResourceSound, "StopResourceSound(string resourceDirectoryName_resourceFileName.ogg)"); @@ -69,48 +70,57 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(ShowGUI, "ShowGUI(string guiName)"); Cpy(HideGUI, "HideGUI(string guiName)"); - Cpy(IsKeyDown, "IsKeyDown(string DirectInputKeyCode)"); + Cpy(IsKeyDown, "bool IsKeyDown(string DirectInputKeyCode)"); Cpy(ShowPrefabInstance, "ShowPrefabInstance(string prefabInstanceName)"); Cpy(HidePrefabInstance, "HidePrefabInstance(string prefabInstanceName)"); Cpy(SetSelectionDistance, "SetSelectionDistance(float selectionDistance)"); - Cpy(GetSelectionDistance, "GetSelectionDistance()"); + Cpy(GetSelectionDistance, "double GetSelectionDistance()"); Cpy(SelectPrefabInstances , "SelectPrefabInstances(double mousePositionX, double mousePositionY, double selectionWidthSize, double selectionHeightSize)"); - Cpy(GetScreenWidth, "GetScreenWidth()"); - Cpy(GetScreenHeight, "GetScreenHeight()"); - Cpy(GetCursorX, "GetCursorX()"); - Cpy(GetCursorY, "GetCursorY()"); - Cpy(IsCharacterControllerLocked, "IsCharacterControllerLocked()"); - Cpy(GetElapsedTime, "GetElapsedTime()"); - Cpy(GetPrefabInstanceNameFromActor, "GetPrefabInstanceNameFromActor(string physicsActorName)"); + Cpy(GetScreenWidth, "int GetScreenWidth()"); + Cpy(GetScreenHeight, "int GetScreenHeight()"); + Cpy(GetCursorX, "double GetCursorX()"); + Cpy(GetCursorY, "double GetCursorY()"); + Cpy(IsCharacterControllerLocked, "bool IsCharacterControllerLocked()"); + Cpy(GetElapsedTime, "double GetElapsedTime()"); + Cpy(GetPrefabInstanceNameFromActor, "string GetPrefabInstanceNameFromActor(string physicsActorName)"); Cpy(TranslatePrefabInstance, "TranslatePrefabInstance(string prefabInstanceName, float XPosition, float YPosition, float ZPosition)"); Cpy(RotatePrefabInstance, "RotatePrefabInstance(string prefabInstanceName, float XRotationAngle, float YRotationAngle, float ZRotationAngle)"); Cpy(ScalePrefabInstance, "ScalePrefabInstance(string prefabInstanceName, float XScale, float YScale, float ZScale)"); - Cpy(GetPrefabInstanceTranslate, "GetPrefabInstanceTranslate(string prefabInstanceName)"); - Cpy(GetPrefabInstanceRotate, "GetPrefabInstanceRotate(string prefabInstanceName)"); - Cpy(GetPrefabInstanceScale, "GetPrefabInstanceScale(string prefabInstanceName)"); + Cpy(GetPrefabInstanceTranslate, "double,double,double GetPrefabInstanceTranslate(string prefabInstanceName)"); + Cpy(GetPrefabInstanceRotate, "double,double,double GetPrefabInstanceRotate(string prefabInstanceName)"); + Cpy(GetPrefabInstanceScale, "double,double,double GetPrefabInstanceScale(string prefabInstanceName)"); - Cpy(GetPrefabInstanceRadius, "GetPrefabInstanceRadius(string prefabInstanceName)"); - Cpy(GetDistanceOfPrefabInstanceFromPhysicsCamera, "GetDistanceOfPrefabInstanceFromPhysicsCamera(string prefabInstanceName)"); + Cpy(GetPrefabInstanceRadius, "double GetPrefabInstanceRadius(string prefabInstanceName)"); + Cpy(GetDistanceOfPrefabInstanceFromPhysicsCamera, "double GetDistanceOfPrefabInstanceFromPhysicsCamera(string prefabInstanceName)"); Cpy(EnableDepthOfField, "EnableDepthOfField()"); Cpy(DisableDepthOfField, "DisableDepthOfField()"); Cpy(SetDepthOfFieldFocalDistance, "SetDepthOfFieldFocalDistance(float focalDistance)"); Cpy(SetDepthOfFieldFocalRange, "SetDepthOfFieldFocalRange(float focalRange)"); + Cpy(GetDepthOfFieldFocalDistance, "double GetDepthOfFieldFocalDistance()"); + Cpy(GetDepthOfFieldFocalRange, "double GetDepthOfFieldFocalRange()"); + Cpy(EnableFog, "EnableFog()"); Cpy(DisableFog, "DisableFog()"); Cpy(SetFogColor, "SetFogColor(float red, float green, float blue)"); Cpy(SetFogDensity, "SetFogDensity(float density)"); + Cpy(GetFogColor, "double, double, double GetFogColor()"); + Cpy(GetFogDensity, "double GetFogDensity()"); + Cpy(EnableBloom, "EnableBloom()"); Cpy(DisableBloom, "DisableBloom()"); Cpy(SetBloomColor, "SetBloomColor(float red, float green, float blue)"); Cpy(SetBloomIntensity, "SetBloomIntensity(float intensity)"); + Cpy(GetBloomColor, "double, double, double GetBloomColor()"); + Cpy(GetBloomIntensity, "double GetBloomIntensity()"); + Cpy(EnableDirectionalShadow, "EnableDirectionalShadow()"); Cpy(DisableDirectionalShadow, "DisableDirectionalShadow()"); Cpy(SetDirectionalShadowAlgorithm, "SetDirectionalShadowAlgorithm(string shadowAlgorithmCode)"); @@ -127,10 +137,10 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(SetLightSpecular, "SetLightSpecular(string lightObjectName, float red, float green, float blue)"); Cpy(SetLightShininess, "SetLightShininess(string lightObjectName, float shininess)"); - Cpy(GetLightAmbient, "GetLightAmbient(string lightObjectName)"); - Cpy(GetLightDiffuse, "GetLightDiffuse(string lightObjectName)"); - Cpy(GetLightSpecular, "GetLightSpecular(string lightObjectName)"); - Cpy(GetLightShininess, "GetLightShininess(string lightObjectName)"); + Cpy(GetLightAmbient, "double,double,double GetLightAmbient(string lightObjectName)"); + Cpy(GetLightDiffuse, "double,double,double GetLightDiffuse(string lightObjectName)"); + Cpy(GetLightSpecular, "double,double,double GetLightSpecular(string lightObjectName)"); + Cpy(GetLightShininess, "double GetLightShininess(string lightObjectName)"); Cpy(SetPrefabInstanceAmbient, "SetPrefabInstanceAmbient(string prefabInstanceName, float red, float green, float blue)"); Cpy(SetPrefabInstanceDiffuse, "SetPrefabInstanceDiffuse(string prefabInstanceName, float red, float green, float blue)"); @@ -166,7 +176,9 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(EnablePhysicsDebugMode, "EnablePhysicsDebugMode()"); Cpy(DisablePhysicsDebugMode, "DisablePhysicsDebugMode()"); Cpy(SetCharacterControllerPosition, "SetCharacterControllerPosition(float x, float y, float z)"); - Cpy(GetCharacterControllerPosition, "GetCharacterControllerPosition()"); + Cpy(GetCharacterControllerPosition, "double,double,double GetCharacterControllerPosition()"); + + Cpy(GetDistanceBetweenPhysicsCameraAndCharacterController, "double GetDistanceBetweenPhysicsCameraAndCharacterController()"); Cpy(SetMultisamplingValue, "SetMultisamplingValue(int numSamples)"); Cpy(SetAnisotropicFilteringValue, "SetAnisotropicFilteringValue(int value)"); @@ -176,124 +188,124 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(DisableGeneralWaterReflection, "DisableGeneralWaterReflection()"); Cpy(SetScreenResolution, "SetScreenResolution(int screenWidth)"); Cpy(SaveGeneralProperties, "SaveGeneralProperties()"); - Cpy(GetMultisamplingValue, "GetMultisamplingValue()"); - Cpy(GetAnisotropicFilteringValue, "GetAnisotropicFilteringValue()"); - Cpy(IsVSyncEnabled, "IsVSyncEnabled()"); - Cpy(IsGeneralWaterReflectionEnabled, "IsGeneralWaterReflectionEnabled()"); - Cpy(GetScreenResolution, "GetScreenResolution()"); - - Cpy(GetVSceneScriptStringVariable, "GetVSceneScriptStringVariable(string variable)"); - Cpy(GetVSceneScriptBoolVariable, "GetVSceneScriptBoolVariable(string variable)"); - Cpy(GetVSceneScriptIntVariable, "GetVSceneScriptIntVariable(string variable)"); - Cpy(GetVSceneScriptDoubleVariable, "GetVSceneScriptDoubleVariable(string variable)"); + Cpy(GetMultisamplingValue, "int GetMultisamplingValue()"); + Cpy(GetAnisotropicFilteringValue, "int GetAnisotropicFilteringValue()"); + Cpy(IsVSyncEnabled, "bool IsVSyncEnabled()"); + Cpy(IsGeneralWaterReflectionEnabled, "bool IsGeneralWaterReflectionEnabled()"); + Cpy(GetScreenResolution, "int GetScreenResolution()"); + + Cpy(GetVSceneScriptStringVariable, "string GetVSceneScriptStringVariable(string variable)"); + Cpy(GetVSceneScriptBoolVariable, "bool GetVSceneScriptBoolVariable(string variable)"); + Cpy(GetVSceneScriptIntVariable, "int GetVSceneScriptIntVariable(string variable)"); + Cpy(GetVSceneScriptDoubleVariable, "double GetVSceneScriptDoubleVariable(string variable)"); Cpy(SetVSceneScriptStringVariable, "SetVSceneScriptStringVariable(string variable, string value)"); Cpy(SetVSceneScriptBoolVariable, "SetVSceneScriptBoolVariable(string variable, bool value)"); Cpy(SetVSceneScriptIntVariable, "SetVSceneScriptIntVariable(string variable, int value)"); Cpy(SetVSceneScriptDoubleVariable, "SetVSceneScriptDoubleVariable(string variable, double value)"); - Cpy(GetSkyScriptStringVariable, "GetSkyScriptStringVariable(string variable)"); - Cpy(GetSkyScriptBoolVariable, "GetSkyScriptBoolVariable(string variable)"); - Cpy(GetSkyScriptIntVariable, "GetSkyScriptIntVariable(string variable)"); - Cpy(GetSkyScriptDoubleVariable, "GetSkyScriptDoubleVariable(string variable)"); + Cpy(GetSkyScriptStringVariable, "string GetSkyScriptStringVariable(string variable)"); + Cpy(GetSkyScriptBoolVariable, "bool GetSkyScriptBoolVariable(string variable)"); + Cpy(GetSkyScriptIntVariable, "int GetSkyScriptIntVariable(string variable)"); + Cpy(GetSkyScriptDoubleVariable, "double GetSkyScriptDoubleVariable(string variable)"); Cpy(SetSkyScriptStringVariable, "SetSkyScriptStringVariable(string variable, string value)"); Cpy(SetSkyScriptBoolVariable, "SetSkyScriptBoolVariable(string variable, bool value)"); Cpy(SetSkyScriptIntVariable, "SetSkyScriptIntVariable(string variable, int value)"); Cpy(SetSkyScriptDoubleVariable, "SetSkyScriptDoubleVariable(string variable, double value)"); - Cpy(GetTerrainScriptStringVariable, "GetTerrainScriptStringVariable(string variable)"); - Cpy(GetTerrainScriptBoolVariable, "GetTerrainScriptBoolVariable(string variable)"); - Cpy(GetTerrainScriptIntVariable, "GetTerrainScriptIntVariable(string variable)"); - Cpy(GetTerrainScriptDoubleVariable, "GetTerrainScriptDoubleVariable(string variable)"); + Cpy(GetTerrainScriptStringVariable, "string GetTerrainScriptStringVariable(string variable)"); + Cpy(GetTerrainScriptBoolVariable, "bool GetTerrainScriptBoolVariable(string variable)"); + Cpy(GetTerrainScriptIntVariable, "int GetTerrainScriptIntVariable(string variable)"); + Cpy(GetTerrainScriptDoubleVariable, "double GetTerrainScriptDoubleVariable(string variable)"); Cpy(SetTerrainScriptStringVariable, "SetTerrainScriptStringVariable(string variable, string value)"); Cpy(SetTerrainScriptBoolVariable, "SetTerrainScriptBoolVariable(string variable, bool value)"); Cpy(SetTerrainScriptIntVariable, "SetTerrainScriptIntVariable(string variable, int value)"); Cpy(SetTerrainScriptDoubleVariable, "SetTerrainScriptDoubleVariable(string variable, double value)"); - Cpy(GetPrefabInstanceScriptStringVariable, "GetPrefabInstanceScriptStringVariable(string prefabInstanceName, string variable)"); - Cpy(GetPrefabInstanceScriptBoolVariable, "GetPrefabInstanceScriptBoolVariable(string prefabInstanceName, string variable)"); - Cpy(GetPrefabInstanceScriptIntVariable, "GetPrefabInstanceScriptIntVariable(string prefabInstanceName, string variable)"); - Cpy(GetPrefabInstanceScriptDoubleVariable, "GetPrefabInstanceScriptDoubleVariable(string prefabInstanceName, string variable)"); + Cpy(GetPrefabInstanceScriptStringVariable, "string GetPrefabInstanceScriptStringVariable(string prefabInstanceName, string variable)"); + Cpy(GetPrefabInstanceScriptBoolVariable, "bool GetPrefabInstanceScriptBoolVariable(string prefabInstanceName, string variable)"); + Cpy(GetPrefabInstanceScriptIntVariable, "int GetPrefabInstanceScriptIntVariable(string prefabInstanceName, string variable)"); + Cpy(GetPrefabInstanceScriptDoubleVariable, "double GetPrefabInstanceScriptDoubleVariable(string prefabInstanceName, string variable)"); Cpy(SetPrefabInstanceScriptStringVariable, "SetPrefabInstanceScriptStringVariable(string prefabInstanceName, string variable, string value)"); Cpy(SetPrefabInstanceScriptBoolVariable, "SetPrefabInstanceScriptBoolVariable(string prefabInstanceName, string variable, bool value)"); Cpy(SetPrefabInstanceScriptIntVariable, "SetPrefabInstanceScriptIntVariable(string prefabInstanceName, string variable, int value)"); Cpy(SetPrefabInstanceScriptDoubleVariable, "SetPrefabInstanceScriptDoubleVariable(string prefabInstanceName, string variable, double value)"); - Cpy(GetGUIButtonScriptStringVariable, "GetGUIButtonScriptStringVariable(string GUIName, string buttonName, string variable)"); - Cpy(GetGUIButtonScriptBoolVariable, "GetGUIButtonScriptBoolVariable(string GUIName, string buttonName, string variable)"); - Cpy(GetGUIButtonScriptIntVariable, "GetGUIButtonScriptIntVariable(string GUIName, string buttonName, string variable)"); - Cpy(GetGUIButtonScriptDoubleVariable, "GetGUIButtonScriptDoubleVariable(string GUIName, string buttonName, string variable)"); + Cpy(GetGUIButtonScriptStringVariable, "string GetGUIButtonScriptStringVariable(string GUIName, string buttonName, string variable)"); + Cpy(GetGUIButtonScriptBoolVariable, "bool GetGUIButtonScriptBoolVariable(string GUIName, string buttonName, string variable)"); + Cpy(GetGUIButtonScriptIntVariable, "int GetGUIButtonScriptIntVariable(string GUIName, string buttonName, string variable)"); + Cpy(GetGUIButtonScriptDoubleVariable, "double GetGUIButtonScriptDoubleVariable(string GUIName, string buttonName, string variable)"); Cpy(SetGUIButtonScriptStringVariable, "SetGUIButtonScriptStringVariable(string GUIName, string buttonName, string variable, string value)"); Cpy(SetGUIButtonScriptBoolVariable, "SetGUIButtonScriptBoolVariable(string GUIName, string buttonName, string variable, bool value)"); Cpy(SetGUIButtonScriptIntVariable, "SetGUIButtonScriptIntVariable(string GUIName, string buttonName, vstring variable, int value)"); Cpy(SetGUIButtonScriptDoubleVariable, "SetGUIButtonScriptDoubleVariable(string GUIName, string buttonName, string variable, double value)"); - Cpy(GetTriggerScriptStringVariable, "GetTriggerScriptStringVariable(string triggerName, string variable)"); - Cpy(GetTriggerScriptBoolVariable, "GetTriggerScriptBoolVariable(string triggerName, string variable)"); - Cpy(GetTriggerScriptIntVariable, "GetTriggerScriptIntVariable(string triggerName, string variable)"); - Cpy(GetTriggerScriptDoubleVariable, "GetTriggerScriptDoubleVariable(string triggerName, string variable)"); + Cpy(GetTriggerScriptStringVariable, "string GetTriggerScriptStringVariable(string triggerName, string variable)"); + Cpy(GetTriggerScriptBoolVariable, "bool GetTriggerScriptBoolVariable(string triggerName, string variable)"); + Cpy(GetTriggerScriptIntVariable, "int GetTriggerScriptIntVariable(string triggerName, string variable)"); + Cpy(GetTriggerScriptDoubleVariable, "double GetTriggerScriptDoubleVariable(string triggerName, string variable)"); Cpy(SetTriggerScriptStringVariable, "SetTriggerScriptStringVariable(string triggerName, string variable, string value)"); Cpy(SetTriggerScriptBoolVariable, "SetTriggerScriptBoolVariable(string triggerName, string variable, bool value)"); Cpy(SetTriggerScriptIntVariable, "SetTriggerScriptIntVariable(string triggerName, string variable, int value)"); Cpy(SetTriggerScriptDoubleVariable, "SetTriggerScriptDoubleVariable(string triggerName, string variable, double value)"); - Cpy(GetWaterScriptStringVariable, "GetWaterScriptStringVariable(string waterName, string variable)"); - Cpy(GetWaterScriptBoolVariable, "GetWaterScriptBoolVariable(string waterName, string variable)"); - Cpy(GetWaterScriptIntVariable, "GetWaterScriptIntVariable(string waterName, string variable)"); - Cpy(GetWaterScriptDoubleVariable, "GetWaterScriptDoubleVariable(string waterName, string variable)"); + Cpy(GetWaterScriptStringVariable, "string GetWaterScriptStringVariable(string waterName, string variable)"); + Cpy(GetWaterScriptBoolVariable, "bool GetWaterScriptBoolVariable(string waterName, string variable)"); + Cpy(GetWaterScriptIntVariable, "int GetWaterScriptIntVariable(string waterName, string variable)"); + Cpy(GetWaterScriptDoubleVariable, "double GetWaterScriptDoubleVariable(string waterName, string variable)"); Cpy(SetWaterScriptStringVariable, "SetWaterScriptStringVariable(string waterName, string variable, string value)"); Cpy(SetWaterScriptBoolVariable, "SetWaterScriptBoolVariable(string waterName, string variable, bool value)"); Cpy(SetWaterScriptIntVariable, "SetWaterScriptIntVariable(string waterName, string variable, int value)"); Cpy(SetWaterScriptDoubleVariable, "SetWaterScriptDoubleVariable(string waterName, string variable, double value)"); - Cpy(GetVideoScriptStringVariable, "GetVideoScriptStringVariable(string videoName, string variable)"); - Cpy(GetVideoScriptBoolVariable, "GetVideoScriptBoolVariable(string videoName, string variable)"); - Cpy(GetVideoScriptIntVariable, "GetVideoScriptIntVariable(string videoName, string variable)"); - Cpy(GetVideoScriptDoubleVariable, "GetVideoScriptDoubleVariable(string videoName, string variable)"); + Cpy(GetVideoScriptStringVariable, "string GetVideoScriptStringVariable(string videoName, string variable)"); + Cpy(GetVideoScriptBoolVariable, "bool GetVideoScriptBoolVariable(string videoName, string variable)"); + Cpy(GetVideoScriptIntVariable, "int GetVideoScriptIntVariable(string videoName, string variable)"); + Cpy(GetVideoScriptDoubleVariable, "double GetVideoScriptDoubleVariable(string videoName, string variable)"); Cpy(SetVideoScriptStringVariable, "SetVideoScriptStringVariable(string videoName, string variable, string value)"); Cpy(SetVideoScriptBoolVariable, "SetVideoScriptBoolVariable(string videoName, string variable, bool value)"); Cpy(SetVideoScriptIntVariable, "SetVideoScriptIntVariable(string videoName, string variable, int value)"); Cpy(SetVideoScriptDoubleVariable, "SetVideoScriptDoubleVariable(string videoName, string variable, double value)"); - Cpy(GetAmbientSoundScriptStringVariable, "GetAmbientSoundScriptStringVariable(string ambientSoundName, string variable)"); - Cpy(GetAmbientSoundScriptBoolVariable, "GetAmbientSoundScriptBoolVariable(string ambientSoundName, string variable)"); - Cpy(GetAmbientSoundScriptIntVariable, "GetAmbientSoundScriptIntVariable(string ambientSoundName, string variable)"); - Cpy(GetAmbientSoundScriptDoubleVariable, "GetAmbientSoundScriptDoubleVariable(string ambientSoundName, string variable)"); + Cpy(GetAmbientSoundScriptStringVariable, "string GetAmbientSoundScriptStringVariable(string ambientSoundName, string variable)"); + Cpy(GetAmbientSoundScriptBoolVariable, "bool GetAmbientSoundScriptBoolVariable(string ambientSoundName, string variable)"); + Cpy(GetAmbientSoundScriptIntVariable, "int GetAmbientSoundScriptIntVariable(string ambientSoundName, string variable)"); + Cpy(GetAmbientSoundScriptDoubleVariable, "double GetAmbientSoundScriptDoubleVariable(string ambientSoundName, string variable)"); Cpy(SetAmbientSoundScriptStringVariable, "SetAmbientSoundScriptStringVariable(string ambientSoundName, string variable, string value)"); Cpy(SetAmbientSoundScriptBoolVariable, "SetAmbientSoundScriptBoolVariable(string ambientSoundName, string variable, bool value)"); Cpy(SetAmbientSoundScriptIntVariable, "SetAmbientSoundScriptIntVariable(string ambientSoundName, string variable, int value)"); Cpy(SetAmbientSoundScriptDoubleVariable, "SetAmbientSoundScriptDoubleVariable(string ambientSoundName, string variable, double value)"); - Cpy(Get3DSoundScriptStringVariable, "Get3DSoundScriptStringVariable(string 3DSoundName, string variable)"); - Cpy(Get3DSoundScriptBoolVariable, "Get3DSoundScriptBoolVariable(string 3DSoundName, string variable)"); - Cpy(Get3DSoundScriptIntVariable, "Get3DSoundScriptIntVariable(string 3DSoundName, string variable)"); - Cpy(Get3DSoundScriptDoubleVariable, "Get3DSoundScriptDoubleVariable(string 3DSoundName, string variable)"); + Cpy(Get3DSoundScriptStringVariable, "string Get3DSoundScriptStringVariable(string 3DSoundName, string variable)"); + Cpy(Get3DSoundScriptBoolVariable, "bool Get3DSoundScriptBoolVariable(string 3DSoundName, string variable)"); + Cpy(Get3DSoundScriptIntVariable, "int Get3DSoundScriptIntVariable(string 3DSoundName, string variable)"); + Cpy(Get3DSoundScriptDoubleVariable, "double Get3DSoundScriptDoubleVariable(string 3DSoundName, string variable)"); Cpy(Set3DSoundScriptStringVariable, "Set3DSoundScriptStringVariable(string 3DSoundName, string variable, string value)"); Cpy(Set3DSoundScriptBoolVariable, "Set3DSoundScriptBoolVariable(string 3DSoundName, string variable, bool value)"); Cpy(Set3DSoundScriptIntVariable, "Set3DSoundScriptIntVariable(string 3DSoundName, string variable, int value)"); Cpy(Set3DSoundScriptDoubleVariable, "Set3DSoundScriptDoubleVariable(string 3DSoundName, string variable, double value)"); - Cpy(GetLightScriptStringVariable, "GetLightScriptStringVariable(string lightName, string variable)"); - Cpy(GetLightScriptBoolVariable, "GetLightScriptBoolVariable(string lightName, string variable)"); - Cpy(GetLightScriptIntVariable, "GetLightScriptIntVariable(string lightName, string variable)"); - Cpy(GetLightScriptDoubleVariable, "GetLightScriptDoubleVariable(string lightName, string variable)"); + Cpy(GetLightScriptStringVariable, "string GetLightScriptStringVariable(string lightName, string variable)"); + Cpy(GetLightScriptBoolVariable, "bool GetLightScriptBoolVariable(string lightName, string variable)"); + Cpy(GetLightScriptIntVariable, "int GetLightScriptIntVariable(string lightName, string variable)"); + Cpy(GetLightScriptDoubleVariable, "double GetLightScriptDoubleVariable(string lightName, string variable)"); Cpy(SetLightScriptStringVariable, "SetLightScriptStringVariable(string lightName, string variable, string value)"); Cpy(SetLightScriptBoolVariable, "SetLightScriptBoolVariable(string lightName, string variable, bool value)"); Cpy(SetLightScriptIntVariable, "SetLightScriptIntVariable(string lightName, string variable, int value)"); Cpy(SetLightScriptDoubleVariable, "SetLightScriptDoubleVariable(string lightName, string variable, double value)"); - Cpy(GetCameraScriptStringVariable, "GetCameraScriptStringVariable(string cameraName, string variable)"); - Cpy(GetCameraScriptBoolVariable, "GetCameraScriptBoolVariable(string cameraName, string variable)"); - Cpy(GetCameraScriptIntVariable, "GetCameraScriptIntVariable(string cameraName, string variable)"); - Cpy(GetCameraScriptDoubleVariable, "GetCameraScriptDoubleVariable(string cameraName, string variable)"); + Cpy(GetCameraScriptStringVariable, "string GetCameraScriptStringVariable(string cameraName, string variable)"); + Cpy(GetCameraScriptBoolVariable, "bool GetCameraScriptBoolVariable(string cameraName, string variable)"); + Cpy(GetCameraScriptIntVariable, "int GetCameraScriptIntVariable(string cameraName, string variable)"); + Cpy(GetCameraScriptDoubleVariable, "double GetCameraScriptDoubleVariable(string cameraName, string variable)"); Cpy(SetCameraScriptStringVariable, "SetCameraScriptStringVariable(string cameraName, string variable, string value)"); Cpy(SetCameraScriptBoolVariable, "SetCameraScriptBoolVariable(string cameraName, string variable, bool value)"); Cpy(SetCameraScriptIntVariable, "SetCameraScriptIntVariable(string cameraName, string variable, int value)"); Cpy(SetCameraScriptDoubleVariable, "SetCameraScriptDoubleVariable(string cameraName, string variable, double value)"); - Cpy(GetMainCharacterScriptStringVariable, "GetMainCharacterScriptStringVariable(string variable)"); - Cpy(GetMainCharacterScriptBoolVariable, "GetMainCharacterScriptBoolVariable(string variable)"); - Cpy(GetMainCharacterScriptIntVariable, "GetMainCharacterScriptIntVariable(string variable)"); - Cpy(GetMainCharacterScriptDoubleVariable, "GetMainCharacterScriptDoubleVariable(string variable)"); + Cpy(GetMainCharacterScriptStringVariable, "string GetMainCharacterScriptStringVariable(string variable)"); + Cpy(GetMainCharacterScriptBoolVariable, "bool GetMainCharacterScriptBoolVariable(string variable)"); + Cpy(GetMainCharacterScriptIntVariable, "int GetMainCharacterScriptIntVariable(string variable)"); + Cpy(GetMainCharacterScriptDoubleVariable, "double GetMainCharacterScriptDoubleVariable(string variable)"); Cpy(SetMainCharacterScriptStringVariable, "SetMainCharacterScriptStringVariable(string variable, string value)"); Cpy(SetMainCharacterScriptBoolVariable, "SetMainCharacterScriptBoolVariable(string variable, bool value)"); Cpy(SetMainCharacterScriptIntVariable, "SetMainCharacterScriptIntVariable(string variable, int value)"); @@ -311,18 +323,18 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(SetGUIButtonPosition, "SetGUIButtonPosition(string GUIName, string buttonName, int x, int y)"); Cpy(SetGUIImagePosition, "SetGUIImagePosition(string GUIName, string imageName, int x, int y)"); Cpy(SetGUITextPosition, "SetGUITextPosition(string GUIName, string textName, int x, int y)"); - Cpy(GetGUIButtonPosition, "GetGUIButtonPosition(string GUIName, string buttonName)"); - Cpy(GetGUIImagePosition, "GetGUIImagePosition(string GUIName, string imageName)"); - Cpy(GetGUITextPosition, "GetGUITextPosition(string GUIName, string textName)"); + Cpy(GetGUIButtonPosition, "int,int GetGUIButtonPosition(string GUIName, string buttonName)"); + Cpy(GetGUIImagePosition, "int,int GetGUIImagePosition(string GUIName, string imageName)"); + Cpy(GetGUITextPosition, "int,int GetGUITextPosition(string GUIName, string textName)"); Cpy(SetGUIPosition, "SetGUIPosition(string GUIName, int x, int y)"); - Cpy(GetGUIPosition, "GetGUIPosition(string GUIName)"); + Cpy(GetGUIPosition, "int,int GetGUIPosition(string GUIName)"); Cpy(AddForceToCharacterController, "AddForceToCharacterController(float forceX, float forceY, float forceZ, float forceSpeed, float forceDecreaseValue)"); Cpy(AddForceToPrefabInstance, "AddForceToPrefabInstance(string prefabInstanceName, float forceX, float forceY, float forceZ, float forcePower)"); Cpy(AddTorqueToPrefabInstance, "AddTorqueToPrefabInstance(string prefabInstanceName, float torqueX, float torqueY, float torqueZ, float torquePower)"); - Cpy(GetPhysicsActorGroup, "GetPhysicsActorGroup(string physicsActorName)"); + Cpy(GetPhysicsActorGroup, "string GetPhysicsActorGroup(string physicsActorName)"); Cpy(SetPhysicsCollisionFlags, "SetPhysicsCollisionFlags(string group1, string group2, bool flag)"); Cpy(GeneratePrefabInstance, "GeneratePrefabInstance(string prefabName, float XPos, float YPos, float ZPos, float XRot, float YRot, float ZRot, float XScale, float YScale, float ZScale)"); @@ -341,17 +353,17 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(SetSoundReferenceDistance, "SetSoundReferenceDistance(string 3DSoundObjectName, float distance)"); Cpy(SetSoundMaxDistance, "SetSoundMaxDistance(string 3DSoundObjectName, float maxDistance)"); - Cpy(GetSoundVolume, "GetSoundVolume(string soundObjectName)"); - Cpy(GetSoundPitch, "GetSoundPitch(string soundObjectName)"); - Cpy(GetSoundPlay, "GetSoundPlay(string soundObjectName)"); - Cpy(GetSoundLoop, "GetSoundLoop(string soundObjectName)"); - Cpy(GetSoundPosition, "GetSoundPosition(string 3DSoundObjectName)"); - Cpy(GetSoundRollOff, "GetSoundRollOff(string 3DSoundObjectName)"); - Cpy(GetSoundReferenceDistance, "GetSoundReferenceDistance(string 3DSoundObjectName)"); - Cpy(GetSoundMaxDistance, "GetSoundMaxDistance(string 3DSoundObjectName)"); + Cpy(GetSoundVolume, "double GetSoundVolume(string soundObjectName)"); + Cpy(GetSoundPitch, "double GetSoundPitch(string soundObjectName)"); + Cpy(GetSoundPlay, "bool GetSoundPlay(string soundObjectName)"); + Cpy(GetSoundLoop, "bool GetSoundLoop(string soundObjectName)"); + Cpy(GetSoundPosition, "double,double,double GetSoundPosition(string 3DSoundObjectName)"); + Cpy(GetSoundRollOff, "double GetSoundRollOff(string 3DSoundObjectName)"); + Cpy(GetSoundReferenceDistance, "double GetSoundReferenceDistance(string 3DSoundObjectName)"); + Cpy(GetSoundMaxDistance, "double GetSoundMaxDistance(string 3DSoundObjectName)"); Cpy(SetGlobalSoundVolume, "SetGlobalSoundVolume(float volume)"); - Cpy(GetGlobalSoundVolume, "GetGlobalSoundVolume()"); + Cpy(GetGlobalSoundVolume, "double GetGlobalSoundVolume()"); Cpy(PlayVideo, "PlayVideo(string videoName)"); Cpy(PlayVideoLoop, "PlayVideoLoop(string videoName)"); @@ -361,10 +373,10 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(SetVideoLoop, "SetVideoLoop(string videoName, bool loop)"); Cpy(SetVideoVolume, "SetVideoVolume(string videoName, float volume)"); - Cpy(GetVideoPlay, "GetVideoPlay(string videoName)"); - Cpy(GetVideoLoop, "GetVideoLoop(string videoName)"); - Cpy(GetVideoVolume, "GetVideoVolume(string videoName)"); - Cpy(GetVideoDuration, "GetVideoDuration(string videoName)"); + Cpy(GetVideoPlay, "bool GetVideoPlay(string videoName)"); + Cpy(GetVideoLoop, "bool GetVideoLoop(string videoName)"); + Cpy(GetVideoVolume, "double GetVideoVolume(string videoName)"); + Cpy(GetVideoDuration, "double GetVideoDuration(string videoName)"); //Stop Sounds Cpy(StopAllSounds, "StopAllSounds([optional] string exception_1, [optional] string exception_2,..., [optional] string exception_n)"); @@ -441,7 +453,7 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(ShowMenuCursor, "ShowMenuCursor([optional] int cursorSize)"); Cpy(HideMenuCursor, "HideMenuCursor()"); Cpy(SetMenuCursorSize, "SetMenuCursorSize(int cursorSize)"); - Cpy(GetMenuCursorSize, "GetMenuCursorSize()"); + Cpy(GetMenuCursorSize, "int GetMenuCursorSize()"); //Pause script Update event of game objects Cpy(PauseAllUpdateEvents, "PauseAllUpdateEvents([optional] string exception_1, [optional] string exception_2,..., [optional] string exception_n)"); @@ -491,10 +503,10 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(SetTerrainSpecular, "SetTerrainSpecular(float red, float green, float blue)"); Cpy(SetTerrainShininess, "SetTerrainShininess(float shininess)"); - Cpy(GetTerrainAmbient, "GetTerrainAmbient()"); - Cpy(GetTerrainDiffuse, "GetTerrainDiffuse()"); - Cpy(GetTerrainSpecular, "GetTerrainSpecular()"); - Cpy(GetTerrainShininess, "GetTerrainShininess()"); + Cpy(GetTerrainAmbient, "double,double,double GetTerrainAmbient()"); + Cpy(GetTerrainDiffuse, "double,double,double GetTerrainDiffuse()"); + Cpy(GetTerrainSpecular, "double,double,double GetTerrainSpecular()"); + Cpy(GetTerrainShininess, "double GetTerrainShininess()"); //Engine Camera Cpy(SetEngineCameraPosition, "SetEngineCameraPosition(string engineCameraName, float x, float y, float z)"); @@ -504,12 +516,12 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(SetEngineCameraFarClipPlane, "SetEngineCameraFarClipPlane(string engineCameraName, float farClipPlane)"); Cpy(SetEngineCameraAngle, "SetEngineCameraAngle(string engineCameraName, float angle)"); - Cpy(GetEngineCameraPosition, "GetEngineCameraPosition(string engineCameraName)"); - Cpy(GetEngineCameraPan, "GetEngineCameraPan(string engineCameraName)"); - Cpy(GetEngineCameraTilt, "GetEngineCameraTilt(string engineCameraName)"); - Cpy(GetEngineCameraNearClipPlane, "GetEngineCameraNearClipPlane(string engineCameraName)"); - Cpy(GetEngineCameraFarClipPlane, "GetEngineCameraFarClipPlane(string engineCameraName)"); - Cpy(GetEngineCameraAngle, "GetEngineCameraAngle(string engineCameraName)"); + Cpy(GetEngineCameraPosition, "double,double,double GetEngineCameraPosition(string engineCameraName)"); + Cpy(GetEngineCameraPan, "double GetEngineCameraPan(string engineCameraName)"); + Cpy(GetEngineCameraTilt, "double GetEngineCameraTilt(string engineCameraName)"); + Cpy(GetEngineCameraNearClipPlane, "double GetEngineCameraNearClipPlane(string engineCameraName)"); + Cpy(GetEngineCameraFarClipPlane, "double GetEngineCameraFarClipPlane(string engineCameraName)"); + Cpy(GetEngineCameraAngle, "double GetEngineCameraAngle(string engineCameraName)"); //Water Cpy(SetWaterPosition, "SetWaterPosition(string waterName, float x, float y, float z)"); @@ -528,26 +540,26 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(EnableWaterSunReflection, "EnableWaterSunReflection(string waterName)"); Cpy(DisableWaterSunReflection, "DisableWaterSunReflection(string waterName)"); - Cpy(GetWaterPosition, "GetWaterPosition(string waterName)"); - Cpy(GetWaterRotation, "GetWaterRotation(string waterName)"); - Cpy(GetWaterScale, "GetWaterScale(string waterName)"); - Cpy(GetWaterLightPosition, "GetWaterLightPosition(string waterName)"); - Cpy(GetWaterUnderwaterColor, "GetWaterUnderwaterColor(string waterName)"); - Cpy(GetWaterUnderwaterFogDensity, "GetWaterUnderwaterFogDensity(string waterName)"); - Cpy(GetWaterTransparency, "GetWaterTransparency(string waterName)"); - Cpy(GetWaterFlowSpeed, "GetWaterFlowSpeed(string waterName)"); - Cpy(GetWaterUV, "GetWaterUV(string waterName)"); - Cpy(IsWaterVisible, "IsWaterVisible(string waterName)"); - Cpy(IsWaterShadowEnabled, "IsWaterShadowEnabled(string waterName)"); - Cpy(IsWaterSunReflectionEnabled, "IsWaterSunReflectionEnabled(string waterName)"); + Cpy(GetWaterPosition, "double,double,double GetWaterPosition(string waterName)"); + Cpy(GetWaterRotation, "double GetWaterRotation(string waterName)"); + Cpy(GetWaterScale, "double,double GetWaterScale(string waterName)"); + Cpy(GetWaterLightPosition, "double,double,double GetWaterLightPosition(string waterName)"); + Cpy(GetWaterUnderwaterColor, "double,double,double GetWaterUnderwaterColor(string waterName)"); + Cpy(GetWaterUnderwaterFogDensity, "double GetWaterUnderwaterFogDensity(string waterName)"); + Cpy(GetWaterTransparency, "double GetWaterTransparency(string waterName)"); + Cpy(GetWaterFlowSpeed, "double GetWaterFlowSpeed(string waterName)"); + Cpy(GetWaterUV, "double GetWaterUV(string waterName)"); + Cpy(IsWaterVisible, "bool IsWaterVisible(string waterName)"); + Cpy(IsWaterShadowEnabled, "bool IsWaterShadowEnabled(string waterName)"); + Cpy(IsWaterSunReflectionEnabled, "bool IsWaterSunReflectionEnabled(string waterName)"); //Sky Cpy(SetSkyPosition, "SetSkyPosition(float x, float y, float z)"); Cpy(EnableSkyFog, "EnableSkyFog()"); Cpy(DisableSkyFog, "DisableSkyFog()"); - Cpy(GetSkyPosition, "GetSkyPosition()"); - Cpy(IsSkyFogEnabled, "IsSkyFogEnabled()"); + Cpy(GetSkyPosition, "double,double,double GetSkyPosition()"); + Cpy(IsSkyFogEnabled, "bool IsSkyFogEnabled()"); //Save/Load Cpy(CreateFolder, "CreateFolder(string folderPath)"); @@ -556,13 +568,13 @@ CScriptEditorAddFunction::CScriptEditorAddFunction(CWnd* pParent /*=NULL*/) Cpy(OpenFileForReading, "OpenFileForReading(string filePath)"); Cpy(OpenFileForWriting, "OpenFileForWriting(string filePath)"); Cpy(CloseFile, "CloseFile(string filePath)"); - Cpy(ReadBoolVariableFromFile, "ReadBoolVariableFromFile()"); + Cpy(ReadBoolVariableFromFile, "bool ReadBoolVariableFromFile()"); Cpy(WriteBoolVariableToFile, "WriteBoolVariableToFile(bool value)"); - Cpy(ReadFloatVariableFromFile, "ReadFloatVariableFromFile()"); + Cpy(ReadFloatVariableFromFile, "float ReadFloatVariableFromFile()"); Cpy(WriteFloatVariableToFile, "WriteFloatVariableToFile(float value)"); - Cpy(ReadIntVariableFromFile, "ReadIntVariableFromFile()"); + Cpy(ReadIntVariableFromFile, "int ReadIntVariableFromFile()"); Cpy(WriteIntVariableToFile, "WriteIntVariableToFile(int value)"); - Cpy(ReadStringVariableFromFile, "ReadStringVariableFromFile()"); + Cpy(ReadStringVariableFromFile, "string ReadStringVariableFromFile()"); Cpy(WriteStringVariableToFile, "WriteStringVariableToFile(string value)"); } @@ -759,6 +771,10 @@ void CScriptEditorAddFunction::OnLvnItemchangedListFunctions(NMHDR *pNMHDR, LRES { m_richFunctionName.SetWindowTextA(DeleteAllResources); } + else if (Cmp(szBuffer, "PlayResourceSound")) + { + m_richFunctionName.SetWindowTextA(PlayResourceSound); + } else if (Cmp(szBuffer, "PlayResourceSoundLoop")) { m_richFunctionName.SetWindowTextA(PlayResourceSoundLoop); @@ -896,6 +912,14 @@ void CScriptEditorAddFunction::OnLvnItemchangedListFunctions(NMHDR *pNMHDR, LRES { m_richFunctionName.SetWindowTextA(SetDepthOfFieldFocalRange); } + else if (Cmp(szBuffer, "GetDepthOfFieldFocalDistance")) + { + m_richFunctionName.SetWindowTextA(GetDepthOfFieldFocalDistance); + } + else if (Cmp(szBuffer, "GetDepthOfFieldFocalRange")) + { + m_richFunctionName.SetWindowTextA(GetDepthOfFieldFocalRange); + } else if (Cmp(szBuffer, "EnableFog")) { m_richFunctionName.SetWindowTextA(EnableFog); @@ -912,6 +936,14 @@ void CScriptEditorAddFunction::OnLvnItemchangedListFunctions(NMHDR *pNMHDR, LRES { m_richFunctionName.SetWindowTextA(SetFogDensity); } + else if (Cmp(szBuffer, "GetFogColor")) + { + m_richFunctionName.SetWindowTextA(GetFogColor); + } + else if (Cmp(szBuffer, "GetFogDensity")) + { + m_richFunctionName.SetWindowTextA(GetFogDensity); + } else if (Cmp(szBuffer, "EnableBloom")) { m_richFunctionName.SetWindowTextA(EnableBloom); @@ -928,6 +960,14 @@ void CScriptEditorAddFunction::OnLvnItemchangedListFunctions(NMHDR *pNMHDR, LRES { m_richFunctionName.SetWindowTextA(SetBloomIntensity); } + else if (Cmp(szBuffer, "GetBloomColor")) + { + m_richFunctionName.SetWindowTextA(GetBloomColor); + } + else if (Cmp(szBuffer, "GetBloomIntensity")) + { + m_richFunctionName.SetWindowTextA(GetBloomIntensity); + } else if (Cmp(szBuffer, "EnableDirectionalShadow")) { m_richFunctionName.SetWindowTextA(EnableDirectionalShadow); @@ -1076,6 +1116,10 @@ void CScriptEditorAddFunction::OnLvnItemchangedListFunctions(NMHDR *pNMHDR, LRES { m_richFunctionName.SetWindowTextA(SetDistanceBetweenPhysicsCameraAndCharacterController); } + else if (Cmp(szBuffer, "GetDistanceBetweenPhysicsCameraAndCharacterController")) + { + m_richFunctionName.SetWindowTextA(GetDistanceBetweenPhysicsCameraAndCharacterController); + } else if (Cmp(szBuffer, "SetCharacterControllerCapsuleRadius")) { m_richFunctionName.SetWindowTextA(SetCharacterControllerCapsuleRadius); @@ -2536,6 +2580,7 @@ BOOL CScriptEditorAddFunction::OnInitDialog() InsertItem("LoadResource"); InsertItem("DeleteResource"); InsertItem("DeleteAllResources"); + InsertItem("PlayResourceSound"); InsertItem("PlayResourceSoundLoop"); InsertItem("PlayResourceSoundOnce"); InsertItem("StopResourceSound"); @@ -2581,16 +2626,25 @@ BOOL CScriptEditorAddFunction::OnInitDialog() InsertItem("SetDepthOfFieldFocalDistance"); InsertItem("SetDepthOfFieldFocalRange"); + InsertItem("GetDepthOfFieldFocalDistance"); + InsertItem("GetDepthOfFieldFocalRange"); + InsertItem("EnableFog"); InsertItem("DisableFog"); InsertItem("SetFogColor"); InsertItem("SetFogDensity"); + InsertItem("GetFogColor"); + InsertItem("GetFogDensity"); + InsertItem("EnableBloom"); InsertItem("DisableBloom"); InsertItem("SetBloomColor"); InsertItem("SetBloomIntensity"); + InsertItem("GetBloomColor"); + InsertItem("GetBloomIntensity"); + InsertItem("EnableDirectionalShadow"); InsertItem("DisableDirectionalShadow"); InsertItem("SetDirectionalShadowAlgorithm"); @@ -2648,6 +2702,8 @@ BOOL CScriptEditorAddFunction::OnInitDialog() InsertItem("SetCharacterControllerPosition"); InsertItem("GetCharacterControllerPosition"); + InsertItem("GetDistanceBetweenPhysicsCameraAndCharacterController"); + InsertItem("SetMultisamplingValue"); InsertItem("SetAnisotropicFilteringValue"); InsertItem("EnableVSync"); diff --git a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h index 937265f2..c39738ef 100644 --- a/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h +++ b/Vanda Engine Editor/VandaEngineEditor/ScriptEditorAddFunction.h @@ -67,6 +67,7 @@ class CScriptEditorAddFunction : public CDialog CChar LoadResource[MAX_URI_SIZE]; CChar DeleteResource[MAX_URI_SIZE]; CChar DeleteAllResources[MAX_URI_SIZE]; + CChar PlayResourceSound[MAX_URI_SIZE]; CChar PlayResourceSoundLoop[MAX_URI_SIZE]; CChar PlayResourceSoundOnce[MAX_URI_SIZE]; CChar StopResourceSound[MAX_URI_SIZE]; @@ -113,16 +114,25 @@ class CScriptEditorAddFunction : public CDialog CChar SetDepthOfFieldFocalDistance[MAX_URI_SIZE]; CChar SetDepthOfFieldFocalRange[MAX_URI_SIZE]; + CChar GetDepthOfFieldFocalDistance[MAX_URI_SIZE]; + CChar GetDepthOfFieldFocalRange[MAX_URI_SIZE]; + CChar EnableFog[MAX_URI_SIZE]; CChar DisableFog[MAX_URI_SIZE]; CChar SetFogColor[MAX_URI_SIZE]; CChar SetFogDensity[MAX_URI_SIZE]; + CChar GetFogColor[MAX_URI_SIZE]; + CChar GetFogDensity[MAX_URI_SIZE]; + CChar EnableBloom[MAX_URI_SIZE]; CChar DisableBloom[MAX_URI_SIZE]; CChar SetBloomColor[MAX_URI_SIZE]; CChar SetBloomIntensity[MAX_URI_SIZE]; + CChar GetBloomColor[MAX_URI_SIZE]; + CChar GetBloomIntensity[MAX_URI_SIZE]; + CChar EnableDirectionalShadow[MAX_URI_SIZE]; CChar DisableDirectionalShadow[MAX_URI_SIZE]; CChar SetDirectionalShadowAlgorithm[MAX_URI_SIZE]; @@ -180,6 +190,8 @@ class CScriptEditorAddFunction : public CDialog CChar SetCharacterControllerPosition[MAX_URI_SIZE]; CChar GetCharacterControllerPosition[MAX_URI_SIZE]; + CChar GetDistanceBetweenPhysicsCameraAndCharacterController[MAX_URI_SIZE]; + CChar SetMultisamplingValue[MAX_URI_SIZE]; CChar SetAnisotropicFilteringValue[MAX_URI_SIZE]; CChar EnableVSync[MAX_URI_SIZE]; diff --git a/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h b/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h index 6f9ed87b..f377ec21 100644 --- a/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h +++ b/Vanda Engine Editor/VandaEngineEditor/ScriptEngine/LuaForCpp.h @@ -118,6 +118,7 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "LoadResource", LoadResource); lua_register(L, "DeleteResource", DeleteResource); + lua_register(L, "PlayResourceSound", PlayResourceSound); lua_register(L, "DeleteAllResources", DeleteAllResources); lua_register(L, "PlayResourceSoundLoop", PlayResourceSoundLoop); lua_register(L, "PlayResourceSoundOnce", PlayResourceSoundOnce); @@ -163,16 +164,25 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "SetDepthOfFieldFocalDistance", SetDepthOfFieldFocalDistance); lua_register(L, "SetDepthOfFieldFocalRange", SetDepthOfFieldFocalRange); + lua_register(L, "GetDepthOfFieldFocalDistance", GetDepthOfFieldFocalDistance); + lua_register(L, "GetDepthOfFieldFocalRange", GetDepthOfFieldFocalRange); + lua_register(L, "EnableFog", EnableFog); lua_register(L, "DisableFog", DisableFog); lua_register(L, "SetFogColor", SetFogColor); lua_register(L, "SetFogDensity", SetFogDensity); + lua_register(L, "GetFogColor", GetFogColor); + lua_register(L, "GetFogDensity", GetFogDensity); + lua_register(L, "EnableBloom", EnableBloom); lua_register(L, "DisableBloom", DisableBloom); lua_register(L, "SetBloomColor", SetBloomColor); lua_register(L, "SetBloomIntensity", SetBloomIntensity); + lua_register(L, "GetBloomColor", GetBloomColor); + lua_register(L, "GetBloomIntensity", GetBloomIntensity); + lua_register(L, "EnableDirectionalShadow", EnableDirectionalShadow); lua_register(L, "DisableDirectionalShadow", DisableDirectionalShadow); lua_register(L, "SetDirectionalShadowAlgorithm", SetDirectionalShadowAlgorithm); @@ -230,6 +240,8 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "SetCharacterControllerPosition", SetCharacterControllerPosition); lua_register(L, "GetCharacterControllerPosition", GetCharacterControllerPosition); + lua_register(L, "GetDistanceBetweenPhysicsCameraAndCharacterController", GetDistanceBetweenPhysicsCameraAndCharacterController); + lua_register(L, "SetMultisamplingValue", SetMultisamplingValue); lua_register(L, "SetAnisotropicFilteringValue", SetAnisotropicFilteringValue); lua_register(L, "EnableVSync", EnableVSync); diff --git a/Vanda Engine Editor/VandaEngineEditor/SetCurrentProject.cpp b/Vanda Engine Editor/VandaEngineEditor/SetCurrentProject.cpp index fea9c50b..12521d84 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.2 (", szBuffer, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", szBuffer, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); //save the changes to projects.dat FILE *ProjectsFilePtr; diff --git a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.aps b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.aps index 9f5b5950..9ad9de02 100644 Binary files a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.aps and b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.aps differ diff --git a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc index 57cfc2a5..8e867ed4 100644 --- a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc +++ b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditor.rc @@ -2146,7 +2146,9 @@ BEGIN END POPUP "HELP" BEGIN - MENUITEM "Script Reference Manual", ID_HELP_SCRIPT_REFERENCE_MANUAL + MENUITEM "Script Reference Manual (CHM)", ID_HELP_SCRIPT_REFERENCE_MANUAL_CHM + MENUITEM "Script Reference Manual (PDF)", ID_HELP_SCRIPT_REFERENCE_MANUAL_PDF + MENUITEM "Online Help", ID_HELP_ONLINEHELP END END @@ -2892,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.2",IDC_STATIC,7,33,60,8 + LTEXT "Version 2.9.3",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 @@ -3052,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.2",IDC_STATIC,103,7,123,8,SS_NOPREFIX + LTEXT "VandaEngine Version 2.9.3",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 @@ -3504,7 +3506,9 @@ BEGIN BEGIN POPUP "Reference Manual" BEGIN - MENUITEM "Scripting", ID_REFERENCEMANUAL_SCRIPTING + MENUITEM "Scripting (CHM)", ID_REFERENCEMANUAL_SCRIPTING_CHM + MENUITEM "Scripting (PDF)", ID_REFERENCEMANUAL_SCRIPTING_PDF + MENUITEM "Online", ID_REFERENCEMANUAL_ONLINE END MENUITEM "About ", ID_HELP_ABOUT END @@ -3627,12 +3631,12 @@ BEGIN BEGIN VALUE "CompanyName", "Ehsan Kamrani " VALUE "FileDescription", "Vanda Engine" - VALUE "FileVersion", "2.9.2" + VALUE "FileVersion", "2.9.3" VALUE "internalName", "VandaEngine.exe" VALUE "LegalCopyright", "(c) 2015 Ehsan Kamrani . All rights reserved." VALUE "OriginalFilename", "VandaEngine.exe" VALUE "ProductName", " Vanda Engine" - VALUE "ProductVersion", "2.9.2" + VALUE "ProductVersion", "2.9.3" END END BLOCK "VarFileInfo" diff --git a/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditorDlg.cpp b/Vanda Engine Editor/VandaEngineEditor/VandaEngineEditorDlg.cpp index e2571049..27fadc50 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 = 292; +CInt g_version = 293; 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.2")); + SetWindowText(_T("Vanda Engine 2.9.3")); // 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.2 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", 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.2 initialized successfully" ); + PrintInfo( "\nVersion 2.9.3 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.2 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", 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.2 : Prefab Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.3 : 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.2 : GUI Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.3 : GUI Mode (Untitled)"); ex_pVandaEngineDlg->SetWindowTextA(temp); if (g_multipleView->IsPlayGameMode()) @@ -6915,11 +6915,21 @@ BOOL CVandaEngineDlg::OnCommand(WPARAM wParam, LPARAM lParam) g_multipleView->RenderWindow(); } - else if( wParam == ID_REFERENCEMANUAL_SCRIPTING) + else if( wParam == ID_REFERENCEMANUAL_SCRIPTING_CHM) { ShellExecute(NULL, "open", "Assets\\Docs\\VandaEngineScriptingReferenceManual.chm", NULL, NULL, SW_SHOWNORMAL); g_multipleView->SetElapsedTimeFromBeginning(); } + else if (wParam == ID_REFERENCEMANUAL_SCRIPTING_PDF) + { + ShellExecute(NULL, "open", "Assets\\Docs\\VandaEngineScriptingReferenceManual.pdf", NULL, NULL, SW_SHOWNORMAL); + g_multipleView->SetElapsedTimeFromBeginning(); + } + else if (wParam == ID_REFERENCEMANUAL_ONLINE) + { + ShellExecute(NULL, "open", "https://vanda3d.org/scripting-reference-manual/", NULL, NULL, SW_SHOWNORMAL); + } + else if( wParam == ID_HELP_ABOUT ) { if( g_multipleView->m_enableTimer ) @@ -7806,7 +7816,7 @@ CBool CVandaEngineDlg::OnMenuClickedNew( CBool askQuestion ) PrintInfo("\nScene cleared successfully"); CChar temp[256]; - sprintf(temp, "%s", "Vanda Engine 2.9.2 : GUI Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.3 : GUI Mode (Untitled)"); ex_pVandaEngineDlg->SetWindowTextA(temp); return CTrue; @@ -8254,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.2 (", g_projects[i]->m_name, " - ", "Untitled", ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", g_projects[i]->m_name, " - ", "Untitled", ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; } @@ -8263,7 +8273,7 @@ CBool CVandaEngineDlg::OnMenuClickedNew( CBool askQuestion ) else if (g_editorMode == eMODE_PREFAB) { CChar temp[256]; - sprintf(temp, "%s", "Vanda Engine 2.9.2 : Prefab Mode (Untitled)"); + sprintf(temp, "%s", "Vanda Engine 2.9.3 : Prefab Mode (Untitled)"); ex_pVandaEngineDlg->SetWindowTextA(temp); } @@ -10017,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.2 : GUI Mode (", g_currentPackageAndGUIName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.3 : GUI Mode (", g_currentPackageAndGUIName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); if (m_dlgSaveGUIs) @@ -10859,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.2 : Prefab Mode (", g_currentPackageAndPrefabName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.3 : Prefab Mode (", g_currentPackageAndPrefabName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); if (m_dlgSavePrefabs) @@ -14184,7 +14194,7 @@ CVoid CVandaEngineDlg::OnMenuClickedSaveAs(CBool askQuestion) } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.2 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; @@ -15371,7 +15381,7 @@ CBool CVandaEngineDlg::OnMenuClickedOpenGUI() ReleaseCapture(); CChar temp[256]; - sprintf(temp, "%s%s%s", "Vanda Engine 2.9.2 : GUI Mode (", guiAndPackageName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.3 : GUI Mode (", guiAndPackageName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); } @@ -17141,7 +17151,7 @@ CBool CVandaEngineDlg::OnMenuClickedOpenPrefab() } g_updateOctree = CTrue; CChar temp[256]; - sprintf(temp, "%s%s%s", "Vanda Engine 2.9.2 : Prefab Mode (", prefabAndPackageName, ")"); + sprintf(temp, "%s%s%s", "Vanda Engine 2.9.3 : Prefab Mode (", prefabAndPackageName, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); fclose(filePtr); @@ -19184,7 +19194,7 @@ CBool CVandaEngineDlg::OnMenuClickedOpenVScene(CBool askQuestion) } CChar temp[256]; - sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.2 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); + sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.9.3 (", g_projects[i]->m_name, " - ", m_currentVSceneNameWithoutDot, ")"); ex_pVandaEngineDlg->SetWindowTextA(temp); break; diff --git a/Vanda Engine Editor/VandaEngineEditor/resource.h b/Vanda Engine Editor/VandaEngineEditor/resource.h index a4864263..d8d46116 100644 --- a/Vanda Engine Editor/VandaEngineEditor/resource.h +++ b/Vanda Engine Editor/VandaEngineEditor/resource.h @@ -1413,13 +1413,22 @@ #define ID_SHOWALLICONS 33128 #define ID_ICONS_SHOWALLICONS 33129 #define ID_REFERENCEMANUAL_SCRIPTING 33130 +#define ID_REFERENCEMANUAL_SCRIPTING33131 33131 +#define ID_REFERENCEMANUAL_SCRIPTING_CHM 33132 +#define ID_REFERENCEMANUAL_SCRIPTING_PDF 33133 +#define ID_HELP_SCRIPTREFERENCEMANUAL 33134 +#define ID_HELP_ONLINEHELP33135 33135 +#define ID_HELP_SCRIPT_REFERENCE_MANUAL_CHM 33136 +#define ID_HELP_SCRIPTREFERENCEMANUAL_PDF 33137 +#define ID_REFERENCEMANUAL_ONLINE 33138 +#define ID_HELP_SCRIPT_REFERENCE_MANUAL_PDF 33139 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 552 -#define _APS_NEXT_COMMAND_VALUE 33131 +#define _APS_NEXT_COMMAND_VALUE 33140 #define _APS_NEXT_CONTROL_VALUE 1335 #define _APS_NEXT_SYMED_VALUE 101 #endif diff --git a/Vanda Engine Editor/VandaEngineEditor/stdafx.h b/Vanda Engine Editor/VandaEngineEditor/stdafx.h index a4650994..64b921ea 100644 --- a/Vanda Engine Editor/VandaEngineEditor/stdafx.h +++ b/Vanda Engine Editor/VandaEngineEditor/stdafx.h @@ -151,6 +151,7 @@ CInt GetPhysicsCameraYaw(lua_State *L); CInt LoadResource(lua_State *L); CInt DeleteResource(lua_State *L); CInt DeleteAllResources(lua_State *L); +CInt PlayResourceSound(lua_State* L); CInt PlayResourceSoundLoop(lua_State *L); CInt PlayResourceSoundOnce(lua_State *L); CInt StopResourceSound(lua_State *L); @@ -194,16 +195,25 @@ CInt DisableDepthOfField(lua_State* L); CInt SetDepthOfFieldFocalDistance(lua_State* L); CInt SetDepthOfFieldFocalRange(lua_State* L); +CInt GetDepthOfFieldFocalDistance(lua_State* L); +CInt GetDepthOfFieldFocalRange(lua_State* L); + CInt EnableFog(lua_State* L); CInt DisableFog(lua_State* L); CInt SetFogColor(lua_State* L); CInt SetFogDensity(lua_State* L); +CInt GetFogColor(lua_State* L); +CInt GetFogDensity(lua_State* L); + CInt EnableBloom(lua_State* L); CInt DisableBloom(lua_State* L); CInt SetBloomColor(lua_State* L); CInt SetBloomIntensity(lua_State* L); +CInt GetBloomColor(lua_State* L); +CInt GetBloomIntensity(lua_State* L); + CInt EnableDirectionalShadow(lua_State* L); CInt DisableDirectionalShadow(lua_State* L); CInt SetDirectionalShadowAlgorithm(lua_State* L); @@ -261,6 +271,8 @@ CInt DisablePhysicsDebugMode(lua_State* L); CInt SetCharacterControllerPosition(lua_State* L); CInt GetCharacterControllerPosition(lua_State* L); +CInt GetDistanceBetweenPhysicsCameraAndCharacterController(lua_State* L); + CInt SetMultisamplingValue(lua_State* L); CInt SetAnisotropicFilteringValue(lua_State* L); CInt EnableVSync(lua_State* L); diff --git a/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.chm b/Vanda Engine Editor/release/Assets/Docs/VandaEngineScriptingReferenceManual.chm index 76b219e2..0f762475 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 new file mode 100644 index 00000000..6e080470 Binary files /dev/null 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 fc9deffe..10cd9a1f 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 d6b31df6..b3e032b6 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 3ae7ced7..b3d7cf51 100644 --- a/Vanda Engine Editor/release/Readme.txt +++ b/Vanda Engine Editor/release/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.2 +Vanda Engine 2.9.3 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org diff --git a/Vanda Engine Editor/release/VandaEngineEditor.exp b/Vanda Engine Editor/release/VandaEngineEditor.exp new file mode 100644 index 00000000..10f161ae Binary files /dev/null and b/Vanda Engine Editor/release/VandaEngineEditor.exp differ diff --git a/Vanda Engine Editor/release/VandaEngineEditor.lib b/Vanda Engine Editor/release/VandaEngineEditor.lib new file mode 100644 index 00000000..22b8bb69 Binary files /dev/null and b/Vanda Engine Editor/release/VandaEngineEditor.lib differ diff --git a/Vanda Engine Win32/Debug/Readme.txt b/Vanda Engine Win32/Debug/Readme.txt index 3ae7ced7..b3d7cf51 100644 --- a/Vanda Engine Win32/Debug/Readme.txt +++ b/Vanda Engine Win32/Debug/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.2 +Vanda Engine 2.9.3 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org diff --git a/Vanda Engine Win32/Debug/VandaEngineWin32.exp b/Vanda Engine Win32/Debug/VandaEngineWin32.exp new file mode 100644 index 00000000..bbcc4d5e Binary files /dev/null and b/Vanda Engine Win32/Debug/VandaEngineWin32.exp differ diff --git a/Vanda Engine Win32/Debug/VandaEngineWin32.lib b/Vanda Engine Win32/Debug/VandaEngineWin32.lib new file mode 100644 index 00000000..9cd538db Binary files /dev/null and b/Vanda Engine Win32/Debug/VandaEngineWin32.lib differ diff --git a/Vanda Engine Win32/VandaEngineWin32/GraphicsEngine/Scene.cpp b/Vanda Engine Win32/VandaEngineWin32/GraphicsEngine/Scene.cpp index 8827c97e..655ec7fb 100644 --- a/Vanda Engine Win32/VandaEngineWin32/GraphicsEngine/Scene.cpp +++ b/Vanda Engine Win32/VandaEngineWin32/GraphicsEngine/Scene.cpp @@ -1227,6 +1227,9 @@ CBool CScene::ExecuteNonCyclicAnimation(CInt id, CFloat delayIn, CFloat delayOut if( weight < EPSILON ) return CFalse; if( weight > 1.0f ) weight = 1.0f; + if (delayIn < 0.0) delayIn = 0.0; + if (delayOut < 0.0) delayOut = 0.0; + if( delayIn + delayOut > m_animationClips[id]->GetDuration() ) { //CChar temp[MAX_NAME_SIZE]; diff --git a/Vanda Engine Win32/VandaEngineWin32/Main.cpp b/Vanda Engine Win32/VandaEngineWin32/Main.cpp index 4281993e..25092c26 100644 --- a/Vanda Engine Win32/VandaEngineWin32/Main.cpp +++ b/Vanda Engine Win32/VandaEngineWin32/Main.cpp @@ -2360,6 +2360,52 @@ CInt DeleteAllResources(lua_State* L) return 0; } +CInt PlayResourceSound(lua_State* L) +{ + int argc = lua_gettop(L); + if (argc < 1) + { + //PrintInfo("\nPlease specify at least 1 argument for PlayResourceSound()", COLOR_RED); + return 0; + } + + for (int n = 1; n <= argc; ++n) + { + CChar luaToString[MAX_NAME_SIZE]; + Cpy(luaToString, lua_tostring(L, n)); + StringToUpper(luaToString); //package name + + CBool foundTarget = CFalse; + for (CUInt i = 0; i < g_resourceFiles.size(); i++) + { + if (g_resourceFiles[i]->GetSoundSource()) + { + CChar string[MAX_NAME_SIZE]; + Cpy(string, g_resourceFiles[i]->GetSoundSource()->GetName()); + StringToUpper(string); //package name + + if (Cmp(string, luaToString)) + { + g_soundSystem->PlayALSound(*(g_resourceFiles[i]->GetSoundSource()->GetSoundSource())); + //CChar temp[MAX_NAME_SIZE]; + //sprintf(temp, "%s%s%s", "\nSound '", g_resourceFiles[i]->GetSoundSource()->GetName(), "' was played."); + //PrintInfo(temp, COLOR_GREEN); + foundTarget = CTrue; + break; + } + } + } + if (!foundTarget) + { + //CChar temp[MAX_NAME_SIZE]; + //sprintf(temp, "%s%s%s", "\nPlayResourceSound() Error: Couldn't find the sound '", lua_tostring(L, n), "' to be played."); + //PrintInfo(temp, COLOR_RED); + } + } + + return 0; +} + CInt PlayResourceSoundLoop(lua_State *L) { int argc = lua_gettop(L); @@ -2623,6 +2669,13 @@ CInt ShowCursorIcon(lua_State *L) return 0; } + CFloat size = (CFloat)lua_tonumber(L, 2); + if (size <= 0.0) + { + //PrintInfo("\nShowCursorIcon() Error: cursor size must be greater than 0.0", COLOR_RED); + return 0; + } + CChar luaToString[MAX_NAME_SIZE]; Cpy(luaToString, lua_tostring(L, 1)); StringToUpper(luaToString); //package name @@ -3755,6 +3808,14 @@ CInt SetSelectionDistance(lua_State *L) //PrintInfo("\nPlease specify 1 argument for SetSelectionDistance()", COLOR_RED); return 0; } + + CFloat distance = CFloat(lua_tonumber(L, 1)); + if (distance <= 0.0) + { + //PrintInfo("\nSetSelectionDistance() Error: distance must be greater than 0.0", COLOR_RED); + return 0; + } + g_main->SetSelectionDistance(CFloat(lua_tonumber(L, 1))); return 0; } @@ -4451,9 +4512,9 @@ CInt SetDepthOfFieldFocalDistance(lua_State* L) } CFloat value = (CFloat)lua_tonumber(L, 1); - if (value <= 0.0f) + if (value < 0.0f) { - //PrintInfo("\nPlease specify a positive value for SetDepthOfFieldFocalDistance()", COLOR_RED); + //PrintInfo("\nSetDepthOfFieldFocalDistance() Error: distance must be equal to or greater than 0.0", COLOR_RED); return 0; } @@ -4475,9 +4536,9 @@ CInt SetDepthOfFieldFocalRange(lua_State* L) } CFloat value = (CFloat)lua_tonumber(L, 1); - if (value <= 0.0f) + if (value < 0.0f) { - //PrintInfo("\nPlease specify a positive value for SetDepthOfFieldFocalRange()", COLOR_RED); + //PrintInfo("\nSetDepthOfFieldFocalRange() Error: range must be equal to or greater than 0.0", COLOR_RED); return 0; } @@ -4486,6 +4547,25 @@ CInt SetDepthOfFieldFocalRange(lua_State* L) return 0; } +CInt GetDepthOfFieldFocalDistance(lua_State* L) +{ + CFloat focalDistance = g_dofProperties.m_dofFocalDistance; + + lua_pushnumber(L, focalDistance); + + return 1; +} + +CInt GetDepthOfFieldFocalRange(lua_State* L) +{ + CFloat focalRange = g_dofProperties.m_dofFocalRange; + + lua_pushnumber(L, focalRange); + + return 1; +} + + //fog CInt EnableFog(lua_State* L) { @@ -4566,6 +4646,28 @@ CInt SetFogDensity(lua_State* L) return 0; } +CInt GetFogColor(lua_State* L) +{ + CFloat r = g_fogProperties.m_fogColor[0]; + CFloat g = g_fogProperties.m_fogColor[1]; + CFloat b = g_fogProperties.m_fogColor[2]; + + lua_pushnumber(L, r); + lua_pushnumber(L, g); + lua_pushnumber(L, b); + + return 3; +} + +CInt GetFogDensity(lua_State* L) +{ + CFloat density = g_fogProperties.m_fogDensity; + + lua_pushnumber(L, density); + + return 1; +} + //bloom CInt EnableBloom(lua_State* L) { @@ -4638,6 +4740,28 @@ CInt SetBloomIntensity(lua_State* L) return 0; } +CInt GetBloomColor(lua_State* L) +{ + CFloat r = g_bloomProperties.m_bloomColor[0]; + CFloat g = g_bloomProperties.m_bloomColor[1]; + CFloat b = g_bloomProperties.m_bloomColor[2]; + + lua_pushnumber(L, r); + lua_pushnumber(L, g); + lua_pushnumber(L, b); + + return 3; +} + +CInt GetBloomIntensity(lua_State* L) +{ + CFloat intensity = g_bloomProperties.m_bloomIntensity; + + lua_pushnumber(L, intensity); + + return 1; +} + //shadow CInt EnableDirectionalShadow(lua_State* L) { @@ -5240,6 +5364,12 @@ CInt SetLightShininess(lua_State* L) CFloat shininess = (CFloat)lua_tonumber(L, 2); + if (shininess < 0.0) + { + //PrintInfo("\nSetLightShininess() Error: shininess must be equal to or greater than 0.0", COLOR_RED); + return 0; + } + if (Cmp(luaToString, "THIS")) { if (g_currentLight) @@ -6617,7 +6747,7 @@ CInt SetDistanceBetweenPhysicsCameraAndCharacterController(lua_State* L) CFloat value = (CFloat)lua_tonumber(L, 1); - if (value < 0.0f) + if (value <= 0.0f) { //PrintInfo("\nSetDistanceBetweenPhysicsCameraAndCharacterController() Error: argument must be greater than 0", COLOR_RED); return 0; @@ -6648,7 +6778,7 @@ CInt SetCharacterControllerCapsuleRadius(lua_State* L) CFloat value = (CFloat)lua_tonumber(L, 1); - if (value < 0.0f) + if (value <= 0.0f) { //PrintInfo("\nSetCharacterControllerCapsuleRadius() Error: argument must be greater than 0", COLOR_RED); return 0; @@ -6679,7 +6809,7 @@ CInt SetCharacterControllerCapsuleHeight(lua_State* L) CFloat value = (CFloat)lua_tonumber(L, 1); - if (value < 0.0f) + if (value <= 0.0f) { //PrintInfo("\nSetCharacterControllerCapsuleHeight() Error: argument must be greater than 0", COLOR_RED); return 0; @@ -6809,7 +6939,7 @@ CInt SetCharacterControllerStepOffset(lua_State* L) if (value < 0.0f) { - //PrintInfo("\nSetCharacterControllerStepOffset() Error: argument must be greater than 0", COLOR_RED); + //PrintInfo("\nSetCharacterControllerStepOffset() Error: argument must be equal to or greater than 0.0", COLOR_RED); return 0; } @@ -6964,6 +7094,15 @@ CInt GetCharacterControllerPosition(lua_State* L) return 3; } +CInt GetDistanceBetweenPhysicsCameraAndCharacterController(lua_State* L) +{ + CFloat distance = g_physXProperties.m_fCameraCharacterDistance; + + lua_pushnumber(L, distance); + + return 1; +} + CInt SetMultisamplingValue(lua_State* L) { //if (g_testScript) @@ -18163,6 +18302,13 @@ CInt ShowMenuCursor(lua_State* L) { CInt size; size = lua_tointeger(L, 1); + + if (size <= 0) + { + //PrintInfo("\nShowMenuCursor() Error: cursor size must be greater than 0", COLOR_RED); + return 0; + } + g_currentVSceneProperties.m_menuCursorSize = size; } @@ -20273,6 +20419,12 @@ CInt SetEngineCameraNearClipPlane(lua_State* L) CFloat ncp = (CFloat)lua_tonumber(L, 2); + if (ncp <= 0.0) + { + //PrintInfo("\nSetEngineCameraNearClipPlane() Error: near clip plane must be greater than 0.0", COLOR_RED); + return 0; + } + if (Cmp(luaToString, "THIS")) { if (g_currentEngineCamera) @@ -20318,6 +20470,12 @@ CInt SetEngineCameraFarClipPlane(lua_State* L) CFloat fcp = (CFloat)lua_tonumber(L, 2); + if (fcp <= 0.0) + { + //PrintInfo("\nSetEngineCameraFarClipPlane() Error: far clip plane must be greater than 0.0", COLOR_RED); + return 0; + } + if (Cmp(luaToString, "THIS")) { if (g_currentEngineCamera) diff --git a/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h b/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h index 19565ab4..fd098e6c 100644 --- a/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h +++ b/Vanda Engine Win32/VandaEngineWin32/ScriptEngine/LuaForCpp.h @@ -109,6 +109,7 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "LoadResource", LoadResource); lua_register(L, "DeleteResource", DeleteResource); lua_register(L, "DeleteAllResources", DeleteAllResources); + lua_register(L, "PlayResourceSound", PlayResourceSound); lua_register(L, "PlayResourceSoundLoop", PlayResourceSoundLoop); lua_register(L, "PlayResourceSoundOnce", PlayResourceSoundOnce); lua_register(L, "StopResourceSound", StopResourceSound); @@ -152,16 +153,25 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "SetDepthOfFieldFocalDistance", SetDepthOfFieldFocalDistance); lua_register(L, "SetDepthOfFieldFocalRange", SetDepthOfFieldFocalRange); + lua_register(L, "GetDepthOfFieldFocalDistance", GetDepthOfFieldFocalDistance); + lua_register(L, "GetDepthOfFieldFocalRange", GetDepthOfFieldFocalRange); + lua_register(L, "EnableFog", EnableFog); lua_register(L, "DisableFog", DisableFog); lua_register(L, "SetFogColor", SetFogColor); lua_register(L, "SetFogDensity", SetFogDensity); + lua_register(L, "GetFogColor", GetFogColor); + lua_register(L, "GetFogDensity", GetFogDensity); + lua_register(L, "EnableBloom", EnableBloom); lua_register(L, "DisableBloom", DisableBloom); lua_register(L, "SetBloomColor", SetBloomColor); lua_register(L, "SetBloomIntensity", SetBloomIntensity); + lua_register(L, "GetBloomColor", GetBloomColor); + lua_register(L, "GetBloomIntensity", GetBloomIntensity); + lua_register(L, "EnableDirectionalShadow", EnableDirectionalShadow); lua_register(L, "DisableDirectionalShadow", DisableDirectionalShadow); lua_register(L, "SetDirectionalShadowAlgorithm", SetDirectionalShadowAlgorithm); @@ -219,6 +229,8 @@ static void LuaRegisterFunctions(lua_State* L) lua_register(L, "SetCharacterControllerPosition", SetCharacterControllerPosition); lua_register(L, "GetCharacterControllerPosition", GetCharacterControllerPosition); + lua_register(L, "GetDistanceBetweenPhysicsCameraAndCharacterController", GetDistanceBetweenPhysicsCameraAndCharacterController); + lua_register(L, "SetMultisamplingValue", SetMultisamplingValue); lua_register(L, "SetAnisotropicFilteringValue", SetAnisotropicFilteringValue); lua_register(L, "EnableVSync", EnableVSync); diff --git a/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.cpp b/Vanda Engine Win32/VandaEngineWin32/VandaEngineWin32.cpp index 5d8456dc..1cdf5515 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 = 292; +CInt g_version = 293; 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 11540b2f..1ea34615 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.2" + VALUE "FileVersion", "2.9.3" 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.2" + VALUE "ProductVersion", "2.9.3" 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.2",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "VandaEngine Version 2.9.3",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 c1c002dd..6e514d9d 100644 --- a/Vanda Engine Win32/VandaEngineWin32/stdafx.h +++ b/Vanda Engine Win32/VandaEngineWin32/stdafx.h @@ -107,6 +107,7 @@ CInt GetPhysicsCameraYaw(lua_State *L); CInt LoadResource(lua_State *L); CInt DeleteResource(lua_State *L); CInt DeleteAllResources(lua_State *L); +CInt PlayResourceSound(lua_State* L); CInt PlayResourceSoundLoop(lua_State *L); CInt PlayResourceSoundOnce(lua_State *L); CInt StopResourceSound(lua_State *L); @@ -150,16 +151,25 @@ CInt DisableDepthOfField(lua_State* L); CInt SetDepthOfFieldFocalDistance(lua_State* L); CInt SetDepthOfFieldFocalRange(lua_State* L); +CInt GetDepthOfFieldFocalDistance(lua_State* L); +CInt GetDepthOfFieldFocalRange(lua_State* L); + CInt EnableFog(lua_State* L); CInt DisableFog(lua_State* L); CInt SetFogColor(lua_State* L); CInt SetFogDensity(lua_State* L); +CInt GetFogColor(lua_State* L); +CInt GetFogDensity(lua_State* L); + CInt EnableBloom(lua_State* L); CInt DisableBloom(lua_State* L); CInt SetBloomColor(lua_State* L); CInt SetBloomIntensity(lua_State* L); +CInt GetBloomColor(lua_State* L); +CInt GetBloomIntensity(lua_State* L); + CInt EnableDirectionalShadow(lua_State* L); CInt DisableDirectionalShadow(lua_State* L); CInt SetDirectionalShadowAlgorithm(lua_State* L); @@ -217,6 +227,8 @@ CInt DisablePhysicsDebugMode(lua_State* L); CInt SetCharacterControllerPosition(lua_State* L); CInt GetCharacterControllerPosition(lua_State* L); +CInt GetDistanceBetweenPhysicsCameraAndCharacterController(lua_State* L); + CInt SetMultisamplingValue(lua_State* L); CInt SetAnisotropicFilteringValue(lua_State* L); CInt EnableVSync(lua_State* L); diff --git a/Vanda Engine Win32/release/Readme.txt b/Vanda Engine Win32/release/Readme.txt index 3ae7ced7..b3d7cf51 100644 --- a/Vanda Engine Win32/release/Readme.txt +++ b/Vanda Engine Win32/release/Readme.txt @@ -1,4 +1,4 @@ -Vanda Engine 2.9.2 +Vanda Engine 2.9.3 Copyright (C) 2023 Ehsan Kamrani www.vanda3d.org diff --git a/Vanda Engine Win32/release/VandaEngineWin32.exp b/Vanda Engine Win32/release/VandaEngineWin32.exp new file mode 100644 index 00000000..51d8cde2 Binary files /dev/null and b/Vanda Engine Win32/release/VandaEngineWin32.exp differ diff --git a/Vanda Engine Win32/release/VandaEngineWin32.lib b/Vanda Engine Win32/release/VandaEngineWin32.lib new file mode 100644 index 00000000..389022d6 Binary files /dev/null and b/Vanda Engine Win32/release/VandaEngineWin32.lib differ