goat3d

changeset 24:6b651613bd9f

fixed the windows stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 28 Sep 2013 06:32:00 +0300
parents b59a3650ed51
children d0260d80ae09
files goat3d.vcxproj goat3d.vcxproj.filters src/chunk.cc
diffstat 3 files changed, 141 insertions(+), 7 deletions(-) [+]
line diff
     1.1 --- a/goat3d.vcxproj	Fri Sep 27 07:20:22 2013 +0300
     1.2 +++ b/goat3d.vcxproj	Sat Sep 28 06:32:00 2013 +0300
     1.3 @@ -19,11 +19,24 @@
     1.4      </ProjectConfiguration>
     1.5    </ItemGroup>
     1.6    <ItemGroup>
     1.7 +    <ClInclude Include="libs\openctm\internal.h" />
     1.8 +    <ClInclude Include="libs\openctm\liblzma\Alloc.h" />
     1.9 +    <ClInclude Include="libs\openctm\liblzma\LzFind.h" />
    1.10 +    <ClInclude Include="libs\openctm\liblzma\LzHash.h" />
    1.11 +    <ClInclude Include="libs\openctm\liblzma\LzmaDec.h" />
    1.12 +    <ClInclude Include="libs\openctm\liblzma\LzmaEnc.h" />
    1.13 +    <ClInclude Include="libs\openctm\liblzma\LzmaLib.h" />
    1.14 +    <ClInclude Include="libs\openctm\liblzma\NameMangle.h" />
    1.15 +    <ClInclude Include="libs\openctm\liblzma\Types.h" />
    1.16 +    <ClInclude Include="libs\openctm\openctm.h" />
    1.17 +    <ClInclude Include="libs\openctm\openctmpp.h" />
    1.18 +    <ClInclude Include="libs\tinyxml2\tinyxml2.h" />
    1.19      <ClInclude Include="src\camera.h" />
    1.20      <ClInclude Include="src\chunk.h" />
    1.21      <ClInclude Include="src\goat3d.h" />
    1.22      <ClInclude Include="src\goat3d_impl.h" />
    1.23      <ClInclude Include="src\light.h" />
    1.24 +    <ClInclude Include="src\log.h" />
    1.25      <ClInclude Include="src\material.h" />
    1.26      <ClInclude Include="src\mesh.h" />
    1.27      <ClInclude Include="src\node.h" />
    1.28 @@ -31,12 +44,29 @@
    1.29      <ClInclude Include="src\xform_node.h" />
    1.30    </ItemGroup>
    1.31    <ItemGroup>
    1.32 +    <ClCompile Include="libs\openctm\compressMG1.c" />
    1.33 +    <ClCompile Include="libs\openctm\compressMG2.c" />
    1.34 +    <ClCompile Include="libs\openctm\compressRAW.c" />
    1.35 +    <ClCompile Include="libs\openctm\liblzma\Alloc.c" />
    1.36 +    <ClCompile Include="libs\openctm\liblzma\LzFind.c" />
    1.37 +    <ClCompile Include="libs\openctm\liblzma\LzmaDec.c" />
    1.38 +    <ClCompile Include="libs\openctm\liblzma\LzmaEnc.c" />
    1.39 +    <ClCompile Include="libs\openctm\liblzma\LzmaLib.c" />
    1.40 +    <ClCompile Include="libs\openctm\openctm.c" />
    1.41 +    <ClCompile Include="libs\openctm\stream.c" />
    1.42 +    <ClCompile Include="libs\tinyxml2\tinyxml2.cpp" />
    1.43      <ClCompile Include="src\camera.cc" />
    1.44 +    <ClCompile Include="src\chunk.cc" />
    1.45      <ClCompile Include="src\goat3d.cc" />
    1.46 +    <ClCompile Include="src\goat3d_readxml.cc" />
    1.47 +    <ClCompile Include="src\goat3d_write.cc" />
    1.48 +    <ClCompile Include="src\goat3d_writexml.cc" />
    1.49      <ClCompile Include="src\light.cc" />
    1.50 +    <ClCompile Include="src\log.cc" />
    1.51      <ClCompile Include="src\material.cc" />
    1.52      <ClCompile Include="src\mesh.cc" />
    1.53      <ClCompile Include="src\node.cc" />
    1.54 +    <ClCompile Include="src\scene.cc" />
    1.55      <ClCompile Include="src\xform_node.cc" />
    1.56    </ItemGroup>
    1.57    <PropertyGroup Label="Globals">
    1.58 @@ -113,8 +143,9 @@
    1.59        </PrecompiledHeader>
    1.60        <WarningLevel>Level3</WarningLevel>
    1.61        <Optimization>Disabled</Optimization>
    1.62 -      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    1.63 -      <DisableSpecificWarnings>4244;4305</DisableSpecificWarnings>
    1.64 +      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions);OPENCTM_STATIC</PreprocessorDefinitions>
    1.65 +      <DisableSpecificWarnings>4244;4305;4996</DisableSpecificWarnings>
    1.66 +      <AdditionalIncludeDirectories>$(SolutionDir)\libs\openctm;$(SolutionDir)\libs\openctm\liblzma;$(SolutionDir)\libs\tinyxml2</AdditionalIncludeDirectories>
    1.67      </ClCompile>
    1.68      <Link>
    1.69        <SubSystem>Windows</SubSystem>
    1.70 @@ -147,8 +178,9 @@
    1.71        <Optimization>MaxSpeed</Optimization>
    1.72        <FunctionLevelLinking>true</FunctionLevelLinking>
    1.73        <IntrinsicFunctions>true</IntrinsicFunctions>
    1.74 -      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    1.75 -      <DisableSpecificWarnings>4244;4305</DisableSpecificWarnings>
    1.76 +      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);OPENCTM_STATIC</PreprocessorDefinitions>
    1.77 +      <DisableSpecificWarnings>4244;4305;4996</DisableSpecificWarnings>
    1.78 +      <AdditionalIncludeDirectories>$(SolutionDir)\libs\openctm;$(SolutionDir)\libs\openctm\liblzma;$(SolutionDir)\libs\tinyxml2</AdditionalIncludeDirectories>
    1.79      </ClCompile>
    1.80      <Link>
    1.81        <SubSystem>Windows</SubSystem>
     2.1 --- a/goat3d.vcxproj.filters	Fri Sep 27 07:20:22 2013 +0300
     2.2 +++ b/goat3d.vcxproj.filters	Sat Sep 28 06:32:00 2013 +0300
     2.3 @@ -5,6 +5,18 @@
     2.4        <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
     2.5        <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
     2.6      </Filter>
     2.7 +    <Filter Include="libs">
     2.8 +      <UniqueIdentifier>{bbf568eb-077e-4cb6-8607-e6a016ab7360}</UniqueIdentifier>
     2.9 +    </Filter>
    2.10 +    <Filter Include="libs\tinyxml2">
    2.11 +      <UniqueIdentifier>{8215d0ae-e53d-4dd7-8ca0-ba4470326776}</UniqueIdentifier>
    2.12 +    </Filter>
    2.13 +    <Filter Include="libs\openctm">
    2.14 +      <UniqueIdentifier>{d8a998b8-6390-40ac-b62a-8e5dbf61d437}</UniqueIdentifier>
    2.15 +    </Filter>
    2.16 +    <Filter Include="libs\openctm\liblzma">
    2.17 +      <UniqueIdentifier>{18a85bea-ddb2-49a1-a7b1-bd11b23d5549}</UniqueIdentifier>
    2.18 +    </Filter>
    2.19    </ItemGroup>
    2.20    <ItemGroup>
    2.21      <ClInclude Include="src\camera.h">
    2.22 @@ -37,6 +49,45 @@
    2.23      <ClInclude Include="src\object.h">
    2.24        <Filter>src</Filter>
    2.25      </ClInclude>
    2.26 +    <ClInclude Include="src\log.h">
    2.27 +      <Filter>src</Filter>
    2.28 +    </ClInclude>
    2.29 +    <ClInclude Include="libs\tinyxml2\tinyxml2.h">
    2.30 +      <Filter>libs\tinyxml2</Filter>
    2.31 +    </ClInclude>
    2.32 +    <ClInclude Include="libs\openctm\internal.h">
    2.33 +      <Filter>libs\openctm</Filter>
    2.34 +    </ClInclude>
    2.35 +    <ClInclude Include="libs\openctm\openctm.h">
    2.36 +      <Filter>libs\openctm</Filter>
    2.37 +    </ClInclude>
    2.38 +    <ClInclude Include="libs\openctm\openctmpp.h">
    2.39 +      <Filter>libs\openctm</Filter>
    2.40 +    </ClInclude>
    2.41 +    <ClInclude Include="libs\openctm\liblzma\Alloc.h">
    2.42 +      <Filter>libs\openctm\liblzma</Filter>
    2.43 +    </ClInclude>
    2.44 +    <ClInclude Include="libs\openctm\liblzma\LzFind.h">
    2.45 +      <Filter>libs\openctm\liblzma</Filter>
    2.46 +    </ClInclude>
    2.47 +    <ClInclude Include="libs\openctm\liblzma\LzHash.h">
    2.48 +      <Filter>libs\openctm\liblzma</Filter>
    2.49 +    </ClInclude>
    2.50 +    <ClInclude Include="libs\openctm\liblzma\LzmaDec.h">
    2.51 +      <Filter>libs\openctm\liblzma</Filter>
    2.52 +    </ClInclude>
    2.53 +    <ClInclude Include="libs\openctm\liblzma\LzmaEnc.h">
    2.54 +      <Filter>libs\openctm\liblzma</Filter>
    2.55 +    </ClInclude>
    2.56 +    <ClInclude Include="libs\openctm\liblzma\LzmaLib.h">
    2.57 +      <Filter>libs\openctm\liblzma</Filter>
    2.58 +    </ClInclude>
    2.59 +    <ClInclude Include="libs\openctm\liblzma\NameMangle.h">
    2.60 +      <Filter>libs\openctm\liblzma</Filter>
    2.61 +    </ClInclude>
    2.62 +    <ClInclude Include="libs\openctm\liblzma\Types.h">
    2.63 +      <Filter>libs\openctm\liblzma</Filter>
    2.64 +    </ClInclude>
    2.65    </ItemGroup>
    2.66    <ItemGroup>
    2.67      <ClCompile Include="src\goat3d.cc">
    2.68 @@ -60,5 +111,56 @@
    2.69      <ClCompile Include="src\node.cc">
    2.70        <Filter>src</Filter>
    2.71      </ClCompile>
    2.72 +    <ClCompile Include="src\chunk.cc">
    2.73 +      <Filter>src</Filter>
    2.74 +    </ClCompile>
    2.75 +    <ClCompile Include="src\goat3d_readxml.cc">
    2.76 +      <Filter>src</Filter>
    2.77 +    </ClCompile>
    2.78 +    <ClCompile Include="src\goat3d_write.cc">
    2.79 +      <Filter>src</Filter>
    2.80 +    </ClCompile>
    2.81 +    <ClCompile Include="src\goat3d_writexml.cc">
    2.82 +      <Filter>src</Filter>
    2.83 +    </ClCompile>
    2.84 +    <ClCompile Include="src\log.cc">
    2.85 +      <Filter>src</Filter>
    2.86 +    </ClCompile>
    2.87 +    <ClCompile Include="src\scene.cc">
    2.88 +      <Filter>src</Filter>
    2.89 +    </ClCompile>
    2.90 +    <ClCompile Include="libs\tinyxml2\tinyxml2.cpp">
    2.91 +      <Filter>libs\tinyxml2</Filter>
    2.92 +    </ClCompile>
    2.93 +    <ClCompile Include="libs\openctm\compressMG1.c">
    2.94 +      <Filter>libs\openctm</Filter>
    2.95 +    </ClCompile>
    2.96 +    <ClCompile Include="libs\openctm\compressMG2.c">
    2.97 +      <Filter>libs\openctm</Filter>
    2.98 +    </ClCompile>
    2.99 +    <ClCompile Include="libs\openctm\compressRAW.c">
   2.100 +      <Filter>libs\openctm</Filter>
   2.101 +    </ClCompile>
   2.102 +    <ClCompile Include="libs\openctm\openctm.c">
   2.103 +      <Filter>libs\openctm</Filter>
   2.104 +    </ClCompile>
   2.105 +    <ClCompile Include="libs\openctm\stream.c">
   2.106 +      <Filter>libs\openctm</Filter>
   2.107 +    </ClCompile>
   2.108 +    <ClCompile Include="libs\openctm\liblzma\Alloc.c">
   2.109 +      <Filter>libs\openctm\liblzma</Filter>
   2.110 +    </ClCompile>
   2.111 +    <ClCompile Include="libs\openctm\liblzma\LzFind.c">
   2.112 +      <Filter>libs\openctm\liblzma</Filter>
   2.113 +    </ClCompile>
   2.114 +    <ClCompile Include="libs\openctm\liblzma\LzmaDec.c">
   2.115 +      <Filter>libs\openctm\liblzma</Filter>
   2.116 +    </ClCompile>
   2.117 +    <ClCompile Include="libs\openctm\liblzma\LzmaEnc.c">
   2.118 +      <Filter>libs\openctm\liblzma</Filter>
   2.119 +    </ClCompile>
   2.120 +    <ClCompile Include="libs\openctm\liblzma\LzmaLib.c">
   2.121 +      <Filter>libs\openctm\liblzma</Filter>
   2.122 +    </ClCompile>
   2.123    </ItemGroup>
   2.124  </Project>
   2.125 \ No newline at end of file
     3.1 --- a/src/chunk.cc	Fri Sep 27 07:20:22 2013 +0300
     3.2 +++ b/src/chunk.cc	Sat Sep 28 06:32:00 2013 +0300
     3.3 @@ -11,8 +11,8 @@
     3.4  
     3.5  bool write_chunk_header(const ChunkHeader *hdr, goat3d_io *io)
     3.6  {
     3.7 -	io->seek(-hdr->size, SEEK_CUR, io->cls);
     3.8 -	if(io->write(hdr, sizeof *hdr, io->cls) < (ssize_t)sizeof *hdr) {
     3.9 +	io->seek(-(long)hdr->size, SEEK_CUR, io->cls);
    3.10 +	if(io->write(hdr, sizeof *hdr, io->cls) < (long)sizeof *hdr) {
    3.11  		return false;
    3.12  	}
    3.13  	return true;
    3.14 @@ -20,7 +20,7 @@
    3.15  
    3.16  bool read_chunk_header(ChunkHeader *hdr, goat3d_io *io)
    3.17  {
    3.18 -	if(io->read(hdr, sizeof *hdr, io->cls) < (ssize_t)sizeof *hdr) {
    3.19 +	if(io->read(hdr, sizeof *hdr, io->cls) < (long)sizeof *hdr) {
    3.20  		return false;
    3.21  	}
    3.22  	return true;