3
.gitignore
vendored
3
.gitignore
vendored
@@ -53,3 +53,6 @@ G3DTest.suo
|
||||
stderr.txt
|
||||
desktop.ini
|
||||
*.db
|
||||
|
||||
#Redist
|
||||
!Installer/Redist/*
|
||||
BIN
B3dIcon.ico
Normal file
BIN
B3dIcon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
35
Blocks3D-2003.sln
Normal file
35
Blocks3D-2003.sln
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
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
|
||||
649
Blocks3D-2003.vcproj
Normal file
649
Blocks3D-2003.vcproj
Normal file
@@ -0,0 +1,649 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Blocks3D"
|
||||
ProjectGUID="{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
RootNamespace="Blocks3D">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
UseOfATL="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<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="VCCustomBuildTool"/>
|
||||
<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="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/Blocks3D.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="4105"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="FALSE">
|
||||
<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="VCCustomBuildTool"/>
|
||||
<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="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/Blocks3D.tlb"
|
||||
HeaderFileName=""/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="4105"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<AssemblyReference
|
||||
RelativePath="System.dll"/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Data.dll"/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Drawing.dll"/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Windows.Forms.dll"/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.XML.dll"/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath=".\src\source\Application.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\AudioPlayer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\ax.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\BrowserCallHandler.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\CameraController.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\ErrorFunctions.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Globals.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\IEBrowser.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\IEDispatcher.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\main.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Mouse.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\propertyGrid.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\PropertyWindow.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Renderer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\StringFunctions.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\TextureHandler.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\WindowFunctions.cpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="Tool">
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\ArrowTool.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\SurfaceTool.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\Tool.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Listener">
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\ButtonListener.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\CameraButtonListener.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\DeleteListener.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\GUDButtonListener.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\MenuButtonListener.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\ModeSelectionListener.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\RotateButtonListener.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Listener\ToolbarListener.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DataModelV2">
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\DataModelInstance.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"/>
|
||||
</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=".\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>
|
||||
@@ -1,24 +1,24 @@
|
||||
# Microsoft Developer Studio Project File - Name="G3DTest" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Project File - Name="Blocks3D" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=G3DTest - Win32 Debug
|
||||
CFG=Blocks3D - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "G3DTest.mak".
|
||||
!MESSAGE NMAKE /f "Blocks3D.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "G3DTest.mak" CFG="G3DTest - Win32 Debug"
|
||||
!MESSAGE NMAKE /f "Blocks3D.mak" CFG="Blocks3D - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "G3DTest - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "G3DTest - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "Blocks3D - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "Blocks3D - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
@@ -29,7 +29,7 @@ CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "G3DTest - Win32 Release"
|
||||
!IF "$(CFG)" == "Blocks3D - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
@@ -54,7 +54,7 @@ LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "G3DTest - Win32 Debug"
|
||||
!ELSEIF "$(CFG)" == "Blocks3D - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
@@ -83,8 +83,8 @@ LINK32=link.exe
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "G3DTest - Win32 Release"
|
||||
# Name "G3DTest - Win32 Debug"
|
||||
# Name "Blocks3D - Win32 Release"
|
||||
# Name "Blocks3D - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "G3DTest"=.\G3DTest.dsp - Package Owner=<4>
|
||||
Project: "Blocks3D"=.\Blocks3D.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
425
Blocks3D.vcproj
425
Blocks3D.vcproj
@@ -79,6 +79,7 @@
|
||||
OutputFile="./Blocks3D.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalManifestDependencies=""
|
||||
ProgramDatabaseFile=".\Release/Blocks3D.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
@@ -288,6 +289,10 @@
|
||||
RelativePath=".\src\source\PropertyWindow.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Renderer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\StringFunctions.cpp"
|
||||
>
|
||||
@@ -307,6 +312,10 @@
|
||||
RelativePath=".\src\source\Tool\ArrowTool.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\SurfaceTool.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\Tool\Tool.cpp"
|
||||
>
|
||||
@@ -349,54 +358,290 @@
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DataModel"
|
||||
Name="DataModelV2"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\BaseButtonInstance.cpp"
|
||||
RelativePath=".\src\source\DataModelV2\DataModelInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\GroupInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\Instance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\LevelInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\PartInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\PVInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\WorkspaceInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Gui"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\BaseButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\BaseGuiInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\GuiRootInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\ImageButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\TextButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModelV2\ToggleImageButtonInstance.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Properties"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\Properties\BoolProperty.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\DataModelInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\GroupInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\GuiRootInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\ImageButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\Instance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\LevelInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\PartInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\PVInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\TextButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\ToggleImageButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\WorkspaceInstance.cpp"
|
||||
RelativePath=".\src\source\Properties\Property.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
@@ -430,11 +675,11 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Enums.h"
|
||||
RelativePath=".\src\include\ErrorFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\ErrorFunctions.h"
|
||||
RelativePath=".\src\include\Faces.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
@@ -462,7 +707,11 @@
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\resource.h"
|
||||
RelativePath=".\src\include\Renderer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
@@ -481,6 +730,10 @@
|
||||
RelativePath=".\src\include\WindowFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\winver.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="RapidXML"
|
||||
>
|
||||
@@ -548,56 +801,84 @@
|
||||
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="DataModel"
|
||||
Name="DataModelV2"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\BaseButtonInstance.h"
|
||||
RelativePath=".\src\include\DataModelV2\DataModelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\DataModelInstance.h"
|
||||
RelativePath=".\src\include\DataModelV2\GroupInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\GroupInstance.h"
|
||||
RelativePath=".\src\include\DataModelV2\Instance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\GuiRootInstance.h"
|
||||
RelativePath=".\src\include\DataModelV2\LevelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\ImageButtonInstance.h"
|
||||
RelativePath=".\src\include\DataModelV2\PartInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\Instance.h"
|
||||
RelativePath=".\src\include\DataModelV2\PVInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\LevelInstance.h"
|
||||
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\DataModel\PartInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\PVInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\TextButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\ToggleImageButtonInstance.h"
|
||||
RelativePath=".\src\include\Properties\Property.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
@@ -606,18 +887,26 @@
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\B3dIcon.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Dialogs.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\icon1.ico"
|
||||
RelativePath=".\FatB3dIcon.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Parts.bmp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\roblox_RN1_icon.ico"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
||||
BIN
Dialogs.aps
BIN
Dialogs.aps
Binary file not shown.
86
Dialogs.rc
86
Dialogs.rc
@@ -1,43 +1,43 @@
|
||||
// Generated by ResEdit 1.6.6
|
||||
// Copyright (C) 2006-2015
|
||||
// http://www.resedit.net
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.h>
|
||||
#include "src/include/resource.h" //Should not have to do this...
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Bitmap resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDB_BITMAP1 BITMAP "Parts.bmp"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Dialog resources
|
||||
//
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
IDD_DIALOG1 DIALOG 0, 0, 295, 43
|
||||
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFOREGROUND | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
|
||||
EXSTYLE WS_EX_WINDOWEDGE
|
||||
CAPTION "Insert Object"
|
||||
FONT 8, "Ms Shell Dlg"
|
||||
{
|
||||
EDITTEXT IDE_EDIT, 35, 6, 195, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
||||
LTEXT "Class:", 0, 10, 9, 20, 9, SS_LEFT, WS_EX_LEFT
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 237, 24, 50, 14, 0, WS_EX_LEFT
|
||||
DEFPUSHBUTTON "OK", IDOK, 237, 6, 50, 14, 0, WS_EX_LEFT
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Icon resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDI_ICON1 ICON "icon1.ico"
|
||||
// Generated by ResEdit 1.6.6
|
||||
// Copyright (C) 2006-2015
|
||||
// http://www.resedit.net
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <richedit.h>
|
||||
#include "resource.h" //Should not have to do this...
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Bitmap resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDB_BITMAP1 BITMAP "Parts.bmp"
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Dialog resources
|
||||
//
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
IDD_DIALOG1 DIALOG 0, 0, 295, 43
|
||||
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFOREGROUND | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
|
||||
EXSTYLE WS_EX_WINDOWEDGE
|
||||
CAPTION "Insert Object"
|
||||
FONT 8, "Ms Shell Dlg"
|
||||
{
|
||||
EDITTEXT IDC_EDIT1, 35, 6, 195, 14, ES_AUTOHSCROLL, WS_EX_LEFT
|
||||
LTEXT "Class:", 0, 10, 9, 20, 9, SS_LEFT, WS_EX_LEFT
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 237, 24, 50, 14, 0, WS_EX_LEFT
|
||||
DEFPUSHBUTTON "OK", IDOK, 237, 6, 50, 14, 0, WS_EX_LEFT
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Icon resources
|
||||
//
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN
|
||||
IDI_ICON1 ICON "FatB3dIcon.ico"
|
||||
BIN
FatB3dIcon.ico
Normal file
BIN
FatB3dIcon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
BIN
G3DTest.aps
BIN
G3DTest.aps
Binary file not shown.
BIN
G3DTest.opt
BIN
G3DTest.opt
Binary file not shown.
32
G3DTest.plg
32
G3DTest.plg
@@ -1,32 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: G3DTest - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp" with contents
|
||||
[
|
||||
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"Debug/G3DTest.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
|
||||
"C:\USERS\ANDREJA\G3D\G3DTest\main.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD70.tmp"
|
||||
Creating temporary file "C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/G3DTest.pdb" /debug /machine:I386 /out:"Debug/G3DTest.exe" /pdbtype:sept
|
||||
.\Debug\main.obj
|
||||
]
|
||||
Creating command line "link.exe @C:\Users\Andreja\AppData\Local\Temp\RSPFD71.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
main.cpp
|
||||
Linking...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
G3DTest.exe - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
20
G3DTest.sln
20
G3DTest.sln
@@ -1,20 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "G3DTest", "G3DTest.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
|
||||
629
G3DTest.vcproj
629
G3DTest.vcproj
@@ -1,629 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="G3DTest"
|
||||
ProjectGUID="{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
|
||||
RootNamespace="G3DTest"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
UseOfATL="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/G3DTest.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="".\src\include""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile=".\Release/G3DTest.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="4105"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Advapi32.lib UxTheme.lib Comctl32.lib Comdlg32.lib Shell32.lib"
|
||||
OutputFile="./G3DTest.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release/G3DTest.pdb"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Release/G3DTest.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/G3DTest.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="".\src\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
EnableFunctionLevelLinking="false"
|
||||
PrecompiledHeaderFile=".\Debug/G3DTest.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="4105"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Advapi32.lib UxTheme.lib Comctl32.lib Comdlg32.lib Shell32.lib Urlmon.lib ole32.lib oleaut32.lib uuid.lib"
|
||||
OutputFile="./G3DTest-Debug.exe"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/G3DTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="true"
|
||||
OutputFile=".\Debug/G3DTest.bsc"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<AssemblyReference
|
||||
RelativePath="System.dll"
|
||||
AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Data.dll"
|
||||
AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Drawing.dll"
|
||||
AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.Windows.Forms.dll"
|
||||
AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
<AssemblyReference
|
||||
RelativePath="System.XML.dll"
|
||||
AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\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\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\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="DataModel"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\BaseButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\DataModelInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\GroupInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\GuiRootInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\ImageButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\Instance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\LevelInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\PartInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\PVInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\TextButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\ToggleImageButtonInstance.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\source\DataModel\WorkspaceInstance.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\Enums.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\ErrorFunctions.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\resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\StringFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\TextureHandler.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\win32Defines.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\WindowFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="RapidXML"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml_iterators.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml_print.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\rapidxml\rapidxml_utils.hpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Listener"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\ButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\CameraButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\DeleteListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\GUDButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\MenuButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\ModeSelectionListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\RotateButtonListener.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Listener\ToolbarListener.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Tool"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\Tool\ArrowTool.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Tool\Tool.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="DataModel"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\BaseButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\DataModelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\GroupInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\GuiRootInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\ImageButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\Instance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\LevelInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\PartInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\PVInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\TextButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\ToggleImageButtonInstance.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\DataModel\WorkspaceInstance.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\Dialogs.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\icon1.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Parts.bmp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="Dialogs.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
BIN
Installer/Redist/vcredist_x64.exe
Normal file
BIN
Installer/Redist/vcredist_x64.exe
Normal file
Binary file not shown.
BIN
Installer/Redist/vcredist_x86.exe
Normal file
BIN
Installer/Redist/vcredist_x86.exe
Normal file
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
;InnoSetupVersion=5.5.7
|
||||
;InnoSetupVersion=5.4.3
|
||||
|
||||
[Setup]
|
||||
AppName=Blocks3D
|
||||
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
|
||||
AppVersion=v0_0_104_3
|
||||
AppVersion=v0_0_104_5
|
||||
AppPublisherURL=http://blocks3d.com/
|
||||
AppSupportURL=http://blocks3d.com/
|
||||
AppUpdatesURL=http://blocks3d.com/
|
||||
@@ -12,6 +12,8 @@ OutputBaseFilename=Blocks3D_Setup_{#SetupSetting("AppVersion")}
|
||||
Compression=lzma2
|
||||
PrivilegesRequired=lowest
|
||||
WizardImageFile=setup.bmp
|
||||
DefaultGroupName=Blocks3D
|
||||
|
||||
|
||||
[UninstallDelete]
|
||||
Type: filesandordirs; Name: "{app}"
|
||||
@@ -31,6 +33,15 @@ Filename: "{tmp}\vcredist_x86.exe"; Parameters: "/q"; Tasks: instvc;
|
||||
Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/q"; Tasks: instvc; Check: "IsWin64";
|
||||
Filename: "iexplore.exe"; Parameters: "http://www.blocks3d.com/FirstInstall"; Description: Start playing Blocks3D; Flags: shellexec postinstall nowait skipifsilent
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\Play Blocks3D"; Filename: "{%programfiles}\Internet Explorer\iexplore.exe"; Parameters: "http://www.blocks3d.com/Games"; IconFilename: "{app}\Blocks3D.exe"; Tasks: startscut;
|
||||
Name: "{group}\Blocks3D Editor"; Filename: "{app}\Blocks3D.exe"; Tasks: startscut;
|
||||
|
||||
Name: "{userdesktop}\Play Blocks3D"; Filename: "{%programfiles}\Internet Explorer\iexplore.exe"; Parameters: "http://www.blocks3d.com/Games"; IconFilename: "{app}\Blocks3D.exe"; Tasks: startscut;
|
||||
Name: "{userdesktop}\Blocks3D Editor"; Filename: "{app}\Blocks3D.exe"; Tasks: desktopicon
|
||||
|
||||
[Tasks]
|
||||
Name: "instvc"; Description: "Install Visual C++ Redistributable 2005 SP1 (Requires elevated permissions)";
|
||||
Name: "desktopicon"; Description: "Create Desktop Icons";
|
||||
Name: "startscut"; Description: "Create Start Menu Icons";
|
||||
|
||||
|
||||
0
Manifest.xml
Normal file
0
Manifest.xml
Normal file
@@ -12,12 +12,12 @@
|
||||
}
|
||||
</script>
|
||||
<body style="background-color: ButtonFace; margin: 0; padding: 5px; overflow: hidden; border: outset 2px;">
|
||||
<img src="../images/FlatTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(0)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/BumpTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(1)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/HingeTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(2)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/LeftMotorTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(3)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/LeftMotorFastTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(4)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/RightMotorTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(5)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/RightMotorFastTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(6)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/FlatTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(0, 0)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/BumpTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(1, 0)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/HingeTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(2, 0)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/LeftMotorTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(3, 1)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/LeftMotorFastTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(3, 2)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/RightMotorTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(3, 3)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
<img src="../images/RightMotorFastTool.png" onmouseout="toolOut(this)" onclick="window.external.SetSurface(3, 4)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||
</body>
|
||||
</html>
|
||||
10
resource.h
Normal file
10
resource.h
Normal file
@@ -0,0 +1,10 @@
|
||||
//{{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
|
||||
|
||||
BIN
roblox_RN1_icon.ico
Normal file
BIN
roblox_RN1_icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include <G3DAll.h>
|
||||
#include "PropertyWindow.h"
|
||||
#include "DataModel/TextButtonInstance.h"
|
||||
#include "DataModel/ImageButtonInstance.h"
|
||||
#include "DataModelV2/TextButtonInstance.h"
|
||||
#include "DataModelV2/ImageButtonInstance.h"
|
||||
#include "CameraController.h"
|
||||
#include "IEBrowser.h"
|
||||
#include "Mouse.h"
|
||||
@@ -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);
|
||||
void makeFlag(Vector3 &vec, RenderDevice* &rd);
|
||||
std::vector<Instance*> getSelection();
|
||||
void deleteInstance();
|
||||
void run();
|
||||
@@ -49,6 +48,7 @@ class Application { // : public GApp {
|
||||
void onMouseWheel(int x, int y, short delta);
|
||||
void setFocus(bool isFocused);
|
||||
int getMode();
|
||||
void unSetMode();
|
||||
CameraController cameraController;
|
||||
UserInput* userInput;
|
||||
PropertyWindow* _propWindow;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <G3DAll.h>
|
||||
#include "DataModel/Instance.h"
|
||||
#include "DataModelV2/Instance.h"
|
||||
#include "Globals.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
virtual void drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown);
|
||||
virtual bool mouseInButton(float, float, RenderDevice* rd);
|
||||
virtual void onMouseClick();
|
||||
void setButtonListener(ButtonListener*);
|
||||
void setButtonListener(ButtonListener&);
|
||||
bool floatBottom;
|
||||
bool floatRight;
|
||||
bool floatCenter;
|
||||
49
src/include/DataModelV2/BaseGuiInstance.h
Normal file
49
src/include/DataModelV2/BaseGuiInstance.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
#include "Instance.h"
|
||||
|
||||
struct UDim
|
||||
{
|
||||
float scale;
|
||||
float offset;
|
||||
UDim()
|
||||
{
|
||||
scale = offset = 0;
|
||||
}
|
||||
UDim(float scale_, float offset_)
|
||||
{
|
||||
scale = scale_;
|
||||
offset = offset_;
|
||||
}
|
||||
};
|
||||
|
||||
struct UDim2
|
||||
{
|
||||
UDim x;
|
||||
UDim y;
|
||||
UDim2(UDim x_, UDim y_)
|
||||
{
|
||||
x = x_;
|
||||
y = y_;
|
||||
}
|
||||
UDim2(float scale_x, float offset_x, float scale_y, float offset_y)
|
||||
{
|
||||
x = UDim(scale_x, offset_x);
|
||||
y = UDim(scale_y, offset_y);
|
||||
}
|
||||
};
|
||||
|
||||
class Instance;
|
||||
|
||||
class BaseGuiInstance : public Instance
|
||||
{
|
||||
public:
|
||||
BaseGuiInstance(void);
|
||||
virtual ~BaseGuiInstance(void);
|
||||
virtual void render(RenderDevice* rd);
|
||||
virtual bool mouseHovered(float, float, RenderDevice* rd);
|
||||
UDim2 position;
|
||||
UDim2 size;
|
||||
protected:
|
||||
bool mouseInArea(float, float, float, float, float, float);
|
||||
class ButtonListener* listener;
|
||||
};
|
||||
@@ -3,6 +3,11 @@
|
||||
#include "propertyGrid.h"
|
||||
#include "map"
|
||||
|
||||
#ifdef NO_SPRINTF
|
||||
#define sprintf_s sprintf
|
||||
#endif
|
||||
//#include "Properties/BoolProperty.h"
|
||||
|
||||
class Instance
|
||||
{
|
||||
public:
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
bool controllerFlagShown;
|
||||
Enum::Controller::Value controller;
|
||||
protected:
|
||||
CoordinateFrame cFrame;
|
||||
static G3D::Color3 getControllerColor(int controller)
|
||||
{
|
||||
switch(controller)
|
||||
@@ -4,18 +4,20 @@
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
|
||||
#define NEW_BOX_RENDER
|
||||
|
||||
class PartInstance : public PVInstance
|
||||
{
|
||||
public:
|
||||
|
||||
PartInstance(void);
|
||||
PartInstance(const PartInstance &oinst);
|
||||
Instance* clone() const { return new PartInstance(*this); }
|
||||
virtual void PartInstance::postRender(RenderDevice* rd);
|
||||
~PartInstance(void);
|
||||
Instance* clone() const { return new PartInstance(*this); }
|
||||
|
||||
//Rendering
|
||||
virtual void PartInstance::postRender(RenderDevice* rd);
|
||||
virtual void render(RenderDevice*);
|
||||
|
||||
//Surfaces
|
||||
Enum::SurfaceType::Value top;
|
||||
Enum::SurfaceType::Value front;
|
||||
Enum::SurfaceType::Value right;
|
||||
@@ -23,62 +25,45 @@ public:
|
||||
Enum::SurfaceType::Value left;
|
||||
Enum::SurfaceType::Value bottom;
|
||||
Enum::Shape::Value shape;
|
||||
CoordinateFrame cFrame;
|
||||
|
||||
//Variables
|
||||
Color3 color;
|
||||
bool canCollide;
|
||||
bool anchored;
|
||||
|
||||
//Getters
|
||||
Vector3 getPosition();
|
||||
Vector3 getVelocity();
|
||||
Vector3 getRotVelocity();
|
||||
void setParent(Instance* parent);
|
||||
void setPosition(Vector3);
|
||||
void setVelocity(Vector3);
|
||||
bool collides(PartInstance * part);
|
||||
void setRotVelocity(Vector3);
|
||||
CoordinateFrame getCFrame();
|
||||
void setCFrame(CoordinateFrame);
|
||||
Vector3 getSize();
|
||||
Box getBox();
|
||||
Sphere getSphere();
|
||||
Box getScaledBox();
|
||||
CoordinateFrame getCFrameRenderBased();
|
||||
Vector3 getSize();
|
||||
CoordinateFrame getCFrame();
|
||||
|
||||
//Setters
|
||||
void setParent(Instance* parent);
|
||||
void setPosition(Vector3);
|
||||
void setVelocity(Vector3);
|
||||
void setRotVelocity(Vector3);
|
||||
void setCFrame(CoordinateFrame);
|
||||
void setSize(Vector3);
|
||||
void setShape(Enum::Shape::Value shape);
|
||||
bool canCollide;
|
||||
bool anchored;
|
||||
void setChanged();
|
||||
void setSurface(int face, Enum::SurfaceType::Value surface);
|
||||
|
||||
//Collision
|
||||
bool collides(PartInstance * part);
|
||||
bool collides(Box);
|
||||
|
||||
//Properties
|
||||
virtual std::vector<PROPGRIDITEM> getProperties();
|
||||
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
|
||||
#ifdef NEW_BOX_RENDER
|
||||
void addVertex(Vector3 vertexPos,Color3 color);
|
||||
void addNormals(Vector3 normal);
|
||||
void addSingularNormal(Vector3 normal);
|
||||
void addTriangle(Vector3 vertexPos,Vector3 vertexPos2, Vector3 vertexPos3);
|
||||
void addQuad(Vector3 v1,Vector3 v2, Vector3 v3, Vector3 v4);
|
||||
void genSmoothNormals(int);
|
||||
void addSmoothTriangle(Vector3 vertexPos,Vector3 vertexPos2, Vector3 vertexPos3);
|
||||
void makeSmoothFace(int vertex1, int vertex2, int vertex3);
|
||||
void addPlus(Vector3 v1);
|
||||
void addPlus2(Vector3 v1);
|
||||
void debugPrintVertexIDs(RenderDevice* rd, GFontRef font, Matrix3 camRot);
|
||||
void makeFace(int vertex1, int vertex2, int vertex3);
|
||||
void fromArrays(float verts[], float norms[], float ind[], unsigned int countVN, unsigned int countInd);
|
||||
bool isUniqueVertex(Vector3 pos);
|
||||
#endif
|
||||
private:
|
||||
Vector3 position;
|
||||
Vector3 size;
|
||||
Vector3 velocity;
|
||||
Vector3 rotVelocity;
|
||||
float _bevelSize;
|
||||
int _parseVert;
|
||||
int _debugTimer;
|
||||
std::vector<Vector3> _debugUniqueVertices;
|
||||
#ifdef NEW_BOX_RENDER
|
||||
std::vector<GLfloat> _vertices;
|
||||
std::vector<GLfloat> _normals;
|
||||
#else
|
||||
GLfloat _vertices[96];
|
||||
#endif
|
||||
std::vector<GLushort> _indices;
|
||||
bool changed;
|
||||
Box itemBox;
|
||||
GLuint glList;
|
||||
@@ -8,5 +8,6 @@ class WorkspaceInstance :
|
||||
public:
|
||||
WorkspaceInstance(void);
|
||||
~WorkspaceInstance(void);
|
||||
void clearChildren();
|
||||
std::vector<PartInstance *> partObjects;
|
||||
};
|
||||
@@ -5,7 +5,7 @@ namespace Enum
|
||||
namespace SurfaceType
|
||||
{
|
||||
enum Value {
|
||||
Smooth, Snaps, Inlets, Glue, Weld, Spawn, Hinge, Motor, Bumps
|
||||
Smooth = 0, Bumps = 1, Hinge = 2, Motor = 3, StepperMotor = 4, Spawn = 5
|
||||
};
|
||||
}
|
||||
namespace Shape
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#ifdef UENUMS
|
||||
#ifndef ENUM_H
|
||||
#define ENUM_H
|
||||
static enum BinType {GameTool, Grab, Clone, Hammer};
|
||||
static enum ControllerType {None, KeyboardRight, KeyboardLeft, Joypad1, Joypad2, Chase, Flee};
|
||||
//static enum JointType {UNK0, WeldJoint, SnapJoint, UNK3, Rotate, RotateP, RotateV, GlueJoint, UNK8, UNK9, None};
|
||||
static enum ActionType {Nothing, Pause, Lose, Draw, Win};
|
||||
static enum AffectType {NoChange, Increase, Decrease};
|
||||
static enum InputType {NoInput, LeftTread, RightTread, Steer, Throtle, UpDown, Action1, Action2, Action3, Action4, Action5, Constant, Sin};
|
||||
//static enum SurfaceConstraint {None, Hinge, SteppingMotor, Motor};
|
||||
static enum SurfaceType{Smooth, Snaps, Inlets, Glue, Weld, Spawn, Hinge, Motor, Bumps};
|
||||
static enum SoundType {NoSound, Boing, Bomb, Break, Click, Clock, Slingshot, Page, Ping, Snap, Splat, Step, StepOn, Swoosh, Victory};
|
||||
static enum PartType {Ball, Block, Cylinder};
|
||||
static enum KeywordFilterType {Include, Exclude};
|
||||
#endif
|
||||
#endif
|
||||
9
src/include/Faces.h
Normal file
9
src/include/Faces.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef FACES_H
|
||||
#define FACES_H
|
||||
#define TOP 3
|
||||
#define BOTTOM 5
|
||||
#define LEFT 1
|
||||
#define RIGHT 4
|
||||
#define FRONT 0
|
||||
#define BACK 2
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "DataModel/DataModelInstance.h"
|
||||
#include "DataModelV2/DataModelInstance.h"
|
||||
|
||||
|
||||
class Application;
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
Globals(void);
|
||||
~Globals(void);
|
||||
static DataModelInstance* dataModel;
|
||||
static bool showMouse;
|
||||
//static bool showMouse;
|
||||
static POINT mousepoint;
|
||||
static bool useMousePoint;
|
||||
static const int gen;
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
static const int patch;
|
||||
static G3D::TextureRef surface;
|
||||
static int surfaceId;
|
||||
static const std::string g_PlaceholderName;
|
||||
static const std::string g_appName;
|
||||
static COLORREF g_acrCustClr[16]; //Will be dynamic later
|
||||
static HWND mainHwnd;
|
||||
};
|
||||
@@ -38,4 +38,4 @@ extern std::string cameraSound;
|
||||
extern std::string clickSound;
|
||||
extern std::string dingSound;
|
||||
extern HWND mainHwnd;
|
||||
const std::string g_PlaceholderName = "Dygysphere";
|
||||
const std::string g_appName = "Blocks3D";
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
//#include "Application.h"
|
||||
#include "DataModel/BaseButtonInstance.h"
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
|
||||
class BaseButtonInstance;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "DataModel/PartInstance.h"
|
||||
#include "DataModelV2/PartInstance.h"
|
||||
#pragma once
|
||||
#include "DataModel/WorkspaceInstance.h"
|
||||
#include "DataModelV2/WorkspaceInstance.h"
|
||||
|
||||
struct MousePoint{
|
||||
Vector3 position;
|
||||
@@ -27,6 +27,8 @@ public:
|
||||
bool isMouseOnScreen();
|
||||
bool isMouseDown();
|
||||
void setMouseDown(bool mouseDown);
|
||||
G3D::Ray * getRay();
|
||||
G3D::Ray getLastRay();
|
||||
private:
|
||||
bool mouseDown;
|
||||
};
|
||||
|
||||
12
src/include/Properties/BoolProperty.h
Normal file
12
src/include/Properties/BoolProperty.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include "Property.h"
|
||||
class BoolProperty : public Property<bool>
|
||||
{
|
||||
public:
|
||||
BoolProperty(std::string name, bool& value, Instance& owner)
|
||||
{
|
||||
Property<bool>(name, value, owner);
|
||||
}
|
||||
~BoolProperty(void);
|
||||
PROPGRIDITEM getPropGridItem();
|
||||
};
|
||||
30
src/include/Properties/Property.h
Normal file
30
src/include/Properties/Property.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include "DataModelV2/Instance.h"
|
||||
#include <string>
|
||||
class Instance;
|
||||
|
||||
template <typename T>
|
||||
class Property
|
||||
{
|
||||
public:
|
||||
Property(std::string name, T& value, Instance& owner)
|
||||
{
|
||||
_value = value;
|
||||
_owner = owner;
|
||||
}
|
||||
~Property(void);
|
||||
const T getValue()
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
const void setValue(T val)
|
||||
{
|
||||
_value = val;
|
||||
}
|
||||
virtual PROPGRIDITEM getPropGridItem();
|
||||
void setProperty(LPPROPGRIDITEM item);
|
||||
protected:
|
||||
Instance* _owner;
|
||||
std::string _name;
|
||||
T* _value;
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "DataModel/Instance.h"
|
||||
#include "DataModelV2/Instance.h"
|
||||
|
||||
class PropertyWindow {
|
||||
public:
|
||||
|
||||
7
src/include/Renderer.h
Normal file
7
src/include/Renderer.h
Normal file
@@ -0,0 +1,7 @@
|
||||
#ifndef RENDERUTIL
|
||||
#define RENDERUTIL
|
||||
#include "Enum.h"
|
||||
#include "DataModelV2/Instance.h"
|
||||
void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Color3& ncolor);
|
||||
void renderSurface(const char face, const Enum::SurfaceType::Value& surface, const Vector3& size, const Enum::Controller::Value& controller, const Color3& color);
|
||||
#endif
|
||||
@@ -7,12 +7,12 @@ class ArrowTool :
|
||||
public:
|
||||
ArrowTool(void); //OnSelect?
|
||||
~ArrowTool(void); //OnDeselect?
|
||||
virtual void onButton1MouseDown(Mouse);
|
||||
virtual void onButton1MouseUp(Mouse);
|
||||
virtual void onMouseMoved(Mouse mouse);
|
||||
virtual void onSelect(Mouse mouse);
|
||||
virtual void onKeyDown(int key);
|
||||
virtual void onKeyUp(int key);
|
||||
void onButton1MouseDown(Mouse);
|
||||
void onButton1MouseUp(Mouse);
|
||||
void onMouseMoved(Mouse mouse);
|
||||
void onSelect(Mouse mouse);
|
||||
void onKeyDown(int key);
|
||||
void onKeyUp(int key);
|
||||
private:
|
||||
bool lctrlDown;
|
||||
bool rctrlDown;
|
||||
|
||||
20
src/include/Tool/SurfaceTool.h
Normal file
20
src/include/Tool/SurfaceTool.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "tool.h"
|
||||
#include "Enum.h"
|
||||
|
||||
class SurfaceTool :
|
||||
public Tool
|
||||
{
|
||||
public:
|
||||
SurfaceTool(int surface, int extraParam); //OnSelect?
|
||||
~SurfaceTool(void); //OnDeselect?
|
||||
void onButton1MouseDown(Mouse);
|
||||
void onButton1MouseUp(Mouse);
|
||||
void onMouseMoved(Mouse mouse);
|
||||
void onSelect(Mouse mouse);
|
||||
void onKeyDown(int key);
|
||||
void onKeyUp(int key);
|
||||
private:
|
||||
int surface;
|
||||
int param;
|
||||
};
|
||||
@@ -26,9 +26,9 @@ public:
|
||||
virtual void onMouseScroll(Mouse);//Kinda
|
||||
virtual void onKeyDown(int);//yes
|
||||
virtual void onKeyUp(int);//yes
|
||||
virtual int getCursorId();//yes
|
||||
//virtual int getCursorId();//yes
|
||||
protected:
|
||||
virtual void setCursor(std::string);
|
||||
//virtual void setCursor(std::string);
|
||||
private:
|
||||
std::string cursorString;
|
||||
//std::string cursorString;
|
||||
};
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#define IDC_PROPERTYGRID 2000
|
||||
#define IDC_STATIC 2
|
||||
|
||||
#define IDE_EDIT 105
|
||||
#define IDI_ICON1 102
|
||||
#define IDB_BITMAP1 103
|
||||
#define IDD_DIALOG1 104
|
||||
5
src/include/winver.h
Normal file
5
src/include/winver.h
Normal file
@@ -0,0 +1,5 @@
|
||||
#ifndef WINVER
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#define _WIN32_WINDOWS 0x0400
|
||||
#define WINVER 0x0400
|
||||
#endif
|
||||
@@ -1,13 +1,13 @@
|
||||
#include <G3DAll.h>
|
||||
#include <initguid.h>
|
||||
#include <iomanip>
|
||||
#include "resource.h"
|
||||
#include "DataModel/Instance.h"
|
||||
#include "DataModel/PartInstance.h"
|
||||
#include "DataModel/TextButtonInstance.h"
|
||||
#include "DataModel/ImageButtonInstance.h"
|
||||
#include "DataModel/DataModelInstance.h"
|
||||
#include "DataModel/GuiRootInstance.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 "CameraController.h"
|
||||
#include "AudioPlayer.h"
|
||||
#include "Globals.h"
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "Listener/DeleteListener.h"
|
||||
#include "Listener/CameraButtonListener.h"
|
||||
#include "Listener/RotateButtonListener.h"
|
||||
#include "Faces.h"
|
||||
#define LEGACY_LOAD_G3DFUN_LEVEL
|
||||
//Ray testRay;
|
||||
//static int cursorid = 0;
|
||||
@@ -68,7 +69,7 @@ void Application::setFocus(bool focus)
|
||||
Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(settings,window) {
|
||||
|
||||
|
||||
std::string tempPath = ((std::string)getenv("temp")) + "/"+g_PlaceholderName;
|
||||
std::string tempPath = ((std::string)getenv("temp")) + "/"+g_appName;
|
||||
CreateDirectory(tempPath.c_str(), NULL);
|
||||
|
||||
_hWndMain = parentWindow;
|
||||
@@ -134,9 +135,9 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti
|
||||
_propWindow = new PropertyWindow(0, 0, 200, 640, hThisInstance);
|
||||
webBrowser = new IEBrowser(_hwndToolbox);
|
||||
|
||||
SetWindowLongPtr(_hwndToolbox,GWL_USERDATA+1,(LONG)webBrowser);
|
||||
navigateToolbox("http://androdome.com/res/ClientToolbox.php");
|
||||
//navigateToolbox(GetFileInPath("/content/page/controller.html"));
|
||||
SetProp(_hwndToolbox,"Browser",(HANDLE)webBrowser);
|
||||
//navigateToolbox("http://androdome.com/res/ClientToolbox.php");
|
||||
navigateToolbox(GetFileInPath("/content/page/surface.html"));
|
||||
//navigateToolbox(GetFileInPath("/content/page/controller.html"));
|
||||
|
||||
}
|
||||
@@ -183,7 +184,7 @@ void Application::onInit() {
|
||||
cameraController.setFrame(Vector3(0,2,10));
|
||||
_dataModel = new DataModelInstance();
|
||||
_dataModel->setParent(NULL);
|
||||
_dataModel->name = "undefined";
|
||||
_dataModel->setName("undefined");
|
||||
_dataModel->font = g_fntdominant;
|
||||
g_dataModel = _dataModel;
|
||||
|
||||
@@ -196,61 +197,70 @@ void Application::onInit() {
|
||||
test->setSize(Vector3(24,1,24));
|
||||
test->setPosition(Vector3(0,0,0));
|
||||
test->setCFrame(test->getCFrame() * Matrix3::fromEulerAnglesXYZ(0,toRadians(0),toRadians(0)));
|
||||
|
||||
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3(.5F,1,.5F);
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-10,1,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3(.5F,1,.5F);
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(10,1,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(7,2,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-7,2,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(4,3,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-5,3,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(1,4,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-3,4,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(-2,5,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
|
||||
|
||||
@@ -260,12 +270,14 @@ void Application::onInit() {
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(0,6,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
|
||||
test = makePart();
|
||||
test->setParent(_dataModel->getWorkspace());
|
||||
test->color = Color3::gray();
|
||||
test->setSize(Vector3(4,1,2));
|
||||
test->setPosition(Vector3(2,7,0));
|
||||
test->setSurface(TOP, Enum::SurfaceType::Bumps);
|
||||
#else
|
||||
_dataModel->debugGetOpen();
|
||||
#endif
|
||||
@@ -342,7 +354,7 @@ 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->cFrame.upVector())/1.3F);
|
||||
collider->setVelocity(collider->getVelocity().reflectionDirection(colliding->getCFrame().upVector())/1.3F);
|
||||
|
||||
}
|
||||
|
||||
@@ -498,37 +510,16 @@ void Application::changeTool(Tool * newTool)
|
||||
|
||||
}
|
||||
|
||||
void Application::makeFlag(Vector3 &vec, RenderDevice* &rd)
|
||||
{
|
||||
|
||||
Vector3 up = Vector3(vec.x, vec.y+3, vec.z);
|
||||
rd->setColor(Color3::blue());
|
||||
rd->beforePrimitive();
|
||||
|
||||
glBegin(GL_LINES);
|
||||
glVertex3f(vec.x, vec.y, vec.z);
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
glEnd();
|
||||
|
||||
glBegin( GL_TRIANGLES );
|
||||
glVertex3f(up.x, up.y-1, up.z);
|
||||
glVertex3f(up.x, up.y-0.5, up.z-1);
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
glVertex3f(up.x, up.y-0.5, up.z-1);
|
||||
glVertex3f(up.x, up.y-1, up.z);
|
||||
|
||||
glEnd();
|
||||
rd->afterPrimitive();
|
||||
rd->setColor(Color3::white());
|
||||
//I know how i will approach this now
|
||||
}
|
||||
|
||||
void Application::setMode(int mode)
|
||||
{
|
||||
_mode = mode;
|
||||
}
|
||||
|
||||
void Application::unSetMode()
|
||||
{
|
||||
_mode = NULL;
|
||||
}
|
||||
|
||||
int Application::getMode()
|
||||
{
|
||||
return _mode;
|
||||
@@ -618,6 +609,8 @@ void Application::exitApplication()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Application::onGraphics(RenderDevice* rd) {
|
||||
|
||||
G3D::uint8 num = 0;
|
||||
@@ -635,14 +628,14 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
{
|
||||
mouseOnScreen = false;
|
||||
//ShowCursor(true);
|
||||
_window->setMouseVisible(true);
|
||||
//_window->setMouseVisible(true);
|
||||
//rd->window()->setInputCaptureCount(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
mouseOnScreen = true;
|
||||
//SetCursor(NULL);
|
||||
_window->setMouseVisible(false);
|
||||
//_window->setMouseVisible(false);
|
||||
//rd->window()->setInputCaptureCount(1);
|
||||
}
|
||||
|
||||
@@ -709,7 +702,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
rd->afterPrimitive();
|
||||
|
||||
|
||||
Draw::box(G3D::Box(mouse.getPosition()-Vector3(2,0.5F,1),mouse.getPosition()+Vector3(2,0.5F,1)), rd, Color3::cyan(), Color4::clear());
|
||||
//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 < g_selectedInstances.size(); i++)
|
||||
@@ -718,7 +711,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
{
|
||||
Vector3 size = part->getSize();
|
||||
Vector3 pos = part->getPosition();
|
||||
drawOutline(Vector3(0+size.x/2, 0+size.y/2, 0+size.z/2) ,Vector3(0-size.x/2,0-size.y/2,0-size.z/2), rd, lighting, Vector3(size.x/2, size.y/2, size.z/2), Vector3(pos.x, pos.y, pos.z), part->getCFrameRenderBased());
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -742,7 +735,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
}
|
||||
renderDevice->push2D();
|
||||
_dataModel->getGuiRoot()->renderGUI(renderDevice, m_graphicsWatch.FPS());
|
||||
rd->pushState();
|
||||
/*rd->pushState();
|
||||
rd->beforePrimitive();
|
||||
|
||||
if(Globals::showMouse && mouseOnScreen)
|
||||
@@ -768,7 +761,7 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
glBindTexture( GL_TEXTURE_2D, tool->getCursorId());
|
||||
/*glBindTexture( GL_TEXTURE_2D, tool->getCursorId());
|
||||
|
||||
|
||||
glBegin( GL_QUADS );
|
||||
@@ -782,11 +775,11 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
glVertex2f( mousepos.x-64, mousepos.y+64 );
|
||||
glEnd();
|
||||
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
}
|
||||
glDisable( GL_TEXTURE_2D );*/
|
||||
//}
|
||||
|
||||
rd->afterPrimitive();
|
||||
rd->popState();
|
||||
/*rd->afterPrimitive();
|
||||
rd->popState();*/
|
||||
renderDevice->pop2D();
|
||||
}
|
||||
|
||||
@@ -800,6 +793,11 @@ 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)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "CameraController.h"
|
||||
#include "win32Defines.h"
|
||||
#include <iostream>
|
||||
#include "DataModel/PartInstance.h"
|
||||
#include "DataModelV2/PartInstance.h"
|
||||
#include "Application.h"
|
||||
#include "AudioPlayer.h"
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ BaseButtonInstance::~BaseButtonInstance(void)
|
||||
}
|
||||
}
|
||||
|
||||
void BaseButtonInstance::setButtonListener(ButtonListener* buttonListener)
|
||||
void BaseButtonInstance::setButtonListener(ButtonListener& buttonListener)
|
||||
{
|
||||
listener = buttonListener;
|
||||
}
|
||||
|
||||
56
src/source/DataModelV2/BaseButtonInstance.cpp
Normal file
56
src/source/DataModelV2/BaseButtonInstance.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
|
||||
ButtonListener* listener = NULL;
|
||||
|
||||
BaseButtonInstance::BaseButtonInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
listener = NULL;
|
||||
}
|
||||
|
||||
void BaseButtonInstance::render(RenderDevice* rd)
|
||||
{
|
||||
DataModelInstance* dataModel = g_dataModel;
|
||||
Vector2 pos = Vector2(g_usableApp->mouse.x,g_usableApp->mouse.y);
|
||||
drawObj(rd, pos, g_usableApp->mouse.isMouseDown());
|
||||
Instance::render(rd);
|
||||
}
|
||||
|
||||
BaseButtonInstance::~BaseButtonInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
void BaseButtonInstance::setButtonListener(ButtonListener& buttonListener)
|
||||
{
|
||||
listener = &buttonListener;
|
||||
}
|
||||
|
||||
void BaseButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown){}
|
||||
|
||||
bool BaseButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd){return false;}
|
||||
|
||||
void BaseButtonInstance::onMouseClick()
|
||||
{
|
||||
if(listener != NULL)
|
||||
{
|
||||
listener->onButton1MouseClick(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool BaseButtonInstance::mouseInArea(float point1x, float point1y, float point2x, float point2y, float mousex, float mousey)
|
||||
{
|
||||
|
||||
|
||||
if(mousex >= point1x && mousey >= point1y)
|
||||
{
|
||||
if(mousex < point2x && mousey < point2y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
1
src/source/DataModelV2/BaseGuiInstance.cpp
Normal file
1
src/source/DataModelV2/BaseGuiInstance.cpp
Normal file
@@ -0,0 +1 @@
|
||||
#include "DataModelV2/BaseGuiInstance.h"
|
||||
617
src/source/DataModelV2/DataModelInstance.cpp
Normal file
617
src/source/DataModelV2/DataModelInstance.cpp
Normal file
@@ -0,0 +1,617 @@
|
||||
#include <string>
|
||||
#include "DataModelV2/GuiRootInstance.h"
|
||||
#include "DataModelV2/DataModelInstance.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <commdlg.h>
|
||||
#include "ErrorFunctions.h"
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace rapidxml;
|
||||
|
||||
|
||||
|
||||
DataModelInstance::DataModelInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
workspace = new WorkspaceInstance();
|
||||
guiRoot = new GuiRootInstance();
|
||||
level = new LevelInstance();
|
||||
//children.push_back(workspace);
|
||||
//children.push_back(level);
|
||||
className = "dataModel";
|
||||
//mousex = 0;
|
||||
//mousey = 0;
|
||||
//mouseButton1Down = false;
|
||||
showMessage = false;
|
||||
canDelete = false;
|
||||
_modY=0;
|
||||
workspace->setParent(this);
|
||||
level->setParent(this);
|
||||
_loadedFileName="..//skooter.rbxm";
|
||||
listicon = 5;
|
||||
running = false;
|
||||
|
||||
}
|
||||
|
||||
void DataModelInstance::toggleRun()
|
||||
{
|
||||
running = !running;
|
||||
}
|
||||
bool DataModelInstance::isRunning()
|
||||
{
|
||||
return running;
|
||||
}
|
||||
|
||||
DataModelInstance::~DataModelInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void DataModelInstance::modXMLLevel(float modY)
|
||||
{
|
||||
_modY += modY;
|
||||
clearLevel();
|
||||
debugGetOpen();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void DataModelInstance::clearLevel()
|
||||
{
|
||||
workspace->clearChildren();
|
||||
g_usableApp->_propWindow->UpdateSelected(this);
|
||||
}
|
||||
PartInstance* DataModelInstance::makePart()
|
||||
{
|
||||
PartInstance* part = new PartInstance();
|
||||
return part;
|
||||
}
|
||||
|
||||
rapidxml::xml_node<>* DataModelInstance::getNode(xml_node<> * node,const char* name)
|
||||
{
|
||||
xml_node<> * tempNode = node->first_node(name);
|
||||
if (!tempNode)
|
||||
{
|
||||
_errMsg = "Expected <";
|
||||
_errMsg += name;
|
||||
_errMsg+="> tag.";
|
||||
_successfulLoad=false;
|
||||
return 0;
|
||||
}
|
||||
return tempNode;
|
||||
}
|
||||
float DataModelInstance::getFloatValue(xml_node<> * node,const char* name)
|
||||
{
|
||||
xml_node<> * tempNode = node->first_node(name);
|
||||
if (!tempNode)
|
||||
{
|
||||
_errMsg = "Expected <";
|
||||
_errMsg += name;
|
||||
_errMsg+="> tag.";
|
||||
_successfulLoad=false;
|
||||
return 0;
|
||||
}
|
||||
float newFloat;
|
||||
stringstream converter;
|
||||
converter << tempNode->value();
|
||||
converter >> newFloat;
|
||||
return newFloat;
|
||||
}
|
||||
|
||||
|
||||
Color3 bcToRGB(short bc)
|
||||
{
|
||||
switch(bc)
|
||||
{
|
||||
case 1: return Color3(0.94901967048645F,0.95294123888016F,0.95294123888016F);
|
||||
case 2: return Color3(0.63137257099152F,0.64705884456635F,0.63529413938522F);
|
||||
case 3: return Color3(0.9764706492424F,0.91372555494308F,0.60000002384186F);
|
||||
case 5: return Color3(0.84313732385635F,0.77254909276962F,0.60392159223557F);
|
||||
case 6: return Color3(0.7607843875885F,0.85490202903748F,0.72156864404678F);
|
||||
case 9: return Color3(0.90980398654938F,0.7294117808342F,0.78431379795074F);
|
||||
case 11: return Color3(0.50196081399918F,0.73333334922791F,0.85882359743118F);
|
||||
case 12: return Color3(0.79607850313187F,0.51764708757401F,0.258823543787F);
|
||||
case 18: return Color3(0.80000007152557F,0.55686277151108F,0.41176474094391F);
|
||||
case 21: return Color3(0.76862752437592F,0.15686275064945F,0.10980392992496F);
|
||||
case 22: return Color3(0.76862752437592F,0.43921571969986F,0.62745100259781F);
|
||||
case 23: return Color3(0.050980396568775F,0.41176474094391F,0.6745098233223F);
|
||||
case 24: return Color3(0.96078437566757F,0.80392163991928F,0.18823531270027F);
|
||||
case 25: return Color3(0.38431376218796F,0.27843138575554F,0.19607844948769F);
|
||||
case 26: return Color3(0.10588236153126F,0.16470588743687F,0.20784315466881F);
|
||||
case 27: return Color3(0.42745101451874F,0.43137258291245F,0.42352944612503F);
|
||||
case 28: return Color3(0.15686275064945F,0.49803924560547F,0.27843138575554F);
|
||||
case 29: return Color3(0.63137257099152F,0.76862752437592F,0.54901963472366F);
|
||||
case 36: return Color3(0.95294123888016F,0.8117647767067F,0.60784316062927F);
|
||||
case 37: return Color3(0.29411765933037F,0.59215688705444F,0.29411765933037F);
|
||||
case 38: return Color3(0.62745100259781F,0.37254902720451F,0.20784315466881F);
|
||||
case 39: return Color3(0.75686281919479F,0.79215693473816F,0.8705883026123F);
|
||||
case 40: return Color3(0.92549026012421F,0.92549026012421F,0.92549026012421F);
|
||||
case 41: return Color3(0.80392163991928F,0.32941177487373F,0.29411765933037F);
|
||||
case 42: return Color3(0.75686281919479F,0.87450987100601F,0.94117653369904F);
|
||||
case 43: return Color3(0.48235297203064F,0.71372550725937F,0.90980398654938F);
|
||||
case 44: return Color3(0.96862751245499F,0.94509810209274F,0.55294120311737F);
|
||||
case 45: return Color3(0.70588237047195F,0.82352948188782F,0.89411771297455F);
|
||||
case 47: return Color3(0.85098046064377F,0.52156865596771F,0.42352944612503F);
|
||||
case 48: return Color3(0.51764708757401F,0.71372550725937F,0.55294120311737F);
|
||||
case 49: return Color3(0.97254908084869F,0.94509810209274F,0.51764708757401F);
|
||||
case 50: return Color3(0.92549026012421F,0.90980398654938F,0.8705883026123F);
|
||||
case 100: return Color3(0.93333339691162F,0.76862752437592F,0.71372550725937F);
|
||||
case 101: return Color3(0.85490202903748F,0.52549022436142F,0.47843140363693F);
|
||||
case 102: return Color3(0.43137258291245F,0.60000002384186F,0.79215693473816F);
|
||||
case 103: return Color3(0.78039222955704F,0.75686281919479F,0.71764707565308F);
|
||||
case 104: return Color3(0.41960787773132F,0.19607844948769F,0.48627454042435F);
|
||||
case 105: return Color3(0.88627457618713F,0.60784316062927F,0.25098040699959F);
|
||||
case 106: return Color3(0.85490202903748F,0.52156865596771F,0.2549019753933F);
|
||||
case 107: return Color3(0,0.56078433990479F,0.61176472902298F);
|
||||
case 108: return Color3(0.4078431725502F,0.36078432202339F,0.26274511218071F);
|
||||
case 110: return Color3(0.26274511218071F,0.32941177487373F,0.57647061347961F);
|
||||
case 111: return Color3(0.74901962280273F,0.71764707565308F,0.69411766529083F);
|
||||
case 112: return Color3(0.4078431725502F,0.45490199327469F,0.6745098233223F);
|
||||
case 113: return Color3(0.89411771297455F,0.678431391716F,0.78431379795074F);
|
||||
case 115: return Color3(0.78039222955704F,0.82352948188782F,0.23529413342476F);
|
||||
case 116: return Color3(0.33333334326744F,0.64705884456635F,0.68627452850342F);
|
||||
case 118: return Color3(0.71764707565308F,0.84313732385635F,0.83529418706894F);
|
||||
case 119: return Color3(0.64313727617264F,0.74117648601532F,0.27843138575554F);
|
||||
case 120: return Color3(0.85098046064377F,0.89411771297455F,0.65490198135376F);
|
||||
case 121: return Color3(0.90588241815567F,0.6745098233223F,0.34509804844856F);
|
||||
case 123: return Color3(0.82745105028152F,0.43529415130615F,0.29803922772408F);
|
||||
case 124: return Color3(0.57254904508591F,0.22352942824364F,0.47058826684952F);
|
||||
case 125: return Color3(0.91764712333679F,0.72156864404678F,0.57254904508591F);
|
||||
case 126: return Color3(0.64705884456635F,0.64705884456635F,0.79607850313187F);
|
||||
case 127: return Color3(0.86274516582489F,0.73725491762161F,0.50588238239288F);
|
||||
case 128: return Color3(0.68235296010971F,0.47843140363693F,0.34901961684227F);
|
||||
case 131: return Color3(0.61176472902298F,0.63921570777893F,0.65882354974747F);
|
||||
case 133: return Color3(0.83529418706894F,0.45098042488098F,0.23921570181847F);
|
||||
case 134: return Color3(0.84705889225006F,0.8666667342186F,0.33725491166115F);
|
||||
case 135: return Color3(0.45490199327469F,0.52549022436142F,0.61568629741669F);
|
||||
case 136: return Color3(0.52941179275513F,0.48627454042435F,0.56470590829849F);
|
||||
case 137: return Color3(0.87843143939972F,0.59607845544815F,0.39215689897537F);
|
||||
case 138: return Color3(0.58431375026703F,0.54117649793625F,0.45098042488098F);
|
||||
case 140: return Color3(0.12549020349979F,0.22745099663734F,0.33725491166115F);
|
||||
case 141: return Color3(0.15294118225574F,0.27450981736183F,0.17647059261799F);
|
||||
case 143: return Color3(0.8117647767067F,0.88627457618713F,0.96862751245499F);
|
||||
case 145: return Color3(0.47450983524323F,0.53333336114883F,0.63137257099152F);
|
||||
case 146: return Color3(0.58431375026703F,0.55686277151108F,0.63921570777893F);
|
||||
case 147: return Color3(0.57647061347961F,0.52941179275513F,0.40392160415649F);
|
||||
case 148: return Color3(0.34117648005486F,0.34509804844856F,0.34117648005486F);
|
||||
case 149: return Color3(0.086274512112141F,0.11372549831867F,0.19607844948769F);
|
||||
case 150: return Color3(0.67058825492859F,0.678431391716F,0.6745098233223F);
|
||||
case 151: return Color3(0.47058826684952F,0.56470590829849F,0.50980395078659F);
|
||||
case 153: return Color3(0.58431375026703F,0.47450983524323F,0.46666669845581F);
|
||||
case 154: return Color3(0.48235297203064F,0.1803921610117F,0.1843137294054F);
|
||||
case 157: return Color3(1,0.96470594406128F,0.48235297203064F);
|
||||
case 158: return Color3(0.88235300779343F,0.64313727617264F,0.7607843875885F);
|
||||
case 168: return Color3(0.4588235616684F,0.42352944612503F,0.38431376218796F);
|
||||
case 176: return Color3(0.59215688705444F,0.41176474094391F,0.35686275362968F);
|
||||
case 178: return Color3(0.70588237047195F,0.51764708757401F,0.33333334326744F);
|
||||
case 179: return Color3(0.53725492954254F,0.52941179275513F,0.53333336114883F);
|
||||
case 180: return Color3(0.84313732385635F,0.66274511814117F,0.29411765933037F);
|
||||
case 190: return Color3(0.9764706492424F,0.83921575546265F,0.1803921610117F);
|
||||
case 191: return Color3(0.90980398654938F,0.67058825492859F,0.17647059261799F);
|
||||
case 192: return Color3(0.41176474094391F,0.25098040699959F,0.15686275064945F);
|
||||
case 193: return Color3(0.8117647767067F,0.37647062540054F,0.14117647707462F);
|
||||
case 195: return Color3(0.27450981736183F,0.40392160415649F,0.64313727617264F);
|
||||
case 196: return Color3(0.13725490868092F,0.27843138575554F,0.54509806632996F);
|
||||
case 198: return Color3(0.55686277151108F,0.258823543787F,0.52156865596771F);
|
||||
case 199: return Color3(0.38823533058167F,0.37254902720451F,0.38431376218796F);
|
||||
case 200: return Color3(0.50980395078659F,0.54117649793625F,0.3647058904171F);
|
||||
case 208: return Color3(0.89803928136826F,0.89411771297455F,0.87450987100601F);
|
||||
case 209: return Color3(0.69019609689713F,0.55686277151108F,0.26666668057442F);
|
||||
case 210: return Color3(0.43921571969986F,0.58431375026703F,0.47058826684952F);
|
||||
case 211: return Color3(0.47450983524323F,0.70980393886566F,0.70980393886566F);
|
||||
case 212: return Color3(0.6235294342041F,0.76470595598221F,0.91372555494308F);
|
||||
case 213: return Color3(0.42352944612503F,0.50588238239288F,0.71764707565308F);
|
||||
case 216: return Color3(0.56078433990479F,0.29803922772408F,0.16470588743687F);
|
||||
case 217: return Color3(0.48627454042435F,0.36078432202339F,0.27450981736183F);
|
||||
case 218: return Color3(0.58823531866074F,0.43921571969986F,0.6235294342041F);
|
||||
case 219: return Color3(0.41960787773132F,0.38431376218796F,0.60784316062927F);
|
||||
case 220: return Color3(0.65490198135376F,0.66274511814117F,0.80784320831299F);
|
||||
case 221: return Color3(0.80392163991928F,0.38431376218796F,0.59607845544815F);
|
||||
case 222: return Color3(0.89411771297455F,0.678431391716F,0.78431379795074F);
|
||||
case 223: return Color3(0.86274516582489F,0.56470590829849F,0.58431375026703F);
|
||||
case 224: return Color3(0.94117653369904F,0.83529418706894F,0.62745100259781F);
|
||||
case 225: return Color3(0.9215686917305F,0.72156864404678F,0.49803924560547F);
|
||||
case 226: return Color3(0.99215692281723F,0.91764712333679F,0.55294120311737F);
|
||||
case 232: return Color3(0.49019610881805F,0.73333334922791F,0.8666667342186F);
|
||||
case 268: return Color3(0.2039215862751F,0.16862745583057F,0.4588235616684F);
|
||||
case 1001: return Color3(0.97254908084869F,0.97254908084869F,0.97254908084869F);
|
||||
case 1002: return Color3(0.80392163991928F,0.80392163991928F,0.80392163991928F);
|
||||
case 1003: return Color3(0.066666670143604F,0.066666670143604F,0.066666670143604F);
|
||||
case 1004: return Color3(1,0,0);
|
||||
case 1005: return Color3(1,0.68627452850342F,0);
|
||||
case 1006: return Color3(0.70588237047195F,0.50196081399918F,1);
|
||||
case 1007: return Color3(0.63921570777893F,0.29411765933037F,0.29411765933037F);
|
||||
case 1008: return Color3(0.75686281919479F,0.74509805440903F,0.258823543787F);
|
||||
case 1009: return Color3(1,1,0);
|
||||
case 1010: return Color3(0,0,1);
|
||||
case 1011: return Color3(0,0.12549020349979F,0.37647062540054F);
|
||||
case 1012: return Color3(0.1294117718935F,0.32941177487373F,0.72549021244049F);
|
||||
case 1013: return Color3(0.015686275437474F,0.68627452850342F,0.92549026012421F);
|
||||
case 1014: return Color3(0.66666668653488F,0.33333334326744F,0);
|
||||
case 1015: return Color3(0.66666668653488F,0,0.66666668653488F);
|
||||
case 1016: return Color3(1,0.40000003576279F,0.80000007152557F);
|
||||
case 1017: return Color3(1,0.68627452850342F,0);
|
||||
case 1018: return Color3(0.070588238537312F,0.93333339691162F,0.83137261867523F);
|
||||
case 1019: return Color3(0,1,1);
|
||||
case 1020: return Color3(0,1,0);
|
||||
case 1021: return Color3(0.22745099663734F,0.49019610881805F,0.082352943718433F);
|
||||
case 1022: return Color3(0.49803924560547F,0.55686277151108F,0.39215689897537F);
|
||||
case 1023: return Color3(0.54901963472366F,0.35686275362968F,0.6235294342041F);
|
||||
case 1024: return Color3(0.68627452850342F,0.8666667342186F,1);
|
||||
case 1025: return Color3(1,0.78823536634445F,0.78823536634445F);
|
||||
case 1026: return Color3(0.69411766529083F,0.65490198135376F,1);
|
||||
case 1027: return Color3(0.6235294342041F,0.95294123888016F,0.91372555494308F);
|
||||
case 1028: return Color3(0.80000007152557F,1,0.80000007152557F);
|
||||
case 1029: return Color3(1,1,0.80000007152557F);
|
||||
case 1030: return Color3(1,0.80000007152557F,0.60000002384186F);
|
||||
case 1031: return Color3(0.38431376218796F,0.14509804546833F,0.81960791349411F);
|
||||
case 1032: return Color3(1,0,0.74901962280273F);
|
||||
default: return Color3::gray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
|
||||
{
|
||||
xml_node<> * watchFirstNode = scanNode->first_node();
|
||||
|
||||
for (xml_node<> *node = scanNode->first_node();node; node = node->next_sibling())
|
||||
{
|
||||
|
||||
if (strncmp(node->name(),"Item",4)==0)
|
||||
{
|
||||
xml_attribute<> *classAttr = node->first_attribute("class");
|
||||
std::string className = classAttr->value();
|
||||
if (className=="Part") {
|
||||
xml_node<> *propNode = node->first_node();
|
||||
xml_node<> *cFrameNode=0;
|
||||
xml_node<> *sizeNode=0;
|
||||
xml_node<> *shapeNode=0;
|
||||
xml_node<> *colorNode=0;
|
||||
xml_node<> *brickColorNode=0;
|
||||
xml_node<> *nameNode=0;
|
||||
|
||||
for (xml_node<> *partPropNode = propNode->first_node();partPropNode; partPropNode = partPropNode->next_sibling())
|
||||
{
|
||||
for (xml_attribute<> *attr = partPropNode->first_attribute();attr; attr = attr->next_attribute())
|
||||
{
|
||||
std::string xmlName = attr->name();
|
||||
std::string xmlValue = attr->value();
|
||||
|
||||
if (xmlValue=="CFrame" | xmlValue=="CoordinateFrame")
|
||||
{
|
||||
cFrameNode = partPropNode;
|
||||
}
|
||||
if (xmlValue=="Name")
|
||||
{
|
||||
nameNode = partPropNode;
|
||||
}
|
||||
if (xmlValue=="shape")
|
||||
{
|
||||
shapeNode = partPropNode;
|
||||
_legacyLoad=false;
|
||||
}
|
||||
if (xmlValue=="Color")
|
||||
{
|
||||
colorNode=partPropNode;
|
||||
}
|
||||
if (xmlValue=="BrickColor")
|
||||
{
|
||||
brickColorNode=partPropNode;
|
||||
}
|
||||
if (xmlValue=="size")
|
||||
{
|
||||
sizeNode = partPropNode;
|
||||
_legacyLoad=false;
|
||||
}
|
||||
if (xmlValue=="Part")
|
||||
{
|
||||
for (xml_node<> *featureNode = partPropNode->first_node();featureNode; featureNode = featureNode->next_sibling())
|
||||
{
|
||||
for (xml_attribute<> *attr = featureNode->first_attribute();attr; attr = attr->next_attribute())
|
||||
{
|
||||
std::string xmlName = attr->name();
|
||||
std::string xmlValue = attr->value();
|
||||
if (xmlValue=="shape")
|
||||
{
|
||||
shapeNode = featureNode;
|
||||
_legacyLoad=true;
|
||||
}
|
||||
if (xmlValue=="size")
|
||||
{
|
||||
sizeNode=featureNode;
|
||||
_legacyLoad=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!cFrameNode) {
|
||||
_errMsg="CFrame is missing in Part";
|
||||
return false;
|
||||
}
|
||||
if (!sizeNode) {
|
||||
_errMsg="Size is missing in Part";
|
||||
return false;
|
||||
}
|
||||
|
||||
float R=1;
|
||||
float G=1;
|
||||
float B=1;
|
||||
|
||||
if (colorNode)
|
||||
{
|
||||
R = getFloatValue(colorNode,"R");
|
||||
G = getFloatValue(colorNode,"G");
|
||||
B = getFloatValue(colorNode,"B");
|
||||
}
|
||||
|
||||
Enum::Shape::Value partshape = Enum::Shape::Block;
|
||||
std::string pshape = shapeNode->value();
|
||||
if (shapeNode)
|
||||
{
|
||||
if(pshape == "0" || pshape == "Ball"){
|
||||
partshape = Enum::Shape::Ball;
|
||||
}
|
||||
if(pshape == "1" || pshape == "Block"){
|
||||
partshape = Enum::Shape::Block;
|
||||
}
|
||||
if(pshape == "2" || pshape == "Cylinder"){
|
||||
partshape = Enum::Shape::Cylinder;
|
||||
}
|
||||
}
|
||||
|
||||
std::string newName = nameNode->value();
|
||||
float X = getFloatValue(cFrameNode,"X");
|
||||
float Y = getFloatValue(cFrameNode,"Y");
|
||||
float Z = getFloatValue(cFrameNode,"Z");
|
||||
float R00 = getFloatValue(cFrameNode,"R00");
|
||||
float R01 = getFloatValue(cFrameNode,"R01");
|
||||
float R02 = getFloatValue(cFrameNode,"R02");
|
||||
float R10 = getFloatValue(cFrameNode,"R10");
|
||||
float R11 = getFloatValue(cFrameNode,"R11");
|
||||
float R12 = getFloatValue(cFrameNode,"R12");
|
||||
float R20 = getFloatValue(cFrameNode,"R20");
|
||||
float R21 = getFloatValue(cFrameNode,"R21");
|
||||
float R22 = getFloatValue(cFrameNode,"R22");
|
||||
|
||||
float sizeX = getFloatValue(sizeNode,"X");
|
||||
float sizeY = getFloatValue(sizeNode,"Y");
|
||||
float sizeZ = getFloatValue(sizeNode,"Z");
|
||||
//sizeX=1;
|
||||
//sizeY=1;
|
||||
//sizeZ=1;
|
||||
if (_successfulLoad) {
|
||||
PartInstance* test = makePart();
|
||||
test->setParent(getWorkspace());
|
||||
test->color = Color3(R,G,B);
|
||||
test->shape = partshape;
|
||||
if(brickColorNode)
|
||||
{
|
||||
test->color = bcToRGB(atoi(brickColorNode->value()));
|
||||
}
|
||||
test->setSize(Vector3(sizeX,sizeY+_modY,sizeZ));
|
||||
test->setName(newName);
|
||||
CoordinateFrame cf;
|
||||
|
||||
if (_legacyLoad)
|
||||
{
|
||||
|
||||
cf = CoordinateFrame(Vector3(-X,Y,Z))*CoordinateFrame(Vector3(-sizeX/2,(sizeY+_modY)/2,sizeZ/2)*Matrix3(R00,R01,R02,R10,R11,R12,R20,R21,R22));
|
||||
cf.rotation = Matrix3(R00,R01,R02,R10,R11,R12,R20,R21,R22);
|
||||
}
|
||||
else
|
||||
{
|
||||
cf.translation = Vector3(X,Y,Z);
|
||||
cf.rotation = Matrix3(R00,R01,R02,R10,R11,R12,R20,R21,R22);
|
||||
}
|
||||
|
||||
test->setCFrame(cf);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
for (xml_attribute<> *attr = node->first_attribute();attr; attr = attr->next_attribute())
|
||||
{
|
||||
std::string xmlName = attr->name();
|
||||
std::string xmlValue = attr->value();
|
||||
}
|
||||
*/
|
||||
scanXMLObject(node);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DataModelInstance::load(const char* filename, bool clearObjects)
|
||||
{
|
||||
ifstream levelFile(filename,ios::binary);
|
||||
if (levelFile)
|
||||
{
|
||||
if (clearObjects)
|
||||
clearLevel();
|
||||
readXMLFileStream(&levelFile);
|
||||
std::string sfilename = std::string(filename);
|
||||
std::size_t begin = sfilename.rfind('\\') + 1;
|
||||
std::size_t end = sfilename.find(".rbx");
|
||||
std::string hname = sfilename.substr(begin);
|
||||
std::string tname = hname.substr(0, hname.length() - 5);
|
||||
name = tname;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::stringstream msg;
|
||||
msg << "Failed to load file:" << std::endl << filename << std::endl << strerror(errno);
|
||||
MessageBoxStr(msg.str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool DataModelInstance::readXMLFileStream(std::ifstream* file)
|
||||
{
|
||||
file->seekg(0,file->end);
|
||||
int length = file->tellg();
|
||||
if (length<0)
|
||||
{
|
||||
MessageBoxStr("File is empty");
|
||||
file->close();
|
||||
return false;
|
||||
}
|
||||
file->seekg(0,file->beg);
|
||||
char * buffer = new char[length+1];
|
||||
buffer[length]=0;
|
||||
|
||||
file->read(buffer,length);
|
||||
file->close();
|
||||
|
||||
if (!file)
|
||||
{
|
||||
stringstream msg;
|
||||
msg << "Something went wrong." << endl << strerror(errno);
|
||||
MessageBoxStr(msg.str());
|
||||
return false;
|
||||
}
|
||||
_successfulLoad = true;
|
||||
xml_document<> doc;
|
||||
doc.parse<0>(buffer);
|
||||
xml_node<> *mainNode = doc.first_node();
|
||||
_legacyLoad=false;
|
||||
//std::string xmlName = mainNode->name();
|
||||
//node = node->first_node();
|
||||
//xmlName = node->name();
|
||||
scanXMLObject(mainNode);
|
||||
delete[] buffer;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DataModelInstance::debugGetOpen()
|
||||
{
|
||||
ifstream levelFile(_loadedFileName.c_str(),ios::binary);
|
||||
if (levelFile)
|
||||
readXMLFileStream(&levelFile);
|
||||
else
|
||||
getOpen();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DataModelInstance::getOpen()
|
||||
{
|
||||
_modY=0;
|
||||
OPENFILENAME of;
|
||||
ZeroMemory( &of , sizeof( of));
|
||||
of.lStructSize = sizeof(OPENFILENAME);
|
||||
of.lpstrFilter = "Roblox Files\0*.rbxm;*.rbxl\0\0";
|
||||
char szFile[512];
|
||||
of.lpstrFile = szFile ;
|
||||
of.lpstrFile[0]='\0';
|
||||
of.nMaxFile=500;
|
||||
of.lpstrTitle="Hello";
|
||||
ShowCursor(TRUE);
|
||||
BOOL file = GetOpenFileName(&of);
|
||||
if (file)
|
||||
{
|
||||
_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)
|
||||
{
|
||||
message = msg;
|
||||
isBrickCount = false;
|
||||
showMessage = true;
|
||||
}
|
||||
|
||||
void DataModelInstance::clearMessage()
|
||||
{
|
||||
showMessage = false;
|
||||
isBrickCount = false;
|
||||
message = "";
|
||||
}
|
||||
|
||||
void DataModelInstance::setMessageBrickCount()
|
||||
{
|
||||
isBrickCount = true;
|
||||
showMessage = true;
|
||||
}
|
||||
|
||||
void DataModelInstance::drawMessage(RenderDevice* rd)
|
||||
{
|
||||
if(isBrickCount)
|
||||
{
|
||||
int brickCount = 0;
|
||||
int instCount = 0;
|
||||
std::vector<Instance*> inst = getAllChildren();
|
||||
for(size_t i = 0; i < inst.size(); i++)
|
||||
{
|
||||
if(PartInstance* moveTo = dynamic_cast<PartInstance*>(inst.at(i)))
|
||||
{
|
||||
brickCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
instCount++;
|
||||
}
|
||||
}
|
||||
char brkc[12];
|
||||
sprintf_s(brkc, "%d", brickCount);
|
||||
char instc[12];
|
||||
sprintf_s(instc, "%d", instCount);
|
||||
message = "Bricks: ";
|
||||
message += brkc;
|
||||
message += " Snaps: ";
|
||||
message += instc;
|
||||
}
|
||||
if(showMessage && !font.isNull())
|
||||
{
|
||||
int x = rd->getWidth()/2;
|
||||
int y = rd->getHeight()/2;
|
||||
int width = rd->getWidth()/2 + 100;
|
||||
int height = width / 3;
|
||||
Draw::box(Box(Vector3(x-(width/2), y-(height/2), 0), Vector3(x+(width/2), y+(height/2), 0)), rd, Color4::fromARGB(0x55B2B2B2), Color3::fromARGB(0xB2B2B2));
|
||||
font->draw2D(rd, message, Vector2(x,y), height/8, Color3::white(), Color4::clear(), GFont::XALIGN_CENTER, GFont::YALIGN_CENTER);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
LevelInstance* DataModelInstance::getLevel()
|
||||
{
|
||||
return level;
|
||||
}
|
||||
77
src/source/DataModelV2/GroupInstance.cpp
Normal file
77
src/source/DataModelV2/GroupInstance.cpp
Normal file
@@ -0,0 +1,77 @@
|
||||
#include "DataModelV2/GroupInstance.h"
|
||||
|
||||
GroupInstance::GroupInstance(void)
|
||||
{
|
||||
PVInstance::PVInstance();
|
||||
name = "Model";
|
||||
className = "GroupInstance";
|
||||
listicon = 12;
|
||||
primaryPart = NULL;
|
||||
}
|
||||
|
||||
GroupInstance::GroupInstance(const GroupInstance &oinst)
|
||||
{
|
||||
PVInstance::PVInstance(oinst);
|
||||
name = "Model";
|
||||
className = "GroupInstance";
|
||||
listicon = 12;
|
||||
primaryPart = NULL;
|
||||
}
|
||||
|
||||
GroupInstance::~GroupInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<PROPGRIDITEM> GroupInstance::getProperties()
|
||||
{
|
||||
std::vector<PROPGRIDITEM> properties = PVInstance::getProperties();
|
||||
return properties;
|
||||
}
|
||||
void GroupInstance::PropUpdate(LPPROPGRIDITEM &pItem)
|
||||
{
|
||||
PVInstance::PropUpdate(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;
|
||||
}
|
||||
|
||||
void GroupInstance::render(RenderDevice * rd)
|
||||
{
|
||||
Instance::render(rd);
|
||||
if(primaryPart != NULL && controllerFlagShown && getControllerColor(controller) != Color3::gray())
|
||||
{
|
||||
rd->disableLighting();
|
||||
Vector3 vec = Vector3(0,0,0);
|
||||
Vector3 up = Vector3(0,8,0);
|
||||
rd->setColor(getControllerColor(controller));
|
||||
rd->setObjectToWorldMatrix(primaryPart->getCFrame());
|
||||
rd->beforePrimitive();
|
||||
|
||||
glBegin(GL_LINES);
|
||||
glVertex3f(vec.x, vec.y, vec.z);
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
glEnd();
|
||||
|
||||
glBegin( GL_TRIANGLES );
|
||||
glVertex3f(up.x, up.y-2, up.z);
|
||||
glVertex3f(up.x, up.y-1, up.z-2);
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
|
||||
glVertex3f(up.x, up.y, up.z);
|
||||
glVertex3f(up.x, up.y-1, up.z-2);
|
||||
glVertex3f(up.x, up.y-2, up.z);
|
||||
|
||||
glEnd();
|
||||
rd->afterPrimitive();
|
||||
rd->setColor(Color3::white());
|
||||
rd->enableLighting();
|
||||
}
|
||||
}
|
||||
541
src/source/DataModelV2/GuiRootInstance.cpp
Normal file
541
src/source/DataModelV2/GuiRootInstance.cpp
Normal file
@@ -0,0 +1,541 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include "G3DAll.h"
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
#include "DataModelV2/TextButtonInstance.h"
|
||||
#include "DataModelV2/ImageButtonInstance.h"
|
||||
#include "DataModelV2/ToggleImageButtonInstance.h"
|
||||
#include "DataModelV2/GuiRootInstance.h"
|
||||
#include "DataModelV2/ImageButtonInstance.h"
|
||||
#include "Globals.h"
|
||||
#include "StringFunctions.h"
|
||||
|
||||
#include "Listener/GUDButtonListener.h"
|
||||
#include "Listener/ModeSelectionListener.h"
|
||||
#include "Listener/MenuButtonListener.h"
|
||||
#include "Listener/RotateButtonListener.h"
|
||||
#include "Listener/CameraButtonListener.h"
|
||||
#include "Listener/DeleteListener.h"
|
||||
#include "Listener/ToolbarListener.h"
|
||||
|
||||
MenuButtonListener menuListener = MenuButtonListener();
|
||||
ToolbarListener toolbar = ToolbarListener();
|
||||
GUDButtonListener gud = GUDButtonListener();
|
||||
ModeSelectionListener msl = ModeSelectionListener();
|
||||
RotateButtonListener rbl = RotateButtonListener();
|
||||
DeleteListener delet = DeleteListener();
|
||||
CameraButtonListener cam = CameraButtonListener();
|
||||
|
||||
ImageButtonInstance* GuiRootInstance::makeImageButton(G3D::TextureRef newImage = NULL, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL)
|
||||
{
|
||||
ImageButtonInstance* part = new ImageButtonInstance(newImage,overImage, downImage, disableImage);
|
||||
// instances.push_back(part);
|
||||
// instances_2D.push_back(part);
|
||||
return part;
|
||||
}
|
||||
|
||||
TextButtonInstance* GuiRootInstance::makeTextButton()
|
||||
{
|
||||
TextButtonInstance* part = new TextButtonInstance();
|
||||
return part;
|
||||
}
|
||||
GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
|
||||
{
|
||||
g_fntdominant = GFont::fromFile(GetFileInPath("/content/font/dominant.fnt"));
|
||||
g_fntlighttrek = GFont::fromFile(GetFileInPath("/content/font/lighttrek.fnt"));
|
||||
|
||||
//Bottom Left
|
||||
TextButtonInstance* button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -24);
|
||||
button->boxEnd = Vector2(80, 0);
|
||||
button->floatBottom = true;
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3(0,255,255);
|
||||
button->textOutlineColor = Color4::clear();
|
||||
button->title = "Hopper";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar.addButtonRef(button);
|
||||
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -48);
|
||||
button->boxEnd = Vector2(80, -24);
|
||||
button->floatBottom = true;
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3(0,255,255);
|
||||
button->textOutlineColor = Color4::clear();
|
||||
button->title = "Controller";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar.addButtonRef(button);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -72);
|
||||
button->boxEnd = Vector2(80, -48);
|
||||
button->floatBottom = true;
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3(0,255,255);
|
||||
button->textOutlineColor = Color4::clear();
|
||||
button->title = "Color";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar.addButtonRef(button);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -96);
|
||||
button->boxEnd = Vector2(80, -72);
|
||||
button->floatBottom = true;
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3(0,255,255);
|
||||
button->textOutlineColor = Color4::clear();
|
||||
button->title = "Surface";
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar.addButtonRef(button);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, -120);
|
||||
button->boxEnd = Vector2(80, -96);
|
||||
button->floatBottom = true;
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3(0,255,255);
|
||||
button->title = "Model";
|
||||
button->selected = true;
|
||||
button->fontLocationRelativeTo = Vector2(10, 3);
|
||||
button->setAllColorsSame();
|
||||
button->boxOutlineColorOvr = Color3(0,255,255);
|
||||
button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F);
|
||||
button->setButtonListener(toolbar);
|
||||
toolbar.addButtonRef(button);
|
||||
|
||||
//Top bar
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0, 0);
|
||||
button->boxEnd = Vector2(125, 25);
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->title = "File";
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
button->name = "file";
|
||||
button->setButtonListener(menuListener);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(125, 0);
|
||||
button->boxEnd = Vector2(250, 25);
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->title = "Edit";
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(250, 0);
|
||||
button->boxEnd = Vector2(375, 25);
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->title = "View";
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(375, 0);
|
||||
button->boxEnd = Vector2(500, 25);
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->title = "Insert";
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(500, 0);
|
||||
button->boxEnd = Vector2(625, 25);
|
||||
button->setParent(this);
|
||||
button->font = g_fntlighttrek;
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->title = "Format";
|
||||
button->textSize = 16;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setAllColorsSame();
|
||||
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
|
||||
|
||||
//Menu
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0,215);
|
||||
button->boxEnd = Vector2(80,235);
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textSize = 12;
|
||||
button->title = "Group";
|
||||
button->name = "Group";
|
||||
button->setAllColorsSame();
|
||||
button->textColorDis = Color3(0.8F,0.8F,0.8F);
|
||||
button->font = g_fntlighttrek;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setParent(this);
|
||||
button->setButtonListener(gud);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0,240);
|
||||
button->boxEnd = Vector2(80,260);
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textSize = 12;
|
||||
button->title = "UnGroup";
|
||||
button->name = "UnGroup";
|
||||
button->setAllColorsSame();
|
||||
button->textColorDis = Color3(0.8F,0.8F,0.8F);
|
||||
button->font = g_fntlighttrek;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setParent(this);
|
||||
button->setButtonListener(gud);
|
||||
|
||||
button = makeTextButton();
|
||||
button->boxBegin = Vector2(0,265);
|
||||
button->boxEnd = Vector2(80,285);
|
||||
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
|
||||
button->textColor = Color3::white();
|
||||
button->boxColor = Color4::clear();
|
||||
button->textSize = 12;
|
||||
button->title = "Duplicate";
|
||||
button->setAllColorsSame();
|
||||
button->textColorDis = Color3(0.8F,0.8F,0.8F);
|
||||
button->font = g_fntlighttrek;
|
||||
button->fontLocationRelativeTo = Vector2(10, 0);
|
||||
button->setParent(this);
|
||||
button->name = "Duplicate";
|
||||
button->setButtonListener(gud);
|
||||
|
||||
ImageButtonInstance* instance = new ToggleImageButtonInstance(
|
||||
Texture::fromFile(GetFileInPath("/content/images/Run.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Run_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Run_dn.png")),
|
||||
NULL,
|
||||
Texture::fromFile(GetFileInPath("/content/images/Stop.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Stop_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Stop_dn.png"))
|
||||
);
|
||||
instance->setButtonListener(menuListener);
|
||||
instance->name = "go";
|
||||
instance->size = Vector2(65,65);
|
||||
instance->position = Vector2(6.5, 25);
|
||||
instance->setParent(this);
|
||||
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/ArrowTool.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/ArrowTool_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/ArrowTool_dn.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/ArrowTool_ds.png")));
|
||||
instance->size = Vector2(50,50);
|
||||
instance->position = Vector2(15, 90);
|
||||
instance->setParent(this);
|
||||
instance->name = "Cursor";
|
||||
instance->setButtonListener(msl);
|
||||
|
||||
instance = makeImageButton(Texture::fromFile(GetFileInPath("/content/images/ScaleTool.png")),Texture::fromFile(GetFileInPath("/content/images/ScaleTool_ovr.png")),Texture::fromFile(GetFileInPath("/content/images/ScaleTool_dn.png")),Texture::fromFile(GetFileInPath("/content/images/ScaleTool_ds.png")));
|
||||
instance->size = Vector2(40,40);
|
||||
instance->position = Vector2(0, 140);
|
||||
instance->setParent(this);
|
||||
instance->name = "Resize";
|
||||
instance->setButtonListener(msl);
|
||||
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/MoveTool.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/MoveTool_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/MoveTool_dn.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/MoveTool_ds.png")));
|
||||
instance->size = Vector2(40,40);
|
||||
instance->position = Vector2(40, 140);
|
||||
instance->setParent(this);
|
||||
instance->name = "Arrows";
|
||||
instance->setButtonListener(msl);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/SelectionRotate.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/SelectionRotate_ovr.png")),
|
||||
NULL,
|
||||
Texture::fromFile(GetFileInPath("/content/images/SelectionRotate_ds.png")));
|
||||
instance->size = Vector2(30,30);
|
||||
instance->position = Vector2(10, 175);
|
||||
instance->setParent(this);
|
||||
instance->name = "Rotate";
|
||||
instance->setButtonListener(rbl);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/SelectionTilt.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/SelectionTilt_ovr.png")),
|
||||
NULL,
|
||||
Texture::fromFile(GetFileInPath("/content/images/SelectionTilt_ds.png")));
|
||||
instance->size = Vector2(30,30);
|
||||
instance->position = Vector2(40, 175);
|
||||
instance->setParent(this);
|
||||
instance->name = "Tilt";
|
||||
instance->setButtonListener(rbl);
|
||||
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/Delete.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Delete_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Delete_dn.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/Delete_ds.png")));
|
||||
instance->size = Vector2(40,46);
|
||||
instance->position = Vector2(20, 284);
|
||||
instance->setParent(this);
|
||||
instance->name = "Delete";
|
||||
instance->setButtonListener(delet);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraZoomIn.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraZoomIn_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraZoomIn_dn.png")));
|
||||
instance->size = Vector2(34,25);
|
||||
instance->floatBottom = true;
|
||||
instance->floatRight = true;
|
||||
instance->position = Vector2(-77, -90);
|
||||
instance->setParent(this);
|
||||
instance->name = "ZoomIn";
|
||||
instance->setButtonListener(cam);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraZoomOut.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraZoomOut_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraZoomOut_dn.png")));
|
||||
instance->size = Vector2(34,26);
|
||||
instance->floatBottom = true;
|
||||
instance->floatRight = true;
|
||||
instance->position = Vector2(-77, -31);
|
||||
instance->setParent(this);
|
||||
instance->name = "ZoomOut";
|
||||
instance->setButtonListener(cam);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraPanLeft.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraPanLeft_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraPanLeft_dn.png")));
|
||||
instance->size = Vector2(34,34);
|
||||
instance->floatBottom = true;
|
||||
instance->floatRight = true;
|
||||
instance->position = Vector2(-110, -50);
|
||||
instance->setParent(this);
|
||||
instance->name = "PanLeft";
|
||||
instance->setButtonListener(cam);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraPanRight.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraPanRight_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraPanRight_dn.png")));
|
||||
instance->size = Vector2(34,34);
|
||||
instance->floatBottom = true;
|
||||
instance->floatRight = true;
|
||||
instance->position = Vector2(-45, -50);
|
||||
instance->setParent(this);
|
||||
instance->name = "PanRight";
|
||||
instance->setButtonListener(cam);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraCenter.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraCenter_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraCenter_dn.png")));
|
||||
instance->size = Vector2(34,20);
|
||||
instance->floatBottom = true;
|
||||
instance->floatRight = true;
|
||||
instance->position = Vector2(-77, -60);
|
||||
instance->setParent(this);
|
||||
instance->name = "CenterCam";
|
||||
instance->setButtonListener(cam);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraTiltUp.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraTiltUp_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraTiltUp_dn.png")));
|
||||
instance->size = Vector2(24,24);
|
||||
instance->floatBottom = true;
|
||||
instance->floatRight = true;
|
||||
instance->position = Vector2(-105, -75);
|
||||
instance->setParent(this);
|
||||
instance->name = "TiltUp";
|
||||
instance->setButtonListener(cam);
|
||||
|
||||
instance = makeImageButton(
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraTiltDown.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraTiltDown_ovr.png")),
|
||||
Texture::fromFile(GetFileInPath("/content/images/CameraTiltDown_dn.png")));
|
||||
instance->size = Vector2(24,24);
|
||||
instance->floatBottom = true;
|
||||
instance->floatRight = true;
|
||||
instance->position = Vector2(-40, -75);
|
||||
instance->setParent(this);
|
||||
instance->name = "TiltDown";
|
||||
instance->setButtonListener(cam);
|
||||
}
|
||||
|
||||
|
||||
void GuiRootInstance::drawButtons(RenderDevice* rd)
|
||||
{
|
||||
rd->pushState();
|
||||
rd->beforePrimitive();
|
||||
//this->render(rd);
|
||||
rd->afterPrimitive();
|
||||
rd->popState();
|
||||
}
|
||||
|
||||
void GuiRootInstance::setDebugMessage(std::string msg, G3D::RealTime msgTime)
|
||||
{
|
||||
_messageTime = msgTime;
|
||||
_message = msg;
|
||||
}
|
||||
|
||||
//void GuiRootInstance::render(G3D::RenderDevice* renderDevice) {}
|
||||
|
||||
void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
|
||||
{
|
||||
//TODO--Move these to their own instance
|
||||
|
||||
std::stringstream stream;
|
||||
stream << std::fixed << std::setprecision(1) << g_dataModel->getLevel()->timer;
|
||||
g_fntdominant->draw2D(rd, "Timer: " + stream.str(), Vector2(rd->getWidth() - 120, 25), 20, Color3::fromARGB(0x81C518), Color3::black());
|
||||
g_fntdominant->draw2D(rd, "Score: " + Convert(g_dataModel->getLevel()->score), Vector2(rd->getWidth() - 120, 50), 20, Color3::fromARGB(0x81C518), Color3::black());
|
||||
//FPS
|
||||
#ifdef _DEBUG
|
||||
stream.str("");
|
||||
stream.clear();
|
||||
stream << std::fixed << std::setprecision(3) << fps;
|
||||
g_fntdominant->draw2D(rd, "FPS: " + stream.str(), Vector2(120, 25), 10, Color3::fromARGB(0xFFFF00), Color3::black());
|
||||
#endif
|
||||
//GUI Boxes
|
||||
Draw::box(G3D::Box(Vector3(0,25,0),Vector3(80,355,0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
Draw::box(G3D::Box(Vector3(rd->getWidth() - 120,rd->getHeight() - 117,0),Vector3(rd->getWidth(),rd->getHeight(),0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0,0,0,0));
|
||||
|
||||
//Camera menu title
|
||||
g_fntlighttrek->draw2D(rd, "CameraMenu", Vector2(rd->getWidth()-(g_fntlighttrek->get2DStringBounds("CameraMenu", 14).x+1),rd->getHeight() - 120), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F));
|
||||
|
||||
//Tools menu
|
||||
Draw::box(G3D::Box(Vector3(5, 210,0),Vector3(75, 210,0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0.6F,0.6F,0.6F,0.4F));
|
||||
g_fntlighttrek->draw2D(rd,"MENU", Vector2(10,332), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F));
|
||||
|
||||
|
||||
//drawButtons(rd);
|
||||
if(System::time() - 3 < _messageTime)
|
||||
{
|
||||
g_fntdominant->draw2D(rd, _message, Vector2((rd->getWidth()/2)-(g_fntdominant->get2DStringBounds(_message, 20).x/2),(rd->getHeight()/2)-(g_fntdominant->get2DStringBounds(_message, 20).y/2)), 20, Color3::yellow(), Color3::black());
|
||||
}
|
||||
|
||||
g_dataModel->drawMessage(rd);
|
||||
render(rd);
|
||||
}
|
||||
|
||||
bool GuiRootInstance::mouseInGUI(G3D::RenderDevice* renderDevice,int x,int y)
|
||||
{
|
||||
std::vector<Instance*> instances_2D = g_dataModel->getGuiRoot()->getAllChildren();
|
||||
for(size_t i = 0; i < instances_2D.size(); i++)
|
||||
{
|
||||
if(BaseButtonInstance* button = dynamic_cast<BaseButtonInstance*>(instances_2D.at(i)))
|
||||
{
|
||||
if(button->mouseInButton(x,y, renderDevice))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//Oh eww...
|
||||
void GuiRootInstance::update()
|
||||
{
|
||||
Instance * obj6 = this->findFirstChild("Delete");
|
||||
Instance * obj = this->findFirstChild("Duplicate");
|
||||
Instance * obj2 = this->findFirstChild("Group");
|
||||
Instance * obj3 = this->findFirstChild("UnGroup");
|
||||
Instance * obj4 = this->findFirstChild("Rotate");
|
||||
Instance * obj5 = this->findFirstChild("Tilt");
|
||||
if(obj != NULL && obj2 != NULL && obj3 != NULL && obj4 !=NULL && obj5 != NULL && obj6 != NULL)
|
||||
{
|
||||
BaseButtonInstance* button = (BaseButtonInstance*)obj;
|
||||
BaseButtonInstance* button2 = (BaseButtonInstance*)obj2;
|
||||
BaseButtonInstance* button3 = (BaseButtonInstance*)obj3;
|
||||
BaseButtonInstance* button4 = (BaseButtonInstance*)obj4;
|
||||
BaseButtonInstance* button5 = (BaseButtonInstance*)obj5;
|
||||
BaseButtonInstance* button6 = (BaseButtonInstance*)obj6;
|
||||
button->disabled = true;
|
||||
button2->disabled = true;
|
||||
button3->disabled = true;
|
||||
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)
|
||||
{
|
||||
button->disabled = false;
|
||||
button2->disabled = false;
|
||||
button3->disabled = false;
|
||||
button4->disabled = false;
|
||||
button5->disabled = false;
|
||||
button6->disabled = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GuiRootInstance::~GuiRootInstance()
|
||||
{
|
||||
}
|
||||
|
||||
void GuiRootInstance::onMouseLeftUp(G3D::RenderDevice* renderDevice, int x,int y)
|
||||
{
|
||||
std::vector<Instance*> instances_2D = this->getAllChildren();
|
||||
for(size_t i = 0; i < instances_2D.size(); i++)
|
||||
{
|
||||
if(BaseButtonInstance* button = dynamic_cast<BaseButtonInstance*>(instances_2D[i]))
|
||||
{
|
||||
if(button->mouseInButton(x, y, renderDevice))
|
||||
{
|
||||
button->onMouseClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
132
src/source/DataModelV2/ImageButtonInstance.cpp
Normal file
132
src/source/DataModelV2/ImageButtonInstance.cpp
Normal file
@@ -0,0 +1,132 @@
|
||||
#include "DataModelV2/ImageButtonInstance.h"
|
||||
|
||||
ImageButtonInstance::ImageButtonInstance(G3D::TextureRef newImage, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL)
|
||||
{
|
||||
BaseButtonInstance::BaseButtonInstance();
|
||||
image = newImage;
|
||||
openGLID = image->getOpenGLID();
|
||||
image_ovr = overImage;
|
||||
if(!image_ovr.isNull())
|
||||
openGLID_ovr = image_ovr->getOpenGLID();
|
||||
image_dn = downImage;
|
||||
if(!image_dn.isNull())
|
||||
openGLID_dn = image_dn->getOpenGLID();
|
||||
image_ds = disableImage;
|
||||
if(!image_ds.isNull())
|
||||
openGLID_ds = image_ds->getOpenGLID();
|
||||
Vector2 size = Vector2(0,0);
|
||||
Vector2 position = Vector2(0,0);
|
||||
floatCenter = false;
|
||||
floatBottom = false;
|
||||
floatRight = false;
|
||||
disabled = false;
|
||||
className = "ImageButton";
|
||||
}
|
||||
|
||||
ImageButtonInstance::~ImageButtonInstance(void)
|
||||
{
|
||||
//Delete everything on destruction
|
||||
image.~ReferenceCountedPointer();
|
||||
delete image.getPointer();
|
||||
image_ovr.~ReferenceCountedPointer();
|
||||
delete image_ovr.getPointer();
|
||||
image_ds.~ReferenceCountedPointer();
|
||||
delete image_ds.getPointer();
|
||||
image_dn.~ReferenceCountedPointer();
|
||||
delete image_dn.getPointer();
|
||||
image = NULL;
|
||||
image_ovr = NULL;
|
||||
image_ds = NULL;
|
||||
image_dn = NULL;
|
||||
listener = NULL;
|
||||
selected = false;
|
||||
}
|
||||
|
||||
bool ImageButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd)
|
||||
{
|
||||
Vector2 positionRelative = position;
|
||||
if(floatRight && floatBottom)
|
||||
{
|
||||
positionRelative = Vector2(rd->getWidth() + position.x, rd->getHeight() + position.y);
|
||||
}
|
||||
else if(floatBottom)
|
||||
{
|
||||
positionRelative = Vector2(position.x, rd->getHeight() + position.y);
|
||||
}
|
||||
else if(floatRight)
|
||||
{
|
||||
positionRelative = Vector2(rd->getWidth() + position.x, position.y);
|
||||
}
|
||||
if(mousex >= positionRelative.x && mousey >= positionRelative.y)
|
||||
{
|
||||
if(mousex < positionRelative.x + size.x && mousey < positionRelative.y + size.y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ImageButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown)
|
||||
{
|
||||
bool drawDisabledBox = false;
|
||||
Vector2 positionRelative = position;
|
||||
if(floatRight && floatBottom)
|
||||
{
|
||||
positionRelative = Vector2(rd->getWidth() + position.x, rd->getHeight() + position.y);
|
||||
}
|
||||
else if(floatBottom)
|
||||
{
|
||||
positionRelative = Vector2(position.x, rd->getHeight() + position.y);
|
||||
}
|
||||
else if(floatRight)
|
||||
{
|
||||
positionRelative = Vector2(rd->getWidth() + position.x, position.y);
|
||||
}
|
||||
int renderimage = openGLID;
|
||||
if(selected == true && !image_dn.isNull() && !disabled)
|
||||
{
|
||||
renderimage = openGLID_dn;
|
||||
}
|
||||
else if(disabled)
|
||||
{
|
||||
if(!image_ds.isNull())
|
||||
renderimage = openGLID_ds;
|
||||
else
|
||||
drawDisabledBox = true;
|
||||
}
|
||||
else if(mouseInArea(positionRelative.x, positionRelative.y, positionRelative.x + size.x, positionRelative.y + size.y, mousePos.x, mousePos.y))
|
||||
{
|
||||
if(mouseDown && !image_dn.isNull())
|
||||
{
|
||||
renderimage = openGLID_dn;
|
||||
}
|
||||
else if(!image_ovr.isNull())
|
||||
{
|
||||
renderimage = openGLID_ovr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glEnable(GL_BLEND);// you enable blending function
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBindTexture( GL_TEXTURE_2D, renderimage);
|
||||
glBegin( GL_QUADS );
|
||||
glTexCoord2d(0.0,0.0);
|
||||
glVertex2f( positionRelative.x, positionRelative.y );
|
||||
glTexCoord2d( 1.0,0.0 );
|
||||
glVertex2f( positionRelative.x + size.x, positionRelative.y );
|
||||
glTexCoord2d( 1.0,1.0 );
|
||||
glVertex2f( positionRelative.x + size.x, positionRelative.y + size.y );
|
||||
glTexCoord2d( 0.0,1.0 );
|
||||
glVertex2f( positionRelative.x, positionRelative.y + size.y );
|
||||
glEnd();
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
|
||||
if(drawDisabledBox)
|
||||
{
|
||||
Draw::box(Box(Vector3(positionRelative.x, positionRelative.y, 0), Vector3(positionRelative.x+size.x, positionRelative.y+size.y, 0)), rd, Color4(0.7F,0.7F,0.7F,0.3F), Color4::clear());
|
||||
}
|
||||
}
|
||||
172
src/source/DataModelV2/Instance.cpp
Normal file
172
src/source/DataModelV2/Instance.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
#include <G3DAll.h>
|
||||
#include "DataModelV2/Instance.h"
|
||||
|
||||
|
||||
|
||||
Instance::Instance(void)
|
||||
{
|
||||
parent = NULL;
|
||||
name = "Default Game Instance";
|
||||
className = "BaseInstance";
|
||||
listicon = 1;
|
||||
canDelete = true;
|
||||
}
|
||||
|
||||
Instance::Instance(const Instance &oinst)
|
||||
{
|
||||
|
||||
name = oinst.name;
|
||||
className = oinst.className;
|
||||
canDelete = oinst.canDelete;
|
||||
listicon = oinst.listicon;
|
||||
//setParent(oinst.parent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Instance::render(RenderDevice* rd)
|
||||
{
|
||||
for(size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
children[i]->render(rd);
|
||||
}
|
||||
}
|
||||
|
||||
void Instance::update()
|
||||
{
|
||||
}
|
||||
|
||||
PROPGRIDITEM Instance::createPGI(LPSTR catalog, LPSTR propName, LPSTR propDesc, LPARAM curVal, INT type, TCHAR choices[])
|
||||
{
|
||||
PROPGRIDITEM pItem;
|
||||
PropGrid_ItemInit(pItem);
|
||||
pItem.lpszCatalog=catalog;
|
||||
pItem.lpszPropName=propName;
|
||||
pItem.lpszPropDesc=propDesc;
|
||||
pItem.lpCurValue=curVal;
|
||||
pItem.iItemType=type;
|
||||
if(choices != NULL)
|
||||
pItem.lpszzCmbItems = choices;
|
||||
return pItem;
|
||||
}
|
||||
|
||||
void Instance::PropUpdate(LPPROPGRIDITEM &item)
|
||||
{
|
||||
if(strcmp(item->lpszPropName, "Name") == 0)
|
||||
{
|
||||
name = (LPSTR)item->lpCurValue;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<PROPGRIDITEM> Instance::getProperties()
|
||||
{
|
||||
std::vector<PROPGRIDITEM> properties;
|
||||
|
||||
|
||||
properties.push_back(createPGI(
|
||||
"Properties",
|
||||
"Name",
|
||||
"The name of this instance",
|
||||
(LPARAM)name.c_str(),
|
||||
PIT_EDIT
|
||||
));
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Instance::~Instance(void)
|
||||
{
|
||||
for(size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
delete children.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
void Instance::setName(std::string newName)
|
||||
{
|
||||
name = newName;
|
||||
}
|
||||
|
||||
std::string Instance::getClassName()
|
||||
{
|
||||
return className;
|
||||
}
|
||||
|
||||
std::vector<Instance* > Instance::getChildren()
|
||||
{
|
||||
return children;
|
||||
}
|
||||
|
||||
std::vector<Instance* > Instance::getAllChildren()
|
||||
{
|
||||
if(!children.empty())
|
||||
{
|
||||
std::vector<Instance* > totalchildren = children;
|
||||
for(size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
std::vector<Instance* > subchildren = children.at(i)->getAllChildren();
|
||||
if(!subchildren.empty())
|
||||
totalchildren.insert(totalchildren.end(), subchildren.begin(), subchildren.end());
|
||||
}
|
||||
return totalchildren;
|
||||
}
|
||||
return children;
|
||||
}
|
||||
|
||||
void Instance::setParent(Instance* newParent)
|
||||
{
|
||||
if(parent != NULL)
|
||||
{
|
||||
parent->removeChild(this);
|
||||
}
|
||||
parent = newParent;
|
||||
if(newParent != NULL)
|
||||
{
|
||||
newParent->addChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
Instance* Instance::getParent()
|
||||
{
|
||||
return parent;
|
||||
}
|
||||
|
||||
void Instance::addChild(Instance* newChild)
|
||||
{
|
||||
children.push_back(newChild);
|
||||
}
|
||||
|
||||
void Instance::clearChildren()
|
||||
{
|
||||
for (size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
delete children.at(i);
|
||||
}
|
||||
children.clear();
|
||||
}
|
||||
void Instance::removeChild(Instance* oldChild)
|
||||
{
|
||||
for(size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
if(children.at(i) == oldChild)
|
||||
{
|
||||
children.erase(children.begin() + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Instance* Instance::findFirstChild(std::string name)
|
||||
{
|
||||
for(size_t i = 0; i < children.size(); i++)
|
||||
{
|
||||
if(children.at(i)->name.compare(name) == 0)
|
||||
{
|
||||
return children.at(i);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
73
src/source/DataModelV2/LevelInstance.cpp
Normal file
73
src/source/DataModelV2/LevelInstance.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
#include "DataModelV2/LevelInstance.h"
|
||||
|
||||
LevelInstance::LevelInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
name = "Level";
|
||||
winMessage = "You Won!";
|
||||
loseMessage = "You Lost. Try Again";
|
||||
timer = 60.0F;
|
||||
score = 0;
|
||||
canDelete = false;
|
||||
}
|
||||
|
||||
LevelInstance::~LevelInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
char timerTxt[12];
|
||||
char scoreTxt[12];
|
||||
std::vector<PROPGRIDITEM> LevelInstance::getProperties()
|
||||
{
|
||||
std::vector<PROPGRIDITEM> properties = Instance::getProperties();
|
||||
|
||||
|
||||
|
||||
properties.push_back(createPGI("Messages",
|
||||
"WinMessage",
|
||||
"The message that shows when the player wins.",
|
||||
(LPARAM)winMessage.c_str(),
|
||||
PIT_EDIT));
|
||||
properties.push_back(createPGI("Messages",
|
||||
"LoseMessage",
|
||||
"The message that shows when the player loses.",
|
||||
(LPARAM)loseMessage.c_str(),
|
||||
PIT_EDIT));
|
||||
|
||||
|
||||
sprintf_s(timerTxt, "%g", timer);
|
||||
sprintf_s(scoreTxt, "%d", score);
|
||||
properties.push_back(createPGI("Gameplay",
|
||||
"InitialTimerValue",
|
||||
"The ammount of time in seconds the player has to complete this level.\r\n\r\nPut 0 if time is limitless.",
|
||||
(LPARAM)timerTxt,
|
||||
PIT_EDIT));
|
||||
properties.push_back(createPGI("Gameplay",
|
||||
"InitialScoreValue",
|
||||
"The ammount of points the player starts with.",
|
||||
(LPARAM)scoreTxt,
|
||||
PIT_EDIT));
|
||||
return properties;
|
||||
}
|
||||
void LevelInstance::PropUpdate(LPPROPGRIDITEM &pItem)
|
||||
{
|
||||
if(strcmp(pItem->lpszPropName, "InitialTimerValue") == 0)
|
||||
{
|
||||
timer = atoi((LPSTR)pItem->lpCurValue);
|
||||
}
|
||||
if(strcmp(pItem->lpszPropName, "InitialScoreValue") == 0)
|
||||
{
|
||||
score = atof((LPSTR)pItem->lpCurValue);
|
||||
}
|
||||
if(strcmp(pItem->lpszPropName, "LoseMessage") == 0)
|
||||
{
|
||||
loseMessage = (LPSTR)pItem->lpCurValue;
|
||||
}
|
||||
if(strcmp(pItem->lpszPropName, "WinMessage") == 0)
|
||||
{
|
||||
winMessage = (LPSTR)pItem->lpCurValue;
|
||||
}
|
||||
else
|
||||
Instance::PropUpdate(pItem);
|
||||
}
|
||||
108
src/source/DataModelV2/PVInstance.cpp
Normal file
108
src/source/DataModelV2/PVInstance.cpp
Normal file
@@ -0,0 +1,108 @@
|
||||
#include "DataModelV2/PVInstance.h"
|
||||
|
||||
PVInstance::PVInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
nameShown = false;
|
||||
controllerFlagShown = true;
|
||||
className = "PVInstance";
|
||||
listicon = 0;
|
||||
controller = (Enum::Controller::Value)0;
|
||||
}
|
||||
|
||||
PVInstance::PVInstance(const PVInstance &oinst)
|
||||
{
|
||||
Instance::Instance(oinst);
|
||||
}
|
||||
|
||||
PVInstance::~PVInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
void PVInstance::postRender(RenderDevice* rd)
|
||||
{
|
||||
}
|
||||
|
||||
static TCHAR* enumStr(int controller)
|
||||
{
|
||||
switch(controller)
|
||||
{
|
||||
case Enum::Controller::None:
|
||||
return "None";
|
||||
case Enum::Controller::KeyboardLeft:
|
||||
return "KeyboardLeft";
|
||||
case Enum::Controller::KeyboardRight:
|
||||
return "KeyboardRight";
|
||||
case Enum::Controller::Joypad1:
|
||||
return "Joypad1";
|
||||
case Enum::Controller::Joypad2:
|
||||
return "Joypad2";
|
||||
case Enum::Controller::Chase:
|
||||
return "Joypad1";
|
||||
case Enum::Controller::Flee:
|
||||
return "Joypad2";
|
||||
}
|
||||
return "None";
|
||||
}
|
||||
|
||||
static Enum::Controller::Value strEnum(TCHAR * tval)
|
||||
{
|
||||
if(strcmp(tval, "KeyboardLeft") == 0)
|
||||
return Enum::Controller::KeyboardLeft;
|
||||
if(strcmp(tval, "KeyboardRight") == 0)
|
||||
return Enum::Controller::KeyboardRight;
|
||||
if(strcmp(tval, "Joypad1") == 0)
|
||||
return Enum::Controller::Joypad1;
|
||||
if(strcmp(tval, "Joypad2") == 0)
|
||||
return Enum::Controller::Joypad2;
|
||||
if(strcmp(tval, "Chase") == 0)
|
||||
return Enum::Controller::Chase;
|
||||
if(strcmp(tval, "Flee") == 0)
|
||||
return Enum::Controller::Flee;
|
||||
return Enum::Controller::None;
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::vector<PROPGRIDITEM> PVInstance::getProperties()
|
||||
{
|
||||
std::vector<PROPGRIDITEM> properties = Instance::getProperties();
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"NameShown",
|
||||
"This chooses whether the item name is shown",
|
||||
nameShown,
|
||||
PIT_CHECK));
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"ControllerFlagShown",
|
||||
"This chooses whether the item's ControllerFlag is shown",
|
||||
controllerFlagShown,
|
||||
PIT_CHECK));
|
||||
properties.push_back(createPGI(
|
||||
"Behaviour",
|
||||
"Controller",
|
||||
"This chooses what type of controller is used",
|
||||
(LPARAM)enumStr(controller),
|
||||
PIT_COMBO,
|
||||
TEXT("None\0KeyboardRight\0KeyboardLeft\0Joypad1\0Joypad2\0Chase\0Flee")
|
||||
));
|
||||
|
||||
return properties;
|
||||
}
|
||||
void PVInstance::PropUpdate(LPPROPGRIDITEM &pItem)
|
||||
{
|
||||
if(strcmp(pItem->lpszPropName, "NameShown") == 0)
|
||||
{
|
||||
nameShown = pItem->lpCurValue == TRUE;
|
||||
}
|
||||
if(strcmp(pItem->lpszPropName, "ControllerFlagShown") == 0)
|
||||
{
|
||||
controllerFlagShown = pItem->lpCurValue == TRUE;
|
||||
}
|
||||
if(strcmp(pItem->lpszPropName, "Controller") == 0)
|
||||
{
|
||||
controller = strEnum((TCHAR *)pItem->lpCurValue);
|
||||
}
|
||||
else Instance::PropUpdate(pItem);
|
||||
}
|
||||
451
src/source/DataModelV2/PartInstance.cpp
Normal file
451
src/source/DataModelV2/PartInstance.cpp
Normal file
@@ -0,0 +1,451 @@
|
||||
#include "DataModelV2/PartInstance.h"
|
||||
#include "Globals.h"
|
||||
#include "Renderer.h"
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include "Faces.h"
|
||||
|
||||
PartInstance::PartInstance(void)
|
||||
{
|
||||
PVInstance::PVInstance();
|
||||
glList = glGenLists(1);
|
||||
name = "Unnamed PVItem";
|
||||
className = "Part";
|
||||
canCollide = true;
|
||||
anchored = false;
|
||||
size = Vector3(2,1,4);
|
||||
setCFrame(CoordinateFrame(Vector3(0,0,0)));
|
||||
color = Color3::gray();
|
||||
velocity = Vector3(0,0,0);
|
||||
rotVelocity = Vector3(0,0,0);
|
||||
top = Enum::SurfaceType::Smooth;
|
||||
front = Enum::SurfaceType::Smooth;
|
||||
right = Enum::SurfaceType::Smooth;
|
||||
back = Enum::SurfaceType::Smooth;
|
||||
left = Enum::SurfaceType::Smooth;
|
||||
bottom = Enum::SurfaceType::Smooth;
|
||||
shape = Enum::Shape::Block;
|
||||
}
|
||||
|
||||
|
||||
Vector3 PartInstance::getVelocity()
|
||||
{
|
||||
return velocity;
|
||||
}
|
||||
Vector3 PartInstance::getRotVelocity()
|
||||
{
|
||||
return rotVelocity;
|
||||
}
|
||||
|
||||
void PartInstance::setVelocity(Vector3 v)
|
||||
{
|
||||
velocity = v;
|
||||
}
|
||||
void PartInstance::setRotVelocity(Vector3 v)
|
||||
{
|
||||
rotVelocity = v;
|
||||
}
|
||||
|
||||
void PartInstance::postRender(RenderDevice *rd)
|
||||
{
|
||||
if(!nameShown)
|
||||
return;
|
||||
G3D::GFontRef fnt = NULL;
|
||||
Instance* dm = parent;
|
||||
while(dm != NULL)
|
||||
{
|
||||
if(DataModelInstance* mod = dynamic_cast<DataModelInstance*>(dm))
|
||||
{
|
||||
fnt = mod->font;
|
||||
break;
|
||||
}
|
||||
dm = dm->getParent();
|
||||
}
|
||||
if(!fnt.isNull())
|
||||
{
|
||||
Vector3 gamepoint = position + Vector3(0,1.5,0);
|
||||
Vector3 camerapoint = rd->getCameraToWorldMatrix().translation;
|
||||
float distance = pow(pow((double)gamepoint.x - (double)camerapoint.x, 2) + pow((double)gamepoint.y - (double)camerapoint.y, 2) + pow((double)gamepoint.z - (double)camerapoint.z, 2), 0.5);
|
||||
if(distance < 100 && distance > -100)
|
||||
{
|
||||
if(distance < 0)
|
||||
distance = distance*-1;
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
fnt->draw3D(rd, name, CoordinateFrame(rd->getCameraToWorldMatrix().rotation, gamepoint), 0.03*distance, Color3::yellow(), Color3::black(), G3D::GFont::XALIGN_CENTER, G3D::GFont::YALIGN_CENTER);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PartInstance::setChanged()
|
||||
{
|
||||
changed = true;
|
||||
}
|
||||
|
||||
void PartInstance::setSurface(int face, Enum::SurfaceType::Value surface)
|
||||
{
|
||||
switch(face)
|
||||
{
|
||||
case TOP:
|
||||
top = surface;
|
||||
break;
|
||||
case BOTTOM:
|
||||
bottom = surface;
|
||||
break;
|
||||
case LEFT:
|
||||
left = surface;
|
||||
break;
|
||||
case RIGHT:
|
||||
right = surface;
|
||||
break;
|
||||
case FRONT:
|
||||
front = surface;
|
||||
break;
|
||||
default:
|
||||
back = surface;
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
|
||||
void PartInstance::setParent(Instance* prnt)
|
||||
{
|
||||
Instance * cparent = getParent();
|
||||
while(cparent != NULL)
|
||||
{
|
||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(cparent))
|
||||
{
|
||||
std::cout << "Removed from partarray " << std::endl;
|
||||
workspace->partObjects.erase(std::remove(workspace->partObjects.begin(), workspace->partObjects.end(), this), workspace->partObjects.end());
|
||||
break;
|
||||
}
|
||||
cparent = cparent->getParent();
|
||||
}
|
||||
Instance::setParent(prnt);
|
||||
while(parent != NULL)
|
||||
{
|
||||
if(WorkspaceInstance* workspace = dynamic_cast<WorkspaceInstance*>(parent))
|
||||
{
|
||||
workspace->partObjects.push_back(this);
|
||||
break;
|
||||
}
|
||||
parent = parent->getParent();
|
||||
}
|
||||
}
|
||||
|
||||
PartInstance::PartInstance(const PartInstance &oinst)
|
||||
{
|
||||
PVInstance::PVInstance(oinst);
|
||||
glList = glGenLists(1);
|
||||
//name = oinst.name;
|
||||
//className = "Part";
|
||||
name = oinst.name;
|
||||
canCollide = oinst.canCollide;
|
||||
setParent(oinst.parent);
|
||||
anchored = oinst.anchored;
|
||||
size = oinst.size;
|
||||
setCFrame(oinst.cFrame);
|
||||
color = oinst.color;
|
||||
velocity = oinst.velocity;
|
||||
rotVelocity = oinst.rotVelocity;
|
||||
top = oinst.top;
|
||||
front = oinst.front;
|
||||
right = oinst.right;
|
||||
back = oinst.back;
|
||||
left = oinst.left;
|
||||
bottom = oinst.bottom;
|
||||
shape = oinst.shape;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
void PartInstance::setSize(Vector3 newSize)
|
||||
{
|
||||
int minsize = 1;
|
||||
int maxsize = 512;
|
||||
changed = true;
|
||||
int sizex = (int)newSize.x;
|
||||
if(sizex <= 0)
|
||||
sizex = 1;
|
||||
if(sizex > 512)
|
||||
sizex = 512;
|
||||
|
||||
int sizey = (int)newSize.y;
|
||||
if(sizey <= 0)
|
||||
sizey = 1;
|
||||
if(sizey > 512)
|
||||
sizey = 512;
|
||||
|
||||
int sizez = (int)newSize.z;
|
||||
if(sizez <= 0)
|
||||
sizez = 1;
|
||||
if(sizez > 512)
|
||||
sizez = 512;
|
||||
|
||||
if(shape != Enum::Shape::Block)
|
||||
{
|
||||
int max = sizex;
|
||||
if(sizey > max)
|
||||
max = sizey;
|
||||
if(sizez > max)
|
||||
max = sizez;
|
||||
sizex = sizey = sizez = max;
|
||||
}
|
||||
|
||||
size = Vector3(sizex, sizey, sizez);
|
||||
|
||||
|
||||
|
||||
}
|
||||
Vector3 PartInstance::getSize()
|
||||
{
|
||||
return size;
|
||||
}
|
||||
Vector3 PartInstance::getPosition()
|
||||
{
|
||||
return position;
|
||||
}
|
||||
void PartInstance::setShape(Enum::Shape::Value shape)
|
||||
{
|
||||
switch(shape)
|
||||
{
|
||||
case Enum::Shape::Block:
|
||||
this->shape = shape;
|
||||
break;
|
||||
default:
|
||||
this->shape = shape;
|
||||
this->setSize(this->getSize());
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
|
||||
void PartInstance::setPosition(Vector3 pos)
|
||||
{
|
||||
position = pos;
|
||||
cFrame = CoordinateFrame(cFrame.rotation, pos);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
CoordinateFrame PartInstance::getCFrame()
|
||||
{
|
||||
return cFrame;
|
||||
}
|
||||
void PartInstance::setCFrame(CoordinateFrame coordinateFrame)
|
||||
{
|
||||
cFrame = coordinateFrame;
|
||||
position = coordinateFrame.translation;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
bool PartInstance::collides(PartInstance * part)
|
||||
{
|
||||
if(shape == Enum::Shape::Block)
|
||||
{
|
||||
if(part->shape == Enum::Shape::Block)
|
||||
return G3D::CollisionDetection::fixedSolidBoxIntersectsFixedSolidBox(getBox(), part->getBox());
|
||||
else
|
||||
return G3D::CollisionDetection::fixedSolidSphereIntersectsFixedSolidBox(part->getSphere(), getBox());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(part->shape == Enum::Shape::Block)
|
||||
return G3D::CollisionDetection::fixedSolidSphereIntersectsFixedSolidBox(getSphere(), part->getBox());
|
||||
else
|
||||
return G3D::CollisionDetection::fixedSolidSphereIntersectsFixedSolidSphere(getSphere(), part->getSphere());
|
||||
}
|
||||
}
|
||||
|
||||
Box PartInstance::getBox()
|
||||
{
|
||||
Box box = Box(Vector3(size.x/2, size.y/2, size.z/2) ,Vector3(-size.x/2,-size.y/2,-size.z/2));
|
||||
CoordinateFrame c = getCFrame();
|
||||
itemBox = c.toWorldSpace(box);
|
||||
return itemBox;
|
||||
}
|
||||
|
||||
Sphere PartInstance::getSphere()
|
||||
{
|
||||
Sphere sphere = Sphere(Vector3(0,0,0), size.y/2);
|
||||
CoordinateFrame c = getCFrame();
|
||||
return sphere;
|
||||
}
|
||||
|
||||
bool PartInstance::collides(Box box)
|
||||
{
|
||||
return CollisionDetection::fixedSolidBoxIntersectsFixedSolidBox(getBox(), box);
|
||||
}
|
||||
|
||||
void PartInstance::render(RenderDevice* rd) {
|
||||
if (changed)
|
||||
{
|
||||
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);
|
||||
renderSurface(RIGHT, this->right, renderSize, this->controller, color);
|
||||
renderSurface(BACK, this->back, renderSize, this->controller, color);
|
||||
renderSurface(LEFT, this->left, renderSize, this->controller, color);
|
||||
renderSurface(BOTTOM, this->bottom, renderSize, this->controller, color);
|
||||
glEndList();
|
||||
}
|
||||
rd->setObjectToWorldMatrix(cFrame);
|
||||
glCallList(glList);
|
||||
postRender(rd);
|
||||
}
|
||||
|
||||
PartInstance::~PartInstance(void)
|
||||
{
|
||||
glDeleteLists(glList, 1);
|
||||
}
|
||||
|
||||
char pto[512];
|
||||
char pto2[512];
|
||||
#include <sstream>
|
||||
|
||||
static Enum::Shape::Value strEnum(TCHAR* shape)
|
||||
{
|
||||
if(strcmp("Block", shape) == 0)
|
||||
return Enum::Shape::Block;
|
||||
if(strcmp("Cylinder", shape) == 0)
|
||||
return Enum::Shape::Cylinder;
|
||||
return Enum::Shape::Ball;
|
||||
}
|
||||
|
||||
static TCHAR* enumStr(int shape)
|
||||
{
|
||||
switch(shape)
|
||||
{
|
||||
case Enum::Shape::Block:
|
||||
return "Block";
|
||||
case Enum::Shape::Ball:
|
||||
return "Ball";
|
||||
case Enum::Shape::Cylinder:
|
||||
return "Cylinder";
|
||||
}
|
||||
return "Block";
|
||||
}
|
||||
|
||||
void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
||||
{
|
||||
setChanged();
|
||||
if(strcmp(item->lpszPropName, "Color3") == 0)
|
||||
{
|
||||
color = Color3(GetRValue(item->lpCurValue)/255.0F,GetGValue(item->lpCurValue)/255.0F,GetBValue(item->lpCurValue)/255.0F);
|
||||
}
|
||||
else if(strcmp(item->lpszPropName, "Anchored") == 0)
|
||||
{
|
||||
anchored= item->lpCurValue == TRUE;
|
||||
}
|
||||
else if(strcmp(item->lpszPropName, "Offset") == 0)
|
||||
{
|
||||
std::string str = (LPTSTR)item->lpCurValue;
|
||||
std::vector<float> vect;
|
||||
std::stringstream ss(str);
|
||||
float i;
|
||||
|
||||
while (ss >> i)
|
||||
{
|
||||
vect.push_back(i);
|
||||
|
||||
if (ss.peek() == ',')
|
||||
ss.ignore();
|
||||
}
|
||||
|
||||
//if(vect.size() != 3)
|
||||
//{
|
||||
//sprintf(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z, "what");
|
||||
//LPCSTR str = LPCSTR(pto);
|
||||
//item->lpCurValue = (LPARAM)str;
|
||||
//}
|
||||
//else
|
||||
if(vect.size() == 3)
|
||||
{
|
||||
Vector3 pos(vect.at(0),vect.at(1),vect.at(2));
|
||||
setPosition(pos);
|
||||
}
|
||||
}
|
||||
|
||||
else if(strcmp(item->lpszPropName, "Size") == 0)
|
||||
{
|
||||
std::string str = (LPTSTR)item->lpCurValue;
|
||||
std::vector<float> vect;
|
||||
std::stringstream ss(str);
|
||||
float i;
|
||||
|
||||
while (ss >> i)
|
||||
{
|
||||
vect.push_back(i);
|
||||
|
||||
if (ss.peek() == ',')
|
||||
ss.ignore();
|
||||
}
|
||||
|
||||
/*if(vect.size() != 3)
|
||||
{
|
||||
sprintf(pto, "%g, %g, %g", cFrame.translation.x, cFrame.translation.y, cFrame.translation.z, "what");
|
||||
LPCSTR str = LPCSTR(pto);
|
||||
item->lpCurValue = (LPARAM)str;
|
||||
}
|
||||
else*/
|
||||
if(vect.size() == 3)
|
||||
{
|
||||
Vector3 size(vect.at(0),vect.at(1),vect.at(2));
|
||||
setSize(size);
|
||||
}
|
||||
}
|
||||
else if(strcmp(item->lpszPropName, "Shape") == 0)
|
||||
{
|
||||
printf("%s", enumStr(strEnum((TCHAR*)item->lpCurValue)));
|
||||
setShape(strEnum((TCHAR*)item->lpCurValue));
|
||||
}
|
||||
else PVInstance::PropUpdate(item);
|
||||
}
|
||||
|
||||
std::vector<PROPGRIDITEM> PartInstance::getProperties()
|
||||
{
|
||||
std::vector<PROPGRIDITEM> properties = PVInstance::getProperties();
|
||||
|
||||
|
||||
properties.push_back(createPGI(
|
||||
"Properties",
|
||||
"Color3",
|
||||
"The color of the selected part",
|
||||
RGB((color.r*255),(color.g*255),(color.b*255)),
|
||||
PIT_COLOR
|
||||
));
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"Anchored",
|
||||
"Whether the block can move or not",
|
||||
(LPARAM)anchored,
|
||||
PIT_CHECK
|
||||
));
|
||||
sprintf_s(pto, "%g, %g, %g", position.x, position.y, position.z);
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"Offset",
|
||||
"The position of the object in the workspace",
|
||||
(LPARAM)pto,
|
||||
PIT_EDIT
|
||||
));
|
||||
sprintf_s(pto2, "%g, %g, %g", size.x, size.y, size.z);
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"Size",
|
||||
"The position of the object in the workspace",
|
||||
(LPARAM)pto2,
|
||||
PIT_EDIT
|
||||
));
|
||||
properties.push_back(createPGI(
|
||||
"Item",
|
||||
"Shape",
|
||||
"The shape of the object in the workspace",
|
||||
(LPARAM)enumStr(shape),
|
||||
PIT_COMBO,
|
||||
TEXT("Ball\0Block\0Cylinder\0")
|
||||
));
|
||||
return properties;
|
||||
}
|
||||
|
||||
|
||||
117
src/source/DataModelV2/TextButtonInstance.cpp
Normal file
117
src/source/DataModelV2/TextButtonInstance.cpp
Normal file
@@ -0,0 +1,117 @@
|
||||
#include "DataModelV2/TextButtonInstance.h"
|
||||
|
||||
|
||||
TextButtonInstance::TextButtonInstance(void)
|
||||
{
|
||||
BaseButtonInstance::BaseButtonInstance();
|
||||
boxBegin = Vector2(0,0);
|
||||
boxEnd = Vector2(0,0);
|
||||
fontLocationRelativeTo = Vector2(0,0);
|
||||
centeredWithinBox = false;
|
||||
title = "TextBox";
|
||||
textColor = Color4(1, 1, 1, 1);
|
||||
textOutlineColor = Color4(0, 0, 0, 0);
|
||||
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
|
||||
boxOutlineColor = Color4(0, 0, 0, 0);
|
||||
setAllColorsSame();
|
||||
textSize = 12;
|
||||
floatBottom = false;
|
||||
floatRight = false;
|
||||
floatCenter = false;
|
||||
visible = true;
|
||||
className = "TextButton";
|
||||
disabled = false;
|
||||
selected = false;
|
||||
}
|
||||
|
||||
bool TextButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd)
|
||||
{
|
||||
Vector3 point1;
|
||||
Vector3 point2;
|
||||
if(floatBottom)
|
||||
{
|
||||
point1 = Vector3(boxBegin.x, rd->getHeight() + boxBegin.y,0);
|
||||
point2 = Vector3(boxEnd.x, rd->getHeight() + boxEnd.y,0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
point1 = Vector3(boxBegin.x, boxBegin.y,0);
|
||||
point2 = Vector3(boxEnd.x, boxEnd.y,0);
|
||||
}
|
||||
if(mousex >= point1.x && mousey >= point1.y)
|
||||
{
|
||||
if(mousex < point2.x && mousey < point2.y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void TextButtonInstance::setAllColorsSame()
|
||||
{
|
||||
textColorOvr = textColor;
|
||||
textOutlineColorOvr = textOutlineColor;
|
||||
boxColorOvr = boxColor;
|
||||
boxOutlineColorOvr = boxOutlineColor;
|
||||
textColorDn = textColor;
|
||||
textOutlineColorDn = textOutlineColor;
|
||||
boxColorDn = boxColor;
|
||||
boxOutlineColorDn = boxOutlineColor;
|
||||
textColorDis = textColor;
|
||||
textOutlineColorDis = textOutlineColor;
|
||||
boxColorDis = boxColor;
|
||||
boxOutlineColorDis = boxOutlineColor;
|
||||
}
|
||||
|
||||
TextButtonInstance::~TextButtonInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
void TextButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown)
|
||||
{
|
||||
Vector3 point1;
|
||||
Vector3 point2;
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
|
||||
if(floatBottom)
|
||||
{
|
||||
point1 = Vector3(boxBegin.x, rd->getHeight() + boxBegin.y,0);
|
||||
point2 = Vector3(boxEnd.x, rd->getHeight() + boxEnd.y,0);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
point1 = Vector3(boxBegin.x, boxBegin.y,0);
|
||||
point2 = Vector3(boxEnd.x, boxEnd.y,0);
|
||||
}
|
||||
Vector2 RelativeTo = Vector2(point1.x + fontLocationRelativeTo.x, point1.y + fontLocationRelativeTo.y);
|
||||
if(disabled)
|
||||
{
|
||||
Draw::box(Box(point1, point2), rd, boxColorDis, boxOutlineColorDis);
|
||||
font->draw2D(rd, title, RelativeTo, textSize, textColorDis, textOutlineColorDis);
|
||||
}
|
||||
else if(mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y) && mouseDown)
|
||||
{
|
||||
Draw::box(Box(point1, point2), rd, boxColorDn, boxOutlineColorDn);
|
||||
font->draw2D(rd, title, RelativeTo, textSize, textColorDn, textOutlineColorDn);
|
||||
}
|
||||
else if(selected || mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y))
|
||||
{
|
||||
Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr);
|
||||
font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr);
|
||||
}
|
||||
else
|
||||
{
|
||||
Draw::box(Box(point1, point2), rd, boxColor, boxOutlineColor);
|
||||
font->draw2D(rd, title, RelativeTo, textSize, textColor, textOutlineColor);
|
||||
}
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
}
|
||||
|
||||
void doNullCheck()
|
||||
{
|
||||
}
|
||||
138
src/source/DataModelV2/ToggleImageButtonInstance.cpp
Normal file
138
src/source/DataModelV2/ToggleImageButtonInstance.cpp
Normal file
@@ -0,0 +1,138 @@
|
||||
#include "DataModelV2/ToggleImageButtonInstance.h"
|
||||
|
||||
ToggleImageButtonInstance::ToggleImageButtonInstance(G3D::TextureRef newImage,
|
||||
G3D::TextureRef overImage,
|
||||
G3D::TextureRef downImage,
|
||||
G3D::TextureRef disableImage,
|
||||
G3D::TextureRef newImage2,
|
||||
G3D::TextureRef overImage2,
|
||||
G3D::TextureRef downImage2,
|
||||
G3D::TextureRef disableImage2) : ImageButtonInstance(newImage, overImage, downImage, disableImage)
|
||||
{
|
||||
image2 = newImage2;
|
||||
openGLID2 = image2->getOpenGLID();
|
||||
image_ovr2 = overImage2;
|
||||
if(!image_ovr2.isNull())
|
||||
openGLID2_ovr = image_ovr2->getOpenGLID();
|
||||
image_dn2 = downImage2;
|
||||
if(!image_dn2.isNull())
|
||||
openGLID2_dn = image_dn2->getOpenGLID();
|
||||
image_ds2 = disableImage2;
|
||||
if(!image_ds2.isNull())
|
||||
openGLID2_ds = image_ds2->getOpenGLID();
|
||||
checked = false;
|
||||
className = "ToggleImageButton";
|
||||
}
|
||||
|
||||
ToggleImageButtonInstance::~ToggleImageButtonInstance(void)
|
||||
{
|
||||
//Delete everything on destruction
|
||||
image2.~ReferenceCountedPointer();
|
||||
delete image2.getPointer();
|
||||
image_ovr2.~ReferenceCountedPointer();
|
||||
delete image_ovr2.getPointer();
|
||||
image_ds2.~ReferenceCountedPointer();
|
||||
delete image_ds2.getPointer();
|
||||
image_dn2.~ReferenceCountedPointer();
|
||||
delete image_dn2.getPointer();
|
||||
image = NULL;
|
||||
image_ovr = NULL;
|
||||
image_ds = NULL;
|
||||
image_dn = NULL;
|
||||
listener = NULL;
|
||||
selected = false;
|
||||
}
|
||||
|
||||
|
||||
void ToggleImageButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown)
|
||||
{
|
||||
bool drawDisabledBox = false;
|
||||
Vector2 positionRelative = position;
|
||||
if(floatRight && floatBottom)
|
||||
{
|
||||
positionRelative = Vector2(rd->getWidth() + position.x, rd->getHeight() + position.y);
|
||||
}
|
||||
else if(floatBottom)
|
||||
{
|
||||
positionRelative = Vector2(position.x, rd->getHeight() + position.y);
|
||||
}
|
||||
else if(floatRight)
|
||||
{
|
||||
positionRelative = Vector2(rd->getWidth() + position.x, position.y);
|
||||
}
|
||||
int renderimage = openGLID;
|
||||
if(checked)
|
||||
{
|
||||
renderimage = openGLID2;
|
||||
if(selected == true && !image_dn2.isNull() && !disabled)
|
||||
{
|
||||
renderimage = openGLID2_dn;
|
||||
}
|
||||
else if(disabled)
|
||||
{
|
||||
if(!image_ds2.isNull())
|
||||
renderimage = openGLID2_ds;
|
||||
else
|
||||
drawDisabledBox = true;
|
||||
}
|
||||
else if(mouseInArea(positionRelative.x, positionRelative.y, positionRelative.x + size.x, positionRelative.y + size.y, mousePos.x, mousePos.y))
|
||||
{
|
||||
if(mouseDown && !image_dn2.isNull())
|
||||
{
|
||||
renderimage = openGLID2_dn;
|
||||
}
|
||||
else if(!image_ovr2.isNull())
|
||||
{
|
||||
renderimage = openGLID2_ovr;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(selected == true && !image_dn.isNull() && !disabled)
|
||||
{
|
||||
renderimage = openGLID_dn;
|
||||
}
|
||||
else if(disabled)
|
||||
{
|
||||
if(!image_ds.isNull())
|
||||
renderimage = openGLID_ds;
|
||||
else
|
||||
drawDisabledBox = true;
|
||||
}
|
||||
else if(mouseInArea(positionRelative.x, positionRelative.y, positionRelative.x + size.x, positionRelative.y + size.y, mousePos.x, mousePos.y))
|
||||
{
|
||||
if(mouseDown && !image_dn.isNull())
|
||||
{
|
||||
renderimage = openGLID_dn;
|
||||
}
|
||||
else if(!image_ovr.isNull())
|
||||
{
|
||||
renderimage = openGLID_ovr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glEnable(GL_BLEND);// you enable blending function
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBindTexture( GL_TEXTURE_2D, renderimage);
|
||||
glBegin( GL_QUADS );
|
||||
glTexCoord2d(0.0,0.0);
|
||||
glVertex2f( positionRelative.x, positionRelative.y );
|
||||
glTexCoord2d( 1.0,0.0 );
|
||||
glVertex2f( positionRelative.x + size.x, positionRelative.y );
|
||||
glTexCoord2d( 1.0,1.0 );
|
||||
glVertex2f( positionRelative.x + size.x, positionRelative.y + size.y );
|
||||
glTexCoord2d( 0.0,1.0 );
|
||||
glVertex2f( positionRelative.x, positionRelative.y + size.y );
|
||||
glEnd();
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
|
||||
if(drawDisabledBox)
|
||||
{
|
||||
Draw::box(Box(Vector3(positionRelative.x, positionRelative.y, 0), Vector3(positionRelative.x+size.x, positionRelative.y+size.y, 0)), rd, Color4(0.7F,0.7F,0.7F,0.3F), Color4::clear());
|
||||
}
|
||||
}
|
||||
20
src/source/DataModelV2/WorkspaceInstance.cpp
Normal file
20
src/source/DataModelV2/WorkspaceInstance.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "DataModelV2/WorkspaceInstance.h"
|
||||
|
||||
|
||||
WorkspaceInstance::WorkspaceInstance(void)
|
||||
{
|
||||
GroupInstance::GroupInstance();
|
||||
name = "Workspace";
|
||||
className = "Workspace";
|
||||
canDelete = false;
|
||||
}
|
||||
|
||||
void WorkspaceInstance::clearChildren()
|
||||
{
|
||||
partObjects.clear();
|
||||
Instance::clearChildren();
|
||||
}
|
||||
|
||||
WorkspaceInstance::~WorkspaceInstance(void)
|
||||
{
|
||||
}
|
||||
@@ -3,12 +3,13 @@
|
||||
#include "Globals.h"
|
||||
|
||||
|
||||
|
||||
void OnError(int err, std::string msg)
|
||||
{
|
||||
//g_usableApp->window()->setInputCaptureCount(0);
|
||||
//g_usableApp->window()->setMouseVisible(true);
|
||||
std::string emsg = "An unexpected error has occured and "+g_PlaceholderName+" has to quit. We're sorry!" + msg;
|
||||
std::string title = g_PlaceholderName+"Crash";
|
||||
std::string emsg = "An unexpected error has occured and "+g_appName+" has to quit. We're sorry!" + msg;
|
||||
std::string title = g_appName+" Crash";
|
||||
//clearInstances();
|
||||
MessageBox(NULL, emsg.c_str(), title.c_str(), MB_OK);
|
||||
exit(err);
|
||||
@@ -17,13 +18,13 @@ void OnError(int err, std::string msg)
|
||||
|
||||
void MessageBoxStr(std::string msg)
|
||||
{
|
||||
std::string title = g_PlaceholderName;
|
||||
std::string title = g_appName;
|
||||
MessageBox(NULL, msg.c_str(), title.c_str(), MB_OK);
|
||||
}
|
||||
|
||||
void MessageBoxStream(std::stringstream msg)
|
||||
{
|
||||
std::string strMsg = msg.str();
|
||||
std::string title = g_PlaceholderName;
|
||||
std::string title = g_appName;
|
||||
MessageBox(NULL, strMsg.c_str(), title.c_str(), MB_OK);
|
||||
}
|
||||
@@ -6,7 +6,7 @@ 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::showMouse = true;
|
||||
bool Globals::useMousePoint = false;
|
||||
std::vector<Instance*> postRenderStack = std::vector<Instance*>();
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "Globals.h"
|
||||
#pragma once
|
||||
#include "ax.h"
|
||||
#include "Tool/SurfaceTool.h"
|
||||
#include "Application.h"
|
||||
|
||||
HRESULT IEBrowser::doExternal(std::wstring funcName,
|
||||
DISPID dispIdMember,
|
||||
@@ -53,6 +55,28 @@ HRESULT IEBrowser::doExternal(std::wstring funcName,
|
||||
AudioPlayer::playSound(dingSound);
|
||||
return S_OK;
|
||||
}
|
||||
else if(funcName==L"SetSurface")
|
||||
{
|
||||
if(pDispParams->cArgs < 2)
|
||||
return E_NOTIMPL;
|
||||
int j = pDispParams->rgvarg->intVal;
|
||||
int i = (pDispParams->rgvarg+1)->intVal;
|
||||
//printf("Got values %d and %d", i, j);
|
||||
if(i > 5 || i < 0)
|
||||
return E_NOTIMPL;
|
||||
g_usableApp->changeTool(new SurfaceTool(i, j));
|
||||
/*VARIANT val1;
|
||||
VARIANT val2;
|
||||
unsigned int puArgErr;
|
||||
HRESULT res = DispGetParam(pDispParams,1,VT_VARIANT,&val1, &puArgErr);
|
||||
if(res != S_OK)
|
||||
return res;
|
||||
//res = DispGetParam(pDispParams,1,VT_UI4,&val2, &puArgErr);
|
||||
//if(res != S_OK)
|
||||
//return res;
|
||||
*/
|
||||
return S_OK;
|
||||
}
|
||||
else if(funcName==L"SetColor")
|
||||
{
|
||||
|
||||
@@ -123,7 +147,7 @@ bool IEBrowser::navigateSyncURL(wchar_t* url)
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL,"Cannot read IWebBrowser2...",(g_PlaceholderName+" Crash").c_str(),MB_OK);
|
||||
MessageBox(NULL,"Cannot read IWebBrowser2...",(g_appName+" Crash").c_str(),MB_OK);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "DataModel/BaseButtonInstance.h"
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
#include "Listener/ButtonListener.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "Listener/MenuButtonListener.h"
|
||||
#include "DataModel/ToggleImageButtonInstance.h"
|
||||
#include "DataModelV2/ToggleImageButtonInstance.h"
|
||||
#include "Application.h"
|
||||
#include "Globals.h"
|
||||
void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "Globals.h"
|
||||
#include "DataModel/Instance.h"
|
||||
#include "DataModelV2/Instance.h"
|
||||
#include "Listener/ModeSelectionListener.h"
|
||||
#include "Application.h"
|
||||
#include "Tool/ArrowTool.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "DataModel/BaseButtonInstance.h"
|
||||
#include "DataModelV2/BaseButtonInstance.h"
|
||||
#include "Listener/RotateButtonListener.h"
|
||||
#include "Globals.h"
|
||||
#include "AudioPlayer.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Mouse.h"
|
||||
#include "Application.h"
|
||||
#include "Globals.h"
|
||||
#include <math.h>
|
||||
|
||||
Mouse::Mouse(){
|
||||
x = y = 0;
|
||||
@@ -34,6 +35,16 @@ PartInstance * Mouse::getTarget()
|
||||
return selectedInstance;
|
||||
}
|
||||
|
||||
G3D::Ray * Mouse::getRay()
|
||||
{
|
||||
return &g_usableApp->cameraController.getCamera()->worldRay(x, y, g_usableApp->getRenderDevice()->getViewport());
|
||||
}
|
||||
|
||||
G3D::Ray Mouse::getLastRay()
|
||||
{
|
||||
return testRay;
|
||||
}
|
||||
|
||||
|
||||
double getVectorDistance(Vector3 vector1, Vector3 vector2)
|
||||
{
|
||||
@@ -62,6 +73,22 @@ MousePoint Mouse::getPositionAndPart(std::vector<Instance *> ignore)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// A scuffed fix for moving
|
||||
if(currPart == NULL) {
|
||||
if(PartInstance * part = dynamic_cast<PartInstance *>(ignore[0]))
|
||||
{
|
||||
return MousePoint(part->getPosition(), part);
|
||||
}
|
||||
return MousePoint(pos, currPart);
|
||||
}
|
||||
|
||||
// A crude implementation of stud snapping
|
||||
Vector3 pSz = currPart->getSize();
|
||||
pos.x = (ceil(pos.x / 1) * 1);
|
||||
pos.y = (ceil(pos.y / 1) * 1);
|
||||
pos.z = (ceil(pos.z / 1) * 1);
|
||||
|
||||
return MousePoint(pos, currPart);
|
||||
}
|
||||
|
||||
|
||||
5
src/source/Properties/BoolProperty.cpp
Normal file
5
src/source/Properties/BoolProperty.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
//#include "Properties/BoolProperty.h"
|
||||
//PROPGRIDITEM BoolProperty::getPropGridItem()
|
||||
//{
|
||||
//return PROPGRIDITEM();
|
||||
//}
|
||||
7
src/source/Properties/Property.cpp
Normal file
7
src/source/Properties/Property.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
#include "Properties/Property.h"
|
||||
|
||||
template <typename T>
|
||||
void Property<T>::setProperty(LPPROPGRIDITEM item)
|
||||
{
|
||||
_owner->propertiesChanged();
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#define _WINSOCKAPI_
|
||||
#include <windows.h>
|
||||
#include "WindowFunctions.h"
|
||||
#include "resource.h"
|
||||
#include "../../resource.h"
|
||||
#include "PropertyWindow.h"
|
||||
#include "Globals.h"
|
||||
#include "strsafe.h"
|
||||
|
||||
499
src/source/Renderer.cpp
Normal file
499
src/source/Renderer.cpp
Normal file
@@ -0,0 +1,499 @@
|
||||
#include "Renderer.h"
|
||||
#include <G3DAll.h>
|
||||
#include "Faces.h"
|
||||
|
||||
float _bevelSize = 0.07F;
|
||||
std::vector<Vector3> _debugUniqueVertices;
|
||||
std::vector<GLfloat> _vertices;
|
||||
std::vector<GLfloat> _normals;
|
||||
std::vector<GLushort> _indices;
|
||||
Color3 color;
|
||||
|
||||
void addVertex(const Vector3& vertexPos,const Color3& color)
|
||||
{
|
||||
_vertices.push_back(vertexPos.x);
|
||||
_vertices.push_back(vertexPos.y);
|
||||
_vertices.push_back(vertexPos.z);
|
||||
_vertices.push_back(color.r);
|
||||
_vertices.push_back(color.g);
|
||||
_vertices.push_back(color.b);
|
||||
}
|
||||
|
||||
void addNormals(const Vector3& normal)
|
||||
{
|
||||
for (unsigned int i=0;i<3;i+=1) {
|
||||
_normals.push_back(normal.x);
|
||||
_normals.push_back(normal.y);
|
||||
_normals.push_back(normal.z);
|
||||
}
|
||||
}
|
||||
void addSingularNormal(const Vector3& normal)
|
||||
{
|
||||
_normals.push_back(normal.x);
|
||||
_normals.push_back(normal.y);
|
||||
_normals.push_back(normal.z);
|
||||
}
|
||||
void addTriangle(const Vector3& v1, const Vector3& v2, const Vector3& v3)
|
||||
{
|
||||
addVertex(v1,color);
|
||||
addVertex(v2,color);
|
||||
addVertex(v3,color);
|
||||
//addNormals(cross(v2-v1,v3-v1).direction());
|
||||
addSingularNormal(cross(v2-v1,v3-v1).direction());
|
||||
addSingularNormal(cross(v3-v2,v1-v2).direction());
|
||||
addSingularNormal(cross(v1-v3,v2-v3).direction());
|
||||
}
|
||||
|
||||
void addQuad(const Vector3& v1, const Vector3& v2, const Vector3& v3, const Vector3& v4)
|
||||
{
|
||||
addTriangle(v1, v2, v3);
|
||||
addTriangle(v1, v3, v4);
|
||||
}
|
||||
|
||||
void makeFace(int vertex1,int vertex2, int vertex3)
|
||||
{
|
||||
addTriangle(Vector3(_vertices[vertex1],_vertices[vertex1+1],_vertices[vertex1+2]),
|
||||
Vector3(_vertices[vertex2],_vertices[vertex2+1],_vertices[vertex2+2]),
|
||||
Vector3(_vertices[vertex3],_vertices[vertex3+1],_vertices[vertex3+2]));
|
||||
}
|
||||
|
||||
// Moved from the renderer function.
|
||||
void drawBevels()
|
||||
{
|
||||
// Bevel Top Front
|
||||
makeFace(0,36,48);
|
||||
makeFace(48,18,0);
|
||||
// Bevel Left Front Corner
|
||||
makeFace(18,156,162);
|
||||
makeFace(24,18,162);
|
||||
// Bevel Left Front Top Corner
|
||||
makeFace(48,156,18);
|
||||
// Bevel Left Front Bottom Corner
|
||||
makeFace(120,6,150);
|
||||
// Bevel Left Top
|
||||
makeFace(48,66,156);
|
||||
makeFace(144,156,66);
|
||||
// Bevel Bottom
|
||||
makeFace(6,120,114);
|
||||
makeFace(114,12,6);
|
||||
// Left Bottom
|
||||
makeFace(120,150,174);
|
||||
makeFace(174,132,120);
|
||||
// Right Front Top Corner
|
||||
makeFace(36,0,180);
|
||||
// Right Front Corner
|
||||
makeFace(180,0,12);
|
||||
makeFace(186,180,12);
|
||||
// Right Front Bottom Corner
|
||||
makeFace(186,12,114);
|
||||
// Right Bottom
|
||||
makeFace(186,114,108);
|
||||
makeFace(108,198,186);
|
||||
// Right Top Corner
|
||||
makeFace(180,192,36);
|
||||
makeFace(192,42,36);
|
||||
// Right Back Top Corner
|
||||
makeFace(72,42,192);
|
||||
// Right Back Bottom Corner
|
||||
makeFace(78,198,108);
|
||||
// Right Back Corner
|
||||
makeFace(72,192,198);
|
||||
makeFace(198,78,72);
|
||||
// Back Bottom Corner
|
||||
makeFace(78,108,132);
|
||||
makeFace(132,84,78);
|
||||
// Back Top
|
||||
makeFace(42,72,102);
|
||||
makeFace(102,66,42);
|
||||
// Back Left Top Corner
|
||||
makeFace(144,66,102);
|
||||
// Back Left Corner
|
||||
makeFace(144,102,84);
|
||||
makeFace(84,174,144);
|
||||
// Back Left Bottom Corner
|
||||
makeFace(174,84,132);
|
||||
for (unsigned short i=0;i<_vertices.size()/6;i++) {
|
||||
_indices.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
void renderBlock(const Vector3& renderSize)
|
||||
{
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y+_bevelSize,renderSize.z)
|
||||
);
|
||||
|
||||
addTriangle(Vector3(-renderSize.x+_bevelSize,renderSize.y-_bevelSize,renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,renderSize.z)
|
||||
);
|
||||
|
||||
// Top
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y,renderSize.z-_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(-renderSize.x+_bevelSize,renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y,-renderSize.z+_bevelSize)
|
||||
);
|
||||
|
||||
// Back
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,-renderSize.z),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y+_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,-renderSize.z)
|
||||
);
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,renderSize.y-_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y+_bevelSize,-renderSize.z),
|
||||
Vector3(-renderSize.x+_bevelSize,renderSize.y-_bevelSize,-renderSize.z)
|
||||
);
|
||||
|
||||
// Bottom
|
||||
addTriangle(Vector3(renderSize.x-_bevelSize,-renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y,renderSize.z-_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(-renderSize.x+_bevelSize,-renderSize.y,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x+_bevelSize,-renderSize.y,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x-_bevelSize,-renderSize.y,-renderSize.z+_bevelSize)
|
||||
);
|
||||
// Left
|
||||
addTriangle(Vector3(-renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x,renderSize.y-_bevelSize,renderSize.z-_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(-renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(-renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(-renderSize.x,-renderSize.y+_bevelSize,-renderSize.z+_bevelSize)
|
||||
);
|
||||
|
||||
// Right
|
||||
addTriangle(Vector3(renderSize.x,renderSize.y-_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize),
|
||||
Vector3(renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize)
|
||||
);
|
||||
addTriangle(Vector3(renderSize.x,-renderSize.y+_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x,renderSize.y-_bevelSize,-renderSize.z+_bevelSize),
|
||||
Vector3(renderSize.x,-renderSize.y+_bevelSize,renderSize.z-_bevelSize)
|
||||
);
|
||||
|
||||
drawBevels();
|
||||
|
||||
glVertexPointer(3, GL_FLOAT,6 * sizeof(GLfloat), &_vertices[0]);
|
||||
glColorPointer(3, GL_FLOAT,6 * sizeof(GLfloat), &_vertices[3]);
|
||||
glNormalPointer(GL_FLOAT,3 * sizeof(GLfloat), &_normals[0]);
|
||||
glDrawElements(GL_TRIANGLES, _indices.size(), GL_UNSIGNED_SHORT, &_indices[0]);
|
||||
_vertices.clear();
|
||||
_indices.clear();
|
||||
_normals.clear();
|
||||
}
|
||||
|
||||
|
||||
const float square_arr[] = {-0.125F,-0.125F,
|
||||
-0.125F, 0.125F,
|
||||
0.125F, 0.125F,
|
||||
0.125F,-0.125F};
|
||||
void renderShape(const Enum::Shape::Value& shape, const Vector3& size, const Color3& ncolor)
|
||||
{
|
||||
color = ncolor;
|
||||
switch(shape)
|
||||
{
|
||||
case Enum::Shape::Block:
|
||||
renderBlock(size);
|
||||
break;
|
||||
case Enum::Shape::Ball:
|
||||
glColor(ncolor);
|
||||
glPushMatrix();
|
||||
glScalef(size.x, size.y, size.z);
|
||||
gluSphere(gluNewQuadric(), 1, 20, 20);
|
||||
glPopMatrix();
|
||||
break;
|
||||
default:
|
||||
GLUquadric * q = gluNewQuadric();
|
||||
glColor(ncolor);
|
||||
glPushMatrix();
|
||||
glScalef(size.x, size.y, size.z);
|
||||
glRotatef(90, 0, 1, 0);
|
||||
glTranslatef(0,0,1);
|
||||
gluDisk(q, 0, 1, 12, 12);
|
||||
glTranslatef(0,0,-2);
|
||||
gluCylinder(q, 1, 1, 2, 12, 1);
|
||||
glRotatef(180, 1, 0, 0);
|
||||
gluDisk(q, 0, 1, 12, 12);
|
||||
glPopMatrix();
|
||||
/*Plusses, can possibly integrate into cylinder code later on*/
|
||||
glVertexPointer(2, GL_FLOAT,0, square_arr);
|
||||
glColor3f(127,127,127);
|
||||
glPushMatrix();
|
||||
glRotatef(90,0,1,0);
|
||||
glTranslatef(0,0,-(size.z+0.001F));
|
||||
glScalef(0.75,0.75,0.75);
|
||||
glScalef(size.x*8,1,1);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glScalef(1/(size.x*8),size.x*8,1);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glPopMatrix();
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(-90,0,1,0);
|
||||
glTranslatef(0,0,-(size.z+0.001F));
|
||||
glScalef(0.75,0.75,0.75);
|
||||
glScalef(size.x*8,1,1);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glScalef(1/(size.x*8),size.x*8,1);
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
glPopMatrix();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static G3D::Color3 getControllerColor(int controller)
|
||||
{
|
||||
switch(controller)
|
||||
{
|
||||
case Enum::Controller::KeyboardLeft:
|
||||
return Color3::red();
|
||||
case Enum::Controller::KeyboardRight:
|
||||
return Color3::blue();
|
||||
case Enum::Controller::Chase:
|
||||
return Color3::black();
|
||||
case Enum::Controller::Flee:
|
||||
return Color3::yellow();
|
||||
}
|
||||
return Color3::gray();
|
||||
}
|
||||
|
||||
void translateFace(const char face, const Vector3& size)
|
||||
{
|
||||
//glTranslatef(0,0,size.z);
|
||||
switch(face)
|
||||
{
|
||||
case TOP:
|
||||
{
|
||||
glTranslatef(0,size.y,0);
|
||||
glRotatef(90,1,0,0);
|
||||
}
|
||||
break;
|
||||
case BOTTOM:
|
||||
{
|
||||
glTranslatef(0,-size.y,0);
|
||||
glRotatef(-90,1,0,0);
|
||||
}
|
||||
break;
|
||||
case LEFT:
|
||||
{
|
||||
glTranslatef(size.x,0,0);
|
||||
glRotatef(-90,0,1,0);
|
||||
}
|
||||
break;
|
||||
case RIGHT:
|
||||
{
|
||||
glTranslatef(-size.x,0,0);
|
||||
glRotatef(90,0,1,0);
|
||||
}
|
||||
break;
|
||||
case FRONT:
|
||||
{
|
||||
glTranslatef(0,0,size.z);
|
||||
glRotatef(-180,0,1,0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
glTranslatef(0,0,-size.z);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*static const GLfloat bump[] = {
|
||||
0.5f, 0.25F, 0.5f, // Front-top-left
|
||||
-0.5f, 0.25F, 0.5f, // Front-top-right
|
||||
0.5f, -0.25F, 0.5f, // Front-bottom-left
|
||||
-0.5f, -0.25F, 0.5f, // Front-bottom-right
|
||||
-0.5f, -0.25F, -0.5f, // Back-bottom-right
|
||||
-0.5f, 0.25F, 0.5f, // Front-top-right
|
||||
-0.5f, 0.25F, -0.5f, // Back-top-right
|
||||
0.5f, 0.25F, 0.5f, // Front-top-left
|
||||
0.5f, 0.25F, -0.5f, // Back-top-left
|
||||
0.5f, -0.25F, 0.5f, // Front-bottom-left
|
||||
0.5f, -0.25F, -0.5f, // Back-bottom-left
|
||||
-0.5f, -0.25F, -0.5f, // Back-bottom-right
|
||||
0.5f, 0.25F, -0.5f, // Back-top-left
|
||||
-0.5f, 0.25F, -0.5f // Back-top-right
|
||||
};*/
|
||||
|
||||
static const int BMP_FACES = 5*2;
|
||||
static const GLfloat bumpTriangles[] = {
|
||||
//Top
|
||||
-0.3F, 0.1F, -0.3F,
|
||||
-0.3F, 0.1F, 0.3F,
|
||||
0.3F, 0.1F, -0.3F,
|
||||
|
||||
0.3F, 0.1F, -0.3F,
|
||||
-0.3F, 0.1F, 0.3F,
|
||||
0.3F, 0.1F, 0.3F,
|
||||
|
||||
|
||||
//Front
|
||||
-0.3F, 0.1F, 0.3F,
|
||||
-0.3F, -0.1F, 0.3F,
|
||||
0.3F, 0.1F, 0.3F,
|
||||
|
||||
0.3F, 0.1F, 0.3F,
|
||||
-0.3F, -0.1F, 0.3F,
|
||||
0.3F, -0.1F, 0.3F,
|
||||
|
||||
|
||||
//Back
|
||||
-0.3F, -0.1F, -0.3F,
|
||||
-0.3F, 0.1F, -0.3F,
|
||||
0.3F, -0.1F, -0.3F,
|
||||
|
||||
0.3F, -0.1F, -0.3F,
|
||||
-0.3F, 0.1F, -0.3F,
|
||||
0.3F, 0.1F, -0.3F,
|
||||
|
||||
|
||||
//Right
|
||||
0.3F, -0.1F, -0.3F,
|
||||
0.3F, 0.1F, -0.3F,
|
||||
0.3F, -0.1F, 0.3F,
|
||||
|
||||
0.3F, -0.1F, 0.3F,
|
||||
0.3F, 0.1F, -0.3F,
|
||||
0.3F, 0.1F, 0.3F,
|
||||
|
||||
|
||||
//Left
|
||||
-0.3F, 0.1F, -0.3F,
|
||||
-0.3F, -0.1F, -0.3F,
|
||||
-0.3F, 0.1F, 0.3F,
|
||||
|
||||
-0.3F, 0.1F, 0.3F,
|
||||
-0.3F, -0.1F, -0.3F,
|
||||
-0.3F, -0.1F, 0.3F,
|
||||
};
|
||||
|
||||
static const GLfloat bumpTriangleNormals[] = {
|
||||
0.000000F, 1.000000F, 0.000000F,
|
||||
0.000000F, 1.000000F, 0.000000F,
|
||||
0.000000F, 1.000000F, 0.000000F,
|
||||
0.000000F, 1.000000F, -0.000000F,
|
||||
-0.000000F, 1.000000F, 0.000000F,
|
||||
0.000000F, 1.000000F, 0.000000F,
|
||||
-0.000000F, 0.000000F, 1.000000F,
|
||||
0.000000F, 0.000000F, 1.000000F,
|
||||
0.000000F, 0.000000F, 1.000000F,
|
||||
0.000000F, 0.000000F, 1.000000F,
|
||||
0.000000F, 0.000000F, 1.000000F,
|
||||
0.000000F, -0.000000F, 1.000000F,
|
||||
0.000000F, 0.000000F, -1.000000F,
|
||||
0.000000F, 0.000000F, -1.000000F,
|
||||
0.000000F, 0.000000F, -1.000000F,
|
||||
0.000000F, 0.000000F, -1.000000F,
|
||||
0.000000F, 0.000000F, -1.000000F,
|
||||
-0.000000F, -0.000000F, -1.000000F,
|
||||
1.000000F, 0.000000F, 0.000000F,
|
||||
1.000000F, 0.000000F, 0.000000F,
|
||||
1.000000F, 0.000000F, 0.000000F,
|
||||
1.000000F, -0.000000F, 0.000000F,
|
||||
1.000000F, 0.000000F, -0.000000F,
|
||||
1.000000F, 0.000000F, 0.000000F,
|
||||
-1.000000F, 0.000000F, 0.000000F,
|
||||
-1.000000F, 0.000000F, 0.000000F,
|
||||
-1.000000F, 0.000000F, -0.000000F,
|
||||
-1.000000F, -0.000000F, 0.000000F,
|
||||
-1.000000F, 0.000000F, 0.000000F,
|
||||
-1.000000F, 0.000000F, 0.000000F,
|
||||
};
|
||||
|
||||
|
||||
void renderSurface(const char face, const Enum::SurfaceType::Value& surface, const Vector3& size, const Enum::Controller::Value& controller, const Color3& nColor)
|
||||
{
|
||||
glPushMatrix();
|
||||
translateFace(face, size);
|
||||
switch(surface)
|
||||
{
|
||||
case Enum::SurfaceType::Motor:
|
||||
{
|
||||
glDisable(GL_LIGHTING);
|
||||
glColor(getControllerColor(controller));
|
||||
GLUquadric * q = gluNewQuadric();
|
||||
gluQuadricNormals(q, GLU_NONE);
|
||||
glPushMatrix();
|
||||
glTranslatef(0,0,-0.2F);
|
||||
gluCylinder(q, 0.4F, 0.4F, 0.4F, 6, 1);
|
||||
glTranslatef(0,0,0.4F);
|
||||
gluDisk(q, 0, 0.4F, 6, 1);
|
||||
glTranslatef(0,0,-0.4F);
|
||||
glRotatef(180, 1, 0, 0);
|
||||
gluDisk(q, 0, 0.4F, 6, 1);
|
||||
glPopMatrix();
|
||||
}
|
||||
case Enum::SurfaceType::Hinge:
|
||||
{
|
||||
glDisable(GL_LIGHTING);
|
||||
glColor3f(1,1,0);
|
||||
GLUquadric * q = gluNewQuadric();
|
||||
gluQuadricNormals(q, GLU_NONE);
|
||||
glPushMatrix();
|
||||
glTranslatef(0,0,-0.5F);
|
||||
gluCylinder(q, 0.2F, 0.2F, 1, 6, 1);
|
||||
glTranslatef(0,0,1);
|
||||
gluDisk(q, 0, 0.2F, 6, 1);
|
||||
glTranslatef(0,0,-1);
|
||||
glRotatef(180, 1, 0, 0);
|
||||
gluDisk(q, 0, 0.2F, 6, 1);
|
||||
glPopMatrix();
|
||||
glEnable(GL_LIGHTING);
|
||||
}
|
||||
break;
|
||||
case Enum::SurfaceType::Bumps:
|
||||
{
|
||||
glRotatef(-90,1,0,0);
|
||||
float x;
|
||||
float y;
|
||||
switch(face)
|
||||
{
|
||||
case TOP:
|
||||
case BOTTOM:
|
||||
x = size.x * 2;
|
||||
y = size.z * 2;
|
||||
break;
|
||||
case LEFT:
|
||||
case RIGHT:
|
||||
y = size.y * 2;
|
||||
x = size.z * 2;
|
||||
break;
|
||||
case FRONT:
|
||||
case BACK:
|
||||
x = size.x * 2;
|
||||
y = size.y * 2;
|
||||
break;
|
||||
}
|
||||
glTranslatef(-x/2+0.5F,0,-y/2+0.5F);
|
||||
glColor(color);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
glVertexPointer(3, GL_FLOAT, 0, bumpTriangles);
|
||||
glNormalPointer(GL_FLOAT, 0, bumpTriangleNormals);
|
||||
for(float i = 0; i < y; i++)
|
||||
{
|
||||
glPushMatrix();
|
||||
for(float j = 0; j < x; j++)
|
||||
{
|
||||
glDrawArrays(GL_TRIANGLES, 0, 30);
|
||||
glTranslatef(1,0,0);
|
||||
}
|
||||
glPopMatrix();
|
||||
glTranslatef(0,0,1);
|
||||
}
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
glPopMatrix();
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
ArrowTool::ArrowTool(void)
|
||||
{
|
||||
// Should solve issue of resize and move handles being drawn when they don't need to be
|
||||
g_usableApp->unSetMode();
|
||||
lctrlDown = false;
|
||||
rctrlDown = false;
|
||||
dragging = false;
|
||||
@@ -29,8 +31,6 @@ void ArrowTool::onButton1MouseDown(Mouse mouse)
|
||||
}
|
||||
void ArrowTool::onButton1MouseUp(Mouse mouse)
|
||||
{
|
||||
if(dragging)
|
||||
this->setCursor(GetFileInPath("/content/images/ArrowCursor.png"));
|
||||
mouseDown = false;
|
||||
dragging = false;
|
||||
}
|
||||
@@ -43,7 +43,6 @@ void ArrowTool::onMouseMoved(Mouse mouse)
|
||||
{
|
||||
if(abs(mouse.x-mouseDownStartx) > 5 || abs(mouse.y-mouseDownStarty) > 5)
|
||||
{
|
||||
this->setCursor(GetFileInPath("/content/images/GrabRotateCursor.png"));
|
||||
dragging = true;
|
||||
}
|
||||
else return;
|
||||
@@ -58,13 +57,10 @@ void ArrowTool::onMouseMoved(Mouse mouse)
|
||||
return;
|
||||
}
|
||||
PartInstance * target = mouse.getTarget();
|
||||
if(target == NULL)
|
||||
this->setCursor(GetFileInPath("/content/images/ArrowCursor.png"));
|
||||
else this->setCursor(GetFileInPath("/content/images/DragCursor.png"));
|
||||
//if(target == NULL)
|
||||
}
|
||||
void ArrowTool::onSelect(Mouse mouse)
|
||||
{
|
||||
this->setCursor(GetFileInPath("/content/images/ArrowCursor.png"));
|
||||
}
|
||||
|
||||
void ArrowTool::onKeyDown(int key)
|
||||
@@ -73,6 +69,30 @@ 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)
|
||||
|
||||
86
src/source/Tool/SurfaceTool.cpp
Normal file
86
src/source/Tool/SurfaceTool.cpp
Normal file
@@ -0,0 +1,86 @@
|
||||
#include "Tool/SurfaceTool.h"
|
||||
#include "Application.h"
|
||||
SurfaceTool::SurfaceTool(int theSurface, int extraParam)
|
||||
{
|
||||
surface = theSurface;
|
||||
param = extraParam;
|
||||
}
|
||||
|
||||
SurfaceTool::~SurfaceTool(void)
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<G3D::Box> getSurfaces(PartInstance * part)
|
||||
{
|
||||
std::vector<G3D::Box> planes;
|
||||
G3D::Box box = part->getBox();
|
||||
G3D::Vector3 v0;
|
||||
G3D::Vector3 v1;
|
||||
G3D::Vector3 v2;
|
||||
G3D::Vector3 v3;
|
||||
box.getFaceCorners(0,v0,v1,v2,v3);
|
||||
planes.push_back(G3D::Box(v0, v2));
|
||||
box.getFaceCorners(1,v0,v1,v2,v3);
|
||||
planes.push_back(G3D::Box(v0, v2));
|
||||
box.getFaceCorners(2,v0,v1,v2,v3);
|
||||
planes.push_back(G3D::Box(v0, v2));
|
||||
box.getFaceCorners(3,v0,v1,v2,v3);
|
||||
planes.push_back(G3D::Box(v0, v2));
|
||||
box.getFaceCorners(4,v0,v1,v2,v3);
|
||||
planes.push_back(G3D::Box(v0, v2));
|
||||
box.getFaceCorners(5,v0,v1,v2,v3);
|
||||
planes.push_back(G3D::Box(v0, v2));
|
||||
return planes;
|
||||
}
|
||||
|
||||
void SurfaceTool::onButton1MouseDown(Mouse mouse)
|
||||
{
|
||||
AudioPlayer::playSound(dingSound);
|
||||
PartInstance * target = mouse.getTarget();
|
||||
if(target != NULL)
|
||||
{
|
||||
G3D::Ray ray = mouse.getLastRay();
|
||||
std::vector<G3D::Box> surfacesHit = getSurfaces(target);
|
||||
int closest;
|
||||
float nearValue = G3D::inf();
|
||||
for(size_t i = 0; i < surfacesHit.size(); i++)
|
||||
{
|
||||
float newTime = ray.intersectionTime(surfacesHit[i]);
|
||||
if(nearValue > newTime)
|
||||
{
|
||||
nearValue = newTime;
|
||||
closest = (int)i;
|
||||
}
|
||||
}
|
||||
if(G3D::isFinite(nearValue))
|
||||
{
|
||||
target->setSurface(closest, Enum::SurfaceType::Value(surface));
|
||||
}
|
||||
}
|
||||
if(surface == Enum::SurfaceType::Motor)
|
||||
{
|
||||
g_usableApp->changeTool(NULL);
|
||||
}
|
||||
}
|
||||
void SurfaceTool::onButton1MouseUp(Mouse mouse)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SurfaceTool::onMouseMoved(Mouse mouse)
|
||||
{
|
||||
}
|
||||
void SurfaceTool::onSelect(Mouse mouse)
|
||||
{
|
||||
AudioPlayer::playSound(dingSound);
|
||||
}
|
||||
|
||||
void SurfaceTool::onKeyDown(int key)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SurfaceTool::onKeyUp(int key)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Tool::Tool(void)
|
||||
{
|
||||
cursorString = GetFileInPath("/content/images/ArrowFarCursor.png");
|
||||
//cursorString = GetFileInPath("/content/images/ArrowFarCursor.png");
|
||||
//cursorId = cursorRef->openGLID();
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ void Tool::onDeselect(Mouse mouse){}
|
||||
void Tool::onMouseScroll(Mouse mouse){}
|
||||
void Tool::onKeyDown(int key){}
|
||||
void Tool::onKeyUp(int key){}
|
||||
void Tool::setCursor(std::string str)
|
||||
/*void Tool::setCursor(std::string str)
|
||||
{
|
||||
cursorString = str;
|
||||
}
|
||||
int Tool::getCursorId()
|
||||
//cursorString = str;
|
||||
}*/
|
||||
/*int Tool::getCursorId()
|
||||
{
|
||||
return TextureHandler::getTexturePermanent(cursorString);
|
||||
}
|
||||
}*/
|
||||
@@ -23,7 +23,7 @@ bool createWindowClass(const char* name,WNDPROC proc,HMODULE hInstance)
|
||||
{
|
||||
stringstream errMsg;
|
||||
errMsg<<"Failed to register " << name;
|
||||
MessageBox(NULL, errMsg.str().c_str(),"Dynamica Crash", MB_OK);
|
||||
MessageBox(NULL, errMsg.str().c_str(),"Blocks3D Crash", MB_OK);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -505,7 +505,7 @@ HRESULT _stdcall AXClientSite :: Invoke(
|
||||
EXCEPINFO FAR* pExcepInfo,
|
||||
unsigned int FAR* puArgErr)
|
||||
{
|
||||
IEBrowser * browser = (IEBrowser *)GetWindowLongPtr(Window,GWL_USERDATA+1);
|
||||
IEBrowser * browser = (IEBrowser *)GetProp(Window,"Browser");
|
||||
return browser->doExternal(m_lastExternalName,dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
|
||||
//return S_OK;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
// TODO: Move toolbar buttons with resized window.
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#define _WIN32_WINDOWS 0x0400
|
||||
#define WINVER 0x0400
|
||||
|
||||
#include "resource.h"
|
||||
#include "winver.h"
|
||||
#include "../../resource.h"
|
||||
#include "Application.h"
|
||||
#include "WindowFunctions.h"
|
||||
#include "ax.h"
|
||||
@@ -145,8 +142,14 @@ LRESULT CALLBACK G3DProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
long double a = 1;
|
||||
|
||||
#ifndef IGNORE_CATCH
|
||||
try{
|
||||
#endif
|
||||
hresult = OleInitialize(NULL);
|
||||
|
||||
/* IInternetSecurityManager *pSecurityMgr;
|
||||
@@ -171,7 +174,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();
|
||||
@@ -204,7 +207,7 @@ int main(int argc, char** argv) {
|
||||
);
|
||||
if(hwndMain == NULL)
|
||||
{
|
||||
MessageBox(NULL, "Critical error loading: Failed to create HWND, must exit", (g_PlaceholderName + " Crash").c_str() , MB_OK);
|
||||
MessageBox(NULL, "Critical error loading: Failed to create HWND, must exit", (g_appName + " Crash").c_str() , MB_OK);
|
||||
return 0;
|
||||
}
|
||||
SendMessage(hwndMain, WM_SETICON, ICON_BIG,(LPARAM)LoadImage(GetModuleHandle(NULL), (LPCSTR)MAKEINTRESOURCEW(IDI_ICON1), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR | LR_DEFAULTSIZE));
|
||||
@@ -212,10 +215,12 @@ int main(int argc, char** argv) {
|
||||
Globals::mainHwnd = hwndMain;
|
||||
Application app = Application(hwndMain);
|
||||
app.run();
|
||||
#ifndef IGNORE_CATCH
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
OnError(-1);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
/// This source is distributed in the hope that it will be useful,
|
||||
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
///
|
||||
/// @date 2-27-16
|
||||
///
|
||||
/// @todo
|
||||
///
|
||||
/// @bug
|
||||
/// @date 2-27-16
|
||||
///
|
||||
/// @todo
|
||||
///
|
||||
/// @bug
|
||||
///
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -29,15 +29,14 @@
|
||||
//DWM 1.8: Version 1.8 changes labelled thus.
|
||||
//DWM 1.9: Version 1.9 changes labelled thus.
|
||||
|
||||
//DWM 1.9: Suppress POCC Warning "Argument x to 'sscanf' does not match the format string;
|
||||
//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
|
||||
@@ -70,7 +69,7 @@
|
||||
#define _tmemset wmemset
|
||||
#define _stprintf swprintf
|
||||
#else
|
||||
#define _tmemcpy memcpy
|
||||
#define _tmemcpy memcpy_s
|
||||
#define _tmemmove memmove
|
||||
#define _tmemset memset
|
||||
#define _stprintf _snprintf
|
||||
@@ -103,7 +102,7 @@
|
||||
//DWM 1.2: Converted the following 4 items to constants
|
||||
#define SELECT _T("T") ///< PIT_CHECK select
|
||||
#define UNSELECT _T("F") ///< PIT_CHECK unselect
|
||||
#define CHECKED SELECT ///< PIT_CHECK checked
|
||||
#define CHECKED SELECT ///< PIT_CHECK checked
|
||||
#define UNCHECKED UNSELECT ///< PIT_CHECK unchecked
|
||||
|
||||
//DWM 1.3: Added
|
||||
@@ -142,7 +141,7 @@
|
||||
/// in a list box.
|
||||
///
|
||||
/// @param hwndCtl The handle of a listbox.
|
||||
/// @param xPos The x coordinate of a point.
|
||||
/// @param xPos The x coordinate of a point.
|
||||
/// @param yPos The y coordinate of a point.
|
||||
///
|
||||
/// @returns The return value contains the index of the nearest item
|
||||
@@ -290,7 +289,7 @@ static LPINSTANCEDATA g_lpInst; ///< instance data (this) pointer
|
||||
/// @brief Get the Instance data associated with this instance.
|
||||
///
|
||||
/// @param hControl Handle to Current instance.
|
||||
/// @param ppInstanceData - Pointer to the address of an INSTANCEDATA struct.
|
||||
/// @param ppInstanceData - Pointer to the address of an INSTANCEDATA struct.
|
||||
///
|
||||
/// @returns TRUE if successful
|
||||
static BOOL Control_GetInstanceData(HWND hControl, LPINSTANCEDATA * ppInstanceData)
|
||||
@@ -362,7 +361,7 @@ static LPTSTR NewString(LPTSTR str)
|
||||
|
||||
if(NULL == tmp)
|
||||
{
|
||||
return (LPTSTR)calloc(1, sizeof(TCHAR));
|
||||
return (LPTSTR)calloc(1, sizeof(TCHAR));
|
||||
}
|
||||
return (LPTSTR)_tmemmove(tmp, str, _tcslen(str));
|
||||
}
|
||||
@@ -386,7 +385,7 @@ static LPTSTR NewStringArray(LPTSTR szzStr)
|
||||
|
||||
if(NULL == tmp)
|
||||
{
|
||||
return (LPTSTR)calloc(1, sizeof(TCHAR));
|
||||
return (LPTSTR)calloc(1, sizeof(TCHAR));
|
||||
}
|
||||
return (LPTSTR)_tmemmove(tmp, szzStr, iLen);
|
||||
}
|
||||
@@ -482,7 +481,7 @@ static VOID Editor_OnKillFocus(HWND hwnd, HWND hwndNewFocus)
|
||||
g_lpInst->fGotFocus =
|
||||
(NULL != hwndNewFocus &&
|
||||
(g_lpInst->hwndListBox == hwndNewFocus ||
|
||||
g_lpInst->hwndCtl1 == hwndNewFocus ||
|
||||
g_lpInst->hwndCtl1 == hwndNewFocus ||
|
||||
g_lpInst->hwndCtl2 == hwndNewFocus ||
|
||||
g_lpInst->hwndPropDesc == hwndNewFocus ||
|
||||
g_lpInst->hwndToolTip == hwndNewFocus));
|
||||
@@ -653,7 +652,7 @@ static BOOL Editor_OnPaint(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
rect.left += 1;
|
||||
rect.bottom += 1;
|
||||
rect.right += 1;
|
||||
|
||||
|
||||
DrawBorder(hdc, &rect, BF_RECT, GetSysColor(COLOR_WINDOW));
|
||||
|
||||
ReleaseDC(hwnd, hdc);
|
||||
@@ -1149,7 +1148,7 @@ static HWND CreateIpEdit(HINSTANCE hInstance, HWND hwndParent, INT id, LPRECT lp
|
||||
NULL,
|
||||
dwStyle,
|
||||
CW_USEDEFAULT, // x position can be changed after creation
|
||||
CW_USEDEFAULT, // y position can be changed after creation
|
||||
CW_USEDEFAULT, // y position can be changed after creation
|
||||
lprc->right - lprc->left, // width can only be set here
|
||||
lprc->bottom - lprc->top, // height can only be set here
|
||||
hwndParent, (HMENU)id, hInstance, NULL);
|
||||
@@ -3272,7 +3271,7 @@ static HBRUSH Grid_OnCtlColorStatic(HWND hwnd, HDC hdc, HWND hwndChild, INT type
|
||||
FillSolidRect(hdc,MAKE_PRECT(0, g_lpInst->iVDivider - 2,
|
||||
WIDTH(rc), g_lpInst->iVDivider),GetSysColor(COLOR_BTNFACE));
|
||||
ReleaseDC(hwnd,hdc);
|
||||
}
|
||||
}
|
||||
return FORWARD_WM_CTLCOLORSTATIC(hwnd, hdc, hwndChild, DefWindowProc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user