mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Merge branch 'Preview4_0' of https://github.com/TorqueGameEngines/Torque3D into kermithelpme
This commit is contained in:
commit
e2e1c491ac
68 changed files with 171 additions and 167 deletions
|
|
@ -195,7 +195,7 @@ private:
|
||||||
daeRawRefCache rawRefCache;
|
daeRawRefCache rawRefCache;
|
||||||
daeSidRefCache sidRefCache;
|
daeSidRefCache sidRefCache;
|
||||||
|
|
||||||
std::auto_ptr<charEncoding> localCharEncoding;
|
std::unique_ptr<charEncoding> localCharEncoding;
|
||||||
static charEncoding globalCharEncoding;
|
static charEncoding globalCharEncoding;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static daeErrorHandler *_instance;
|
static daeErrorHandler *_instance;
|
||||||
static std::auto_ptr<daeErrorHandler> _defaultInstance;
|
static std::unique_ptr<daeErrorHandler> _defaultInstance;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DAE_STANDARD_URI_RESOLVER__
|
#ifndef __DAE_STANDARD_URI_RESOLVER__
|
||||||
#define __DAE_STANDARD_URI_RESOVLER__
|
#define __DAE_STANDARD_URI_RESOLVER__
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "dae/daeURI.h"
|
#include "dae/daeURI.h"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
#include <modules/stdErrPlugin.h>
|
#include <modules/stdErrPlugin.h>
|
||||||
|
|
||||||
daeErrorHandler *daeErrorHandler::_instance = NULL;
|
daeErrorHandler *daeErrorHandler::_instance = NULL;
|
||||||
std::auto_ptr<daeErrorHandler> daeErrorHandler::_defaultInstance(new stdErrPlugin);
|
std::unique_ptr<daeErrorHandler> daeErrorHandler::_defaultInstance(new stdErrPlugin);
|
||||||
|
|
||||||
daeErrorHandler::daeErrorHandler() {
|
daeErrorHandler::daeErrorHandler() {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
// IN THE SOFTWARE.
|
// IN THE SOFTWARE.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef MATERIALASSET_H
|
#ifndef MATERIALASSET_H
|
||||||
#include "MaterialAsset.h"
|
#include "MaterialAsset.h"
|
||||||
|
|
@ -168,13 +167,29 @@ void MaterialAsset::initializeAsset()
|
||||||
|
|
||||||
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
||||||
|
|
||||||
|
if (mMatDefinitionName == StringTable->EmptyString())
|
||||||
|
{
|
||||||
|
mLoadedState = Failed;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Torque::FS::IsScriptFile(mScriptPath))
|
if (Torque::FS::IsScriptFile(mScriptPath))
|
||||||
{
|
{
|
||||||
if (!Sim::findObject(mMatDefinitionName))
|
if (!Sim::findObject(mMatDefinitionName))
|
||||||
if (Con::executeFile(mScriptPath, false, false))
|
{
|
||||||
mLoadedState = ScriptLoaded;
|
if (Con::executeFile(mScriptPath, false, false))
|
||||||
else
|
{
|
||||||
mLoadedState = Failed;
|
mLoadedState = ScriptLoaded;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mLoadedState = Failed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mLoadedState = DefinitionAlreadyExists;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadMaterial();
|
loadMaterial();
|
||||||
|
|
@ -184,6 +199,12 @@ void MaterialAsset::onAssetRefresh()
|
||||||
{
|
{
|
||||||
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath;
|
||||||
|
|
||||||
|
if (mMatDefinitionName == StringTable->EmptyString())
|
||||||
|
{
|
||||||
|
mLoadedState = Failed;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Torque::FS::IsScriptFile(mScriptPath))
|
if (Torque::FS::IsScriptFile(mScriptPath))
|
||||||
{
|
{
|
||||||
//Since we're refreshing, we can assume that the file we're executing WILL have an existing definition.
|
//Since we're refreshing, we can assume that the file we're executing WILL have an existing definition.
|
||||||
|
|
@ -199,7 +220,6 @@ void MaterialAsset::onAssetRefresh()
|
||||||
|
|
||||||
//And now that we've executed, switch back to the prior behavior
|
//And now that we've executed, switch back to the prior behavior
|
||||||
Con::setVariable("$Con::redefineBehavior", redefineBehaviorPrev.c_str());
|
Con::setVariable("$Con::redefineBehavior", redefineBehaviorPrev.c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadMaterial();
|
loadMaterial();
|
||||||
|
|
@ -227,7 +247,7 @@ void MaterialAsset::loadMaterial()
|
||||||
if (mMaterialDefinition)
|
if (mMaterialDefinition)
|
||||||
SAFE_DELETE(mMaterialDefinition);
|
SAFE_DELETE(mMaterialDefinition);
|
||||||
|
|
||||||
if (mLoadedState == ScriptLoaded && mMatDefinitionName != StringTable->EmptyString())
|
if ((mLoadedState == ScriptLoaded || mLoadedState == DefinitionAlreadyExists) && mMatDefinitionName != StringTable->EmptyString())
|
||||||
{
|
{
|
||||||
Material* matDef;
|
Material* matDef;
|
||||||
if (!Sim::findObject(mMatDefinitionName, matDef))
|
if (!Sim::findObject(mMatDefinitionName, matDef))
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ public:
|
||||||
enum MaterialAssetErrCode
|
enum MaterialAssetErrCode
|
||||||
{
|
{
|
||||||
ScriptLoaded = AssetErrCode::Extended,
|
ScriptLoaded = AssetErrCode::Extended,
|
||||||
|
DefinitionAlreadyExists,
|
||||||
Extended
|
Extended
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1409,7 +1409,7 @@ void AssetImporter::processImportAssets(AssetImportObject* assetItem)
|
||||||
Con::executef(this, processCommand.c_str(), item);
|
Con::executef(this, processCommand.c_str(), item);
|
||||||
}
|
}
|
||||||
|
|
||||||
item->importStatus == AssetImportObject::Processed;
|
item->importStatus = AssetImportObject::Processed;
|
||||||
|
|
||||||
//try recusing on the children(if any)
|
//try recusing on the children(if any)
|
||||||
processImportAssets(item);
|
processImportAssets(item);
|
||||||
|
|
@ -2018,7 +2018,7 @@ void AssetImporter::validateAsset(AssetImportObject* assetItem)
|
||||||
AssetQuery aQuery;
|
AssetQuery aQuery;
|
||||||
U32 numAssetsFound = AssetDatabase.findAllAssets(&aQuery);
|
U32 numAssetsFound = AssetDatabase.findAllAssets(&aQuery);
|
||||||
|
|
||||||
bool hasCollision = false;
|
hasCollision = false;
|
||||||
for (U32 i = 0; i < numAssetsFound; i++)
|
for (U32 i = 0; i < numAssetsFound; i++)
|
||||||
{
|
{
|
||||||
StringTableEntry assetId = aQuery.mAssetList[i];
|
StringTableEntry assetId = aQuery.mAssetList[i];
|
||||||
|
|
|
||||||
|
|
@ -931,15 +931,6 @@ public:
|
||||||
return imagePath;
|
return imagePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const char* makeFullPath(const String& path)
|
|
||||||
{
|
|
||||||
char qualifiedFilePath[2048];
|
|
||||||
|
|
||||||
Platform::makeFullPathName(path.c_str(), qualifiedFilePath, sizeof(qualifiedFilePath));
|
|
||||||
|
|
||||||
return qualifiedFilePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
void setTargetModuleId(const String& moduleId) { targetModuleId = moduleId; }
|
void setTargetModuleId(const String& moduleId) { targetModuleId = moduleId; }
|
||||||
const String& getTargetModuleId() { return targetModuleId; }
|
const String& getTargetModuleId() { return targetModuleId; }
|
||||||
|
|
|
||||||
|
|
@ -318,10 +318,10 @@ void ConvexShape::initPersistFields()
|
||||||
|
|
||||||
addGroup( "Internal" );
|
addGroup( "Internal" );
|
||||||
|
|
||||||
addProtectedField( "surface", TypeRealString, NULL, &protectedSetSurface, &defaultProtectedGetFn,
|
addProtectedField( "surface", TypeRealString, 0, &protectedSetSurface, &defaultProtectedGetFn,
|
||||||
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors );
|
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors );
|
||||||
|
|
||||||
addProtectedField( "surfaceTexture", TypeRealString, NULL, &protectedSetSurfaceTexture, &defaultProtectedGetFn,
|
addProtectedField( "surfaceTexture", TypeRealString, 0, &protectedSetSurfaceTexture, &defaultProtectedGetFn,
|
||||||
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors );
|
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors );
|
||||||
|
|
||||||
endGroup( "Internal" );
|
endGroup( "Internal" );
|
||||||
|
|
|
||||||
|
|
@ -1908,42 +1908,21 @@ void ParticleEmitter::copyToVB( const Point3F &camPos, const LinearColorF &ambie
|
||||||
|
|
||||||
if (mDataBlock->reverseOrder)
|
if (mDataBlock->reverseOrder)
|
||||||
{
|
{
|
||||||
buffPtr += 4 * (n_parts - 1);
|
|
||||||
// do sorted-oriented particles
|
|
||||||
if (mDataBlock->sortParticles)
|
|
||||||
{
|
|
||||||
SortParticle* partPtr = orderedVector.address();
|
|
||||||
for (U32 i = 0; i < n_parts - 1; i++, partPtr++, buffPtr -= 4)
|
|
||||||
setupRibbon(partPtr->p, partPtr++->p, partPtr--->p, camPos, ambientColor, buffPtr);
|
|
||||||
}
|
|
||||||
// do unsorted-oriented particles
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Particle* oldPtr = NULL;
|
Particle* oldPtr = NULL;
|
||||||
for (Particle* partPtr = part_list_head.next; partPtr != NULL; partPtr = partPtr->next, buffPtr -= 4) {
|
for (Particle* partPtr = part_list_head.next; partPtr != NULL; partPtr = partPtr->next, buffPtr -= 4)
|
||||||
|
{
|
||||||
setupRibbon(partPtr, partPtr->next, oldPtr, camPos, ambientColor, buffPtr);
|
setupRibbon(partPtr, partPtr->next, oldPtr, camPos, ambientColor, buffPtr);
|
||||||
oldPtr = partPtr;
|
oldPtr = partPtr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// do sorted-oriented particles
|
|
||||||
if (mDataBlock->sortParticles)
|
|
||||||
{
|
|
||||||
SortParticle* partPtr = orderedVector.address();
|
|
||||||
for (U32 i = 0; i < n_parts - 1; i++, partPtr++, buffPtr += 4)
|
|
||||||
setupRibbon(partPtr->p, partPtr++->p, partPtr--->p, camPos, ambientColor, buffPtr);
|
|
||||||
}
|
|
||||||
// do unsorted-oriented particles
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Particle* oldPtr = NULL;
|
Particle* oldPtr = NULL;
|
||||||
for (Particle* partPtr = part_list_head.next; partPtr != NULL; partPtr = partPtr->next, buffPtr += 4) {
|
for (Particle* partPtr = part_list_head.next; partPtr != NULL; partPtr = partPtr->next, buffPtr += 4)
|
||||||
|
{
|
||||||
setupRibbon(partPtr, partPtr->next, oldPtr, camPos, ambientColor, buffPtr);
|
setupRibbon(partPtr, partPtr->next, oldPtr, camPos, ambientColor, buffPtr);
|
||||||
oldPtr = partPtr;
|
oldPtr = partPtr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
PROFILE_END();
|
PROFILE_END();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -996,7 +996,7 @@ void Precipitation::initRenderObjects()
|
||||||
// entire or a partially filled vb.
|
// entire or a partially filled vb.
|
||||||
mRainIB.set(GFX, mMaxVBDrops * 6, 0, GFXBufferTypeStatic);
|
mRainIB.set(GFX, mMaxVBDrops * 6, 0, GFXBufferTypeStatic);
|
||||||
U16 *idxBuff;
|
U16 *idxBuff;
|
||||||
mRainIB.lock(&idxBuff, NULL, NULL, NULL);
|
mRainIB.lock(&idxBuff, NULL, 0, 0);
|
||||||
for( U32 i=0; i < mMaxVBDrops; i++ )
|
for( U32 i=0; i < mMaxVBDrops; i++ )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -807,7 +807,7 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
|
||||||
return cObj->isValidCameraFov(fov);
|
return cObj->isValidCameraFov(fov);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameConnection::setControlCameraFov(F32 fov)
|
bool GameConnection::setControlCameraFov(F32 fov)
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ class ShapeBaseConvex : public Convex
|
||||||
Box3F box;
|
Box3F box;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ShapeBaseConvex() :pShapeBase(NULL), transform(NULL), hullId(NULL), nodeTransform(0) { mType = ShapeBaseConvexType; }
|
ShapeBaseConvex() :pShapeBase(NULL), transform(NULL), hullId(0), nodeTransform(0) { mType = ShapeBaseConvexType; }
|
||||||
ShapeBaseConvex(const ShapeBaseConvex& cv) {
|
ShapeBaseConvex(const ShapeBaseConvex& cv) {
|
||||||
mObject = cv.mObject;
|
mObject = cv.mObject;
|
||||||
pShapeBase = cv.pShapeBase;
|
pShapeBase = cv.pShapeBase;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ class afxAnimCurve
|
||||||
|
|
||||||
public:
|
public:
|
||||||
afxAnimCurve();
|
afxAnimCurve();
|
||||||
~afxAnimCurve();
|
virtual ~afxAnimCurve();
|
||||||
|
|
||||||
void addKey( Point2F &v );
|
void addKey( Point2F &v );
|
||||||
void addKey( F32 time, F32 value );
|
void addKey( F32 time, F32 value );
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
class afxCurveEval
|
class afxCurveEval
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~afxCurveEval() { }
|
||||||
virtual Point2F evaluateCurve(Point2F& v0, Point2F& v1, F32 t)=0;
|
virtual Point2F evaluateCurve(Point2F& v0, Point2F& v1, F32 t)=0;
|
||||||
virtual Point2F evaluateCurve(Point2F& v0, Point2F& v1, Point2F& t0, Point2F& t1, F32 t)=0;
|
virtual Point2F evaluateCurve(Point2F& v0, Point2F& v1, Point2F& t0, Point2F& t1, F32 t)=0;
|
||||||
virtual Point2F evaluateCurveTangent(Point2F& v0, Point2F& v1, F32 t)=0;
|
virtual Point2F evaluateCurveTangent(Point2F& v0, Point2F& v1, F32 t)=0;
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ public:
|
||||||
class afxXM_WaveInterp
|
class afxXM_WaveInterp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~afxXM_WaveInterp() { }
|
||||||
virtual void interpolate(F32 t, afxXM_Params& params)=0;
|
virtual void interpolate(F32 t, afxXM_Params& params)=0;
|
||||||
virtual void pulse()=0;
|
virtual void pulse()=0;
|
||||||
|
|
||||||
|
|
@ -250,7 +251,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxXM_WaveBase(afxXM_WaveBaseData*, afxEffectWrapper*, afxXM_WaveInterp*);
|
/*C*/ afxXM_WaveBase(afxXM_WaveBaseData*, afxEffectWrapper*, afxXM_WaveInterp*);
|
||||||
/*D*/ ~afxXM_WaveBase();
|
/*D*/ virtual ~afxXM_WaveBase();
|
||||||
|
|
||||||
virtual void updateParams(F32 dt, F32 elapsed, afxXM_Params& params);
|
virtual void updateParams(F32 dt, F32 elapsed, afxXM_Params& params);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class OptimizedPolyList : public AbstractPolyList
|
||||||
|
|
||||||
Poly()
|
Poly()
|
||||||
: plane( -1 ),
|
: plane( -1 ),
|
||||||
material( NULL ),
|
material( 0 ),
|
||||||
vertexStart(0),
|
vertexStart(0),
|
||||||
vertexCount( 0 ),
|
vertexCount( 0 ),
|
||||||
surfaceKey(0),
|
surfaceKey(0),
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public:
|
||||||
Collision()
|
Collision()
|
||||||
{
|
{
|
||||||
object = NULL;
|
object = NULL;
|
||||||
material = NULL;
|
material = 0;
|
||||||
distance = 0.0;
|
distance = 0.0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -774,9 +774,9 @@ YY_MALLOC_DECL
|
||||||
|
|
||||||
YY_DECL
|
YY_DECL
|
||||||
{
|
{
|
||||||
register yy_state_type yy_current_state;
|
yy_state_type yy_current_state;
|
||||||
register char *yy_cp, *yy_bp;
|
char *yy_cp, *yy_bp;
|
||||||
register int yy_act;
|
int yy_act;
|
||||||
|
|
||||||
#line 105 "CMDscan.l"
|
#line 105 "CMDscan.l"
|
||||||
|
|
||||||
|
|
@ -823,7 +823,7 @@ YY_DECL
|
||||||
yy_match:
|
yy_match:
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
||||||
if ( yy_accept[yy_current_state] )
|
if ( yy_accept[yy_current_state] )
|
||||||
{
|
{
|
||||||
yy_last_accepting_state = yy_current_state;
|
yy_last_accepting_state = yy_current_state;
|
||||||
|
|
@ -1430,9 +1430,9 @@ case YY_STATE_EOF(INITIAL):
|
||||||
|
|
||||||
static int yy_get_next_buffer()
|
static int yy_get_next_buffer()
|
||||||
{
|
{
|
||||||
register char *dest = yy_current_buffer->yy_ch_buf;
|
char *dest = yy_current_buffer->yy_ch_buf;
|
||||||
register char *source = yytext_ptr;
|
char *source = yytext_ptr;
|
||||||
register int number_to_move, i;
|
int number_to_move, i;
|
||||||
int ret_val;
|
int ret_val;
|
||||||
|
|
||||||
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
|
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
|
||||||
|
|
@ -1560,14 +1560,14 @@ static int yy_get_next_buffer()
|
||||||
|
|
||||||
static yy_state_type yy_get_previous_state()
|
static yy_state_type yy_get_previous_state()
|
||||||
{
|
{
|
||||||
register yy_state_type yy_current_state;
|
yy_state_type yy_current_state;
|
||||||
register char *yy_cp;
|
char *yy_cp;
|
||||||
|
|
||||||
yy_current_state = yy_start;
|
yy_current_state = yy_start;
|
||||||
|
|
||||||
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
|
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
|
||||||
{
|
{
|
||||||
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
||||||
if ( yy_accept[yy_current_state] )
|
if ( yy_accept[yy_current_state] )
|
||||||
{
|
{
|
||||||
yy_last_accepting_state = yy_current_state;
|
yy_last_accepting_state = yy_current_state;
|
||||||
|
|
@ -1599,10 +1599,10 @@ static yy_state_type yy_try_NUL_trans( yy_current_state )
|
||||||
yy_state_type yy_current_state;
|
yy_state_type yy_current_state;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
register int yy_is_jam;
|
int yy_is_jam;
|
||||||
register char *yy_cp = yy_c_buf_p;
|
char *yy_cp = yy_c_buf_p;
|
||||||
|
|
||||||
register YY_CHAR yy_c = 1;
|
YY_CHAR yy_c = 1;
|
||||||
if ( yy_accept[yy_current_state] )
|
if ( yy_accept[yy_current_state] )
|
||||||
{
|
{
|
||||||
yy_last_accepting_state = yy_current_state;
|
yy_last_accepting_state = yy_current_state;
|
||||||
|
|
@ -1623,14 +1623,14 @@ yy_state_type yy_current_state;
|
||||||
|
|
||||||
#ifndef YY_NO_UNPUT
|
#ifndef YY_NO_UNPUT
|
||||||
#ifdef YY_USE_PROTOS
|
#ifdef YY_USE_PROTOS
|
||||||
static void yyunput( int c, register char *yy_bp )
|
static void yyunput( int c, char *yy_bp )
|
||||||
#else
|
#else
|
||||||
static void yyunput( c, yy_bp )
|
static void yyunput( c, yy_bp )
|
||||||
int c;
|
int c;
|
||||||
register char *yy_bp;
|
char *yy_bp;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
register char *yy_cp = yy_c_buf_p;
|
char *yy_cp = yy_c_buf_p;
|
||||||
|
|
||||||
/* undo effects of setting up yytext */
|
/* undo effects of setting up yytext */
|
||||||
*yy_cp = yy_hold_char;
|
*yy_cp = yy_hold_char;
|
||||||
|
|
@ -1638,10 +1638,10 @@ register char *yy_bp;
|
||||||
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
||||||
{ /* need to shift things up to make room */
|
{ /* need to shift things up to make room */
|
||||||
/* +2 for EOB chars. */
|
/* +2 for EOB chars. */
|
||||||
register int number_to_move = yy_n_chars + 2;
|
int number_to_move = yy_n_chars + 2;
|
||||||
register char *dest = &yy_current_buffer->yy_ch_buf[
|
char *dest = &yy_current_buffer->yy_ch_buf[
|
||||||
yy_current_buffer->yy_buf_size + 2];
|
yy_current_buffer->yy_buf_size + 2];
|
||||||
register char *source =
|
char *source =
|
||||||
&yy_current_buffer->yy_ch_buf[number_to_move];
|
&yy_current_buffer->yy_ch_buf[number_to_move];
|
||||||
|
|
||||||
while ( source > yy_current_buffer->yy_ch_buf )
|
while ( source > yy_current_buffer->yy_ch_buf )
|
||||||
|
|
@ -2095,7 +2095,7 @@ yyconst char *s2;
|
||||||
int n;
|
int n;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
for ( i = 0; i < n; ++i )
|
for ( i = 0; i < n; ++i )
|
||||||
s1[i] = s2[i];
|
s1[i] = s2[i];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ S32 QSORT_CALLBACK ArrayObject::_valueFunctionCompare( const void* a, const void
|
||||||
|
|
||||||
ArrayObject::ArrayObject()
|
ArrayObject::ArrayObject()
|
||||||
: mCaseSensitive( false ),
|
: mCaseSensitive( false ),
|
||||||
mCurrentIndex( NULL )
|
mCurrentIndex( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,7 +137,7 @@ void ArrayObject::initPersistFields()
|
||||||
"Makes the keys and values case-sensitive.\n"
|
"Makes the keys and values case-sensitive.\n"
|
||||||
"By default, comparison of key and value strings will be case-insensitive." );
|
"By default, comparison of key and value strings will be case-insensitive." );
|
||||||
|
|
||||||
addProtectedField( "key", TypeCaseString, NULL, &_addKeyFromField, &emptyStringProtectedGetFn,
|
addProtectedField( "key", TypeCaseString, 0, &_addKeyFromField, &emptyStringProtectedGetFn,
|
||||||
"Helper field which allows you to add new key['keyname'] = value pairs." );
|
"Helper field which allows you to add new key['keyname'] = value pairs." );
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
|
|
|
||||||
|
|
@ -179,10 +179,10 @@ void SimObject::initPersistFields()
|
||||||
|
|
||||||
addGroup( "Editing" );
|
addGroup( "Editing" );
|
||||||
|
|
||||||
addProtectedField( "hidden", TypeBool, NULL,
|
addProtectedField( "hidden", TypeBool, 0,
|
||||||
&_setHidden, &_getHidden,
|
&_setHidden, &_getHidden,
|
||||||
"Whether the object is visible." );
|
"Whether the object is visible." );
|
||||||
addProtectedField( "locked", TypeBool, NULL,
|
addProtectedField( "locked", TypeBool, 0,
|
||||||
&_setLocked, &_getLocked,
|
&_setLocked, &_getLocked,
|
||||||
"Whether the object can be edited." );
|
"Whether the object can be edited." );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ void StringBuffer::getCopy(UTF16 *buff, const U32 buffSize) const
|
||||||
AssertFatal(mBuffer.last() == 0, "StringBuffer::get UTF8 - not a null terminated string!");
|
AssertFatal(mBuffer.last() == 0, "StringBuffer::get UTF8 - not a null terminated string!");
|
||||||
dMemcpy(buff, mBuffer.address(), sizeof(UTF16) * getMin(buffSize, (U32)mBuffer.size()));
|
dMemcpy(buff, mBuffer.address(), sizeof(UTF16) * getMin(buffSize, (U32)mBuffer.size()));
|
||||||
// ensure null termination.
|
// ensure null termination.
|
||||||
buff[buffSize-1] = NULL;
|
buff[buffSize-1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UTF8* StringBuffer::createCopy8() const
|
UTF8* StringBuffer::createCopy8() const
|
||||||
|
|
|
||||||
|
|
@ -236,8 +236,8 @@ U32 convertUTF16toUTF8DoubleNULL( const UTF16 *unistring, UTF8 *outbuffer, U32
|
||||||
}
|
}
|
||||||
|
|
||||||
nCodeunits = getMin(nCodeunits,len - 1);
|
nCodeunits = getMin(nCodeunits,len - 1);
|
||||||
outbuffer[nCodeunits] = NULL;
|
outbuffer[nCodeunits] = '\0';
|
||||||
outbuffer[nCodeunits+1] = NULL;
|
outbuffer[nCodeunits+1] = '\0';
|
||||||
|
|
||||||
PROFILE_END();
|
PROFILE_END();
|
||||||
return nCodeunits;
|
return nCodeunits;
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,12 @@ Convert the byte ordering on the U16 to and from big/little endian format.
|
||||||
|
|
||||||
inline U16 endianSwap(const U16 in_swap)
|
inline U16 endianSwap(const U16 in_swap)
|
||||||
{
|
{
|
||||||
|
#ifdef TORQUE_U16_ENDIANSWAP_BUILTIN
|
||||||
|
return TORQUE_U16_ENDIANSWAP_BUILTIN(in_swap);
|
||||||
|
#else
|
||||||
return U16(((in_swap >> 8) & 0x00ff) |
|
return U16(((in_swap >> 8) & 0x00ff) |
|
||||||
((in_swap << 8) & 0xff00));
|
((in_swap << 8) & 0xff00));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
inline S16 endianSwap(const S16 in_swap)
|
inline S16 endianSwap(const S16 in_swap)
|
||||||
|
|
@ -64,10 +68,14 @@ Convert the byte ordering on the U32 to and from big/little endian format.
|
||||||
*/
|
*/
|
||||||
inline U32 endianSwap(const U32 in_swap)
|
inline U32 endianSwap(const U32 in_swap)
|
||||||
{
|
{
|
||||||
|
#ifdef TORQUE_U32_ENDIANSWAP_BUILTIN
|
||||||
|
return TORQUE_U32_ENDIANSWAP_BUILTIN(in_swap);
|
||||||
|
#else
|
||||||
return U32(((in_swap >> 24) & 0x000000ff) |
|
return U32(((in_swap >> 24) & 0x000000ff) |
|
||||||
((in_swap >> 8) & 0x0000ff00) |
|
((in_swap >> 8) & 0x0000ff00) |
|
||||||
((in_swap << 8) & 0x00ff0000) |
|
((in_swap << 8) & 0x00ff0000) |
|
||||||
((in_swap << 24) & 0xff000000));
|
((in_swap << 24) & 0xff000000));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
inline S32 endianSwap(const S32 in_swap)
|
inline S32 endianSwap(const S32 in_swap)
|
||||||
|
|
@ -77,12 +85,16 @@ inline S32 endianSwap(const S32 in_swap)
|
||||||
|
|
||||||
inline U64 endianSwap(const U64 in_swap)
|
inline U64 endianSwap(const U64 in_swap)
|
||||||
{
|
{
|
||||||
|
#ifdef TORQUE_U64_ENDIANSWAP_BUILTIN
|
||||||
|
return TORQUE_U64_ENDIANSWAP_BUILTIN(in_swap);
|
||||||
|
#else
|
||||||
U32 *inp = (U32 *) &in_swap;
|
U32 *inp = (U32 *) &in_swap;
|
||||||
U64 ret;
|
U64 ret;
|
||||||
U32 *outp = (U32 *) &ret;
|
U32 *outp = (U32 *) &ret;
|
||||||
outp[0] = endianSwap(inp[1]);
|
outp[0] = endianSwap(inp[1]);
|
||||||
outp[1] = endianSwap(inp[0]);
|
outp[1] = endianSwap(inp[0]);
|
||||||
return ret;
|
return ret;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
inline S64 endianSwap(const S64 in_swap)
|
inline S64 endianSwap(const S64 in_swap)
|
||||||
|
|
@ -138,4 +150,3 @@ TORQUE_DECLARE_TEMPLATIZED_ENDIAN_CONV(F32)
|
||||||
TORQUE_DECLARE_TEMPLATIZED_ENDIAN_CONV(F64)
|
TORQUE_DECLARE_TEMPLATIZED_ENDIAN_CONV(F64)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@
|
||||||
namespace Torque
|
namespace Torque
|
||||||
{
|
{
|
||||||
|
|
||||||
extern U32 hash(register const U8 *k, register U32 length, register U32 initval);
|
extern U32 hash(const U8 *k, U32 length, U32 initval);
|
||||||
|
|
||||||
extern U64 hash64(register const U8 *k, register U32 length, register U64 initval);
|
extern U64 hash64(const U8 *k, U32 length, U64 initval);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -320,7 +320,7 @@ void DecalRoad::initPersistFields()
|
||||||
|
|
||||||
addGroup( "Internal" );
|
addGroup( "Internal" );
|
||||||
|
|
||||||
addProtectedField( "node", TypeString, NULL, &addNodeFromField, &emptyStringProtectedGetFn,
|
addProtectedField( "node", TypeString, 0, &addNodeFromField, &emptyStringProtectedGetFn,
|
||||||
"Do not modify, for internal use." );
|
"Do not modify, for internal use." );
|
||||||
|
|
||||||
endGroup( "Internal" );
|
endGroup( "Internal" );
|
||||||
|
|
|
||||||
|
|
@ -1757,7 +1757,7 @@ DefineEngineMethod( GuiMeshRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
|
||||||
{
|
{
|
||||||
MeshRoad *road = object->getSelectedRoad();
|
MeshRoad *road = object->getSelectedRoad();
|
||||||
if ( !road )
|
if ( !road )
|
||||||
return NULL;
|
return 0;
|
||||||
|
|
||||||
return road->getId();
|
return road->getId();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1472,7 +1472,7 @@ DefineEngineMethod( GuiRiverEditorCtrl, getSelectedRiver, S32, (), , "" )
|
||||||
{
|
{
|
||||||
River *river = object->getSelectedRiver();
|
River *river = object->getSelectedRiver();
|
||||||
if ( !river )
|
if ( !river )
|
||||||
return NULL;
|
return 0;
|
||||||
|
|
||||||
return river->getId();
|
return river->getId();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1097,7 +1097,7 @@ DefineEngineMethod( GuiRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
|
||||||
if ( road )
|
if ( road )
|
||||||
return road->getId();
|
return road->getId();
|
||||||
|
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod( GuiRoadEditorCtrl, getSelectedNode, S32, (), , "" )
|
DefineEngineMethod( GuiRoadEditorCtrl, getSelectedNode, S32, (), , "" )
|
||||||
|
|
|
||||||
|
|
@ -954,10 +954,10 @@ void MeshRoad::initPersistFields()
|
||||||
|
|
||||||
addGroup( "Internal" );
|
addGroup( "Internal" );
|
||||||
|
|
||||||
addProtectedField( "Node", TypeString, NULL, &addNodeFromField, &emptyStringProtectedGetFn,
|
addProtectedField( "Node", TypeString, 0, &addNodeFromField, &emptyStringProtectedGetFn,
|
||||||
"Do not modify, for internal use." );
|
"Do not modify, for internal use." );
|
||||||
|
|
||||||
addProtectedField( "ProfileNode", TypeString, NULL, &addProfileNodeFromField, &emptyStringProtectedGetFn,
|
addProtectedField( "ProfileNode", TypeString, 0, &addProfileNodeFromField, &emptyStringProtectedGetFn,
|
||||||
"Do not modify, for internal use." );
|
"Do not modify, for internal use." );
|
||||||
|
|
||||||
endGroup( "Internal" );
|
endGroup( "Internal" );
|
||||||
|
|
|
||||||
|
|
@ -647,7 +647,7 @@ void River::initPersistFields()
|
||||||
|
|
||||||
addGroup( "Internal" );
|
addGroup( "Internal" );
|
||||||
|
|
||||||
addProtectedField( "Node", TypeString, NULL, &addNodeFromField, &emptyStringProtectedGetFn, "For internal use, do not modify." );
|
addProtectedField( "Node", TypeString, 0, &addNodeFromField, &emptyStringProtectedGetFn, "For internal use, do not modify." );
|
||||||
|
|
||||||
endGroup( "Internal" );
|
endGroup( "Internal" );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1199,7 +1199,7 @@ bool GBitmap::readBitmap( const String &bmType, Stream &ioStream )
|
||||||
if ( regInfo == NULL )
|
if ( regInfo == NULL )
|
||||||
{
|
{
|
||||||
Con::errorf( "[GBitmap::readBitmap] unable to find registration for extension [%s]", bmType.c_str() );
|
Con::errorf( "[GBitmap::readBitmap] unable to find registration for extension [%s]", bmType.c_str() );
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return regInfo->readFunc( ioStream, this );
|
return regInfo->readFunc( ioStream, this );
|
||||||
|
|
@ -1212,7 +1212,7 @@ bool GBitmap::writeBitmap( const String &bmType, Stream &ioStream, U32 compress
|
||||||
if ( regInfo == NULL )
|
if ( regInfo == NULL )
|
||||||
{
|
{
|
||||||
Con::errorf( "[GBitmap::writeBitmap] unable to find registration for extension [%s]", bmType.c_str() );
|
Con::errorf( "[GBitmap::writeBitmap] unable to find registration for extension [%s]", bmType.c_str() );
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return regInfo->writeFunc( this, ioStream, (compressionLevel == U32_MAX) ? regInfo->defaultCompression : compressionLevel );
|
return regInfo->writeFunc( this, ioStream, (compressionLevel == U32_MAX) ? regInfo->defaultCompression : compressionLevel );
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ static bool sReadPNG(Stream &stream, GBitmap *bitmap)
|
||||||
stream.read(cs_headerBytesChecked, header);
|
stream.read(cs_headerBytesChecked, header);
|
||||||
|
|
||||||
bool isPng = png_check_sig(header, cs_headerBytesChecked) != 0;
|
bool isPng = png_check_sig(header, cs_headerBytesChecked) != 0;
|
||||||
if (isPng == false)
|
if (!isPng)
|
||||||
{
|
{
|
||||||
AssertWarn(false, "GBitmap::readPNG: stream doesn't contain a PNG");
|
AssertWarn(false, "GBitmap::readPNG: stream doesn't contain a PNG");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ U8* GFXGLCubemap::getTextureData(U32 face, U32 mip)
|
||||||
|
|
||||||
GFXGLCubemapArray::GFXGLCubemapArray()
|
GFXGLCubemapArray::GFXGLCubemapArray()
|
||||||
{
|
{
|
||||||
mCubemap = NULL;
|
mCubemap = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GFXGLCubemapArray::~GFXGLCubemapArray()
|
GFXGLCubemapArray::~GFXGLCubemapArray()
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,8 @@ void GFXGLStateBlock::activate(const GFXGLStateBlock* oldState)
|
||||||
// the state value even if that value is identical to the current value.
|
// the state value even if that value is identical to the current value.
|
||||||
|
|
||||||
#define STATE_CHANGE(state) (!oldState || oldState->mDesc.state != mDesc.state)
|
#define STATE_CHANGE(state) (!oldState || oldState->mDesc.state != mDesc.state)
|
||||||
#define TOGGLE_STATE(state, enum) if(mDesc.state) glEnable(enum); else glDisable(enum)
|
#define TOGGLE_STATE(state, enum) if(mDesc.state) { glEnable(enum); } else { glDisable(enum); }
|
||||||
#define CHECK_TOGGLE_STATE(state, enum) if(!oldState || oldState->mDesc.state != mDesc.state) if(mDesc.state) glEnable(enum); else glDisable(enum)
|
#define CHECK_TOGGLE_STATE(state, enum) if(!oldState || oldState->mDesc.state != mDesc.state) { if(mDesc.state) { glEnable(enum); } else { glDisable(enum); }}
|
||||||
|
|
||||||
// Blending
|
// Blending
|
||||||
CHECK_TOGGLE_STATE(blendEnable, GL_BLEND);
|
CHECK_TOGGLE_STATE(blendEnable, GL_BLEND);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
GFXGLTextureArray::GFXGLTextureArray()
|
GFXGLTextureArray::GFXGLTextureArray()
|
||||||
{
|
{
|
||||||
mTextureArray = NULL;
|
mTextureArray = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXGLTextureArray::init()
|
void GFXGLTextureArray::init()
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ public:
|
||||||
|
|
||||||
~GFXGLTextureArray() { Release(); };
|
~GFXGLTextureArray() { Release(); };
|
||||||
|
|
||||||
void init();
|
void init() override;
|
||||||
|
|
||||||
void setToTexUnit(U32 tuNum) override;
|
void setToTexUnit(U32 tuNum) override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ GFXGLTextureObject::GFXGLTextureObject(GFXDevice * aDevice, GFXTextureProfile *p
|
||||||
{
|
{
|
||||||
|
|
||||||
#if TORQUE_DEBUG
|
#if TORQUE_DEBUG
|
||||||
mFrameAllocatorMarkGuard == FrameAllocator::getWaterMark();
|
mFrameAllocatorMarkGuard = FrameAllocator::getWaterMark();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dMemset(&mLockedRect, 0, sizeof(mLockedRect));
|
dMemset(&mLockedRect, 0, sizeof(mLockedRect));
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ void CubemapData::createMap()
|
||||||
if( initSuccess )
|
if( initSuccess )
|
||||||
{
|
{
|
||||||
mCubemap = GFX->createCubemap();
|
mCubemap = GFX->createCubemap();
|
||||||
if (mCubeMapFace == NULL || mCubeMapFace->isNull())
|
if (!mCubeMapFace || mCubeMapFace->isNull())
|
||||||
return;
|
return;
|
||||||
mCubemap->initStatic(mCubeMapFace);
|
mCubemap->initStatic(mCubeMapFace);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ public:
|
||||||
return setStatus(false);
|
return setStatus(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ogg_stream_init(&to, Platform::getRandom() * S32_MAX);
|
ogg_stream_init(&to, Platform::getRandom() * double(S32_MAX));
|
||||||
|
|
||||||
ogg_packet op;
|
ogg_packet op;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2438,7 +2438,7 @@ DefineEngineMethod( GuiCanvas, getMouseControl, S32, (),,
|
||||||
if (control)
|
if (control)
|
||||||
return control->getId();
|
return control->getId();
|
||||||
|
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineFunction(excludeOtherInstance, bool, (const char* appIdentifer),,
|
DefineEngineFunction(excludeOtherInstance, bool, (const char* appIdentifer),,
|
||||||
|
|
|
||||||
|
|
@ -908,12 +908,12 @@ DefineEngineMethod( GuiInspector, findByObject, S32, (SimObject* obj), ,
|
||||||
"@return id of an awake inspector that is inspecting the passed object if one exists, else NULL or 0.")
|
"@return id of an awake inspector that is inspecting the passed object if one exists, else NULL or 0.")
|
||||||
{
|
{
|
||||||
if ( !obj)
|
if ( !obj)
|
||||||
return NULL;
|
return 0;
|
||||||
|
|
||||||
SimObject *inspector = GuiInspector::findByObject(obj);
|
SimObject *inspector = GuiInspector::findByObject(obj);
|
||||||
|
|
||||||
if ( !inspector )
|
if ( !inspector )
|
||||||
return NULL;
|
return 0;
|
||||||
|
|
||||||
return inspector->getId();
|
return inspector->getId();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -160,11 +160,11 @@ void GuiShapeEdPreview::initPersistFields()
|
||||||
addGroup( "Animation" );
|
addGroup( "Animation" );
|
||||||
addField( "activeThread", TypeS32, Offset( mActiveThread, GuiShapeEdPreview ),
|
addField( "activeThread", TypeS32, Offset( mActiveThread, GuiShapeEdPreview ),
|
||||||
"Index of the active thread, or -1 if none" );
|
"Index of the active thread, or -1 if none" );
|
||||||
addProtectedField( "threadPos", TypeF32, NULL, &setFieldThreadPos, &getFieldThreadPos,
|
addProtectedField( "threadPos", TypeF32, 0, &setFieldThreadPos, &getFieldThreadPos,
|
||||||
"Current position of the active thread (0-1)" );
|
"Current position of the active thread (0-1)" );
|
||||||
addProtectedField( "threadDirection", TypeS32, NULL, &setFieldThreadDir, &getFieldThreadDir,
|
addProtectedField( "threadDirection", TypeS32, 0, &setFieldThreadDir, &getFieldThreadDir,
|
||||||
"Playback direction of the active thread" );
|
"Playback direction of the active thread" );
|
||||||
addProtectedField( "threadPingPong", TypeBool, NULL, &setFieldThreadPingPong, &getFieldThreadPingPong,
|
addProtectedField( "threadPingPong", TypeBool, 0, &setFieldThreadPingPong, &getFieldThreadPingPong,
|
||||||
"'PingPong' mode of the active thread" );
|
"'PingPong' mode of the active thread" );
|
||||||
endGroup( "Animation" );
|
endGroup( "Animation" );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ class GuiConvexEditorUndoAction : public UndoAction
|
||||||
friend class GuiConvexEditorCtrl;
|
friend class GuiConvexEditorCtrl;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
GuiConvexEditorUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mEditor(NULL), mObjId(NULL)
|
GuiConvexEditorUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mEditor(NULL), mObjId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ class GuiMissionAreaUndoAction : public UndoAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
GuiMissionAreaUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mMissionAreaEditor(NULL), mObjId(NULL)
|
GuiMissionAreaUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mMissionAreaEditor(NULL), mObjId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -773,7 +773,7 @@ ConsoleDocClass( TerrainSmoothAction,
|
||||||
);
|
);
|
||||||
|
|
||||||
TerrainSmoothAction::TerrainSmoothAction()
|
TerrainSmoothAction::TerrainSmoothAction()
|
||||||
: UndoAction("Terrain Smoothing"), mFactor(1.0), mSteps(1), mTerrainId(NULL)
|
: UndoAction("Terrain Smoothing"), mFactor(1.0), mSteps(1), mTerrainId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ protected:
|
||||||
GFXStateBlockRef mLitState[NUM_LIT_STATES][2];
|
GFXStateBlockRef mLitState[NUM_LIT_STATES][2];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LightMatInstance(Material &mat) : Parent(mat), mLightMapParamsSC(NULL), mInternalPass(false), mSpecialLight(NULL) {}
|
LightMatInstance(Material &mat) : Parent(mat), mLightMapParamsSC(NULL), mInternalPass(false), mSpecialLight(false) {}
|
||||||
|
|
||||||
virtual bool init( const FeatureSet &features, const GFXVertexFormat *vertexFormat );
|
virtual bool init( const FeatureSet &features, const GFXVertexFormat *vertexFormat );
|
||||||
virtual bool setupPass( SceneRenderState *state, const SceneData &sgData );
|
virtual bool setupPass( SceneRenderState *state, const SceneData &sgData );
|
||||||
|
|
|
||||||
|
|
@ -682,9 +682,9 @@ bool blTerrainSystem::createPersistChunkFromProxy(SceneLighting::ObjectProxy* ob
|
||||||
{
|
{
|
||||||
*ret = new blTerrainChunk();
|
*ret = new blTerrainChunk();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Given a ray, this will return the color from the lightmap of this object, return true if handled
|
// Given a ray, this will return the color from the lightmap of this object, return true if handled
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ Material::Material()
|
||||||
mPlanarReflection = false;
|
mPlanarReflection = false;
|
||||||
|
|
||||||
mCubemapData = NULL;
|
mCubemapData = NULL;
|
||||||
mDynamicCubemap = NULL;
|
mDynamicCubemap = false;
|
||||||
|
|
||||||
mLastUpdateTime = 0;
|
mLastUpdateTime = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
inline F32 MRandomGenerator::randF()
|
inline F32 MRandomGenerator::randF()
|
||||||
{
|
{
|
||||||
// default: multiply by 1/(2^31)
|
// default: multiply by 1/(2^31)
|
||||||
return F32(randI()) * (1.0f / S32_MAX);
|
return F32(randI()) * (1.0f / F64(S32_MAX));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline S32 MRandomGenerator::randI(S32 i, S32 n)
|
inline S32 MRandomGenerator::randI(S32 i, S32 n)
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ protected:
|
||||||
class GuiNavEditorUndoAction : public UndoAction
|
class GuiNavEditorUndoAction : public UndoAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GuiNavEditorUndoAction(const UTF8* actionName) : UndoAction(actionName), mNavEditor(NULL), mObjId(NULL)
|
GuiNavEditorUndoAction(const UTF8* actionName) : UndoAction(actionName), mNavEditor(NULL), mObjId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,7 @@ ImplementEnumType(_TamlFormatMode,
|
||||||
|
|
||||||
// Write.
|
// Write.
|
||||||
//return writer.write( stream, pRootNode );
|
//return writer.write( stream, pRootNode );
|
||||||
return NULL;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Invalid.
|
/// Invalid.
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ namespace PlatformNetState
|
||||||
|
|
||||||
struct addrinfo* pickAddressByProtocol(struct addrinfo* addr, int protocol)
|
struct addrinfo* pickAddressByProtocol(struct addrinfo* addr, int protocol)
|
||||||
{
|
{
|
||||||
for (addr; addr != NULL; addr = addr->ai_next)
|
for (; addr != NULL; addr = addr->ai_next)
|
||||||
{
|
{
|
||||||
if (addr->ai_family == protocol)
|
if (addr->ai_family == protocol)
|
||||||
return addr;
|
return addr;
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ typedef unsigned long U64;
|
||||||
// This could be reconfigured for static builds, though minimal impact
|
// This could be reconfigured for static builds, though minimal impact
|
||||||
//# define TORQUE_SUPPORTS_NASM
|
//# define TORQUE_SUPPORTS_NASM
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# error "GCC: Unsupported Operating System"
|
# error "GCC: Unsupported Operating System"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -169,5 +169,8 @@ typedef unsigned long U64;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // INCLUDED_TYPES_GCC_H
|
#define TORQUE_U16_ENDIANSWAP_BUILTIN __builtin_bswap16
|
||||||
|
#define TORQUE_U32_ENDIANSWAP_BUILTIN __builtin_bswap32
|
||||||
|
#define TORQUE_U64_ENDIANSWAP_BUILTIN __builtin_bswap64
|
||||||
|
|
||||||
|
#endif // INCLUDED_TYPES_GCC_H
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#ifndef INCLUDED_TYPES_VISUALC_H
|
#ifndef INCLUDED_TYPES_VISUALC_H
|
||||||
#define INCLUDED_TYPES_VISUALC_H
|
#define INCLUDED_TYPES_VISUALC_H
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
// For more information on VisualC++ predefined macros
|
// For more information on VisualC++ predefined macros
|
||||||
// http://support.microsoft.com/default.aspx?scid=kb;EN-US;q65472
|
// http://support.microsoft.com/default.aspx?scid=kb;EN-US;q65472
|
||||||
|
|
@ -69,7 +70,7 @@ typedef unsigned _int64 U64;
|
||||||
# define TORQUE_OS_WIN
|
# define TORQUE_OS_WIN
|
||||||
# define TORQUE_OS_WIN64
|
# define TORQUE_OS_WIN64
|
||||||
# include "platform/types.win.h"
|
# include "platform/types.win.h"
|
||||||
#else
|
#else
|
||||||
# error "VC: Unsupported Operating System"
|
# error "VC: Unsupported Operating System"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -115,5 +116,8 @@ typedef unsigned _int64 U64;
|
||||||
#define TORQUE_UNLIKELY
|
#define TORQUE_UNLIKELY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // INCLUDED_TYPES_VISUALC_H
|
#define TORQUE_U16_ENDIANSWAP_BUILTIN _byteswap_ushort
|
||||||
|
#define TORQUE_U32_ENDIANSWAP_BUILTIN _byteswap_ulong
|
||||||
|
#define TORQUE_U64_ENDIANSWAP_BUILTIN _byteswap_uint64
|
||||||
|
|
||||||
|
#endif // INCLUDED_TYPES_VISUALC_H
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ U16 Input::getKeyCode( U16 asciiCode )
|
||||||
|
|
||||||
char c[2];
|
char c[2];
|
||||||
c[0]= asciiCode;
|
c[0]= asciiCode;
|
||||||
c[1] = NULL;
|
c[1] = 0;
|
||||||
return KeyMapSDL::getTorqueScanCodeFromSDL( SDL_GetScancodeFromKey( SDL_GetKeyFromName(c) ) );
|
return KeyMapSDL::getTorqueScanCodeFromSDL( SDL_GetScancodeFromKey( SDL_GetKeyFromName(c) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -594,20 +594,20 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
return currentStatus;
|
return currentStatus;
|
||||||
|
|
||||||
U32 finalPos = 0;
|
U32 finalPos = 0;
|
||||||
switch (absolutePos)
|
|
||||||
|
if (absolutePos)
|
||||||
{
|
{
|
||||||
case true: // absolute position
|
|
||||||
AssertFatal(0 <= position, "File::setPosition: negative absolute position");
|
AssertFatal(0 <= position, "File::setPosition: negative absolute position");
|
||||||
|
|
||||||
// position beyond EOS is OK
|
// position beyond EOS is OK
|
||||||
finalPos = lseek(*((int *)handle), position, SEEK_SET);
|
finalPos = lseek(*((int *)handle), position, SEEK_SET);
|
||||||
break;
|
}
|
||||||
case false: // relative position
|
else
|
||||||
|
{
|
||||||
AssertFatal((getPosition() >= (U32)abs(position) && 0 > position) || 0 <= position, "File::setPosition: negative relative position");
|
AssertFatal((getPosition() >= (U32)abs(position) && 0 > position) || 0 <= position, "File::setPosition: negative relative position");
|
||||||
|
|
||||||
// position beyond EOS is OK
|
// position beyond EOS is OK
|
||||||
finalPos = lseek(*((int *)handle), position, SEEK_CUR);
|
finalPos = lseek(*((int *)handle), position, SEEK_CUR);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0xffffffff == finalPos)
|
if (0xffffffff == finalPos)
|
||||||
|
|
@ -1110,7 +1110,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
if (dip == NULL)
|
if (dip == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
while (d = readdir(dip))
|
while ((d = readdir(dip)))
|
||||||
{
|
{
|
||||||
bool isDir = false;
|
bool isDir = false;
|
||||||
if (d->d_type == DT_UNKNOWN)
|
if (d->d_type == DT_UNKNOWN)
|
||||||
|
|
@ -1229,14 +1229,14 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
// Iterate through and grab valid directories
|
// Iterate through and grab valid directories
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
while (d = readdir(dip))
|
while ((d = readdir(dip)))
|
||||||
{
|
{
|
||||||
bool isDir;
|
bool isDir;
|
||||||
isDir = false;
|
isDir = false;
|
||||||
if (d->d_type == DT_UNKNOWN)
|
if (d->d_type == DT_UNKNOWN)
|
||||||
{
|
{
|
||||||
char child [1024];
|
char child [1024];
|
||||||
if ((Path[dStrlen(Path) - 1] == '/'))
|
if (Path[dStrlen(Path) - 1] == '/')
|
||||||
dSprintf(child, 1024, "%s%s", Path, d->d_name);
|
dSprintf(child, 1024, "%s%s", Path, d->d_name);
|
||||||
else
|
else
|
||||||
dSprintf(child, 1024, "%s/%s", Path, d->d_name);
|
dSprintf(child, 1024, "%s/%s", Path, d->d_name);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@
|
||||||
#include "platformX86UNIX/x86UNIXState.h"
|
#include "platformX86UNIX/x86UNIXState.h"
|
||||||
#include "platformX86UNIX/x86UNIXStdConsole.h"
|
#include "platformX86UNIX/x86UNIXStdConsole.h"
|
||||||
#include "platform/platformInput.h"
|
#include "platform/platformInput.h"
|
||||||
|
#include "windowManager/platformWindow.h"
|
||||||
|
#include "windowManager/platformWindowMgr.h"
|
||||||
#include "console/console.h"
|
#include "console/console.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
@ -165,6 +167,15 @@ void Platform::debugBreak()
|
||||||
Con::errorf(ConsoleLogEntry::General,
|
Con::errorf(ConsoleLogEntry::General,
|
||||||
"Platform::debugBreak: triggering SIGSEGV for core dump");
|
"Platform::debugBreak: triggering SIGSEGV for core dump");
|
||||||
//kill(getpid(), SIGSEGV);
|
//kill(getpid(), SIGSEGV);
|
||||||
|
|
||||||
|
// On Linux, the mouse cursor will remain trapped when the SIGTRAP below triggers so we ensure the mouse
|
||||||
|
// locked state is disabled prior to dropping to debug
|
||||||
|
PlatformWindow* firstWindow = WindowManager->getFirstWindow();
|
||||||
|
if (firstWindow)
|
||||||
|
{
|
||||||
|
firstWindow->setMouseLocked(false);
|
||||||
|
}
|
||||||
|
|
||||||
kill(getpid(), SIGTRAP);
|
kill(getpid(), SIGTRAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ void RenderImposterMgr::_innerRender( const SceneRenderState *state, RenderDefer
|
||||||
// Setup a static index buffer for rendering.
|
// Setup a static index buffer for rendering.
|
||||||
mIB.set( GFX, smImposterBatchSize * 6, 0, GFXBufferTypeStatic );
|
mIB.set( GFX, smImposterBatchSize * 6, 0, GFXBufferTypeStatic );
|
||||||
U16 *idxBuff;
|
U16 *idxBuff;
|
||||||
mIB.lock(&idxBuff, NULL, NULL, NULL);
|
mIB.lock(&idxBuff, NULL, 0, 0);
|
||||||
for ( U32 i=0; i < smImposterBatchSize; i++ )
|
for ( U32 i=0; i < smImposterBatchSize; i++ )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ static const char *_get_enable(void* obj, const char* data)
|
||||||
|
|
||||||
void RenderPassStateToken::initPersistFields()
|
void RenderPassStateToken::initPersistFields()
|
||||||
{
|
{
|
||||||
addProtectedField("enabled", TypeBool, NULL, &_set_enable, &_get_enable, "Enables or disables this token.");
|
addProtectedField("enabled", TypeBool, 0, &_set_enable, &_get_enable, "Enables or disables this token.");
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,15 +44,15 @@ void ScenePolyhedralObject< Base, P >::initPersistFields()
|
||||||
{
|
{
|
||||||
Parent::addGroup( "Internal" );
|
Parent::addGroup( "Internal" );
|
||||||
|
|
||||||
Parent::addProtectedField( "plane", TypeRealString, NULL,
|
Parent::addProtectedField( "plane", TypeRealString, 0,
|
||||||
&_setPlane, &defaultProtectedGetFn,
|
&_setPlane, &defaultProtectedGetFn,
|
||||||
"For internal use only.",
|
"For internal use only.",
|
||||||
AbstractClassRep::FIELD_HideInInspectors );
|
AbstractClassRep::FIELD_HideInInspectors );
|
||||||
Parent::addProtectedField( "point", TypeRealString, NULL,
|
Parent::addProtectedField( "point", TypeRealString, 0,
|
||||||
&_setPoint, &defaultProtectedGetFn,
|
&_setPoint, &defaultProtectedGetFn,
|
||||||
"For internal use only.",
|
"For internal use only.",
|
||||||
AbstractClassRep::FIELD_HideInInspectors );
|
AbstractClassRep::FIELD_HideInInspectors );
|
||||||
Parent::addProtectedField( "edge", TypeRealString, NULL,
|
Parent::addProtectedField( "edge", TypeRealString, 0,
|
||||||
&_setEdge, &defaultProtectedGetFn,
|
&_setEdge, &defaultProtectedGetFn,
|
||||||
"For internal use only.",
|
"For internal use only.",
|
||||||
AbstractClassRep::FIELD_HideInInspectors );
|
AbstractClassRep::FIELD_HideInInspectors );
|
||||||
|
|
|
||||||
|
|
@ -1962,7 +1962,7 @@ void ContextAction::processTick()
|
||||||
if (mActive)
|
if (mActive)
|
||||||
{
|
{
|
||||||
F32 currTime = Sim::getCurrentTime();
|
F32 currTime = Sim::getCurrentTime();
|
||||||
static const char *argv[2];
|
static const char *argv[3];
|
||||||
|
|
||||||
//see if this key even is still active
|
//see if this key even is still active
|
||||||
if (!mBreakEvent)
|
if (!mBreakEvent)
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ class ActionMap : public SimObject
|
||||||
U32 deviceInst;
|
U32 deviceInst;
|
||||||
|
|
||||||
Vector<Node> nodeMap;
|
Vector<Node> nodeMap;
|
||||||
DeviceMap():deviceType(NULL), deviceInst(NULL){
|
DeviceMap():deviceType(0), deviceInst(0){
|
||||||
VECTOR_SET_ASSOCIATION(nodeMap);
|
VECTOR_SET_ASSOCIATION(nodeMap);
|
||||||
}
|
}
|
||||||
~DeviceMap();
|
~DeviceMap();
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ DefineEngineMethod( NetObject, getClientObject, S32, (),,
|
||||||
if ( obj )
|
if ( obj )
|
||||||
return obj->getId();
|
return obj->getId();
|
||||||
|
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ConsoleMethod( NetObject, getClientObject, S32, 2, 2, "Short-Circuit-Netorking: this is only valid for a local-client / singleplayer situation." )
|
//ConsoleMethod( NetObject, getClientObject, S32, 2, 2, "Short-Circuit-Netorking: this is only valid for a local-client / singleplayer situation." )
|
||||||
|
|
@ -439,7 +439,7 @@ DefineEngineMethod( NetObject, getServerObject, S32, (),,
|
||||||
if ( obj )
|
if ( obj )
|
||||||
return obj->getId();
|
return obj->getId();
|
||||||
|
|
||||||
return NULL;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//ConsoleMethod( NetObject, getServerObject, S32, 2, 2, "Short-Circuit-Netorking: this is only valid for a local-client / singleplayer situation." )
|
//ConsoleMethod( NetObject, getServerObject, S32, 2, 2, "Short-Circuit-Netorking: this is only valid for a local-client / singleplayer situation." )
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ TSShape::TSShape()
|
||||||
mRadius = 0;
|
mRadius = 0;
|
||||||
mFlags = 0;
|
mFlags = 0;
|
||||||
tubeRadius = 0;
|
tubeRadius = 0;
|
||||||
data = NULL;
|
data = 0;
|
||||||
materialList = NULL;
|
materialList = NULL;
|
||||||
mReadVersion = -1; // -1 means constructed from scratch (e.g., in exporter or no read yet)
|
mReadVersion = -1; // -1 means constructed from scratch (e.g., in exporter or no read yet)
|
||||||
mSequencesConstructed = false;
|
mSequencesConstructed = false;
|
||||||
|
|
@ -225,11 +225,7 @@ const String& TSShape::getTargetName( S32 mapToNameIndex ) const
|
||||||
|
|
||||||
S32 TSShape::getTargetCount() const
|
S32 TSShape::getTargetCount() const
|
||||||
{
|
{
|
||||||
if(!this)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return materialList->getMaterialNameList().size();
|
return materialList->getMaterialNameList().size();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 TSShape::findNode(S32 nameIndex) const
|
S32 TSShape::findNode(S32 nameIndex) const
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,7 @@ void TSShapeConstructor::initPersistFields()
|
||||||
endGroup("Collada");
|
endGroup("Collada");
|
||||||
|
|
||||||
addGroup("Sequences");
|
addGroup("Sequences");
|
||||||
addProtectedField("sequence", TypeStringFilename, NULL, &addSequenceFromField, &emptyStringProtectedGetFn,
|
addProtectedField("sequence", TypeStringFilename, 0, &addSequenceFromField, &emptyStringProtectedGetFn,
|
||||||
"Legacy method of adding sequences to a DTS or DAE shape after loading.\n\n"
|
"Legacy method of adding sequences to a DTS or DAE shape after loading.\n\n"
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"singleton TSShapeConstructor(MyShapeDae)\n"
|
"singleton TSShapeConstructor(MyShapeDae)\n"
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,7 @@ if (!isObject(ExecFilesList))
|
||||||
new ArrayObject(ExecFilesList);
|
new ArrayObject(ExecFilesList);
|
||||||
|
|
||||||
function callOnModules(%functionName, %moduleGroup, %var0, %var1, %var2, %var3, %var4, %var5, %var6)
|
function callOnModules(%functionName, %moduleGroup, %var0, %var1, %var2, %var3, %var4, %var5, %var6)
|
||||||
{
|
{
|
||||||
%maxvars = 7; // match this to i/o signature
|
|
||||||
//clear per module group file execution chain
|
//clear per module group file execution chain
|
||||||
ExecFilesList.empty();
|
ExecFilesList.empty();
|
||||||
//Get our modules so we can exec any specific client-side loading/handling
|
//Get our modules so we can exec any specific client-side loading/handling
|
||||||
|
|
@ -19,22 +18,9 @@ function callOnModules(%functionName, %moduleGroup, %var0, %var1, %var2, %var3,
|
||||||
if(%module.group !$= %moduleGroup)
|
if(%module.group !$= %moduleGroup)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// match this to i/o signature
|
||||||
if(isObject(%module.scopeSet) && %module.scopeSet.isMethod(%functionName))
|
if(isObject(%module.scopeSet) && %module.scopeSet.isMethod(%functionName))
|
||||||
{
|
%module.scopeSet.call(%functionName, %var0, %var1, %var2, %var3, %var4, %var5, %var6);
|
||||||
%stryng = %module.scopeSet @ "." @ %functionName @ "(";
|
|
||||||
for (%a=0;%a<%maxvars;%a++)
|
|
||||||
{
|
|
||||||
if (%var[%a] !$= "")
|
|
||||||
{
|
|
||||||
%stryng = %stryng @ %var[%a];
|
|
||||||
if (%a<%maxvars-1 && %var[%a+1] !$= "")
|
|
||||||
%stryng = %stryng @ ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%stryng = %stryng @ ");";
|
|
||||||
eval(%stryng);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%execFilecount = ExecFilesList.count();
|
%execFilecount = ExecFilesList.count();
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ new Scene(EditorTemplateLevel) {
|
||||||
squareSize = "128";
|
squareSize = "128";
|
||||||
scaleU = "25";
|
scaleU = "25";
|
||||||
scaleV = "25";
|
scaleV = "25";
|
||||||
MaterialFile = "FloorGray";
|
MaterialAsset = "Prototyping:FloorGray";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
canSaveDynamicFields = "1";
|
canSaveDynamicFields = "1";
|
||||||
Enabled = "1";
|
Enabled = "1";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue