goat3d

changeset 10:1f94a2107c64

merged with win32 stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 26 Aug 2013 05:30:40 +0300
parents 04bb114fcf05
children d1cebaf1d5c9
files .hgignore exporters/maxgoat/maxgoat.vcxproj exporters/maxgoat/maxgoat.vcxproj.filters exporters/maxgoat/src/config.h exporters/maxgoat/src/maxgoat.cc src/goat3d.cc src/goat3d_impl.h
diffstat 7 files changed, 33 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/.hgignore	Fri Aug 23 06:36:47 2013 +0300
     1.2 +++ b/.hgignore	Mon Aug 26 05:30:40 2013 +0300
     1.3 @@ -7,3 +7,5 @@
     1.4  \.opensdf$
     1.5  \.sdf$
     1.6  \.suo$
     1.7 +x64/
     1.8 +\.tlog$
     2.1 --- a/exporters/maxgoat/maxgoat.vcxproj	Fri Aug 23 06:36:47 2013 +0300
     2.2 +++ b/exporters/maxgoat/maxgoat.vcxproj	Mon Aug 26 05:30:40 2013 +0300
     2.3 @@ -89,6 +89,7 @@
     2.4      <Link>
     2.5        <SubSystem>Windows</SubSystem>
     2.6        <GenerateDebugInformation>true</GenerateDebugInformation>
     2.7 +      <AdditionalLibraryDirectories>$(TargetPath)</AdditionalLibraryDirectories>
     2.8      </Link>
     2.9    </ItemDefinitionGroup>
    2.10    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    2.11 @@ -103,6 +104,8 @@
    2.12      <Link>
    2.13        <SubSystem>Windows</SubSystem>
    2.14        <GenerateDebugInformation>true</GenerateDebugInformation>
    2.15 +      <AdditionalDependencies>goat3d-x64.lib;libvmath-x64.lib;libanim-x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
    2.16 +      <AdditionalLibraryDirectories>$(TargetDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    2.17      </Link>
    2.18      <PostBuildEvent>
    2.19        <Command>copy /Y "$(TargetPath)" "$(ADSK_3DSMAX_x64_2014)plugins\$(ProjectName).dle"</Command>
    2.20 @@ -123,6 +126,7 @@
    2.21        <GenerateDebugInformation>true</GenerateDebugInformation>
    2.22        <EnableCOMDATFolding>true</EnableCOMDATFolding>
    2.23        <OptimizeReferences>true</OptimizeReferences>
    2.24 +      <AdditionalLibraryDirectories>$(TargetPath)</AdditionalLibraryDirectories>
    2.25      </Link>
    2.26    </ItemDefinitionGroup>
    2.27    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    2.28 @@ -141,6 +145,8 @@
    2.29        <GenerateDebugInformation>true</GenerateDebugInformation>
    2.30        <EnableCOMDATFolding>true</EnableCOMDATFolding>
    2.31        <OptimizeReferences>true</OptimizeReferences>
    2.32 +      <AdditionalDependencies>goat3d-x64.lib;libvmath-x64.lib;libanim-x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
    2.33 +      <AdditionalLibraryDirectories>$(TargetDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    2.34      </Link>
    2.35      <PostBuildEvent>
    2.36        <Command>copy /Y "$(TargetPath)" "$(ADSK_3DSMAX_x64_2014)plugins\$(ProjectName).dle"</Command>
    2.37 @@ -149,6 +155,9 @@
    2.38    <ItemGroup>
    2.39      <ClCompile Include="src\maxgoat.cc" />
    2.40    </ItemGroup>
    2.41 +  <ItemGroup>
    2.42 +    <ClInclude Include="src\config.h" />
    2.43 +  </ItemGroup>
    2.44    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    2.45    <ImportGroup Label="ExtensionTargets">
    2.46    </ImportGroup>
     3.1 --- a/exporters/maxgoat/maxgoat.vcxproj.filters	Fri Aug 23 06:36:47 2013 +0300
     3.2 +++ b/exporters/maxgoat/maxgoat.vcxproj.filters	Mon Aug 26 05:30:40 2013 +0300
     3.3 @@ -11,4 +11,9 @@
     3.4        <Filter>src</Filter>
     3.5      </ClCompile>
     3.6    </ItemGroup>
     3.7 +  <ItemGroup>
     3.8 +    <ClInclude Include="src\config.h">
     3.9 +      <Filter>src</Filter>
    3.10 +    </ClInclude>
    3.11 +  </ItemGroup>
    3.12  </Project>
    3.13 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/exporters/maxgoat/src/config.h	Mon Aug 26 05:30:40 2013 +0300
     4.3 @@ -0,0 +1,7 @@
     4.4 +#ifndef CONFIG_H_
     4.5 +#define CONFIG_H_
     4.6 +
     4.7 +#define VER_MAJOR	0
     4.8 +#define VER_MINOR	1
     4.9 +
    4.10 +#endif	/* CONFIG_H_ */
    4.11 \ No newline at end of file
     5.1 --- a/exporters/maxgoat/src/maxgoat.cc	Fri Aug 23 06:36:47 2013 +0300
     5.2 +++ b/exporters/maxgoat/src/maxgoat.cc	Mon Aug 26 05:30:40 2013 +0300
     5.3 @@ -10,6 +10,7 @@
     5.4  #include "IGame.h"
     5.5  #include "IGameExport.h"
     5.6  #include "IConversionmanager.h"
     5.7 +#include "config.h"
     5.8  
     5.9  
    5.10  #pragma comment (lib, "core.lib")
    5.11 @@ -24,6 +25,9 @@
    5.12  #pragma comment (lib, "comctl32.lib")
    5.13  
    5.14  
    5.15 +#define VERSION(major, minor) \
    5.16 +	((major) * 100 + ((minor) < 10 ? (minor) * 10 : (minor)))
    5.17 +
    5.18  static FILE *logfile;
    5.19  static HINSTANCE hinst;
    5.20  
    5.21 @@ -90,7 +94,7 @@
    5.22  
    5.23  unsigned int GoatExporter::Version()
    5.24  {
    5.25 -	return 10;
    5.26 +	return VERSION(VER_MAJOR, VER_MINOR);
    5.27  }
    5.28  
    5.29  void GoatExporter::ShowAbout(HWND win)
     6.1 --- a/src/goat3d.cc	Fri Aug 23 06:36:47 2013 +0300
     6.2 +++ b/src/goat3d.cc	Mon Aug 26 05:30:40 2013 +0300
     6.3 @@ -34,10 +34,10 @@
     6.4  	}
     6.5  	cameras.clear();
     6.6  
     6.7 -	for(size_t i=0; i<nodes.size(); i++) {
     6.8 -		delete_node_tree(nodes[i]);
     6.9 +	for(size_t i=0; i<objects.size(); i++) {
    6.10 +		delete_node_tree(objects[i]);
    6.11  	}
    6.12 -	nodes.clear();
    6.13 +	objects.clear();
    6.14  
    6.15  	name = "unnamed";
    6.16  }
     7.1 --- a/src/goat3d_impl.h	Fri Aug 23 06:36:47 2013 +0300
     7.2 +++ b/src/goat3d_impl.h	Mon Aug 26 05:30:40 2013 +0300
     7.3 @@ -8,7 +8,7 @@
     7.4  #include "light.h"
     7.5  #include "camera.h"
     7.6  #include "material.h"
     7.7 -#include "node.h"
     7.8 +#include "object.h"
     7.9  
    7.10  class Scene {
    7.11  private:
    7.12 @@ -19,7 +19,7 @@
    7.13  	std::vector<Mesh*> meshes;
    7.14  	std::vector<Light*> lights;
    7.15  	std::vector<Camera*> cameras;
    7.16 -	std::vector<Node*> nodes;
    7.17 +	std::vector<Object*> objects;
    7.18  
    7.19  public:
    7.20  	Scene();