Compare commits
1 Commits
v0.0.106.3
...
optimizati
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae174c1fdc |
25
.github/workflows/sync-develop.yml
vendored
@@ -1,25 +0,0 @@
|
||||
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'
|
||||
10
.gitignore
vendored
@@ -36,13 +36,12 @@
|
||||
*.user
|
||||
*.pdb
|
||||
*.idb
|
||||
*.manifest
|
||||
*.htm
|
||||
*.res
|
||||
*.ilk
|
||||
*.dep
|
||||
|
||||
# ResEditor files
|
||||
*.aps
|
||||
|
||||
/Debug
|
||||
/Release
|
||||
stdout.txt
|
||||
@@ -53,7 +52,6 @@ G3DTest.suo
|
||||
G3DTest.suo
|
||||
stderr.txt
|
||||
desktop.ini
|
||||
main.cpp
|
||||
*.db
|
||||
|
||||
#Redist
|
||||
!Installer/Redist/*
|
||||
G3DTest.sln
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
#include <G3DAll.h>
|
||||
#include <initguid.h>
|
||||
#include <iomanip>
|
||||
#include "Instance.h"
|
||||
#include "resource.h"
|
||||
#include "DataModelV2/Instance.h"
|
||||
#include "DataModelV2/PartInstance.h"
|
||||
#include "DataModelV2/TextButtonInstance.h"
|
||||
#include "DataModelV2/ImageButtonInstance.h"
|
||||
#include "DataModelV2/DataModelInstance.h"
|
||||
#include "DataModelV2/GuiRootInstance.h"
|
||||
#include "XplicitNgine/XplicitNgine.h"
|
||||
#include "PartInstance.h"
|
||||
#include "TextButtonInstance.h"
|
||||
#include "ImageButtonInstance.h"
|
||||
#include "DataModelInstance.h"
|
||||
#include "CameraController.h"
|
||||
#include "AudioPlayer.h"
|
||||
#include "Globals.h"
|
||||
@@ -22,21 +20,24 @@
|
||||
#include <string>
|
||||
#include "ax.h"
|
||||
#include <cguid.h>
|
||||
#include "IEBrowser.h"
|
||||
#include "PropertyWindow.h"
|
||||
#include <commctrl.h>
|
||||
#include "StringFunctions.h"
|
||||
#include "GuiRoot.h"
|
||||
|
||||
#include "Listener/GUDButtonListener.h"
|
||||
#include "Listener/ModeSelectionListener.h"
|
||||
#include "Listener/DeleteListener.h"
|
||||
#include "Listener/CameraButtonListener.h"
|
||||
#include "Listener/RotateButtonListener.h"
|
||||
#include "Faces.h"
|
||||
#define LEGACY_LOAD_G3DFUN_LEVEL
|
||||
//Ray testRay;
|
||||
//static int cursorid = 0;
|
||||
//static int cursorOvrid = 0;
|
||||
//static int currentcursorid = 0;
|
||||
#include "GUDButtonListener.h"
|
||||
#include "ModeSelectionListener.h"
|
||||
#include "DeleteListener.h"
|
||||
#include "CameraButtonListener.h"
|
||||
#include "RotateButtonListener.h"
|
||||
|
||||
Ray testRay;
|
||||
static int cursorid = 0;
|
||||
static int cursorOvrid = 0;
|
||||
static int currentcursorid = 0;
|
||||
static G3D::TextureRef cursor = NULL;
|
||||
static G3D::TextureRef cursorOvr = NULL;
|
||||
static bool mouseMovedBeginMotion = false;
|
||||
static POINT oldGlobalMouse;
|
||||
Vector2 oldMouse = Vector2(0,0);
|
||||
@@ -70,7 +71,7 @@ void Application::setFocus(bool focus)
|
||||
Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(settings,window) {
|
||||
|
||||
|
||||
std::string tempPath = ((std::string)getenv("temp")) + "/"+g_appName;
|
||||
std::string tempPath = ((std::string)getenv("temp")) + "/"+g_PlaceholderName;
|
||||
CreateDirectory(tempPath.c_str(), NULL);
|
||||
|
||||
_hWndMain = parentWindow;
|
||||
@@ -113,7 +114,7 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti
|
||||
Win32Window* window = Win32Window::create(_settings.window,_hwndRenderer);
|
||||
ShowWindow(_hwndRenderer, SW_SHOW);
|
||||
ShowWindow(_hWndMain, SW_SHOW);
|
||||
|
||||
|
||||
quit=false;
|
||||
rightButtonHolding=false;
|
||||
mouseOnScreen=false;
|
||||
@@ -134,160 +135,131 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti
|
||||
SetWindowLongPtr(_hWndMain,GWL_USERDATA,(LONG)this);
|
||||
SetWindowLongPtr(_hwndRenderer,GWL_USERDATA,(LONG)this);
|
||||
_propWindow = new PropertyWindow(0, 0, 200, 640, hThisInstance);
|
||||
webBrowser = new IEBrowser(_hwndToolbox);
|
||||
|
||||
SetProp(_hwndToolbox,"Browser",(HANDLE)webBrowser);
|
||||
//navigateToolbox("http://androdome.com/res/ClientToolbox.php");
|
||||
navigateToolbox(GetFileInPath("/content/page/surface.html"));
|
||||
//navigateToolbox(GetFileInPath("/content/page/controller.html"));
|
||||
|
||||
IEBrowser* webBrowser = new IEBrowser(_hwndToolbox);
|
||||
webBrowser->navigateSyncURL(L"http://androdome.com/g3d/toolbox/");
|
||||
}
|
||||
|
||||
bool Application::viewportHasFocus()
|
||||
{
|
||||
return GetActiveWindow() == this->_hWndMain;
|
||||
}
|
||||
|
||||
void Application::navigateToolbox(std::string path)
|
||||
{
|
||||
int len = path.size() + 1;
|
||||
wchar_t * nstr = new wchar_t[len];
|
||||
MultiByteToWideChar(0, 0, path.c_str(), len, nstr, len);
|
||||
webBrowser->navigateSyncURL(nstr);
|
||||
delete[] nstr;
|
||||
}
|
||||
|
||||
void Application::deleteInstance()
|
||||
{
|
||||
if(_dataModel->getSelectionService()->getSelection().size() > 0)
|
||||
if(g_selectedInstances.size() > 0)
|
||||
{
|
||||
std::vector<Instance *> selection = _dataModel->getSelectionService()->getSelection();
|
||||
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)
|
||||
size_t undeletable = 0;
|
||||
while(g_selectedInstances.size() > undeletable)
|
||||
{
|
||||
AudioPlayer::playSound(GetFileInPath("/content/sounds/pageturn.wav"));
|
||||
for(size_t i = 0; i < toDelete.size(); i++) {
|
||||
Instance* selectedInstance = toDelete[i];
|
||||
_dataModel->getSelectionService()->removeSelected(selectedInstance);
|
||||
selectedInstance->setParent(NULL);
|
||||
if(g_selectedInstances.at(0)->canDelete)
|
||||
{
|
||||
AudioPlayer::playSound(GetFileInPath("/content/sounds/pageturn.wav"));
|
||||
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||
if(selectedInstance->getParent() != NULL)
|
||||
selectedInstance->getParent()->removeChild(selectedInstance);
|
||||
delete selectedInstance;
|
||||
selectedInstance = NULL;
|
||||
g_selectedInstances.erase(g_selectedInstances.begin());
|
||||
}
|
||||
else
|
||||
{
|
||||
undeletable++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_dataModel->getSelectionService()->getSelection().size() == 0)
|
||||
_dataModel->getSelectionService()->addSelected(_dataModel);
|
||||
if(g_selectedInstances.size() == 0)
|
||||
g_usableApp->_propWindow->ClearProperties();
|
||||
}
|
||||
|
||||
|
||||
void Application::onInit() {
|
||||
tool = new Tool();
|
||||
|
||||
// Called before Application::run() beings
|
||||
cameraController.setFrame(Vector3(0,2,10));
|
||||
_dataModel = new DataModelInstance();
|
||||
_dataModel->setParent(NULL);
|
||||
_dataModel->setName("undefined");
|
||||
_dataModel->name = "undefined";
|
||||
_dataModel->font = g_fntdominant;
|
||||
g_dataModel = _dataModel;
|
||||
|
||||
//initGUI();
|
||||
|
||||
#ifdef LEGACY_LOAD_G3DFUN_LEVEL
|
||||
// Anchored this baseplate for XplicitNgine tests
|
||||
PartInstance* test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3(0.2F,0.3F,1);
|
||||
test->setSize(Vector3(24,1,24));
|
||||
test->setPosition(Vector3(0,0,0));
|
||||
test->setCFrame(test->getCFrame() * Matrix3::fromEulerAnglesXYZ(0,toRadians(0),toRadians(0)));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
test->setAnchored(true);
|
||||
|
||||
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3(.5F,1,.5F);
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-10,1,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3(.5F,1,.5F);
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(10,1,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(7,2,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-7,2,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(4,3,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-5,3,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(1,4,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-3,4,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-2,5,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
|
||||
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(0,6,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(2,7,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
#else
|
||||
_dataModel->debugGetOpen();
|
||||
#endif
|
||||
|
||||
_dataModel->getSelectionService()->clearSelection();
|
||||
_dataModel->getSelectionService()->addSelected(_dataModel);
|
||||
|
||||
|
||||
|
||||
@@ -300,15 +272,28 @@ void Application::onInit() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Application::onCleanup() {
|
||||
clearInstances();
|
||||
sky->~Sky();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Application::onLogic() {
|
||||
|
||||
// Add non-simulation game logic and AI code here
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Application::onNetwork() {
|
||||
// Poll net messages here
|
||||
}
|
||||
@@ -319,38 +304,14 @@ void Application::onNetwork() {
|
||||
// return pow(pow((double)vector1.x - (double)vector2.x, 2) + pow((double)vector1.y - (double)vector2.y, 2) + pow((double)vector1.z - (double)vector2.z, 2), 0.5);
|
||||
//}
|
||||
|
||||
std::vector<Instance*> Application::getSelection()
|
||||
{
|
||||
return g_selectedInstances;
|
||||
}
|
||||
void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
|
||||
|
||||
if(_dataModel->isRunning())
|
||||
{
|
||||
// XplicitNgine Start
|
||||
std::vector<PartInstance *> toDelete;
|
||||
for(size_t i = 0; i < _dataModel->getWorkspace()->partObjects.size(); i++)
|
||||
{
|
||||
PartInstance* partInstance = _dataModel->getWorkspace()->partObjects[i];
|
||||
if(partInstance->getPosition().y < -255)
|
||||
{
|
||||
toDelete.push_back(partInstance);
|
||||
}
|
||||
else
|
||||
_dataModel->getEngine()->createBody(partInstance);
|
||||
}
|
||||
while(toDelete.size() > 0)
|
||||
{
|
||||
PartInstance * p = toDelete.back();
|
||||
toDelete.pop_back();
|
||||
g_dataModel->getSelectionService()->removeSelected(p);
|
||||
p->setParent(NULL);
|
||||
delete p;
|
||||
}
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
_dataModel->getEngine()->step(0.1F);
|
||||
}
|
||||
onLogic();
|
||||
|
||||
|
||||
}
|
||||
|
||||
_dataModel->getGuiRoot()->update();
|
||||
|
||||
if(_dataModel->name != _title)
|
||||
@@ -365,53 +326,124 @@ void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
|
||||
|
||||
}
|
||||
|
||||
void Application::onUserInput(UserInput* ui) {
|
||||
if(mouseMoveState)
|
||||
{
|
||||
mouseMoveState = false;
|
||||
tool->onMouseMoved(mouse);
|
||||
}
|
||||
/*double getOSVersion() {
|
||||
OSVERSIONINFO osvi;
|
||||
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
|
||||
GetVersionEx(&osvi);
|
||||
std::string version = Convert(osvi.dwMajorVersion) + "." + Convert(osvi.dwMinorVersion);
|
||||
return ::atof(version.c_str());
|
||||
}*/
|
||||
/*
|
||||
bool IsHolding(int button)
|
||||
{
|
||||
return (GetKeyState(button) >> 1)>0;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void Application::onUserInput(UserInput* ui) {
|
||||
|
||||
/*
|
||||
if(GetHoldKeyState(VK_LCONTROL))
|
||||
{
|
||||
if(GetHoldKeyState('D'))
|
||||
{
|
||||
_messageTime = System::time();
|
||||
if(debugMode())
|
||||
_message = "Debug Mode Disabled";
|
||||
else
|
||||
_message = "Debug Mode Enabled";
|
||||
setDebugMode(!debugMode());
|
||||
}
|
||||
}
|
||||
*/
|
||||
if(GetHoldKeyState(VK_F8))
|
||||
{
|
||||
_dataModel->getGuiRoot()->setDebugMessage("FOV Set to 10", System::time());
|
||||
}
|
||||
//}
|
||||
|
||||
mouse.setMouseDown((GetKeyState(VK_LBUTTON) & 0x100) != 0);
|
||||
//_dataModel->mousex = ui->getMouseX();
|
||||
//_dataModel->mousey = ui->getMouseY();
|
||||
_dataModel->mouseButton1Down = (GetKeyState(VK_LBUTTON) & 0x100) != 0;
|
||||
|
||||
// Camera KB Handling
|
||||
if (GetKPBool(VK_OEM_COMMA)) //Left
|
||||
g_usableApp->cameraController.panLeft();
|
||||
else if (GetKPBool(VK_OEM_PERIOD)) // Right
|
||||
g_usableApp->cameraController.panRight();
|
||||
else if (GetKPBool(0x49)) // Zoom In (I)
|
||||
g_usableApp->cameraController.Zoom(1);
|
||||
else if (GetKPBool(0x4F)) // Zoom Out (O)
|
||||
g_usableApp->cameraController.Zoom(-1);
|
||||
if (GetHoldKeyState(VK_LBUTTON)) {
|
||||
if (_dragging) {
|
||||
PartInstance* part = NULL;
|
||||
if(g_selectedInstances.size() > 0)
|
||||
part = (PartInstance*) g_selectedInstances.at(0);
|
||||
Ray dragRay = cameraController.getCamera()->worldRay(_dataModel->mousex, _dataModel->mousey, renderDevice->getViewport());
|
||||
std::vector<Instance*> instances = _dataModel->getWorkspace()->getAllChildren();
|
||||
for(size_t i = 0; i < instances.size(); i++)
|
||||
{
|
||||
if(PartInstance* moveTo = dynamic_cast<PartInstance*>(instances.at(i)))
|
||||
{
|
||||
float __time = testRay.intersectionTime(moveTo->getBox());
|
||||
float __nearest=std::numeric_limits<float>::infinity();
|
||||
if (__time != inf())
|
||||
{
|
||||
if (__nearest>__time)
|
||||
{
|
||||
// BROKEN
|
||||
//Vector3 closest = (dragRay.closestPoint(moveTo->getPosition()) * 2);
|
||||
//part->setPosition(closest);
|
||||
//part->setPosition(Vector3(floor(closest.x),part->getPosition().y,floor(closest.z)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Sleep(10);
|
||||
}
|
||||
}
|
||||
// Camera KB Handling {
|
||||
if (GetKPBool(VK_OEM_COMMA)) //Left
|
||||
g_usableApp->cameraController.panLeft();
|
||||
else if (GetKPBool(VK_OEM_PERIOD)) // Right
|
||||
g_usableApp->cameraController.panRight();
|
||||
else if (GetKPBool(0x49)) // Zoom In (I)
|
||||
g_usableApp->cameraController.Zoom(1);
|
||||
else if (GetKPBool(0x4F)) // Zoom Out (O)
|
||||
g_usableApp->cameraController.Zoom(-1);
|
||||
// }
|
||||
|
||||
//readMouseGUIInput();
|
||||
// Add other key handling here
|
||||
}
|
||||
|
||||
void Application::changeTool(Tool * newTool)
|
||||
void Application::makeFlag(Vector3 &vec, RenderDevice* &rd)
|
||||
{
|
||||
tool->onDeselect(mouse);
|
||||
delete tool;
|
||||
if(newTool != NULL)
|
||||
tool = newTool;
|
||||
else
|
||||
tool = new Tool(); //Nulltool
|
||||
tool->onSelect(mouse);
|
||||
|
||||
|
||||
Vector3 up = Vector3(vec.x, vec.y+3, vec.z);
|
||||
rd->setColor(Color3::blue());
|
||||
rd->beforePrimitive();
|
||||
|
||||
glBegin(GL_LINES);
|
||||
glVertex3f(vec.x, vec.y, vec.z);
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
glEnd();
|
||||
|
||||
glBegin( GL_TRIANGLES );
|
||||
glVertex3f(up.x, up.y-1, up.z);
|
||||
glVertex3f(up.x, up.y-0.5, up.z-1);
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
glVertex3f(up.x, up.y-0.5, up.z-1);
|
||||
glVertex3f(up.x, up.y-1, up.z);
|
||||
|
||||
glEnd();
|
||||
rd->afterPrimitive();
|
||||
rd->setColor(Color3::white());
|
||||
//I know how i will approach this now
|
||||
}
|
||||
|
||||
void Application::setMode(int mode)
|
||||
{
|
||||
_mode = mode;
|
||||
}
|
||||
|
||||
void Application::unSetMode()
|
||||
{
|
||||
_mode = NULL;
|
||||
}
|
||||
|
||||
int Application::getMode()
|
||||
{
|
||||
return _mode;
|
||||
@@ -420,7 +452,7 @@ int Application::getMode()
|
||||
|
||||
void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, LightingParameters lighting, Vector3 size, Vector3 pos, CoordinateFrame c)
|
||||
{
|
||||
rd->disableLighting();
|
||||
|
||||
Color3 outline = Color3::cyan();//Color3(0.098F,0.6F,1.0F);
|
||||
float offsetSize = 0.05F;
|
||||
//X
|
||||
@@ -442,6 +474,8 @@ void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, Lighti
|
||||
|
||||
if(_mode == ARROWS)
|
||||
{
|
||||
rd->setLight(0, NULL);
|
||||
rd->setAmbientLightColor(Color3(1,1,1));
|
||||
|
||||
AABox box;
|
||||
c.toWorldSpace(Box(from, to)).getBounds(box);
|
||||
@@ -462,10 +496,14 @@ void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, Lighti
|
||||
|
||||
|
||||
|
||||
rd->setAmbientLightColor(lighting.ambient);
|
||||
rd->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor));
|
||||
}
|
||||
else if(_mode == RESIZE)
|
||||
{
|
||||
Color3 sphereColor = outline;
|
||||
rd->setLight(0, NULL);
|
||||
rd->setAmbientLightColor(Color3(1,1,1));
|
||||
Vector3 gamepoint = pos;
|
||||
Vector3 camerapoint = rd->getCameraToWorldMatrix().translation;
|
||||
float distance = pow(pow((double)gamepoint.x - (double)camerapoint.x, 2) + pow((double)gamepoint.y - (double)camerapoint.y, 2) + pow((double)gamepoint.z - (double)camerapoint.z, 2), 0.5);
|
||||
@@ -475,23 +513,25 @@ void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, Lighti
|
||||
float multiplier = distance * 0.025F/2;
|
||||
if(multiplier < 0.25F)
|
||||
multiplier = 0.25F;
|
||||
Vector3 position = pos + (c.lookVector()*((size.z)+1));
|
||||
Vector3 position = pos + (c.lookVector()*((size.z/2)+1));
|
||||
Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear());
|
||||
position = pos - (c.lookVector()*((size.z)+1));
|
||||
position = pos - (c.lookVector()*((size.z/2)+1));
|
||||
Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear());
|
||||
|
||||
position = pos + (c.rightVector()*((size.x)+1));
|
||||
position = pos + (c.rightVector()*((size.x/2)+1));
|
||||
Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear());
|
||||
position = pos - (c.rightVector()*((size.x)+1));
|
||||
position = pos - (c.rightVector()*((size.x/2)+1));
|
||||
Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear());
|
||||
|
||||
position = pos + (c.upVector()*((size.y)+1));
|
||||
position = pos + (c.upVector()*((size.y/2)+1));
|
||||
Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear());
|
||||
position = pos - (c.upVector()*((size.y)+1));
|
||||
position = pos - (c.upVector()*((size.y/2)+1));
|
||||
Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear());
|
||||
}
|
||||
rd->setAmbientLightColor(lighting.ambient);
|
||||
rd->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor));
|
||||
}
|
||||
rd->enableLighting();
|
||||
|
||||
}
|
||||
|
||||
void Application::exitApplication()
|
||||
@@ -501,8 +541,6 @@ void Application::exitApplication()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Application::onGraphics(RenderDevice* rd) {
|
||||
|
||||
G3D::uint8 num = 0;
|
||||
@@ -520,14 +558,14 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
{
|
||||
mouseOnScreen = false;
|
||||
//ShowCursor(true);
|
||||
//_window->setMouseVisible(true);
|
||||
_window->setMouseVisible(true);
|
||||
//rd->window()->setInputCaptureCount(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
mouseOnScreen = true;
|
||||
//SetCursor(NULL);
|
||||
//_window->setMouseVisible(false);
|
||||
_window->setMouseVisible(false);
|
||||
//rd->window()->setInputCaptureCount(1);
|
||||
}
|
||||
|
||||
@@ -540,8 +578,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
ScreenToClient(_hWndMain, &mousepos);
|
||||
}
|
||||
|
||||
LightingParameters lighting(G3D::toSeconds(2, 00, 00, PM));
|
||||
lighting.ambient = Color3(0.6F,0.6F,0.6F);
|
||||
LightingParameters lighting(G3D::toSeconds(11, 00, 00, AM));
|
||||
renderDevice->setProjectionAndCameraMatrix(*cameraController.getCamera());
|
||||
|
||||
// Cyan background
|
||||
@@ -558,52 +595,40 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
renderDevice->setShadeMode(RenderDevice::SHADE_SMOOTH);
|
||||
renderDevice->setAmbientLightColor(Color3(1,1,1));
|
||||
|
||||
renderDevice->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor, true, true));
|
||||
renderDevice->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor));
|
||||
renderDevice->setAmbientLightColor(lighting.ambient);
|
||||
|
||||
//renderDevice->setBlendFunc(RenderDevice::BLEND_ONE, RenderDevice::BLEND_ONE);
|
||||
|
||||
|
||||
|
||||
renderDevice->setShininess(70);
|
||||
renderDevice->setSpecularCoefficient(Color3(0.1F, 0.1F, 0.1F));
|
||||
|
||||
//float lightAmbient[] = { 0.5F, 0.6F, 0.9F, 1.0F };
|
||||
//float lightDiffuse[] = { 0.6F, 0.4F, 0.9F, 1.0F };
|
||||
//float lightSpecular[] = { 0.8F, 0.6F, 1.0F, 1.0F };
|
||||
|
||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, lightAmbient);
|
||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, lightDiffuse);
|
||||
//glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, lightSpecular);
|
||||
//glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 70);
|
||||
|
||||
|
||||
rd->beforePrimitive();
|
||||
CoordinateFrame forDraw = rd->getObjectToWorldMatrix();
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glEnableClientState(GL_NORMAL_ARRAY);
|
||||
//if(_dataModel->getWorkspace() != NULL)
|
||||
|
||||
_dataModel->getWorkspace()->render(rd);
|
||||
//else throw std::exception("Workspace not found");
|
||||
|
||||
|
||||
|
||||
for (unsigned int i = 0; i < _dataModel->getWorkspace()->__pvVector.size(); i++)
|
||||
{
|
||||
_dataModel->getWorkspace()->__pvVector[i]->render(rd);
|
||||
}
|
||||
//_dataModel->getWorkspace()->render(rd);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
glDisableClientState(GL_NORMAL_ARRAY);
|
||||
rd->setObjectToWorldMatrix(forDraw);
|
||||
rd->afterPrimitive();
|
||||
|
||||
|
||||
//Draw::box(G3D::Box(mouse.getPosition()-Vector3(2,0.5F,1),mouse.getPosition()+Vector3(2,0.5F,1)), rd, Color3::cyan(), Color4::clear());
|
||||
|
||||
for(size_t i = 0; i < _dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
if(g_selectedInstances.size() > 0)
|
||||
{
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(g_dataModel->getSelectionService()->getSelection()[i]))
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
{
|
||||
Vector3 size = part->getSize();
|
||||
Vector3 pos = part->getPosition();
|
||||
drawOutline(Vector3(0+size.x/2, 0+size.y/2, 0+size.z/2) ,Vector3(0-size.x/2,0-size.y/2,0-size.z/2), rd, lighting, Vector3(size.x/2, size.y/2, size.z/2), Vector3(pos.x, pos.y, pos.z), part->getCFrame());
|
||||
}
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(g_selectedInstances.at(i)))
|
||||
{
|
||||
Vector3 size = part->getSize();
|
||||
Vector3 pos = part->getPosition();
|
||||
drawOutline(Vector3(0+size.x/2, 0+size.y/2, 0+size.z/2) ,Vector3(0-size.x/2,0-size.y/2,0-size.z/2), rd, lighting, Vector3(size.x/2, size.y/2, size.z/2), Vector3(pos.x, pos.y, pos.z), part->getCFrameRenderBased());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -625,7 +650,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
}
|
||||
renderDevice->push2D();
|
||||
_dataModel->getGuiRoot()->renderGUI(renderDevice, m_graphicsWatch.FPS());
|
||||
/*rd->pushState();
|
||||
rd->pushState();
|
||||
rd->beforePrimitive();
|
||||
|
||||
if(Globals::showMouse && mouseOnScreen)
|
||||
@@ -633,7 +658,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glEnable(GL_BLEND);// you enable blending function
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
/*
|
||||
|
||||
std::vector<Instance*> instances = _dataModel->getWorkspace()->getAllChildren();
|
||||
currentcursorid = cursorid;
|
||||
for(size_t i = 0; i < instances.size(); i++)
|
||||
@@ -650,8 +675,8 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*glBindTexture( GL_TEXTURE_2D, tool->getCursorId());
|
||||
|
||||
glBindTexture( GL_TEXTURE_2D, currentcursorid);
|
||||
|
||||
|
||||
glBegin( GL_QUADS );
|
||||
@@ -665,11 +690,11 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
glVertex2f( mousepos.x-64, mousepos.y+64 );
|
||||
glEnd();
|
||||
|
||||
glDisable( GL_TEXTURE_2D );*/
|
||||
//}
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
}
|
||||
|
||||
/*rd->afterPrimitive();
|
||||
rd->popState();*/
|
||||
rd->afterPrimitive();
|
||||
rd->popState();
|
||||
renderDevice->pop2D();
|
||||
}
|
||||
|
||||
@@ -679,28 +704,85 @@ void Application::onKeyPressed(int key)
|
||||
{
|
||||
deleteInstance();
|
||||
}
|
||||
if ((GetHoldKeyState(VK_LCONTROL) || GetHoldKeyState(VK_RCONTROL)) && key=='O')
|
||||
if (GetHoldKeyState(VK_RCONTROL))
|
||||
{
|
||||
if (key=='O')
|
||||
{
|
||||
_dataModel->getOpen();
|
||||
}
|
||||
}
|
||||
tool->onKeyDown(key);
|
||||
}
|
||||
void Application::onKeyUp(int key)
|
||||
{
|
||||
tool->onKeyUp(key);
|
||||
|
||||
}
|
||||
|
||||
void Application::onMouseLeftPressed(HWND hwnd,int x,int y)
|
||||
{
|
||||
//Removed set focus
|
||||
|
||||
|
||||
std::cout << "Click: " << x << "," << y << std::endl;
|
||||
|
||||
bool onGUI = _dataModel->getGuiRoot()->mouseInGUI(renderDevice, x, y);
|
||||
|
||||
|
||||
if(!onGUI)
|
||||
{
|
||||
tool->onButton1MouseDown(mouse);
|
||||
testRay = cameraController.getCamera()->worldRay(_dataModel->mousex, _dataModel->mousey, renderDevice->getViewport());
|
||||
float nearest=std::numeric_limits<float>::infinity();
|
||||
Vector3 camPos = cameraController.getCamera()->getCoordinateFrame().translation;
|
||||
std::vector<Instance*> instances = _dataModel->getWorkspace()->getAllChildren();
|
||||
bool objFound = false;
|
||||
for(size_t i = 0; i < instances.size(); i++)
|
||||
{
|
||||
if(PartInstance* test = dynamic_cast<PartInstance*>(instances.at(i)))
|
||||
{
|
||||
float time = testRay.intersectionTime(test->getBox());
|
||||
|
||||
if (time != inf())
|
||||
{
|
||||
objFound = true;
|
||||
if (nearest>time)
|
||||
{
|
||||
nearest=time;
|
||||
bool found = false;
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
{
|
||||
if(g_selectedInstances.at(i) == test)
|
||||
{
|
||||
found = true;
|
||||
//ShowWindow(_propWindow->_hwndProp, SW_SHOW);
|
||||
//SetActiveWindow(_propWindow->_hwndProp);
|
||||
//SetForegroundWindow(_propWindow->_hwndProp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
{
|
||||
g_selectedInstances.clear();
|
||||
g_selectedInstances.push_back(test);
|
||||
}
|
||||
selectInstance(test, _propWindow);
|
||||
//_message = "Dragging = true.";
|
||||
//_messageTime = System::time();
|
||||
//_dragging = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!objFound)
|
||||
selectInstance(_dataModel,_propWindow);
|
||||
}
|
||||
}
|
||||
|
||||
void Application::selectInstance(Instance* selectedInstance, PropertyWindow* propWindow)
|
||||
{
|
||||
g_selectedInstances.clear();
|
||||
g_selectedInstances.push_back(selectedInstance);
|
||||
propWindow->UpdateSelected(selectedInstance);
|
||||
|
||||
}
|
||||
G3D::RenderDevice* Application::getRenderDevice()
|
||||
{
|
||||
return renderDevice;
|
||||
@@ -708,28 +790,25 @@ G3D::RenderDevice* Application::getRenderDevice()
|
||||
|
||||
void Application::onMouseLeftUp(G3D::RenderDevice* renderDevice, int x, int y)
|
||||
{
|
||||
//std::cout << "Release: " << x << "," << y << std::endl;
|
||||
_dataModel->getGuiRoot()->onMouseLeftUp(renderDevice, x, y);
|
||||
_dragging = false;
|
||||
tool->onButton1MouseUp(mouse);
|
||||
//_message = "Dragging = false.";
|
||||
//_messageTime = System::time();
|
||||
|
||||
}
|
||||
|
||||
void Application::onMouseRightPressed(int x,int y)
|
||||
{
|
||||
tool->onButton2MouseDown(mouse);
|
||||
}
|
||||
void Application::onMouseRightUp(int x,int y)
|
||||
{
|
||||
tool->onButton2MouseUp(mouse);
|
||||
}
|
||||
void Application::onMouseMoved(int x,int y)
|
||||
{
|
||||
oldMouse = Vector2(mouse.x, mouse.y);
|
||||
mouse.oldx = mouse.x;
|
||||
mouse.oldy = mouse.y;
|
||||
mouse.x = x;
|
||||
mouse.y = y;
|
||||
//tool->onMouseMoved(mouse);
|
||||
mouseMoveState = true;
|
||||
oldMouse = _dataModel->getMousePos();
|
||||
_dataModel->mousex = x;
|
||||
_dataModel->mousey = y;
|
||||
|
||||
}
|
||||
void Application::onMouseWheel(int x,int y,short delta)
|
||||
@@ -739,7 +818,6 @@ void Application::onMouseWheel(int x,int y,short delta)
|
||||
{
|
||||
AudioPlayer::playSound(cameraSound);
|
||||
}
|
||||
tool->onMouseScroll(mouse);
|
||||
}
|
||||
|
||||
void Application::run() {
|
||||
@@ -763,16 +841,20 @@ void Application::run() {
|
||||
UpdateWindow(_hWndMain);
|
||||
|
||||
// Load objects here=
|
||||
|
||||
cursor = Texture::fromFile(GetFileInPath("/content/images/ArrowCursor.png"));
|
||||
cursorOvr = Texture::fromFile(GetFileInPath("/content/images/DragCursor.png"));
|
||||
Globals::surface = Texture::fromFile(GetFileInPath("/content/images/surfacebr.png"));
|
||||
Globals::surfaceId = Globals::surface->getOpenGLID();
|
||||
cameraSound = GetFileInPath("/content/sounds/SWITCH3.wav");
|
||||
clickSound = GetFileInPath("/content/sounds/switch.wav");
|
||||
dingSound = GetFileInPath("/content/sounds/electronicpingshort.wav");
|
||||
sky = Sky::create(NULL, ExePath() + "/content/sky/");
|
||||
cursorid = cursor->openGLID();
|
||||
currentcursorid = cursorid;
|
||||
cursorOvrid = cursorOvr->openGLID();
|
||||
RealTime now=0, lastTime=0;
|
||||
double simTimeRate = 1.0f;
|
||||
float fps=30.0f;
|
||||
float fps=3000.0f;
|
||||
|
||||
RealTime desiredFrameDuration=1.0/fps;
|
||||
onInit();
|
||||
@@ -786,7 +868,7 @@ void Application::run() {
|
||||
//renderDevice->setViewport(viewportRect);
|
||||
//window()->setInputCaptureCount(1);
|
||||
resizeWithParent(_hWndMain);
|
||||
glEnable(GL_CULL_FACE);
|
||||
|
||||
while (!quit)
|
||||
{
|
||||
|
||||
@@ -808,8 +890,6 @@ void Application::run() {
|
||||
RealTime rdt = timeStep;
|
||||
SimTime sdt = timeStep * rate;
|
||||
SimTime idt = desiredFrameDuration * rate;
|
||||
|
||||
|
||||
|
||||
onSimulation(rdt,sdt,idt);
|
||||
m_simulationWatch.tock();
|
||||
@@ -1,12 +1,9 @@
|
||||
#pragma once
|
||||
#include <G3DAll.h>
|
||||
#include "PropertyWindow.h"
|
||||
#include "DataModelV2/TextButtonInstance.h"
|
||||
#include "DataModelV2/ImageButtonInstance.h"
|
||||
#include "TextButtonInstance.h"
|
||||
#include "ImageButtonInstance.h"
|
||||
#include "CameraController.h"
|
||||
#include "IEBrowser.h"
|
||||
#include "Mouse.h"
|
||||
#include "Tool/Tool.h"
|
||||
//#include "GuiRoot.h"
|
||||
|
||||
class TextButtonInstance;
|
||||
@@ -28,10 +25,11 @@ class Application { // : public GApp {
|
||||
virtual void onUserInput(UserInput* ui);
|
||||
virtual void onCleanup();
|
||||
void clearInstances();
|
||||
void navigateToolbox(std::string);
|
||||
PartInstance* makePart();
|
||||
void drawButtons(RenderDevice* rd);
|
||||
void drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, LightingParameters lighting, Vector3 size, Vector3 pos, CoordinateFrame c);
|
||||
void makeFlag(Vector3 &vec, RenderDevice* &rd);
|
||||
std::vector<Instance*> getSelection();
|
||||
void deleteInstance();
|
||||
void run();
|
||||
void QuitApp();
|
||||
@@ -47,7 +45,6 @@ class Application { // : public GApp {
|
||||
void onMouseWheel(int x, int y, short delta);
|
||||
void setFocus(bool isFocused);
|
||||
int getMode();
|
||||
void unSetMode();
|
||||
CameraController cameraController;
|
||||
UserInput* userInput;
|
||||
PropertyWindow* _propWindow;
|
||||
@@ -55,13 +52,7 @@ class Application { // : public GApp {
|
||||
RenderDevice* getRenderDevice();
|
||||
void selectInstance(Instance* selectedInstance,PropertyWindow* propWindow);
|
||||
void setMode(int mode);
|
||||
|
||||
Tool * tool;
|
||||
void changeTool(Tool *);
|
||||
Mouse mouse;
|
||||
bool viewportHasFocus();
|
||||
private:
|
||||
bool mouseMoveState;
|
||||
RenderDevice* renderDevice;
|
||||
//void initGUI();
|
||||
HWND _hWndMain;
|
||||
@@ -81,7 +72,6 @@ class Application { // : public GApp {
|
||||
int _mode;
|
||||
GAppSettings _settings;
|
||||
double lightProjX, lightProjY, lightProjNear, lightProjFar;
|
||||
IEBrowser* webBrowser;
|
||||
protected:
|
||||
Stopwatch m_graphicsWatch;
|
||||
Stopwatch m_logicWatch;
|
||||
BIN
B3dIcon.ico
|
Before Width: | Height: | Size: 108 KiB |
@@ -1,6 +1,5 @@
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
#include "BaseButtonInstance.h"
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
|
||||
ButtonListener* listener = NULL;
|
||||
@@ -14,18 +13,19 @@ BaseButtonInstance::BaseButtonInstance(void)
|
||||
void BaseButtonInstance::render(RenderDevice* rd)
|
||||
{
|
||||
DataModelInstance* dataModel = g_dataModel;
|
||||
Vector2 pos = Vector2(g_usableApp->mouse.x,g_usableApp->mouse.y);
|
||||
drawObj(rd, pos, g_usableApp->mouse.isMouseDown());
|
||||
Vector2 pos = Vector2(dataModel->mousex,dataModel->mousey);
|
||||
drawObj(rd, pos, dataModel->mouseButton1Down);
|
||||
Instance::render(rd);
|
||||
}
|
||||
|
||||
BaseButtonInstance::~BaseButtonInstance(void)
|
||||
{
|
||||
delete listener;
|
||||
}
|
||||
|
||||
void BaseButtonInstance::setButtonListener(ButtonListener& buttonListener)
|
||||
void BaseButtonInstance::setButtonListener(ButtonListener* buttonListener)
|
||||
{
|
||||
listener = &buttonListener;
|
||||
listener = buttonListener;
|
||||
}
|
||||
|
||||
void BaseButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown){}
|
||||
@@ -37,6 +37,7 @@ void BaseButtonInstance::onMouseClick()
|
||||
if(listener != NULL)
|
||||
{
|
||||
listener->onButton1MouseClick(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "Instance.h"
|
||||
#include "Listener/ButtonListener.h"
|
||||
#include "instance.h"
|
||||
#include "ButtonListener.h"
|
||||
|
||||
class ButtonListener;
|
||||
class Instance;
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
virtual void drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown);
|
||||
virtual bool mouseInButton(float, float, RenderDevice* rd);
|
||||
virtual void onMouseClick();
|
||||
void setButtonListener(ButtonListener&);
|
||||
void setButtonListener(ButtonListener*);
|
||||
bool floatBottom;
|
||||
bool floatRight;
|
||||
bool floatCenter;
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="0.0.106.2"
|
||||
processorArchitecture="*"
|
||||
name="Blocks3D.Blocks3D.Blocks3D"
|
||||
type="win32"
|
||||
/>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
||||
937
Blocks3D.vcproj
@@ -1,937 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="Blocks3D"
|
||||
ProjectGUID="{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
RootNamespace="Blocks3D"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
UseOfATL="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/Blocks3D.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="".\src\include""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\Release/Blocks3D.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="4105"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Advapi32.lib Comctl32.lib Comdlg32.lib Shell32.lib ode.lib OPCODE.lib Ole32.lib"
|
||||
OutputFile="./Blocks3D.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release/Blocks3D.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Release/Blocks3D.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/Blocks3D.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""C:\libraries\ode-0.5\include\drawstuff";.\src\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
EnableFunctionLevelLinking="false"
|
||||
PrecompiledHeaderFile=".\Debug/Blocks3D.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="4105"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Advapi32.lib UxTheme.lib Comctl32.lib Comdlg32.lib Shell32.lib Urlmon.lib ole32.lib oleaut32.lib uuid.lib ode.lib OPCODE.lib"
|
||||
OutputFile="./Blocks3D-Debug.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/Blocks3D.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Debug/Blocks3D.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<AssemblyReference
|
||||
RelativePath="System.dll"
|
||||
AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Data.dll"
|
||||
AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Drawing.dll"
|
||||
AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Windows.Forms.dll"
|
||||
AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.XML.dll"
|
||||
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\Application.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\AudioPlayer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\ax.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\BrowserCallHandler.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\CameraController.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\ErrorFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Globals.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\IEBrowser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\IEDispatcher.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\main.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Mouse.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\propertyGrid.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\PropertyWindow.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Renderer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\StringFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\TextureHandler.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\WindowFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Tool"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\ArrowTool.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\SurfaceTool.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\Tool.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Listener"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\ButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\CameraButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\DeleteListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\GUDButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\MenuButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\ModeSelectionListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\RotateButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\ToolbarListener.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DataModelV2"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\DataModelInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\GroupInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\Instance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\LevelInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\PartInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\PVInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\SelectionService.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\WorkspaceInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Gui"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\BaseButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\BaseGuiInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\GuiRootInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\ImageButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\TextButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\ToggleImageButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="XplicitNgine"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\XplicitNgine\XplicitNgine.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Properties"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\Properties\BoolProperty.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Properties\Property.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\Application.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\AudioPlayer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\ax.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\BrowserCallHandler.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\CameraController.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Enum.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\ErrorFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Faces.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Globals.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\IEBrowser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\IEDispatcher.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Mouse.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\propertyGrid.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\PropertyWindow.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Renderer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\StringFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\TextureHandler.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\win32Defines.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\WindowFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="RapidXML"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml_iterators.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml_print.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml_utils.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Listener"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\ButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\CameraButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\DeleteListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\GUDButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\MenuButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\ModeSelectionListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\RotateButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\ToolbarListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\WorkspaceInstance.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Tool"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\Tool\ArrowTool.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Tool\SurfaceTool.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Tool\Tool.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DataModelV2"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\DataModelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\GroupInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\Instance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\LevelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\PartInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\PVInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\SelectionService.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\WorkspaceInstance.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Gui"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\BaseButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\BaseGuiInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\GuiRootInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\ImageButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\TextButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModelV2\ToggleImageButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="XplicitNgine"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\XplicitNgine\XplicitNgine.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Properties"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\Properties\BoolProperty.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Properties\Property.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Blocks3D.exe.manifest"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Dialogs.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\icon1.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Parts.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\roblox_RN1_icon.ico"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="Dialogs.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -1,10 +1,9 @@
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
#include "Listener/ButtonListener.h"
|
||||
#include "BaseButtonInstance.h"
|
||||
#include "ButtonListener.h"
|
||||
|
||||
|
||||
ButtonListener::ButtonListener()
|
||||
{
|
||||
doDelete = true;
|
||||
}
|
||||
|
||||
ButtonListener::~ButtonListener(void)
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
//#include "Application.h"
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
//#include "BaseButtonInstance.h"
|
||||
|
||||
class BaseButtonInstance;
|
||||
|
||||
@@ -10,7 +10,6 @@ class ButtonListener
|
||||
ButtonListener();
|
||||
~ButtonListener(void);
|
||||
virtual void onButton1MouseClick(BaseButtonInstance*);
|
||||
bool doDelete;
|
||||
//virtual void onMouseOver(); //TODO
|
||||
//virtual void onMouseOut(); //TODO
|
||||
//virtual void onButton1MouseDown(); //TODO
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Listener/CameraButtonListener.h"
|
||||
#include "CameraButtonListener.h"
|
||||
#include "Globals.h"
|
||||
#include "AudioPlayer.h"
|
||||
#include "Application.h"
|
||||
@@ -7,8 +7,8 @@ void CameraButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
AudioPlayer::playSound(cameraSound);
|
||||
CoordinateFrame frame = g_usableApp->cameraController.getCamera()->getCoordinateFrame();
|
||||
if(button->name == "CenterCam" && g_dataModel->getSelectionService()->getSelection().size() > 0)
|
||||
g_usableApp->cameraController.centerCamera(g_dataModel->getSelectionService()->getSelection()[0]);
|
||||
if(button->name == "CenterCam" && g_selectedInstances.size() > 0)
|
||||
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));
|
||||
else if(button->name == "ZoomIn")
|
||||
g_usableApp->cameraController.Zoom(1);
|
||||
else if(button->name == "ZoomOut")
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "CameraController.h"
|
||||
#include "win32Defines.h"
|
||||
#include <iostream>
|
||||
#include "DataModelV2/PartInstance.h"
|
||||
#include "PartInstance.h"
|
||||
#include "Application.h"
|
||||
#include "AudioPlayer.h"
|
||||
|
||||
@@ -57,35 +57,6 @@ void CameraController::refreshZoom(const CoordinateFrame& frame)
|
||||
|
||||
void CameraController::pan(CoordinateFrame* frame,float spdX, float spdY)
|
||||
{
|
||||
|
||||
yaw+=spdX;
|
||||
pitch+=spdY;
|
||||
|
||||
if (pitch>1.4f) pitch=1.4f;
|
||||
if (pitch<-1.4f) pitch=-1.4f;
|
||||
frame->translation = Vector3(sin(-yaw)*zoom*cos(pitch),sin(pitch)*zoom,cos(-yaw)*zoom*cos(pitch))+focusPosition;
|
||||
frame->lookAt(focusPosition);
|
||||
}
|
||||
|
||||
void CameraController::panLock(CoordinateFrame* frame,float spdX, float spdY)
|
||||
{
|
||||
int sign = 0;
|
||||
|
||||
|
||||
yaw = toDegrees(yaw);
|
||||
if((((yaw - fmod(yaw, 45)) / 45) * 45) < 0)
|
||||
{
|
||||
sign = 1;
|
||||
}
|
||||
yaw = fabs(yaw);
|
||||
yaw = ((yaw - fmod(yaw, 45)) / 45) * 45;
|
||||
yaw = toRadians(yaw);
|
||||
|
||||
if(sign==1)
|
||||
{
|
||||
yaw = yaw * -1;
|
||||
}
|
||||
|
||||
yaw+=spdX;
|
||||
pitch+=spdY;
|
||||
|
||||
@@ -134,14 +105,14 @@ void CameraController::Zoom(short delta)
|
||||
void CameraController::panLeft()
|
||||
{
|
||||
CoordinateFrame frame = g3dCamera.getCoordinateFrame();
|
||||
panLock(&frame,toRadians(-45),0);
|
||||
pan(&frame,toRadians(-45),0);
|
||||
setFrame(frame);
|
||||
|
||||
}
|
||||
void CameraController::panRight()
|
||||
{
|
||||
CoordinateFrame frame = g3dCamera.getCoordinateFrame();
|
||||
panLock(&frame,toRadians(45),0);
|
||||
pan(&frame,toRadians(45),0);
|
||||
setFrame(frame);
|
||||
}
|
||||
|
||||
@@ -159,11 +130,6 @@ void CameraController::tiltDown()
|
||||
setFrame(frame);
|
||||
}
|
||||
|
||||
void CameraController::zoomExtents()
|
||||
{
|
||||
// do some weird jank math
|
||||
}
|
||||
|
||||
void CameraController::centerCamera(Instance* selection)
|
||||
{
|
||||
CoordinateFrame frame = CoordinateFrame(g3dCamera.getCoordinateFrame().translation);
|
||||
@@ -193,8 +159,6 @@ void CameraController::update(Application* app)
|
||||
Vector3 cameraPos = g3dCamera.getCoordinateFrame().translation;
|
||||
CoordinateFrame frame = g3dCamera.getCoordinateFrame();
|
||||
bool moving=false;
|
||||
if(!app->viewportHasFocus())
|
||||
return;
|
||||
if(GetHoldKeyState('U')) {
|
||||
forwards = true;
|
||||
moving=true;
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <G3DAll.h>
|
||||
#include "DataModelV2/Instance.h"
|
||||
#include "Instance.h"
|
||||
#include "Globals.h"
|
||||
#include <string>
|
||||
|
||||
@@ -19,14 +19,12 @@ class CameraController {
|
||||
void lookAt(const Vector3& position);
|
||||
void refreshZoom(const CoordinateFrame& frame);
|
||||
void pan(CoordinateFrame* frame,float spdX,float spdY);
|
||||
void panLock(CoordinateFrame* frame,float spdX,float spdY);
|
||||
void update(Application* app);
|
||||
void centerCamera(Instance* selection);
|
||||
void panLeft();
|
||||
void panRight();
|
||||
void tiltUp();
|
||||
void tiltDown();
|
||||
void zoomExtents();
|
||||
void Zoom(short delta);
|
||||
bool onMouseWheel(int x, int y, short delta);
|
||||
GCamera* getCamera();
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <string>
|
||||
#include "DataModel/GuiRootInstance.h"
|
||||
#include "DataModel/DataModelInstance.h"
|
||||
#include "GuiRoot.h"
|
||||
#include "DataModelInstance.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
@@ -15,14 +15,14 @@ DataModelInstance::DataModelInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
workspace = new WorkspaceInstance();
|
||||
guiRoot = new GuiRootInstance();
|
||||
guiRoot = new GuiRoot();
|
||||
level = new LevelInstance();
|
||||
//children.push_back(workspace);
|
||||
//children.push_back(level);
|
||||
className = "dataModel";
|
||||
//mousex = 0;
|
||||
//mousey = 0;
|
||||
//mouseButton1Down = false;
|
||||
mousex = 0;
|
||||
mousey = 0;
|
||||
mouseButton1Down = false;
|
||||
showMessage = false;
|
||||
canDelete = false;
|
||||
_modY=0;
|
||||
@@ -30,19 +30,9 @@ DataModelInstance::DataModelInstance(void)
|
||||
level->setParent(this);
|
||||
_loadedFileName="..//skooter.rbxm";
|
||||
listicon = 5;
|
||||
running = false;
|
||||
|
||||
}
|
||||
|
||||
void DataModelInstance::toggleRun()
|
||||
{
|
||||
running = !running;
|
||||
}
|
||||
bool DataModelInstance::isRunning()
|
||||
{
|
||||
return running;
|
||||
}
|
||||
|
||||
DataModelInstance::~DataModelInstance(void)
|
||||
{
|
||||
}
|
||||
@@ -267,7 +257,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
xml_node<> *propNode = node->first_node();
|
||||
xml_node<> *cFrameNode=0;
|
||||
xml_node<> *sizeNode=0;
|
||||
xml_node<> *shapeNode=0;
|
||||
xml_node<> *colorNode=0;
|
||||
xml_node<> *brickColorNode=0;
|
||||
xml_node<> *nameNode=0;
|
||||
@@ -287,11 +276,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
{
|
||||
nameNode = partPropNode;
|
||||
}
|
||||
if (xmlValue=="shape")
|
||||
{
|
||||
shapeNode = partPropNode;
|
||||
_legacyLoad=false;
|
||||
}
|
||||
if (xmlValue=="Color")
|
||||
{
|
||||
colorNode=partPropNode;
|
||||
@@ -313,16 +297,11 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
{
|
||||
std::string xmlName = attr->name();
|
||||
std::string xmlValue = attr->value();
|
||||
if (xmlValue=="shape")
|
||||
{
|
||||
shapeNode = featureNode;
|
||||
_legacyLoad=true;
|
||||
}
|
||||
if (xmlValue=="size")
|
||||
{
|
||||
sizeNode=featureNode;
|
||||
_legacyLoad=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,21 +328,7 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
B = getFloatValue(colorNode,"B");
|
||||
}
|
||||
|
||||
Enum::Shape::Value partshape = Enum::Shape::Block;
|
||||
std::string pshape = shapeNode->value();
|
||||
if (shapeNode)
|
||||
{
|
||||
if(pshape == "0" || pshape == "Ball"){
|
||||
partshape = Enum::Shape::Ball;
|
||||
}
|
||||
if(pshape == "1" || pshape == "Block"){
|
||||
partshape = Enum::Shape::Block;
|
||||
}
|
||||
if(pshape == "2" || pshape == "Cylinder"){
|
||||
partshape = Enum::Shape::Cylinder;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string newName = nameNode->value();
|
||||
float X = getFloatValue(cFrameNode,"X");
|
||||
float Y = getFloatValue(cFrameNode,"Y");
|
||||
@@ -388,7 +353,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
PartInstance* test = makePart();
|
||||
test->setParent(getWorkspace());
|
||||
test->color = Color3(R,G,B);
|
||||
test->shape = partshape;
|
||||
if(brickColorNode)
|
||||
{
|
||||
test->color = bcToRGB(atoi(brickColorNode->value()));
|
||||
@@ -452,7 +416,6 @@ bool DataModelInstance::load(const char* filename, bool clearObjects)
|
||||
std::stringstream msg;
|
||||
msg << "Failed to load file:" << std::endl << filename << std::endl << strerror(errno);
|
||||
MessageBoxStr(msg.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +550,7 @@ WorkspaceInstance* DataModelInstance::getWorkspace()
|
||||
{
|
||||
return workspace;
|
||||
}
|
||||
/*Vector2 DataModelInstance::getMousePos()
|
||||
Vector2 DataModelInstance::getMousePos()
|
||||
{
|
||||
return Vector2(mousex,mousey);
|
||||
}
|
||||
@@ -600,8 +563,8 @@ void DataModelInstance::setMousePos(Vector2 pos)
|
||||
{
|
||||
mousex=pos.x;
|
||||
mousey=pos.y;
|
||||
}*/
|
||||
GuiRootInstance* DataModelInstance::getGuiRoot()
|
||||
}
|
||||
GuiRoot* DataModelInstance::getGuiRoot()
|
||||
{
|
||||
return guiRoot;
|
||||
}
|
||||
@@ -2,12 +2,10 @@
|
||||
#include "WorkspaceInstance.h"
|
||||
#include "LevelInstance.h"
|
||||
#include "PartInstance.h"
|
||||
#include "SelectionService.h"
|
||||
#include "rapidxml/rapidxml.hpp"
|
||||
#include "GuiRootInstance.h"
|
||||
#include "XplicitNgine/XplicitNgine.h"
|
||||
#include "GuiRoot.h"
|
||||
|
||||
class GuiRootInstance;
|
||||
class GuiRoot;
|
||||
|
||||
class DataModelInstance :
|
||||
public Instance
|
||||
@@ -24,19 +22,23 @@ public:
|
||||
bool readXMLFileStream(std::ifstream* file);
|
||||
void drawMessage(RenderDevice*);
|
||||
WorkspaceInstance* getWorkspace();
|
||||
WorkspaceInstance* workspace;
|
||||
LevelInstance * level;
|
||||
LevelInstance * getLevel();
|
||||
XplicitNgine * getEngine();
|
||||
GuiRoot* guiRoot;
|
||||
std::string message;
|
||||
std::string _loadedFileName;
|
||||
bool showMessage;
|
||||
G3D::GFontRef font;
|
||||
GuiRootInstance* getGuiRoot();
|
||||
SelectionService* getSelectionService();
|
||||
GuiRoot* getGuiRoot();
|
||||
float mousex;
|
||||
float mousey;
|
||||
Vector2 getMousePos();
|
||||
void setMousePos(int x,int y);
|
||||
void setMousePos(Vector2 pos);
|
||||
bool mouseButton1Down;
|
||||
PartInstance* makePart();
|
||||
void clearLevel();
|
||||
void toggleRun();
|
||||
bool isRunning();
|
||||
void resetEngine();
|
||||
#if _DEBUG
|
||||
void modXMLLevel(float modY);
|
||||
#endif
|
||||
@@ -49,10 +51,4 @@ private:
|
||||
std::string _errMsg;
|
||||
bool _legacyLoad;
|
||||
float _modY;
|
||||
WorkspaceInstance* workspace;
|
||||
LevelInstance * level;
|
||||
GuiRootInstance* guiRoot;
|
||||
SelectionService* selectionService;
|
||||
bool running;
|
||||
XplicitNgine * xplicitNgine;
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "Listener/DeleteListener.h"
|
||||
#include "DeleteListener.h"
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
BIN
Dialogs.aps
Normal file
139
Dialogs.rc
@@ -1,96 +1,43 @@
|
||||
// Generated by ResEdit 1.6.6
|
||||
// Copyright (C) 2006-2015
|
||||
// http://www.resedit.net
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.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 ) )
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Bitmap resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDB_BITMAP1 BITMAP "Parts.bmp"
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
1 VERSIONINFO
|
||||
FILEVERSION APP_GENER,APP_MAJOR,APP_MINOR,APP_PATCH
|
||||
PRODUCTVERSION APP_GENER,APP_MAJOR,APP_MINOR,APP_PATCH
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
FILEFLAGSMASK 0
|
||||
FILEFLAGS 0
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "100901B5"
|
||||
{
|
||||
VALUE "Comments", ""
|
||||
VALUE "CompanyName", "Blocks3D Team"
|
||||
VALUE "FileDescription", "Blocks 3D"
|
||||
VALUE "FileVersion", VER_STR(APP_VER_STRING)
|
||||
VALUE "InternalName", "Blocks3D"
|
||||
VALUE "LegalCopyright", "Blocks3D Team - 2022"
|
||||
VALUE "LegalTrademarks", ""
|
||||
VALUE "OriginalFilename", "Blocks3D.exe"
|
||||
VALUE "PrivateBuild", ""
|
||||
VALUE "ProductName", "Blocks3D"
|
||||
VALUE "ProductVersion", VER_STR(APP_VER_STRING)
|
||||
VALUE "SpecialBuild", ""
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x1009, 0x01B5
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Dialog resources
|
||||
//
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
IDD_DIALOG1 DIALOG 0, 0, 295, 43
|
||||
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFOREGROUND | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
|
||||
EXSTYLE WS_EX_WINDOWEDGE
|
||||
CAPTION "Insert Object"
|
||||
FONT 8, "Ms Shell Dlg"
|
||||
{
|
||||
EDITTEXT IDC_EDIT1, 35, 6, 195, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
||||
LTEXT "Class:", 0, 10, 9, 20, 9, SS_LEFT, WS_EX_LEFT
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 237, 24, 50, 14, 0, WS_EX_LEFT
|
||||
DEFPUSHBUTTON "OK", IDOK, 237, 6, 50, 14, 0, WS_EX_LEFT
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Icon resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDI_ICON1 ICON "FatB3dIcon.ico"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Manifest resources
|
||||
//
|
||||
#ifndef _DEBUG
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
1 MANIFEST ".\\Blocks3D.exe.manifest"
|
||||
#endif
|
||||
// Generated by ResEdit 1.6.6
|
||||
// Copyright (C) 2006-2015
|
||||
// http://www.resedit.net
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.h>
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Bitmap resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDB_BITMAP1 BITMAP "Parts.bmp"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Dialog resources
|
||||
//
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
IDD_DIALOG1 DIALOG 0, 0, 295, 43
|
||||
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFOREGROUND | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
|
||||
EXSTYLE WS_EX_WINDOWEDGE
|
||||
CAPTION "Insert Object"
|
||||
FONT 8, "Ms Shell Dlg"
|
||||
{
|
||||
EDITTEXT IDE_EDIT, 35, 6, 195, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
||||
LTEXT "Class:", 0, 10, 9, 20, 9, SS_LEFT, WS_EX_LEFT
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 237, 24, 50, 14, 0, WS_EX_LEFT
|
||||
DEFPUSHBUTTON "OK", IDOK, 237, 6, 50, 14, 0, WS_EX_LEFT
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Icon resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDI_ICON1 ICON "icon1.ico"
|
||||
|
||||
17
Enum.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
namespace Enum
|
||||
{
|
||||
namespace SurfaceType
|
||||
{
|
||||
enum Value {
|
||||
Smooth, Snaps, Inlets, Glue, Weld, Spawn, Hinge, Motor, Bumps
|
||||
};
|
||||
}
|
||||
namespace Shape
|
||||
{
|
||||
enum Value {
|
||||
Ball = 0, Block = 1, Cylinder = 2
|
||||
};
|
||||
}
|
||||
}
|
||||
16
Enums.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifdef UENUMS
|
||||
#ifndef ENUM_H
|
||||
#define ENUM_H
|
||||
static enum BinType {GameTool, Grab, Clone, Hammer};
|
||||
static enum ControllerType {None, KeyboardRight, KeyboardLeft, Joypad1, Joypad2, Chase, Flee};
|
||||
//static enum JointType {UNK0, WeldJoint, SnapJoint, UNK3, Rotate, RotateP, RotateV, GlueJoint, UNK8, UNK9, None};
|
||||
static enum ActionType {Nothing, Pause, Lose, Draw, Win};
|
||||
static enum AffectType {NoChange, Increase, Decrease};
|
||||
static enum InputType {NoInput, LeftTread, RightTread, Steer, Throtle, UpDown, Action1, Action2, Action3, Action4, Action5, Constant, Sin};
|
||||
//static enum SurfaceConstraint {None, Hinge, SteppingMotor, Motor};
|
||||
static enum SurfaceType{Smooth, Snaps, Inlets, Glue, Weld, Spawn, Hinge, Motor, Bumps};
|
||||
static enum SoundType {NoSound, Boing, Bomb, Break, Click, Clock, Slingshot, Page, Ping, Snap, Splat, Step, StepOn, Swoosh, Victory};
|
||||
static enum PartType {Ball, Block, Cylinder};
|
||||
static enum KeywordFilterType {Include, Exclude};
|
||||
#endif
|
||||
#endif
|
||||
@@ -3,13 +3,12 @@
|
||||
#include "Globals.h"
|
||||
|
||||
|
||||
|
||||
void OnError(int err, std::string msg)
|
||||
{
|
||||
//g_usableApp->window()->setInputCaptureCount(0);
|
||||
//g_usableApp->window()->setMouseVisible(true);
|
||||
std::string emsg = "An unexpected error has occured and "+g_appName+" has to quit. We're sorry!" + msg;
|
||||
std::string title = g_appName+" Crash";
|
||||
std::string emsg = "An unexpected error has occured and "+g_PlaceholderName+" has to quit. We're sorry!" + msg;
|
||||
std::string title = g_PlaceholderName+"Crash";
|
||||
//clearInstances();
|
||||
MessageBox(NULL, emsg.c_str(), title.c_str(), MB_OK);
|
||||
exit(err);
|
||||
@@ -18,13 +17,13 @@ void OnError(int err, std::string msg)
|
||||
|
||||
void MessageBoxStr(std::string msg)
|
||||
{
|
||||
std::string title = g_appName;
|
||||
std::string title = g_PlaceholderName;
|
||||
MessageBox(NULL, msg.c_str(), title.c_str(), MB_OK);
|
||||
}
|
||||
|
||||
void MessageBoxStream(std::stringstream msg)
|
||||
{
|
||||
std::string strMsg = msg.str();
|
||||
std::string title = g_appName;
|
||||
std::string title = g_PlaceholderName;
|
||||
MessageBox(NULL, strMsg.c_str(), title.c_str(), MB_OK);
|
||||
}
|
||||
BIN
FatB3dIcon.ico
|
Before Width: | Height: | Size: 108 KiB |
BIN
G3DTest.aps
Normal file
@@ -1,24 +1,24 @@
|
||||
# Microsoft Developer Studio Project File - Name="Blocks3D" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Project File - Name="G3DTest" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=Blocks3D - Win32 Debug
|
||||
CFG=G3DTest - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Blocks3D.mak".
|
||||
!MESSAGE NMAKE /f "G3DTest.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "Blocks3D.mak" CFG="Blocks3D - Win32 Debug"
|
||||
!MESSAGE NMAKE /f "G3DTest.mak" CFG="G3DTest - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "Blocks3D - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "Blocks3D - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "G3DTest - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "G3DTest - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@@ -29,7 +29,7 @@ CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "Blocks3D - Win32 Release"
|
||||
!IF "$(CFG)" == "G3DTest - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
@@ -54,7 +54,7 @@ LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "Blocks3D - Win32 Debug"
|
||||
!ELSEIF "$(CFG)" == "G3DTest - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
@@ -83,8 +83,8 @@ LINK32=link.exe
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "Blocks3D - Win32 Release"
|
||||
# Name "Blocks3D - Win32 Debug"
|
||||
# Name "G3DTest - Win32 Release"
|
||||
# Name "G3DTest - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "Blocks3D"=.\Blocks3D.dsp - Package Owner=<4>
|
||||
Project: "G3DTest"=.\G3DTest.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
BIN
G3DTest.opt
Normal file
32
G3DTest.plg
Normal file
@@ -0,0 +1,32 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: G3DTest - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp" with contents
|
||||
[
|
||||
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/G3DTest.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
|
||||
"C:\USERS\ANDREJA\G3D\G3DTest\main.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp"
|
||||
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/G3DTest.pdb" /debug /machine:I386 /out:"Debug/G3DTest.exe" /pdbtype:sept
|
||||
.\Debug\main.obj
|
||||
]
|
||||
Creating command line "link.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
main.cpp
|
||||
Linking...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
G3DTest.exe - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blocks3D", "Blocks3D.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "G3DTest", "G3DTest.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
579
G3DTest.vcproj
Normal file
@@ -0,0 +1,579 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="G3DTest"
|
||||
ProjectGUID="{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
RootNamespace="G3DTest"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
UseOfATL="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/G3DTest.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\Release/G3DTest.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="4105"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Advapi32.lib UxTheme.lib Comctl32.lib Comdlg32.lib Shell32.lib"
|
||||
OutputFile="./G3DTest.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release/G3DTest.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Release/G3DTest.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/G3DTest.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
EnableFunctionLevelLinking="false"
|
||||
PrecompiledHeaderFile=".\Debug/G3DTest.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="4105"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Advapi32.lib UxTheme.lib Comctl32.lib Comdlg32.lib Shell32.lib"
|
||||
OutputFile="./G3DTest-Debug.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/G3DTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Debug/G3DTest.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<AssemblyReference
|
||||
RelativePath="System.dll"
|
||||
AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Data.dll"
|
||||
AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Drawing.dll"
|
||||
AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Windows.Forms.dll"
|
||||
AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.XML.dll"
|
||||
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Application.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\AudioPlayer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ax.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BrowserCallHandler.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CameraController.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ErrorFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Globals.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GroupInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuiRoot.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IEBrowser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IEDispatcher.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="main.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\propertyGrid.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PropertyWindow.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StringFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\WindowFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Instance"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\BaseButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DataModelInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ImageButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Instance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LevelInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PartInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PVInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TextButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\WorkspaceInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Listeners"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\CameraButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DeleteListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GUDButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ModeSelectionListener.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RotateButtonListener.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Application.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\AudioPlayer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ax.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\BrowserCallHandler.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CameraController.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Demo.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Enum.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Enums.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ErrorFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Globals.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GuiRoot.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IEBrowser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IEDispatcher.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\LevelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\propertyGrid.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PropertyWindow.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rapidxml\rapidxml.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rapidxml\rapidxml_iterators.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rapidxml\rapidxml_print.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rapidxml\rapidxml_utils.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RotateButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\StringFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\win32Defines.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\WindowFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Instance"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\BaseButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DataModelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GroupInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ImageButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Instance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PartInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PVInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\TextButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\WorkspaceInstance.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Listeners"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\CameraButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DeleteListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\GUDButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ModeSelectionListener.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Dialogs.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\icon1.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Parts.bmp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="Dialogs.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
40
GUDButtonListener.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include <G3DAll.h>
|
||||
#include "Application.h"
|
||||
#include "Globals.h"
|
||||
#include "AudioPlayer.h"
|
||||
#include "GUDButtonListener.h"
|
||||
|
||||
void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
bool cont = false;
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
if(g_selectedInstances.at(i)->canDelete)
|
||||
{
|
||||
cont = true;
|
||||
break;
|
||||
}
|
||||
if(cont)
|
||||
{
|
||||
AudioPlayer::playSound(dingSound);
|
||||
if(button->name == "Duplicate")
|
||||
{
|
||||
std::vector<Instance*> newinst;
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
{
|
||||
if(g_selectedInstances.at(i)->canDelete)
|
||||
{
|
||||
Instance* tempinst = g_selectedInstances.at(i);
|
||||
|
||||
Instance* clonedInstance = g_selectedInstances.at(i)->clone();
|
||||
|
||||
newinst.push_back(tempinst);
|
||||
}
|
||||
/*tempinst->setPosition(Vector3(tempPos.x, tempPos.y + tempSize.y, tempPos.z));
|
||||
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));*/
|
||||
}
|
||||
g_selectedInstances = newinst;
|
||||
if(g_selectedInstances.size() > 0)
|
||||
g_usableApp->_propWindow->UpdateSelected(newinst.at(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
int const Globals::gen = 0;
|
||||
int const Globals::major = 0;
|
||||
int const Globals::minor = 4;
|
||||
int const Globals::patch = 2;
|
||||
int Globals::surfaceId = 2;
|
||||
//bool Globals::showMouse = true;
|
||||
bool Globals::showMouse = true;
|
||||
bool Globals::useMousePoint = false;
|
||||
std::vector<Instance*> postRenderStack = std::vector<Instance*>();
|
||||
|
||||
std::vector<Instance*> g_selectedInstances = std::vector<Instance*>();
|
||||
DataModelInstance* g_dataModel = NULL;
|
||||
XplicitNgine* g_xplicitNgine = NULL;
|
||||
|
||||
bool running = false;
|
||||
G3D::TextureRef Globals::surface;
|
||||
@@ -15,7 +19,6 @@ POINT Globals::mousepoint;
|
||||
|
||||
GFontRef g_fntdominant = NULL;
|
||||
GFontRef g_fntlighttrek = NULL;
|
||||
HWND Globals::mainHwnd = NULL;
|
||||
|
||||
Globals::Globals(void){}
|
||||
|
||||
@@ -25,6 +28,4 @@ std::string cameraSound="";
|
||||
std::string clickSound="";
|
||||
std::string dingSound="";
|
||||
|
||||
Application *g_usableApp = NULL;
|
||||
|
||||
COLORREF g_acrCustClr[16] = {RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255),RGB(255,255,255)};
|
||||
Application *g_usableApp = NULL;
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "DataModelV2/DataModelInstance.h"
|
||||
#include "XplicitNgine/XplicitNgine.h"
|
||||
#include "DataModelInstance.h"
|
||||
#include <G3DAll.h>
|
||||
|
||||
class Application;
|
||||
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
Globals(void);
|
||||
~Globals(void);
|
||||
static DataModelInstance* dataModel;
|
||||
//static bool showMouse;
|
||||
static bool showMouse;
|
||||
static POINT mousepoint;
|
||||
static bool useMousePoint;
|
||||
static const int gen;
|
||||
@@ -19,23 +19,19 @@ public:
|
||||
static const int patch;
|
||||
static G3D::TextureRef surface;
|
||||
static int surfaceId;
|
||||
static const std::string g_appName;
|
||||
static COLORREF g_acrCustClr[16]; //Will be dynamic later
|
||||
static HWND mainHwnd;
|
||||
static const std::string g_PlaceholderName;
|
||||
};
|
||||
|
||||
extern std::vector<Instance*> postRenderStack;
|
||||
extern std::vector<Instance*> g_selectedInstances;
|
||||
extern bool running;
|
||||
extern DataModelInstance* g_dataModel;
|
||||
extern XplicitNgine* g_xplicitNgine;
|
||||
extern Application* g_usableApp;
|
||||
|
||||
extern GFontRef g_fntdominant;
|
||||
extern GFontRef g_fntlighttrek;
|
||||
|
||||
extern COLORREF g_acrCustClr[16]; //Will be dynamic later
|
||||
extern std::string cameraSound;
|
||||
extern std::string clickSound;
|
||||
extern std::string dingSound;
|
||||
extern HWND mainHwnd;
|
||||
const std::string g_appName = "Blocks3D";
|
||||
const std::string g_PlaceholderName = "HyperCube";
|
||||
30
GroupInstance.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "GroupInstance.h"
|
||||
|
||||
GroupInstance::GroupInstance(void)
|
||||
{
|
||||
PVInstance::PVInstance();
|
||||
className = "GroupInstance";
|
||||
listicon = 12;
|
||||
}
|
||||
|
||||
GroupInstance::GroupInstance(const GroupInstance &oinst)
|
||||
{
|
||||
PVInstance::PVInstance(oinst);
|
||||
listicon = 12;
|
||||
}
|
||||
|
||||
GroupInstance::~GroupInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::vector<PROPGRIDITEM> GroupInstance::getProperties()
|
||||
{
|
||||
std::vector<PROPGRIDITEM> properties = PVInstance::getProperties();
|
||||
return properties;
|
||||
}
|
||||
void GroupInstance::PropUpdate(LPPROPGRIDITEM &pItem)
|
||||
{
|
||||
PVInstance::PropUpdate(pItem);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "PartInstance.h"
|
||||
#include "PVInstance.h"
|
||||
|
||||
class GroupInstance :
|
||||
public PVInstance
|
||||
@@ -10,7 +10,5 @@ public:
|
||||
GroupInstance(const GroupInstance &oinst);
|
||||
virtual std::vector<PROPGRIDITEM> getProperties();
|
||||
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
||||
std::vector<Instance *> unGroup();
|
||||
PartInstance * primaryPart;
|
||||
void render(RenderDevice * r);
|
||||
|
||||
};
|
||||
@@ -1,25 +1,22 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include "G3DAll.h"
|
||||
#include "DataModel/BaseButtonInstance.h"
|
||||
#include "DataModel/TextButtonInstance.h"
|
||||
#include "DataModel/ImageButtonInstance.h"
|
||||
#include "DataModel/ToggleImageButtonInstance.h"
|
||||
#include "DataModel/GuiRootInstance.h"
|
||||
#include "DataModel/ImageButtonInstance.h"
|
||||
#include "BaseButtonInstance.h"
|
||||
#include "TextButtonInstance.h"
|
||||
#include "ImageButtonInstance.h"
|
||||
#include "GuiRoot.h"
|
||||
#include "Globals.h"
|
||||
#include "StringFunctions.h"
|
||||
|
||||
#include "Listener/GUDButtonListener.h"
|
||||
#include "Listener/ModeSelectionListener.h"
|
||||
#include "Listener/MenuButtonListener.h"
|
||||
#include "Listener/RotateButtonListener.h"
|
||||
#include "Listener/CameraButtonListener.h"
|
||||
#include "Listener/DeleteListener.h"
|
||||
#include "Listener/ToolbarListener.h"
|
||||
#include "GUDButtonListener.h"
|
||||
#include "ModeSelectionListener.h"
|
||||
#include "RotateButtonListener.h"
|
||||
#include "CameraButtonListener.h"
|
||||
#include "DeleteListener.h"
|
||||
|
||||
#include "ImageButtonInstance.h"
|
||||
|
||||
ImageButtonInstance* GuiRootInstance::makeImageButton(G3D::TextureRef newImage = NULL, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL)
|
||||
ImageButtonInstance* GuiRoot::makeImageButton(G3D::TextureRef newImage = NULL, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL)
|
||||
{
|
||||
ImageButtonInstance* part = new ImageButtonInstance(newImage,overImage, downImage, disableImage);
|
||||
// instances.push_back(part);
|
||||
@@ -27,20 +24,17 @@ ImageButtonInstance* GuiRootInstance::makeImageButton(G3D::TextureRef newImage =
|
||||
return part;
|
||||
}
|
||||
|
||||
TextButtonInstance* GuiRootInstance::makeTextButton()
|
||||
TextButtonInstance* GuiRoot::makeTextButton()
|
||||
{
|
||||
TextButtonInstance* part = new TextButtonInstance();
|
||||
return part;
|
||||
}
|
||||
ToolbarListener * toolbar;
|
||||
GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
|
||||
GuiRoot::GuiRoot() : _message(""), _messageTime(0)
|
||||
{
|
||||
toolbar = new ToolbarListener();
|
||||
toolbar->doDelete = false;
|
||||
g_fntdominant = GFont::fromFile(GetFileInPath("/content/font/dominant.fnt"));
|
||||
g_fntlighttrek = GFont::fromFile(GetFileInPath("/content/font/lighttrek.fnt"));
|
||||
|
||||
//Bottom Left
|
||||
TextButtonInstance* button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -24);
|
||||
button->boxEnd = Vector2(80, 0);
|
||||
@@ -52,11 +46,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->title = "Hopper";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar->addButtonRef(button);
|
||||
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -48);
|
||||
@@ -69,10 +58,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->title = "Controller";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar->addButtonRef(button);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -72);
|
||||
@@ -85,10 +70,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->title = "Color";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar->addButtonRef(button);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -96);
|
||||
@@ -101,10 +82,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->title = "Surface";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar->addButtonRef(button);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -120);
|
||||
@@ -113,16 +90,11 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3(0,255,255);
|
||||
button->boxOutlineColor = Color3(0,255,255);
|
||||
button->title = "Model";
|
||||
button->selected = true;
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar->addButtonRef(button);
|
||||
|
||||
//Top bar
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, 0);
|
||||
button->boxEnd = Vector2(125, 25);
|
||||
@@ -135,9 +107,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
button->name = "file";
|
||||
button->setButtonListener(new MenuButtonListener());
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(125, 0);
|
||||
@@ -151,7 +120,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(250, 0);
|
||||
@@ -165,7 +133,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(375, 0);
|
||||
@@ -179,7 +146,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(500, 0);
|
||||
@@ -193,10 +159,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
|
||||
//Menu
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0,215);
|
||||
button->boxEnd = Vector2(80,235);
|
||||
@@ -211,7 +176,7 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->font = g_fntlighttrek;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setParent(this);
|
||||
button->setButtonListener(new GUDButtonListener());
|
||||
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0,240);
|
||||
@@ -227,7 +192,6 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->font = g_fntlighttrek;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setParent(this);
|
||||
button->setButtonListener(new GUDButtonListener());
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0,265);
|
||||
@@ -245,16 +209,10 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
button->name = "Duplicate";
|
||||
button->setButtonListener(new GUDButtonListener());
|
||||
|
||||
ImageButtonInstance* instance = new ToggleImageButtonInstance(
|
||||
ImageButtonInstance* instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/Run.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Run_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Run_dn.png")),
|
||||
NULL,
|
||||
Texture::fromFile(GetFileInPath("/content/images/Stop.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Stop_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Stop_dn.png"))
|
||||
);
|
||||
instance->setButtonListener(new MenuButtonListener());
|
||||
Texture::fromFile(GetFileInPath("/content/images/Run_dn.png")));
|
||||
instance->name = "go";
|
||||
instance->size = Vector2(65,65);
|
||||
instance->position = Vector2(6.5, 25);
|
||||
@@ -411,24 +369,24 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
}
|
||||
|
||||
|
||||
void GuiRootInstance::drawButtons(RenderDevice* rd)
|
||||
void GuiRoot::drawButtons(RenderDevice* rd)
|
||||
{
|
||||
rd->pushState();
|
||||
rd->beforePrimitive();
|
||||
//this->render(rd);
|
||||
this->render(rd);
|
||||
rd->afterPrimitive();
|
||||
rd->popState();
|
||||
}
|
||||
|
||||
void GuiRootInstance::setDebugMessage(std::string msg, G3D::RealTime msgTime)
|
||||
void GuiRoot::setDebugMessage(std::string msg, G3D::RealTime msgTime)
|
||||
{
|
||||
_messageTime = msgTime;
|
||||
_message = msg;
|
||||
}
|
||||
|
||||
//void GuiRootInstance::render(G3D::RenderDevice* renderDevice) {}
|
||||
//void GuiRoot::render(G3D::RenderDevice* renderDevice) {}
|
||||
|
||||
void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
void GuiRoot::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
{
|
||||
//TODO--Move these to their own instance
|
||||
|
||||
@@ -445,7 +403,7 @@ void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
#endif
|
||||
//GUI Boxes
|
||||
Draw::box(G3D::Box(Vector3(0,25,0),Vector3(80,355,0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
Draw::box(G3D::Box(Vector3(rd->getWidth() - 120,rd->getHeight() - 117,0),Vector3(rd->getWidth(),rd->getHeight(),0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
Draw::box(G3D::Box(Vector3(rd->getWidth() - 120,rd->getHeight() - 120,0),Vector3(rd->getWidth(),rd->getHeight(),0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
|
||||
//Camera menu title
|
||||
g_fntlighttrek->draw2D(rd, "CameraMenu", Vector2(rd->getWidth()-(g_fntlighttrek->get2DStringBounds("CameraMenu", 14).x+1),rd->getHeight() - 120), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F));
|
||||
@@ -455,7 +413,7 @@ void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
g_fntlighttrek->draw2D(rd,"MENU", Vector2(10,332), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F));
|
||||
|
||||
|
||||
//drawButtons(rd);
|
||||
drawButtons(rd);
|
||||
if(System::time() - 3 < _messageTime)
|
||||
{
|
||||
g_fntdominant->draw2D(rd, _message, Vector2((rd->getWidth()/2)-(g_fntdominant->get2DStringBounds(_message, 20).x/2),(rd->getHeight()/2)-(g_fntdominant->get2DStringBounds(_message, 20).y/2)), 20, Color3::yellow(), Color3::black());
|
||||
@@ -465,7 +423,7 @@ void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
render(rd);
|
||||
}
|
||||
|
||||
bool GuiRootInstance::mouseInGUI(G3D::RenderDevice* renderDevice,int x,int y)
|
||||
bool GuiRoot::mouseInGUI(G3D::RenderDevice* renderDevice,int x,int y)
|
||||
{
|
||||
std::vector<Instance*> instances_2D = g_dataModel->getGuiRoot()->getAllChildren();
|
||||
for(size_t i = 0; i < instances_2D.size(); i++)
|
||||
@@ -481,7 +439,7 @@ bool GuiRootInstance::mouseInGUI(G3D::RenderDevice* renderDevice,int x,int y)
|
||||
return false;
|
||||
}
|
||||
|
||||
void GuiRootInstance::update()
|
||||
void GuiRoot::update()
|
||||
{
|
||||
Instance * obj6 = this->findFirstChild("Delete");
|
||||
Instance * obj = this->findFirstChild("Duplicate");
|
||||
@@ -517,12 +475,7 @@ void GuiRootInstance::update()
|
||||
}
|
||||
}
|
||||
|
||||
GuiRootInstance::~GuiRootInstance()
|
||||
{
|
||||
delete toolbar;
|
||||
}
|
||||
|
||||
void GuiRootInstance::onMouseLeftUp(G3D::RenderDevice* renderDevice, int x,int y)
|
||||
void GuiRoot::onMouseLeftUp(G3D::RenderDevice* renderDevice, int x,int y)
|
||||
{
|
||||
std::vector<Instance*> instances_2D = this->getAllChildren();
|
||||
for(size_t i = 0; i < instances_2D.size(); i++)
|
||||
@@ -5,11 +5,10 @@ class ImageButtonInstance;
|
||||
|
||||
class TextButtonInstance;
|
||||
|
||||
class GuiRootInstance : public Instance
|
||||
class GuiRoot : public Instance
|
||||
{
|
||||
public:
|
||||
GuiRootInstance();
|
||||
GuiRootInstance::~GuiRootInstance();
|
||||
GuiRoot();
|
||||
TextButtonInstance* makeTextButton();
|
||||
void drawButtons(RenderDevice* rd);
|
||||
ImageButtonInstance* makeImageButton(G3D::TextureRef newImage, G3D::TextureRef overImage, G3D::TextureRef downImage, G3D::TextureRef disableImage);
|
||||
105
IEBrowser.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "IEBrowser.h"
|
||||
#include "Globals.h"
|
||||
#include "ax.h"
|
||||
//#include "IEDispatcher.h"
|
||||
|
||||
void IEBrowser::Boop(char* test)
|
||||
{
|
||||
}
|
||||
|
||||
IEBrowser::IEBrowser(HWND attachHWnd) {
|
||||
MSG messages;
|
||||
while (PeekMessage (&messages, NULL, 0, 0,PM_REMOVE))
|
||||
{
|
||||
if (IsDialogMessage(hwnd, &messages) == 0)
|
||||
{
|
||||
TranslateMessage(&messages);
|
||||
DispatchMessage(&messages);
|
||||
}
|
||||
}
|
||||
hwnd = attachHWnd;
|
||||
spDocument = 0;
|
||||
webBrowser = 0;
|
||||
SendMessage(hwnd,AX_INPLACE,1,0);
|
||||
SendMessage(hwnd,AX_QUERYINTERFACE,(WPARAM)&IID_IWebBrowser2,(LPARAM)&webBrowser);
|
||||
}
|
||||
|
||||
IEBrowser::~IEBrowser(void) {
|
||||
if (webBrowser)
|
||||
{
|
||||
webBrowser->Release();
|
||||
}
|
||||
}
|
||||
|
||||
// Something goes here
|
||||
int IEBrowser::setExternal(IDispatch** ext)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool IEBrowser::navigateSyncURL(wchar_t* url)
|
||||
{
|
||||
MSG messages;
|
||||
if (webBrowser)
|
||||
{
|
||||
webBrowser->Navigate(url,0,0,0,0);
|
||||
for (int i=1;i<1000;i++)
|
||||
{
|
||||
while (PeekMessage (&messages, NULL, 0, 0,PM_REMOVE))
|
||||
{
|
||||
if (IsDialogMessage(hwnd, &messages) == 0)
|
||||
{
|
||||
TranslateMessage(&messages);
|
||||
DispatchMessage(&messages);
|
||||
}
|
||||
}
|
||||
|
||||
Sleep(30);
|
||||
|
||||
HRESULT hresult = webBrowser->get_Document(&spDocument);
|
||||
if (SUCCEEDED(hresult) && (spDocument != 0))
|
||||
{
|
||||
|
||||
IOleObject* spOleObject;
|
||||
if (SUCCEEDED(spDocument->QueryInterface(IID_IOleObject,(void**)&spOleObject)))
|
||||
{
|
||||
IOleClientSite* spClientSite;
|
||||
hresult = spOleObject->GetClientSite(&spClientSite);
|
||||
if (SUCCEEDED(hresult) && spClientSite)
|
||||
{
|
||||
m_spDefaultDocHostUIHandler = spClientSite;
|
||||
ICustomDoc* spCustomDoc;
|
||||
|
||||
//IEDispatcher* spIEDispatcher;
|
||||
if (SUCCEEDED(m_spDefaultDocHostUIHandler->QueryInterface(IID_IDocHostUIHandler,(void**)&m_spHandler)))
|
||||
{
|
||||
if (SUCCEEDED(spDocument->QueryInterface(IID_ICustomDoc,(void**)&spCustomDoc)))
|
||||
{
|
||||
spCustomDoc->SetUIHandler(m_spHandler);
|
||||
|
||||
m_spHandler->GetExternal(&m_spExternal);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL,"Cannot read IWebBrowser2...",(g_PlaceholderName+" Crash").c_str(),MB_OK);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
23
IEBrowser.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//#include "WindowFunctions.h"
|
||||
#pragma once
|
||||
#include <mshtml.h>
|
||||
#include <exdisp.h>
|
||||
#include <Mshtmhst.h>
|
||||
|
||||
class IEBrowser {
|
||||
public:
|
||||
IEBrowser(HWND attachHWnd);
|
||||
~IEBrowser(void);
|
||||
bool navigateSyncURL(wchar_t* url);
|
||||
void Boop(char* test);
|
||||
private:
|
||||
IWebBrowser2* webBrowser;
|
||||
HWND hwnd;
|
||||
IDispatch* spDocument;
|
||||
IHTMLDocument* spDocument2;
|
||||
IDocHostUIHandler* m_spHandler;
|
||||
IDispatch* m_spExternal;
|
||||
IDispatch* m_newExternal;
|
||||
IOleClientSite* m_spDefaultDocHostUIHandler;
|
||||
int setExternal(IDispatch** ext);
|
||||
};
|
||||
@@ -2,9 +2,11 @@
|
||||
#include "oaidl.h"
|
||||
//DEFINE_GUID(CLSID_G3d, 0xB323F8E0L, 0x2E68, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6F);
|
||||
|
||||
/*
|
||||
class IEDispatcher : public IDispatch
|
||||
{
|
||||
/*
|
||||
*/
|
||||
|
||||
EXTERN_C const IID IID_IDispatch;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
@@ -12,7 +14,6 @@ EXTERN_C const IID IID_IDispatch;
|
||||
MIDL_INTERFACE("B323F8E0-2E68-11D0-90EA-00AA0060F86F")
|
||||
IEDispatcher : public IDispatch
|
||||
{
|
||||
*/
|
||||
public:
|
||||
IEDispatcher(void);
|
||||
~IEDispatcher(void);
|
||||
@@ -26,4 +27,4 @@ public:
|
||||
|
||||
};
|
||||
|
||||
//#endif
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "DataModel/ImageButtonInstance.h"
|
||||
#include "ImageButtonInstance.h"
|
||||
|
||||
ImageButtonInstance::ImageButtonInstance(G3D::TextureRef newImage, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL)
|
||||
{
|
||||
@@ -1,48 +0,0 @@
|
||||
;InnoSetupVersion=5.4.3
|
||||
#define AppVer GetFileVersion('..\Blocks3D.exe')
|
||||
|
||||
[Setup]
|
||||
AppName=Blocks3D
|
||||
AppVersion=v{#AppVer}
|
||||
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
|
||||
AppPublisherURL=http://blocks3d.com/
|
||||
AppSupportURL=http://blocks3d.com/
|
||||
AppUpdatesURL=http://blocks3d.com/
|
||||
DefaultDirName={%localappdata}\Blocks3D
|
||||
OutputBaseFilename=Blocks3D_Setup_v{#AppVer}
|
||||
Compression=lzma2
|
||||
PrivilegesRequired=lowest
|
||||
WizardImageFile=setup.bmp
|
||||
DefaultGroupName=Blocks3D
|
||||
|
||||
|
||||
[UninstallDelete]
|
||||
Type: filesandordirs; Name: "{app}"
|
||||
|
||||
[Files]
|
||||
Source: "Redist\vcredist_x86.exe"; DestDir: "{tmp}"; Flags: ignoreversion
|
||||
Source: "Redist\vcredist_x64.exe"; DestDir: "{tmp}"; Check: "IsWin64"; Flags: ignoreversion
|
||||
Source: "..\content\*"; DestDir: "{app}\content"; Flags: ignoreversion recursesubdirs
|
||||
Source: "..\SDL.DLL"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
||||
Source: "..\Blocks3D.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
||||
|
||||
[Registry]
|
||||
|
||||
|
||||
[Run]
|
||||
Filename: "{tmp}\vcredist_x86.exe"; Parameters: "/q"; Tasks: instvc;
|
||||
Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/q"; Tasks: instvc; Check: "IsWin64";
|
||||
Filename: "iexplore.exe"; Parameters: "http://www.blocks3d.com/FirstInstall"; Description: Start playing Blocks3D; Flags: shellexec postinstall nowait skipifsilent
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\Play Blocks3D"; Filename: "{%programfiles}\Internet Explorer\iexplore.exe"; Parameters: "http://www.blocks3d.com/Games"; IconFilename: "{app}\Blocks3D.exe"; Tasks: startscut;
|
||||
Name: "{group}\Blocks3D Editor"; Filename: "{app}\Blocks3D.exe"; Tasks: startscut;
|
||||
|
||||
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";
|
||||
Name: "startscut"; Description: "Create Start Menu Icons";
|
||||
|
||||
|
Before Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
@@ -1,7 +1,6 @@
|
||||
#define WINVER 0x0400
|
||||
#include <G3DAll.h>
|
||||
#include "DataModelV2/Instance.h"
|
||||
|
||||
#include "Instance.h"
|
||||
|
||||
|
||||
Instance::Instance(void)
|
||||
@@ -115,6 +114,21 @@ std::vector<Instance* > Instance::getAllChildren()
|
||||
return children;
|
||||
}
|
||||
|
||||
std::vector<Instance* > Instance::compileAndGetPVVector()
|
||||
{
|
||||
std::vector<Instance* > totalchildren;
|
||||
if(!children.empty())
|
||||
{
|
||||
for(size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
std::vector<Instance* > subchildren = children.at(i)->compileAndGetPVVector();
|
||||
if(!subchildren.empty())
|
||||
totalchildren.insert(totalchildren.end(), subchildren.begin(), subchildren.end());
|
||||
}
|
||||
}
|
||||
return totalchildren;
|
||||
}
|
||||
|
||||
void Instance::setParent(Instance* newParent)
|
||||
{
|
||||
if(parent != NULL)
|
||||
@@ -140,10 +154,6 @@ void Instance::addChild(Instance* newChild)
|
||||
|
||||
void Instance::clearChildren()
|
||||
{
|
||||
for (size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
delete children.at(i);
|
||||
}
|
||||
children.clear();
|
||||
}
|
||||
void Instance::removeChild(Instance* oldChild)
|
||||
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
#include <G3DAll.h>
|
||||
#include "propertyGrid.h"
|
||||
#include "map"
|
||||
//#include "Properties/BoolProperty.h"
|
||||
|
||||
class Instance
|
||||
{
|
||||
@@ -14,11 +12,11 @@ public:
|
||||
std::string name;
|
||||
virtual void render(RenderDevice*);
|
||||
virtual void update();
|
||||
std::vector<Instance*> children; // All children.
|
||||
std::string getClassName();
|
||||
Instance* findFirstChild(std::string);
|
||||
std::vector<Instance* > getChildren();
|
||||
std::vector<Instance* > getAllChildren();
|
||||
std::vector<Instance* > compileAndGetPVVector();
|
||||
virtual void setParent(Instance*);
|
||||
void setName(std::string newName);
|
||||
void addChild(Instance*);
|
||||
@@ -30,9 +28,9 @@ public:
|
||||
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
||||
int listicon;
|
||||
protected:
|
||||
std::vector<Instance*> children; // All children.
|
||||
std::string className;
|
||||
Instance* parent; // Another pointer.
|
||||
PROPGRIDITEM createPGI(LPSTR catalog, LPSTR propName, LPSTR propDesc, LPARAM curVal, INT type, TCHAR choices[] = NULL);
|
||||
private:
|
||||
static const std::map<std::string, Instance> g_logLevelsDescriptions;
|
||||
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "DataModel/LevelInstance.h"
|
||||
#include "LevelInstance.h"
|
||||
|
||||
LevelInstance::LevelInstance(void)
|
||||
{
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "Globals.h"
|
||||
#include "DataModelV2/Instance.h"
|
||||
#include "Listener/ModeSelectionListener.h"
|
||||
#include "Instance.h"
|
||||
#include "ModeSelectionListener.h"
|
||||
#include "Application.h"
|
||||
#include "Tool/ArrowTool.h"
|
||||
|
||||
void ModeSelectionListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
@@ -21,7 +20,7 @@ void ModeSelectionListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
|
||||
button->selected = true;
|
||||
if(button->name == "Cursor")
|
||||
g_usableApp->changeTool(new ArrowTool());
|
||||
g_usableApp->setMode(CURSOR);
|
||||
else if(button->name == "Resize")
|
||||
g_usableApp->setMode(RESIZE);
|
||||
else if(button->name == "Arrows")
|
||||
@@ -1,6 +0,0 @@
|
||||
Open Dynamics Engine
|
||||
|
||||
Copyright (c) 2001-2004,
|
||||
Russell L. Smith.
|
||||
|
||||
All rights reserved.
|
||||
80
PVInstance.cpp
Normal file
@@ -0,0 +1,80 @@
|
||||
#include "PVInstance.h"
|
||||
#include "WorkspaceInstance.h"
|
||||
|
||||
PVInstance::PVInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
nameShown = false;
|
||||
className = "PVInstance";
|
||||
listicon = 0;
|
||||
}
|
||||
|
||||
PVInstance::PVInstance(const PVInstance &oinst)
|
||||
{
|
||||
Instance::Instance(oinst);
|
||||
}
|
||||
|
||||
PVInstance::~PVInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
void PVInstance::postRender(RenderDevice* rd)
|
||||
{
|
||||
}
|
||||
|
||||
void PVInstance::render(RenderDevice* rd)
|
||||
{
|
||||
}
|
||||
|
||||
void PVInstance::setParent(Instance* newParent)
|
||||
{
|
||||
if(parent != NULL)
|
||||
{
|
||||
Instance* workspace = parent;
|
||||
while(workspace != NULL)
|
||||
{
|
||||
if(WorkspaceInstance* wsp = dynamic_cast<WorkspaceInstance*>(workspace))
|
||||
{
|
||||
wsp->removeFromPVector(this);
|
||||
break;
|
||||
}
|
||||
workspace = workspace->getParent();
|
||||
}
|
||||
parent->removeChild(this);
|
||||
}
|
||||
parent = newParent;
|
||||
if(newParent != NULL)
|
||||
{
|
||||
Instance* workspace = parent;
|
||||
while(workspace != NULL)
|
||||
{
|
||||
if(WorkspaceInstance* wsp = dynamic_cast<WorkspaceInstance*>(workspace))
|
||||
{
|
||||
wsp->addToPVector(this);
|
||||
break;
|
||||
}
|
||||
workspace = workspace->getParent();
|
||||
}
|
||||
newParent->addChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<PROPGRIDITEM> PVInstance::getProperties()
|
||||
{
|
||||
std::vector<PROPGRIDITEM> properties = Instance::getProperties();
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"NameShown",
|
||||
"This chooses whether the item name is shown",
|
||||
nameShown,
|
||||
PIT_CHECK));
|
||||
return properties;
|
||||
}
|
||||
void PVInstance::PropUpdate(LPPROPGRIDITEM &pItem)
|
||||
{
|
||||
if(strcmp(pItem->lpszPropName, "NameShown") == 0)
|
||||
{
|
||||
nameShown = (bool)pItem->lpCurValue;
|
||||
}
|
||||
else Instance::PropUpdate(pItem);
|
||||
}
|
||||
17
PVInstance.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "instance.h"
|
||||
|
||||
class PVInstance :
|
||||
public Instance
|
||||
{
|
||||
public:
|
||||
PVInstance(void);
|
||||
~PVInstance(void);
|
||||
PVInstance(const PVInstance &oinst);
|
||||
virtual void postRender(RenderDevice* rd);
|
||||
virtual void setParent(Instance* newParent);
|
||||
virtual std::vector<PROPGRIDITEM> getProperties();
|
||||
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
||||
virtual void render(RenderDevice* rd);
|
||||
bool nameShown;
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "DataModel/PartInstance.h"
|
||||
#include "PartInstance.h"
|
||||
#include "Globals.h"
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
@@ -11,7 +11,7 @@ PartInstance::PartInstance(void) : _bevelSize(0.07f), _parseVert(0), _debugTimer
|
||||
name = "Unnamed PVItem";
|
||||
className = "Part";
|
||||
canCollide = true;
|
||||
anchored = false;
|
||||
anchored = true;
|
||||
size = Vector3(2,1,4);
|
||||
setCFrame(CoordinateFrame(Vector3(0,0,0)));
|
||||
color = Color3::gray();
|
||||
@@ -26,25 +26,6 @@ PartInstance::PartInstance(void) : _bevelSize(0.07f), _parseVert(0), _debugTimer
|
||||
shape = Enum::Shape::Block;
|
||||
}
|
||||
|
||||
|
||||
Vector3 PartInstance::getVelocity()
|
||||
{
|
||||
return velocity;
|
||||
}
|
||||
Vector3 PartInstance::getRotVelocity()
|
||||
{
|
||||
return rotVelocity;
|
||||
}
|
||||
|
||||
void PartInstance::setVelocity(Vector3 v)
|
||||
{
|
||||
velocity = v;
|
||||
}
|
||||
void PartInstance::setRotVelocity(Vector3 v)
|
||||
{
|
||||
rotVelocity = v;
|
||||
}
|
||||
|
||||
void PartInstance::postRender(RenderDevice *rd)
|
||||
{
|
||||
if(!nameShown)
|
||||
@@ -76,31 +57,6 @@ void PartInstance::postRender(RenderDevice *rd)
|
||||
}
|
||||
}
|
||||
|
||||
void PartInstance::setParent(Instance* prnt)
|
||||
{
|
||||
Instance * cparent = getParent();
|
||||
while(cparent != NULL)
|
||||
{
|
||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(cparent))
|
||||
{
|
||||
std::cout << "Removed from partarray " << std::endl;
|
||||
workspace->partObjects.erase(std::remove(workspace->partObjects.begin(), workspace->partObjects.end(), this), workspace->partObjects.end());
|
||||
break;
|
||||
}
|
||||
cparent = cparent->getParent();
|
||||
}
|
||||
Instance::setParent(prnt);
|
||||
while(parent != NULL)
|
||||
{
|
||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(parent))
|
||||
{
|
||||
workspace->partObjects.push_back(this);
|
||||
break;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
}
|
||||
}
|
||||
|
||||
PartInstance::PartInstance(const PartInstance &oinst) : _bevelSize(0.07f), _parseVert(0), _debugTimer(0)
|
||||
{
|
||||
PVInstance::PVInstance(oinst);
|
||||
@@ -189,7 +145,7 @@ void PartInstance::setShape(Enum::Shape::Value shape)
|
||||
void PartInstance::setPosition(Vector3 pos)
|
||||
{
|
||||
position = pos;
|
||||
cFrame = CoordinateFrame(cFrame.rotation, pos);
|
||||
cFrame = CoordinateFrame(pos);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
@@ -206,27 +162,8 @@ void PartInstance::setCFrame(CoordinateFrame coordinateFrame)
|
||||
// Can probably be deleted
|
||||
CoordinateFrame PartInstance::getCFrameRenderBased()
|
||||
{
|
||||
return cFrame;//CoordinateFrame(getCFrame().rotation,Vector3(getCFrame().translation.x, getCFrame().translation.y, getCFrame().translation.z));
|
||||
return CoordinateFrame(getCFrame().rotation,Vector3(getCFrame().translation.x, getCFrame().translation.y, getCFrame().translation.z));
|
||||
}
|
||||
|
||||
bool PartInstance::collides(PartInstance * part)
|
||||
{
|
||||
if(shape == Enum::Shape::Block)
|
||||
{
|
||||
if(part->shape == Enum::Shape::Block)
|
||||
return G3D::CollisionDetection::fixedSolidBoxIntersectsFixedSolidBox(getBox(), part->getBox());
|
||||
else
|
||||
return G3D::CollisionDetection::fixedSolidSphereIntersectsFixedSolidBox(part->getSphere(), getBox());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(part->shape == Enum::Shape::Block)
|
||||
return G3D::CollisionDetection::fixedSolidSphereIntersectsFixedSolidBox(getSphere(), part->getBox());
|
||||
else
|
||||
return G3D::CollisionDetection::fixedSolidSphereIntersectsFixedSolidSphere(getSphere(), part->getSphere());
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NEW_BOX_RENDER
|
||||
Box PartInstance::getBox()
|
||||
{
|
||||
@@ -235,13 +172,6 @@ Box PartInstance::getBox()
|
||||
itemBox = c.toWorldSpace(box);
|
||||
return itemBox;
|
||||
}
|
||||
Sphere PartInstance::getSphere()
|
||||
{
|
||||
Sphere sphere = Sphere(Vector3(0,0,0), size.y/2);
|
||||
CoordinateFrame c = getCFrameRenderBased();
|
||||
//itemBox = c.toWorldSpace(Sphere);
|
||||
return sphere;//itemBox;
|
||||
}
|
||||
#else
|
||||
Box PartInstance::getBox()
|
||||
{
|
||||
@@ -314,36 +244,22 @@ void PartInstance::addVertex(Vector3 vertexPos,Color3 color)
|
||||
addSingularNormal(cross(v1-v3,v2-v3).direction());
|
||||
}
|
||||
|
||||
void PartInstance::addQuad(Vector3 v1,Vector3 v2, Vector3 v3, Vector3 v4)
|
||||
{
|
||||
addTriangle(v1, v2, v3);
|
||||
addTriangle(v1, v3, v4);
|
||||
}
|
||||
|
||||
void PartInstance::genSmoothNormals(int count = -1)
|
||||
{
|
||||
if(count < 0)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void PartInstance::addSmoothTriangle(Vector3 v1, Vector3 v2, Vector3 v3)
|
||||
void PartInstance::addSmoothTriangle(Vector3 v1,Vector3 v2,Vector3 v3)
|
||||
{
|
||||
addVertex(v1,color);
|
||||
addVertex(v2,color);
|
||||
addVertex(v3,color);
|
||||
//addNormals(cross(v2-v1,v3-v1).direction());
|
||||
//addSingularNormal(Vector3(cross(v2-v1,v3-v1) + cross(v3-v2,v1-v2) + cross(v1-v3,v2-v3)).direction());
|
||||
addSingularNormal(v1.direction());
|
||||
addSingularNormal(v2.direction());
|
||||
addSingularNormal(v3.direction());
|
||||
|
||||
addSingularNormal(cross(v2-v1,v3-v1).direction());
|
||||
addSingularNormal(cross(v3-v2,v1-v2).direction());
|
||||
addSingularNormal(cross(v1-v3,v2-v3).direction());
|
||||
}
|
||||
|
||||
|
||||
void PartInstance::addPlus(Vector3 v1)
|
||||
{
|
||||
float renderY = max(size.z, max(size.x, size.y))/2 * 0.775;
|
||||
float renderY = size.y/2 - 0.25f;
|
||||
Vector3 vx1 = v1 + Vector3(0, -renderY, -0.1f);
|
||||
Vector3 vx2 = v1 + Vector3(0, -renderY, 0.1f);
|
||||
Vector3 vx3 = v1 + Vector3(0, renderY, 0.1f);
|
||||
@@ -397,7 +313,7 @@ void PartInstance::addPlus(Vector3 v1)
|
||||
|
||||
void PartInstance::addPlus2(Vector3 v1)
|
||||
{
|
||||
float renderY = max(size.z, max(size.x, size.y))/2 * 0.775;
|
||||
float renderY = max(size.z, max(size.x, size.y))/2 - 0.25f;
|
||||
Vector3 vx3 = v1 + Vector3(0, -renderY, -0.1f);
|
||||
Vector3 vx2 = v1 + Vector3(0, -renderY, 0.1f);
|
||||
Vector3 vx1 = v1 + Vector3(0, renderY, 0.1f);
|
||||
@@ -471,19 +387,6 @@ void PartInstance::addPlus2(Vector3 v1)
|
||||
addTriangle(Vector3(_vertices[vertex1],_vertices[vertex1+1],_vertices[vertex1+2]),
|
||||
Vector3(_vertices[vertex2],_vertices[vertex2+1],_vertices[vertex2+2]),
|
||||
Vector3(_vertices[vertex3],_vertices[vertex3+1],_vertices[vertex3+2]));
|
||||
}
|
||||
void PartInstance::fromArrays(float verts[], float norms[], float ind[], unsigned int countVN, unsigned int countInd)
|
||||
{
|
||||
for(unsigned int i = 0; i < countVN; i++)
|
||||
{
|
||||
_vertices.push_back(verts[i]);
|
||||
_normals.push_back(norms[i]);
|
||||
}
|
||||
for(unsigned int i = 0; i < countInd; i++)
|
||||
{
|
||||
_indices.push_back(ind[i]);
|
||||
}
|
||||
|
||||
}
|
||||
void PartInstance::makeSmoothFace(int vertex1,int vertex2, int vertex3)
|
||||
{
|
||||
@@ -502,12 +405,8 @@ bool PartInstance::isUniqueVertex(Vector3 pos)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//int rings = 15;
|
||||
//int sectors = 15;
|
||||
|
||||
void PartInstance::render(RenderDevice* rd) {
|
||||
int sectorCount = 12;
|
||||
int stackCount = 12;
|
||||
float radius = 0.5F;
|
||||
//if(nameShown)
|
||||
//postRenderStack.push_back(this);
|
||||
if (changed)
|
||||
@@ -523,17 +422,122 @@ void PartInstance::render(RenderDevice* rd) {
|
||||
{
|
||||
case Enum::Shape::Ball:
|
||||
{
|
||||
glNewList(glList, GL_COMPILE);
|
||||
glColor(this->color);
|
||||
glPushMatrix();
|
||||
glScalef(renderSize.x, renderSize.y, renderSize.z);
|
||||
gluSphere(gluNewQuadric(), 1, 20, 20);
|
||||
glPopMatrix();
|
||||
glEndList();
|
||||
rd->setObjectToWorldMatrix(cFrame);
|
||||
glCallList(glList);
|
||||
changed = false;
|
||||
return;
|
||||
int obv = _bevelSize;
|
||||
_bevelSize = this->size.y / 3.14159F;
|
||||
// Front
|
||||
addSmoothTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y+_bevelSize,renderSize.z)
|
||||
);
|
||||
|
||||
addSmoothTriangle(Vector3(-renderSize.x+_bevelSize,renderSize.y-_bevelSize,renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,renderSize.z)
|
||||
);
|
||||
|
||||
// Top
|
||||
addSmoothTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y,renderSize.z-_bevelSize)
|
||||
);
|
||||
addSmoothTriangle(Vector3(-renderSize.x+_bevelSize,renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y,-renderSize.z+_bevelSize)
|
||||
);
|
||||
|
||||
// Back
|
||||
addSmoothTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,-renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y+_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,-renderSize.z)
|
||||
);
|
||||
addSmoothTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y-_bevelSize,-renderSize.z)
|
||||
);
|
||||
|
||||
// Bottom
|
||||
addSmoothTriangle(Vector3(renderSize.x-_bevelSize,-renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y,renderSize.z-_bevelSize)
|
||||
);
|
||||
addSmoothTriangle(Vector3(-renderSize.x+_bevelSize,-renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y,-renderSize.z+_bevelSize)
|
||||
);
|
||||
// Left
|
||||
addSmoothTriangle(Vector3(-renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x,renderSize.y-_bevelSize,renderSize.z-_bevelSize)
|
||||
);
|
||||
addSmoothTriangle(Vector3(-renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x,-renderSize.y+_bevelSize,-renderSize.z+_bevelSize)
|
||||
);
|
||||
|
||||
// Right
|
||||
addSmoothTriangle(Vector3(renderSize.x,renderSize.y-_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize)
|
||||
);
|
||||
addSmoothTriangle(Vector3(renderSize.x,-renderSize.y+_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize)
|
||||
);
|
||||
|
||||
|
||||
// Bevel Top Front
|
||||
makeSmoothFace(0,36,48);
|
||||
makeSmoothFace(48,18,0);
|
||||
// Bevel Left Front Corner
|
||||
makeSmoothFace(18,156,162);
|
||||
makeSmoothFace(24,18,162);
|
||||
// Bevel Left Front Top Corner
|
||||
makeSmoothFace(48,156,18);
|
||||
// Bevel Left Front Bottom Corner
|
||||
makeSmoothFace(120,6,150);
|
||||
// Bevel Left Top
|
||||
makeSmoothFace(48,66,156);
|
||||
makeSmoothFace(144,156,66);
|
||||
// Bevel Bottom
|
||||
makeSmoothFace(6,120,114);
|
||||
makeSmoothFace(114,12,6);
|
||||
// Left Bottom
|
||||
makeSmoothFace(120,150,174);
|
||||
makeSmoothFace(174,132,120);
|
||||
// Right Front Top Corner
|
||||
makeSmoothFace(36,0,180);
|
||||
// Right Front Corner
|
||||
makeSmoothFace(180,0,12);
|
||||
makeSmoothFace(186,180,12);
|
||||
// Right Front Bottom Corner
|
||||
makeSmoothFace(186,12,114);
|
||||
// Right Bottom
|
||||
makeSmoothFace(186,114,108);
|
||||
makeSmoothFace(108,198,186);
|
||||
// Right Top Corner
|
||||
makeSmoothFace(180,192,36);
|
||||
makeSmoothFace(192,42,36);
|
||||
// Right Back Top Corner
|
||||
makeSmoothFace(72,42,192);
|
||||
// Right Back Bottom Corner
|
||||
makeSmoothFace(78,198,108);
|
||||
// Right Back Corner
|
||||
makeSmoothFace(72,192,198);
|
||||
makeSmoothFace(198,78,72);
|
||||
// Back Bottom Corner
|
||||
makeSmoothFace(78,108,132);
|
||||
makeSmoothFace(132,84,78);
|
||||
// Back Top
|
||||
makeSmoothFace(42,72,102);
|
||||
makeSmoothFace(102,66,42);
|
||||
// Back Left Top Corner
|
||||
makeSmoothFace(144,66,102);
|
||||
// Back Left Corner
|
||||
makeSmoothFace(144,102,84);
|
||||
makeSmoothFace(84,174,144);
|
||||
// Back Left Bottom Corner
|
||||
makeSmoothFace(174,84,132);
|
||||
_bevelSize = obv;
|
||||
}
|
||||
break;
|
||||
case Enum::Shape::Block:
|
||||
@@ -651,76 +655,71 @@ void PartInstance::render(RenderDevice* rd) {
|
||||
makeFace(84,174,144);
|
||||
// Back Left Bottom Corner
|
||||
makeFace(174,84,132);
|
||||
for (unsigned short i=0;i<_vertices.size()/6;i++) {
|
||||
_indices.push_back(i);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Enum::Shape::Cylinder:
|
||||
{
|
||||
/*int fsize = renderSize.y/(pi()/2);
|
||||
//makeFace(0,0,48);
|
||||
// Front
|
||||
addTriangle(Vector3(renderSize.x,renderSize.y-fsize,renderSize.z),
|
||||
Vector3(-renderSize.x,-renderSize.y+fsize,renderSize.z),
|
||||
Vector3(renderSize.x,-renderSize.y+fsize,renderSize.z)
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y+_bevelSize,renderSize.z)
|
||||
);
|
||||
|
||||
addTriangle(Vector3(-renderSize.x,renderSize.y-fsize,renderSize.z),
|
||||
Vector3(-renderSize.x,-renderSize.y+fsize,renderSize.z),
|
||||
Vector3(renderSize.x,renderSize.y-fsize,renderSize.z)
|
||||
addTriangle(Vector3(-renderSize.x+_bevelSize,renderSize.y-_bevelSize,renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,renderSize.z)
|
||||
);
|
||||
|
||||
// Top
|
||||
addTriangle(Vector3(renderSize.x,renderSize.y,renderSize.z-fsize),
|
||||
Vector3(renderSize.x,renderSize.y,-renderSize.z+fsize),
|
||||
Vector3(-renderSize.x,renderSize.y,renderSize.z-fsize)
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y,renderSize.z-_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(-renderSize.x,renderSize.y,renderSize.z-fsize),
|
||||
Vector3(renderSize.x,renderSize.y,-renderSize.z+fsize),
|
||||
Vector3(-renderSize.x,renderSize.y,-renderSize.z+fsize)
|
||||
addTriangle(Vector3(-renderSize.x+_bevelSize,renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y,-renderSize.z+_bevelSize)
|
||||
);
|
||||
|
||||
// Back
|
||||
addTriangle(Vector3(renderSize.x,renderSize.y-fsize,-renderSize.z),
|
||||
Vector3(renderSize.x,-renderSize.y+fsize,-renderSize.z),
|
||||
Vector3(-renderSize.x,-renderSize.y+fsize,-renderSize.z)
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,-renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y+_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,-renderSize.z)
|
||||
);
|
||||
addTriangle(Vector3(renderSize.x,renderSize.y-fsize,-renderSize.z),
|
||||
Vector3(-renderSize.x,-renderSize.y+fsize,-renderSize.z),
|
||||
Vector3(-renderSize.x,renderSize.y-fsize,-renderSize.z)
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y-_bevelSize,-renderSize.z)
|
||||
);
|
||||
|
||||
// Bottom
|
||||
addTriangle(Vector3(renderSize.x,-renderSize.y,-renderSize.z+fsize),
|
||||
Vector3(renderSize.x,-renderSize.y,renderSize.z-fsize),
|
||||
Vector3(-renderSize.x,-renderSize.y,renderSize.z-fsize)
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,-renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y,renderSize.z-_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(-renderSize.x,-renderSize.y,renderSize.z-fsize),
|
||||
Vector3(-renderSize.x,-renderSize.y,-renderSize.z+fsize),
|
||||
Vector3(renderSize.x,-renderSize.y,-renderSize.z+fsize)
|
||||
addTriangle(Vector3(-renderSize.x+_bevelSize,-renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y,-renderSize.z+_bevelSize)
|
||||
);
|
||||
// Left
|
||||
/*addTriangle(Vector3(-renderSize.x,renderSize.y-fsize,-renderSize.z+fsize),
|
||||
Vector3(-renderSize.x,-renderSize.y+fsize,renderSize.z-fsize),
|
||||
Vector3(-renderSize.x,renderSize.y-fsize,renderSize.z-fsize)
|
||||
addTriangle(Vector3(-renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x,renderSize.y-_bevelSize,renderSize.z-_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(-renderSize.x,-renderSize.y+fsize,renderSize.z-fsize),
|
||||
Vector3(-renderSize.x,renderSize.y-fsize,-renderSize.z+fsize),
|
||||
Vector3(-renderSize.x,-renderSize.y+fsize,-renderSize.z+fsize)
|
||||
addTriangle(Vector3(-renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x,-renderSize.y+_bevelSize,-renderSize.z+_bevelSize)
|
||||
);
|
||||
// Right
|
||||
addTriangle(Vector3(renderSize.x,renderSize.y-fsize,renderSize.z-fsize),
|
||||
Vector3(renderSize.x,-renderSize.y+fsize,renderSize.z-fsize),
|
||||
Vector3(renderSize.x,renderSize.y-fsize,-renderSize.z+fsize)
|
||||
addTriangle(Vector3(renderSize.x,renderSize.y-_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(renderSize.x,-renderSize.y+_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(renderSize.x,-renderSize.y+fsize,-renderSize.z+fsize),
|
||||
Vector3(renderSize.x,renderSize.y-fsize,-renderSize.z+fsize),
|
||||
Vector3(renderSize.x,-renderSize.y+fsize,renderSize.z-fsize)
|
||||
);//*/
|
||||
|
||||
|
||||
/*// Bevel Top Front
|
||||
// Bevel Top Front
|
||||
makeFace(0,36,48);
|
||||
makeFace(48,18,0);
|
||||
// Bevel Left Front Corner
|
||||
@@ -771,112 +770,29 @@ void PartInstance::render(RenderDevice* rd) {
|
||||
makeFace(144,102,84);
|
||||
makeFace(84,174,144);
|
||||
// Back Left Bottom Corner
|
||||
makeFace(174,84,132);*/
|
||||
/*float radius = renderSize.y + (renderSize.y * (1 - cos(pi() / 12)));
|
||||
Vector2 xy[13];
|
||||
for(int i = 0; i < 13; i++)
|
||||
{
|
||||
//Get the next point
|
||||
float y = radius * cos(((double)i-G3D::toRadians(29)) * pi()/6);
|
||||
float z = radius * sin(((double)i-G3D::toRadians(29)) * pi()/6);
|
||||
xy[i] = Vector2(y,z);
|
||||
}
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
//Create a Quad for the face (i to i+1)
|
||||
addSmoothTriangle(
|
||||
Vector3(renderSize.x, xy[i].x, xy[i].y),
|
||||
Vector3(-renderSize.x, xy[i].x, xy[i].y),
|
||||
Vector3(-renderSize.x, xy[i+1].x, xy[i+1].y));
|
||||
addSmoothTriangle(
|
||||
Vector3(renderSize.x, xy[i].x, xy[i].y),
|
||||
Vector3(-renderSize.x, xy[i+1].x, xy[i+1].y),
|
||||
Vector3(renderSize.x, xy[i+1].x, xy[i+1].y));
|
||||
//Cap on the right
|
||||
addTriangle(
|
||||
Vector3(renderSize.x, xy[0].x, xy[0].y),
|
||||
Vector3(renderSize.x, xy[i].x, xy[i].y),
|
||||
Vector3(renderSize.x, xy[i+1].x, xy[i+1].y));
|
||||
//Cap on the left
|
||||
addTriangle(
|
||||
Vector3(-renderSize.x, xy[i+1].x, xy[i+1].y),
|
||||
Vector3(-renderSize.x, xy[i].x, xy[i].y),
|
||||
Vector3(-renderSize.x, xy[0].x, xy[0].y));
|
||||
}*/
|
||||
/*float facetRatio = renderSize.x / (pi() * 0.5F);
|
||||
addQuad(
|
||||
Vector3(renderSize.x, renderSize.y, renderSize.z-facetRatio),
|
||||
Vector3(renderSize.x, renderSize.y, -renderSize.z+facetRatio),
|
||||
Vector3(-renderSize.x, renderSize.y, -renderSize.z+facetRatio),
|
||||
Vector3(-renderSize.x, renderSize.y, renderSize.z-facetRatio));
|
||||
makeFace(174,84,132);
|
||||
|
||||
|
||||
addQuad(
|
||||
Vector3(renderSize.x, renderSize.y-facetRatio, renderSize.z),
|
||||
Vector3(-renderSize.x, renderSize.y-facetRatio, renderSize.z),
|
||||
Vector3(-renderSize.x, -renderSize.y+facetRatio, renderSize.z),
|
||||
Vector3(renderSize.x, -renderSize.y+facetRatio, renderSize.z));
|
||||
addQuad(
|
||||
Vector3(-renderSize.x, -renderSize.y, renderSize.z-facetRatio),
|
||||
Vector3(-renderSize.x, -renderSize.y, -renderSize.z+facetRatio),
|
||||
Vector3(renderSize.x, -renderSize.y, -renderSize.z+facetRatio),
|
||||
Vector3(renderSize.x, -renderSize.y, renderSize.z-facetRatio));
|
||||
addQuad(
|
||||
Vector3(renderSize.x, -renderSize.y+facetRatio, -renderSize.z),
|
||||
Vector3(-renderSize.x, -renderSize.y+facetRatio, -renderSize.z),
|
||||
Vector3(-renderSize.x, renderSize.y-facetRatio, -renderSize.z),
|
||||
Vector3(renderSize.x, renderSize.y-facetRatio, -renderSize.z));*/
|
||||
|
||||
/*addPlus(Vector3(-renderSize.x-0.01,0,0));
|
||||
addPlus(Vector3(-renderSize.x-0.01,0,0));
|
||||
addPlus2(Vector3(renderSize.x+0.01,0,0));
|
||||
|
||||
for (unsigned short i=0;i<_vertices.size()/6;i++) {
|
||||
_indices.push_back(i);
|
||||
}
|
||||
//std::reverse(_vertices.begin(), _vertices.end());
|
||||
//std::reverse(_normals.begin(), _normals.end());
|
||||
)*/
|
||||
GLUquadric* q = gluNewQuadric();
|
||||
|
||||
addPlus(Vector3(-renderSize.x-0.01,0,0));
|
||||
addPlus2(Vector3(renderSize.x+0.01,0,0));
|
||||
for (unsigned short i=0;i<_vertices.size()/6;i++) {
|
||||
_indices.push_back(i);
|
||||
}
|
||||
glVertexPointer(3, GL_FLOAT,6 * sizeof(GLfloat), &_vertices[0]);
|
||||
glColorPointer(3, GL_FLOAT,6 * sizeof(GLfloat), &_vertices[3]);
|
||||
glNormalPointer(GL_FLOAT,3 * sizeof(GLfloat), &_normals[0]);
|
||||
glNewList(glList, GL_COMPILE);
|
||||
glColor(this->color);
|
||||
glPushMatrix();
|
||||
glRotatef(90, 0, 1, 0);
|
||||
glScalef(renderSize.x, renderSize.y, renderSize.z);
|
||||
glTranslatef(0,0,1);
|
||||
gluDisk(q, 0, 1, 12, 12);
|
||||
glTranslatef(0,0,-2);
|
||||
gluCylinder(q, 1, 1, 2, 12, 1);
|
||||
glRotatef(180, 1, 0, 0);
|
||||
gluDisk(q, 0, 1, 12, 12);
|
||||
glPopMatrix();
|
||||
glDrawElements(GL_TRIANGLES, _indices.size(), GL_UNSIGNED_SHORT, &_indices[0]);
|
||||
glEndList();
|
||||
rd->setObjectToWorldMatrix(cFrame);
|
||||
glCallList(glList);
|
||||
changed = false;
|
||||
return;
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for (unsigned short i=0;i<_vertices.size()/6;i++) {
|
||||
_indices.push_back(i);
|
||||
}
|
||||
changed=false;
|
||||
|
||||
glNewList(glList, GL_COMPILE);
|
||||
glVertexPointer(3, GL_FLOAT,6 * sizeof(GLfloat), &_vertices[0]);
|
||||
glColorPointer(3, GL_FLOAT,6 * sizeof(GLfloat), &_vertices[3]);
|
||||
glNormalPointer(GL_FLOAT,3 * sizeof(GLfloat), &_normals[0]);
|
||||
glNewList(glList, GL_COMPILE);
|
||||
//glPushMatrix();
|
||||
glPushMatrix();
|
||||
//glTranslatef(2,7,0);
|
||||
glDrawElements(GL_TRIANGLES, _indices.size(), GL_UNSIGNED_SHORT, &_indices[0]);
|
||||
//glPopMatrix();
|
||||
glPopMatrix();
|
||||
glEndList();
|
||||
}
|
||||
rd->setObjectToWorldMatrix(cFrame);
|
||||
@@ -993,7 +909,6 @@ static TCHAR* enumStr(int shape)
|
||||
case Enum::Shape::Cylinder:
|
||||
return "Cylinder";
|
||||
}
|
||||
return "Block";
|
||||
}
|
||||
|
||||
void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
||||
@@ -1003,11 +918,6 @@ void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
||||
color = Color3(GetRValue(item->lpCurValue)/255.0F,GetGValue(item->lpCurValue)/255.0F,GetBValue(item->lpCurValue)/255.0F);
|
||||
changed=true;
|
||||
}
|
||||
if(strcmp(item->lpszPropName, "Anchored") == 0)
|
||||
{
|
||||
anchored= item->lpCurValue == TRUE;
|
||||
changed=true;
|
||||
}
|
||||
else if(strcmp(item->lpszPropName, "Offset") == 0)
|
||||
{
|
||||
std::string str = (LPTSTR)item->lpCurValue;
|
||||
@@ -1087,14 +997,8 @@ std::vector<PROPGRIDITEM> PartInstance::getProperties()
|
||||
RGB((color.r*255),(color.g*255),(color.b*255)),
|
||||
PIT_COLOR
|
||||
));
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"Anchored",
|
||||
"Whether the block can move or not",
|
||||
(LPARAM)anchored,
|
||||
PIT_CHECK
|
||||
));
|
||||
sprintf_s(pto, "%g, %g, %g", position.x, position.y, position.z);
|
||||
|
||||
sprintf_s(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z);
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"Offset",
|
||||
@@ -1,23 +1,19 @@
|
||||
#pragma once
|
||||
#include "PVInstance.h"
|
||||
#include "Enum.h"
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
#define NEW_BOX_RENDER
|
||||
|
||||
class PartInstance : public PVInstance
|
||||
{
|
||||
public:
|
||||
|
||||
PartInstance(void);
|
||||
PartInstance(const PartInstance &oinst);
|
||||
~PartInstance(void);
|
||||
Instance* clone() const { return new PartInstance(*this); }
|
||||
|
||||
//Rendering
|
||||
virtual void PartInstance::postRender(RenderDevice* rd);
|
||||
~PartInstance(void);
|
||||
virtual void render(RenderDevice*);
|
||||
|
||||
//Surfaces
|
||||
Vector3 velocity;
|
||||
Enum::SurfaceType::Value top;
|
||||
Enum::SurfaceType::Value front;
|
||||
Enum::SurfaceType::Value right;
|
||||
@@ -25,52 +21,52 @@ public:
|
||||
Enum::SurfaceType::Value left;
|
||||
Enum::SurfaceType::Value bottom;
|
||||
Enum::Shape::Value shape;
|
||||
|
||||
//Variables
|
||||
CoordinateFrame cFrame;
|
||||
Color3 color;
|
||||
bool canCollide;
|
||||
dBodyID physBody;
|
||||
dGeomID physGeom[3];
|
||||
|
||||
//Getters
|
||||
Vector3 getPosition();
|
||||
Vector3 getVelocity();
|
||||
Vector3 getRotVelocity();
|
||||
Vector3 getSize();
|
||||
Box getBox();
|
||||
Sphere getSphere();
|
||||
Box getScaledBox();
|
||||
CoordinateFrame getCFrame();
|
||||
|
||||
//Setters
|
||||
void setParent(Instance* parent);
|
||||
void setPosition(Vector3);
|
||||
void setVelocity(Vector3);
|
||||
void setRotVelocity(Vector3);
|
||||
CoordinateFrame getCFrame();
|
||||
void setCFrame(CoordinateFrame);
|
||||
void setCFrameNoSync(CoordinateFrame);
|
||||
Box getBox();
|
||||
Box getScaledBox();
|
||||
CoordinateFrame getCFrameRenderBased();
|
||||
Vector3 getSize();
|
||||
void setSize(Vector3);
|
||||
void setShape(Enum::Shape::Value shape);
|
||||
void setChanged();
|
||||
void setSurface(int face, Enum::SurfaceType::Value surface);
|
||||
void setAnchored(bool anchored);
|
||||
bool isAnchored();
|
||||
float getMass();
|
||||
|
||||
//Collision
|
||||
bool collides(PartInstance * part);
|
||||
bool canCollide;
|
||||
bool anchored;
|
||||
Vector3 rotVelocity;
|
||||
bool collides(Box);
|
||||
|
||||
//Properties
|
||||
virtual std::vector<PROPGRIDITEM> getProperties();
|
||||
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
||||
#ifdef NEW_BOX_RENDER
|
||||
void addVertex(Vector3 vertexPos,Color3 color);
|
||||
void addNormals(Vector3 normal);
|
||||
void addSingularNormal(Vector3 normal);
|
||||
void addTriangle(Vector3 vertexPos,Vector3 vertexPos2, Vector3 vertexPos3);
|
||||
void addSmoothTriangle(Vector3 vertexPos,Vector3 vertexPos2, Vector3 vertexPos3);
|
||||
void makeSmoothFace(int vertex1, int vertex2, int vertex3);
|
||||
void addPlus(Vector3 v1);
|
||||
void addPlus2(Vector3 v1);
|
||||
void debugPrintVertexIDs(RenderDevice* rd, GFontRef font, Matrix3 camRot);
|
||||
void makeFace(int vertex1, int vertex2, int vertex3);
|
||||
bool isUniqueVertex(Vector3 pos);
|
||||
#endif
|
||||
private:
|
||||
bool anchored;
|
||||
Vector3 position;
|
||||
Vector3 size;
|
||||
Vector3 velocity;
|
||||
Vector3 rotVelocity;
|
||||
float _bevelSize;
|
||||
int _parseVert;
|
||||
int _debugTimer;
|
||||
std::vector<Vector3> _debugUniqueVertices;
|
||||
#ifdef NEW_BOX_RENDER
|
||||
std::vector<GLfloat> _vertices;
|
||||
std::vector<GLfloat> _normals;
|
||||
#else
|
||||
GLfloat _vertices[96];
|
||||
#endif
|
||||
std::vector<GLushort> _indices;
|
||||
bool changed;
|
||||
Box itemBox;
|
||||
GLuint glList;
|
||||
};
|
||||
};
|
||||
@@ -3,9 +3,15 @@
|
||||
#include "WindowFunctions.h"
|
||||
#include "resource.h"
|
||||
#include "PropertyWindow.h"
|
||||
#include "Globals.h"
|
||||
#include "strsafe.h"
|
||||
#include "Application.h"
|
||||
|
||||
/*typedef struct typPRGP {
|
||||
Instance* instance; // Declare member types
|
||||
Property ∝
|
||||
} PRGP;*/
|
||||
|
||||
std::vector<PROPGRIDITEM> prop;
|
||||
std::vector<Instance*> children;
|
||||
Instance * selectedInstance;
|
||||
@@ -171,8 +177,8 @@ LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
int ItemIndex = SendMessage((HWND) lParam, (UINT) CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
|
||||
CHAR ListItem[256];
|
||||
SendMessage((HWND) lParam, (UINT) CB_GETLBTEXT, (WPARAM) ItemIndex, (LPARAM) ListItem);
|
||||
g_dataModel->getSelectionService()->clearSelection();
|
||||
g_dataModel->getSelectionService()->addSelected(children.at(ItemIndex));
|
||||
propWind->ClearProperties();
|
||||
g_usableApp->selectInstance(children.at(ItemIndex),propWind);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -202,18 +208,13 @@ LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PropertyWindow::clearExplorer()
|
||||
void PropertyWindow::refreshExplorer(Instance* selectedInstance)
|
||||
{
|
||||
SendMessage(_explorerComboBox,CB_RESETCONTENT,0,0);
|
||||
SendMessage(_explorerComboBox,CB_SETCURSEL,0,(LPARAM)0);
|
||||
}
|
||||
|
||||
void PropertyWindow::refreshExplorer(std::vector<Instance*> selectedInstances)
|
||||
{
|
||||
Instance * instance = selectedInstances[0];
|
||||
SendMessage(_explorerComboBox,CB_RESETCONTENT,0,0);
|
||||
parent = NULL;
|
||||
children.clear();
|
||||
//g_selectedInstances.clear();
|
||||
//for (unsigned int i=0;i<g_selectedInstances.size();i++) {
|
||||
children.push_back(selectedInstance);
|
||||
SendMessage(_explorerComboBox, CB_ADDSTRING, 0, (LPARAM)selectedInstance->name.c_str());
|
||||
if(selectedInstance->getParent() != NULL)
|
||||
@@ -225,6 +226,7 @@ void PropertyWindow::refreshExplorer(std::vector<Instance*> selectedInstances)
|
||||
parent = selectedInstance->getParent();
|
||||
children.push_back(selectedInstance->getParent());
|
||||
}
|
||||
//children = g_selectedInstances[i]->getChildren();
|
||||
|
||||
std::vector<Instance*> selectedChildren = selectedInstance->getChildren();
|
||||
for(size_t z = 0; z < selectedChildren.size(); z++)
|
||||
@@ -341,17 +343,11 @@ void PropertyWindow::_resize()
|
||||
SetWindowPos(_explorerComboBox, NULL, 0, 0, rect.right, 400, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
|
||||
void PropertyWindow::UpdateSelected(Instance * instance)
|
||||
{
|
||||
if(instances.size() <= 0)
|
||||
{
|
||||
ClearProperties();
|
||||
return;
|
||||
}
|
||||
Instance * instance = instances[0];
|
||||
PropGrid_ResetContent(_propGrid);
|
||||
prop = instance->getProperties();
|
||||
//if (selectedInstance != instance)
|
||||
if (selectedInstance != instance)
|
||||
{
|
||||
selectedInstance = instance;
|
||||
for(size_t i = 0; i < prop.size(); i++)
|
||||
@@ -365,13 +361,12 @@ void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
|
||||
PropGrid_ExpandAllCatalogs(_propGrid);
|
||||
//SetWindowLongPtr(_propGrid,GWL_USERDATA,(LONG)this);
|
||||
|
||||
refreshExplorer(instances);
|
||||
refreshExplorer(instance);
|
||||
_resize();
|
||||
}
|
||||
}
|
||||
|
||||
void PropertyWindow::ClearProperties()
|
||||
{
|
||||
clearExplorer();
|
||||
PropGrid_ResetContent(_propGrid);
|
||||
}
|
||||
@@ -1,18 +1,17 @@
|
||||
#pragma once
|
||||
#include "DataModelV2/Instance.h"
|
||||
#include "Instance.h"
|
||||
|
||||
class PropertyWindow {
|
||||
public:
|
||||
PropertyWindow(int x, int y, int sx, int sy, HMODULE hThisInstance);
|
||||
bool onCreate(int x, int y, int sx, int sy, HMODULE hThisInstance);
|
||||
void UpdateSelected(std::vector<Instance *> selection);
|
||||
void UpdateSelected(Instance *);
|
||||
void ClearProperties();
|
||||
void onResize();
|
||||
void refreshExplorer(std::vector<Instance *> selection);
|
||||
void refreshExplorer(Instance* selectedInstance);
|
||||
HWND _hwndProp;
|
||||
private:
|
||||
HWND _propGrid;
|
||||
HWND _explorerComboBox;
|
||||
void _resize();
|
||||
void clearExplorer();
|
||||
};
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
#include "Listener/RotateButtonListener.h"
|
||||
#include "BaseButtonInstance.h"
|
||||
#include "RotateButtonListener.h"
|
||||
#include "Globals.h"
|
||||
#include "AudioPlayer.h"
|
||||
|
||||
void RotateButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
if(g_dataModel->getSelectionService()->getSelection().size() > 0)
|
||||
if(g_selectedInstances.size() > 0)
|
||||
{
|
||||
Instance* selectedInstance = g_dataModel->getSelectionService()->getSelection()[0];
|
||||
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||
AudioPlayer::playSound(clickSound);
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(selectedInstance))
|
||||
{
|
||||
9
ShapeRenderer.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "ShapeRenderer.h"
|
||||
|
||||
ShapeRenderer::ShapeRenderer(void)
|
||||
{
|
||||
}
|
||||
|
||||
ShapeRenderer::~ShapeRenderer(void)
|
||||
{
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <sstream>
|
||||
#include "ErrorFunctions.h"
|
||||
#include "StringFunctions.h"
|
||||
#include <windows.h>
|
||||
|
||||
std::string Convert (float number)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "DataModelV2/TextButtonInstance.h"
|
||||
#include "TextButtonInstance.h"
|
||||
|
||||
|
||||
TextButtonInstance::TextButtonInstance(void)
|
||||
@@ -98,7 +98,12 @@ void TextButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseD
|
||||
Draw::box(Box(point1, point2), rd, boxColorDn, boxOutlineColorDn);
|
||||
font->draw2D(rd, title, RelativeTo, textSize, textColorDn, textOutlineColorDn);
|
||||
}
|
||||
else if(selected || mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y))
|
||||
else if(mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y))
|
||||
{
|
||||
Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr);
|
||||
font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr);
|
||||
}
|
||||
else if(selected)
|
||||
{
|
||||
Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr);
|
||||
font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr);
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
#include "WindowFunctions.h"
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -23,7 +24,7 @@ bool createWindowClass(const char* name,WNDPROC proc,HMODULE hInstance)
|
||||
{
|
||||
stringstream errMsg;
|
||||
errMsg<<"Failed to register " << name;
|
||||
MessageBox(NULL, errMsg.str().c_str(),"Blocks3D Crash", MB_OK);
|
||||
MessageBox(NULL, errMsg.str().c_str(),"Dynamica Crash", MB_OK);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
bool createWindowClass(const char* name,WNDPROC proc,HMODULE hInstance);
|
||||
23
WorkspaceInstance.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include "WorkspaceInstance.h"
|
||||
|
||||
|
||||
WorkspaceInstance::WorkspaceInstance(void)
|
||||
{
|
||||
GroupInstance::GroupInstance();
|
||||
name = "Workspace";
|
||||
className = "Workspace";
|
||||
canDelete = false;
|
||||
}
|
||||
|
||||
WorkspaceInstance::~WorkspaceInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
void WorkspaceInstance::removeFromPVector(PVInstance * instance)
|
||||
{
|
||||
__pvVector.erase(std::remove(__pvVector.begin(), __pvVector.end(), instance), __pvVector.end());
|
||||
}
|
||||
void WorkspaceInstance::addToPVector(PVInstance * instance)
|
||||
{
|
||||
__pvVector.push_back(instance);
|
||||
}
|
||||
15
WorkspaceInstance.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "GroupInstance.h"
|
||||
#include <set>
|
||||
|
||||
class WorkspaceInstance :
|
||||
public GroupInstance
|
||||
{
|
||||
public:
|
||||
WorkspaceInstance(void);
|
||||
~WorkspaceInstance(void);
|
||||
void removeFromPVector(PVInstance *);
|
||||
void addToPVector(PVInstance *);
|
||||
std::vector<PVInstance*> __pvVector;
|
||||
std::vector<PVInstance*>* getPVVector();
|
||||
};
|
||||
@@ -1,13 +1,17 @@
|
||||
// AX.CPP
|
||||
#include <windows.h>
|
||||
#include <comdef.h>
|
||||
#include <exdisp.h>
|
||||
#include <oledlg.h>
|
||||
#include "ax.h"
|
||||
#include "AudioPlayer.h"
|
||||
#include "Enum.h"
|
||||
|
||||
|
||||
#pragma warning (disable: 4311)
|
||||
#pragma warning (disable: 4312)
|
||||
#pragma warning (disable: 4244)
|
||||
#pragma warning (disable: 4800)
|
||||
|
||||
|
||||
// AXClientSite class
|
||||
// ------- Implement member functions
|
||||
AXClientSite :: AXClientSite()
|
||||
@@ -22,89 +26,10 @@ AXClientSite :: ~AXClientSite()
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP AXClientSite :: ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: GetHostInfo(DOCHOSTUIINFO *pInfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: ShowUI( DWORD dwID, IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: HideUI( void)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: UpdateUI( void)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: OnDocWindowActivate(BOOL fActivate)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: OnFrameWindowActivate(BOOL fActivate)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: ResizeBorder( LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: TranslateAccelerator( LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: GetOptionKeyPath( LPOLESTR *pchKey, DWORD dw)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: GetDropTarget( IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: GetExternal(IDispatch **ppDispatch)
|
||||
{
|
||||
//IDispatch* disp = ax->GetExternalDispatch();
|
||||
*ppDispatch = this;
|
||||
/* if (disp!=NULL)
|
||||
{
|
||||
*ppDispatch = this;
|
||||
return S_OK;
|
||||
} */
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite ::TranslateUrl( DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: FilterDataObject( IDataObject *pDO, IDataObject **ppDORet)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
// IUnknown methods
|
||||
STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject)
|
||||
{
|
||||
*ppvObject = 0;
|
||||
// if (iid == IID_IOleInPlaceSite)
|
||||
// *ppvObject = (IOleInPlaceSite*)this;
|
||||
if (iid == IID_IOleClientSite)
|
||||
*ppvObject = (IOleClientSite*)this;
|
||||
if (iid == IID_IUnknown)
|
||||
@@ -113,7 +38,7 @@ STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject)
|
||||
*ppvObject = (IAdviseSink*)this;
|
||||
if (iid == IID_IDispatch)
|
||||
*ppvObject = (IDispatch*)this;
|
||||
//if (ExternalPlace == false)
|
||||
if (ExternalPlace == false)
|
||||
{
|
||||
if (iid == IID_IOleInPlaceSite)
|
||||
*ppvObject = (IOleInPlaceSite*)this;
|
||||
@@ -121,8 +46,6 @@ STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject)
|
||||
*ppvObject = (IOleInPlaceFrame*)this;
|
||||
if (iid == IID_IOleInPlaceUIWindow)
|
||||
*ppvObject = (IOleInPlaceUIWindow*)this;
|
||||
if (iid == IID_IDocHostUIHandler)
|
||||
*ppvObject = (IDocHostUIHandler*)this;
|
||||
}
|
||||
|
||||
//* Log Call
|
||||
@@ -306,9 +229,9 @@ STDMETHODIMP AXClientSite :: SetActiveObject(IOleInPlaceActiveObject*pV,LPCOLEST
|
||||
|
||||
|
||||
STDMETHODIMP AXClientSite :: SetStatusText(LPCOLESTR t)
|
||||
{
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP AXClientSite :: EnableModeless(BOOL f)
|
||||
{
|
||||
@@ -328,21 +251,14 @@ HRESULT _stdcall AXClientSite :: GetTypeInfoCount(
|
||||
HRESULT _stdcall AXClientSite :: GetTypeInfo(
|
||||
unsigned int iTInfo,
|
||||
LCID lcid,
|
||||
ITypeInfo FAR* FAR* ppTInfo)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
ITypeInfo FAR* FAR* ppTInfo) {return E_NOTIMPL;}
|
||||
|
||||
HRESULT _stdcall AXClientSite :: GetIDsOfNames(
|
||||
REFIID riid,
|
||||
OLECHAR FAR* FAR* ext_function_name,
|
||||
OLECHAR FAR* FAR*,
|
||||
unsigned int cNames,
|
||||
LCID lcid,
|
||||
DISPID FAR* )
|
||||
{
|
||||
m_lastExternalName = *ext_function_name;
|
||||
return S_OK;
|
||||
}
|
||||
DISPID FAR* ) {return E_NOTIMPL;}
|
||||
|
||||
|
||||
// Other Methods
|
||||
@@ -368,6 +284,8 @@ AX :: AX(char* cls)
|
||||
Init(cls);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AX :: Clean()
|
||||
{
|
||||
if (Site.InPlace == true)
|
||||
@@ -504,12 +422,9 @@ HRESULT _stdcall AXClientSite :: Invoke(
|
||||
VARIANT FAR* pVarResult,
|
||||
EXCEPINFO FAR* pExcepInfo,
|
||||
unsigned int FAR* puArgErr)
|
||||
{
|
||||
IEBrowser * browser = (IEBrowser *)GetProp(Window,"Browser");
|
||||
return browser->doExternal(m_lastExternalName,dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
|
||||
//return S_OK;
|
||||
}
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
void _stdcall AXClientSite :: OnDataChange(FORMATETC *pFormatEtc,STGMEDIUM *pStgmed)
|
||||
@@ -616,6 +531,7 @@ LRESULT CALLBACK AXWndProc(HWND hh,UINT mm,WPARAM ww,LPARAM ll)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mm == AX_GETAXINTERFACE)
|
||||
{
|
||||
AX* ax = (AX*)GetWindowLong(hh,GWL_USERDATA);
|
||||
@@ -1,10 +1,4 @@
|
||||
// AX.H
|
||||
#pragma once
|
||||
#include "Globals.h"
|
||||
#include <mshtmhst.h>
|
||||
#include <string>
|
||||
#pragma once
|
||||
#include "IEBrowser.h"
|
||||
|
||||
// messages
|
||||
#define AX_QUERYINTERFACE (WM_USER + 1)
|
||||
@@ -15,6 +9,7 @@
|
||||
#define AX_SETDATAADVISE (WM_USER + 6)
|
||||
#define AX_DOVERB (WM_USER + 7)
|
||||
|
||||
|
||||
// Registration function
|
||||
ATOM AXRegister();
|
||||
|
||||
@@ -25,8 +20,7 @@ class AXClientSite :
|
||||
public IDispatch,
|
||||
public IAdviseSink,
|
||||
public IOleInPlaceSite,
|
||||
public IOleInPlaceFrame,
|
||||
public IDocHostUIHandler
|
||||
public IOleInPlaceFrame
|
||||
{
|
||||
protected:
|
||||
|
||||
@@ -34,6 +28,7 @@ class AXClientSite :
|
||||
|
||||
public:
|
||||
|
||||
|
||||
HWND Window;
|
||||
HWND Parent;
|
||||
HMENU Menu;
|
||||
@@ -42,6 +37,7 @@ class AXClientSite :
|
||||
bool CalledCanInPlace;
|
||||
|
||||
class AX* ax;
|
||||
|
||||
// MyClientSite Methods
|
||||
AXClientSite();
|
||||
virtual ~AXClientSite();
|
||||
@@ -59,64 +55,7 @@ class AXClientSite :
|
||||
STDMETHODIMP ShowObject();
|
||||
STDMETHODIMP OnShowWindow(BOOL f);
|
||||
STDMETHODIMP RequestNewObjectLayout();
|
||||
|
||||
// IDDocHandler methods
|
||||
STDMETHODIMP ShowContextMenu(
|
||||
/* [in] */ DWORD dwID,
|
||||
/* [in] */ POINT *ppt,
|
||||
/* [in] */ IUnknown *pcmdtReserved,
|
||||
/* [in] */ IDispatch *pdispReserved);
|
||||
|
||||
STDMETHODIMP GetHostInfo(
|
||||
/* [out][in] */ DOCHOSTUIINFO *pInfo);
|
||||
|
||||
STDMETHODIMP ShowUI(
|
||||
/* [in] */ DWORD dwID,
|
||||
/* [in] */ IOleInPlaceActiveObject *pActiveObject,
|
||||
/* [in] */ IOleCommandTarget *pCommandTarget,
|
||||
/* [in] */ IOleInPlaceFrame *pFrame,
|
||||
/* [in] */ IOleInPlaceUIWindow *pDoc);
|
||||
|
||||
STDMETHODIMP HideUI( void);
|
||||
|
||||
STDMETHODIMP UpdateUI( void);
|
||||
|
||||
STDMETHODIMP OnDocWindowActivate(
|
||||
/* [in] */ BOOL fActivate);
|
||||
|
||||
STDMETHODIMP OnFrameWindowActivate(
|
||||
/* [in] */ BOOL fActivate);
|
||||
|
||||
STDMETHODIMP ResizeBorder(
|
||||
/* [in] */ LPCRECT prcBorder,
|
||||
/* [in] */ IOleInPlaceUIWindow *pUIWindow,
|
||||
/* [in] */ BOOL fRameWindow);
|
||||
|
||||
STDMETHODIMP TranslateAccelerator(
|
||||
/* [in] */ LPMSG lpMsg,
|
||||
/* [in] */ const GUID *pguidCmdGroup,
|
||||
/* [in] */ DWORD nCmdID);
|
||||
|
||||
STDMETHODIMP GetOptionKeyPath(
|
||||
/* [out] */ LPOLESTR *pchKey,
|
||||
/* [in] */ DWORD dw);
|
||||
|
||||
STDMETHODIMP GetDropTarget(
|
||||
/* [in] */ IDropTarget *pDropTarget,
|
||||
/* [out] */ IDropTarget **ppDropTarget);
|
||||
|
||||
STDMETHODIMP GetExternal(
|
||||
/* [out] */ IDispatch **ppDispatch);
|
||||
|
||||
STDMETHODIMP TranslateUrl(
|
||||
/* [in] */ DWORD dwTranslate,
|
||||
/* [in] */ OLECHAR *pchURLIn,
|
||||
/* [out] */ OLECHAR **ppchURLOut);
|
||||
|
||||
STDMETHODIMP FilterDataObject(
|
||||
/* [in] */ IDataObject *pDO,
|
||||
/* [out] */ IDataObject **ppDORet);
|
||||
|
||||
|
||||
// IAdviseSink methods
|
||||
STDMETHODIMP_(void) OnDataChange(FORMATETC *pFormatEtc,STGMEDIUM *pStgmed);
|
||||
|
||||
@@ -151,13 +90,14 @@ class AXClientSite :
|
||||
STDMETHODIMP EnableModeless(BOOL f);
|
||||
STDMETHODIMP TranslateAccelerator(LPMSG,WORD);
|
||||
|
||||
std::wstring m_lastExternalName;
|
||||
|
||||
|
||||
// IDispatch Methods
|
||||
HRESULT _stdcall GetTypeInfoCount(unsigned int * pctinfo);
|
||||
HRESULT _stdcall GetTypeInfo(unsigned int iTInfo,LCID lcid,ITypeInfo FAR* FAR* ppTInfo);
|
||||
HRESULT _stdcall GetIDsOfNames(REFIID riid,OLECHAR FAR* FAR*,unsigned int cNames,LCID lcid,DISPID FAR* );
|
||||
HRESULT _stdcall Invoke(DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS FAR* pDispParams,VARIANT FAR* pVarResult,EXCEPINFO FAR* pExcepInfo,unsigned int FAR* puArgErr);
|
||||
|
||||
// IOleControlSite Methods
|
||||
};
|
||||
|
||||
|
||||
@@ -187,9 +127,13 @@ class AX
|
||||
//AX_CONNECTSTRUCT* tcs;
|
||||
bool AddMenu;
|
||||
DWORD AdviseToken;
|
||||
DWORD DAdviseToken[100];
|
||||
DWORD DAdviseToken[100];
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
CLSID clsid;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 950 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |