Skip to content

Commit

Permalink
Windows tour code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfb committed Apr 26, 2010
1 parent caa9889 commit 13e70b7
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 24 deletions.
20 changes: 16 additions & 4 deletions tour/Chapter 1/vc9/Tutorial.vcproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Expand Down Expand Up @@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NOMINMAX"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand Down Expand Up @@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;NOMINMAX"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Expand Down Expand Up @@ -177,6 +177,14 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\src\Particle.cpp"
>
</File>
<File
RelativePath="..\src\ParticleController.cpp"
>
</File>
<File
RelativePath="..\src\TutorialApp.cpp"
>
Expand All @@ -188,7 +196,11 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\include\cinder\Cinder.h"
RelativePath="..\include\Particle.h"
>
</File>
<File
RelativePath="..\include\ParticleController.h"
>
</File>
</Filter>
Expand Down
20 changes: 16 additions & 4 deletions tour/Chapter 2/vc9/Tutorial.vcproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Expand Down Expand Up @@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NOMINMAX"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand Down Expand Up @@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;NOMINMAX"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Expand Down Expand Up @@ -177,6 +177,14 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\src\Particle.cpp"
>
</File>
<File
RelativePath="..\src\ParticleController.cpp"
>
</File>
<File
RelativePath="..\src\TutorialApp.cpp"
>
Expand All @@ -188,7 +196,11 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\include\cinder\Cinder.h"
RelativePath="..\include\Particle.h"
>
</File>
<File
RelativePath="..\include\ParticleController.h"
>
</File>
</Filter>
Expand Down
16 changes: 14 additions & 2 deletions tour/Chapter 3/vc9/Tutorial.vcproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Expand Down Expand Up @@ -177,6 +177,14 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\src\Particle.cpp"
>
</File>
<File
RelativePath="..\src\ParticleController.cpp"
>
</File>
<File
RelativePath="..\src\TutorialApp.cpp"
>
Expand All @@ -188,7 +196,11 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\include\cinder\Cinder.h"
RelativePath="..\include\Particle.h"
>
</File>
<File
RelativePath="..\include\ParticleController.h"
>
</File>
</Filter>
Expand Down
5 changes: 3 additions & 2 deletions tour/Chapter 4/src/ParticleController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ ParticleController::ParticleController()

void ParticleController::update( const Perlin &perlin, const Channel32f &channel, const Vec2i &mouseLoc )
{
for( list<Particle>::iterator p = mParticles.begin(); p != mParticles.end(); ++p ){
for( list<Particle>::iterator p = mParticles.begin(); p != mParticles.end(); ) {
if( p->mIsDead ){
mParticles.erase( p );
p = mParticles.erase( p );
} else {
p->update( perlin, channel, mouseLoc );
++p;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tour/Chapter 4/src/TutorialApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void TutorialApp::draw()
}

if( mSaveFrames ){
writeImage( getHomeDirectory() + "Tutorial/image_" + toString( getElapsedFrames() ) + ".png", copyWindowSurface() );
writeImage( getHomeDirectory() + "image_" + toString( getElapsedFrames() ) + ".png", copyWindowSurface() );
}
}

Expand Down
20 changes: 16 additions & 4 deletions tour/Chapter 4/vc9/Tutorial.vcproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Expand Down Expand Up @@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NOMINMAX"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand Down Expand Up @@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;NOMINMAX"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Expand Down Expand Up @@ -177,6 +177,14 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\src\Particle.cpp"
>
</File>
<File
RelativePath="..\src\ParticleController.cpp"
>
</File>
<File
RelativePath="..\src\TutorialApp.cpp"
>
Expand All @@ -188,7 +196,11 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\include\cinder\Cinder.h"
RelativePath="..\include\Particle.h"
>
</File>
<File
RelativePath="..\include\ParticleController.h"
>
</File>
</Filter>
Expand Down
5 changes: 3 additions & 2 deletions tour/Chapter 5/src/ParticleController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ void ParticleController::applyPerlin( const Perlin &perlin )

void ParticleController::update( const Channel32f &channel, const Vec2i &mouseLoc )
{
for( list<Particle>::iterator p = mParticles.begin(); p != mParticles.end(); ++p ){
for( list<Particle>::iterator p = mParticles.begin(); p != mParticles.end(); ){
if( p->mIsDead ){
mParticles.erase( p );
p = mParticles.erase( p );
} else {
p->update( channel, mouseLoc );
++p;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tour/Chapter 5/src/TutorialApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void TutorialApp::draw()
}

if( mSaveFrames ){
writeImage( getHomeDirectory() + "Tutorial/image_" + toString( getElapsedFrames() ) + ".png", copyWindowSurface() );
writeImage( getHomeDirectory() + "image_" + toString( getElapsedFrames() ) + ".png", copyWindowSurface() );
}
}

Expand Down
20 changes: 16 additions & 4 deletions tour/Chapter 5/vc9/Tutorial.vcproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Expand Down Expand Up @@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;NOMINMAX"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
Expand Down Expand Up @@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\include;..\..\..\include;..\..\..\boost"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;NOMINMAX"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Expand Down Expand Up @@ -177,6 +177,14 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\src\Particle.cpp"
>
</File>
<File
RelativePath="..\src\ParticleController.cpp"
>
</File>
<File
RelativePath="..\src\TutorialApp.cpp"
>
Expand All @@ -188,7 +196,11 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\include\cinder\Cinder.h"
RelativePath="..\include\Particle.h"
>
</File>
<File
RelativePath="..\include\ParticleController.h"
>
</File>
</Filter>
Expand Down

0 comments on commit 13e70b7

Please sign in to comment.