Procházet zdrojové kódy

Removes bits of code and includes that are based on old 360, xbox and PS3 flags that are no longer needed.

Areloch před 8 roky
rodič
revize
ed14b6fced
43 změnil soubory, kde provedl 35 přidání a 356 odebrání
  1. 0 26
      Engine/source/T3D/fx/particleEmitter.cpp
  2. 1 13
      Engine/source/T3D/fx/particleEmitter.h
  3. 0 4
      Engine/source/T3D/fx/precipitation.cpp
  4. 0 8
      Engine/source/T3D/groundPlane.cpp
  5. 0 5
      Engine/source/T3D/lightFlareData.cpp
  6. 0 6
      Engine/source/app/net/serverQuery.cpp
  7. 2 2
      Engine/source/cinterface/cinterface.cpp
  8. 2 8
      Engine/source/console/console.cpp
  9. 0 4
      Engine/source/console/debugOutputConsumer.h
  10. 5 5
      Engine/source/core/strings/stringFunctions.cpp
  11. 2 2
      Engine/source/core/strings/stringFunctions.h
  12. 1 1
      Engine/source/core/util/path.h
  13. 1 1
      Engine/source/core/util/str.cpp
  14. 0 4
      Engine/source/core/util/swizzle.h
  15. 1 6
      Engine/source/core/util/uuid.cpp
  16. 0 2
      Engine/source/gfx/gFont.cpp
  17. 0 6
      Engine/source/gfx/gfxDevice.cpp
  18. 1 9
      Engine/source/gfx/gfxVertexFormat.h
  19. 1 1
      Engine/source/gui/core/guiCanvas.cpp
  20. 1 1
      Engine/source/lighting/advanced/advancedLightingFeatures.cpp
  21. 0 5
      Engine/source/lighting/advanced/glsl/gBufferConditionerGLSL.cpp
  22. 0 5
      Engine/source/lighting/advanced/hlsl/gBufferConditionerHLSL.cpp
  23. 1 1
      Engine/source/platform/input/event.cpp
  24. 1 18
      Engine/source/platform/platformCPUCount.cpp
  25. 0 4
      Engine/source/platform/platformInput.h
  26. 5 18
      Engine/source/platform/platformIntrinsics.gcc.h
  27. 1 16
      Engine/source/platform/platformIntrinsics.visualc.h
  28. 0 44
      Engine/source/platform/platformNet.cpp
  29. 0 26
      Engine/source/platform/platformNetAsync.cpp
  30. 2 2
      Engine/source/platform/platformVolume.cpp
  31. 0 11
      Engine/source/platform/threads/threadPool.cpp
  32. 0 5
      Engine/source/platform/types.gcc.h
  33. 1 15
      Engine/source/platform/types.visualc.h
  34. 0 2
      Engine/source/platformWin32/winAsync.cpp
  35. 0 13
      Engine/source/postFx/postEffect.cpp
  36. 0 7
      Engine/source/scene/reflectionManager.cpp
  37. 0 7
      Engine/source/sfx/media/sfxVorbisStream.cpp
  38. 0 7
      Engine/source/shaderGen/shaderGen.cpp
  39. 0 4
      Engine/source/ts/arch/tsMeshIntrinsics.arch.h
  40. 0 4
      Engine/source/ts/tsMesh.cpp
  41. 0 13
      Engine/source/ts/tsMesh.h
  42. 6 11
      Engine/source/ts/tsMeshIntrinsics.cpp
  43. 0 4
      Engine/source/windowManager/windowInputGenerator.cpp

+ 0 - 26
Engine/source/T3D/fx/particleEmitter.cpp

@@ -38,10 +38,6 @@
 #include "lighting/lightInfo.h"
 #include "console/engineAPI.h"
 
-#if defined(TORQUE_OS_XENON)
-#  include "gfx/D3D9/360/gfx360MemVertexBuffer.h"
-#endif
-
 Point3F ParticleEmitter::mWindVelocity( 0.0, 0.0, 0.0 );
 const F32 ParticleEmitter::AgedSpinToRadians = (1.0f/1000.0f) * (1.0f/360.0f) * M_PI_F * 2.0f;
 
@@ -701,11 +697,6 @@ void ParticleEmitterData::allocPrimBuffer( S32 overrideSize )
    U16 *ibIndices;
    GFXBufferType bufferType = GFXBufferTypeStatic;
 
-#ifdef TORQUE_OS_XENON
-   // Because of the way the volatile buffers work on Xenon this is the only
-   // way to do this.
-   bufferType = GFXBufferTypeVolatile;
-#endif
    primBuff.set( GFX, indexListSize, 0, bufferType );
    primBuff.lock( &ibIndices );
    dMemcpy( ibIndices, indices, indexListSize * sizeof(U16) );
@@ -1504,22 +1495,9 @@ void ParticleEmitter::copyToVB( const Point3F &camPos, const ColorF &ambientColo
    }
    PROFILE_END();
 
-#if defined(TORQUE_OS_XENON)
-   // Allocate writecombined since we don't read back from this buffer (yay!)
-   if(mVertBuff.isNull())
-      mVertBuff = new GFX360MemVertexBuffer(GFX, 1, getGFXVertexFormat<ParticleVertexType>(), sizeof(ParticleVertexType), GFXBufferTypeDynamic, PAGE_WRITECOMBINE);
-   if( n_parts > mCurBuffSize )
-   {
-      mCurBuffSize = n_parts;
-      mVertBuff.resize(n_parts * 4);
-   }
-
-   ParticleVertexType *buffPtr = mVertBuff.lock();
-#else
    static Vector<ParticleVertexType> tempBuff(2048);
    tempBuff.reserve( n_parts*4 + 64); // make sure tempBuff is big enough
    ParticleVertexType *buffPtr = tempBuff.address(); // use direct pointer (faster)
-#endif
    
    if (mDataBlock->orientParticles)
    {
@@ -1653,9 +1631,6 @@ void ParticleEmitter::copyToVB( const Point3F &camPos, const ColorF &ambientColo
       PROFILE_END();
    }
 
-#if defined(TORQUE_OS_XENON)
-   mVertBuff.unlock();
-#else
    PROFILE_START(ParticleEmitter_copyToVB_LockCopy);
    // create new VB if emitter size grows
    if( !mVertBuff || n_parts > mCurBuffSize )
@@ -1668,7 +1643,6 @@ void ParticleEmitter::copyToVB( const Point3F &camPos, const ColorF &ambientColo
    dMemcpy( verts, tempBuff.address(), n_parts * 4 * sizeof(ParticleVertexType) );
    mVertBuff.unlock();
    PROFILE_END();
-#endif
 
    PROFILE_END();
 }

+ 1 - 13
Engine/source/T3D/fx/particleEmitter.h

@@ -39,10 +39,6 @@
 #include "T3D/fx/particle.h"
 #endif
 
-#if defined(TORQUE_OS_XENON)
-#include "gfx/D3D9/360/gfx360MemVertexBuffer.h"
-#endif
-
 class RenderPassManager;
 class ParticleData;
 
@@ -128,11 +124,7 @@ class ParticleEmitter : public GameBase
 
   public:
 
-#if defined(TORQUE_OS_XENON)
-     typedef GFXVertexPCTT ParticleVertexType;
-#else
-     typedef GFXVertexPCT ParticleVertexType;
-#endif
+   typedef GFXVertexPCT ParticleVertexType;
 
    ParticleEmitter();
    ~ParticleEmitter();
@@ -264,11 +256,7 @@ class ParticleEmitter : public GameBase
    F32       sizes[ ParticleData::PDC_NUM_KEYS ];
    ColorF    colors[ ParticleData::PDC_NUM_KEYS ];
 
-#if defined(TORQUE_OS_XENON)
-   GFX360MemVertexBufferHandle<ParticleVertexType> mVertBuff;
-#else
    GFXVertexBufferHandle<ParticleVertexType> mVertBuff;
-#endif
 
    //   These members are for implementing a link-list of the active emitter 
    //   particles. Member part_store contains blocks of particles that can be

+ 0 - 4
Engine/source/T3D/fx/precipitation.cpp

@@ -1515,10 +1515,6 @@ void Precipitation::renderObject(ObjectRenderInst *ri, SceneRenderState *state,
    if (overrideMat)
       return;
 
-#ifdef TORQUE_OS_XENON
-   return;
-#endif
-
    GameConnection* conn = GameConnection::getConnectionToServer();
    if (!conn)
       return; //need connection to server

+ 0 - 8
Engine/source/T3D/groundPlane.cpp

@@ -444,19 +444,11 @@ void GroundPlane::createGeometry( const Frustum& frustum )
    // Only reallocate if the buffers are too small.
    if ( mVertexBuffer.isNull() || numVertices > mVertexBuffer->mNumVerts )
    {
-#if defined(TORQUE_OS_XENON)
-      mVertexBuffer.set( GFX, numVertices, GFXBufferTypeVolatile );
-#else
       mVertexBuffer.set( GFX, numVertices, GFXBufferTypeDynamic );
-#endif
    }
    if ( mPrimitiveBuffer.isNull() || numTriangles > mPrimitiveBuffer->mPrimitiveCount )
    {
-#if defined(TORQUE_OS_XENON)
-      mPrimitiveBuffer.set( GFX, numTriangles*3, numTriangles, GFXBufferTypeVolatile );
-#else
       mPrimitiveBuffer.set( GFX, numTriangles*3, numTriangles, GFXBufferTypeDynamic );
-#endif
    }
 
    // Generate the grid.

+ 0 - 5
Engine/source/T3D/lightFlareData.cpp

@@ -661,11 +661,6 @@ void LightFlareData::_makePrimBuffer( GFXPrimitiveBufferHandle *pb, U32 count )
    U16 *ibIndices;
    GFXBufferType bufferType = GFXBufferTypeStatic;
 
-#ifdef TORQUE_OS_XENON
-   // Because of the way the volatile buffers work on Xenon this is the only
-   // way to do this.
-   bufferType = GFXBufferTypeVolatile;
-#endif
    pb->set( GFX, indexListSize, 0, bufferType );
    pb->lock( &ibIndices );
    dMemcpy( ibIndices, indices, indexListSize * sizeof(U16) );

+ 0 - 6
Engine/source/app/net/serverQuery.cpp

@@ -1739,9 +1739,6 @@ static void handleGameMasterInfoRequest( const NetAddress* address, U32 key, U8
       temp8 = 0;
 #if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
       temp8 |= ServerInfo::Status_Linux;
-#endif
-#if defined(TORQUE_OS_XENON)
-      temp8 |= ServerInfo::Status_Xenon;
 #endif
       if ( Con::getBoolVariable( "Server::Dedicated" ) )
          temp8 |= ServerInfo::Status_Dedicated;
@@ -2003,9 +2000,6 @@ static void handleGameInfoRequest( const NetAddress* address, U32 key, U8 flags
       U8 status = 0;
 #if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OPENBSD)
       status |= ServerInfo::Status_Linux;
-#endif
-#if defined(TORQUE_OS_XENON)
-      status |= ServerInfo::Status_Xenon;
 #endif
       if ( Con::getBoolVariable( "Server::Dedicated" ) )
          status |= ServerInfo::Status_Dedicated;

+ 2 - 2
Engine/source/cinterface/cinterface.cpp

@@ -63,7 +63,7 @@ extern "C" {
 
 		LinkConsoleFunctions = true;
 
-#if !defined(TORQUE_OS_XENON) && !defined(TORQUE_OS_PS3) && defined(_MSC_VER)
+#if defined(_MSC_VER)
 		createFontInit();
 #endif
 
@@ -135,7 +135,7 @@ extern "C" {
 		// Clean everything up.
 		StandardMainLoop::shutdown();
 
-#if !defined(TORQUE_OS_XENON) && !defined(TORQUE_OS_PS3) && defined(_MSC_VER)
+#if defined(_MSC_VER)
 		createFontShutdown();
 #endif
 

+ 2 - 8
Engine/source/console/console.cpp

@@ -1200,10 +1200,8 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
          isEditorScript = true;
    }
 
-
    StringTableEntry scriptFileName = StringTable->insert(scriptFilenameBuffer);
 
-#ifndef TORQUE_OS_XENON
    // Is this a file we should compile? (anything in the prefs path should not be compiled)
    StringTableEntry prefsPath = Platform::getPrefsPath();
    bool compiled = dStricmp(ext, ".mis") && !journal && !Con::getBoolVariable("Scripts::ignoreDSOs");
@@ -1219,13 +1217,9 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
    // the dso along with the script to avoid name clashes with tools/game dsos.
    if ((dsoPath && *dsoPath == 0) || (prefsPath && prefsPath[0] && dStrnicmp(scriptFileName, prefsPath, dStrlen(prefsPath)) == 0))
       compiled = false;
-#else
-   bool compiled = false;  // Don't try to compile things on the 360, ignore DSO's when debugging
-                           // because PC prefs will screw up stuff like SFX.
-#endif
 
-                           // If we're in a journaling mode, then we will read the script
-                           // from the journal file.
+   // If we're in a journaling mode, then we will read the script
+   // from the journal file.
    if (journal && Journal::IsPlaying())
    {
       char fileNameBuf[256];

+ 0 - 4
Engine/source/console/debugOutputConsumer.h

@@ -27,10 +27,6 @@
 
 //#define TORQUE_LOCBUILD
 
-#if !defined(TORQUE_DEBUG) && defined(TORQUE_OS_XENON) && !defined(TORQUE_LOCBUILD)
-#define DISABLE_DEBUG_SPEW
-#endif
-
 #include "console/console.h"
 
 namespace DebugOutputConsumer

+ 5 - 5
Engine/source/core/strings/stringFunctions.cpp

@@ -27,7 +27,7 @@
 #include "platform/platform.h"
 
 
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
 // This standard function is not defined when compiling with VC7...
 #define vsnprintf	_vsnprintf
 #endif
@@ -330,7 +330,7 @@ char* dStrcpyl(char *dst, dsize_t dstSize, ...)
 
 S32 dStrcmp( const UTF16 *str1, const UTF16 *str2)
 {
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
    return wcscmp( reinterpret_cast<const wchar_t *>( str1 ), reinterpret_cast<const wchar_t *>( str2 ) );
 #else
    S32 ret;
@@ -347,7 +347,7 @@ S32 dStrcmp( const UTF16 *str1, const UTF16 *str2)
 
 char* dStrupr(char *str)
 {
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
    return _strupr(str);
 #else
    if (str == NULL)
@@ -365,7 +365,7 @@ char* dStrupr(char *str)
 
 char* dStrlwr(char *str)
 {
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
    return _strlwr(str);
 #else
    if (str == NULL)
@@ -423,7 +423,7 @@ S32 dVsprintf(char *buffer, U32 bufferSize, const char *format, va_list arglist)
 
 S32 dSscanf(const char *buffer, const char *format, ...)
 {
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
    va_list args;
    va_start(args, format);
 

+ 2 - 2
Engine/source/core/strings/stringFunctions.h

@@ -32,7 +32,7 @@
 #include "platform/types.h"
 #endif
 
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
 // These standard functions are not defined on Win32 and other Microsoft platforms...
 #define strcasecmp   _stricmp
 #define strncasecmp  _strnicmp
@@ -41,7 +41,7 @@
 #define strtof       (float)strtod
 #endif // _MSC_VER < 1800
 
-#endif // defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#endif // defined(TORQUE_OS_WIN)
 
 
 //------------------------------------------------------------------------------

+ 1 - 1
Engine/source/core/util/path.h

@@ -40,7 +40,7 @@ class Path
 public:
    enum Separator
    {
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
       OsSeparator = '\\'
 #else
       OsSeparator = '/'

+ 1 - 1
Engine/source/core/util/str.cpp

@@ -1427,7 +1427,7 @@ void String::copy(StringChar* dst, const StringChar *src, U32 len)
 
 //-----------------------------------------------------------------------------
 
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
 // This standard function is not defined when compiling with VC7...
 #define vsnprintf	_vsnprintf
 #endif

+ 0 - 4
Engine/source/core/util/swizzle.h

@@ -154,8 +154,4 @@ inline void Swizzle<T, mapLength>::InPlace( void *memory, const dsize_t size ) c
 // Template specializations for certain swizzles
 //#include "core/util/swizzleSpec.h"
 
-#ifdef TORQUE_OS_XENON
-#  include "platformXbox/altivecSwizzle.h"
 #endif
-
-#endif

+ 1 - 6
Engine/source/core/util/uuid.cpp

@@ -100,17 +100,12 @@ typedef struct {
     unsigned16 cs;        /* saved clock sequence */
 } uuid_state;
 
-#if defined(_XBOX)
-#include <xtl.h>
-#elif defined(_WIN32)
+#if defined(_WIN32)
 #include <windows.h>
 #else
 #include <sys/types.h>
 #include <sys/time.h>
 #include <unistd.h>
-#ifdef XP_BEOS
-#include <be/net/netdb.h>
-#endif
 #endif
 
 /* set the following to the number of 100ns ticks of the actual resolution of

+ 0 - 2
Engine/source/gfx/gFont.cpp

@@ -100,7 +100,6 @@ GFont* GFont::load( const Torque::Path& path )
    }
    else
    {
-#ifndef TORQUE_OS_XENON
       PlatformFont   *platFont = createPlatformFont(ret->getFontFaceName(), ret->getFontSize(), ret->getFontCharSet());
 
       if ( platFont == NULL )
@@ -110,7 +109,6 @@ GFont* GFont::load( const Torque::Path& path )
       }
       else
          ret->setPlatformFont(platFont);
-#endif
    }
    
    return ret;

+ 0 - 6
Engine/source/gfx/gfxDevice.cpp

@@ -190,12 +190,6 @@ GFXDevice::GFXDevice()
       GFXShader::addGlobalMacro( "TORQUE_OS_MAC" );
    #elif defined TORQUE_OS_LINUX
       GFXShader::addGlobalMacro( "TORQUE_OS_LINUX" );      
-   #elif defined TORQUE_OS_XENON
-      GFXShader::addGlobalMacro( "TORQUE_OS_XENON" );
-   #elif defined TORQUE_OS_XBOX
-      GFXShader::addGlobalMacro( "TORQUE_OS_XBOX" );      
-   #elif defined TORQUE_OS_PS3
-      GFXShader::addGlobalMacro( "TORQUE_OS_PS3" );            
    #endif
 
    mStereoTargets[0] = NULL;

+ 1 - 9
Engine/source/gfx/gfxVertexFormat.h

@@ -298,15 +298,7 @@ public:
 /// @see GFXVertexFormat
 template<class T> inline const GFXVertexFormat* getGFXVertexFormat();
 
-#ifdef TORQUE_OS_XENON
-
-   /// On the Xbox360 we want we want to be sure that verts
-   /// are on aligned boundariess.
-   #define GFX_VERTEX_STRUCT __declspec(align(16)) struct
-
-#else
-   #define GFX_VERTEX_STRUCT struct
-#endif
+#define GFX_VERTEX_STRUCT struct
 
 
 /// The vertex format declaration which is usally placed in your header 

+ 1 - 1
Engine/source/gui/core/guiCanvas.cpp

@@ -2368,7 +2368,7 @@ DefineEngineFunction(excludeOtherInstance, bool, (const char* appIdentifer),,
                 "@ingroup GuiCore")
 {
       // mac/360 can only run one instance in general.
-#if !defined(TORQUE_OS_MAC) && !defined(TORQUE_OS_XENON) && !defined(TORQUE_DEBUG) && !defined(TORQUE_OS_LINUX)
+#if !defined(TORQUE_OS_MAC) && !defined(TORQUE_DEBUG) && !defined(TORQUE_OS_LINUX)
    return Platform::excludeOtherInstances(appIdentifer);
 #else
    // We can just return true if we get here.

+ 1 - 1
Engine/source/lighting/advanced/advancedLightingFeatures.cpp

@@ -31,7 +31,7 @@
 #include "gfx/gfxDevice.h"
 #include "core/util/safeDelete.h"
 
-#if defined( TORQUE_OS_WIN ) || defined( TORQUE_OS_XBOX )
+#if defined( TORQUE_OS_WIN )
 #  include "lighting/advanced/hlsl/gBufferConditionerHLSL.h"
 #  include "lighting/advanced/hlsl/advancedLightingFeaturesHLSL.h"
 #endif

+ 0 - 5
Engine/source/lighting/advanced/glsl/gBufferConditionerGLSL.cpp

@@ -248,10 +248,6 @@ Var* GBufferConditionerGLSL::printMethodHeader( MethodType methodType, const Str
 
       meta->addStatement( new GenOp( "   // Sampler g-buffer\r\n" ) );
 
-#ifdef TORQUE_OS_XENON
-      meta->addStatement( new GenOp( "   @;\r\n", bufferSampleDecl ) );
-      meta->addStatement( new GenOp( "   asm { tfetch2D @, @, @, MagFilter = point, MinFilter = point, MipFilter = point };\r\n", bufferSample, screenUV, prepassSampler ) );
-#else
       // The gbuffer has no mipmaps, so use tex2dlod when 
       // possible so that the shader compiler can optimize.
       meta->addStatement( new GenOp( "   #if TORQUE_SM >= 30\r\n" ) );
@@ -259,7 +255,6 @@ Var* GBufferConditionerGLSL::printMethodHeader( MethodType methodType, const Str
       meta->addStatement( new GenOp( "   #else\r\n" ) );
       meta->addStatement( new GenOp( "      @ = tex2D(@, @);\r\n", bufferSampleDecl, prepassSampler, screenUV ) );
       meta->addStatement( new GenOp( "   #endif\r\n\r\n" ) );
-#endif
 
       // We don't use this way of passing var's around, so this should cause a crash
       // if something uses this improperly

+ 0 - 5
Engine/source/lighting/advanced/hlsl/gBufferConditionerHLSL.cpp

@@ -265,10 +265,6 @@ Var* GBufferConditionerHLSL::printMethodHeader( MethodType methodType, const Str
 
       meta->addStatement( new GenOp( "   // Sampler g-buffer\r\n" ) );
 
-#ifdef TORQUE_OS_XENON
-      meta->addStatement( new GenOp( "   @;\r\n", bufferSampleDecl ) );
-      meta->addStatement( new GenOp( "   asm { tfetch2D @, @, @, MagFilter = point, MinFilter = point, MipFilter = point };\r\n", bufferSample, screenUV, prepassSampler ) );
-#else
       // The gbuffer has no mipmaps, so use tex2dlod when 
       // possible so that the shader compiler can optimize.
       meta->addStatement( new GenOp( "   #if TORQUE_SM >= 30\r\n" ) );
@@ -280,7 +276,6 @@ Var* GBufferConditionerHLSL::printMethodHeader( MethodType methodType, const Str
       meta->addStatement(new GenOp("   #else\r\n"));
       meta->addStatement(new GenOp("      @ = tex2D(@, @);\r\n", bufferSampleDecl, prepassSampler, screenUV));
       meta->addStatement(new GenOp("   #endif\r\n\r\n"));
-#endif
 
       // We don't use this way of passing var's around, so this should cause a crash
       // if something uses this improperly

+ 1 - 1
Engine/source/platform/input/event.cpp

@@ -382,7 +382,7 @@ CodeMapping gVirtualMap[] =
    { "lpov2",         SI_POV,    SI_LPOV2       },
    { "rpov2",         SI_POV,    SI_RPOV2       },
 
-#if defined( TORQUE_OS_WIN ) || defined( TORQUE_OS_XENON )
+#if defined( TORQUE_OS_WIN )
    //-------------------------------------- XINPUT EVENTS
    // Controller connect / disconnect:
    { "connect",       SI_BUTTON, XI_CONNECT     },

+ 1 - 18
Engine/source/platform/platformCPUCount.cpp

@@ -30,24 +30,7 @@
 #include "platform/platform.h"
 #include "platform/platformCPUCount.h"
 
-#if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_OSX) || defined(TORQUE_OS_XENON) || defined(TORQUE_OS_PS3)
-
-// Consoles don't need this
-#if defined(TORQUE_OS_XENON) || defined(TORQUE_OS_PS3)
-namespace CPUInfo 
-{
-
-EConfig CPUCount(U32& TotAvailLogical, U32& TotAvailCore, U32& PhysicalNum)
-{
-   TotAvailLogical = 6;
-   TotAvailCore = 6;
-   PhysicalNum = 3;
-
-   return CONFIG_MultiCoreAndHTEnabled;
-}
-
-}; // namespace
-#else
+#if defined(TORQUE_OS_LINUX) || defined(TORQUE_OS_MAC)
 
 #ifdef TORQUE_OS_LINUX
 // 	The Linux source code listing can be compiled using Linux kernel verison 2.6 

+ 0 - 4
Engine/source/platform/platformInput.h

@@ -122,10 +122,6 @@ public:
    static void log( const char* format, ... );
 #endif
 
-#ifdef TORQUE_OS_XENON
-   static S32 getLockedController();
-#endif
-
    /// Global input routing JournaledSignal; post input events here for
    /// processing.
    static InputEvent smInputEvent;

+ 5 - 18
Engine/source/platform/platformIntrinsics.gcc.h

@@ -28,8 +28,6 @@
 
 #ifdef TORQUE_OS_MAC
 #include <libkern/OSAtomic.h>
-#elif defined(TORQUE_OS_PS3)
-#include <cell/atomic.h>
 #endif
 
 // Fetch-And-Add
@@ -39,9 +37,7 @@
 //
 inline void dFetchAndAdd( volatile U32& ref, U32 val )
 {
-   #if defined(TORQUE_OS_PS3)
-      cellAtomicAdd32( (std::uint32_t *)&ref, val );
-   #elif !defined(TORQUE_OS_MAC)
+   #if !defined(TORQUE_OS_MAC)
       __sync_fetch_and_add(&ref, val );
    #else
       OSAtomicAdd32( val, (int32_t* ) &ref);
@@ -50,9 +46,7 @@ inline void dFetchAndAdd( volatile U32& ref, U32 val )
 
 inline void dFetchAndAdd( volatile S32& ref, S32 val )
 {
-   #if defined(TORQUE_OS_PS3)
-      cellAtomicAdd32( (std::uint32_t *)&ref, val );
-   #elif !defined(TORQUE_OS_MAC)
+   #if !defined(TORQUE_OS_MAC)
       __sync_fetch_and_add( &ref, val );
    #else
       OSAtomicAdd32( val, (int32_t* ) &ref);
@@ -65,9 +59,7 @@ inline bool dCompareAndSwap( volatile U32& ref, U32 oldVal, U32 newVal )
 {
    // bool
    //OSAtomicCompareAndSwap32(int32_t oldValue, int32_t newValue, volatile int32_t *theValue);
-   #if defined(TORQUE_OS_PS3)
-      return ( cellAtomicCompareAndSwap32( (std::uint32_t *)&ref, newVal, oldVal ) == oldVal );
-   #elif !defined(TORQUE_OS_MAC)
+   #if !defined(TORQUE_OS_MAC)
       return ( __sync_val_compare_and_swap( &ref, oldVal, newVal ) == oldVal );
    #else
       return OSAtomicCompareAndSwap32(oldVal, newVal, (int32_t *) &ref);
@@ -76,22 +68,17 @@ inline bool dCompareAndSwap( volatile U32& ref, U32 oldVal, U32 newVal )
 
 inline bool dCompareAndSwap( volatile U64& ref, U64 oldVal, U64 newVal )
 {
-   #if defined(TORQUE_OS_PS3)
-      return ( cellAtomicCompareAndSwap32( (std::uint32_t *)&ref, newVal, oldVal ) == oldVal );
-   #elif !defined(TORQUE_OS_MAC)
+   #if !defined(TORQUE_OS_MAC)
       return ( __sync_val_compare_and_swap( &ref, oldVal, newVal ) == oldVal );
    #else
       return OSAtomicCompareAndSwap64(oldVal, newVal, (int64_t *) &ref);
    #endif
-
 }
 
 /// Performs an atomic read operation.
 inline U32 dAtomicRead( volatile U32 &ref )
 {
-   #if defined(TORQUE_OS_PS3)
-      return cellAtomicAdd32( (std::uint32_t *)&ref, 0 );
-   #elif !defined(TORQUE_OS_MAC)
+   #if !defined(TORQUE_OS_MAC)
       return __sync_fetch_and_add( ( volatile long* ) &ref, 0 );
    #else
       return OSAtomicAdd32( 0, (int32_t* ) &ref);

+ 1 - 16
Engine/source/platform/platformIntrinsics.visualc.h

@@ -26,13 +26,7 @@
 /// @file
 /// Compiler intrinsics for Visual C++.
 
-#if defined(TORQUE_OS_XENON)
-#  include <Xtl.h>
-#  define _InterlockedExchangeAdd InterlockedExchangeAdd
-#  define _InterlockedExchangeAdd64 InterlockedExchangeAdd64
-#else
-#	include <intrin.h>
-#endif
+#include <intrin.h>
 
 // Fetch-And-Add
 //
@@ -48,16 +42,7 @@ inline void dFetchAndAdd( volatile S32& ref, S32 val )
    _InterlockedExchangeAdd( ( volatile long* ) &ref, val );
 }
 
-#if defined(TORQUE_OS_XENON)
-// Not available on x86
-inline void dFetchAndAdd( volatile U64& ref, U64 val )
-{
-   _InterlockedExchangeAdd64( ( volatile __int64* ) &ref, val );
-}
-#endif
-
 // Compare-And-Swap
-
 inline bool dCompareAndSwap( volatile U32& ref, U32 oldVal, U32 newVal )
 {
    return ( _InterlockedCompareExchange( ( volatile long* ) &ref, newVal, oldVal ) == oldVal );

+ 0 - 44
Engine/source/platform/platformNet.cpp

@@ -93,26 +93,6 @@ typedef int SOCKET;
 
 #define closesocket close
 
-#elif defined( TORQUE_OS_XENON )
-
-#include <Xtl.h>
-#include <string>
-
-#define TORQUE_USE_WINSOCK
-#define EINPROGRESS WSAEINPROGRESS
-#define ioctl ioctlsocket
-typedef S32 socklen_t;
-
-DWORD _getLastErrorAndClear()
-{
-   DWORD err = WSAGetLastError();
-   WSASetLastError( 0 );
-
-   return err;
-}
-
-#else
-
 #endif
 
 #if defined(TORQUE_USE_WINSOCK)
@@ -596,20 +576,6 @@ bool Net::init()
 #if defined(TORQUE_USE_WINSOCK)
    if(!PlatformNetState::initCount)
    {
-#ifdef TORQUE_OS_XENON
-      // Configure startup parameters
-      XNetStartupParams xnsp;
-      memset( &xnsp, 0, sizeof( xnsp ) );
-      xnsp.cfgSizeOfStruct = sizeof( XNetStartupParams );
-
-#ifndef TORQUE_DISABLE_PC_CONNECTIVITY
-      xnsp.cfgFlags = XNET_STARTUP_BYPASS_SECURITY;
-      Con::warnf("XNET_STARTUP_BYPASS_SECURITY enabled! This build can talk to PCs!");
-#endif
-
-      AssertISV( !XNetStartup( &xnsp ), "Net::init - failed to init XNet" );
-#endif
-
       WSADATA stWSAData;
       AssertISV( !WSAStartup( 0x0101, &stWSAData ), "Net::init - failed to init WinSock!" );
 
@@ -654,10 +620,6 @@ void Net::shutdown()
    if(!PlatformNetState::initCount)
    {
       WSACleanup();
-
-#ifdef TORQUE_OS_XENON
-      XNetCleanup();
-#endif
    }
 #endif
 }
@@ -1196,14 +1158,8 @@ void Net::process()
          break;
       case PolledSocket::ConnectionPending:
          // see if it is now connected
-#ifdef TORQUE_OS_XENON
-         // WSASetLastError has no return value, however part of the SO_ERROR behavior
-         // is to clear the last error, so this needs to be done here.
-         if( ( optval = _getLastErrorAndClear() ) == -1 ) 
-#else
          if (getsockopt(currentSock->fd, SOL_SOCKET, SO_ERROR,
             (char*)&optval, &optlen) == -1)
-#endif
          {
             Con::errorf("Error getting socket options: %s",  strerror(errno));
             

+ 0 - 26
Engine/source/platform/platformNetAsync.cpp

@@ -27,8 +27,6 @@
 
 #if defined(TORQUE_OS_WIN)
 #  include <winsock.h>
-#elif defined(TORQUE_OS_XENON)
-#  include <Xtl.h>
 #else
 #  include <netdb.h>
 #  include <unistd.h>
@@ -80,8 +78,6 @@ struct NetAsync::NameLookupWorkItem : public ThreadPool::WorkItem
 protected:
    virtual void execute()
    {
-#ifndef TORQUE_OS_XENON
-
 	  NetAddress address;
 	  Net::Error error = Net::stringToAddress(mRequest.remoteAddr, &address, true);
 
@@ -102,28 +98,6 @@ protected:
 		 mRequest.out_h_length = sizeof(address);
          mRequest.complete = true;
       }
-#else
-      XNDNS *pxndns = NULL;
-      HANDLE hEvent = CreateEvent(NULL, false, false, NULL);
-      XNetDnsLookup(mRequest.remoteAddr, hEvent, &pxndns);
-
-      while(pxndns->iStatus == WSAEINPROGRESS) 
-         WaitForSingleObject(hEvent, INFINITE);
-
-      if(pxndns->iStatus == 0 && pxndns->cina > 0)
-      {
-         dMemset(mRequest.out_h_addr, 0, sizeof(mRequest.out_h_addr));
-
-         // This is a suspect section. I need to revisit. [2/22/2010 Pat]
-         dMemcpy(mRequest.out_h_addr, pxndns->aina, sizeof(IN_ADDR)); 
-         mRequest.out_h_length = sizeof(IN_ADDR);
-      }
-
-      mRequest.complete = true;
-
-      XNetDnsRelease(pxndns);
-      CloseHandle(hEvent);
-#endif
    }
 
 private:

+ 2 - 2
Engine/source/platform/platformVolume.cpp

@@ -22,7 +22,7 @@
 
 #include "platform/platform.h"
 
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
 #include <sys/utime.h>
 #else
 #include <sys/time.h>
@@ -84,7 +84,7 @@ bool MountZips(const String &root)
 
 bool  Touch( const Path &path )
 {
-#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
+#if defined(TORQUE_OS_WIN)
    return( utime( path.getFullPath(), 0 ) != -1 );
 #else
    return( utimes( path.getFullPath(), NULL) == 0 ); // utimes returns 0 on success.

+ 0 - 11
Engine/source/platform/threads/threadPool.cpp

@@ -240,17 +240,6 @@ void ThreadPool::WorkerThread::run( void* arg )
    }
    #endif
 
-#if defined(TORQUE_OS_XENON)
-   // On Xbox 360 you must explicitly assign software threads to hardware threads.
-
-   // This will distribute job threads across the secondary CPUs leaving both
-   // primary CPU cores available to the "main" thread. This will help prevent
-   // more L2 thrashing of the main thread/core.
-   static U32 sCoreAssignment = 2;
-   XSetThreadProcessor( GetCurrentThread(), sCoreAssignment );
-   sCoreAssignment = sCoreAssignment < 6 ? sCoreAssignment + 1 : 2;
-#endif
-      
    while( 1 )
    {
       if( checkForStop() )

+ 0 - 5
Engine/source/platform/types.gcc.h

@@ -73,11 +73,6 @@ typedef unsigned long  U64;
 #  define TORQUE_SUPPORTS_GCC_INLINE_X86_ASM
 #  include "platform/types.win.h"
 
-#elif defined(SN_TARGET_PS3)
-#  define TORQUE_OS_STRING "PS3"
-#  define TORQUE_OS_PS3
-#  include "platform/types.posix.h"
-
 #elif defined(linux) || defined(LINUX)
 #  define TORQUE_OS_STRING "Linux"
 #  define TORQUE_OS_LINUX

+ 1 - 15
Engine/source/platform/types.visualc.h

@@ -59,17 +59,7 @@ typedef unsigned _int64 U64;
 
 //--------------------------------------
 // Identify the Operating System
-#if _XBOX_VER >= 200 
-#  define TORQUE_OS_STRING "Xenon"
-#  ifndef TORQUE_OS_XENON
-#     define TORQUE_OS_XENON
-#  endif
-#  include "platform/types.xenon.h"
-#elif defined( _XBOX_VER )
-#  define TORQUE_OS_STRING "Xbox"
-#  define TORQUE_OS_XBOX
-#  include "platform/types.win.h"
-#elif defined( _WIN32 ) && !defined ( _WIN64 )
+#if defined( _WIN32 ) && !defined ( _WIN64 )
 #  define TORQUE_OS_STRING "Win32"
 #  define TORQUE_OS_WIN
 #  define TORQUE_OS_WIN32
@@ -98,10 +88,6 @@ typedef unsigned _int64 U64;
 #  define TORQUE_SUPPORTS_NASM
 #  define TORQUE_SUPPORTS_VC_INLINE_X86_ASM
 #endif
-#elif defined( TORQUE_OS_XENON )
-#  define TORQUE_CPU_STRING "ppc"
-#  define TORQUE_CPU_PPC
-#  define TORQUE_BIG_ENDIAN
 #else
 #  error "VC: Unsupported Target CPU"
 #endif

+ 0 - 2
Engine/source/platformWin32/winAsync.cpp

@@ -22,9 +22,7 @@
 
 // For VS2005.
 #define _WIN32_WINNT 0x501
-#ifndef TORQUE_OS_XENON
 #include "platformWin32/platformWin32.h"
-#endif
 #include "platform/async/asyncUpdate.h"
 
 

+ 0 - 13
Engine/source/postFx/postEffect.cpp

@@ -1180,19 +1180,6 @@ void PostEffect::process(  const SceneRenderState *state,
 
    if ( mTargetTex || mTargetDepthStencil )
    {
-
-#ifdef TORQUE_OS_XENON
-      // You may want to disable this functionality for speed reasons as it does
-      // add some overhead. The upside is it makes things "just work". If you
-      // re-work your post-effects properly, this is not needed.
-      //
-      // If this post effect doesn't alpha blend to the back-buffer, than preserve
-      // the active render target contents so they are still around the next time
-      // that render target activates
-      if(!mStateBlockData->getState().blendEnable)
-         GFX->getActiveRenderTarget()->preserve();
-#endif
-
       const RectI &oldViewport = GFX->getViewport();
       GFXTarget *oldTarget = GFX->getActiveRenderTarget();
 

+ 0 - 7
Engine/source/scene/reflectionManager.cpp

@@ -282,12 +282,6 @@ GFXTextureObject* ReflectionManager::getRefractTex( bool forceUpdate )
    GFXFormat targetFormat = target->getFormat();
    const Point2I &targetSize = target->getSize();
 
-#if defined(TORQUE_OS_XENON)
-   // On the Xbox360, it needs to do a resolveTo from the active target, so this
-   // may as well be the full size of the active target
-   const U32 desWidth = targetSize.x;
-   const U32 desHeight = targetSize.y;
-#else
    U32 desWidth, desHeight;
    // D3D11 needs to be the same size as the active target
    if (GFX->getAdapterType() == Direct3D11)
@@ -300,7 +294,6 @@ GFXTextureObject* ReflectionManager::getRefractTex( bool forceUpdate )
       desWidth = mFloor((F32)targetSize.x * smRefractTexScale);
       desHeight = mFloor((F32)targetSize.y * smRefractTexScale);
    }
-#endif
 
    if ( mRefractTex.isNull() || 
         mRefractTex->getWidth() != desWidth ||

+ 0 - 7
Engine/source/sfx/media/sfxVorbisStream.cpp

@@ -114,13 +114,6 @@ long SFXVorbisStream::_tell_func( void *datasource )
 
 bool SFXVorbisStream::_openVorbis()
 {
-#if defined(TORQUE_OS_XENON)
-   // For some reason the datasource pointer passed to the callbacks is not the
-   // same as it is when passed in to ov_open_callbacks
-#pragma message("There is a strange bug in ov_open_callbacks as it compiles on the Xbox360. Use FMOD resource loading.")
-   AssertWarn(false, "There is a strange bug in ov_open_callbacks as it compiles on the Xbox360. Use FMOD resource loading.");
-   return false;
-#endif
    mVF = new OggVorbis_File;
    dMemset( mVF, 0, sizeof( OggVorbis_File ) );
 

+ 0 - 7
Engine/source/shaderGen/shaderGen.cpp

@@ -100,13 +100,6 @@ void ShaderGen::initShaderGen()
    mInit = true;
 
    String shaderPath = Con::getVariable( "$shaderGen::cachePath");
-#if defined(TORQUE_SHADERGEN) && ( defined(TORQUE_OS_XENON) || defined(TORQUE_OS_PS3) )
-   // If this is a console build, and TORQUE_SHADERGEN is defined 
-   // (signifying that new shaders should be generated) then clear the shader
-   // path so that the MemFileSystem is used instead.
-   shaderPath.clear();
-#endif
-
    if (!shaderPath.equal( "shadergen:" ) && !shaderPath.isEmpty() )
    {
       // this is necessary, especially under Windows with UAC enabled

+ 0 - 4
Engine/source/ts/arch/tsMeshIntrinsics.arch.h

@@ -29,11 +29,7 @@ extern void zero_vert_normal_bulk_SSE(const dsize_t count, U8 * __restrict const
 #
 #elif defined(TORQUE_CPU_PPC)
 # // PPC CPU family implementations
-#  if defined(TORQUE_OS_XENON)
-extern void zero_vert_normal_bulk_X360(const dsize_t count, U8 * __restrict const outPtr, const dsize_t outStride);
-#  else
 extern void zero_vert_normal_bulk_gccvec(const dsize_t count, U8 * __restrict const outPtr, const dsize_t outStride);
-#  endif
 #
 #else
 # // Other CPU types go here...

+ 0 - 4
Engine/source/ts/tsMesh.cpp

@@ -54,10 +54,6 @@
 
 #include "opcode/Opcode.h"
 
-#if defined(TORQUE_OS_XENON)
-#  include "platformXbox/platformXbox.h"
-#endif
-
 GFXPrimitiveType drawTypes[] = { GFXTriangleList, GFXTriangleStrip };
 #define getDrawType(a) (drawTypes[a])
 

+ 0 - 13
Engine/source/ts/tsMesh.h

@@ -47,14 +47,6 @@
 
 #include "core/util/safeDelete.h"
 
-#if defined(TORQUE_OS_XENON)
-//#  define USE_MEM_VERTEX_BUFFERS
-#endif
-
-#if defined(USE_MEM_VERTEX_BUFFERS)
-#  include "gfx/D3D9/360/gfx360MemVertexBuffer.h"
-#endif
-
 namespace Opcode { class Model; class MeshInterface; }
 namespace IceMaths { class IndexedTriangle; class Point; }
 
@@ -89,12 +81,7 @@ struct TSDrawPrimitive
    S32 matIndex;    ///< holds material index & element type (see above enum)
 };
 
-#if defined(USE_MEM_VERTEX_BUFFERS)
-struct __NullVertexStruct {};
-typedef GFX360MemVertexBufferHandle<__NullVertexStruct> TSVertexBufferHandle;
-#else
 typedef GFXVertexBufferDataHandle TSVertexBufferHandle;
-#endif
 
 class TSMesh;
 class TSShapeAlloc;

+ 6 - 11
Engine/source/ts/tsMeshIntrinsics.cpp

@@ -59,24 +59,19 @@ MODULE_BEGIN( TSMeshIntrinsics )
       // Assign defaults (C++ versions)
       zero_vert_normal_bulk = zero_vert_normal_bulk_C;
 
-   #if defined(TORQUE_OS_XENON)
-      zero_vert_normal_bulk = zero_vert_normal_bulk_X360;
-   #else
       // Find the best implementation for the current CPU
       if(Platform::SystemInfo.processor.properties & CPU_PROP_SSE)
       {
-   #if (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 )) 
-         
-         zero_vert_normal_bulk = zero_vert_normal_bulk_SSE;
-   #endif
+         #if (defined( TORQUE_CPU_X86 ) || defined( TORQUE_CPU_X64 )) 
+            zero_vert_normal_bulk = zero_vert_normal_bulk_SSE;
+         #endif
       }
       else if(Platform::SystemInfo.processor.properties & CPU_PROP_ALTIVEC)
       {
-   #if !defined(TORQUE_OS_XENON) && defined(TORQUE_CPU_PPC)
-         zero_vert_normal_bulk = zero_vert_normal_bulk_gccvec;
-   #endif
+         #if defined(TORQUE_CPU_PPC)
+            zero_vert_normal_bulk = zero_vert_normal_bulk_gccvec;
+         #endif
       }
-   #endif
    }
 
 MODULE_END;

+ 0 - 4
Engine/source/windowManager/windowInputGenerator.cpp

@@ -44,10 +44,6 @@ WindowInputGenerator::WindowInputGenerator( PlatformWindow *window ) :
 {
    AssertFatal(mWindow, "NULL PlatformWindow on WindowInputGenerator creation");
 
-#ifdef TORQUE_OS_XENON
-   mFocused = true;
-#endif
-
    if (mWindow->getOffscreenRender())
       mFocused = true;