Compare commits
16 Commits
SplashHTML
...
v0.0.106.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2af7077a0a | ||
| 728e67e1a5 | |||
| 8fa056e191 | |||
|
|
69aacebbb2 | ||
| 791fa55767 | |||
| 3b83e527f8 | |||
|
|
de53dcf6b0 | ||
|
|
8ef3bcd352 | ||
|
|
7adf511bf7 | ||
|
|
72cdf2af35 | ||
|
|
d9a0e1e120 | ||
|
|
90a1a1b325 | ||
|
|
984bea6136 | ||
|
|
083cb38e81 | ||
|
|
6d65cd2a56 | ||
|
|
223364907f |
25
.github/workflows/sync-develop.yml
vendored
Normal file
25
.github/workflows/sync-develop.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Sync Back to Develop
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync-branches:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Syncing branches
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
- name: Opening pull request
|
||||||
|
id: pull
|
||||||
|
uses: tretuna/sync-branches@1.2.0
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
FROM_BRANCH: 'master'
|
||||||
|
TO_BRANCH: 'develop'
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -40,6 +40,9 @@
|
|||||||
*.ilk
|
*.ilk
|
||||||
*.dep
|
*.dep
|
||||||
|
|
||||||
|
# ResEditor files
|
||||||
|
*.aps
|
||||||
|
|
||||||
/Debug
|
/Debug
|
||||||
/Release
|
/Release
|
||||||
stdout.txt
|
stdout.txt
|
||||||
@@ -53,4 +56,5 @@ desktop.ini
|
|||||||
*.db
|
*.db
|
||||||
|
|
||||||
#Redist
|
#Redist
|
||||||
!Installer/Redist/*
|
!Installer/Redist/*
|
||||||
|
UpgradeLog.htm
|
||||||
|
|||||||
@@ -733,6 +733,14 @@
|
|||||||
RelativePath=".\src\include\TextureHandler.h"
|
RelativePath=".\src\include\TextureHandler.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\ToolEnum.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\VS2005CompatShim.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\include\win32Defines.h"
|
RelativePath=".\src\include\win32Defines.h"
|
||||||
>
|
>
|
||||||
|
|||||||
BIN
Dialogs.aps
BIN
Dialogs.aps
Binary file not shown.
@@ -10,7 +10,7 @@
|
|||||||
#define APP_GENER 0
|
#define APP_GENER 0
|
||||||
#define APP_MAJOR 0
|
#define APP_MAJOR 0
|
||||||
#define APP_MINOR 106
|
#define APP_MINOR 106
|
||||||
#define APP_PATCH 2
|
#define APP_PATCH 4
|
||||||
#define APP_VER_STRING APP_GENER.APP_MAJOR.APP_MINOR.APP_PATCH
|
#define APP_VER_STRING APP_GENER.APP_MAJOR.APP_MINOR.APP_PATCH
|
||||||
|
|
||||||
#define VER_PREFIX( N ) v##N
|
#define VER_PREFIX( N ) v##N
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<body style="background-color: ButtonFace; margin: 0; padding: 5px; overflow: hidden; border: outset 2px;">
|
<body style="background-color: ButtonFace; margin: 0; padding: 5px; overflow: hidden; border: outset 2px;">
|
||||||
<span class="container" onmousedown="toolOvr(this)" onmouseup="toolOut(this)" onmouseout="toolOut(this)" onclick="alert(window.external.ToggleHopperBin(0))">
|
<span class="container" onmousedown="toolOvr(this)" onmouseup="toolOut(this)" onmouseout="toolOut(this)" onclick="window.external.ToggleHopperBin(0)">
|
||||||
<img src="../images/GameTool.png" />
|
<img src="../images/GameTool.png" />
|
||||||
</span>
|
</span>
|
||||||
<span class="container" onmousedown="toolOvr(this)" onmouseup="toolOut(this)" onmouseout="toolOut(this)" onclick="window.external.ToggleHopperBin(1)">
|
<span class="container" onmousedown="toolOvr(this)" onmouseup="toolOut(this)" onmouseout="toolOut(this)" onclick="window.external.ToggleHopperBin(1)">
|
||||||
|
|||||||
11
src/include/ToolEnum.h
Normal file
11
src/include/ToolEnum.h
Normal file
@@ -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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
26
src/include/VS2005CompatShim.h
Normal file
26
src/include/VS2005CompatShim.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#ifndef COMPAT_SHIM
|
||||||
|
#define COMPAT_SHIM
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
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
|
||||||
@@ -202,8 +202,8 @@ void PartInstance::setSize(Vector3 newSize)
|
|||||||
|
|
||||||
size = Vector3(sizex, sizey, sizez);
|
size = Vector3(sizex, sizey, sizez);
|
||||||
|
|
||||||
|
g_dataModel->getEngine()->deleteBody(this);
|
||||||
|
g_dataModel->getEngine()->createBody(this);
|
||||||
}
|
}
|
||||||
Vector3 PartInstance::getSize()
|
Vector3 PartInstance::getSize()
|
||||||
{
|
{
|
||||||
@@ -224,6 +224,8 @@ void PartInstance::setShape(Enum::Shape::Value shape)
|
|||||||
this->shape = shape;
|
this->shape = shape;
|
||||||
this->setSize(this->getSize());
|
this->setSize(this->getSize());
|
||||||
}
|
}
|
||||||
|
g_dataModel->getEngine()->deleteBody(this);
|
||||||
|
g_dataModel->getEngine()->createBody(this);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,6 +239,7 @@ void PartInstance::setAnchored(bool anchored)
|
|||||||
{
|
{
|
||||||
this->anchored = anchored;
|
this->anchored = anchored;
|
||||||
g_dataModel->getEngine()->deleteBody(this);
|
g_dataModel->getEngine()->deleteBody(this);
|
||||||
|
g_dataModel->getEngine()->createBody(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PartInstance::isAnchored()
|
bool PartInstance::isAnchored()
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <Commdlg.h>
|
#include <Commdlg.h>
|
||||||
#include "IEBrowser.h"
|
#include "IEBrowser.h"
|
||||||
@@ -11,6 +10,9 @@
|
|||||||
#include "ax.h"
|
#include "ax.h"
|
||||||
#include "Tool/SurfaceTool.h"
|
#include "Tool/SurfaceTool.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
#include "Enum.h"
|
||||||
|
#include "ToolEnum.h"
|
||||||
|
#include "VS2005CompatShim.h"
|
||||||
|
|
||||||
HRESULT IEBrowser::doExternal(std::wstring funcName,
|
HRESULT IEBrowser::doExternal(std::wstring funcName,
|
||||||
DISPID dispIdMember,
|
DISPID dispIdMember,
|
||||||
@@ -30,9 +32,24 @@ HRESULT IEBrowser::doExternal(std::wstring funcName,
|
|||||||
}
|
}
|
||||||
else if (funcName==L"ToggleHopperBin")
|
else if (funcName==L"ToggleHopperBin")
|
||||||
{
|
{
|
||||||
pVarResult->vt = VT_INT;
|
MessageBox(NULL, "BOOP", "Boopity boop",MB_OK);
|
||||||
pVarResult->intVal = 5;
|
|
||||||
//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")
|
else if (funcName==L"SetController")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ void XplicitNgine::createBody(PartInstance* partInstance)
|
|||||||
{
|
{
|
||||||
// calculate collisions
|
// calculate collisions
|
||||||
//dSpaceCollide (physSpace,0,&collisionCallback);
|
//dSpaceCollide (physSpace,0,&collisionCallback);
|
||||||
|
|
||||||
|
Vector3 partSize = partInstance->getSize();
|
||||||
|
Vector3 partPosition = partInstance->getPosition();
|
||||||
if(partInstance->physBody == NULL)
|
if(partInstance->physBody == NULL)
|
||||||
{
|
{
|
||||||
// init body
|
// init body
|
||||||
@@ -93,9 +95,9 @@ void XplicitNgine::createBody(PartInstance* partInstance)
|
|||||||
if(partInstance->shape == Enum::Shape::Block)
|
if(partInstance->shape == Enum::Shape::Block)
|
||||||
{
|
{
|
||||||
partInstance->physGeom[0] = dCreateBox(physSpace,
|
partInstance->physGeom[0] = dCreateBox(physSpace,
|
||||||
partInstance->getSize()[0],
|
partSize.x,
|
||||||
partInstance->getSize()[1],
|
partSize.y,
|
||||||
partInstance->getSize()[2]
|
partSize.z
|
||||||
);
|
);
|
||||||
|
|
||||||
dVector3 result;
|
dVector3 result;
|
||||||
@@ -108,11 +110,11 @@ void XplicitNgine::createBody(PartInstance* partInstance)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
partInstance->physGeom[0] = dCreateSphere(physSpace, partInstance->getSize()[0]/2);
|
partInstance->physGeom[0] = dCreateSphere(physSpace, partSize[0]/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
dMass mass;
|
dMass mass;
|
||||||
mass.setBox(partInstance->getSize().x, partInstance->getSize().y, partInstance->getSize().z, 0.7F);
|
mass.setBox(partSize.x, partSize.y, partSize.z, 0.7F);
|
||||||
dBodySetMass(partInstance->physBody, &mass);
|
dBodySetMass(partInstance->physBody, &mass);
|
||||||
|
|
||||||
// Debug output
|
// Debug output
|
||||||
@@ -121,15 +123,15 @@ void XplicitNgine::createBody(PartInstance* partInstance)
|
|||||||
// Create rigid body
|
// Create rigid body
|
||||||
//printf("[XplicitNgine] Created Geom for PartInstance\n");
|
//printf("[XplicitNgine] Created Geom for PartInstance\n");
|
||||||
dBodySetPosition(partInstance->physBody,
|
dBodySetPosition(partInstance->physBody,
|
||||||
partInstance->getPosition()[0],
|
partPosition.x,
|
||||||
partInstance->getPosition()[1],
|
partPosition.y,
|
||||||
partInstance->getPosition()[2]
|
partPosition.z
|
||||||
);
|
);
|
||||||
|
|
||||||
dGeomSetPosition(partInstance->physGeom[0],
|
dGeomSetPosition(partInstance->physGeom[0],
|
||||||
partInstance->getPosition()[0],
|
partPosition.x,
|
||||||
partInstance->getPosition()[1],
|
partPosition.y,
|
||||||
partInstance->getPosition()[2]);
|
partPosition.z);
|
||||||
|
|
||||||
Matrix3 g3dRot = partInstance->getCFrame().rotation;
|
Matrix3 g3dRot = partInstance->getCFrame().rotation;
|
||||||
float rotation [12] = { g3dRot[0][0], g3dRot[0][1], g3dRot[0][2], 0,
|
float rotation [12] = { g3dRot[0][0], g3dRot[0][1], g3dRot[0][2], 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user