Skip to content

Commit

Permalink
2.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsankamrani committed Jun 11, 2023
1 parent 847ef4b commit 906f0c7
Show file tree
Hide file tree
Showing 49 changed files with 1,099 additions and 360 deletions.
Binary file not shown.
Binary file modified Vanda Engine Editor/Debug/Assets/Engine/Publish/publish.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Vanda Engine Editor/Debug/Readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Vanda Engine 2.4.5
Vanda Engine 2.4.6
Copyright (C) 2023 Ehsan Kamrani

www.vanda3d.org
Expand Down
14 changes: 14 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/Add3DSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,20 @@ void CAdd3DSound::OnOK()
MessageBox( "Please Fill In All Of The Required Fields", "Vanda Engine Error", MB_OK | MB_ICONERROR );
return;
}

if (!m_str3DSoundName.IsEmpty())
{
CChar name[MAX_NAME_SIZE];
Cpy(name, (LPCSTR)m_str3DSoundName);
StringToUpper(name);

if (Cmp(name, "THIS"))
{
MessageBox("'this' is a reserved name. Please select another name!", "Vanda Engine Error", MB_OK | MB_ICONERROR);
return;
}
}

if (m_f3DSoundVolume > 1.0f || m_f3DSoundVolume < 0.0f)
{
MessageBox("Volume must be in [0,1] range", "Vanda Engine Error", MB_OK | MB_ICONERROR);
Expand Down
14 changes: 14 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/AddAmbientSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ void CAddAmbientSound::OnOK()
MessageBox("Please Fill In All Of The Required Fields", "Vanda Engine Error", MB_OK | MB_ICONERROR);
return;
}

if (!m_strAmbientSoundName.IsEmpty())
{
CChar name[MAX_NAME_SIZE];
Cpy(name, (LPCSTR)m_strAmbientSoundName);
StringToUpper(name);

if (Cmp(name, "THIS"))
{
MessageBox("'this' is a reserved name. Please select another name!", "Vanda Engine Error", MB_OK | MB_ICONERROR);
return;
}
}

if (m_volume > 1.0f || m_volume < 0.0f)
{
MessageBox("Volume must be in [0,1] range", "Vanda Engine Error", MB_OK | MB_ICONERROR);
Expand Down
13 changes: 13 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/AddEngineCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,19 @@ void CAddEngineCamera::OnBnClickedOk()
}
}

if (!m_strName.IsEmpty())
{
CChar name[MAX_NAME_SIZE];
Cpy(name, (LPCSTR)m_strName);
StringToUpper(name);

if (Cmp(name, "THIS"))
{
MessageBox("'this' is a reserved name. Please select another name!", "Vanda Engine Error", MB_OK | MB_ICONERROR);
return;
}
}

CDialog::OnOK();
}

Expand Down
13 changes: 13 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/AddVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,19 @@ void CAddVideo::OnOK()
}
}

if (!m_strVideoName.IsEmpty())
{
CChar name[MAX_NAME_SIZE];
Cpy(name, (LPCSTR)m_strVideoName);
StringToUpper(name);

if (Cmp(name, "THIS"))
{
MessageBox("'this' is a reserved name. Please select another name!", "Vanda Engine Error", MB_OK | MB_ICONERROR);
return;
}
}

CInt checkState;
checkState = m_checkExitWithEscKey.GetCheck();
if (checkState == BST_CHECKED)
Expand Down
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/AudioEngine/3DSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ CVoid C3DSound::InitScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = this;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Init");
if (lua_isfunction(m_lua, -1))
Expand All @@ -192,6 +196,10 @@ CVoid C3DSound::UpdateScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = this;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Update");
if (lua_isfunction(m_lua, -1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ CVoid CAmbientSound::InitScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = this;

lua_getglobal(m_lua, "Init");
if (lua_isfunction(m_lua, -1))
Expand All @@ -151,6 +155,10 @@ CVoid CAmbientSound::UpdateScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = this;

lua_getglobal(m_lua, "Update");
if (lua_isfunction(m_lua, -1))
Expand Down
24 changes: 24 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/Common/Prefab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ CVoid CInstancePrefab::InitScript(CBool reset)
g_currentInstancePrefab = this;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Init");
if (lua_isfunction(m_lua, -1))
Expand All @@ -128,6 +132,10 @@ CVoid CInstancePrefab::UpdateScript()
g_currentInstancePrefab = this;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Update");
if (lua_isfunction(m_lua, -1))
Expand All @@ -146,6 +154,10 @@ CVoid CInstancePrefab::OnTriggerEnterScript(CChar *otherActorName)
g_currentInstancePrefab = this;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "OnTriggerEnter");
if (lua_isfunction(m_lua, -1))
Expand All @@ -166,6 +178,10 @@ CVoid CInstancePrefab::OnTriggerStayScript(CChar *otherActorName)
g_currentInstancePrefab = this;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "OnTriggerStay");
if (lua_isfunction(m_lua, -1))
Expand All @@ -185,6 +201,10 @@ CVoid CInstancePrefab::OnTriggerExitScript(CChar *otherActorName)
g_currentInstancePrefab = this;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "OnTriggerExit");
if (lua_isfunction(m_lua, -1))
Expand All @@ -204,6 +224,10 @@ CVoid CInstancePrefab::OnSelectScript()
g_currentInstancePrefab = this;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "OnSelect");
if (lua_isfunction(m_lua, -1))
Expand Down
8 changes: 8 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/Common/VSceneScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ CVoid CVSceneScript::InitScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Init");
if (lua_isfunction(m_lua, -1))
Expand All @@ -55,6 +59,10 @@ CVoid CVSceneScript::UpdateScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Update");
if (lua_isfunction(m_lua, -1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void CEditProjectProperties::OnOK()
}

CChar temp[256];
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.4.5 (", newProjectName, " - ", m_currentVSceneNameWithoutDot, ")");
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.4.6 (", newProjectName, " - ", m_currentVSceneNameWithoutDot, ")");
ex_pVandaEngineDlg->SetWindowTextA(temp);

//save changes to projects.dat
Expand Down Expand Up @@ -230,7 +230,7 @@ void CEditProjectProperties::OnOK()
}

CChar temp[256];
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.4.5 (", newProject->m_name, " - ", m_currentVSceneNameWithoutDot, ")");
sprintf(temp, "%s%s%s%s%s", "Vanda Engine 2.4.6 (", newProject->m_name, " - ", m_currentVSceneNameWithoutDot, ")");
ex_pVandaEngineDlg->SetWindowTextA(temp);

//create new directory
Expand Down
12 changes: 12 additions & 0 deletions Vanda Engine Editor/VandaEngineEditor/GUIEngine/GUIButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ CVoid CGUIButton::OnSelectMouseLButtonDownScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "OnSelectMouseLButtonDown");
if (lua_isfunction(m_lua, -1))
Expand All @@ -416,6 +420,10 @@ CVoid CGUIButton::OnSelectMouseRButtonDownScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "OnSelectMouseRButtonDown");
if (lua_isfunction(m_lua, -1))
Expand All @@ -434,6 +442,10 @@ CVoid CGUIButton::OnSelectMouseEnterScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "OnSelectMouseEnter");
if (lua_isfunction(m_lua, -1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ CVoid CInstanceCamera::InitScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = this;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Init");
if (lua_isfunction(m_lua, -1))
Expand All @@ -242,6 +246,10 @@ CVoid CInstanceCamera::UpdateScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = NULL;
g_currentEngineCamera = this;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Update");
if (lua_isfunction(m_lua, -1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,10 @@ CVoid CLight::InitScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = this;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Init");
if (lua_isfunction(m_lua, -1))
Expand All @@ -674,6 +678,10 @@ CVoid CLight::UpdateScript()
g_currentInstancePrefab = NULL;
g_currentWater = NULL;
g_currentLight = this;
g_currentEngineCamera = NULL;
g_currentVideo = NULL;
g_current3DSound = NULL;
g_currentAmbientSound = NULL;

lua_getglobal(m_lua, "Update");
if (lua_isfunction(m_lua, -1))
Expand Down
Loading

0 comments on commit 906f0c7

Please sign in to comment.