Skip to content

Commit c9311da

Browse files
committed
tweak: Disable test asset loading in Release builds
1 parent 67f50d1 commit c9311da

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

Core/GameEngine/Include/Common/FileSystem.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,17 @@ typedef FilenameList::iterator FilenameListIter;
8787

8888
// LOAD_TEST_ASSETS automatically loads w3d assets from the TEST_W3D_DIR_PATH
8989
// without having to add an INI entry.
90-
///@todo this allows us to use the test art directory, it should be removed for FINAL release
90+
#if defined(RTS_DEBUG)
9191
#define LOAD_TEST_ASSETS 1
92+
#endif
93+
9294
#ifdef LOAD_TEST_ASSETS
9395
#define ROAD_DIRECTORY "../TestArt/TestRoad/"
9496
#define TEST_STRING "***TESTING"
95-
// the following directories will be used to look for test art
96-
#define LOOK_FOR_TEST_ART
97-
#define TEST_W3D_DIR_PATH "../TestArt/" ///< .w3d files live here
98-
#define TEST_TGA_DIR_PATH "../TestArt/" ///< .tga texture files live here
97+
// the following directories will be used to look for test art
98+
#define LOOK_FOR_TEST_ART
99+
#define TEST_W3D_DIR_PATH "../TestArt/" ///< .w3d files live here
100+
#define TEST_TGA_DIR_PATH "../TestArt/" ///< .tga texture files live here
99101
#endif
100102

101103
struct FileInfo {

Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DDefaultDraw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ void W3DDefaultDraw::reactToTransformChange( const Matrix3D *oldMtx,
9494
const Coord3D *oldPos,
9595
Real oldAngle )
9696
{
97-
97+
#ifdef LOAD_TEST_ASSETS
9898
if( m_renderObject )
9999
m_renderObject->Set_Transform( *getDrawable()->getTransformMatrix() );
100-
100+
#endif
101101
}
102102

103103
//-------------------------------------------------------------------------------------------------

GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw/W3DDefaultDraw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ void W3DDefaultDraw::reactToTransformChange( const Matrix3D *oldMtx,
9494
const Coord3D *oldPos,
9595
Real oldAngle )
9696
{
97-
97+
#ifdef LOAD_TEST_ASSETS
9898
if( m_renderObject )
9999
m_renderObject->Set_Transform( *getDrawable()->getTransformMatrix() );
100-
100+
#endif
101101
}
102102

103103
//-------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)