diff --git a/Blocks3D-2003.sln b/Blocks3D-2003.sln
new file mode 100644
index 0000000..f494330
--- /dev/null
+++ b/Blocks3D-2003.sln
@@ -0,0 +1,35 @@
+
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blocks3D", "Blocks3D-2003.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug.ActiveCfg = Debug|Win32
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug.Build.0 = Debug|Win32
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release.ActiveCfg = Release|Win32
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.Build.0 = Debug|Win32
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.ActiveCfg = Release|Win32
+ {6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Blocks3D-2003.vcproj b/Blocks3D-2003.vcproj
new file mode 100644
index 0000000..75f2202
--- /dev/null
+++ b/Blocks3D-2003.vcproj
@@ -0,0 +1,649 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Blocks3D.vcproj b/Blocks3D.vcproj
index 2b1e136..b0b78c9 100644
--- a/Blocks3D.vcproj
+++ b/Blocks3D.vcproj
@@ -729,6 +729,10 @@
RelativePath=".\src\include\WindowFunctions.h"
>
+
+
diff --git a/Installer/install_script.iss b/Installer/install_script.iss
index 4b1c674..2cd262f 100644
--- a/Installer/install_script.iss
+++ b/Installer/install_script.iss
@@ -1,9 +1,9 @@
-;InnoSetupVersion=5.5.7
+;InnoSetupVersion=5.4.3
[Setup]
AppName=Blocks3D
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
-AppVersion=v0_0_104_4
+AppVersion=v0_0_104_5
AppPublisherURL=http://blocks3d.com/
AppSupportURL=http://blocks3d.com/
AppUpdatesURL=http://blocks3d.com/
@@ -40,8 +40,6 @@ Name: "{group}\Blocks3D Editor"; Filename: "{app}\Blocks3D.exe"; Tasks: startscu
Name: "{userdesktop}\Play Blocks3D"; Filename: "{%programfiles}\Internet Explorer\iexplore.exe"; Parameters: "http://www.blocks3d.com/Games"; IconFilename: "{app}\Blocks3D.exe"; Tasks: startscut;
Name: "{userdesktop}\Blocks3D Editor"; Filename: "{app}\Blocks3D.exe"; Tasks: desktopicon
-
-
[Tasks]
Name: "instvc"; Description: "Install Visual C++ Redistributable 2005 SP1 (Requires elevated permissions)";
Name: "desktopicon"; Description: "Create Desktop Icons";
diff --git a/src/include/DataModelV2/Instance.h b/src/include/DataModelV2/Instance.h
index b8009bd..4610a8f 100644
--- a/src/include/DataModelV2/Instance.h
+++ b/src/include/DataModelV2/Instance.h
@@ -2,6 +2,10 @@
#include
#include "propertyGrid.h"
#include "map"
+
+#ifdef NO_SPRINTF
+#define sprintf_s sprintf
+#endif
//#include "Properties/BoolProperty.h"
class Instance
diff --git a/src/include/winver.h b/src/include/winver.h
new file mode 100644
index 0000000..e72f685
--- /dev/null
+++ b/src/include/winver.h
@@ -0,0 +1,5 @@
+#ifndef WINVER
+#define _WIN32_WINNT 0x0400
+#define _WIN32_WINDOWS 0x0400
+#define WINVER 0x0400
+#endif
\ No newline at end of file
diff --git a/src/source/DataModelV2/DataModelInstance.cpp b/src/source/DataModelV2/DataModelInstance.cpp
index 989bc9c..07e4db5 100644
--- a/src/source/DataModelV2/DataModelInstance.cpp
+++ b/src/source/DataModelV2/DataModelInstance.cpp
@@ -13,6 +13,7 @@ using namespace std;
using namespace rapidxml;
+
DataModelInstance::DataModelInstance(void)
{
Instance::Instance();
@@ -518,7 +519,6 @@ bool DataModelInstance::getOpen()
of.lpstrFile[0]='\0';
of.nMaxFile=500;
of.lpstrTitle="Hello";
- of.Flags = OFN_FILEMUSTEXIST;
ShowCursor(TRUE);
BOOL file = GetOpenFileName(&of);
if (file)
@@ -526,6 +526,7 @@ bool DataModelInstance::getOpen()
_loadedFileName = of.lpstrFile;
load(of.lpstrFile,true);
}
+ //else MessageBox(NULL, "Failed to open dialog", "Failure", MB_ICONHAND | MB_OK);
return true;
}
void DataModelInstance::setMessage(std::string msg)
diff --git a/src/source/DataModelV2/Instance.cpp b/src/source/DataModelV2/Instance.cpp
index 4cb1279..1f51b50 100644
--- a/src/source/DataModelV2/Instance.cpp
+++ b/src/source/DataModelV2/Instance.cpp
@@ -1,4 +1,3 @@
-#define WINVER 0x0400
#include
#include "DataModelV2/Instance.h"
diff --git a/src/source/DataModelV2/PartInstance.cpp b/src/source/DataModelV2/PartInstance.cpp
index cea4126..9a04254 100644
--- a/src/source/DataModelV2/PartInstance.cpp
+++ b/src/source/DataModelV2/PartInstance.cpp
@@ -279,6 +279,7 @@ void PartInstance::render(RenderDevice* rd) {
changed=false;
Vector3 renderSize = size/2;
glNewList(glList, GL_COMPILE);
+ //glScalef(0.5f,0.5f,0.5f);
renderShape(this->shape, renderSize, color);
renderSurface(TOP, this->top, renderSize, this->controller, color);
renderSurface(FRONT, this->front, renderSize, this->controller, color);
diff --git a/src/source/Tool/ArrowTool.cpp b/src/source/Tool/ArrowTool.cpp
index 9bbd1b4..f6f9c7a 100644
--- a/src/source/Tool/ArrowTool.cpp
+++ b/src/source/Tool/ArrowTool.cpp
@@ -69,6 +69,30 @@ void ArrowTool::onKeyDown(int key)
{
lctrlDown = true;
}
+ else if(key == 'R')
+ {
+ if(g_selectedInstances.size() > 0)
+ {
+ Instance* selectedInstance = g_selectedInstances.at(0);
+ AudioPlayer::playSound(clickSound);
+ if(PartInstance* part = dynamic_cast(selectedInstance))
+ {
+ part->setCFrame(part->getCFrame()*Matrix3::fromEulerAnglesXYZ(0,toRadians(90),0));
+ }
+ }
+ }
+ else if(key == 'T')
+ {
+ if(g_selectedInstances.size() > 0)
+ {
+ Instance* selectedInstance = g_selectedInstances.at(0);
+ AudioPlayer::playSound(clickSound);
+ if(PartInstance* part = dynamic_cast(selectedInstance))
+ {
+ part->setCFrame(part->getCFrame()*Matrix3::fromEulerAnglesXYZ(0,0,toRadians(90)));
+ }
+ }
+ }
}
void ArrowTool::onKeyUp(int key)
diff --git a/src/source/main.cpp b/src/source/main.cpp
index 541355c..6381e0f 100644
--- a/src/source/main.cpp
+++ b/src/source/main.cpp
@@ -1,9 +1,5 @@
// TODO: Move toolbar buttons with resized window.
-#define _WIN32_WINNT 0x0400
-#define _WIN32_WINDOWS 0x0400
-#define WINVER 0x0400
-#define _CRTBLD
-
+#include "winver.h"
#include "resource.h"
#include "Application.h"
#include "WindowFunctions.h"
@@ -148,7 +144,9 @@ LRESULT CALLBACK G3DProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
int main(int argc, char** argv) {
+#ifndef IGNORE_CATCH
try{
+#endif
hresult = OleInitialize(NULL);
/* IInternetSecurityManager *pSecurityMgr;
@@ -173,7 +171,7 @@ int main(int argc, char** argv) {
icc.dwSize = sizeof(icc);
icc.dwICC = ICC_WIN95_CLASSES/*|ICC_COOL_CLASSES|ICC_DATE_CLASSES|
- ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES*/;
+ // ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES*/;
InitCommonControlsEx(&icc);
AudioPlayer::init();
@@ -214,10 +212,12 @@ int main(int argc, char** argv) {
Globals::mainHwnd = hwndMain;
Application app = Application(hwndMain);
app.run();
+ #ifndef IGNORE_CATCH
}
catch(...)
{
OnError(-1);
}
+ #endif
return 0;
}
diff --git a/src/source/propertyGrid.cpp b/src/source/propertyGrid.cpp
index 2de3fae..8f27aab 100644
--- a/src/source/propertyGrid.cpp
+++ b/src/source/propertyGrid.cpp
@@ -31,13 +31,12 @@
//DWM 1.9: Suppress POCC Warning "Argument x to 'sscanf' does not match the format string;
// expected 'unsigned char *' but found 'unsigned long'"
+#include "winver.h"
+
#ifdef __POCC__
#pragma warn(disable:2234)
#endif
-#ifndef _WIN32_WINNT // Necessary for WM_MOUSEWHEEL support
-#define _WIN32_WINNT 0x0400
-#endif
// MSVC++ Support
#ifndef _CRT_SECURE_NO_WARNINGS