Well, you're right, it does not compile in x86 for some reason. I tried checking the properties and they are relatively the same. The issue seems to be with the order in which files are compiled. What I mean is the GOD_GRAPHICS macro is defined in GraphicsD.cpp. If you have made it this far in the series, then you might remember how headers are compiled in with the source files.
GraphicsD.cpp defines the GOD_GRAPHICS macro then includes Graphics.h
Graphics.h includes some stuff at the top, then the Graphics class declaration and at the bottom, SpriteEffect.h is included then there's a #ifndef GOD_GRAPHICS directive. This says, "if GOD_GRAPHICS is not defined" do the stuff below until the #endif.
Now, what's weird about this is this should create a circular dependency where SpriteEffect.h includes Graphics.h and Graphics.h includes SpriteEffect.h. I'm not sure why this doesn't affect the x64 version, but is affecting the x86 version.
To explain the macro thing a little further, basically this means that the only time that the code:
Code: Select all
void Graphics::DrawSprite<SpriteEffect::Copy>( int x,int y,RectI srcRect,const RectI& clip,const Surface& s,SpriteEffect::Copy effect );
void Graphics::DrawSprite<SpriteEffect::Chroma>( int x,int y,RectI srcRect,const RectI& clip,const Surface& s,SpriteEffect::Chroma effect );
void Graphics::DrawSprite<SpriteEffect::Substitution>( int x,int y,RectI srcRect,const RectI& clip,const Surface& s,SpriteEffect::Substitution effect );
is recognized by the compiler is during the compilation of GraphicsD.cpp. All other files don't have the GOD_GRAPHICS macro defined before including Graphics.h so all other .cpp files won't even see those template extern forward declarations.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com