Compare commits

33 Commits

Author SHA1 Message Date
starfrost013
182e3622c2 Removed a whole bunch of obsolete files. 2023-11-04 00:56:11 +00:00
Vulpovile
f6110fa3a3 Merge pull request #135 from Vulpovile/bugfix/vs2003_stack_obliteration
Visual Studio 2003 stack clobbering workaround
2023-11-03 16:20:35 -08:00
Vulpovile
0120bc857d Merge branch 'develop' of github.com:Vulpovile/Blocks3D into bugfix/vs2003_stack_obliteration 2023-11-03 17:15:30 -07:00
Vulpovile
78fcebd1fc Merge pull request #133 from Vulpovile/bugfix/no_eol_conversions
Bugfix/no eol conversions
2023-11-03 16:15:10 -08:00
Vulpovile
706d16f9c3 Added redists and install script builds for VS2003 2023-11-03 17:09:50 -07:00
Vulpovile
111cc7cd01 Update copyright 2023-11-03 16:48:05 -07:00
Vulpovile
8817712cc3 Fixed stack clobbering in VS2003 compiler 2023-11-03 16:36:27 -07:00
Vulpovile
522a926965 Merge branch 'develop' into bugfix/no_eol_conversions 2023-11-03 12:26:02 -08:00
starfrost
f5d42a3b92 Merge pull request #134 from Vulpovile/feature/cleanup-projects
Remove absolute path in include directories
2023-11-03 19:44:26 +00:00
starfrost013
6f7fbdae2f Remove absolute path in include directories 2023-11-03 19:39:56 +00:00
Vulpovile
943ce9a5eb Merge branch 'develop' of github.com:Vulpovile/Blocks3D into bugfix/no_eol_conversions 2023-11-02 19:43:28 -07:00
Vulpovile
6bfbc4a97e Merge pull request #132 from KeyboardCombination/develop
move tool
2023-11-02 18:43:08 -08:00
Vulpovile
f5b31d8e99 Disable line ending conversions 2023-11-02 19:40:56 -07:00
KeyboardCombination
4336140b90 move tool 2023-11-02 22:18:35 -04:00
MusicalProgrammer
cb6eb4653d Merge pull request #129 from Vulpovile/feature/readme_update_dmv3
Update README.md to *reflect* DataModel V3
2023-11-02 19:45:22 -04:00
Vulpovile
43327b8974 Update README.md to *reflect* DataModel V3 2023-11-02 13:17:49 -07:00
Vulpovile
8e48115d37 Merge pull request #128 from Vulpovile/feature/property_grid_toggle
Made MENU toggle property grid
2023-11-02 10:27:44 -08:00
Vulpovile
d2bdd4e124 Made MENU toggle property grid 2023-11-02 11:17:53 -07:00
Vulpovile
c1431c8dff VS 2003 build files, made physics more stable, fix Win98/WINE IE 2023-11-02 01:16:05 -07:00
Vulpovile
cc0c195c0b Removed SDL from installer 2023-11-02 00:08:42 -07:00
Vulpovile
3c415e7297 Updated instance icon, no more SDL 2023-11-02 00:07:10 -07:00
MusicalProgrammer
5d96985667 Merge pull request #127 from Vulpovile/bugfix/use_consistent_crt
Fixed issues with Windows XP/2000 using different CRT DLLs
2023-11-01 22:23:24 -04:00
Vulpovile
03ab7122c3 Fixed issues with Windows XP/2000 using different CRT DLLs on build time causing a completely broken EXE 2023-11-01 18:10:56 -07:00
starfrost
a75f7bf381 Merge pull request #123 from KeyboardCombination/develop
GUD improvements (nobody merged this despite approval?)
2023-08-15 22:58:48 +01:00
KeyboardCombination
00b165c208 Update GUDButtonListener.cpp 2023-06-11 18:16:36 -04:00
KeyboardCombination
2a17185cc0 Fixed name inconsistencies 2023-05-21 17:29:11 -04:00
KeyboardCombination
b7f2b8f5a7 dynamic casting, extra sounds, fixes 2023-04-30 15:58:10 -04:00
KeyboardCombination
fd3679fb6b Removing useless check 2023-04-09 19:30:23 -04:00
KeyboardCombination
e37ad4879e duplicate improvements, prototype model insertion 2023-04-07 18:46:19 -04:00
KeyboardCombination
20bf032f1e Merge branch 'develop' of https://github.com/KeyboardCombination/Blocks3D into develop 2023-04-07 15:04:06 -04:00
KeyboardCombination
eb2766304a bigger selectionbox 2023-04-07 15:04:01 -04:00
KeyboardCombination
e914126c87 remove ode stuff 2023-04-06 23:07:27 -04:00
KeyboardCombination
48f3455b53 GUD improvements 2023-04-06 22:57:56 -04:00
94 changed files with 1408 additions and 820 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=false

37
Blocks3D VS2003.sln Normal file
View File

@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blocks3D", "Blocks3D VS2003.vcproj", "{6C4D6EEF-B1D1-456A-B850-92CAB17124BE}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
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

20
Blocks3D VS2003.sln.old Normal file
View File

@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 7.10
# Visual C++ Express 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blocks3D", "Blocks3D VS2003.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

717
Blocks3D VS2003.vcproj Normal file
View File

@@ -0,0 +1,717 @@
<?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="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="TRUE"
FavorSizeOrSpeed="1"
OmitFramePointers="TRUE"
WholeProgramOptimization="TRUE"
AdditionalIncludeDirectories="&quot;.\src\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;NO_SDL_MAIN;_ATL_STATIC_REGISTRY"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
RuntimeTypeInfo="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 ode.lib Ole32.lib"
OutputFile="./Blocks3D.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ProgramDatabaseFile=".\Release/Blocks3D.pdb"
SubSystem="2"
StackReserveSize="16777216"
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="2"
LinkTimeCodeGeneration="TRUE"
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;_ATL_STATIC_REGISTRY;NO_SDL_MAIN"
MinimalRebuild="FALSE"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
EnableFunctionLevelLinking="FALSE"
EnableEnhancedInstructionSet="0"
RuntimeTypeInfo="TRUE"
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 oded.lib"
OutputFile="./Blocks3D-Debug.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=""
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/Blocks3D.pdb"
SubSystem="1"
StackReserveSize="16777216"
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\DraggerTool.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\LightingInstance.cpp">
</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\SelectionService.cpp">
</File>
<File
RelativePath=".\src\source\DataModelV2\SoundInstance.cpp">
</File>
<File
RelativePath=".\src\source\DataModelV2\SoundService.cpp">
</File>
<File
RelativePath=".\src\source\DataModelV2\ThumbnailGeneratorInstance.cpp">
</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
Name="XplicitNgine">
<File
RelativePath=".\src\source\XplicitNgine\XplicitNgine.cpp">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"/>
</FileConfiguration>
</File>
</Filter>
</Filter>
<Filter
Name="Helpers">
<File
RelativePath=".\src\source\base64.cpp">
</File>
</Filter>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath=".\src\include\Application.h">
</File>
<File
RelativePath=".\src\include\AudioPlayer.h">
</File>
<File
RelativePath=".\src\include\ax.h">
</File>
<File
RelativePath=".\src\include\BrowserCallHandler.h">
</File>
<File
RelativePath=".\src\include\CameraController.h">
</File>
<File
RelativePath=".\src\include\Enum.h">
</File>
<File
RelativePath=".\src\include\ErrorFunctions.h">
</File>
<File
RelativePath=".\src\include\Faces.h">
</File>
<File
RelativePath=".\src\include\Globals.h">
</File>
<File
RelativePath=".\src\include\IEBrowser.h">
</File>
<File
RelativePath=".\src\include\IEDispatcher.h">
</File>
<File
RelativePath=".\src\include\Mouse.h">
</File>
<File
RelativePath=".\src\include\propertyGrid.h">
</File>
<File
RelativePath=".\src\include\PropertyWindow.h">
</File>
<File
RelativePath=".\src\include\Renderer.h">
</File>
<File
RelativePath=".\src\include\resource.h">
</File>
<File
RelativePath=".\src\include\StringFunctions.h">
</File>
<File
RelativePath=".\src\include\TextureHandler.h">
</File>
<File
RelativePath=".\src\include\ToolEnum.h">
</File>
<File
RelativePath=".\src\include\versioning.h">
</File>
<File
RelativePath=".\src\include\VS2005CompatShim.h">
</File>
<File
RelativePath=".\src\include\win32Defines.h">
</File>
<File
RelativePath=".\src\include\WindowFunctions.h">
</File>
<Filter
Name="RapidXML">
<File
RelativePath=".\src\include\rapidxml\rapidxml.hpp">
</File>
<File
RelativePath=".\src\include\rapidxml\rapidxml_iterators.hpp">
</File>
<File
RelativePath=".\src\include\rapidxml\rapidxml_print.hpp">
</File>
<File
RelativePath=".\src\include\rapidxml\rapidxml_utils.hpp">
</File>
</Filter>
<Filter
Name="Listener">
<File
RelativePath=".\src\include\Listener\ButtonListener.h">
</File>
<File
RelativePath=".\src\include\Listener\CameraButtonListener.h">
</File>
<File
RelativePath=".\src\include\Listener\DeleteListener.h">
</File>
<File
RelativePath=".\src\include\Listener\GUDButtonListener.h">
</File>
<File
RelativePath=".\src\include\Listener\MenuButtonListener.h">
</File>
<File
RelativePath=".\src\include\Listener\ModeSelectionListener.h">
</File>
<File
RelativePath=".\src\include\Listener\RotateButtonListener.h">
</File>
<File
RelativePath=".\src\include\Listener\ToolbarListener.h">
</File>
<File
RelativePath=".\src\include\DataModel\WorkspaceInstance.h">
</File>
</Filter>
<Filter
Name="Tool">
<File
RelativePath=".\src\include\Tool\ArrowTool.h">
</File>
<File
RelativePath=".\src\include\Tool\DraggerTool.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\LightingInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\PartInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\PVInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\SelectionService.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\SoundInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\SoundService.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\ThumbnailGeneratorInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\WorkspaceInstance.h">
</File>
<Filter
Name="Gui">
<File
RelativePath=".\src\include\DataModelV2\BaseButtonInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\BaseGuiInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\GuiRootInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\ImageButtonInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\TextButtonInstance.h">
</File>
<File
RelativePath=".\src\include\DataModelV2\ToggleImageButtonInstance.h">
</File>
</Filter>
<Filter
Name="XplicitNgine">
<File
RelativePath=".\src\include\XplicitNgine\XplicitNgine.h">
</File>
</Filter>
</Filter>
<Filter
Name="Helpers">
<File
RelativePath=".\src\include\base64.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>

View File

@@ -5,4 +5,9 @@
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.6195" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>

View File

@@ -55,7 +55,7 @@
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="&quot;.\src\include&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_ATL_STATIC_REGISTRY;NO_SDL_MAIN"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
@@ -154,8 +154,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;C:\libraries\ode-0.5\include\drawstuff&quot;;.\src\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
AdditionalIncludeDirectories=".\src\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_ATL_STATIC_REGISTRY;NO_SDL_MAIN"
MinimalRebuild="false"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
@@ -185,6 +185,7 @@
OutputFile="./Blocks3D-Debug.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/Blocks3D.pdb"
SubSystem="1"
@@ -522,7 +523,7 @@
>
</File>
<File
RelativePath=".\ThumbnailGeneratorInstance.cpp"
RelativePath=".\src\source\DataModelV2\ThumbnailGeneratorInstance.cpp"
>
</File>
<File
@@ -674,30 +675,6 @@
</File>
</Filter>
</Filter>
<Filter
Name="PropertiesV2"
>
<File
RelativePath=".\src\source\PropertiesV2\BoolProperty.cpp"
>
</File>
<File
RelativePath=".\src\source\PropertiesV2\Color3Property.cpp"
>
</File>
<File
RelativePath=".\src\source\PropertiesV2\Property.cpp"
>
</File>
<File
RelativePath=".\src\source\PropertiesV2\StringProperty.cpp"
>
</File>
<File
RelativePath=".\src\source\PropertiesV2\Vector3Property.cpp"
>
</File>
</Filter>
<Filter
Name="Helpers"
>
@@ -971,30 +948,6 @@
</File>
</Filter>
</Filter>
<Filter
Name="PropertiesV2"
>
<File
RelativePath=".\src\include\PropertiesV2\BoolProperty.h"
>
</File>
<File
RelativePath=".\src\include\PropertiesV2\Color3Property.h"
>
</File>
<File
RelativePath=".\src\include\PropertiesV2\Property.h"
>
</File>
<File
RelativePath=".\src\include\PropertiesV2\StringProperty.h"
>
</File>
<File
RelativePath=".\src\include\PropertiesV2\Vector3Property.h"
>
</File>
</Filter>
<Filter
Name="Helpers"
>
@@ -1003,14 +956,6 @@
>
</File>
</Filter>
<Filter
Name="B3DEnum"
>
<File
RelativePath=".\src\include\Enum\B3DEnum.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="Resource Files"

View File

@@ -36,7 +36,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
VALUE "FileDescription", "Blocks 3D"
VALUE "FileVersion", VER_STR(APP_VER_STRING)
VALUE "InternalName", "Blocks3D"
VALUE "LegalCopyright", "Blocks3D Team - 2022"
VALUE "LegalCopyright", "Blocks3D Team 2018-2023"
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", "Blocks3D.exe"
VALUE "PrivateBuild", ""

View File

@@ -1,13 +0,0 @@
<html>
<head>
<title> RBX05R Documentation </title>
<meta charset="utf-8">
</head>
<body>
<div class="content" style="text-align:center;">
<h1> ROBLOX 2005 Recreation documentation </h1>
<br>
<h4> Current for: r360 </h4>
</div>
</body>
</html>

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,5 @@
;InnoSetupVersion=5.4.3
;ONLY USE THIS IF YOU COMPILED WITH VISUAL STUDIO 2005!!!
#define AppVer GetFileVersion('..\Blocks3D.exe')
[Setup]
@@ -23,7 +24,7 @@ Type: filesandordirs; Name: "{app}"
Source: "Redist\vcredist_x86.exe"; DestDir: "{tmp}"; Flags: ignoreversion
;Source: "Redist\vcredist_x64.exe"; DestDir: "{tmp}"; Check: "IsWin64"; Flags: ignoreversion
Source: "..\content\*"; DestDir: "{app}\content"; Flags: ignoreversion recursesubdirs
Source: "..\SDL.DLL"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
;Source: "..\SDL.DLL"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
Source: "..\Blocks3D.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
[Registry]

View File

@@ -1,4 +1,5 @@
;InnoSetupVersion=5.4.3
;ONLY USE THIS IF YOU COMPILED WITH VISUAL STUDIO 2005!!!
#define AppVer GetFileVersion('..\Blocks3D.exe')
[Setup]
@@ -26,7 +27,7 @@ Type: filesandordirs; Name: "{app}"
Source: "Redist\vcredist_x86.exe"; DestDir: "{tmp}"; Flags: ignoreversion
;Source: "Redist\vcredist_x64.exe"; DestDir: "{tmp}"; Check: "IsWin64"; Flags: ignoreversion
Source: "..\content\*"; DestDir: "{app}\content"; Flags: ignoreversion recursesubdirs
Source: "..\SDL.DLL"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
;Source: "..\SDL.DLL"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
Source: "..\Blocks3D.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
[Registry]

View File

@@ -0,0 +1,48 @@
;InnoSetupVersion=5.4.3
;ONLY USE THIS IF YOU COMPILED WITH VISUAL STUDIO 2003!!!
#define AppVer GetFileVersion('..\Blocks3D.exe')
[Setup]
AppName=Blocks3D
AppVersion=v{#AppVer}
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
AppPublisherURL=http://blocks3d.com/
AppSupportURL=http://blocks3d.com/
AppUpdatesURL=http://blocks3d.com/
DefaultDirName={%localappdata}\Blocks3D
OutputBaseFilename=B3DSTP
Compression=lzma2
PrivilegesRequired=lowest
WizardImageFile=setup.bmp
DefaultGroupName=Blocks3D
DiskSpanning=yes
SlicesPerDisk=1
DiskSliceSize=1457664
[UninstallDelete]
Type: filesandordirs; Name: "{app}"
[Files]
Source: "Redist\msvcr71.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "Redist\msvcp71.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\content\*"; DestDir: "{app}\content"; Flags: ignoreversion recursesubdirs
Source: "..\Blocks3D.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
[Registry]
[Run]
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: "desktopicon"; Description: "Create Desktop Icons";
Name: "startscut"; Description: "Create Start Menu Icons";

View File

@@ -0,0 +1,45 @@
;InnoSetupVersion=5.4.3
;ONLY USE THIS IF YOU COMPILED WITH VISUAL STUDIO 2003!!!
#define AppVer GetFileVersion('..\Blocks3D.exe')
[Setup]
AppName=Blocks3D
AppVersion=v{#AppVer}
AppId={{4C5DF268-0208-4CDE-A7F0-65F7E2CB5067}
AppPublisherURL=http://blocks3d.com/
AppSupportURL=http://blocks3d.com/
AppUpdatesURL=http://blocks3d.com/
DefaultDirName={%localappdata}\Blocks3D
OutputBaseFilename=Blocks3D_Setup_v{#AppVer}
Compression=lzma2
PrivilegesRequired=lowest
WizardImageFile=setup.bmp
DefaultGroupName=Blocks3D
[UninstallDelete]
Type: filesandordirs; Name: "{app}"
[Files]
Source: "Redist\msvcp71.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "Redist\msvcr71.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\content\*"; DestDir: "{app}\content"; Flags: ignoreversion recursesubdirs
Source: "..\Blocks3D.exe"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
[Registry]
[Run]
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: "desktopicon"; Description: "Create Desktop Icons";
Name: "startscut"; Description: "Create Start Menu Icons";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

BIN
Parts.bmp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,3 +1,6 @@
# IMPORTANT -- READ BEFORE CONTRIBUTING
Work on DataModel V3 will be starting November 3rd at 3PM PDT! This will mean **many PRs involving DataModel V2 may be immediately rejected until completion!** Progress on DataModelV3 can be tracked/contributed to on the feature/datamodel_v3 branch during this time.
# ROBLOX 2005 Recreation Project
## Why are we doing this?
ROBLOX in 2005 was a different game, based around minigames with win and lose conditions rather than a 3D building game. Since this build of the client is presumed lost despite having around 100 users, we have to recreate it. We are using era-appropriate tools for this as well (Visual Studio 2005 and 2005-era compilers), as well as G3D 6.10, the era-appropriate version of the Graphics3D graphics library used by ROBLOX to this day.

BIN
SDL.dll

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -1,6 +1,6 @@
#include <G3DAll.h>
#pragma once
#include <iostream>
#include <string.h>
class AudioPlayer
{
public:

View File

@@ -43,6 +43,14 @@ public:
virtual bool mouseHovered(float, float, RenderDevice* rd);
UDim2 position;
UDim2 size;
static G3D::Color4 translucentBackdrop()
{
return G3D::Color4(0.60000002F, 0.60000002F, 0.60000002F, 0.60000002F);
}
static G3D::Color4 disabledFill()
{
return G3D::Color4(0.69999999F, 0.69999999F, 0.69999999F, 0.5F);
}
protected:
bool mouseInArea(float, float, float, float, float, float);
class ButtonListener* listener;

View File

@@ -27,7 +27,9 @@ public:
void clearMessage();
bool debugGetOpen();
bool getOpen();
bool getOpenModel();
bool load(const char* filename,bool clearObjects);
bool loadModel(const char* filename);
bool readXMLFileStream(std::ifstream* file);
void drawMessage(RenderDevice*);

View File

@@ -1,8 +1,6 @@
#pragma once
#include <G3DAll.h>
#include "propertyGrid.h"
#include "PropertiesV2/StringProperty.h"
#include "PropertiesV2/BoolProperty.h"
#include "map"
class Instance
@@ -28,18 +26,12 @@ public:
void clearChildren();
Instance* getParent();
virtual Instance* clone() const { return new Instance(*this); }
//Deprecated
virtual std::vector<PROPGRIDITEM> getProperties();
//Deprecated
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
virtual std::vector<Property *> collectProperties();
int listicon;
protected:
std::string className;
Instance* parent; // Another pointer.
//Deprecated
PROPGRIDITEM createPGI(LPSTR catalog, LPSTR propName, LPSTR propDesc, LPARAM curVal, INT type, TCHAR choices[] = NULL);
private:
static const std::map<std::string, Instance> g_logLevelsDescriptions;

View File

@@ -13,13 +13,9 @@ public:
virtual void postRender(RenderDevice* rd);
virtual std::vector<PROPGRIDITEM> getProperties();
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
virtual std::vector<Property*> collectProperties();
bool nameShown;
bool controllerFlagShown;
Enum::Controller::Value controller;
virtual void makeJoints();
virtual void setNameShown(bool nameShown);
virtual void setControllerFlagShown(bool controllerFlagShown);
protected:
CoordinateFrame cFrame;
static G3D::Color3 getControllerColor(int controller)

View File

@@ -1,8 +1,6 @@
#pragma once
#include "PVInstance.h"
#include "Enum.h"
#include "PropertiesV2/Color3Property.h"
#include "PropertiesV2/Vector3Property.h"
#define _USE_MATH_DEFINES
#include <cmath>
@@ -61,7 +59,6 @@ public:
//Setters
void setParent(Instance* parent);
void setPosition(Vector3);
void setColor(Color3 color);
void setVelocity(Vector3);
void setRotVelocity(Vector3);
void setCFrame(CoordinateFrame);
@@ -86,7 +83,6 @@ public:
//Properties
virtual std::vector<PROPGRIDITEM> getProperties();
virtual void PropUpdate(LPPROPGRIDITEM &pItem);
virtual std::vector<Property *> collectProperties();
private:
bool anchored;
Vector3 position;

View File

@@ -1,6 +1,4 @@
#pragma once
#include <string>
#include <map>
namespace Enum
{
@@ -9,30 +7,6 @@ namespace Enum
enum Value {
Smooth = 0, Bumps = 1, Hinge = 2, Motor = 3, StepperMotor = 4, Spawn = 5
};
static std::pair<std::string, Value> map_data[] = {
std::make_pair("Smooth", Smooth),
std::make_pair("Bumps", Bumps),
std::make_pair("Hinge", Hinge),
std::make_pair("Motor", Motor),
std::make_pair("StepperMotor", StepperMotor),
std::make_pair("Spawn", Spawn)
};
static std::map<std::string, Value> nameMap(map_data,
map_data + sizeof map_data / sizeof map_data[0]);
static Value getByName(std::string name) {
if(nameMap.find(name) != nameMap.end()){
return nameMap[name];
}
return Smooth;
}
static std::string getName(Value value) {
for (std::map<std::string, Value>::iterator it = nameMap.begin(); it != nameMap.end(); ++it)
if (it->second == value)
return it->first;
return "";
}
}
namespace Shape
{
@@ -63,7 +37,7 @@ namespace Enum
enum Value {
NoSound = 0, Victory = 1, Boing = 2, Bomb = 3,
Ping = 4, Break = 5, Splat = 6, Swoosh = 7,
Snap = 8, Page = 9
Snap = 8, Page = 9, Click = 10, Clock = 11, Step = 12, StepOn = 13,
};
}
}

View File

@@ -1,24 +0,0 @@
#pragma once
namespace Enum
{
class B3DEnum {
public:
B3DEnum(int id, std::string name)
{
this->id = id;
this->name = name;
}
const int getId() {
return id;
}
const std::string getName() {
return name;
}
virtual B3DEnum getByName(std::string name);
virtual B3DEnum getById(int id);
private:
int id;
std::string name;
}
}

View File

@@ -1,23 +0,0 @@
#pragma once
#include "Property.h"
class BoolProperty : public Property
{
public:
typedef void (Instance::*instanceSetter)(bool);
//Win32 why
~BoolProperty(void);
BoolProperty(LPSTR name, LPSTR desc, LPSTR catalog, bool value, Instance * owner, instanceSetter setterFunc)
:Property(name, desc, catalog, (void*)value, owner)
{
this->setterFunc = setterFunc;
}
const void setValue(bool val){
(_owner->*setterFunc)(val);
_value = (void *)val;
}
PROPGRIDITEM getPropGridItem();
void setProperty(LPPROPGRIDITEM &pItem);
private:
instanceSetter setterFunc;
};

View File

@@ -1,24 +0,0 @@
#pragma once
#include "Property.h"
class Color3Property : public Property
{
public:
typedef void (Instance::*instanceSetter)(Color3);
~Color3Property(void){};
Color3Property(LPSTR name, LPSTR desc, LPSTR catalog, Color3 value, Instance * owner, instanceSetter setterFunc)
:Property(name, desc, catalog, &_value, owner)
{
this->_value = value;
this->setterFunc = setterFunc;
}
const void setValue(Color3 val){
(_owner->*setterFunc)(val);
_value = val;
}
PROPGRIDITEM getPropGridItem();
void setProperty(LPPROPGRIDITEM &pItem);
private:
Color3 _value;
instanceSetter setterFunc;
};

View File

@@ -1,38 +0,0 @@
#pragma once
#include <G3DAll.h>
#include "propertyGrid.h"
class Instance;
class Property
{
public:
Property(LPSTR name, LPSTR desc, LPSTR catalog, Instance * owner){
_name = name;
_desc = desc;
_catalog = catalog;
_owner = owner;
}
Property(LPSTR name, LPSTR desc, LPSTR catalog, void* value, Instance * owner){
_name = name;
_desc = desc;
_catalog = catalog;
_owner = owner;
_value = value;
}
~Property(void){}
const void* getValue() {
return _value;
}
const LPSTR getName() {
return _name;
}
virtual PROPGRIDITEM getPropGridItem();
virtual void setProperty(LPPROPGRIDITEM &pItem);
protected:
Instance* _owner;
LPSTR _name;
LPSTR _desc;
LPSTR _catalog;
void* _value;
};

View File

@@ -1,24 +0,0 @@
#pragma once
#include "Property.h"
class StringProperty : public Property
{
public:
typedef void (Instance::*instanceSetter)(std::string);
~StringProperty(void){};
StringProperty(LPSTR name, LPSTR desc, LPSTR catalog, std::string value, Instance * owner, instanceSetter setterFunc)
:Property(name, desc, catalog, &_value, owner)
{
this->_value = value;
this->setterFunc = setterFunc;
}
const void setValue(std::string val){
(_owner->*setterFunc)(val);
_value = val;
}
PROPGRIDITEM getPropGridItem();
void setProperty(LPPROPGRIDITEM &pItem);
private:
std::string _value;
instanceSetter setterFunc;
};

View File

@@ -1,26 +0,0 @@
#pragma once
#include "Property.h"
#include <sstream>
class Vector3Property : public Property
{
public:
typedef void (Instance::*instanceSetter)(Vector3);
~Vector3Property(void){};
Vector3Property(LPSTR name, LPSTR desc, LPSTR catalog, Vector3 value, Instance * owner, instanceSetter setterFunc)
:Property(name, desc, catalog, &_value, owner)
{
this->_value = value;
this->setterFunc = setterFunc;
}
const void setValue(Vector3 val){
(_owner->*setterFunc)(val);
_value = val;
}
PROPGRIDITEM getPropGridItem();
void setProperty(LPPROPGRIDITEM &pItem);
private:
Vector3 _value;
std::string stringRep;
instanceSetter setterFunc;
};

View File

@@ -15,5 +15,4 @@ private:
HWND _explorerComboBox;
void _resize();
void clearExplorer();
void deleteProperties();
};

View File

@@ -20,5 +20,6 @@ private:
bool hasHandles;
int handleGrabbed;
Vector3 center;
Vector3 CenterOffset;
Sphere handles[6];
};

View File

@@ -8,6 +8,7 @@
#include "DataModelV2/ImageButtonInstance.h"
#include "DataModelV2/DataModelInstance.h"
#include "DataModelV2/GuiRootInstance.h"
#include "DataModelV2/SoundService.h"
#include "XplicitNgine/XplicitNgine.h"
#include "CameraController.h"
#include "AudioPlayer.h"
@@ -38,6 +39,7 @@ static bool mouseMovedBeginMotion = false;
static POINT oldGlobalMouse;
Vector2 oldMouse = Vector2(0,0);
float moveRate = 0.5;
float wasPropShown = 0;
void Application::clearInstances()
{
@@ -55,7 +57,7 @@ void Application::setFocus(bool focus)
if(_propWindow != NULL)
if(focus)
{
ShowWindow(_propWindow->_hwndProp, SW_SHOW);
//ShowWindow(_propWindow->_hwndProp, SW_SHOW);
SetWindowPos(_propWindow->_hwndProp, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
else
@@ -512,7 +514,7 @@ void Application::onMouseWheel(int x,int y,short delta)
if (mouseOnScreen==true)
if (cameraController.onMouseWheel(x, y, delta))
{
AudioPlayer::playSound(cameraSound);
_dataModel->getSoundService()->playSound(_dataModel->getSoundService()->findFirstChild("Step"));
}
tool->onMouseScroll(mouse);
}

View File

@@ -1,11 +1,7 @@
#include "AudioPlayer.h"
#include "SDL.h"
#include "SDL_audio.h"
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <Windows.h>
#include <Mmsystem.h>
#define NUM_SOUNDS 32
static SDL_AudioSpec fmt;
static bool initiated = false;
AudioPlayer::AudioPlayer(void)
@@ -15,98 +11,15 @@ AudioPlayer::AudioPlayer(void)
AudioPlayer::~AudioPlayer(void)
{
SDL_CloseAudio();
}
void AudioPlayer::init()
{
initiated = true;
extern void mixaudio(void *unused, Uint8 *stream, int len);
fmt.freq = 22050;
fmt.format = AUDIO_S16LSB;
fmt.channels = 2;
fmt.samples = 1024; /* A good value for games */
fmt.callback = mixaudio;
fmt.userdata = NULL;
/* Open the audio device and start playing sound! */
if ( SDL_OpenAudio(&fmt, NULL) < 0 ) {
fprintf(stderr, "Unable to open audio: %s\n", SDL_GetError());
}
SDL_PauseAudio(0);
}
static struct sample {
Uint8 *data;
Uint32 dpos;
Uint32 dlen;
} sounds[NUM_SOUNDS];
void mixaudio(void *unused, Uint8 *stream, int len)
{
int i;
Uint32 amount;
for ( i=0; i<NUM_SOUNDS; ++i ) {
amount = (sounds[i].dlen-sounds[i].dpos);
if ( amount > (Uint32)len ) {
amount = len;
}
SDL_MixAudio(stream, &sounds[i].data[sounds[i].dpos], amount, SDL_MIX_MAXVOLUME);
sounds[i].dpos += amount;
}
}
void AudioPlayer::playSound(std::string fileString)
{
if(initiated)
{
char *file = new char[fileString.length() + 1];
strcpy(file, fileString.c_str());
int index;
SDL_AudioSpec wave;
Uint8 *data;
Uint32 dlen;
SDL_AudioCVT cvt;
/* Look for an empty (or finished) sound slot */
for ( index=0; index<NUM_SOUNDS; ++index ) {
if ( sounds[index].dpos == sounds[index].dlen ) {
break;
}
}
if ( index == NUM_SOUNDS )
return;
/* Load the sound file and convert it to 16-bit stereo at 22kHz */
if ( SDL_LoadWAV(file, &wave, &data, &dlen) == NULL ) {
fprintf(stderr, "Couldn't load %s: %s\n", file, SDL_GetError());
return;
}
SDL_BuildAudioCVT(&cvt, wave.format, wave.channels, wave.freq,
AUDIO_S16, 2, fmt.freq);
cvt.buf = (Uint8*)malloc(dlen*cvt.len_mult);
memcpy(cvt.buf, data, dlen);
cvt.len = dlen;
SDL_ConvertAudio(&cvt);
SDL_FreeWAV(data);
/* Put the sound data in the slot (it starts playing immediately) */
if ( sounds[index].data ) {
free(sounds[index].data);
}
SDL_LockAudio();
sounds[index].data = cvt.buf;
sounds[index].dlen = cvt.len_cvt;
sounds[index].dpos = 0;
SDL_UnlockAudio();
delete [] file;
}
else
{
OutputDebugString("Audio player not initialized, sound will not play\r\n");
}
//TODO probably use something a bit better
PlaySound(fileString.c_str(), NULL, SND_FILENAME | SND_ASYNC);
}

View File

@@ -471,7 +471,6 @@ bool DataModelInstance::scanXMLObject(xml_node<> * scanNode)
{
return false;
}
}
}
/*
@@ -515,6 +514,27 @@ bool DataModelInstance::load(const char* filename, bool clearObjects)
}
}
bool DataModelInstance::loadModel(const char* filename)
{
ifstream levelFile(filename,ios::binary);
if (levelFile)
{
readXMLFileStream(&levelFile);
//resetEngine();
selectionService->clearSelection();
selectionService->addSelected(this);
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);
@@ -573,7 +593,7 @@ bool DataModelInstance::getOpen()
of.lpstrFile = szFile ;
of.lpstrFile[0]='\0';
of.nMaxFile=500;
of.lpstrTitle="Hello";
of.lpstrTitle="Open";
of.Flags = OFN_FILEMUSTEXIST;
ShowCursor(TRUE);
BOOL file = GetOpenFileName(&of);
@@ -584,6 +604,30 @@ bool DataModelInstance::getOpen()
}
return true;
}
bool DataModelInstance::getOpenModel()
{
_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="Open";
of.Flags = OFN_FILEMUSTEXIST;
ShowCursor(TRUE);
BOOL file = GetOpenFileName(&of);
if (file)
{
_loadedFileName = of.lpstrFile;
loadModel(of.lpstrFile);
}
return true;
}
void DataModelInstance::setMessage(std::string msg)
{
message = msg;
@@ -623,9 +667,9 @@ void DataModelInstance::drawMessage(RenderDevice* rd)
}
}
char brkc[12];
sprintf_s(brkc, "%d", brickCount);
_snprintf(brkc, 12, "%d", brickCount);
char instc[12];
sprintf_s(instc, "%d", instCount);
_snprintf(instc, 12, "%d", instCount);
message = "Bricks: ";
message += brkc;
message += " Snaps: ";

View File

@@ -6,6 +6,7 @@
#include "DataModelV2/ImageButtonInstance.h"
#include "DataModelV2/ToggleImageButtonInstance.h"
#include "DataModelV2/GuiRootInstance.h"
#include "DataModelV2/SelectionService.h"
#include "DataModelV2/ImageButtonInstance.h"
#include "Globals.h"
#include "StringFunctions.h"
@@ -213,13 +214,14 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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->textColor = Color3(0,1,1);
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->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
button->font = g_fntlighttrek;
button->fontLocationRelativeTo = Vector2(10, 0);
button->setParent(this);
@@ -229,13 +231,14 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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->textColor = Color3(0,1,1);
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->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
button->font = g_fntlighttrek;
button->fontLocationRelativeTo = Vector2(10, 0);
button->setParent(this);
@@ -245,26 +248,45 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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->textColor = Color3(0,1,1);
button->boxColor = Color4::clear();
button->textSize = 12;
button->title = "Duplicate";
button->setAllColorsSame();
button->textColorDis = Color3(0.8F,0.8F,0.8F);
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
button->font = g_fntlighttrek;
button->fontLocationRelativeTo = Vector2(10, 0);
button->setParent(this);
button->name = "Duplicate";
button->setButtonListener(gud);
//g_fntlighttrek->draw2D(rd,"MENU", Vector2(10,332), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F));
button = makeTextButton();
button->boxBegin = Vector2(0,332);
button->boxEnd = Vector2(80,352);
button->textOutlineColor = Color4(0.5F,0.5F,0.5F,0.5F);
button->textColor = Color3::white();
button->boxColor = Color4::clear();
button->textSize = 14;
button->title = "MENU";
button->setAllColorsSame();
button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F);
button->font = g_fntlighttrek;
button->fontLocationRelativeTo = Vector2(10, 0);
button->setParent(this);
button->name = "MENU";
button->setButtonListener(menuListener);
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")),
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"))
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";
@@ -274,17 +296,17 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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 = 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);
@@ -293,10 +315,10 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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);
@@ -304,10 +326,10 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
instance->setButtonListener(msl);
instance = makeImageButton(
Texture::fromFile(GetFileInPath("/content/images/SelectionRotate.png")),
Texture::fromFile(GetFileInPath("/content/images/SelectionRotate_ovr.png")),
Texture::fromFile(&GetFileInPath("/content/images/SelectionRotate.png")),
Texture::fromFile(&GetFileInPath("/content/images/SelectionRotate_ovr.png")),
NULL,
Texture::fromFile(GetFileInPath("/content/images/SelectionRotate_ds.png")));
Texture::fromFile(&GetFileInPath("/content/images/SelectionRotate_ds.png")));
instance->size = Vector2(30,30);
instance->position = Vector2(10, 175);
instance->setParent(this);
@@ -315,10 +337,10 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
instance->setButtonListener(rbl);
instance = makeImageButton(
Texture::fromFile(GetFileInPath("/content/images/SelectionTilt.png")),
Texture::fromFile(GetFileInPath("/content/images/SelectionTilt_ovr.png")),
Texture::fromFile(&GetFileInPath("/content/images/SelectionTilt.png")),
Texture::fromFile(&GetFileInPath("/content/images/SelectionTilt_ovr.png")),
NULL,
Texture::fromFile(GetFileInPath("/content/images/SelectionTilt_ds.png")));
Texture::fromFile(&GetFileInPath("/content/images/SelectionTilt_ds.png")));
instance->size = Vector2(30,30);
instance->position = Vector2(40, 175);
instance->setParent(this);
@@ -327,10 +349,10 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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);
@@ -338,9 +360,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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;
@@ -350,9 +372,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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;
@@ -362,9 +384,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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;
@@ -374,9 +396,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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;
@@ -386,9 +408,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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;
@@ -398,9 +420,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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;
@@ -410,9 +432,9 @@ GuiRootInstance::GuiRootInstance() : _message(""), _messageTime(0)
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")));
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;
@@ -465,7 +487,7 @@ void GuiRootInstance::renderGUI(G3D::RenderDevice* rd, double fps)
//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);
@@ -502,6 +524,9 @@ void GuiRootInstance::update()
Instance * obj3 = this->findFirstChild("UnGroup");
Instance * obj4 = this->findFirstChild("Rotate");
Instance * obj5 = this->findFirstChild("Tilt");
SelectionService* getSelectionService = g_dataModel->getSelectionService();
if(obj != NULL && obj2 != NULL && obj3 != NULL && obj4 !=NULL && obj5 != NULL && obj6 != NULL)
{
BaseButtonInstance* button = (BaseButtonInstance*)obj;
@@ -516,15 +541,23 @@ void GuiRootInstance::update()
button4->disabled = true;
button5->disabled = true;
button6->disabled = true;
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
for(size_t i = 0; i < getSelectionService->getSelection().size(); i++)
if(getSelectionService->getSelection()[i]->canDelete)
{
button->disabled = false;
button2->disabled = false;
button3->disabled = false;
button4->disabled = false;
button5->disabled = false;
button6->disabled = false;
if (getSelectionService->getSelection().size() > 1){
button2->disabled = false;
}
if (dynamic_cast<GroupInstance*>(getSelectionService->getSelection()[i])){
button3->disabled = false;
}
break;
}
}

View File

@@ -80,13 +80,6 @@ std::vector<PROPGRIDITEM> Instance::getProperties()
}
std::vector<Property *> Instance::collectProperties()
{
std::vector<Property *> properties;
properties.push_back(new StringProperty("Name", "The name of this instance", "Properties", name, this, &Instance::setName));
return properties;
}
Instance::~Instance(void)
{

View File

@@ -109,8 +109,8 @@ std::vector<PROPGRIDITEM> LevelInstance::getProperties()
PIT_CHECK
));
sprintf_s(timerTxt, "%g", timer);
sprintf_s(scoreTxt, "%d", score);
_snprintf(timerTxt, 12, "%g", timer);
_snprintf(scoreTxt, 12, "%d", score);
properties.push_back(createPGI("Gameplay",
"InitialTimerValue",
"The amount of time in seconds the player has to complete this level.\r\n\r\nPut 0 if time is limitless.",

View File

@@ -63,33 +63,6 @@ static Enum::Controller::Value strEnum(TCHAR * tval)
}
std::vector<Property *> PVInstance::collectProperties()
{
std::vector<Property *> properties = Instance::collectProperties();
properties.push_back(new BoolProperty(
"NameShown",
"This chooses whether the item name is shown",
"Item",
nameShown,
this,
(BoolProperty::instanceSetter)&PVInstance::setNameShown));
properties.push_back(new BoolProperty(
"ControllerFlagShown",
"This chooses whether the item's ControllerFlag is shown",
"Item",
controllerFlagShown,
this,
(BoolProperty::instanceSetter)&PVInstance::setControllerFlagShown));
return properties;
}
void PVInstance::setNameShown(bool nameShown){
this->nameShown = nameShown;
}
void PVInstance::setControllerFlagShown(bool controllerFlagShown){
this->controllerFlagShown = controllerFlagShown;
}
std::vector<PROPGRIDITEM> PVInstance::getProperties()
{
@@ -117,15 +90,6 @@ std::vector<PROPGRIDITEM> PVInstance::getProperties()
return properties;
}
void PVInstance::makeJoints()
{
for(size_t i = 0; i < children.size(); i++)
{
}
}
void PVInstance::PropUpdate(LPPROPGRIDITEM &pItem)
{
if(strcmp(pItem->lpszPropName, "NameShown") == 0)

View File

@@ -495,6 +495,14 @@ static TCHAR* strSoundType(int option)
return "Swoosh";
case Enum::Sound::Page:
return "Page";
case Enum::Sound::Click:
return "Click";
case Enum::Sound::Clock:
return "Clock";
case Enum::Sound::Step:
return "Step";
case Enum::Sound::StepOn:
return "StepOn";
}
return "NoSound";
}
@@ -521,6 +529,14 @@ static Enum::Sound::Value EnumOnTouchSoundType(TCHAR* option)
return Enum::Sound::Ping;
if(strcmp("Snap", option) == 0)
return Enum::Sound::Snap;
if(strcmp("Click", option) == 0)
return Enum::Sound::Click;
if(strcmp("Clock", option) == 0)
return Enum::Sound::Clock;
if(strcmp("Step", option) == 0)
return Enum::Sound::Step;
if(strcmp("StepOn", option) == 0)
return Enum::Sound::StepOn;
return Enum::Sound::NoSound;
}
@@ -585,6 +601,18 @@ void PartInstance::onTouch()
case Enum::Sound::Swoosh:
sndService->playSound(sndService->findFirstChild("Swoosh"));
break;
case Enum::Sound::Click:
sndService->playSound(sndService->findFirstChild("Click"));
break;
case Enum::Sound::Clock:
sndService->playSound(sndService->findFirstChild("Clock"));
break;
case Enum::Sound::Step:
sndService->playSound(sndService->findFirstChild("Step"));
break;
case Enum::Sound::StepOn:
sndService->playSound(sndService->findFirstChild("StepOn"));
break;
}
}
@@ -674,49 +702,6 @@ void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
else PVInstance::PropUpdate(item);
}
void PartInstance::setColor(Color3 color)
{
this->color = color;
changed = true;
}
std::vector<Property *> PartInstance::collectProperties()
{
std::vector<Property *> properties = PVInstance::collectProperties();
properties.push_back(new Color3Property(
"Color3",
"The color of the selected part",
"Properties",
color,
this,
(Color3Property::instanceSetter)&PartInstance::setColor));
properties.push_back(new BoolProperty(
"Anchored",
"Whether the block can move or not",
"Item",
anchored,
this,
(BoolProperty::instanceSetter)&PartInstance::setAnchored));
properties.push_back(new Vector3Property(
"Offset",
"The position of the object in the workspace",
"Item",
position,
this,
(Vector3Property::instanceSetter)&PartInstance::setPosition));
properties.push_back(new Vector3Property(
"Size",
"The size of the object in the workspace",
"Item",
size,
this,
(Vector3Property::instanceSetter)&PartInstance::setSize));
return properties;
}
// This needs to be changed, buffer size of 12 is way too small
// Crash occurs if you put a huge number in
char changeTimerTxt[12];
@@ -738,14 +723,14 @@ std::vector<PROPGRIDITEM> PartInstance::getProperties()
(LPARAM)anchored,
PIT_CHECK
));
sprintf_s(pto, "%g, %g, %g", position.x, position.y, position.z);
_snprintf(pto, 512, "%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);
_snprintf(pto2, 512, "%g, %g, %g", size.x, size.y, size.z);
properties.push_back(createPGI("Item",
"Size",
"The size of the object in the workspace",
@@ -771,11 +756,11 @@ std::vector<PROPGRIDITEM> PartInstance::getProperties()
"What sound plays when touched",
(LPARAM)strSoundType(OnTouchSound),
PIT_COMBO,
TEXT("NoSound\0Victory\0Boing\0Break\0Snap\0Bomb\0Splat\0Page\0Ping\0Swoosh\0")
TEXT("NoSound\0Victory\0Boing\0Break\0Snap\0Bomb\0Splat\0Page\0Ping\0Swoosh\0Click\0Clock\0Step\0StepOn")
));
sprintf_s(changeScoreTxt, "%d", changeScore);
sprintf_s(changeTimerTxt, "%g", changeTimer);
_snprintf(changeScoreTxt, 12, "%d", changeScore);
_snprintf(changeTimerTxt, 12, "%g", changeTimer);
properties.push_back(createPGI("OnTouch",
"ChangeScore",
"How the score is affected when touched",

View File

@@ -86,17 +86,17 @@ void SelectionService::render(RenderDevice * rd)
void drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, Vector3 size, Vector3 pos, CoordinateFrame c)
{
Color3 outline = Color3::cyan();//Color3(0.098F,0.6F,1.0F);
float offsetSize = 0.05F;
float offsetSize = 0.1F;
//X
Draw::box(c.toWorldSpace(Box(Vector3(from.x - offsetSize, from.y + offsetSize, from.z + offsetSize), Vector3(to.x + offsetSize, from.y - offsetSize, from.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(from.x - offsetSize, to.y + offsetSize, from.z + offsetSize), Vector3(to.x + offsetSize, to.y - offsetSize, from.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(from.x - offsetSize, to.y + offsetSize, to.z + offsetSize), Vector3(to.x + offsetSize, to.y - offsetSize, to.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(from.x - offsetSize, from.y + offsetSize, to.z + offsetSize), Vector3(to.x + offsetSize, from.y - offsetSize, to.z - offsetSize))), rd, outline, Color4::clear());
//Y
Draw::box(c.toWorldSpace(Box(Vector3(from.x + offsetSize, from.y - offsetSize + 0.1, from.z + offsetSize), Vector3(from.x - offsetSize, to.y + offsetSize - 0.1, from.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(to.x + offsetSize, from.y - offsetSize + 0.1, from.z + offsetSize), Vector3(to.x - offsetSize, to.y + offsetSize - 0.1, from.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(to.x + offsetSize, from.y - offsetSize + 0.1, to.z + offsetSize), Vector3(to.x - offsetSize, to.y + offsetSize-0.1, to.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(from.x + offsetSize, from.y - offsetSize + 0.1, to.z + offsetSize), Vector3(from.x - offsetSize, to.y + offsetSize - 0.1, to.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(from.x + offsetSize, from.y - offsetSize + 0.2, from.z + offsetSize), Vector3(from.x - offsetSize, to.y + offsetSize - 0.2, from.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(to.x + offsetSize, from.y - offsetSize + 0.2, from.z + offsetSize), Vector3(to.x - offsetSize, to.y + offsetSize - 0.2, from.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(to.x + offsetSize, from.y - offsetSize + 0.2, to.z + offsetSize), Vector3(to.x - offsetSize, to.y + offsetSize-0.1, to.z - offsetSize))), rd, outline, Color4::clear());
Draw::box(c.toWorldSpace(Box(Vector3(from.x + offsetSize, from.y - offsetSize + 0.2, to.z + offsetSize), Vector3(from.x - offsetSize, to.y + offsetSize - 0.2, to.z - offsetSize))), rd, outline, Color4::clear());
//Z
Draw::box(c.toWorldSpace(Box(Vector3(from.x + offsetSize, from.y + offsetSize, from.z - offsetSize), Vector3(from.x - offsetSize, from.y - offsetSize, to.z + offsetSize))), rd, outline, Color4::clear());

View File

@@ -67,6 +67,30 @@ SoundService::SoundService()
stockSound->setName("Page");
stockSound->setSoundId("/content/sounds/pageturn.wav");
stockSound->setParent(this);
// Click
stockSound = new SoundInstance();
stockSound->setName("Click");
stockSound->setSoundId("/content/sounds/switch.wav");
stockSound->setParent(this);
// Clock
stockSound = new SoundInstance();
stockSound->setName("Clock");
stockSound->setSoundId("/content/sounds/clickfast.wav");
stockSound->setParent(this);
// Step
stockSound = new SoundInstance();
stockSound->setName("Step");
stockSound->setSoundId("/content/sounds/SWITCH3.wav");
stockSound->setParent(this);
// StepOn
stockSound = new SoundInstance();
stockSound->setName("StepOn");
stockSound->setSoundId("/content/sounds/flashbulb.wav");
stockSound->setParent(this);
}
SoundService::~SoundService(void)

View File

@@ -1,5 +1,5 @@
#include "DataModelV2/TextButtonInstance.h"
#include "DataModelV2/BaseGuiInstance.h"
TextButtonInstance::TextButtonInstance(void)
{
@@ -11,7 +11,7 @@ TextButtonInstance::TextButtonInstance(void)
title = "TextBox";
textColor = Color4(1, 1, 1, 1);
textOutlineColor = Color4(0, 0, 0, 0);
boxColor = Color4(0.6F,0.6F,0.6F,0.4F);
boxColor = BaseGuiInstance::translucentBackdrop();
boxOutlineColor = Color4(0, 0, 0, 0);
setAllColorsSame();
textSize = 12;

View File

@@ -1,65 +1,79 @@
#include <G3DAll.h>
#include "Application.h"
#include "Globals.h"
#include "AudioPlayer.h"
#include "DataModelV2/SelectionService.h"
#include "Listener/GUDButtonListener.h"
#include "DataModelV2/SoundService.h"
void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
{
SelectionService* selectionService = g_dataModel->getSelectionService();
SoundService* soundService = g_dataModel->getSoundService();
bool cont = false;
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
for(size_t i = 0; i < selectionService->getSelection().size(); i++)
if(selectionService->getSelection()[i]->canDelete)
{
cont = true;
break;
}
if (cont)
{
AudioPlayer::playSound(dingSound);
if(button->disabled == false){
soundService->playSound(soundService->findFirstChild("Ping"));
}
if(button->name == "Duplicate")
{
std::vector<Instance*> newinst;
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
for(size_t i = 0; i < selectionService->getSelection().size(); i++)
{
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
if(selectionService->getSelection()[i]->canDelete)
{
Instance* tempinst = g_dataModel->getSelectionService()->getSelection()[i];
Instance* tempinst = selectionService->getSelection()[i];
Instance* clonedInstance = g_dataModel->getSelectionService()->getSelection()[i]->clone();
Instance* clonedInstance = selectionService->getSelection()[i]->clone();
newinst.push_back(tempinst);
if (clonedInstance->getClassName() == "PVInstance"){
PartInstance* Part = dynamic_cast<PartInstance*>(clonedInstance);
Part->setPosition(Part->getPosition() + G3D::Vector3(0, Part->getSize().y, 0));
}
newinst.push_back(clonedInstance);
}
}
g_dataModel->getSelectionService()->clearSelection();
g_dataModel->getSelectionService()->addSelected(newinst);
selectionService->clearSelection();
selectionService->addSelected(newinst);
}
else if(button->name == "Group")
{
if (selectionService->getSelection().size() > 1){
GroupInstance * inst = new GroupInstance();
inst->setParent(g_dataModel->getWorkspace());
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
for(size_t i = 0; i < selectionService->getSelection().size(); i++)
{
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
if(selectionService->getSelection()[i]->canDelete)
{
g_dataModel->getSelectionService()->getSelection()[i]->setParent(inst);
if(PartInstance* part = dynamic_cast<PartInstance*>(g_dataModel->getSelectionService()->getSelection()[i]))
selectionService->getSelection()[i]->setParent(inst);
if(PartInstance* part = dynamic_cast<PartInstance*>(selectionService->getSelection()[i]))
{
inst->primaryPart = part;
}
}
}
g_dataModel->getSelectionService()->clearSelection();
g_dataModel->getSelectionService()->addSelected(inst);
selectionService->clearSelection();
selectionService->addSelected(inst);
}
}
else if(button->name == "UnGroup")
{
std::vector<Instance*> newinst;
for(size_t i = 0; i < g_dataModel->getSelectionService()->getSelection().size(); i++)
for(size_t i = 0; i < selectionService->getSelection().size(); i++)
{
if(g_dataModel->getSelectionService()->getSelection()[i]->canDelete)
{
if(GroupInstance* model = dynamic_cast<GroupInstance*>(g_dataModel->getSelectionService()->getSelection()[i]))
Instance* selection = selectionService->getSelection()[i];
if(GroupInstance* model = dynamic_cast<GroupInstance*>(selection))
{
newinst = model->unGroup();
model->setParent(NULL);
@@ -67,9 +81,8 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
model = NULL;
}
}
}
g_dataModel->getSelectionService()->clearSelection();
g_dataModel->getSelectionService()->addSelected(newinst);
selectionService->clearSelection();
selectionService->addSelected(newinst);
}
}
}

View File

@@ -2,6 +2,9 @@
#include "DataModelV2/ToggleImageButtonInstance.h"
#include "Application.h"
#include "Globals.h"
bool menuOpen = false;
void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
{
if(button->name == "go")
@@ -49,4 +52,36 @@ void MenuButtonListener::onButton1MouseClick(BaseButtonInstance* button)
break;
}
}
else if (button->name == "insert"){
HMENU mainmenu = CreatePopupMenu();
AppendMenu(mainmenu, MF_STRING, 104, "Model...");
POINT p;
GetCursorPos(&p);
int menuClick = TrackPopupMenu(mainmenu, TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, 0, Globals::mainHwnd, 0);
switch (menuClick)
{
case 104:
g_dataModel->getOpenModel();
break;
}
}
else if (button->name == "MENU")
{
menuOpen = !menuOpen;
ShowWindow(g_usableApp->_propWindow->_hwndProp, menuOpen);
if(TextButtonInstance* textButton = dynamic_cast<TextButtonInstance*>(button))
{
if(menuOpen)
{
textButton->textColor = Color3(0,1,1);
textButton->textColorOvr = Color3(0,1,1);
}
else
{
textButton->textColor = Color3::white();
textButton->textColorOvr = Color3::white();
}
}
}
}

View File

@@ -1,16 +0,0 @@
#include "PropertiesV2/BoolProperty.h"
PROPGRIDITEM BoolProperty::getPropGridItem(){
PROPGRIDITEM pItem;
PropGrid_ItemInit(pItem);
pItem.lpszCatalog=_catalog;
pItem.lpszPropName=_name;
pItem.lpszPropDesc=_desc;
pItem.lpCurValue=_value > 0;
pItem.iItemType=PIT_CHECK;
return pItem;
}
void BoolProperty::setProperty(LPPROPGRIDITEM &pItem){
setValue(pItem->lpCurValue == TRUE);
}

View File

@@ -1,21 +0,0 @@
#include "PropertiesV2/Color3Property.h"
PROPGRIDITEM Color3Property::getPropGridItem(){
PROPGRIDITEM pItem;
PropGrid_ItemInit(pItem);
pItem.lpszCatalog=_catalog;
pItem.lpszPropName=_name;
pItem.lpszPropDesc=_desc;
pItem.lpCurValue=RGB((_value.r*255),(_value.g*255),(_value.b*255));
pItem.iItemType=PIT_COLOR;
return pItem;
}
void Color3Property::setProperty(LPPROPGRIDITEM &pItem){
setValue(Color3(
GetRValue(pItem->lpCurValue)/255.0F,
GetGValue(pItem->lpCurValue)/255.0F,
GetBValue(pItem->lpCurValue)/255.0F
));
}

View File

@@ -1,14 +0,0 @@
#include "PropertiesV2/Property.h"
PROPGRIDITEM Property::getPropGridItem(){
PROPGRIDITEM pItem;
PropGrid_ItemInit(pItem);
pItem.lpszCatalog=_catalog;
pItem.lpszPropName=_name;
pItem.lpszPropDesc=_desc;
pItem.iItemType=PIT_EDIT;
return pItem;
}
void Property::setProperty(LPPROPGRIDITEM &pItem){
}

View File

@@ -1,16 +0,0 @@
#include "PropertiesV2/StringProperty.h"
PROPGRIDITEM StringProperty::getPropGridItem(){
PROPGRIDITEM pItem;
PropGrid_ItemInit(pItem);
pItem.lpszCatalog=_catalog;
pItem.lpszPropName=_name;
pItem.lpszPropDesc=_desc;
pItem.lpCurValue=(LPARAM)_value.c_str();
pItem.iItemType=PIT_EDIT;
return pItem;
}
void StringProperty::setProperty(LPPROPGRIDITEM &pItem){
setValue((LPSTR)pItem->lpCurValue);
}

View File

@@ -1,33 +0,0 @@
#include "PropertiesV2/Vector3Property.h"
PROPGRIDITEM Vector3Property::getPropGridItem(){
std::stringstream s;
s << _value.x << ", " << _value.y << ", " << _value.z;
stringRep = s.str();
PROPGRIDITEM pItem;
PropGrid_ItemInit(pItem);
pItem.lpszCatalog=_catalog;
pItem.lpszPropName=_name;
pItem.lpszPropDesc=_desc;
pItem.lpCurValue=(LPARAM)stringRep.c_str();
pItem.iItemType=PIT_EDIT;
return pItem;
}
void Vector3Property::setProperty(LPPROPGRIDITEM &pItem){
std::string str = (LPTSTR)pItem->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)
{
setValue(Vector3(vect.at(0),vect.at(1),vect.at(2)));
}
}

View File

@@ -6,7 +6,7 @@
#include "strsafe.h"
#include "Application.h"
std::vector<Property*> prop;
std::vector<PROPGRIDITEM> prop;
std::vector<Instance*> children;
Instance * selectedInstance;
Instance * parent = NULL;
@@ -186,15 +186,8 @@ LRESULT CALLBACK PropProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
LPNMHDR pnm = (LPNMHDR)lParam;
LPNMPROPGRID lpnmp = (LPNMPROPGRID)pnm;
LPPROPGRIDITEM item = PropGrid_GetItemData(pnm->hwndFrom,lpnmp->iIndex);
for(size_t i = 0; i < prop.size(); i++)
{
if(strcmp(item->lpszPropName, prop[i]->getName()) == 0)
{
prop[i]->setProperty(item);
}
}
//selectedInstance->PropUpdate(item);
propWind->UpdateSelected(g_dataModel->getSelectionService()->getSelection());
selectedInstance->PropUpdate(item);
//propWind->UpdateSelected(selectedInstance);
}
}
break;
@@ -251,7 +244,7 @@ bool PropertyWindow::onCreate(int x, int y, int sx, int sy, HMODULE hThisInstanc
WS_EX_TOOLWINDOW,
"propHWND",
"PropertyGrid",
WS_VISIBLE | WS_POPUPWINDOW | WS_THICKFRAME | WS_CAPTION,
WS_POPUPWINDOW | WS_THICKFRAME | WS_CAPTION,
CW_USEDEFAULT,
CW_USEDEFAULT,
300,
@@ -349,7 +342,6 @@ void PropertyWindow::_resize()
void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
{
deleteProperties();
if(instances.size() <= 0)
{
ClearProperties();
@@ -357,13 +349,13 @@ void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
}
Instance * instance = instances[0];
PropGrid_ResetContent(_propGrid);
prop = instance->collectProperties();
prop = instance->getProperties();
//if (selectedInstance != instance)
{
selectedInstance = instance;
for(size_t i = 0; i < prop.size(); i++)
{
::PROPGRIDITEM item = prop.at(i)->getPropGridItem();
::PROPGRIDITEM item = prop.at(i);
PropGrid_AddItem(_propGrid, &item);
//PRGP propgp;
//propgp.instance = instance;
@@ -379,16 +371,6 @@ void PropertyWindow::UpdateSelected(std::vector<Instance *> instances)
void PropertyWindow::ClearProperties()
{
deleteProperties();
clearExplorer();
PropGrid_ResetContent(_propGrid);
}
void PropertyWindow::deleteProperties()
{
while(prop.size() > 0) {
Property * toDelete = prop.back();
prop.pop_back();
delete toDelete;
}
}

View File

@@ -33,7 +33,82 @@ void DraggerTool::onMouseMoved(Mouse mouse)
{
if(handleGrabbed != -1)
{
std::vector<Instance *> selection = g_dataModel->getSelectionService()->getSelection();
if(selection.size() == 1)
{
PartInstance* part = dynamic_cast<PartInstance*>(selection[0]);
if(part)
{
Ray ray = G3D::Ray::fromOriginAndDirection(part->getPosition(), part->getCFrame().lookVector()*100);
switch(handleGrabbed){
case 0:
case 1:
ray = G3D::Ray::fromOriginAndDirection(part->getPosition(), part->getCFrame().upVector()*100);
break;
case 2:
case 3:
ray = G3D::Ray::fromOriginAndDirection(part->getPosition(), part->getCFrame().lookVector()*100);
break;
case 4:
case 5:
ray = G3D::Ray::fromOriginAndDirection(part->getPosition(), part->getCFrame().leftVector()*100);
break;
}
CenterOffset = handles[handleGrabbed].center;
Vector3 intersection1 = ray.intersection(mouse.getPlane());
Vector3 intersection2 = ray.intersection(mouse.getInversePlane());
if(intersection1.isFinite())
{
intersection1.x = (ceil(intersection1.x / 1) * 1);
intersection1.y = (ceil(intersection1.y / 1) * 1);
intersection1.z = (ceil(intersection1.z / 1) * 1);
if ( ((int)part->getSize().x)%2 == 1 )
intersection1.x += 0.5;
//intersection1.y = mouse.getPlane() + part->getSize().y/2 - 0.5;
if ( ((int)part->getSize().z)%2 == 1 )
intersection1.z += 0.5;
part->setPosition(intersection1 + (part->getPosition() - CenterOffset));
}
else if(intersection2.isFinite())
{
intersection2.x = (ceil(intersection2.x / 1) * 1);
intersection2.y = (ceil(intersection2.y / 1) * 1);
intersection2.z = (ceil(intersection2.z / 1) * 1);
if ( ((int)part->getSize().x)%2 == 1)
intersection2.x += 0.5;
//intersection2.y = mouse.getInversePlane() + part->getSize().y/2 - 0.5;
part->setPosition(intersection2 + (part->getPosition() - CenterOffset));
}
float offset = 2;
center = part->getPosition();
Vector3 size = part->getSize();
CoordinateFrame cFrame = part->getCFrame();
handles[0].center = center + cFrame.upVector()*(size.y/2+offset);
handles[1].center = center - cFrame.upVector()*(size.y/2+offset);
handles[2].center = center + cFrame.lookVector()*(size.z/2+offset);
handles[3].center = center - cFrame.lookVector()*(size.z/2+offset);
handles[4].center = center + cFrame.leftVector()*(size.x/2+offset);
handles[5].center = center - cFrame.leftVector()*(size.x/2+offset);
}
}
}
else ArrowTool::onMouseMoved(mouse);
}
@@ -112,22 +187,23 @@ void DraggerTool::render(RenderDevice * rd, Mouse mouse)
G3D::Draw::arrow(center, handles[i].center-center, rd, Color3::orange(), 2);
}
}
std::vector<Instance *> selection = g_dataModel->getSelectionService()->getSelection();
for(size_t i = 0; i < selection.size(); i++)
{
if(PartInstance* part = dynamic_cast<PartInstance*>(selection[i]))
{
Ray ray = G3D::Ray::fromOriginAndDirection(part->getPosition(), part->getCFrame().lookVector()*100);
Vector3 intersection1 = ray.intersection(mouse.getPlane());
Vector3 intersection2 = ray.intersection(mouse.getInversePlane());
if(intersection1.isFinite())
{
Draw::sphere(Sphere(intersection1, 2), rd);
}
else if(intersection2.isFinite())
{
Draw::sphere(Sphere(intersection2, 2), rd);
}
//Ray ray = G3D::Ray::fromOriginAndDirection(part->getPosition(), part->getCFrame().lookVector()*100);
//Vector3 intersection1 = ray.intersection(mouse.getPlane());
//Vector3 intersection2 = ray.intersection(mouse.getInversePlane());
//if(intersection1.isFinite())
//{
// Draw::sphere(Sphere(intersection1, 2), rd);
//}
//else if(intersection2.isFinite())
//{
// Draw::sphere(Sphere(intersection2, 2), rd);
//}
}
}
}

View File

@@ -51,12 +51,12 @@ void collisionCallback(void *data, dGeomID o1, dGeomID o2)
contact[i].surface.mode = dContactBounce | dContactSlip1 | dContactSlip2 | dContactSoftERP | dContactSoftCFM | dContactApprox1;
// Define contact surface properties
contact[i].surface.bounce = 0.5; //Elasticity
contact[i].surface.bounce = 0.5F; //Elasticity
contact[i].surface.mu = 0.4F; //Friction
contact[i].surface.slip1 = 0.0;
contact[i].surface.slip2 = 0.0;
contact[i].surface.soft_erp = 0.8F;
contact[i].surface.soft_cfm = 0.01F;
contact[i].surface.soft_cfm = 0.005F;
// Create joints
dJointID c = dJointCreateContact(

View File

@@ -142,6 +142,12 @@ LRESULT CALLBACK G3DProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
int main(int argc, char** argv) {
HINSTANCE hThisInstance = GetModuleHandle(NULL);
return WinMain(hThisInstance, NULL, NULL, 1);
}
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int cmdShow)
{
#ifndef _DEBUG
try{
#endif
@@ -158,7 +164,6 @@ int main(int argc, char** argv) {
icc.dwICC = ICC_WIN95_CLASSES/*|ICC_COOL_CLASSES|ICC_DATE_CLASSES|
ICC_PAGESCROLLER_CLASS|ICC_USEREX_CLASSES*/;
InitCommonControlsEx(&icc);
HMODULE hThisInstance = GetModuleHandle(NULL);
if (!createWindowClass("mainHWND",WndProc,hThisInstance))
return false;