Compare commits
15 Commits
v0.0.106.0
...
v0.0.106.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de53dcf6b0 | ||
|
|
7adf511bf7 | ||
|
|
72cdf2af35 | ||
|
|
d9a0e1e120 | ||
|
|
90a1a1b325 | ||
|
|
984bea6136 | ||
|
|
6d65cd2a56 | ||
|
|
223364907f | ||
|
|
d96bcd2a2b | ||
|
|
6de83febb5 | ||
|
|
aaceb4eb21 | ||
|
|
e1716e7417 | ||
|
|
f5aaef5b16 | ||
|
|
b66d524d7f | ||
|
|
d468545428 |
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'
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -40,6 +40,9 @@
|
|||||||
*.ilk
|
*.ilk
|
||||||
*.dep
|
*.dep
|
||||||
|
|
||||||
|
# ResEditor files
|
||||||
|
*.aps
|
||||||
|
|
||||||
/Debug
|
/Debug
|
||||||
/Release
|
/Release
|
||||||
stdout.txt
|
stdout.txt
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
<assemblyIdentity
|
<assemblyIdentity
|
||||||
version="0.0.106.0"
|
version="0.0.106.2"
|
||||||
processorArchitecture="*"
|
processorArchitecture="*"
|
||||||
name="Blocks3D.Blocks3D.Blocks3D"
|
name="Blocks3D.Blocks3D.Blocks3D"
|
||||||
type="win32"
|
type="win32"
|
||||||
|
|||||||
BIN
Dialogs.aps
BIN
Dialogs.aps
Binary file not shown.
19
Dialogs.rc
19
Dialogs.rc
@@ -7,6 +7,17 @@
|
|||||||
#include <richedit.h>
|
#include <richedit.h>
|
||||||
#include "src/include/resource.h"
|
#include "src/include/resource.h"
|
||||||
|
|
||||||
|
#define APP_GENER 0
|
||||||
|
#define APP_MAJOR 0
|
||||||
|
#define APP_MINOR 106
|
||||||
|
#define APP_PATCH 3
|
||||||
|
#define APP_VER_STRING APP_GENER.APP_MAJOR.APP_MINOR.APP_PATCH
|
||||||
|
|
||||||
|
#define VER_PREFIX( N ) v##N
|
||||||
|
#define HSTR( N ) #N
|
||||||
|
#define STR( N ) HSTR( N )
|
||||||
|
#define VER_STR( N ) STR( VER_PREFIX( N ) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -18,8 +29,8 @@ IDB_BITMAP1 BITMAP "Parts.bmp"
|
|||||||
|
|
||||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
1 VERSIONINFO
|
1 VERSIONINFO
|
||||||
FILEVERSION 0,0,106,0
|
FILEVERSION APP_GENER,APP_MAJOR,APP_MINOR,APP_PATCH
|
||||||
PRODUCTVERSION 0,0,106,0
|
PRODUCTVERSION APP_GENER,APP_MAJOR,APP_MINOR,APP_PATCH
|
||||||
FILEOS VOS__WINDOWS32
|
FILEOS VOS__WINDOWS32
|
||||||
FILETYPE VFT_APP
|
FILETYPE VFT_APP
|
||||||
FILESUBTYPE VFT2_UNKNOWN
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
@@ -33,14 +44,14 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||||||
VALUE "Comments", ""
|
VALUE "Comments", ""
|
||||||
VALUE "CompanyName", "Blocks3D Team"
|
VALUE "CompanyName", "Blocks3D Team"
|
||||||
VALUE "FileDescription", "Blocks 3D"
|
VALUE "FileDescription", "Blocks 3D"
|
||||||
VALUE "FileVersion", "v0.0.106.0"
|
VALUE "FileVersion", VER_STR(APP_VER_STRING)
|
||||||
VALUE "InternalName", "Blocks3D"
|
VALUE "InternalName", "Blocks3D"
|
||||||
VALUE "LegalCopyright", "Blocks3D Team - 2022"
|
VALUE "LegalCopyright", "Blocks3D Team - 2022"
|
||||||
VALUE "LegalTrademarks", ""
|
VALUE "LegalTrademarks", ""
|
||||||
VALUE "OriginalFilename", "Blocks3D.exe"
|
VALUE "OriginalFilename", "Blocks3D.exe"
|
||||||
VALUE "PrivateBuild", ""
|
VALUE "PrivateBuild", ""
|
||||||
VALUE "ProductName", "Blocks3D"
|
VALUE "ProductName", "Blocks3D"
|
||||||
VALUE "ProductVersion", "v0.0.106.0"
|
VALUE "ProductVersion", VER_STR(APP_VER_STRING)
|
||||||
VALUE "SpecialBuild", ""
|
VALUE "SpecialBuild", ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "DataModelV2/Instance.h"
|
#include "DataModelV2/Instance.h"
|
||||||
#include <set>
|
|
||||||
|
|
||||||
class PropertyWindow {
|
class PropertyWindow {
|
||||||
public:
|
public:
|
||||||
@@ -15,4 +14,5 @@ private:
|
|||||||
HWND _propGrid;
|
HWND _propGrid;
|
||||||
HWND _explorerComboBox;
|
HWND _explorerComboBox;
|
||||||
void _resize();
|
void _resize();
|
||||||
|
void clearExplorer();
|
||||||
};
|
};
|
||||||
@@ -161,22 +161,23 @@ void Application::deleteInstance()
|
|||||||
{
|
{
|
||||||
if(_dataModel->getSelectionService()->getSelection().size() > 0)
|
if(_dataModel->getSelectionService()->getSelection().size() > 0)
|
||||||
{
|
{
|
||||||
size_t undeletable = 0;
|
std::vector<Instance *> selection = _dataModel->getSelectionService()->getSelection();
|
||||||
while(_dataModel->getSelectionService()->getSelection().size() > undeletable)
|
std::vector<Instance *> toDelete;
|
||||||
|
for(size_t i = 0; i < selection.size(); i++) {
|
||||||
|
if(selection[i]->canDelete) {
|
||||||
|
toDelete.push_back(selection[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(toDelete.size() > 0)
|
||||||
{
|
{
|
||||||
if(_dataModel->getSelectionService()->getSelection()[0]->canDelete)
|
AudioPlayer::playSound(GetFileInPath("/content/sounds/pageturn.wav"));
|
||||||
{
|
for(size_t i = 0; i < toDelete.size(); i++) {
|
||||||
AudioPlayer::playSound(GetFileInPath("/content/sounds/pageturn.wav"));
|
Instance* selectedInstance = toDelete[i];
|
||||||
Instance* selectedInstance = g_dataModel->getSelectionService()->getSelection()[0];
|
_dataModel->getSelectionService()->removeSelected(selectedInstance);
|
||||||
_dataModel->getSelectionService()->removeChild(selectedInstance);
|
|
||||||
selectedInstance->setParent(NULL);
|
selectedInstance->setParent(NULL);
|
||||||
delete selectedInstance;
|
delete selectedInstance;
|
||||||
selectedInstance = NULL;
|
selectedInstance = NULL;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
undeletable++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(_dataModel->getSelectionService()->getSelection().size() == 0)
|
if(_dataModel->getSelectionService()->getSelection().size() == 0)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ void SelectionService::clearSelection(){
|
|||||||
this->selection.clear();
|
this->selection.clear();
|
||||||
if(propertyWindow != NULL)
|
if(propertyWindow != NULL)
|
||||||
propertyWindow->ClearProperties();
|
propertyWindow->ClearProperties();
|
||||||
|
printf("selectionSize: %d\n", selection.size());
|
||||||
}
|
}
|
||||||
bool SelectionService::isSelected(Instance * instance){
|
bool SelectionService::isSelected(Instance * instance){
|
||||||
return std::find(selection.begin(), selection.end(), instance) != selection.end();
|
return std::find(selection.begin(), selection.end(), instance) != selection.end();
|
||||||
@@ -30,11 +31,13 @@ void SelectionService::addSelected(Instance * instance){
|
|||||||
this->selection.push_back(instance);
|
this->selection.push_back(instance);
|
||||||
if(propertyWindow != NULL)
|
if(propertyWindow != NULL)
|
||||||
propertyWindow->UpdateSelected(selection);
|
propertyWindow->UpdateSelected(selection);
|
||||||
|
printf("selectionSize: %d\n", selection.size());
|
||||||
}
|
}
|
||||||
void SelectionService::removeSelected(Instance * instance){
|
void SelectionService::removeSelected(Instance * instance){
|
||||||
selection.erase(std::remove(selection.begin(), selection.end(), instance), selection.end());
|
selection.erase(std::remove(selection.begin(), selection.end(), instance), selection.end());
|
||||||
if(propertyWindow != NULL)
|
if(propertyWindow != NULL)
|
||||||
propertyWindow->UpdateSelected(selection);
|
propertyWindow->UpdateSelected(selection);
|
||||||
|
printf("selectionSize: %d\n", selection.size());
|
||||||
}
|
}
|
||||||
void SelectionService::addSelected(const std::vector<Instance *> &instances){
|
void SelectionService::addSelected(const std::vector<Instance *> &instances){
|
||||||
for(size_t i = 0; i < instances.size(); i++)
|
for(size_t i = 0; i < instances.size(); i++)
|
||||||
@@ -44,10 +47,12 @@ void SelectionService::addSelected(const std::vector<Instance *> &instances){
|
|||||||
}
|
}
|
||||||
if(propertyWindow != NULL)
|
if(propertyWindow != NULL)
|
||||||
propertyWindow->UpdateSelected(selection);
|
propertyWindow->UpdateSelected(selection);
|
||||||
|
printf("selectionSize: %d\n", selection.size());
|
||||||
}
|
}
|
||||||
void SelectionService::setPropertyWindow(PropertyWindow * propertyWindow)
|
void SelectionService::setPropertyWindow(PropertyWindow * propertyWindow)
|
||||||
{
|
{
|
||||||
this->propertyWindow = propertyWindow;
|
this->propertyWindow = propertyWindow;
|
||||||
if(propertyWindow != NULL)
|
if(propertyWindow != NULL)
|
||||||
propertyWindow->ClearProperties();
|
propertyWindow->ClearProperties();
|
||||||
|
printf("selectionSize: %d\n", selection.size());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
#include "WindowFunctions.h"
|
#include "WindowFunctions.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "PropertyWindow.h"
|
#include "PropertyWindow.h"
|
||||||
#include "Globals.h"
|
|
||||||
#include "strsafe.h"
|
#include "strsafe.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
|
||||||
@@ -203,6 +202,12 @@ LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertyWindow::clearExplorer()
|
||||||
|
{
|
||||||
|
SendMessage(_explorerComboBox,CB_RESETCONTENT,0,0);
|
||||||
|
SendMessage(_explorerComboBox,CB_SETCURSEL,0,(LPARAM)0);
|
||||||
|
}
|
||||||
|
|
||||||
void PropertyWindow::refreshExplorer(std::vector<Instance*> selectedInstances)
|
void PropertyWindow::refreshExplorer(std::vector<Instance*> selectedInstances)
|
||||||
{
|
{
|
||||||
Instance * instance = selectedInstances[0];
|
Instance * instance = selectedInstances[0];
|
||||||
@@ -338,7 +343,7 @@ void PropertyWindow::_resize()
|
|||||||
|
|
||||||
void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
|
void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
|
||||||
{
|
{
|
||||||
if(instances.size() < 0)
|
if(instances.size() <= 0)
|
||||||
{
|
{
|
||||||
ClearProperties();
|
ClearProperties();
|
||||||
return;
|
return;
|
||||||
@@ -367,5 +372,6 @@ void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
|
|||||||
|
|
||||||
void PropertyWindow::ClearProperties()
|
void PropertyWindow::ClearProperties()
|
||||||
{
|
{
|
||||||
|
clearExplorer();
|
||||||
PropGrid_ResetContent(_propGrid);
|
PropGrid_ResetContent(_propGrid);
|
||||||
}
|
}
|
||||||
@@ -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