Removes Entity/Component stuff from being behind an experimental flag.

This commit is contained in:
Areloch 2017-10-15 06:03:59 -05:00
parent 6479c7592a
commit 0c21ef1b45
38 changed files with 181 additions and 737 deletions

View file

@ -44,10 +44,8 @@
#include "console/engineAPI.h"
#include "math/mTransform.h"
#ifdef TORQUE_EXPERIMENTAL_EC
#include "T3D/entity.h"
#include "T3D/components/coreInterfaces.h"
#endif
#ifdef TORQUE_HIFI_NET
#include "T3D/gameBase/hifi/hifiMoveList.h"
@ -785,7 +783,6 @@ bool GameConnection::getControlCameraFov(F32 * fov)
}
if (cObj)
{
#ifdef TORQUE_EXPERIMENTAL_EC
if (Entity* ent = dynamic_cast<Entity*>(cObj))
{
if (CameraInterface* camInterface = ent->getComponent<CameraInterface>())
@ -795,11 +792,9 @@ bool GameConnection::getControlCameraFov(F32 * fov)
}
else
{
*fov = cObj->getCameraFov();
*fov = cObj->getCameraFov();
}
#else
*fov = cObj->getCameraFov();
#endif
return(true);
}
@ -819,7 +814,6 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
if (cObj)
{
#ifdef TORQUE_EXPERIMENTAL_EC
if (Entity* ent = dynamic_cast<Entity*>(cObj))
{
if (CameraInterface* camInterface = ent->getComponent<CameraInterface>())
@ -831,9 +825,6 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
{
return cObj->isValidCameraFov(fov);
}
#else
return cObj->isValidCameraFov(fov);
#endif
}
return NULL;
@ -851,8 +842,6 @@ bool GameConnection::setControlCameraFov(F32 fov)
}
if (cObj)
{
#ifdef TORQUE_EXPERIMENTAL_EC
F32 newFov = 90.f;
if (Entity* ent = dynamic_cast<Entity*>(cObj))
{
@ -872,11 +861,6 @@ bool GameConnection::setControlCameraFov(F32 fov)
cObj->setCameraFov(mClampF(fov, MinCameraFov, MaxCameraFov));
newFov = cObj->getCameraFov();
}
#else
// allow shapebase to clamp fov to its datablock values
cObj->setCameraFov(mClampF(fov, MinCameraFov, MaxCameraFov));
F32 newFov = cObj->getCameraFov();
#endif
// server fov of client has 1degree resolution
if( S32(newFov) != S32(mCameraFov) || newFov != fov )

View file

@ -32,10 +32,8 @@
#include "platform/profiler.h"
#include "console/consoleTypes.h"
#ifdef TORQUE_EXPERIMENTAL_EC
#include "T3D/components/coreInterfaces.h"
#include "T3D/components/component.h"
#endif
//----------------------------------------------------------------------------
ProcessObject::ProcessObject()
@ -277,12 +275,10 @@ void ProcessList::advanceObjects()
onTickObject(pobj);
}
#ifdef TORQUE_EXPERIMENTAL_EC
for (U32 i = 0; i < UpdateInterface::all.size(); i++)
{
UpdateInterface::all[i]->processTick();
}
#endif
mTotalTicks++;

View file

@ -37,10 +37,8 @@
#include "T3D/gameBase/std/stdMoveList.h"
#include "T3D/fx/cameraFXMgr.h"
#ifdef TORQUE_EXPERIMENTAL_EC
#include "T3D/components/coreInterfaces.h"
#include "T3D/components/component.h"
#endif
MODULE_BEGIN( ProcessList )
@ -137,7 +135,6 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
obj = obj->mProcessLink.next;
}
#ifdef TORQUE_EXPERIMENTAL_EC
for (U32 i = 0; i < UpdateInterface::all.size(); i++)
{
Component *comp = dynamic_cast<Component*>(UpdateInterface::all[i]);
@ -147,7 +144,6 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
UpdateInterface::all[i]->interpolateTick(mLastDelta);
}
#endif
// Inform objects of total elapsed delta so they can advance
// client side animations.
@ -163,7 +159,6 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
obj = obj->mProcessLink.next;
}
#ifdef TORQUE_EXPERIMENTAL_EC
for (U32 i = 0; i < UpdateInterface::all.size(); i++)
{
Component *comp = dynamic_cast<Component*>(UpdateInterface::all[i]);
@ -176,7 +171,6 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
UpdateInterface::all[i]->advanceTime(dt);
}
#endif
return ret;
}

View file

@ -36,9 +36,7 @@
#include "gui/editor/editorFunctions.h"
#endif
#include "console/engineAPI.h"
#ifdef TORQUE_EXPERIMENTAL_EC
#include "T3D/entity.h"
#endif
IMPLEMENT_CONOBJECT(GuiTreeViewCtrl);
@ -647,7 +645,6 @@ void GuiTreeViewCtrl::Item::getTooltipText(U32 bufLen, char *buf)
bool GuiTreeViewCtrl::Item::isParent() const
{
#ifdef TORQUE_EXPERIMENTAL_EC
//We might have a special case with entities
//So if our entity either has children, or has some component with the EditorInspect interface, we return true
if (mInspectorInfo.mObject)
@ -659,7 +656,6 @@ bool GuiTreeViewCtrl::Item::isParent() const
return true;
}
}
#endif
if(mState.test(VirtualParent))
{
@ -3790,7 +3786,6 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
if( !item->isInspectorData() && item->mState.test(Item::VirtualParent) )
onVirtualParentExpand(item);
#ifdef TORQUE_EXPERIMENTAL_EC
//Slightly hacky, but I'm not sure of a better setup until we get major update to the editors
//We check if our object is an entity, and if it is, we call a 'onInspect' function.
//This function is pretty much a special notifier to the entity so if it has any behaviors that do special
@ -3810,7 +3805,6 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
}
}
}
#endif
mFlags.set( RebuildVisible );
scrollVisible(item);
@ -4558,12 +4552,10 @@ bool GuiTreeViewCtrl::objectSearch( const SimObject *object, Item **item )
if ( !pItem )
continue;
#ifdef TORQUE_EXPERIMENTAL_EC
//A bit hackish, but we make a special exception here for items that are named 'Components', as they're merely
//virtual parents to act as a container to an Entity's components
if (pItem->mScriptInfo.mText == StringTable->insert("Components"))
continue;
#endif
SimObject *pObj = pItem->getObject();
@ -4628,11 +4620,10 @@ bool GuiTreeViewCtrl::onVirtualParentBuild(Item *item, bool bForceFullUpdate)
// Go through our items and purge those that have disappeared from
// the set.
#ifdef TORQUE_EXPERIMENTAL_EC
//Entities will be a special case here, if we're an entity, skip this step
if (dynamic_cast<Entity*>(srcObj))
return true;
#endif
for( Item* ptr = item->mChild; ptr != NULL; )
{

View file

@ -29,11 +29,9 @@
#include "gui/containers/guiScrollCtrl.h"
#include "gui/editor/inspector/customField.h"
#ifdef TORQUE_EXPERIMENTAL_EC
#include "gui/editor/inspector/entityGroup.h"
#include "gui/editor/inspector/mountingGroup.h"
#include "gui/editor/inspector/componentGroup.h"
#endif
IMPLEMENT_CONOBJECT(GuiInspector);
@ -589,7 +587,6 @@ void GuiInspector::refresh()
mGroups.push_back(general);
addObject(general);
#ifdef TORQUE_EXPERIMENTAL_EC
//Entity inspector group
if (mTargets.first()->getClassRep()->isSubclassOf("Entity"))
{
@ -624,7 +621,6 @@ void GuiInspector::refresh()
addObject(compGroup);
}
}
#endif
// Create the inspector groups for static fields.

View file

@ -26,9 +26,7 @@
#include "gui/editor/inspector/dynamicField.h"
#include "console/engineAPI.h"
#ifdef TORQUE_EXPERIMENTAL_EC
#include "T3D/components/component.h"
#endif
IMPLEMENT_CONOBJECT(GuiInspectorDynamicGroup);
@ -126,7 +124,6 @@ bool GuiInspectorDynamicGroup::inspectGroup()
SimFieldDictionary * fieldDictionary = target->getFieldDictionary();
for(SimFieldDictionaryIterator ditr(fieldDictionary); *ditr; ++ditr)
{
#ifdef TORQUE_EXPERIMENTAL_EC
if (target->getClassRep()->isSubclassOf("Component"))
{
Component* compTarget = dynamic_cast<Component*>(target);
@ -135,7 +132,7 @@ bool GuiInspectorDynamicGroup::inspectGroup()
if (compField)
continue;
}
#endif
if( i == 0 )
{
flist.increment();

View file

@ -26,10 +26,8 @@
#include "renderInstance/renderPassManager.h"
#include "math/util/matrixSet.h"
#ifdef TORQUE_EXPERIMENTAL_EC
#include "T3D/components/render/renderComponentInterface.h"
#include "T3D/components/component.h"
#endif
//-----------------------------------------------------------------------------
@ -108,7 +106,6 @@ void SceneRenderState::renderObjects( SceneObject** objects, U32 numObjects )
object->prepRenderImage( this );
}
#ifdef TORQUE_EXPERIMENTAL_EC
U32 interfaceCount = RenderComponentInterface::all.size();
for (U32 i = 0; i < RenderComponentInterface::all.size(); i++)
{
@ -119,7 +116,6 @@ void SceneRenderState::renderObjects( SceneObject** objects, U32 numObjects )
RenderComponentInterface::all[i]->prepRenderImage(this);
}
}
#endif
PROFILE_END();