mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
process-order -- code to help positioning of objects in the process lists.
This commit is contained in:
parent
62500487f1
commit
8c65467697
|
|
@ -20,6 +20,11 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
|
||||
// Copyright (C) 2015 Faust Logic, Inc.
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "T3D/gameBase/processList.h"
|
||||
|
||||
|
|
@ -284,5 +289,20 @@ void ProcessList::advanceObjects()
|
|||
PROFILE_END();
|
||||
}
|
||||
|
||||
ProcessObject* ProcessList::findNearestToEnd(Vector<ProcessObject*>& objs) const
|
||||
{
|
||||
if (objs.empty())
|
||||
return 0;
|
||||
|
||||
for (ProcessObject* obj = mHead.mProcessLink.prev; obj != &mHead; obj = obj->mProcessLink.prev)
|
||||
{
|
||||
for (S32 i = 0; i < objs.size(); i++)
|
||||
{
|
||||
if (obj == objs[i])
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,11 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
|
||||
// Copyright (C) 2015 Faust Logic, Inc.
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#ifndef _PROCESSLIST_H_
|
||||
#define _PROCESSLIST_H_
|
||||
|
||||
|
|
@ -188,6 +193,9 @@ protected:
|
|||
|
||||
PreTickSignal mPreTick;
|
||||
PostTickSignal mPostTick;
|
||||
// JTF: still needed?
|
||||
public:
|
||||
ProcessObject* findNearestToEnd(Vector<ProcessObject*>& objs) const;
|
||||
};
|
||||
|
||||
#endif // _PROCESSLIST_H_
|
||||
Loading…
Reference in a new issue