Fix merge conflicts
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -36,8 +36,6 @@
|
||||
*.user
|
||||
*.pdb
|
||||
*.idb
|
||||
*.manifest
|
||||
*.htm
|
||||
*.res
|
||||
*.ilk
|
||||
*.dep
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blocks3D", "Blocks3D-2003.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blocks3D", "Blocks3D-2003.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug.ActiveCfg = Debug|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug.Build.0 = Debug|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release.ActiveCfg = Release|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,893 +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\UpgradeFromVC71.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"
|
||||
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"
|
||||
/>
|
||||
<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\UpgradeFromVC71.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="".\src\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NO_SPRINTF;IGNORE_CATCH"
|
||||
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"
|
||||
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"
|
||||
/>
|
||||
<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=".\SplashHTML.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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\GroupInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\Instance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\LevelInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\PartInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\PVInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\WorkspaceInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Gui"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\BaseButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</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"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\ImageButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\TextButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\ToggleImageButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</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=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\SplashHTML.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>
|
||||
<File
|
||||
RelativePath=".\src\include\winver.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\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>
|
||||
<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=".\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>
|
||||
14
Blocks3D.exe.manifest
Normal file
14
Blocks3D.exe.manifest
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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>
|
||||
1182
Blocks3D.vcproj
1182
Blocks3D.vcproj
File diff suppressed because it is too large
Load Diff
59
Dialogs.rc
59
Dialogs.rc
@@ -5,7 +5,18 @@
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.h>
|
||||
#include "resource.h" //Should not have to do this...
|
||||
#include "src/include/resource.h"
|
||||
|
||||
#define APP_GENER 0
|
||||
#define APP_MAJOR 0
|
||||
#define APP_MINOR 106
|
||||
#define APP_PATCH 2
|
||||
#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 ) )
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +27,39 @@
|
||||
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
|
||||
@@ -40,4 +83,14 @@ FONT 8, "Ms Shell Dlg"
|
||||
// Icon resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDI_ICON1 ICON "FatB3dIcon.ico"
|
||||
IDI_ICON1 ICON "FatB3dIcon.ico"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Manifest resources
|
||||
//
|
||||
#ifndef _DEBUG
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
1 MANIFEST ".\\Blocks3D.exe.manifest"
|
||||
#endif
|
||||
@@ -1,14 +1,15 @@
|
||||
;InnoSetupVersion=5.4.3
|
||||
#define AppVer GetFileVersion('..\Blocks3D.exe')
|
||||
|
||||
[Setup]
|
||||
AppName=Blocks3D
|
||||
AppName=Blocks3D
|
||||
AppVersion=v{#AppVer}
|
||||
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
|
||||
AppVersion=v0_0_104_5
|
||||
AppPublisherURL=http://blocks3d.com/
|
||||
AppSupportURL=http://blocks3d.com/
|
||||
AppUpdatesURL=http://blocks3d.com/
|
||||
DefaultDirName={%localappdata}\Blocks3D
|
||||
OutputBaseFilename=Blocks3D_Setup_{#SetupSetting("AppVersion")}
|
||||
OutputBaseFilename=Blocks3D_Setup_v{#AppVer}
|
||||
Compression=lzma2
|
||||
PrivilegesRequired=lowest
|
||||
WizardImageFile=setup.bmp
|
||||
|
||||
6
ODE Copyright.txt
Normal file
6
ODE Copyright.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
Open Dynamics Engine
|
||||
|
||||
Copyright (c) 2001-2004,
|
||||
Russell L. Smith.
|
||||
|
||||
All rights reserved.
|
||||
BIN
ode-0.5.7z
Normal file
BIN
ode-0.5.7z
Normal file
Binary file not shown.
10
resource.h
10
resource.h
@@ -1,10 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by dialogs.rc
|
||||
//
|
||||
#define IDI_ICON1 101
|
||||
#define IDB_BITMAP1 102
|
||||
#define IDD_DIALOG1 103
|
||||
#define IDC_EDIT1 1001
|
||||
#define IDC_PROPERTYGRID 2000
|
||||
|
||||
@@ -32,7 +32,6 @@ class Application { // : public GApp {
|
||||
PartInstance* makePart();
|
||||
void drawButtons(RenderDevice* rd);
|
||||
void drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, LightingParameters lighting, Vector3 size, Vector3 pos, CoordinateFrame c);
|
||||
std::vector<Instance*> getSelection();
|
||||
void deleteInstance();
|
||||
void run();
|
||||
void QuitApp();
|
||||
@@ -60,6 +59,7 @@ class Application { // : public GApp {
|
||||
Tool * tool;
|
||||
void changeTool(Tool *);
|
||||
Mouse mouse;
|
||||
bool viewportHasFocus();
|
||||
private:
|
||||
bool mouseMoveState;
|
||||
RenderDevice* renderDevice;
|
||||
|
||||
@@ -26,6 +26,7 @@ class CameraController {
|
||||
void panRight();
|
||||
void tiltUp();
|
||||
void tiltDown();
|
||||
void zoomExtents();
|
||||
void Zoom(short delta);
|
||||
bool onMouseWheel(int x, int y, short delta);
|
||||
GCamera* getCamera();
|
||||
|
||||
@@ -2,8 +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"
|
||||
|
||||
class GuiRootInstance;
|
||||
|
||||
@@ -23,21 +25,18 @@ public:
|
||||
void drawMessage(RenderDevice*);
|
||||
WorkspaceInstance* getWorkspace();
|
||||
LevelInstance * getLevel();
|
||||
XplicitNgine * getEngine();
|
||||
std::string message;
|
||||
std::string _loadedFileName;
|
||||
bool showMessage;
|
||||
G3D::GFontRef font;
|
||||
GuiRootInstance* getGuiRoot();
|
||||
//float mousex;
|
||||
//float mousey;
|
||||
//Vector2 getMousePos();
|
||||
//void setMousePos(int x,int y);
|
||||
//void setMousePos(Vector2 pos);
|
||||
//bool mouseButton1Down;
|
||||
SelectionService* getSelectionService();
|
||||
PartInstance* makePart();
|
||||
void clearLevel();
|
||||
void toggleRun();
|
||||
bool isRunning();
|
||||
void resetEngine();
|
||||
#if _DEBUG
|
||||
void modXMLLevel(float modY);
|
||||
#endif
|
||||
@@ -53,5 +52,7 @@ private:
|
||||
WorkspaceInstance* workspace;
|
||||
LevelInstance * level;
|
||||
GuiRootInstance* guiRoot;
|
||||
SelectionService* selectionService;
|
||||
bool running;
|
||||
XplicitNgine * xplicitNgine;
|
||||
};
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
#include <G3DAll.h>
|
||||
#include "propertyGrid.h"
|
||||
#include "map"
|
||||
|
||||
#ifdef NO_SPRINTF
|
||||
#define sprintf_s sprintf
|
||||
#endif
|
||||
//#include "Properties/BoolProperty.h"
|
||||
|
||||
class Instance
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "instance.h"
|
||||
#include "enum.h"
|
||||
#include <ode/ode.h>
|
||||
|
||||
class PVInstance :
|
||||
public Instance
|
||||
|
||||
@@ -29,7 +29,8 @@ public:
|
||||
//Variables
|
||||
Color3 color;
|
||||
bool canCollide;
|
||||
bool anchored;
|
||||
dBodyID physBody;
|
||||
dGeomID physGeom[3];
|
||||
|
||||
//Getters
|
||||
Vector3 getPosition();
|
||||
@@ -47,10 +48,14 @@ public:
|
||||
void setVelocity(Vector3);
|
||||
void setRotVelocity(Vector3);
|
||||
void setCFrame(CoordinateFrame);
|
||||
void setCFrameNoSync(CoordinateFrame);
|
||||
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);
|
||||
@@ -60,6 +65,7 @@ public:
|
||||
virtual std::vector<PROPGRIDITEM> getProperties();
|
||||
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
||||
private:
|
||||
bool anchored;
|
||||
Vector3 position;
|
||||
Vector3 size;
|
||||
Vector3 velocity;
|
||||
@@ -67,4 +73,4 @@ private:
|
||||
bool changed;
|
||||
Box itemBox;
|
||||
GLuint glList;
|
||||
};
|
||||
};
|
||||
21
src/include/DataModelV2/SelectionService.h
Normal file
21
src/include/DataModelV2/SelectionService.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "Instance.h"
|
||||
#include "PropertyWindow.h"
|
||||
|
||||
class SelectionService : public Instance
|
||||
{
|
||||
public:
|
||||
SelectionService(void);
|
||||
~SelectionService(void);
|
||||
SelectionService(const SelectionService &oinst);
|
||||
std::vector<Instance *> getSelection();
|
||||
void clearSelection();
|
||||
bool isSelected(Instance * instance);
|
||||
void addSelected(Instance * instance);
|
||||
void removeSelected(Instance * instance);
|
||||
void addSelected(const std::vector<Instance *> &instances);
|
||||
void setPropertyWindow(PropertyWindow * propertyWindow);
|
||||
private:
|
||||
std::vector<Instance *> selection;
|
||||
PropertyWindow * propertyWindow;
|
||||
};
|
||||
@@ -9,5 +9,6 @@ public:
|
||||
WorkspaceInstance(void);
|
||||
~WorkspaceInstance(void);
|
||||
void clearChildren();
|
||||
void zoomToExtents();
|
||||
std::vector<PartInstance *> partObjects;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "DataModelV2/DataModelInstance.h"
|
||||
|
||||
#include "XplicitNgine/XplicitNgine.h"
|
||||
|
||||
class Application;
|
||||
|
||||
@@ -25,9 +25,9 @@ public:
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
@@ -5,13 +5,14 @@ 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(Instance *);
|
||||
void UpdateSelected(std::vector<Instance *> selection);
|
||||
void ClearProperties();
|
||||
void onResize();
|
||||
void refreshExplorer(Instance* selectedInstance);
|
||||
void refreshExplorer(std::vector<Instance *> selection);
|
||||
HWND _hwndProp;
|
||||
private:
|
||||
HWND _propGrid;
|
||||
HWND _explorerComboBox;
|
||||
void _resize();
|
||||
void clearExplorer();
|
||||
};
|
||||
19
src/include/XplicitNgine/XplicitNgine.h
Normal file
19
src/include/XplicitNgine/XplicitNgine.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <ode/ode.h>
|
||||
#include "DatamodelV2/Instance.h"
|
||||
#include "DatamodelV2/PartInstance.h"
|
||||
|
||||
class XplicitNgine : public Instance
|
||||
{
|
||||
public:
|
||||
XplicitNgine();
|
||||
~XplicitNgine();
|
||||
dWorldID physWorld;
|
||||
dSpaceID physSpace;
|
||||
dJointGroupID contactgroup;
|
||||
|
||||
void step(float stepSize);
|
||||
void createBody(PartInstance* partInstance);
|
||||
void deleteBody(PartInstance* partInstance);
|
||||
void updateBody(PartInstance* partInstance, CoordinateFrame * cFrame);
|
||||
};
|
||||
7
src/include/resource.h
Normal file
7
src/include/resource.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#define IDC_PROPERTYGRID 2000
|
||||
#define IDC_STATIC 2
|
||||
|
||||
#define IDC_EDIT1 105
|
||||
#define IDI_ICON1 102
|
||||
#define IDB_BITMAP1 103
|
||||
#define IDD_DIALOG1 104
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef WINVER
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#define _WIN32_WINDOWS 0x0400
|
||||
#define WINVER 0x0400
|
||||
#endif
|
||||
@@ -1,13 +1,14 @@
|
||||
#include <G3DAll.h>
|
||||
#include <initguid.h>
|
||||
#include <iomanip>
|
||||
#include "../../resource.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 "CameraController.h"
|
||||
#include "AudioPlayer.h"
|
||||
#include "Globals.h"
|
||||
@@ -143,6 +144,11 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti
|
||||
|
||||
}
|
||||
|
||||
bool Application::viewportHasFocus()
|
||||
{
|
||||
return GetActiveWindow() == this->_hWndMain;
|
||||
}
|
||||
|
||||
void Application::navigateToolbox(std::string path)
|
||||
{
|
||||
int len = path.size() + 1;
|
||||
@@ -154,28 +160,29 @@ void Application::navigateToolbox(std::string path)
|
||||
|
||||
void Application::deleteInstance()
|
||||
{
|
||||
if(g_selectedInstances.size() > 0)
|
||||
if(_dataModel->getSelectionService()->getSelection().size() > 0)
|
||||
{
|
||||
size_t undeletable = 0;
|
||||
while(g_selectedInstances.size() > undeletable)
|
||||
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)
|
||||
{
|
||||
if(g_selectedInstances.at(0)->canDelete)
|
||||
{
|
||||
AudioPlayer::playSound(GetFileInPath("/content/sounds/pageturn.wav"));
|
||||
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||
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);
|
||||
delete selectedInstance;
|
||||
selectedInstance = NULL;
|
||||
g_selectedInstances.erase(g_selectedInstances.begin());
|
||||
}
|
||||
else
|
||||
{
|
||||
undeletable++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(g_selectedInstances.size() == 0)
|
||||
g_usableApp->_propWindow->ClearProperties();
|
||||
if(_dataModel->getSelectionService()->getSelection().size() == 0)
|
||||
_dataModel->getSelectionService()->addSelected(_dataModel);
|
||||
}
|
||||
|
||||
|
||||
@@ -188,10 +195,9 @@ void Application::onInit() {
|
||||
_dataModel->setName("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);
|
||||
@@ -199,7 +205,8 @@ void Application::onInit() {
|
||||
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);
|
||||
@@ -263,9 +270,6 @@ void Application::onInit() {
|
||||
test->setPosition(Vector3(-2,5,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
|
||||
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
@@ -285,6 +289,9 @@ void Application::onInit() {
|
||||
LevelInstance * level = g_dataModel->getLevel();
|
||||
std::string GetCurrentSplash = level->SplashHTML;
|
||||
SplashHTMLLoad(GetCurrentSplash);
|
||||
|
||||
_dataModel->getSelectionService()->clearSelection();
|
||||
_dataModel->getSelectionService()->addSelected(_dataModel);
|
||||
|
||||
|
||||
|
||||
@@ -297,86 +304,15 @@ void Application::onInit() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Application::onCleanup() {
|
||||
clearInstances();
|
||||
sky->~Sky();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Class HyperSnapSolver
|
||||
|
||||
function getCollisionDepth(Part colliding, part collider);
|
||||
function getFaceCollision(Part colliding, part collider);
|
||||
|
||||
function eject(Part colliding, Part collider)
|
||||
{
|
||||
if(!colliding.canCollide || !collider.canCollide)
|
||||
return;
|
||||
if(getCollisionDepth(colliding, collider) != 0) {
|
||||
int ejectMultiplier, ejectMultipliery = 1-(collider.Friction+colliding.Friction), ejectMultiplierz = 1-(collider.Friction/2+colliding.Friction/2);
|
||||
if(colliding.Anchored)
|
||||
ejectMultiplier = collider.elasticity;
|
||||
int faceCollided = getFaceCollision(colliding, collider);
|
||||
if(faceCollided % 3 == 1)
|
||||
{
|
||||
ejectMultipliery = ejectMultiplier;
|
||||
ejectMultiplier = 1-(collider.Friction+colliding.Friction/2);
|
||||
}
|
||||
else if(faceCollided % 3 == 2)
|
||||
{
|
||||
ejectMultiplierz = ejectMultiplier;
|
||||
ejectMultiplier = 1-(collider.Friction+colliding.Friction/2);
|
||||
}
|
||||
|
||||
collider.Velocity *= Vector3.new(colliding.Velocity.x*ejectMultiplier,colliding.Velocity.y*ejectMultipliery,colliding.Velocity.z)
|
||||
}
|
||||
void Application::onLogic() {
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
double grav = 0.32666666666666666666666666666667;
|
||||
void simGrav(PartInstance * collider)
|
||||
{
|
||||
if(!collider->anchored)
|
||||
{
|
||||
collider->setPosition(collider->getPosition()+collider->getVelocity());
|
||||
collider->setVelocity(collider->getVelocity()-Vector3(0,grav,0));
|
||||
}
|
||||
}
|
||||
|
||||
void eject(PartInstance * colliding, PartInstance * collider)
|
||||
{
|
||||
if(colliding == collider || !colliding->canCollide || !collider->canCollide)
|
||||
return;
|
||||
if(G3D::CollisionDetection::fixedSolidBoxIntersectsFixedSolidBox(collider->getBox(), colliding->getBox()))
|
||||
collider->setVelocity(collider->getVelocity().reflectionDirection(colliding->getCFrame().upVector())/1.3F);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Application::onLogic() {
|
||||
//PhysicsStart
|
||||
for_each (_dataModel->getWorkspace()->partObjects.begin(), _dataModel->getWorkspace()->partObjects.end(), simGrav);
|
||||
for(size_t i = 0; i < _dataModel->getWorkspace()->partObjects.size(); i++)
|
||||
{
|
||||
for(size_t j = 0; j < _dataModel->getWorkspace()->partObjects.size(); j++)
|
||||
{
|
||||
eject(_dataModel->getWorkspace()->partObjects[i], _dataModel->getWorkspace()->partObjects[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Application::onNetwork() {
|
||||
// Poll net messages here
|
||||
}
|
||||
@@ -387,15 +323,38 @@ 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)
|
||||
@@ -410,95 +369,29 @@ void Application::onSimulation(RealTime rdt, SimTime sdt, SimTime idt) {
|
||||
|
||||
}
|
||||
|
||||
/*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(mouseMoveState)
|
||||
{
|
||||
mouseMoveState = false;
|
||||
tool->onMouseMoved(mouse);
|
||||
}
|
||||
/*
|
||||
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());
|
||||
}
|
||||
//}
|
||||
|
||||
//_dataModel->mousex = ui->getMouseX();
|
||||
//_dataModel->mousey = ui->getMouseY();
|
||||
mouse.setMouseDown((GetKeyState(VK_LBUTTON) & 0x100) != 0);
|
||||
|
||||
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(mouse.x, mouse.y, 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
|
||||
// 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);
|
||||
}
|
||||
|
||||
void Application::changeTool(Tool * newTool)
|
||||
@@ -706,17 +599,15 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
|
||||
|
||||
//Draw::box(G3D::Box(mouse.getPosition()-Vector3(2,0.5F,1),mouse.getPosition()+Vector3(2,0.5F,1)), rd, Color3::cyan(), Color4::clear());
|
||||
if(g_selectedInstances.size() > 0)
|
||||
|
||||
for(size_t i = 0; i < _dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
{
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(g_dataModel->getSelectionService()->getSelection()[i]))
|
||||
{
|
||||
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->getCFrame());
|
||||
}
|
||||
}
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -796,11 +687,6 @@ void Application::onKeyPressed(int key)
|
||||
{
|
||||
_dataModel->getOpen();
|
||||
}
|
||||
if ((GetHoldKeyState(VK_LCONTROL) || GetHoldKeyState(VK_RCONTROL)) && key=='A')
|
||||
{
|
||||
std::vector<Instance *> vec = _dataModel->getWorkspace()->getAllChildren();
|
||||
g_selectedInstances.insert(g_selectedInstances.end(), vec.begin(), vec.end());
|
||||
}
|
||||
tool->onKeyDown(key);
|
||||
}
|
||||
void Application::onKeyUp(int key)
|
||||
@@ -810,12 +696,6 @@ void Application::onKeyUp(int 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);
|
||||
|
||||
|
||||
@@ -825,19 +705,6 @@ void Application::onMouseLeftPressed(HWND hwnd,int x,int y)
|
||||
}
|
||||
}
|
||||
|
||||
void Application::selectInstance(Instance* selectedInstance, PropertyWindow* propWindow)
|
||||
{
|
||||
if(!GetHoldKeyState(VK_RCONTROL) && !GetHoldKeyState(VK_LCONTROL))
|
||||
{
|
||||
printf("No control key hold \n");
|
||||
g_selectedInstances.clear();
|
||||
}
|
||||
else printf("Control held\n");
|
||||
if(std::find(g_selectedInstances.begin(), g_selectedInstances.end(),selectedInstance)==g_selectedInstances.end())
|
||||
g_selectedInstances.push_back(selectedInstance);
|
||||
propWindow->UpdateSelected(selectedInstance);
|
||||
|
||||
}
|
||||
G3D::RenderDevice* Application::getRenderDevice()
|
||||
{
|
||||
return renderDevice;
|
||||
@@ -845,13 +712,9 @@ 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)
|
||||
@@ -871,8 +734,6 @@ void Application::onMouseMoved(int x,int y)
|
||||
mouse.y = y;
|
||||
//tool->onMouseMoved(mouse);
|
||||
mouseMoveState = true;
|
||||
//_dataModel->mousex = x;
|
||||
//_dataModel->mousey = y;
|
||||
|
||||
}
|
||||
void Application::onMouseWheel(int x,int y,short delta)
|
||||
@@ -951,6 +812,8 @@ void Application::run() {
|
||||
RealTime rdt = timeStep;
|
||||
SimTime sdt = timeStep * rate;
|
||||
SimTime idt = desiredFrameDuration * rate;
|
||||
|
||||
|
||||
|
||||
onSimulation(rdt,sdt,idt);
|
||||
m_simulationWatch.tock();
|
||||
|
||||
@@ -159,6 +159,11 @@ void CameraController::tiltDown()
|
||||
setFrame(frame);
|
||||
}
|
||||
|
||||
void CameraController::zoomExtents()
|
||||
{
|
||||
// do some weird jank math
|
||||
}
|
||||
|
||||
void CameraController::centerCamera(Instance* selection)
|
||||
{
|
||||
CoordinateFrame frame = CoordinateFrame(g3dCamera.getCoordinateFrame().translation);
|
||||
@@ -188,6 +193,8 @@ 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;
|
||||
|
||||
58
src/source/DataModel/SelectionService.cpp
Normal file
58
src/source/DataModel/SelectionService.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#include "DataModelV2/SelectionService.h"
|
||||
|
||||
SelectionService::SelectionService(void){
|
||||
Instance::Instance();
|
||||
propertyWindow = NULL;
|
||||
}
|
||||
|
||||
SelectionService::~SelectionService(void){
|
||||
}
|
||||
|
||||
SelectionService::SelectionService(const SelectionService &oinst){
|
||||
Instance::Instance(oinst);
|
||||
propertyWindow = NULL;
|
||||
}
|
||||
|
||||
|
||||
std::vector<Instance *> SelectionService::getSelection(){
|
||||
return this->selection;
|
||||
}
|
||||
void SelectionService::clearSelection(){
|
||||
this->selection.clear();
|
||||
if(propertyWindow != NULL)
|
||||
propertyWindow->ClearProperties();
|
||||
printf("selectionSize: %d\n", selection.size());
|
||||
}
|
||||
bool SelectionService::isSelected(Instance * instance){
|
||||
return std::find(selection.begin(), selection.end(), instance) != selection.end();
|
||||
}
|
||||
void SelectionService::addSelected(Instance * instance){
|
||||
if(!isSelected(instance))
|
||||
this->selection.push_back(instance);
|
||||
if(propertyWindow != NULL)
|
||||
propertyWindow->UpdateSelected(selection);
|
||||
printf("selectionSize: %d\n", selection.size());
|
||||
}
|
||||
void SelectionService::removeSelected(Instance * instance){
|
||||
selection.erase(std::remove(selection.begin(), selection.end(), instance), selection.end());
|
||||
if(propertyWindow != NULL)
|
||||
propertyWindow->UpdateSelected(selection);
|
||||
printf("selectionSize: %d\n", selection.size());
|
||||
}
|
||||
void SelectionService::addSelected(const std::vector<Instance *> &instances){
|
||||
for(size_t i = 0; i < instances.size(); i++)
|
||||
{
|
||||
if(!isSelected(instances[i]))
|
||||
this->selection.push_back(instances[i]);
|
||||
}
|
||||
if(propertyWindow != NULL)
|
||||
propertyWindow->UpdateSelected(selection);
|
||||
printf("selectionSize: %d\n", selection.size());
|
||||
}
|
||||
void SelectionService::setPropertyWindow(PropertyWindow * propertyWindow)
|
||||
{
|
||||
this->propertyWindow = propertyWindow;
|
||||
if(propertyWindow != NULL)
|
||||
propertyWindow->ClearProperties();
|
||||
printf("selectionSize: %d\n", selection.size());
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <string>
|
||||
#include "DataModelV2/GuiRootInstance.h"
|
||||
#include "DataModelV2/ToggleImageButtonInstance.h"
|
||||
#include "DataModelV2/DataModelInstance.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
@@ -13,13 +14,14 @@ using namespace std;
|
||||
using namespace rapidxml;
|
||||
|
||||
|
||||
|
||||
DataModelInstance::DataModelInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
workspace = new WorkspaceInstance();
|
||||
guiRoot = new GuiRootInstance();
|
||||
level = new LevelInstance();
|
||||
selectionService = new SelectionService();
|
||||
selectionService->setPropertyWindow(g_usableApp->_propWindow);
|
||||
//children.push_back(workspace);
|
||||
//children.push_back(level);
|
||||
className = "dataModel";
|
||||
@@ -34,13 +36,35 @@ DataModelInstance::DataModelInstance(void)
|
||||
_loadedFileName="..//skooter.rbxm";
|
||||
listicon = 5;
|
||||
running = false;
|
||||
xplicitNgine = NULL;
|
||||
resetEngine();
|
||||
}
|
||||
|
||||
void DataModelInstance::resetEngine()
|
||||
{
|
||||
if(xplicitNgine != NULL)
|
||||
delete xplicitNgine;
|
||||
xplicitNgine = new XplicitNgine();
|
||||
g_xplicitNgine = xplicitNgine;
|
||||
for(size_t i = 0; i < getWorkspace()->partObjects.size(); i++)
|
||||
{
|
||||
PartInstance* partInstance = getWorkspace()->partObjects[i];
|
||||
partInstance->physBody = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
XplicitNgine * DataModelInstance::getEngine()
|
||||
{
|
||||
return xplicitNgine;
|
||||
}
|
||||
|
||||
void DataModelInstance::toggleRun()
|
||||
{
|
||||
running = !running;
|
||||
//if(!running)
|
||||
//resetEngine();
|
||||
}
|
||||
|
||||
bool DataModelInstance::isRunning()
|
||||
{
|
||||
return running;
|
||||
@@ -48,6 +72,7 @@ bool DataModelInstance::isRunning()
|
||||
|
||||
DataModelInstance::~DataModelInstance(void)
|
||||
{
|
||||
delete xplicitNgine;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
@@ -62,8 +87,17 @@ void DataModelInstance::modXMLLevel(float modY)
|
||||
|
||||
void DataModelInstance::clearLevel()
|
||||
{
|
||||
running = false;
|
||||
Instance * goButton = this->getGuiRoot()->findFirstChild("go");
|
||||
if(goButton != NULL){
|
||||
if(ToggleImageButtonInstance* goButtonReal = dynamic_cast<ToggleImageButtonInstance*>(goButton))
|
||||
{
|
||||
goButtonReal->checked = false;
|
||||
}
|
||||
}
|
||||
selectionService->clearSelection();
|
||||
selectionService->addSelected(this);
|
||||
workspace->clearChildren();
|
||||
g_usableApp->_propWindow->UpdateSelected(this);
|
||||
}
|
||||
PartInstance* DataModelInstance::makePart()
|
||||
{
|
||||
@@ -271,6 +305,7 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
xml_node<> *propNode = node->first_node();
|
||||
xml_node<> *cFrameNode=0;
|
||||
xml_node<> *sizeNode=0;
|
||||
xml_node<> *anchoredNode=0;
|
||||
xml_node<> *shapeNode=0;
|
||||
xml_node<> *colorNode=0;
|
||||
xml_node<> *brickColorNode=0;
|
||||
@@ -286,6 +321,10 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
if (xmlValue=="CFrame" | xmlValue=="CoordinateFrame")
|
||||
{
|
||||
cFrameNode = partPropNode;
|
||||
}
|
||||
if (xmlValue=="Anchored")
|
||||
{
|
||||
anchoredNode = partPropNode;
|
||||
}
|
||||
if (xmlValue=="Name")
|
||||
{
|
||||
@@ -397,6 +436,10 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
{
|
||||
test->color = bcToRGB(atoi(brickColorNode->value()));
|
||||
}
|
||||
if(anchoredNode)
|
||||
{
|
||||
test->setAnchored(stricmp(anchoredNode->value(), "true") == 0);
|
||||
}
|
||||
test->setSize(Vector3(sizeX,sizeY+_modY,sizeZ));
|
||||
test->setName(newName);
|
||||
CoordinateFrame cf;
|
||||
@@ -449,6 +492,9 @@ bool DataModelInstance::load(const char* filename, bool clearObjects)
|
||||
std::string hname = sfilename.substr(begin);
|
||||
std::string tname = hname.substr(0, hname.length() - 5);
|
||||
name = tname;
|
||||
resetEngine();
|
||||
selectionService->clearSelection();
|
||||
selectionService->addSelected(this);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -519,6 +565,7 @@ bool DataModelInstance::getOpen()
|
||||
of.lpstrFile[0]='\0';
|
||||
of.nMaxFile=500;
|
||||
of.lpstrTitle="Hello";
|
||||
of.Flags = OFN_FILEMUSTEXIST;
|
||||
ShowCursor(TRUE);
|
||||
BOOL file = GetOpenFileName(&of);
|
||||
if (file)
|
||||
@@ -526,7 +573,6 @@ bool DataModelInstance::getOpen()
|
||||
_loadedFileName = of.lpstrFile;
|
||||
load(of.lpstrFile,true);
|
||||
}
|
||||
//else MessageBox(NULL, "Failed to open dialog", "Failure", MB_ICONHAND | MB_OK);
|
||||
return true;
|
||||
}
|
||||
void DataModelInstance::setMessage(std::string msg)
|
||||
@@ -591,25 +637,16 @@ WorkspaceInstance* DataModelInstance::getWorkspace()
|
||||
{
|
||||
return workspace;
|
||||
}
|
||||
/*Vector2 DataModelInstance::getMousePos()
|
||||
{
|
||||
return Vector2(mousex,mousey);
|
||||
}
|
||||
void DataModelInstance::setMousePos(int x,int y)
|
||||
{
|
||||
mousex=x;
|
||||
mousey=y;
|
||||
}
|
||||
void DataModelInstance::setMousePos(Vector2 pos)
|
||||
{
|
||||
mousex=pos.x;
|
||||
mousey=pos.y;
|
||||
}*/
|
||||
|
||||
GuiRootInstance* DataModelInstance::getGuiRoot()
|
||||
{
|
||||
return guiRoot;
|
||||
}
|
||||
|
||||
SelectionService* DataModelInstance::getSelectionService()
|
||||
{
|
||||
return selectionService;
|
||||
}
|
||||
|
||||
LevelInstance* DataModelInstance::getLevel()
|
||||
{
|
||||
|
||||
@@ -34,13 +34,11 @@ void GroupInstance::PropUpdate(LPPROPGRIDITEM &pItem)
|
||||
|
||||
std::vector<Instance *> GroupInstance::unGroup()
|
||||
{
|
||||
std::vector<Instance *> child;
|
||||
while(children.size() > 0)
|
||||
{
|
||||
child.push_back(children[0]);
|
||||
children[0]->setParent(parent);
|
||||
}
|
||||
return child;
|
||||
return std::vector<Instance *>();
|
||||
}
|
||||
|
||||
void GroupInstance::render(RenderDevice * rd)
|
||||
|
||||
@@ -507,8 +507,8 @@ void GuiRootInstance::update()
|
||||
button4->disabled = true;
|
||||
button5->disabled = true;
|
||||
button6->disabled = true;
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
if(g_selectedInstances.at(i)->canDelete)
|
||||
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
|
||||
{
|
||||
button->disabled = false;
|
||||
button2->disabled = false;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define WINVER 0x0400
|
||||
#include <G3DAll.h>
|
||||
#include "DataModelV2/Instance.h"
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
PartInstance::PartInstance(void)
|
||||
{
|
||||
PVInstance::PVInstance();
|
||||
physBody = NULL;
|
||||
glList = glGenLists(1);
|
||||
name = "Unnamed PVItem";
|
||||
className = "Part";
|
||||
@@ -27,6 +28,13 @@ PartInstance::PartInstance(void)
|
||||
shape = Enum::Shape::Block;
|
||||
}
|
||||
|
||||
float PartInstance::getMass()
|
||||
{
|
||||
if(shape == Enum::Shape::Block)
|
||||
return size.x*size.y*size.z*0.7F;
|
||||
else
|
||||
return 1.3333333333333333333333333333333F*(size.x/2)*(size.y/2)*(size.z/2)*0.7F;
|
||||
}
|
||||
|
||||
Vector3 PartInstance::getVelocity()
|
||||
{
|
||||
@@ -109,32 +117,34 @@ void PartInstance::setSurface(int face, Enum::SurfaceType::Value surface)
|
||||
|
||||
void PartInstance::setParent(Instance* prnt)
|
||||
{
|
||||
g_dataModel->getEngine()->deleteBody(this);
|
||||
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)
|
||||
cparent = getParent();
|
||||
while(cparent != NULL)
|
||||
{
|
||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(parent))
|
||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(cparent))
|
||||
{
|
||||
workspace->partObjects.push_back(this);
|
||||
break;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
cparent = cparent->getParent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PartInstance::PartInstance(const PartInstance &oinst)
|
||||
{
|
||||
PVInstance::PVInstance(oinst);
|
||||
physBody = NULL;
|
||||
glList = glGenLists(1);
|
||||
//name = oinst.name;
|
||||
//className = "Part";
|
||||
@@ -143,7 +153,7 @@ PartInstance::PartInstance(const PartInstance &oinst)
|
||||
setParent(oinst.parent);
|
||||
anchored = oinst.anchored;
|
||||
size = oinst.size;
|
||||
setCFrame(oinst.cFrame);
|
||||
setCFrameNoSync(oinst.cFrame);
|
||||
color = oinst.color;
|
||||
velocity = oinst.velocity;
|
||||
rotVelocity = oinst.rotVelocity;
|
||||
@@ -220,15 +230,32 @@ void PartInstance::setShape(Enum::Shape::Value shape)
|
||||
void PartInstance::setPosition(Vector3 pos)
|
||||
{
|
||||
position = pos;
|
||||
cFrame = CoordinateFrame(cFrame.rotation, pos);
|
||||
changed = true;
|
||||
setCFrame(CoordinateFrame(cFrame.rotation, pos));
|
||||
}
|
||||
|
||||
void PartInstance::setAnchored(bool anchored)
|
||||
{
|
||||
this->anchored = anchored;
|
||||
g_dataModel->getEngine()->deleteBody(this);
|
||||
}
|
||||
|
||||
bool PartInstance::isAnchored()
|
||||
{
|
||||
return this->anchored;
|
||||
}
|
||||
|
||||
|
||||
CoordinateFrame PartInstance::getCFrame()
|
||||
{
|
||||
return cFrame;
|
||||
}
|
||||
void PartInstance::setCFrame(CoordinateFrame coordinateFrame)
|
||||
{
|
||||
g_dataModel->getEngine()->updateBody(this, &coordinateFrame);
|
||||
setCFrameNoSync(coordinateFrame);
|
||||
}
|
||||
|
||||
void PartInstance::setCFrameNoSync(CoordinateFrame coordinateFrame)
|
||||
{
|
||||
cFrame = coordinateFrame;
|
||||
position = coordinateFrame.translation;
|
||||
@@ -279,7 +306,6 @@ void PartInstance::render(RenderDevice* rd) {
|
||||
changed=false;
|
||||
Vector3 renderSize = size/2;
|
||||
glNewList(glList, GL_COMPILE);
|
||||
//glScalef(0.5f,0.5f,0.5f);
|
||||
renderShape(this->shape, renderSize, color);
|
||||
renderSurface(TOP, this->top, renderSize, this->controller, color);
|
||||
renderSurface(FRONT, this->front, renderSize, this->controller, color);
|
||||
@@ -297,6 +323,16 @@ void PartInstance::render(RenderDevice* rd) {
|
||||
PartInstance::~PartInstance(void)
|
||||
{
|
||||
glDeleteLists(glList, 1);
|
||||
/*
|
||||
// Causes some weird ODE error
|
||||
// Someone, please look into this
|
||||
|
||||
dBodyDestroy(physBody);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (physGeom[i] != NULL)
|
||||
dGeomDestroy(physGeom[i]);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
char pto[512];
|
||||
@@ -335,7 +371,7 @@ void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
||||
}
|
||||
else if(strcmp(item->lpszPropName, "Anchored") == 0)
|
||||
{
|
||||
anchored= item->lpCurValue == TRUE;
|
||||
setAnchored(item->lpCurValue == TRUE);
|
||||
}
|
||||
else if(strcmp(item->lpszPropName, "Offset") == 0)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "DataModelV2/WorkspaceInstance.h"
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
WorkspaceInstance::WorkspaceInstance(void)
|
||||
{
|
||||
@@ -15,6 +16,11 @@ void WorkspaceInstance::clearChildren()
|
||||
Instance::clearChildren();
|
||||
}
|
||||
|
||||
void WorkspaceInstance::zoomToExtents()
|
||||
{
|
||||
g_usableApp->cameraController.zoomExtents();
|
||||
}
|
||||
|
||||
WorkspaceInstance::~WorkspaceInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
int const Globals::gen = 0;
|
||||
int const Globals::major = 100;
|
||||
int const Globals::minor = 4;
|
||||
int const Globals::patch = 3;
|
||||
int Globals::surfaceId = 2;
|
||||
//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;
|
||||
|
||||
@@ -43,9 +43,9 @@ HRESULT IEBrowser::doExternal(std::wstring funcName,
|
||||
if(pDispParams->rgvarg->intVal < 0 || pDispParams->rgvarg->intVal > 7)
|
||||
return S_OK;
|
||||
Enum::Controller::Value cont = (Enum::Controller::Value)pDispParams->rgvarg->intVal;
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
{
|
||||
if(PVInstance* part = dynamic_cast<PVInstance*>(g_selectedInstances.at(i)))
|
||||
if(PVInstance* part = dynamic_cast<PVInstance*>(g_dataModel->getSelectionService()->getSelection()[i]))
|
||||
{
|
||||
ding = true;
|
||||
part->controller = cont;
|
||||
|
||||
@@ -7,8 +7,8 @@ void CameraButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
AudioPlayer::playSound(cameraSound);
|
||||
CoordinateFrame frame = g_usableApp->cameraController.getCamera()->getCoordinateFrame();
|
||||
if(button->name == "CenterCam" && g_selectedInstances.size() > 0)
|
||||
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));
|
||||
if(button->name == "CenterCam" && g_dataModel->getSelectionService()->getSelection().size() > 0)
|
||||
g_usableApp->cameraController.centerCamera(g_dataModel->getSelectionService()->getSelection()[0]);
|
||||
else if(button->name == "ZoomIn")
|
||||
g_usableApp->cameraController.Zoom(1);
|
||||
else if(button->name == "ZoomOut")
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
#include "Application.h"
|
||||
#include "Globals.h"
|
||||
#include "AudioPlayer.h"
|
||||
#include "DataModelV2/SelectionService.h"
|
||||
#include "Listener/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)
|
||||
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
|
||||
{
|
||||
cont = true;
|
||||
break;
|
||||
@@ -19,53 +20,46 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
if(button->name == "Duplicate")
|
||||
{
|
||||
std::vector<Instance*> newinst;
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
{
|
||||
if(g_selectedInstances.at(i)->canDelete)
|
||||
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
|
||||
{
|
||||
Instance* tempinst = g_selectedInstances.at(i);
|
||||
Instance* tempinst = g_dataModel->getSelectionService()->getSelection()[i];
|
||||
|
||||
Instance* clonedInstance = g_selectedInstances.at(i)->clone();
|
||||
Instance* clonedInstance = g_dataModel->getSelectionService()->getSelection()[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));
|
||||
g_dataModel->getSelectionService()->clearSelection();
|
||||
g_dataModel->getSelectionService()->addSelected(newinst);
|
||||
}
|
||||
else if(button->name == "Group")
|
||||
{
|
||||
GroupInstance * inst = new GroupInstance();
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
inst->setParent(g_dataModel->getWorkspace());
|
||||
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
{
|
||||
if(g_selectedInstances.at(i)->canDelete)
|
||||
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
|
||||
{
|
||||
g_selectedInstances.at(i)->setParent(inst);
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(g_selectedInstances.at(i)))
|
||||
g_dataModel->getSelectionService()->getSelection()[i]->setParent(inst);
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(g_dataModel->getSelectionService()->getSelection()[i]))
|
||||
{
|
||||
inst->primaryPart = part;
|
||||
}
|
||||
}
|
||||
/*tempinst->setPosition(Vector3(tempPos.x, tempPos.y + tempSize.y, tempPos.z));
|
||||
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));*/
|
||||
}
|
||||
inst->setParent(g_dataModel->getWorkspace());
|
||||
g_selectedInstances.clear();
|
||||
g_selectedInstances.push_back(inst);
|
||||
if(g_selectedInstances.size() > 0)
|
||||
g_usableApp->_propWindow->UpdateSelected(g_selectedInstances.at(0));
|
||||
g_dataModel->getSelectionService()->clearSelection();
|
||||
g_dataModel->getSelectionService()->addSelected(inst);
|
||||
}
|
||||
else if(button->name == "UnGroup")
|
||||
{
|
||||
std::vector<Instance*> newinst;
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++)
|
||||
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
|
||||
{
|
||||
if(g_selectedInstances.at(i)->canDelete)
|
||||
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
|
||||
{
|
||||
if(GroupInstance* model = dynamic_cast<GroupInstance*>(g_selectedInstances.at(i)))
|
||||
if(GroupInstance* model = dynamic_cast<GroupInstance*>(g_dataModel->getSelectionService()->getSelection()[i]))
|
||||
{
|
||||
newinst = model->unGroup();
|
||||
model->setParent(NULL);
|
||||
@@ -73,13 +67,9 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
model = NULL;
|
||||
}
|
||||
}
|
||||
/*tempinst->setPosition(Vector3(tempPos.x, tempPos.y + tempSize.y, tempPos.z));
|
||||
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));*/
|
||||
}
|
||||
g_selectedInstances.clear();
|
||||
g_selectedInstances = newinst;
|
||||
if(g_selectedInstances.size() > 0)
|
||||
g_usableApp->_propWindow->UpdateSelected(newinst.at(0));
|
||||
g_dataModel->getSelectionService()->clearSelection();
|
||||
g_dataModel->getSelectionService()->addSelected(newinst);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,10 +14,23 @@ void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
HMENU mainmenu = CreatePopupMenu();
|
||||
AppendMenu(mainmenu, MF_STRING, 100, "New");
|
||||
AppendMenu(mainmenu, MF_STRING, 101, "Open...");
|
||||
AppendMenu(mainmenu, MF_STRING, 101, "Close");
|
||||
AppendMenu(mainmenu, MF_STRING, 102, "Close");
|
||||
AppendMenu(mainmenu, MF_SEPARATOR, 0, NULL);
|
||||
POINT p;
|
||||
GetCursorPos(&p);
|
||||
TrackPopupMenu(mainmenu, TPM_LEFTBUTTON, p.x, p.y, 0, Globals::mainHwnd, 0);
|
||||
int menuClick = TrackPopupMenu(mainmenu, TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, 0, Globals::mainHwnd, 0);
|
||||
switch (menuClick)
|
||||
{
|
||||
case 100:
|
||||
g_usableApp->clearInstances();
|
||||
g_usableApp->onInit();
|
||||
break;
|
||||
case 101:
|
||||
g_dataModel->getOpen();
|
||||
break;
|
||||
case 102:
|
||||
g_usableApp->QuitApp();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
void RotateButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
{
|
||||
if(g_selectedInstances.size() > 0)
|
||||
if(g_dataModel->getSelectionService()->getSelection().size() > 0)
|
||||
{
|
||||
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||
Instance* selectedInstance = g_dataModel->getSelectionService()->getSelection()[0];
|
||||
AudioPlayer::playSound(clickSound);
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(selectedInstance))
|
||||
{
|
||||
|
||||
@@ -112,31 +112,3 @@ void Mouse::setMouseDown(bool bval)
|
||||
{
|
||||
mouseDown = bval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//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)
|
||||
{
|
||||
selectedInstance = test;
|
||||
//if(!GetHoldKeyState(VK_RCONTROL) && !GetHoldKeyState(VK_LCONTROL))
|
||||
//g_selectedInstances.clear();
|
||||
//if(std::find(g_selectedInstances.begin(), g_selectedInstances.end(),test)==g_selectedInstances.end())
|
||||
//g_selectedInstances.push_back(test);
|
||||
}
|
||||
//selectInstance(test, _propWindow);
|
||||
//_message = "Dragging = true.";
|
||||
//_messageTime = System::time();
|
||||
//_dragging = true;*/
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
#define _WINSOCKAPI_
|
||||
#include <windows.h>
|
||||
#include "WindowFunctions.h"
|
||||
#include "../../resource.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;
|
||||
@@ -177,8 +171,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);
|
||||
propWind->ClearProperties();
|
||||
g_usableApp->selectInstance(children.at(ItemIndex),propWind);
|
||||
g_dataModel->getSelectionService()->clearSelection();
|
||||
g_dataModel->getSelectionService()->addSelected(children.at(ItemIndex));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -208,13 +202,18 @@ LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PropertyWindow::refreshExplorer(Instance* selectedInstance)
|
||||
void PropertyWindow::clearExplorer()
|
||||
{
|
||||
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)
|
||||
@@ -226,7 +225,6 @@ void PropertyWindow::refreshExplorer(Instance* selectedInstance)
|
||||
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++)
|
||||
@@ -343,11 +341,17 @@ void PropertyWindow::_resize()
|
||||
SetWindowPos(_explorerComboBox, NULL, 0, 0, rect.right, 400, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
}
|
||||
|
||||
void PropertyWindow::UpdateSelected(Instance * instance)
|
||||
void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
|
||||
{
|
||||
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++)
|
||||
@@ -361,12 +365,13 @@ void PropertyWindow::UpdateSelected(Instance * instance)
|
||||
PropGrid_ExpandAllCatalogs(_propGrid);
|
||||
//SetWindowLongPtr(_propGrid,GWL_USERDATA,(LONG)this);
|
||||
|
||||
refreshExplorer(instance);
|
||||
refreshExplorer(instances);
|
||||
_resize();
|
||||
}
|
||||
}
|
||||
|
||||
void PropertyWindow::ClearProperties()
|
||||
{
|
||||
clearExplorer();
|
||||
PropGrid_ResetContent(_propGrid);
|
||||
}
|
||||
@@ -224,8 +224,9 @@ void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Col
|
||||
glPopMatrix();
|
||||
/*Plusses, can possibly integrate into cylinder code later on*/
|
||||
glVertexPointer(2, GL_FLOAT,0, square_arr);
|
||||
glColor3f(127,127,127);
|
||||
glPushMatrix();
|
||||
glDisable(GL_COLOR_ARRAY);
|
||||
glColor3f(127,127,127);
|
||||
glRotatef(90,0,1,0);
|
||||
glTranslatef(0,0,-(size.z+0.001F));
|
||||
glScalef(0.75,0.75,0.75);
|
||||
@@ -233,9 +234,11 @@ void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Col
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glScalef(1/(size.x*8),size.x*8,1);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glEnable(GL_COLOR_ARRAY);
|
||||
glPopMatrix();
|
||||
|
||||
glPushMatrix();
|
||||
glDisable(GL_COLOR_ARRAY);
|
||||
glRotatef(-90,0,1,0);
|
||||
glTranslatef(0,0,-(size.z+0.001F));
|
||||
glScalef(0.75,0.75,0.75);
|
||||
@@ -243,6 +246,7 @@ void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Col
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glScalef(1/(size.x*8),size.x*8,1);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glEnable(GL_COLOR_ARRAY);
|
||||
glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Tool/ArrowTool.h"
|
||||
#include "Application.h"
|
||||
#include "DataModelV2/SelectionService.h"
|
||||
|
||||
ArrowTool::ArrowTool(void)
|
||||
{
|
||||
@@ -21,13 +22,12 @@ void ArrowTool::onButton1MouseDown(Mouse mouse)
|
||||
mouseDownStarty = mouse.y;
|
||||
mouseDown = true;
|
||||
if(!lctrlDown && !rctrlDown)
|
||||
g_selectedInstances.clear();
|
||||
g_dataModel->getSelectionService()->clearSelection();
|
||||
PartInstance * target = mouse.getTarget();
|
||||
if(target != NULL && std::find(g_selectedInstances.begin(), g_selectedInstances.end(), target) == g_selectedInstances.end())
|
||||
g_selectedInstances.push_back(target);
|
||||
if(g_selectedInstances.size() == 0)
|
||||
g_selectedInstances.push_back(g_dataModel);
|
||||
g_usableApp->_propWindow->UpdateSelected(g_selectedInstances[0]);
|
||||
if(target != NULL)
|
||||
g_dataModel->getSelectionService()->addSelected(target);
|
||||
if(g_dataModel->getSelectionService()->getSelection().size() == 0)
|
||||
g_dataModel->getSelectionService()->addSelected(g_dataModel);
|
||||
}
|
||||
void ArrowTool::onButton1MouseUp(Mouse mouse)
|
||||
{
|
||||
@@ -47,11 +47,11 @@ void ArrowTool::onMouseMoved(Mouse mouse)
|
||||
}
|
||||
else return;
|
||||
}
|
||||
for(size_t i = 0; i < g_selectedInstances.size(); i++) //This will later decide primary and move all parts according to primary
|
||||
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++) //This will later decide primary and move all parts according to primary
|
||||
{
|
||||
if(PartInstance * part = dynamic_cast<PartInstance *>(g_selectedInstances[i]))
|
||||
if(PartInstance * part = dynamic_cast<PartInstance *>(g_dataModel->getSelectionService()->getSelection()[i]))
|
||||
{
|
||||
part->setPosition(mouse.getPosition(g_selectedInstances));
|
||||
part->setPosition(mouse.getPosition(g_dataModel->getSelectionService()->getSelection()));
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -69,30 +69,6 @@ void ArrowTool::onKeyDown(int key)
|
||||
{
|
||||
lctrlDown = true;
|
||||
}
|
||||
else if(key == 'R')
|
||||
{
|
||||
if(g_selectedInstances.size() > 0)
|
||||
{
|
||||
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||
AudioPlayer::playSound(clickSound);
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(selectedInstance))
|
||||
{
|
||||
part->setCFrame(part->getCFrame()*Matrix3::fromEulerAnglesXYZ(0,toRadians(90),0));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(key == 'T')
|
||||
{
|
||||
if(g_selectedInstances.size() > 0)
|
||||
{
|
||||
Instance* selectedInstance = g_selectedInstances.at(0);
|
||||
AudioPlayer::playSound(clickSound);
|
||||
if(PartInstance* part = dynamic_cast<PartInstance*>(selectedInstance))
|
||||
{
|
||||
part->setCFrame(part->getCFrame()*Matrix3::fromEulerAnglesXYZ(0,0,toRadians(90)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ArrowTool::onKeyUp(int key)
|
||||
|
||||
194
src/source/XplicitNgine/XplicitNgine.cpp
Normal file
194
src/source/XplicitNgine/XplicitNgine.cpp
Normal file
@@ -0,0 +1,194 @@
|
||||
#include "XplicitNgine/XplicitNgine.h"
|
||||
#include "Globals.h"
|
||||
|
||||
#define SIDE (0.5f)
|
||||
#define MASS (1.0)
|
||||
|
||||
// constraints
|
||||
#define MAX_BODIES 65535
|
||||
#define OBJ_DENSITY (5.0)
|
||||
#define MAX_CONTACT_PER_BODY 4
|
||||
|
||||
XplicitNgine::XplicitNgine()
|
||||
{
|
||||
physWorld = dWorldCreate();
|
||||
physSpace = dHashSpaceCreate(0);
|
||||
contactgroup = dJointGroupCreate(0);
|
||||
|
||||
dWorldSetGravity(physWorld, 0, -0.5, 0);
|
||||
|
||||
this->name = "PhysicsService";
|
||||
//dGeomID ground_geom = dCreatePlane(physSpace, 0, 1, 0, 0);
|
||||
}
|
||||
|
||||
XplicitNgine::~XplicitNgine()
|
||||
{
|
||||
dJointGroupDestroy (contactgroup);
|
||||
dSpaceDestroy (physSpace);
|
||||
dWorldDestroy (physWorld);
|
||||
dCloseODE();
|
||||
}
|
||||
|
||||
void collisionCallback(void *data, dGeomID o1, dGeomID o2)
|
||||
{
|
||||
int i,n;
|
||||
|
||||
dBodyID b1 = dGeomGetBody(o1);
|
||||
dBodyID b2 = dGeomGetBody(o2);
|
||||
if (b1 && b2 && dAreConnected(b1, b2))
|
||||
return;
|
||||
|
||||
const int N = 4;
|
||||
dContact contact[N];
|
||||
n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact));
|
||||
if (n > 0) {
|
||||
for (i=0; i<n; i++) {
|
||||
contact[i].surface.mode = dContactBounce | dContactSlip1 | dContactSlip2 | dContactSoftERP | dContactSoftCFM | dContactApprox1;
|
||||
|
||||
// Define contact surface properties
|
||||
|
||||
contact[i].surface.bounce = 0.5; //Elasticity
|
||||
contact[i].surface.mu = 0.3F; //Friction
|
||||
contact[i].surface.slip1 = 0.0;
|
||||
contact[i].surface.slip2 = 0.0;
|
||||
contact[i].surface.soft_erp = 0.8F;
|
||||
contact[i].surface.soft_cfm = 0.01F;
|
||||
|
||||
// Create joints
|
||||
dJointID c = dJointCreateContact(
|
||||
g_xplicitNgine->physWorld,
|
||||
g_xplicitNgine->contactgroup,
|
||||
contact+i
|
||||
);
|
||||
|
||||
dJointAttach (c,b1,b2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void XplicitNgine::deleteBody(PartInstance* partInstance)
|
||||
{
|
||||
if(partInstance->physBody != NULL)
|
||||
{
|
||||
while(dBodyGetNumJoints(partInstance->physBody) > 0) {
|
||||
dJointDestroy(dBodyGetJoint(partInstance->physBody, 0));
|
||||
}
|
||||
dBodyDestroy(partInstance->physBody);
|
||||
dGeomDestroy(partInstance->physGeom[0]);
|
||||
partInstance->physBody = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void XplicitNgine::createBody(PartInstance* partInstance)
|
||||
{
|
||||
// calculate collisions
|
||||
//dSpaceCollide (physSpace,0,&collisionCallback);
|
||||
|
||||
if(partInstance->physBody == NULL)
|
||||
{
|
||||
// init body
|
||||
partInstance->physBody = dBodyCreate(physWorld);
|
||||
|
||||
// Create geom
|
||||
if(partInstance->shape == Enum::Shape::Block)
|
||||
{
|
||||
partInstance->physGeom[0] = dCreateBox(physSpace,
|
||||
partInstance->getSize()[0],
|
||||
partInstance->getSize()[1],
|
||||
partInstance->getSize()[2]
|
||||
);
|
||||
|
||||
dVector3 result;
|
||||
dGeomBoxGetLengths(partInstance->physGeom[0], result);
|
||||
//printf("[XplicitNgine] Part Geom Size: %.1f, %.1f, %.1f\n",
|
||||
// result[0],
|
||||
// result[1],
|
||||
// result[2]
|
||||
//);
|
||||
}
|
||||
else
|
||||
{
|
||||
partInstance->physGeom[0] = dCreateSphere(physSpace, partInstance->getSize()[0]/2);
|
||||
}
|
||||
|
||||
dMass mass;
|
||||
mass.setBox(partInstance->getSize().x, partInstance->getSize().y, partInstance->getSize().z, 0.7F);
|
||||
dBodySetMass(partInstance->physBody, &mass);
|
||||
|
||||
// Debug output
|
||||
|
||||
|
||||
// Create rigid body
|
||||
//printf("[XplicitNgine] Created Geom for PartInstance\n");
|
||||
dBodySetPosition(partInstance->physBody,
|
||||
partInstance->getPosition()[0],
|
||||
partInstance->getPosition()[1],
|
||||
partInstance->getPosition()[2]
|
||||
);
|
||||
|
||||
dGeomSetPosition(partInstance->physGeom[0],
|
||||
partInstance->getPosition()[0],
|
||||
partInstance->getPosition()[1],
|
||||
partInstance->getPosition()[2]);
|
||||
|
||||
Matrix3 g3dRot = partInstance->getCFrame().rotation;
|
||||
float rotation [12] = { g3dRot[0][0], g3dRot[0][1], g3dRot[0][2], 0,
|
||||
g3dRot[1][0], g3dRot[1][1], g3dRot[1][2], 0,
|
||||
g3dRot[2][0], g3dRot[2][1], g3dRot[2][2], 0};
|
||||
|
||||
dGeomSetRotation(partInstance->physGeom[0], rotation);
|
||||
dBodySetRotation(partInstance->physBody, rotation);
|
||||
|
||||
//printf("[XplicitNgine] Created Body for PartInstance\n");
|
||||
|
||||
if(!partInstance->isAnchored())
|
||||
dGeomSetBody(partInstance->physGeom[0], partInstance->physBody);
|
||||
|
||||
} else {
|
||||
if(!partInstance->isAnchored())
|
||||
{
|
||||
const dReal* physPosition = dBodyGetPosition(partInstance->physBody);
|
||||
|
||||
// TODO: Rotation code
|
||||
// Probably should be done AFTER we get physics KINDA working!!!
|
||||
const dReal* physRotation = dGeomGetRotation(partInstance->physGeom[0]);
|
||||
//partInstance->setPosition(Vector3(physPosition[0], physPosition[1], physPosition[2]));
|
||||
partInstance->setCFrameNoSync(CoordinateFrame(
|
||||
Matrix3(physRotation[0],physRotation[1],physRotation[2],
|
||||
physRotation[4],physRotation[5],physRotation[6],
|
||||
physRotation[8],physRotation[9],physRotation[10]),
|
||||
Vector3(physPosition[0], physPosition[1], physPosition[2])));
|
||||
}
|
||||
}
|
||||
//STEP SHOULD NOT BE HERE!
|
||||
//dWorldQuickStep(physWorld, stepSize);
|
||||
//dJointGroupEmpty(contactgroup);
|
||||
}
|
||||
|
||||
void XplicitNgine::step(float stepSize)
|
||||
{
|
||||
dSpaceCollide (physSpace,0,&collisionCallback);
|
||||
dWorldQuickStep(physWorld, stepSize);
|
||||
dJointGroupEmpty(contactgroup);
|
||||
}
|
||||
|
||||
void XplicitNgine::updateBody(PartInstance *partInstance, CoordinateFrame * cFrame)
|
||||
{
|
||||
if(partInstance->physBody != NULL)
|
||||
{
|
||||
Vector3 position = cFrame->translation;
|
||||
|
||||
dBodySetPosition(partInstance->physBody,
|
||||
position[0],
|
||||
position[1],
|
||||
position[2]
|
||||
);
|
||||
|
||||
Matrix3 g3dRot = cFrame->rotation;
|
||||
float rotation [12] = { g3dRot[0][0], g3dRot[0][1], g3dRot[0][2], 0,
|
||||
g3dRot[1][0], g3dRot[1][1], g3dRot[1][2], 0,
|
||||
g3dRot[2][0], g3dRot[2][1], g3dRot[2][2], 0};
|
||||
|
||||
dBodySetRotation(partInstance->physBody, rotation);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
// TODO: Move toolbar buttons with resized window.
|
||||
#include "winver.h"
|
||||
#include "../../resource.h"
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#define _WIN32_WINDOWS 0x0400
|
||||
#define WINVER 0x0400
|
||||
#define _CRTBLD
|
||||
|
||||
#include "resource.h"
|
||||
#include "Application.h"
|
||||
#include "WindowFunctions.h"
|
||||
#include "ax.h"
|
||||
@@ -149,10 +153,7 @@ LRESULT CALLBACK G3DProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
long double a = 1;
|
||||
|
||||
#ifndef IGNORE_CATCH
|
||||
#ifndef _DEBUG
|
||||
try{
|
||||
#endif
|
||||
hresult = OleInitialize(NULL);
|
||||
@@ -179,7 +180,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
icc.dwSize = sizeof(icc);
|
||||
icc.dwICC = ICC_WIN95_CLASSES/*|ICC_COOL_CLASSES|ICC_DATE_CLASSES|
|
||||
// ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES*/;
|
||||
ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES*/;
|
||||
InitCommonControlsEx(&icc);
|
||||
|
||||
AudioPlayer::init();
|
||||
@@ -222,12 +223,12 @@ int main(int argc, char** argv) {
|
||||
Globals::mainHwnd = hwndMain;
|
||||
Application app = Application(hwndMain);
|
||||
app.run();
|
||||
#ifndef IGNORE_CATCH
|
||||
#ifndef _DEBUG
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
OnError(-1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -31,12 +31,13 @@
|
||||
|
||||
//DWM 1.9: Suppress POCC Warning "Argument x to 'sscanf' does not match the format string;
|
||||
// expected 'unsigned char *' but found 'unsigned long'"
|
||||
#include "winver.h"
|
||||
|
||||
#ifdef __POCC__
|
||||
#pragma warn(disable:2234)
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Necessary for WM_MOUSEWHEEL support
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
|
||||
// MSVC++ Support
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
Reference in New Issue
Block a user