From 5eba98204bf02e91ffde82fa442898f6f4c8f208 Mon Sep 17 00:00:00 2001 From: Lukas Aldershaab Date: Thu, 16 Dec 2021 19:10:47 +0100 Subject: [PATCH] Remove T2D references and minor cleanup --- Engine/source/T3D/assets/ShapeAsset.cpp | 2 +- Engine/source/app/game.cpp | 27 ++----------------- Engine/source/app/mainLoop.cpp | 1 - Engine/source/app/net/serverQuery.cpp | 1 - Engine/source/console/console.h | 3 +-- Engine/source/console/simObject.cpp | 2 +- Engine/source/console/simObject.h | 2 +- Engine/source/gui/controls/guiListBoxCtrl.cpp | 2 +- Engine/source/persistence/taml/taml.h | 4 +-- 9 files changed, 9 insertions(+), 35 deletions(-) diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index c532d2370e..2e49a31b3b 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -167,7 +167,7 @@ void ShapeAsset::initPersistFields() addProtectedField("fileName", TypeAssetLooseFilePath, Offset(mFileName, ShapeAsset), &setShapeFile, &getShapeFile, "Path to the shape file we want to render"); - addProtectedField("constuctorFileName", TypeAssetLooseFilePath, Offset(mConstructorFileName, ShapeAsset), + addProtectedField("constructorFileName", TypeAssetLooseFilePath, Offset(mConstructorFileName, ShapeAsset), &setShapeConstructorFile, &getShapeConstructorFile, "Path to the shape file we want to render"); addProtectedField("diffuseImposterFileName", TypeAssetLooseFilePath, Offset(mDiffuseImposterFileName, ShapeAsset), diff --git a/Engine/source/app/game.cpp b/Engine/source/app/game.cpp index 5878accd65..a091e5d5e1 100644 --- a/Engine/source/app/game.cpp +++ b/Engine/source/app/game.cpp @@ -40,15 +40,9 @@ #include "console/consoleTypes.h" #include "console/engineAPI.h" #include "gui/controls/guiMLTextCtrl.h" -#ifdef TORQUE_TGB_ONLY -#include "T2D/oldModel/networking/t2dGameConnection.h" -#include "T2D/oldModel/networking/t2dNetworkServerSceneProcess.h" -#include "T2D/oldModel/networking/t2dNetworkClientSceneProcess.h" -#else #include "T3D/gameBase/gameConnection.h" #include "T3D/gameFunctions.h" #include "T3D/gameBase/gameProcess.h" -#endif #include "platform/profiler.h" #include "gfx/gfxCubemap.h" #include "gfx/gfxTextureManager.h" @@ -252,30 +246,17 @@ bool clientProcess(U32 timeDelta) arcaneFX::advanceTime(timeDelta); #endif bool ret = true; - -#ifndef TORQUE_TGB_ONLY + ret = ClientProcessList::get()->advanceTime(timeDelta); -#else - ret = gt2dNetworkClientProcess.advanceTime( timeDelta ); -#endif ITickable::advanceTime(timeDelta); - -#ifndef TORQUE_TGB_ONLY + // Determine if we're lagging GameConnection* connection = GameConnection::getConnectionToServer(); if(connection) { connection->detectLag(); } -#else - // Determine if we're lagging - t2dGameConnection* connection = t2dGameConnection::getConnectionToServer(); - if(connection) - { - connection->detectLag(); - } -#endif // Let SFX process. SFX->_update(); @@ -286,11 +267,7 @@ bool clientProcess(U32 timeDelta) bool serverProcess(U32 timeDelta) { bool ret = true; -#ifndef TORQUE_TGB_ONLY ret = ServerProcessList::get()->advanceTime(timeDelta); -#else - ret = gt2dNetworkServerProcess.advanceTime( timeDelta ); -#endif return ret; } diff --git a/Engine/source/app/mainLoop.cpp b/Engine/source/app/mainLoop.cpp index 97f25e4f39..98a061ba78 100644 --- a/Engine/source/app/mainLoop.cpp +++ b/Engine/source/app/mainLoop.cpp @@ -58,7 +58,6 @@ #include "util/sampler.h" #include "platform/threads/threadPool.h" -// For the TickMs define... fix this for T2D... #include "T3D/gameBase/processList.h" #include "cinterface/cinterface.h" diff --git a/Engine/source/app/net/serverQuery.cpp b/Engine/source/app/net/serverQuery.cpp index ef41dab470..1dba298c0e 100644 --- a/Engine/source/app/net/serverQuery.cpp +++ b/Engine/source/app/net/serverQuery.cpp @@ -106,7 +106,6 @@ #include "sim/netConnection.h" #include "sim/netInterface.h" -// cafTODO: breaks T2D #include "T3D/gameBase/gameConnection.h" // This is basically the server query protocol version now: diff --git a/Engine/source/console/console.h b/Engine/source/console/console.h index 8816e4e99b..7b63a37ecb 100644 --- a/Engine/source/console/console.h +++ b/Engine/source/console/console.h @@ -873,8 +873,7 @@ namespace Con /// @param ... Variables to be written /// @see Con::errorf() void errorf(ConsoleLogEntry::Type type, const char *_format, ...); - - //some additions from t2d + /// Prints a separator to the console. inline void printSeparator(void) { printf("--------------------------------------------------------------------------------"); } diff --git a/Engine/source/console/simObject.cpp b/Engine/source/console/simObject.cpp index 3d485354cb..ea16fefe05 100644 --- a/Engine/source/console/simObject.cpp +++ b/Engine/source/console/simObject.cpp @@ -2206,7 +2206,7 @@ const char* SimObject::_getCanSave( void* object, const char* data ) //--------------------------------------------------------------------------- -// Copy SimObject to another SimObject (Originally designed for T2D). +// Copy SimObject to another SimObject. void SimObject::copyTo( SimObject* object ) { object->mClassName = mClassName; diff --git a/Engine/source/console/simObject.h b/Engine/source/console/simObject.h index 9cef85f0f2..fc0c2129a0 100644 --- a/Engine/source/console/simObject.h +++ b/Engine/source/console/simObject.h @@ -957,7 +957,7 @@ class SimObject: public ConsoleObject, public TamlCallbacks static void initPersistFields(); - /// Copy SimObject to another SimObject (Originally designed for T2D). + /// Copy SimObject to another SimObject. virtual void copyTo(SimObject* object); // Component Console Overrides diff --git a/Engine/source/gui/controls/guiListBoxCtrl.cpp b/Engine/source/gui/controls/guiListBoxCtrl.cpp index 4835b6d400..b4807daf77 100644 --- a/Engine/source/gui/controls/guiListBoxCtrl.cpp +++ b/Engine/source/gui/controls/guiListBoxCtrl.cpp @@ -1432,7 +1432,7 @@ const char* GuiListBoxCtrl::getStringElement( const char* inString, const U32 in } // Sanity! - AssertFatal( false, "t2dSceneObject::getStringElement() - Couldn't find specified string element!" ); + AssertFatal( false, "GuiListBoxCtrl::getStringElement() - Couldn't find specified string element!" ); // Didn't find it return " "; } diff --git a/Engine/source/persistence/taml/taml.h b/Engine/source/persistence/taml/taml.h index 09dbb4623d..9be652dc1d 100644 --- a/Engine/source/persistence/taml/taml.h +++ b/Engine/source/persistence/taml/taml.h @@ -64,8 +64,8 @@ extern StringTableEntry tamlNamedObjectName; //----------------------------------------------------------------------------- #define TAML_SIGNATURE "Taml" -#define TAML_SCHEMA_VARIABLE "$pref::T2D::TAMLSchema" -#define TAML_JSON_STRICT_VARIBLE "$pref::T2D::JSONStrict" +#define TAML_SCHEMA_VARIABLE "$pref::T3D::TAMLSchema" +#define TAML_JSON_STRICT_VARIBLE "$pref::T3D::JSONStrict" //-----------------------------------------------------------------------------