mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
process-order -- code to help positioning of objects in the process lists.
This commit is contained in:
parent
0c4efbb762
commit
d5f51270eb
2 changed files with 28 additions and 0 deletions
|
|
@ -20,6 +20,11 @@
|
||||||
// IN THE SOFTWARE.
|
// 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 "platform/platform.h"
|
||||||
#include "T3D/gameBase/processList.h"
|
#include "T3D/gameBase/processList.h"
|
||||||
|
|
||||||
|
|
@ -284,5 +289,20 @@ void ProcessList::advanceObjects()
|
||||||
PROFILE_END();
|
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.
|
// 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_
|
#ifndef _PROCESSLIST_H_
|
||||||
#define _PROCESSLIST_H_
|
#define _PROCESSLIST_H_
|
||||||
|
|
||||||
|
|
@ -188,6 +193,9 @@ protected:
|
||||||
|
|
||||||
PreTickSignal mPreTick;
|
PreTickSignal mPreTick;
|
||||||
PostTickSignal mPostTick;
|
PostTickSignal mPostTick;
|
||||||
|
// JTF: still needed?
|
||||||
|
public:
|
||||||
|
ProcessObject* findNearestToEnd(Vector<ProcessObject*>& objs) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _PROCESSLIST_H_
|
#endif // _PROCESSLIST_H_
|
||||||
Loading…
Add table
Add a link
Reference in a new issue