diff --git a/.gitignore b/.gitignore index 36a1686..1902ebe 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,5 @@ desktop.ini *.db #Redist -!Installer/Redist/* \ No newline at end of file +!Installer/Redist/* +UpgradeLog.htm diff --git a/Blocks3D.vcproj b/Blocks3D.vcproj index 5554683..9203292 100644 --- a/Blocks3D.vcproj +++ b/Blocks3D.vcproj @@ -733,6 +733,14 @@ RelativePath=".\src\include\TextureHandler.h" > + + + + diff --git a/content/page/hopper.html b/content/page/hopper.html index b3478a8..a2fa956 100644 --- a/content/page/hopper.html +++ b/content/page/hopper.html @@ -22,7 +22,7 @@ } - + diff --git a/src/include/ToolEnum.h b/src/include/ToolEnum.h new file mode 100644 index 0000000..0790963 --- /dev/null +++ b/src/include/ToolEnum.h @@ -0,0 +1,11 @@ +#pragma once + +namespace Enum +{ + namespace Hopper + { + enum Value { + GameTool = 0, Grab = 1, Clone = 2, Hammer = 3, Slingshot = 4, Rocket = 5, Laser = 6 + }; + } +} \ No newline at end of file diff --git a/src/include/VS2005CompatShim.h b/src/include/VS2005CompatShim.h new file mode 100644 index 0000000..3115e08 --- /dev/null +++ b/src/include/VS2005CompatShim.h @@ -0,0 +1,26 @@ +#ifndef COMPAT_SHIM +#define COMPAT_SHIM +#include +#include + +template +std::string toString(const T &value) +{ + std::ostringstream os; + os << value; + return os.str(); +} + +namespace std +{ + std::string to_string( int value ) {return toString(value);} + std::string to_string( long value ) {return toString(value);} + std::string to_string( long long value ) {return toString(value);} + std::string to_string( unsigned value ) {return toString(value);} + std::string to_string( unsigned long value ) {return toString(value);} + std::string to_string( unsigned long long value ) {return toString(value);} + std::string to_string( float value ) {return toString(value);} + std::string to_string( double value ) {return toString(value);} + std::string to_string( long double value ) {return toString(value);} +} +#endif \ No newline at end of file diff --git a/src/source/IEBrowser.cpp b/src/source/IEBrowser.cpp index 6d72313..f88f173 100644 --- a/src/source/IEBrowser.cpp +++ b/src/source/IEBrowser.cpp @@ -2,7 +2,6 @@ #define WIN32_LEAN_AND_MEAN #endif - #include #include #include "IEBrowser.h" @@ -11,6 +10,9 @@ #include "ax.h" #include "Tool/SurfaceTool.h" #include "Application.h" +#include "Enum.h" +#include "ToolEnum.h" +#include "VS2005CompatShim.h" HRESULT IEBrowser::doExternal(std::wstring funcName, DISPID dispIdMember, @@ -30,9 +32,24 @@ HRESULT IEBrowser::doExternal(std::wstring funcName, } else if (funcName==L"ToggleHopperBin") { - pVarResult->vt = VT_INT; - pVarResult->intVal = 5; - //MessageBox(NULL, "BOOP", "Boopity boop",MB_OK); + MessageBox(NULL, "BOOP", "Boopity boop",MB_OK); + + /*To-do Make enums in ToolEnum work with this properly, + commented code is not fully tested.*/ + /*MessageBox(NULL, + std::to_string(pDispParams->rgvarg->intVal).c_str(), + "Is it working?", + MB_OK); + Enum::Hopper::Value cont = (Enum::Hopper::Value)pDispParams->rgvarg->intVal; + + switch (cont) + { + case GameTool + case Grab + + break; + }*/ + return S_OK; } else if (funcName==L"SetController") {