merged numerous changes from upstream
|
|
@ -200,7 +200,7 @@ void LightningStrikeEvent::unpack(NetConnection* con, BitStream* stream)
|
||||||
{
|
{
|
||||||
if(!stream->readFlag())
|
if(!stream->readFlag())
|
||||||
return;
|
return;
|
||||||
S32 mClientId = stream->readRangedU32(0, NetConnection::MaxGhostCount);
|
mClientId = stream->readRangedU32(0, NetConnection::MaxGhostCount);
|
||||||
mLightning = NULL;
|
mLightning = NULL;
|
||||||
NetObject* pObject = con->resolveGhost(mClientId);
|
NetObject* pObject = con->resolveGhost(mClientId);
|
||||||
if (pObject)
|
if (pObject)
|
||||||
|
|
@ -214,10 +214,10 @@ void LightningStrikeEvent::unpack(NetConnection* con, BitStream* stream)
|
||||||
// target id
|
// target id
|
||||||
S32 mTargetID = stream->readRangedU32(0, NetConnection::MaxGhostCount);
|
S32 mTargetID = stream->readRangedU32(0, NetConnection::MaxGhostCount);
|
||||||
|
|
||||||
NetObject* pObject = con->resolveGhost(mTargetID);
|
NetObject* tObject = con->resolveGhost(mTargetID);
|
||||||
if( pObject != NULL )
|
if(tObject != NULL )
|
||||||
{
|
{
|
||||||
mTarget = dynamic_cast<SceneObject*>(pObject);
|
mTarget = dynamic_cast<SceneObject*>(tObject);
|
||||||
}
|
}
|
||||||
if( bool(mTarget) == false )
|
if( bool(mTarget) == false )
|
||||||
{
|
{
|
||||||
|
|
@ -243,6 +243,7 @@ LightningData::LightningData()
|
||||||
dMemset( strikeTextureNames, 0, sizeof( strikeTextureNames ) );
|
dMemset( strikeTextureNames, 0, sizeof( strikeTextureNames ) );
|
||||||
dMemset( strikeTextures, 0, sizeof( strikeTextures ) );
|
dMemset( strikeTextures, 0, sizeof( strikeTextures ) );
|
||||||
dMemset( thunderSounds, 0, sizeof( thunderSounds ) );
|
dMemset( thunderSounds, 0, sizeof( thunderSounds ) );
|
||||||
|
mNumStrikeTextures = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LightningData::~LightningData()
|
LightningData::~LightningData()
|
||||||
|
|
@ -297,10 +298,14 @@ bool LightningData::preload(bool server, String &errorStr)
|
||||||
if( !sfxResolve( &strikeSound, sfxErrorStr ) )
|
if( !sfxResolve( &strikeSound, sfxErrorStr ) )
|
||||||
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
Con::errorf(ConsoleLogEntry::General, "LightningData::preload: Invalid packet: %s", sfxErrorStr.c_str());
|
||||||
|
|
||||||
|
mNumStrikeTextures = 0;
|
||||||
for (U32 i = 0; i < MaxTextures; i++)
|
for (U32 i = 0; i < MaxTextures; i++)
|
||||||
{
|
{
|
||||||
if (strikeTextureNames[i][0])
|
if (strikeTextureNames[i][0])
|
||||||
|
{
|
||||||
strikeTextures[i] = GFXTexHandle(strikeTextureNames[i], &GFXDefaultStaticDiffuseProfile, avar("%s() - strikeTextures[%d] (line %d)", __FUNCTION__, i, __LINE__));
|
strikeTextures[i] = GFXTexHandle(strikeTextureNames[i], &GFXDefaultStaticDiffuseProfile, avar("%s() - strikeTextures[%d] (line %d)", __FUNCTION__, i, __LINE__));
|
||||||
|
mNumStrikeTextures++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -317,7 +322,11 @@ void LightningData::packData(BitStream* stream)
|
||||||
U32 i;
|
U32 i;
|
||||||
for (i = 0; i < MaxThunders; i++)
|
for (i = 0; i < MaxThunders; i++)
|
||||||
sfxWrite( stream, thunderSounds[ i ] );
|
sfxWrite( stream, thunderSounds[ i ] );
|
||||||
for (i = 0; i < MaxTextures; i++) {
|
|
||||||
|
stream->writeInt(mNumStrikeTextures, 4);
|
||||||
|
|
||||||
|
for (i = 0; i < MaxTextures; i++)
|
||||||
|
{
|
||||||
stream->writeString(strikeTextureNames[i]);
|
stream->writeString(strikeTextureNames[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -331,7 +340,11 @@ void LightningData::unpackData(BitStream* stream)
|
||||||
U32 i;
|
U32 i;
|
||||||
for (i = 0; i < MaxThunders; i++)
|
for (i = 0; i < MaxThunders; i++)
|
||||||
sfxRead( stream, &thunderSounds[ i ] );
|
sfxRead( stream, &thunderSounds[ i ] );
|
||||||
for (i = 0; i < MaxTextures; i++) {
|
|
||||||
|
mNumStrikeTextures = stream->readInt(4);
|
||||||
|
|
||||||
|
for (i = 0; i < MaxTextures; i++)
|
||||||
|
{
|
||||||
strikeTextureNames[i] = stream->readSTString();
|
strikeTextureNames[i] = stream->readSTString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -368,16 +381,16 @@ Lightning::~Lightning()
|
||||||
{
|
{
|
||||||
while( mThunderListHead )
|
while( mThunderListHead )
|
||||||
{
|
{
|
||||||
Thunder* next = mThunderListHead->next;
|
Thunder* nextThunder = mThunderListHead->next;
|
||||||
delete mThunderListHead;
|
delete mThunderListHead;
|
||||||
mThunderListHead = next;
|
mThunderListHead = nextThunder;
|
||||||
}
|
}
|
||||||
|
|
||||||
while( mStrikeListHead )
|
while( mStrikeListHead )
|
||||||
{
|
{
|
||||||
Strike* next = mStrikeListHead->next;
|
Strike* nextStrike = mStrikeListHead->next;
|
||||||
delete mStrikeListHead;
|
delete mStrikeListHead;
|
||||||
mStrikeListHead = next;
|
mStrikeListHead = nextStrike;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -478,11 +491,16 @@ void Lightning::renderObject(ObjectRenderInst *ri, SceneRenderState *state, Base
|
||||||
desc.setBlend( true, GFXBlendSrcAlpha, GFXBlendOne);
|
desc.setBlend( true, GFXBlendSrcAlpha, GFXBlendOne);
|
||||||
desc.setCullMode(GFXCullNone);
|
desc.setCullMode(GFXCullNone);
|
||||||
desc.zWriteEnable = false;
|
desc.zWriteEnable = false;
|
||||||
|
desc.vertexColorEnable = true;
|
||||||
|
|
||||||
|
if (mDataBlock->mNumStrikeTextures != 0)
|
||||||
|
{
|
||||||
desc.samplersDefined = true;
|
desc.samplersDefined = true;
|
||||||
desc.samplers[0].magFilter = GFXTextureFilterLinear;
|
desc.samplers[0].magFilter = GFXTextureFilterLinear;
|
||||||
desc.samplers[0].minFilter = GFXTextureFilterLinear;
|
desc.samplers[0].minFilter = GFXTextureFilterLinear;
|
||||||
desc.samplers[0].addressModeU = GFXAddressWrap;
|
desc.samplers[0].addressModeU = GFXAddressWrap;
|
||||||
desc.samplers[0].addressModeV = GFXAddressWrap;
|
desc.samplers[0].addressModeV = GFXAddressWrap;
|
||||||
|
}
|
||||||
|
|
||||||
mLightningSB = GFX->createStateBlock(desc);
|
mLightningSB = GFX->createStateBlock(desc);
|
||||||
|
|
||||||
|
|
@ -493,10 +511,17 @@ void Lightning::renderObject(ObjectRenderInst *ri, SceneRenderState *state, Base
|
||||||
|
|
||||||
Strike* walk = mStrikeListHead;
|
Strike* walk = mStrikeListHead;
|
||||||
while (walk != NULL)
|
while (walk != NULL)
|
||||||
|
{
|
||||||
|
if (mDataBlock->mNumStrikeTextures > 1)
|
||||||
|
{
|
||||||
|
GFX->setTexture(0, mDataBlock->strikeTextures[sgLightningRand.randI(0, mDataBlock->mNumStrikeTextures - 1)]);
|
||||||
|
}
|
||||||
|
else if (mDataBlock->mNumStrikeTextures > 0)
|
||||||
{
|
{
|
||||||
GFX->setTexture(0, mDataBlock->strikeTextures[0]);
|
GFX->setTexture(0, mDataBlock->strikeTextures[0]);
|
||||||
|
}
|
||||||
|
|
||||||
for( U32 i=0; i<3; i++ )
|
for( U32 i=0; i<MAX_LIGHTNING; i++ )
|
||||||
{
|
{
|
||||||
if( walk->bolt[i].isFading )
|
if( walk->bolt[i].isFading )
|
||||||
{
|
{
|
||||||
|
|
@ -589,7 +614,7 @@ void Lightning::advanceTime(F32 dt)
|
||||||
while (*pWalker != NULL) {
|
while (*pWalker != NULL) {
|
||||||
Strike* pStrike = *pWalker;
|
Strike* pStrike = *pWalker;
|
||||||
|
|
||||||
for( U32 i=0; i<3; i++ )
|
for( U32 i=0; i<MAX_LIGHTNING; i++ )
|
||||||
{
|
{
|
||||||
pStrike->bolt[i].update( dt );
|
pStrike->bolt[i].update( dt );
|
||||||
}
|
}
|
||||||
|
|
@ -673,7 +698,7 @@ void Lightning::processEvent(LightningStrikeEvent* pEvent)
|
||||||
pStrike->currentAge = 0.0f;
|
pStrike->currentAge = 0.0f;
|
||||||
pStrike->next = mStrikeListHead;
|
pStrike->next = mStrikeListHead;
|
||||||
|
|
||||||
for( U32 i=0; i<3; i++ )
|
for( U32 i=0; i<MAX_LIGHTNING; i++ )
|
||||||
{
|
{
|
||||||
F32 randStart = boltStartRadius;
|
F32 randStart = boltStartRadius;
|
||||||
F32 height = mObjScale.z * 0.5f + getPosition().z;
|
F32 height = mObjScale.z * 0.5f + getPosition().z;
|
||||||
|
|
@ -709,6 +734,7 @@ void Lightning::warningFlashes()
|
||||||
{
|
{
|
||||||
AssertFatal(isServerObject(), "Error, client objects may not initiate lightning!");
|
AssertFatal(isServerObject(), "Error, client objects may not initiate lightning!");
|
||||||
|
|
||||||
|
Point3F strikePoint( gRandGen.randF( 0.0f, 1.0f ), gRandGen.randF( 0.0f, 1.0f ), 0.0f );
|
||||||
|
|
||||||
SimGroup* pClientGroup = Sim::getClientGroup();
|
SimGroup* pClientGroup = Sim::getClientGroup();
|
||||||
for (SimGroup::iterator itr = pClientGroup->begin(); itr != pClientGroup->end(); itr++) {
|
for (SimGroup::iterator itr = pClientGroup->begin(); itr != pClientGroup->end(); itr++) {
|
||||||
|
|
@ -718,6 +744,9 @@ void Lightning::warningFlashes()
|
||||||
LightningStrikeEvent* pEvent = new LightningStrikeEvent;
|
LightningStrikeEvent* pEvent = new LightningStrikeEvent;
|
||||||
pEvent->mLightning = this;
|
pEvent->mLightning = this;
|
||||||
|
|
||||||
|
pEvent->mStart.x = strikePoint.x;
|
||||||
|
pEvent->mStart.y = strikePoint.y;
|
||||||
|
|
||||||
nc->postNetEvent(pEvent);
|
nc->postNetEvent(pEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -731,18 +760,19 @@ void Lightning::strikeRandomPoint()
|
||||||
Point3F strikePoint( gRandGen.randF( 0.0f, 1.0f ), gRandGen.randF( 0.0f, 1.0f ), 0.0f );
|
Point3F strikePoint( gRandGen.randF( 0.0f, 1.0f ), gRandGen.randF( 0.0f, 1.0f ), 0.0f );
|
||||||
|
|
||||||
// check if an object is within target range
|
// check if an object is within target range
|
||||||
|
Point3F worldPosStrikePoint = strikePoint;
|
||||||
|
|
||||||
strikePoint *= mObjScale;
|
worldPosStrikePoint *= mObjScale;
|
||||||
strikePoint += getPosition();
|
worldPosStrikePoint += getPosition();
|
||||||
strikePoint += Point3F( -mObjScale.x * 0.5f, -mObjScale.y * 0.5f, 0.0f );
|
worldPosStrikePoint += Point3F( -mObjScale.x * 0.5f, -mObjScale.y * 0.5f, 0.0f );
|
||||||
|
|
||||||
Box3F queryBox;
|
Box3F queryBox;
|
||||||
F32 boxWidth = strikeRadius * 2.0f;
|
F32 boxWidth = strikeRadius * 2.0f;
|
||||||
|
|
||||||
queryBox.minExtents.set( -boxWidth * 0.5f, -boxWidth * 0.5f, -mObjScale.z * 0.5f );
|
queryBox.minExtents.set( -boxWidth * 0.5f, -boxWidth * 0.5f, -mObjScale.z * 0.5f );
|
||||||
queryBox.maxExtents.set( boxWidth * 0.5f, boxWidth * 0.5f, mObjScale.z * 0.5f );
|
queryBox.maxExtents.set( boxWidth * 0.5f, boxWidth * 0.5f, mObjScale.z * 0.5f );
|
||||||
queryBox.minExtents += strikePoint;
|
queryBox.minExtents += worldPosStrikePoint;
|
||||||
queryBox.maxExtents += strikePoint;
|
queryBox.maxExtents += worldPosStrikePoint;
|
||||||
|
|
||||||
SimpleQueryList sql;
|
SimpleQueryList sql;
|
||||||
getContainer()->findObjects(queryBox, DAMAGEABLE_TYPEMASK,
|
getContainer()->findObjects(queryBox, DAMAGEABLE_TYPEMASK,
|
||||||
|
|
@ -837,13 +867,53 @@ void Lightning::strikeRandomPoint()
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
void Lightning::strikeObject(ShapeBase*)
|
void Lightning::strikeObject(ShapeBase* targetObj)
|
||||||
{
|
{
|
||||||
AssertFatal(isServerObject(), "Error, client objects may not initiate lightning!");
|
AssertFatal(isServerObject(), "Error, client objects may not initiate lightning!");
|
||||||
|
|
||||||
AssertFatal(false, "Lightning::strikeObject is not implemented.");
|
Point3F strikePoint = targetObj->getPosition();
|
||||||
|
Point3F objectCenter;
|
||||||
|
|
||||||
|
Box3F wb = getWorldBox();
|
||||||
|
if (!wb.isContained(strikePoint))
|
||||||
|
return;
|
||||||
|
|
||||||
|
Point3F targetRel = strikePoint - getPosition();
|
||||||
|
Point3F length(wb.len_x() / 2.0f, wb.len_y() / 2.0f, wb.len_z() / 2.0f);
|
||||||
|
|
||||||
|
Point3F strikePos = targetRel / length;
|
||||||
|
|
||||||
|
bool playerInWarmup = false;
|
||||||
|
Player *playerObj = dynamic_cast< Player * >(targetObj);
|
||||||
|
if (playerObj)
|
||||||
|
{
|
||||||
|
if (!playerObj->getControllingClient())
|
||||||
|
{
|
||||||
|
playerInWarmup = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!playerInWarmup)
|
||||||
|
{
|
||||||
|
applyDamage_callback(targetObj->getWorldSphere().center, VectorF(0.0, 0.0, 1.0), targetObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
SimGroup* pClientGroup = Sim::getClientGroup();
|
||||||
|
for (SimGroup::iterator itr = pClientGroup->begin(); itr != pClientGroup->end(); itr++) {
|
||||||
|
NetConnection* nc = static_cast<NetConnection*>(*itr);
|
||||||
|
if (nc != NULL)
|
||||||
|
{
|
||||||
|
LightningStrikeEvent* pEvent = new LightningStrikeEvent;
|
||||||
|
pEvent->mLightning = this;
|
||||||
|
|
||||||
|
pEvent->mStart.x = strikePoint.x;
|
||||||
|
pEvent->mStart.y = strikePoint.y;
|
||||||
|
pEvent->mTarget = targetObj;
|
||||||
|
|
||||||
|
nc->postNetEvent(pEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
U32 Lightning::packUpdate(NetConnection* con, U32 mask, BitStream* stream)
|
U32 Lightning::packUpdate(NetConnection* con, U32 mask, BitStream* stream)
|
||||||
|
|
@ -864,6 +934,7 @@ U32 Lightning::packUpdate(NetConnection* con, U32 mask, BitStream* stream)
|
||||||
stream->write(color.red);
|
stream->write(color.red);
|
||||||
stream->write(color.green);
|
stream->write(color.green);
|
||||||
stream->write(color.blue);
|
stream->write(color.blue);
|
||||||
|
stream->write(color.alpha);
|
||||||
stream->write(fadeColor.red);
|
stream->write(fadeColor.red);
|
||||||
stream->write(fadeColor.green);
|
stream->write(fadeColor.green);
|
||||||
stream->write(fadeColor.blue);
|
stream->write(fadeColor.blue);
|
||||||
|
|
@ -895,6 +966,7 @@ void Lightning::unpackUpdate(NetConnection* con, BitStream* stream)
|
||||||
stream->read(&color.red);
|
stream->read(&color.red);
|
||||||
stream->read(&color.green);
|
stream->read(&color.green);
|
||||||
stream->read(&color.blue);
|
stream->read(&color.blue);
|
||||||
|
stream->read(&color.alpha);
|
||||||
stream->read(&fadeColor.red);
|
stream->read(&fadeColor.red);
|
||||||
stream->read(&fadeColor.green);
|
stream->read(&fadeColor.green);
|
||||||
stream->read(&fadeColor.blue);
|
stream->read(&fadeColor.blue);
|
||||||
|
|
@ -930,7 +1002,7 @@ DefineEngineMethod(Lightning, strikeRandomPoint, void, (),,
|
||||||
object->strikeRandomPoint();
|
object->strikeRandomPoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod(Lightning, strikeObject, void, (ShapeBase* pSB),,
|
DefineEngineMethod(Lightning, strikeObject, void, (ShapeBase* pSB), (nullAsType<ShapeBase*>()),
|
||||||
"Creates a LightningStrikeEvent which strikes a specific object.\n"
|
"Creates a LightningStrikeEvent which strikes a specific object.\n"
|
||||||
"@note This method is currently unimplemented.\n" )
|
"@note This method is currently unimplemented.\n" )
|
||||||
{
|
{
|
||||||
|
|
@ -1154,7 +1226,7 @@ void LightningBolt::generateMinorNodes()
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Recursive algo to create bolts that split off from main bolt
|
// Recursive algo to create bolts that split off from main bolt
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void LightningBolt::createSplit( const Point3F &startPoint, const Point3F &endPoint, U32 depth, F32 width )
|
void LightningBolt::createSplit( const Point3F &startingPoint, const Point3F &endingPoint, U32 depth, F32 splitWidth )
|
||||||
{
|
{
|
||||||
if( depth == 0 )
|
if( depth == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
@ -1163,17 +1235,17 @@ void LightningBolt::createSplit( const Point3F &startPoint, const Point3F &endPo
|
||||||
if( chanceToEnd > 0.70f )
|
if( chanceToEnd > 0.70f )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( width < 0.75f )
|
if(splitWidth < 0.75f )
|
||||||
width = 0.75f;
|
splitWidth = 0.75f;
|
||||||
|
|
||||||
VectorF diff = endPoint - startPoint;
|
VectorF diff = endingPoint - startingPoint;
|
||||||
F32 length = diff.len();
|
F32 length = diff.len();
|
||||||
diff.normalizeSafe();
|
diff.normalizeSafe();
|
||||||
|
|
||||||
LightningBolt newBolt;
|
LightningBolt newBolt;
|
||||||
newBolt.startPoint = startPoint;
|
newBolt.startPoint = startingPoint;
|
||||||
newBolt.endPoint = endPoint;
|
newBolt.endPoint = endingPoint;
|
||||||
newBolt.width = width;
|
newBolt.width = splitWidth;
|
||||||
newBolt.numMajorNodes = 3;
|
newBolt.numMajorNodes = 3;
|
||||||
newBolt.maxMajorAngle = 30.0f;
|
newBolt.maxMajorAngle = 30.0f;
|
||||||
newBolt.numMinorNodes = 3;
|
newBolt.numMinorNodes = 3;
|
||||||
|
|
@ -1184,13 +1256,13 @@ void LightningBolt::createSplit( const Point3F &startPoint, const Point3F &endPo
|
||||||
splitList.pushBack( newBolt );
|
splitList.pushBack( newBolt );
|
||||||
|
|
||||||
VectorF newDir1 = MathUtils::randomDir( diff, 10.0f, 45.0f );
|
VectorF newDir1 = MathUtils::randomDir( diff, 10.0f, 45.0f );
|
||||||
Point3F newEndPoint1 = endPoint + newDir1 * gRandGen.randF( 0.5f, 1.5f ) * length;
|
Point3F newEndPoint1 = endingPoint + newDir1 * gRandGen.randF( 0.5f, 1.5f ) * length;
|
||||||
|
|
||||||
VectorF newDir2 = MathUtils::randomDir( diff, 10.0f, 45.0f );
|
VectorF newDir2 = MathUtils::randomDir( diff, 10.0f, 45.0f );
|
||||||
Point3F newEndPoint2 = endPoint + newDir2 * gRandGen.randF( 0.5f, 1.5f ) * length;
|
Point3F newEndPoint2 = endingPoint + newDir2 * gRandGen.randF( 0.5f, 1.5f ) * length;
|
||||||
|
|
||||||
createSplit( endPoint, newEndPoint1, depth - 1, width * 0.30f );
|
createSplit(endingPoint, newEndPoint1, depth - 1, splitWidth * 0.30f );
|
||||||
createSplit( endPoint, newEndPoint2, depth - 1, width * 0.30f );
|
createSplit(endingPoint, newEndPoint2, depth - 1, splitWidth * 0.30f );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ class ShapeBase;
|
||||||
class LightningStrikeEvent;
|
class LightningStrikeEvent;
|
||||||
class SFXTrack;
|
class SFXTrack;
|
||||||
|
|
||||||
|
#define MAX_LIGHTNING 3
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
class LightningData : public GameBaseData
|
class LightningData : public GameBaseData
|
||||||
|
|
@ -70,6 +71,7 @@ class LightningData : public GameBaseData
|
||||||
|
|
||||||
GFXTexHandle strikeTextures[MaxTextures];
|
GFXTexHandle strikeTextures[MaxTextures];
|
||||||
U32 numThunders;
|
U32 numThunders;
|
||||||
|
U32 mNumStrikeTextures;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool onAdd();
|
bool onAdd();
|
||||||
|
|
@ -227,7 +229,7 @@ class Lightning : public GameBase
|
||||||
|
|
||||||
void warningFlashes();
|
void warningFlashes();
|
||||||
void strikeRandomPoint();
|
void strikeRandomPoint();
|
||||||
void strikeObject(ShapeBase*);
|
void strikeObject(ShapeBase* targetObj);
|
||||||
void processEvent(LightningStrikeEvent*);
|
void processEvent(LightningStrikeEvent*);
|
||||||
|
|
||||||
DECLARE_CONOBJECT(Lightning);
|
DECLARE_CONOBJECT(Lightning);
|
||||||
|
|
|
||||||
|
|
@ -2141,13 +2141,18 @@ DefineEngineFunction( gotoWebPage, void, ( const char* address ),,
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
DefineEngineFunction( displaySplashWindow, bool, (const char* path), ("art/gui/splash.bmp"),
|
DefineEngineFunction( displaySplashWindow, bool, (const char* path), (""),
|
||||||
"Display a startup splash window suitable for showing while the engine still starts up.\n\n"
|
"Display a startup splash window suitable for showing while the engine still starts up.\n\n"
|
||||||
"@note This is currently only implemented on Windows.\n\n"
|
"@note This is currently only implemented on Windows.\n\n"
|
||||||
"@param path relative path to splash screen image to display.\n"
|
"@param path relative path to splash screen image to display.\n"
|
||||||
"@return True if the splash window could be successfully initialized.\n\n"
|
"@return True if the splash window could be successfully initialized.\n\n"
|
||||||
"@ingroup Platform" )
|
"@ingroup Platform" )
|
||||||
{
|
{
|
||||||
|
if (path == "")
|
||||||
|
{
|
||||||
|
path = Con::getVariable("$Core::splashWindowImage");
|
||||||
|
}
|
||||||
|
|
||||||
return Platform::displaySplashWindow(path);
|
return Platform::displaySplashWindow(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,9 @@ void ForestSelectionTool::_selectItem( const ForestItem &item )
|
||||||
|
|
||||||
void ForestSelectionTool::deleteSelection()
|
void ForestSelectionTool::deleteSelection()
|
||||||
{
|
{
|
||||||
|
if (!mEditor)
|
||||||
|
return;
|
||||||
|
|
||||||
ForestDeleteUndoAction *action = new ForestDeleteUndoAction( mForest->getData(), mEditor );
|
ForestDeleteUndoAction *action = new ForestDeleteUndoAction( mForest->getData(), mEditor );
|
||||||
|
|
||||||
for ( U32 i=0; i < mSelection.size(); i++ )
|
for ( U32 i=0; i < mSelection.size(); i++ )
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,10 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
|
||||||
|
|
||||||
mNumMipLevels++;
|
mNumMipLevels++;
|
||||||
allocPixels += currWidth * currHeight * mBytesPerPixel;
|
allocPixels += currWidth * currHeight * mBytesPerPixel;
|
||||||
} while (currWidth != 1 && currHeight != 1);
|
} while (currWidth != 1 || currHeight != 1);
|
||||||
|
|
||||||
|
U32 expectedMips = mFloor(mLog2(mMax(in_width, in_height))) + 1;
|
||||||
|
AssertFatal(mNumMipLevels == expectedMips, "GBitmap::allocateBitmap: mipmap count wrong");
|
||||||
}
|
}
|
||||||
AssertFatal(mNumMipLevels <= c_maxMipLevels, "GBitmap::allocateBitmap: too many miplevels");
|
AssertFatal(mNumMipLevels <= c_maxMipLevels, "GBitmap::allocateBitmap: too many miplevels");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1085,21 +1085,7 @@ void GFXTextureManager::_validateTexParams( const U32 width, const U32 height,
|
||||||
// NOTE: Does this belong here?
|
// NOTE: Does this belong here?
|
||||||
if( inOutNumMips == 0 && !autoGenSupp )
|
if( inOutNumMips == 0 && !autoGenSupp )
|
||||||
{
|
{
|
||||||
U32 currWidth = width;
|
inOutNumMips = mFloor(mLog2(mMax(width, height))) + 1;
|
||||||
U32 currHeight = height;
|
|
||||||
|
|
||||||
inOutNumMips = 1;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
currWidth >>= 1;
|
|
||||||
currHeight >>= 1;
|
|
||||||
if( currWidth == 0 )
|
|
||||||
currWidth = 1;
|
|
||||||
if( currHeight == 0 )
|
|
||||||
currHeight = 1;
|
|
||||||
|
|
||||||
inOutNumMips++;
|
|
||||||
} while ( currWidth != 1 && currHeight != 1 );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -314,6 +314,9 @@ DefineEngineFunction( startVideoCapture, void,
|
||||||
"@see stopVideoCapture\n"
|
"@see stopVideoCapture\n"
|
||||||
"@ingroup Rendering\n" )
|
"@ingroup Rendering\n" )
|
||||||
{
|
{
|
||||||
|
#ifdef TORQUE_DEBUG
|
||||||
|
Con::errorf("Recording video is disabled in debug!");
|
||||||
|
#else
|
||||||
if ( !canvas )
|
if ( !canvas )
|
||||||
{
|
{
|
||||||
Con::errorf("startVideoCapture -Please specify a GuiCanvas object to record from!");
|
Con::errorf("startVideoCapture -Please specify a GuiCanvas object to record from!");
|
||||||
|
|
@ -328,6 +331,7 @@ DefineEngineFunction( startVideoCapture, void,
|
||||||
VIDCAP->setResolution(resolution);
|
VIDCAP->setResolution(resolution);
|
||||||
|
|
||||||
VIDCAP->begin(canvas);
|
VIDCAP->begin(canvas);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineFunction( stopVideoCapture, void, (),,
|
DefineEngineFunction( stopVideoCapture, void, (),,
|
||||||
|
|
|
||||||
|
|
@ -320,6 +320,11 @@ inline F32 mLog(const F32 val)
|
||||||
return (F32) log(val);
|
return (F32) log(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline F32 mLog2(const F32 val)
|
||||||
|
{
|
||||||
|
return (F32) log2(val);
|
||||||
|
}
|
||||||
|
|
||||||
inline F32 mExp(const F32 val)
|
inline F32 mExp(const F32 val)
|
||||||
{
|
{
|
||||||
return (F32) exp(val);
|
return (F32) exp(val);
|
||||||
|
|
@ -380,6 +385,10 @@ inline F64 mLog(const F64 val)
|
||||||
return (F64) log(val);
|
return (F64) log(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline F64 mLog2(const F64 val)
|
||||||
|
{
|
||||||
|
return (F64) log2(val);
|
||||||
|
}
|
||||||
|
|
||||||
inline F32 mCatmullrom(F32 t, F32 p0, F32 p1, F32 p2, F32 p3)
|
inline F32 mCatmullrom(F32 t, F32 p0, F32 p1, F32 p2, F32 p3)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -429,7 +429,7 @@ struct InputEventInfo
|
||||||
U16 ascii;
|
U16 ascii;
|
||||||
|
|
||||||
/// Modifiers to action: SI_LSHIFT, SI_LCTRL, etc.
|
/// Modifiers to action: SI_LSHIFT, SI_LCTRL, etc.
|
||||||
InputModifiers modifier;
|
U32 modifier;
|
||||||
|
|
||||||
inline void postToSignal(InputEvent &ie)
|
inline void postToSignal(InputEvent &ie)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,7 @@ void RenderMeshMgr::render(SceneRenderState * state)
|
||||||
if ( passRI->accuTex != lastAccuTex )
|
if ( passRI->accuTex != lastAccuTex )
|
||||||
{
|
{
|
||||||
sgData.accuTex = passRI->accuTex;
|
sgData.accuTex = passRI->accuTex;
|
||||||
lastAccuTex = lastAccuTex;
|
lastAccuTex = passRI->accuTex;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -588,6 +588,8 @@ bool RenderParticleMgr::_initShader()
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
||||||
|
{
|
||||||
|
if ( activate )
|
||||||
{
|
{
|
||||||
RenderPassManager *rpm = getRenderPass();
|
RenderPassManager *rpm = getRenderPass();
|
||||||
if ( !rpm )
|
if ( !rpm )
|
||||||
|
|
@ -621,12 +623,18 @@ void RenderParticleMgr::_onLMActivate( const char*, bool activate )
|
||||||
mEdgeTarget = NamedTexTarget::find( "edge" );
|
mEdgeTarget = NamedTexTarget::find( "edge" );
|
||||||
|
|
||||||
// Setup the shader
|
// Setup the shader
|
||||||
if ( activate )
|
|
||||||
_initShader();
|
_initShader();
|
||||||
|
|
||||||
if ( mScreenQuadVertBuff.isNull() )
|
if ( mScreenQuadVertBuff.isNull() )
|
||||||
_initGFXResources();
|
_initGFXResources();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mStencilClearSB = NULL;
|
||||||
|
mScreenQuadPrimBuff = NULL;
|
||||||
|
mScreenQuadVertBuff = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GFXStateBlockRef RenderParticleMgr::_getOffscreenStateBlock(ParticleRenderInst *ri)
|
GFXStateBlockRef RenderParticleMgr::_getOffscreenStateBlock(ParticleRenderInst *ri)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,7 @@ RenderPassManager::RenderBinEventSignal& RenderPassManager::getRenderBinSignal()
|
||||||
|
|
||||||
void RenderPassManager::initPersistFields()
|
void RenderPassManager::initPersistFields()
|
||||||
{
|
{
|
||||||
|
Parent::initPersistFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderPassManager::RenderPassManager()
|
RenderPassManager::RenderPassManager()
|
||||||
|
|
|
||||||
|
|
@ -480,7 +480,7 @@ void RenderPrePassMgr::render( SceneRenderState *state )
|
||||||
if (passRI->accuTex != lastAccuTex)
|
if (passRI->accuTex != lastAccuTex)
|
||||||
{
|
{
|
||||||
sgData.accuTex = passRI->accuTex;
|
sgData.accuTex = passRI->accuTex;
|
||||||
lastAccuTex = lastAccuTex;
|
lastAccuTex = passRI->accuTex;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "platform/platform.h"
|
#include "platform/platform.h"
|
||||||
#include "console/console.h"
|
#include "console/console.h"
|
||||||
|
#include "gfx/bitmap/gBitmap.h"
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#include "windowManager/sdl/sdlWindow.h"
|
#include "windowManager/sdl/sdlWindow.h"
|
||||||
|
|
||||||
|
|
@ -36,7 +36,52 @@ bool Platform::displaySplashWindow( String path )
|
||||||
if(path.isEmpty())
|
if(path.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
gSplashImage = SDL_LoadBMP(path);
|
Torque::Path iconPath = Torque::Path(path);
|
||||||
|
|
||||||
|
if (iconPath.getExtension() == String("bmp"))
|
||||||
|
{
|
||||||
|
Con::errorf("Unable to use bmp format images for the splash screen. Please use a different format.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Resource<GBitmap> img = GBitmap::load(iconPath);
|
||||||
|
if (img != NULL)
|
||||||
|
{
|
||||||
|
U32 pitch;
|
||||||
|
U32 width = img->getWidth();
|
||||||
|
bool hasAlpha = img->getHasTransparency();
|
||||||
|
U32 depth;
|
||||||
|
|
||||||
|
if (hasAlpha)
|
||||||
|
{
|
||||||
|
pitch = 4 * width;
|
||||||
|
depth = 32;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pitch = 3 * width;
|
||||||
|
depth = 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint32 rmask, gmask, bmask, amask;
|
||||||
|
if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
|
||||||
|
{
|
||||||
|
S32 shift = hasAlpha ? 8 : 0;
|
||||||
|
rmask = 0xff000000 >> shift;
|
||||||
|
gmask = 0x00ff0000 >> shift;
|
||||||
|
bmask = 0x0000ff00 >> shift;
|
||||||
|
amask = 0x000000ff >> shift;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rmask = 0x000000ff;
|
||||||
|
gmask = 0x0000ff00;
|
||||||
|
bmask = 0x00ff0000;
|
||||||
|
amask = hasAlpha ? 0xff000000 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
gSplashImage = SDL_CreateRGBSurfaceFrom(img->getAddress(0, 0), img->getWidth(), img->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
|
||||||
|
}
|
||||||
|
|
||||||
//now the pop-up window
|
//now the pop-up window
|
||||||
if (gSplashImage)
|
if (gSplashImage)
|
||||||
|
|
|
||||||
|
|
@ -52,22 +52,40 @@ namespace
|
||||||
U32 ret = 0;
|
U32 ret = 0;
|
||||||
|
|
||||||
if (mod & KMOD_LSHIFT)
|
if (mod & KMOD_LSHIFT)
|
||||||
ret |= IM_LSHIFT;
|
{
|
||||||
|
ret |= SI_LSHIFT;
|
||||||
|
ret |= SI_SHIFT;
|
||||||
|
}
|
||||||
|
|
||||||
if (mod & KMOD_RSHIFT)
|
if (mod & KMOD_RSHIFT)
|
||||||
ret |= IM_RSHIFT;
|
{
|
||||||
|
ret |= SI_RSHIFT;
|
||||||
|
ret |= SI_SHIFT;
|
||||||
|
}
|
||||||
|
|
||||||
if (mod & KMOD_LCTRL)
|
if (mod & KMOD_LCTRL)
|
||||||
ret |= IM_LCTRL;
|
{
|
||||||
|
ret |= SI_LCTRL;
|
||||||
|
ret |= SI_CTRL;
|
||||||
|
}
|
||||||
|
|
||||||
if (mod & KMOD_RCTRL)
|
if (mod & KMOD_RCTRL)
|
||||||
ret |= IM_RCTRL;
|
{
|
||||||
|
ret |= SI_RCTRL;
|
||||||
|
ret |= SI_CTRL;
|
||||||
|
}
|
||||||
|
|
||||||
if (mod & KMOD_LALT)
|
if (mod & KMOD_LALT)
|
||||||
ret |= IM_LALT;
|
{
|
||||||
|
ret |= SI_LALT;
|
||||||
|
ret |= SI_ALT;
|
||||||
|
}
|
||||||
|
|
||||||
if (mod & KMOD_RALT)
|
if (mod & KMOD_RALT)
|
||||||
ret |= IM_RALT;
|
{
|
||||||
|
ret |= SI_RALT;
|
||||||
|
ret |= SI_ALT;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
#include "gfx/gfxDevice.h"
|
#include "gfx/gfxDevice.h"
|
||||||
#include "core/util/journal/process.h"
|
#include "core/util/journal/process.h"
|
||||||
#include "core/strings/unicode.h"
|
#include "core/strings/unicode.h"
|
||||||
|
#include "gfx/bitmap/gBitmap.h"
|
||||||
|
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
|
|
||||||
|
|
@ -165,6 +166,59 @@ PlatformWindow *PlatformWindowManagerSDL::createWindow(GFXDevice *device, const
|
||||||
window->mOwningManager = this;
|
window->mOwningManager = this;
|
||||||
mWindowMap[ window->mWindowId ] = window;
|
mWindowMap[ window->mWindowId ] = window;
|
||||||
|
|
||||||
|
//Now, fetch our window icon, if any
|
||||||
|
Torque::Path iconPath = Torque::Path(Con::getVariable( "$Core::windowIcon" ));
|
||||||
|
|
||||||
|
if (iconPath.getExtension() == String("bmp"))
|
||||||
|
{
|
||||||
|
Con::errorf("Unable to use bmp format images for the window icon. Please use a different format.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Resource<GBitmap> img = GBitmap::load(iconPath);
|
||||||
|
if (img != NULL)
|
||||||
|
{
|
||||||
|
U32 pitch;
|
||||||
|
U32 width = img->getWidth();
|
||||||
|
bool hasAlpha = img->getHasTransparency();
|
||||||
|
U32 depth;
|
||||||
|
|
||||||
|
if (hasAlpha)
|
||||||
|
{
|
||||||
|
pitch = 4 * width;
|
||||||
|
depth = 32;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pitch = 3 * width;
|
||||||
|
depth = 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint32 rmask, gmask, bmask, amask;
|
||||||
|
if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
|
||||||
|
{
|
||||||
|
S32 shift = hasAlpha ? 8 : 0;
|
||||||
|
rmask = 0xff000000 >> shift;
|
||||||
|
gmask = 0x00ff0000 >> shift;
|
||||||
|
bmask = 0x0000ff00 >> shift;
|
||||||
|
amask = 0x000000ff >> shift;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rmask = 0x000000ff;
|
||||||
|
gmask = 0x0000ff00;
|
||||||
|
bmask = 0x00ff0000;
|
||||||
|
amask = hasAlpha ? 0xff000000 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Surface* iconSurface = SDL_CreateRGBSurfaceFrom(img->getAddress(0, 0), img->getWidth(), img->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
|
||||||
|
|
||||||
|
SDL_SetWindowIcon(window->mWindowHandle, iconSurface);
|
||||||
|
|
||||||
|
SDL_FreeSurface(iconSurface);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(device)
|
if(device)
|
||||||
{
|
{
|
||||||
window->mDevice = device;
|
window->mDevice = device;
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ void WindowInputGenerator::generateInputEvent( InputEventInfo &inputEvent )
|
||||||
{
|
{
|
||||||
const AccKeyMap &acc = mAcceleratorMap[i];
|
const AccKeyMap &acc = mAcceleratorMap[i];
|
||||||
if (!mWindow->getKeyboardTranslation() &&
|
if (!mWindow->getKeyboardTranslation() &&
|
||||||
(acc.modifier & inputEvent.modifier || (acc.modifier == 0 && inputEvent.modifier == 0))
|
((acc.modifier == inputEvent.modifier && acc.modifier != 0) || (acc.modifier == 0 && inputEvent.modifier == 0))
|
||||||
&& acc.keyCode == inputEvent.objInst)
|
&& acc.keyCode == inputEvent.objInst)
|
||||||
{
|
{
|
||||||
Con::evaluatef(acc.cmd);
|
Con::evaluatef(acc.cmd);
|
||||||
|
|
@ -145,7 +145,11 @@ void WindowInputGenerator::handleMouseMove( WindowId did, U32 modifier, S32 x, S
|
||||||
event.deviceType = MouseDeviceType;
|
event.deviceType = MouseDeviceType;
|
||||||
event.deviceInst = 0;
|
event.deviceInst = 0;
|
||||||
event.objType = SI_AXIS;
|
event.objType = SI_AXIS;
|
||||||
|
#ifdef TORQUE_SDL
|
||||||
|
event.modifier = modifier;
|
||||||
|
#else
|
||||||
event.modifier = convertModifierBits(modifier);
|
event.modifier = convertModifierBits(modifier);
|
||||||
|
#endif
|
||||||
event.ascii = 0;
|
event.ascii = 0;
|
||||||
|
|
||||||
// Generate delta movement along each axis
|
// Generate delta movement along each axis
|
||||||
|
|
@ -231,7 +235,11 @@ void WindowInputGenerator::handleMouseButton( WindowId did, U32 modifiers, U32 a
|
||||||
event.deviceInst = 0;
|
event.deviceInst = 0;
|
||||||
event.objType = SI_BUTTON;
|
event.objType = SI_BUTTON;
|
||||||
event.objInst = (InputObjectInstances)(KEY_BUTTON0 + button);
|
event.objInst = (InputObjectInstances)(KEY_BUTTON0 + button);
|
||||||
|
#ifdef TORQUE_SDL
|
||||||
|
event.modifier = modifiers;
|
||||||
|
#else
|
||||||
event.modifier = convertModifierBits(modifiers);
|
event.modifier = convertModifierBits(modifiers);
|
||||||
|
#endif
|
||||||
event.ascii = 0;
|
event.ascii = 0;
|
||||||
event.action = (action==IA_MAKE) ? SI_MAKE : SI_BREAK;
|
event.action = (action==IA_MAKE) ? SI_MAKE : SI_BREAK;
|
||||||
event.fValue = (action==IA_MAKE) ? 1.0 : 0.0;
|
event.fValue = (action==IA_MAKE) ? 1.0 : 0.0;
|
||||||
|
|
@ -248,7 +256,11 @@ void WindowInputGenerator::handleMouseWheel( WindowId did, U32 modifiers, S32 wh
|
||||||
event.deviceType = MouseDeviceType;
|
event.deviceType = MouseDeviceType;
|
||||||
event.deviceInst = 0;
|
event.deviceInst = 0;
|
||||||
event.objType = SI_AXIS;
|
event.objType = SI_AXIS;
|
||||||
|
#ifdef TORQUE_SDL
|
||||||
|
event.modifier = modifiers;
|
||||||
|
#else
|
||||||
event.modifier = convertModifierBits(modifiers);
|
event.modifier = convertModifierBits(modifiers);
|
||||||
|
#endif
|
||||||
event.ascii = 0;
|
event.ascii = 0;
|
||||||
event.action = SI_MOVE;
|
event.action = SI_MOVE;
|
||||||
|
|
||||||
|
|
@ -281,7 +293,11 @@ void WindowInputGenerator::handleCharInput( WindowId did, U32 modifier, U16 key
|
||||||
event.deviceInst = 0;
|
event.deviceInst = 0;
|
||||||
event.objType = SI_KEY;
|
event.objType = SI_KEY;
|
||||||
event.objInst = KEY_NULL;
|
event.objInst = KEY_NULL;
|
||||||
|
#ifdef TORQUE_SDL
|
||||||
|
event.modifier = modifier;
|
||||||
|
#else
|
||||||
event.modifier = convertModifierBits(modifier);
|
event.modifier = convertModifierBits(modifier);
|
||||||
|
#endif
|
||||||
event.ascii = key;
|
event.ascii = key;
|
||||||
event.action = SI_MAKE;
|
event.action = SI_MAKE;
|
||||||
event.fValue = 1.0;
|
event.fValue = 1.0;
|
||||||
|
|
@ -303,7 +319,11 @@ void WindowInputGenerator::handleKeyboard( WindowId did, U32 modifier, U32 actio
|
||||||
event.deviceInst = 0;
|
event.deviceInst = 0;
|
||||||
event.objType = SI_KEY;
|
event.objType = SI_KEY;
|
||||||
event.objInst = (InputObjectInstances)key;
|
event.objInst = (InputObjectInstances)key;
|
||||||
|
#ifdef TORQUE_SDL
|
||||||
|
event.modifier = modifier;
|
||||||
|
#else
|
||||||
event.modifier = convertModifierBits(modifier);
|
event.modifier = convertModifierBits(modifier);
|
||||||
|
#endif
|
||||||
event.ascii = 0;
|
event.ascii = 0;
|
||||||
|
|
||||||
switch(action)
|
switch(action)
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
profile = "GuiMenuButtonProfile";
|
profile = "GuiMenuButtonProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
command = "GuiEdit();";
|
command = "toggleGuiEditor(1);";
|
||||||
tooltipProfile = "GuiToolTipProfile";
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
tooltip = "The GUI Editor is accessible in-game by pressing F10";
|
tooltip = "The GUI Editor is accessible in-game by pressing F10";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 331 KiB |
BIN
Templates/Empty/game/art/gui/splash.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -55,6 +55,9 @@ function formatSessionNumber(%number)
|
||||||
// Records a movie file from the Canvas content using the specified fps.
|
// Records a movie file from the Canvas content using the specified fps.
|
||||||
// Possible encoder values are "PNG" and "THEORA" (default).
|
// Possible encoder values are "PNG" and "THEORA" (default).
|
||||||
//---------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
$RecordingMovie = false;
|
||||||
|
|
||||||
function recordMovie(%movieName, %fps, %encoder)
|
function recordMovie(%movieName, %fps, %encoder)
|
||||||
{
|
{
|
||||||
// If the canvas doesn't exist yet, setup a flag so it'll
|
// If the canvas doesn't exist yet, setup a flag so it'll
|
||||||
|
|
@ -65,12 +68,24 @@ function recordMovie(%movieName, %fps, %encoder)
|
||||||
if (%encoder $= "")
|
if (%encoder $= "")
|
||||||
%encoder = "THEORA";
|
%encoder = "THEORA";
|
||||||
%resolution = Canvas.getVideoMode();
|
%resolution = Canvas.getVideoMode();
|
||||||
|
|
||||||
|
// Start the movie recording
|
||||||
|
ChatHud.AddLine( "\c4Recording movie file to [\c2" @ %movieName @ "\cr].ogv.");
|
||||||
|
echo("Recording movie to: " @ %movieName);
|
||||||
startVideoCapture(Canvas, %movieName, %encoder, %fps);
|
startVideoCapture(Canvas, %movieName, %encoder, %fps);
|
||||||
|
|
||||||
|
$RecordingMovie = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopMovie()
|
function stopMovie()
|
||||||
{
|
{
|
||||||
|
// Stop the current recording
|
||||||
|
ChatHud.AddLine( "\c4Recording movie file finished.");
|
||||||
|
echo("Stopped movie recording");
|
||||||
|
|
||||||
stopVideoCapture();
|
stopVideoCapture();
|
||||||
|
|
||||||
|
$RecordingMovie = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This is bound in initializeCommon() to take
|
/// This is bound in initializeCommon() to take
|
||||||
|
|
|
||||||
BIN
Templates/Empty/game/core/torque.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -28,6 +28,8 @@ $defaultGame = "scripts";
|
||||||
|
|
||||||
// Set profile directory
|
// Set profile directory
|
||||||
$Pref::Video::ProfilePath = "core/profile";
|
$Pref::Video::ProfilePath = "core/profile";
|
||||||
|
$Core::windowIcon = "core/torque.png";
|
||||||
|
$Core::splashWindowImage = "art/gui/splash.png";
|
||||||
|
|
||||||
function createCanvas(%windowTitle)
|
function createCanvas(%windowTitle)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -409,6 +409,49 @@ function stopRecordingDemo( %val )
|
||||||
moveMap.bind( keyboard, F3, startRecordingDemo );
|
moveMap.bind( keyboard, F3, startRecordingDemo );
|
||||||
moveMap.bind( keyboard, F4, stopRecordingDemo );
|
moveMap.bind( keyboard, F4, stopRecordingDemo );
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Theora Video Capture (Records a movie file)
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function toggleMovieRecording(%val)
|
||||||
|
{
|
||||||
|
if (!%val)
|
||||||
|
return;
|
||||||
|
|
||||||
|
%movieEncodingType = "THEORA"; // Valid encoder values are "PNG" and "THEORA" (default).
|
||||||
|
%movieFPS = 30; // video capture frame rate.
|
||||||
|
|
||||||
|
if (!$RecordingMovie)
|
||||||
|
{
|
||||||
|
// locate a non-existent filename to use
|
||||||
|
for(%i = 0; %i < 1000; %i++)
|
||||||
|
{
|
||||||
|
%num = %i;
|
||||||
|
if(%num < 10)
|
||||||
|
%num = "0" @ %num;
|
||||||
|
if(%num < 100)
|
||||||
|
%num = "0" @ %num;
|
||||||
|
|
||||||
|
%filePath = "movies/movie" @ %num;
|
||||||
|
if(!isfile(%filePath))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(%i == 1000)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Start the movie recording
|
||||||
|
recordMovie(%filePath, %movieFPS, %movieEncodingType);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Stop the current recording
|
||||||
|
stopMovie();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Key binding works at any time and not just while in a game.
|
||||||
|
GlobalActionMap.bind(keyboard, "alt m", toggleMovieRecording);
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Helper Functions
|
// Helper Functions
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ function EditorInspectorBase::onAdd( %this )
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
isPopup = true;
|
isPopup = true;
|
||||||
|
|
||||||
item[ 0 ] = "Edit Profile" TAB "" TAB "if( !$InGuiEditor ) toggleGuiEditor( true ); GuiEditor.editProfile( %this.inspectorField.getData() );";
|
item[ 0 ] = "Edit Profile" TAB "" TAB "if( !GuiEditorIsActive() ) toggleGuiEditor( true ); GuiEditor.editProfile( %this.inspectorField.getData() );";
|
||||||
item[ 1 ] = "Jump to Definition in Torsion" TAB "" TAB "EditorOpenDeclarationInTorsion( %this.inspectorField.getData() );";
|
item[ 1 ] = "Jump to Definition in Torsion" TAB "" TAB "EditorOpenDeclarationInTorsion( %this.inspectorField.getData() );";
|
||||||
item[ 2 ] = "Inspect Object" TAB "" TAB "inspectObject( %this.inspectorField.getData() );";
|
item[ 2 ] = "Inspect Object" TAB "" TAB "inspectObject( %this.inspectorField.getData() );";
|
||||||
item[ 3 ] = "-";
|
item[ 3 ] = "-";
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@
|
||||||
objectNamesOnly = "1";
|
objectNamesOnly = "1";
|
||||||
useInspectorTooltips = "0";
|
useInspectorTooltips = "0";
|
||||||
tooltipOnWidthOnly = "0";
|
tooltipOnWidthOnly = "0";
|
||||||
compareToObjectID = "1";
|
compareToObjectID = "0";
|
||||||
canRenameObjects = "1";
|
canRenameObjects = "1";
|
||||||
renameInternal = "0";
|
renameInternal = "0";
|
||||||
isContainer = "1";
|
isContainer = "1";
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
minExtent = "8 8";
|
minExtent = "8 8";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
command = "GuiEditor.switchToWorldEditor();";
|
command = "toggleEditor(1);";
|
||||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
ToolTip = "World Editor";
|
ToolTip = "World Editor";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,22 @@ function toggleGuiEditor( %make )
|
||||||
if( EditorIsActive() && !GuiEditor.toggleIntoEditorGui )
|
if( EditorIsActive() && !GuiEditor.toggleIntoEditorGui )
|
||||||
toggleEditor( true );
|
toggleEditor( true );
|
||||||
|
|
||||||
GuiEdit();
|
if( !isObject( GuiEditCanvas ) )
|
||||||
|
new GuiControl( GuiEditCanvas, EditorGuiGroup );
|
||||||
|
|
||||||
|
if( GuiEditorIsActive() )
|
||||||
|
{
|
||||||
|
GuiEditor.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GuiEditor.open();
|
||||||
|
|
||||||
|
// Cancel the scheduled event to prevent
|
||||||
|
// the level from cycling after it's duration
|
||||||
|
// has elapsed.
|
||||||
|
cancel($Game::Schedule);
|
||||||
|
}
|
||||||
|
|
||||||
// Cancel the scheduled event to prevent
|
// Cancel the scheduled event to prevent
|
||||||
// the level from cycling after it's duration
|
// the level from cycling after it's duration
|
||||||
|
|
@ -98,6 +113,26 @@ package GuiEditor_BlockDialogs
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function GuiEditor::open(%this)
|
||||||
|
{
|
||||||
|
GuiEditCanvas.onCreateMenu();
|
||||||
|
|
||||||
|
GuiEditContent(Canvas.getContent());
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiEditor::close(%this)
|
||||||
|
{
|
||||||
|
// prevent the mission editor from opening while the GuiEditor is open.
|
||||||
|
if(Canvas.getContent() != GuiEditorGui.getId())
|
||||||
|
return;
|
||||||
|
|
||||||
|
GuiGroup.add(GuiEditorGui);
|
||||||
|
|
||||||
|
Canvas.setContent(GuiEditor.lastContent);
|
||||||
|
|
||||||
|
GuiEditCanvas.onDestroyMenu();
|
||||||
|
}
|
||||||
|
|
||||||
function GuiEditor::openForEditing( %this, %content )
|
function GuiEditor::openForEditing( %this, %content )
|
||||||
{
|
{
|
||||||
Canvas.setContent( GuiEditorGui );
|
Canvas.setContent( GuiEditorGui );
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
MinExtent = "8 8";
|
MinExtent = "8 8";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
Command = "toggleEditor( true ); GuiEdit(); $GuiEditorBtnPressed = true;";
|
Command = "toggleGuiEditor(true); $GuiEditorBtnPressed = true;";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
ToolTip = "Open the GuiEditor";
|
ToolTip = "Open the GuiEditor";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,6 @@ function EditorGui::init(%this)
|
||||||
$NextOperationId = 1;
|
$NextOperationId = 1;
|
||||||
$HeightfieldDirtyRow = -1;
|
$HeightfieldDirtyRow = -1;
|
||||||
|
|
||||||
%this.buildMenus();
|
|
||||||
|
|
||||||
if( !isObject( %this-->ToolsPaletteWindow ) )
|
if( !isObject( %this-->ToolsPaletteWindow ) )
|
||||||
{
|
{
|
||||||
// Load Creator/Inspector GUI
|
// Load Creator/Inspector GUI
|
||||||
|
|
@ -1914,6 +1912,8 @@ function Editor::open(%this)
|
||||||
if(Canvas.getContent() == GuiEditorGui.getId())
|
if(Canvas.getContent() == GuiEditorGui.getId())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
EditorGui.buildMenus();
|
||||||
|
|
||||||
if( !EditorGui.isInitialized )
|
if( !EditorGui.isInitialized )
|
||||||
EditorGui.init();
|
EditorGui.init();
|
||||||
|
|
||||||
|
|
@ -1929,6 +1929,21 @@ function Editor::close(%this, %gui)
|
||||||
if(isObject(MessageHud))
|
if(isObject(MessageHud))
|
||||||
MessageHud.close();
|
MessageHud.close();
|
||||||
EditorGui.writeCameraSettings();
|
EditorGui.writeCameraSettings();
|
||||||
|
|
||||||
|
EditorGui.onDestroyMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
function EditorGui::onDestroyMenu(%this)
|
||||||
|
{
|
||||||
|
if( !isObject( %this.menuBar ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Destroy menus
|
||||||
|
while( %this.menuBar.getCount() != 0 )
|
||||||
|
%this.menuBar.getObject( 0 ).delete();
|
||||||
|
|
||||||
|
%this.menuBar.removeFromCanvas();
|
||||||
|
%this.menuBar.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
$RelightCallback = "";
|
$RelightCallback = "";
|
||||||
|
|
|
||||||
|
|
@ -99,18 +99,12 @@ function Editor::checkActiveLoadDone()
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
function toggleEditor(%make)
|
function toggleEditor(%make)
|
||||||
{
|
{
|
||||||
if (Canvas.isFullscreen())
|
|
||||||
{
|
|
||||||
MessageBoxOK("Windowed Mode Required", "Please switch to windowed mode to access the Mission Editor.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (%make)
|
if (%make)
|
||||||
{
|
{
|
||||||
%timerId = startPrecisionTimer();
|
%timerId = startPrecisionTimer();
|
||||||
|
|
||||||
if( $InGuiEditor )
|
if( GuiEditorIsActive() )
|
||||||
GuiEdit();
|
toggleGuiEditor(1);
|
||||||
|
|
||||||
if( !$missionRunning )
|
if( !$missionRunning )
|
||||||
{
|
{
|
||||||
|
|
@ -142,16 +136,9 @@ function toggleEditor(%make)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if ( !$GuiEditorBtnPressed )
|
|
||||||
{
|
{
|
||||||
canvas.pushDialog( EditorLoadingGui );
|
canvas.pushDialog( EditorLoadingGui );
|
||||||
canvas.repaint();
|
canvas.repaint();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$GuiEditorBtnPressed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Editor.open();
|
Editor.open();
|
||||||
|
|
||||||
|
|
@ -163,7 +150,6 @@ function toggleEditor(%make)
|
||||||
if (theLevelInfo.type $= "DemoScene")
|
if (theLevelInfo.type $= "DemoScene")
|
||||||
commandToServer('dropCameraAtPlayer', true);
|
commandToServer('dropCameraAtPlayer', true);
|
||||||
|
|
||||||
|
|
||||||
canvas.popDialog(EditorLoadingGui);
|
canvas.popDialog(EditorLoadingGui);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@ function EditorGui::buildMenus(%this)
|
||||||
// Sub menus (temporary, until MenuBuilder gets updated)
|
// Sub menus (temporary, until MenuBuilder gets updated)
|
||||||
// The speed increments located here are overwritten in EditorCameraSpeedMenu::setupDefaultState.
|
// The speed increments located here are overwritten in EditorCameraSpeedMenu::setupDefaultState.
|
||||||
// The new min/max for the editor camera speed range can be set in each level's levelInfo object.
|
// The new min/max for the editor camera speed range can be set in each level's levelInfo object.
|
||||||
|
if(!isObject(EditorCameraSpeedOptions))
|
||||||
|
{
|
||||||
%this.cameraSpeedMenu = new PopupMenu(EditorCameraSpeedOptions)
|
%this.cameraSpeedMenu = new PopupMenu(EditorCameraSpeedOptions)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -57,6 +59,9 @@ function EditorGui::buildMenus(%this)
|
||||||
item[5] = "Fast" TAB %cmdCtrl @ "-Shift 6" TAB "165";
|
item[5] = "Fast" TAB %cmdCtrl @ "-Shift 6" TAB "165";
|
||||||
item[6] = "Fastest" TAB %cmdCtrl @ "-Shift 7" TAB "200";
|
item[6] = "Fastest" TAB %cmdCtrl @ "-Shift 7" TAB "200";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
if(!isObject(EditorFreeCameraTypeOptions))
|
||||||
|
{
|
||||||
%this.freeCameraTypeMenu = new PopupMenu(EditorFreeCameraTypeOptions)
|
%this.freeCameraTypeMenu = new PopupMenu(EditorFreeCameraTypeOptions)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -68,6 +73,9 @@ function EditorGui::buildMenus(%this)
|
||||||
item[3] = "Smoothed" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Camera\");";
|
item[3] = "Smoothed" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Camera\");";
|
||||||
item[4] = "Smoothed Rotate" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Rot Camera\");";
|
item[4] = "Smoothed Rotate" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Rot Camera\");";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
if(!isObject(EditorPlayerCameraTypeOptions))
|
||||||
|
{
|
||||||
%this.playerCameraTypeMenu = new PopupMenu(EditorPlayerCameraTypeOptions)
|
%this.playerCameraTypeMenu = new PopupMenu(EditorPlayerCameraTypeOptions)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -76,6 +84,9 @@ function EditorGui::buildMenus(%this)
|
||||||
Item[0] = "First Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"1st Person Camera\");";
|
Item[0] = "First Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"1st Person Camera\");";
|
||||||
Item[1] = "Third Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"3rd Person Camera\");";
|
Item[1] = "Third Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"3rd Person Camera\");";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
if(!isObject(EditorCameraBookmarks))
|
||||||
|
{
|
||||||
%this.cameraBookmarksMenu = new PopupMenu(EditorCameraBookmarks)
|
%this.cameraBookmarksMenu = new PopupMenu(EditorCameraBookmarks)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -83,6 +94,7 @@ function EditorGui::buildMenus(%this)
|
||||||
|
|
||||||
//item[0] = "None";
|
//item[0] = "None";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
%this.viewTypeMenu = new PopupMenu()
|
%this.viewTypeMenu = new PopupMenu()
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -98,7 +110,7 @@ function EditorGui::buildMenus(%this)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Menu bar
|
// Menu bar
|
||||||
%this.menuBar = new MenuBar()
|
%this.menuBar = new MenuBar(WorldEditorMenubar)
|
||||||
{
|
{
|
||||||
dynamicItemInsertPos = 3;
|
dynamicItemInsertPos = 3;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ datablock LightningData(DefaultStorm)
|
||||||
thunderSounds[1] = ThunderCrash2Sound;
|
thunderSounds[1] = ThunderCrash2Sound;
|
||||||
thunderSounds[2] = ThunderCrash3Sound;
|
thunderSounds[2] = ThunderCrash3Sound;
|
||||||
thunderSounds[3] = ThunderCrash4Sound;
|
thunderSounds[3] = ThunderCrash4Sound;
|
||||||
|
|
||||||
|
strikeTextures[0] = "art/environment/lightning";
|
||||||
};
|
};
|
||||||
|
|
||||||
datablock ReflectorDesc( DefaultCubeDesc )
|
datablock ReflectorDesc( DefaultCubeDesc )
|
||||||
|
|
|
||||||
BIN
Templates/Full/game/art/environment/lightning.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
|
@ -126,7 +126,7 @@
|
||||||
profile = "GuiMenuButtonProfile";
|
profile = "GuiMenuButtonProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
command = "GuiEdit();";
|
command = "toggleGuiEditor(1);";
|
||||||
tooltipProfile = "GuiToolTipProfile";
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
tooltip = "The GUI Editor is accessible in-game by pressing F10";
|
tooltip = "The GUI Editor is accessible in-game by pressing F10";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 331 KiB |
BIN
Templates/Full/game/art/gui/splash.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -55,6 +55,9 @@ function formatSessionNumber(%number)
|
||||||
// Records a movie file from the Canvas content using the specified fps.
|
// Records a movie file from the Canvas content using the specified fps.
|
||||||
// Possible encoder values are "PNG" and "THEORA" (default).
|
// Possible encoder values are "PNG" and "THEORA" (default).
|
||||||
//---------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
$RecordingMovie = false;
|
||||||
|
|
||||||
function recordMovie(%movieName, %fps, %encoder)
|
function recordMovie(%movieName, %fps, %encoder)
|
||||||
{
|
{
|
||||||
// If the canvas doesn't exist yet, setup a flag so it'll
|
// If the canvas doesn't exist yet, setup a flag so it'll
|
||||||
|
|
@ -65,12 +68,24 @@ function recordMovie(%movieName, %fps, %encoder)
|
||||||
if (%encoder $= "")
|
if (%encoder $= "")
|
||||||
%encoder = "THEORA";
|
%encoder = "THEORA";
|
||||||
%resolution = Canvas.getVideoMode();
|
%resolution = Canvas.getVideoMode();
|
||||||
|
|
||||||
|
// Start the movie recording
|
||||||
|
ChatHud.AddLine( "\c4Recording movie file to [\c2" @ %movieName @ "\cr].ogv.");
|
||||||
|
echo("Recording movie to: " @ %movieName);
|
||||||
startVideoCapture(Canvas, %movieName, %encoder, %fps);
|
startVideoCapture(Canvas, %movieName, %encoder, %fps);
|
||||||
|
|
||||||
|
$RecordingMovie = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopMovie()
|
function stopMovie()
|
||||||
{
|
{
|
||||||
|
// Stop the current recording
|
||||||
|
ChatHud.AddLine( "\c4Recording movie file finished.");
|
||||||
|
echo("Stopped movie recording");
|
||||||
|
|
||||||
stopVideoCapture();
|
stopVideoCapture();
|
||||||
|
|
||||||
|
$RecordingMovie = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This is bound in initializeCommon() to take
|
/// This is bound in initializeCommon() to take
|
||||||
|
|
|
||||||
BIN
Templates/Full/game/core/torque.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -28,6 +28,8 @@ $defaultGame = "scripts";
|
||||||
|
|
||||||
// Set profile directory
|
// Set profile directory
|
||||||
$Pref::Video::ProfilePath = "core/profile";
|
$Pref::Video::ProfilePath = "core/profile";
|
||||||
|
$Core::windowIcon = "core/torque.png";
|
||||||
|
$Core::splashWindowImage = "art/gui/splash.png";
|
||||||
|
|
||||||
function createCanvas(%windowTitle)
|
function createCanvas(%windowTitle)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -583,6 +583,49 @@ function stopRecordingDemo( %val )
|
||||||
moveMap.bind( keyboard, F3, startRecordingDemo );
|
moveMap.bind( keyboard, F3, startRecordingDemo );
|
||||||
moveMap.bind( keyboard, F4, stopRecordingDemo );
|
moveMap.bind( keyboard, F4, stopRecordingDemo );
|
||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// Theora Video Capture (Records a movie file)
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function toggleMovieRecording(%val)
|
||||||
|
{
|
||||||
|
if (!%val)
|
||||||
|
return;
|
||||||
|
|
||||||
|
%movieEncodingType = "THEORA"; // Valid encoder values are "PNG" and "THEORA" (default).
|
||||||
|
%movieFPS = 30; // video capture frame rate.
|
||||||
|
|
||||||
|
if (!$RecordingMovie)
|
||||||
|
{
|
||||||
|
// locate a non-existent filename to use
|
||||||
|
for(%i = 0; %i < 1000; %i++)
|
||||||
|
{
|
||||||
|
%num = %i;
|
||||||
|
if(%num < 10)
|
||||||
|
%num = "0" @ %num;
|
||||||
|
if(%num < 100)
|
||||||
|
%num = "0" @ %num;
|
||||||
|
|
||||||
|
%filePath = "movies/movie" @ %num;
|
||||||
|
if(!isfile(%filePath))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(%i == 1000)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Start the movie recording
|
||||||
|
recordMovie(%filePath, %movieFPS, %movieEncodingType);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Stop the current recording
|
||||||
|
stopMovie();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Key binding works at any time and not just while in a game.
|
||||||
|
GlobalActionMap.bind(keyboard, "alt m", toggleMovieRecording);
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Helper Functions
|
// Helper Functions
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ function EditorInspectorBase::onAdd( %this )
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
isPopup = true;
|
isPopup = true;
|
||||||
|
|
||||||
item[ 0 ] = "Edit Profile" TAB "" TAB "if( !$InGuiEditor ) toggleGuiEditor( true ); GuiEditor.editProfile( %this.inspectorField.getData() );";
|
item[ 0 ] = "Edit Profile" TAB "" TAB "if( !GuiEditorIsActive() ) toggleGuiEditor( true ); GuiEditor.editProfile( %this.inspectorField.getData() );";
|
||||||
item[ 1 ] = "Jump to Definition in Torsion" TAB "" TAB "EditorOpenDeclarationInTorsion( %this.inspectorField.getData() );";
|
item[ 1 ] = "Jump to Definition in Torsion" TAB "" TAB "EditorOpenDeclarationInTorsion( %this.inspectorField.getData() );";
|
||||||
item[ 2 ] = "Inspect Object" TAB "" TAB "inspectObject( %this.inspectorField.getData() );";
|
item[ 2 ] = "Inspect Object" TAB "" TAB "inspectObject( %this.inspectorField.getData() );";
|
||||||
item[ 3 ] = "-";
|
item[ 3 ] = "-";
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@
|
||||||
objectNamesOnly = "1";
|
objectNamesOnly = "1";
|
||||||
useInspectorTooltips = "0";
|
useInspectorTooltips = "0";
|
||||||
tooltipOnWidthOnly = "0";
|
tooltipOnWidthOnly = "0";
|
||||||
compareToObjectID = "1";
|
compareToObjectID = "0";
|
||||||
canRenameObjects = "1";
|
canRenameObjects = "1";
|
||||||
renameInternal = "0";
|
renameInternal = "0";
|
||||||
isContainer = "1";
|
isContainer = "1";
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
minExtent = "8 8";
|
minExtent = "8 8";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
command = "GuiEditor.switchToWorldEditor();";
|
command = "toggleEditor(1);";
|
||||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
ToolTip = "World Editor";
|
ToolTip = "World Editor";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,22 @@ function toggleGuiEditor( %make )
|
||||||
if( EditorIsActive() && !GuiEditor.toggleIntoEditorGui )
|
if( EditorIsActive() && !GuiEditor.toggleIntoEditorGui )
|
||||||
toggleEditor( true );
|
toggleEditor( true );
|
||||||
|
|
||||||
GuiEdit();
|
if( !isObject( GuiEditCanvas ) )
|
||||||
|
new GuiControl( GuiEditCanvas, EditorGuiGroup );
|
||||||
|
|
||||||
|
if( GuiEditorIsActive() )
|
||||||
|
{
|
||||||
|
GuiEditor.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GuiEditor.open();
|
||||||
|
|
||||||
|
// Cancel the scheduled event to prevent
|
||||||
|
// the level from cycling after it's duration
|
||||||
|
// has elapsed.
|
||||||
|
cancel($Game::Schedule);
|
||||||
|
}
|
||||||
|
|
||||||
// Cancel the scheduled event to prevent
|
// Cancel the scheduled event to prevent
|
||||||
// the level from cycling after it's duration
|
// the level from cycling after it's duration
|
||||||
|
|
@ -98,6 +113,26 @@ package GuiEditor_BlockDialogs
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function GuiEditor::open(%this)
|
||||||
|
{
|
||||||
|
GuiEditCanvas.onCreateMenu();
|
||||||
|
|
||||||
|
GuiEditContent(Canvas.getContent());
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiEditor::close(%this)
|
||||||
|
{
|
||||||
|
// prevent the mission editor from opening while the GuiEditor is open.
|
||||||
|
if(Canvas.getContent() != GuiEditorGui.getId())
|
||||||
|
return;
|
||||||
|
|
||||||
|
GuiGroup.add(GuiEditorGui);
|
||||||
|
|
||||||
|
Canvas.setContent(GuiEditor.lastContent);
|
||||||
|
|
||||||
|
GuiEditCanvas.onDestroyMenu();
|
||||||
|
}
|
||||||
|
|
||||||
function GuiEditor::openForEditing( %this, %content )
|
function GuiEditor::openForEditing( %this, %content )
|
||||||
{
|
{
|
||||||
Canvas.setContent( GuiEditorGui );
|
Canvas.setContent( GuiEditorGui );
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
MinExtent = "8 8";
|
MinExtent = "8 8";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
Command = "toggleEditor( true ); GuiEdit(); $GuiEditorBtnPressed = true;";
|
Command = "toggleGuiEditor(true); $GuiEditorBtnPressed = true;";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
ToolTip = "Open the GuiEditor";
|
ToolTip = "Open the GuiEditor";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,6 @@ function EditorGui::init(%this)
|
||||||
$NextOperationId = 1;
|
$NextOperationId = 1;
|
||||||
$HeightfieldDirtyRow = -1;
|
$HeightfieldDirtyRow = -1;
|
||||||
|
|
||||||
%this.buildMenus();
|
|
||||||
|
|
||||||
if( !isObject( %this-->ToolsPaletteWindow ) )
|
if( !isObject( %this-->ToolsPaletteWindow ) )
|
||||||
{
|
{
|
||||||
// Load Creator/Inspector GUI
|
// Load Creator/Inspector GUI
|
||||||
|
|
@ -1914,6 +1912,8 @@ function Editor::open(%this)
|
||||||
if(Canvas.getContent() == GuiEditorGui.getId())
|
if(Canvas.getContent() == GuiEditorGui.getId())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
EditorGui.buildMenus();
|
||||||
|
|
||||||
if( !EditorGui.isInitialized )
|
if( !EditorGui.isInitialized )
|
||||||
EditorGui.init();
|
EditorGui.init();
|
||||||
|
|
||||||
|
|
@ -1929,6 +1929,21 @@ function Editor::close(%this, %gui)
|
||||||
if(isObject(MessageHud))
|
if(isObject(MessageHud))
|
||||||
MessageHud.close();
|
MessageHud.close();
|
||||||
EditorGui.writeCameraSettings();
|
EditorGui.writeCameraSettings();
|
||||||
|
|
||||||
|
EditorGui.onDestroyMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
function EditorGui::onDestroyMenu(%this)
|
||||||
|
{
|
||||||
|
if( !isObject( %this.menuBar ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Destroy menus
|
||||||
|
while( %this.menuBar.getCount() != 0 )
|
||||||
|
%this.menuBar.getObject( 0 ).delete();
|
||||||
|
|
||||||
|
%this.menuBar.removeFromCanvas();
|
||||||
|
%this.menuBar.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
$RelightCallback = "";
|
$RelightCallback = "";
|
||||||
|
|
|
||||||
|
|
@ -99,18 +99,12 @@ function Editor::checkActiveLoadDone()
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
function toggleEditor(%make)
|
function toggleEditor(%make)
|
||||||
{
|
{
|
||||||
if (Canvas.isFullscreen())
|
|
||||||
{
|
|
||||||
MessageBoxOK("Windowed Mode Required", "Please switch to windowed mode to access the Mission Editor.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (%make)
|
if (%make)
|
||||||
{
|
{
|
||||||
%timerId = startPrecisionTimer();
|
%timerId = startPrecisionTimer();
|
||||||
|
|
||||||
if( $InGuiEditor )
|
if( GuiEditorIsActive() )
|
||||||
GuiEdit();
|
toggleGuiEditor(1);
|
||||||
|
|
||||||
if( !$missionRunning )
|
if( !$missionRunning )
|
||||||
{
|
{
|
||||||
|
|
@ -142,16 +136,9 @@ function toggleEditor(%make)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if ( !$GuiEditorBtnPressed )
|
|
||||||
{
|
{
|
||||||
canvas.pushDialog( EditorLoadingGui );
|
canvas.pushDialog( EditorLoadingGui );
|
||||||
canvas.repaint();
|
canvas.repaint();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$GuiEditorBtnPressed = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Editor.open();
|
Editor.open();
|
||||||
|
|
||||||
|
|
@ -163,7 +150,6 @@ function toggleEditor(%make)
|
||||||
if (theLevelInfo.type $= "DemoScene")
|
if (theLevelInfo.type $= "DemoScene")
|
||||||
commandToServer('dropCameraAtPlayer', true);
|
commandToServer('dropCameraAtPlayer', true);
|
||||||
|
|
||||||
|
|
||||||
canvas.popDialog(EditorLoadingGui);
|
canvas.popDialog(EditorLoadingGui);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@ function EditorGui::buildMenus(%this)
|
||||||
// Sub menus (temporary, until MenuBuilder gets updated)
|
// Sub menus (temporary, until MenuBuilder gets updated)
|
||||||
// The speed increments located here are overwritten in EditorCameraSpeedMenu::setupDefaultState.
|
// The speed increments located here are overwritten in EditorCameraSpeedMenu::setupDefaultState.
|
||||||
// The new min/max for the editor camera speed range can be set in each level's levelInfo object.
|
// The new min/max for the editor camera speed range can be set in each level's levelInfo object.
|
||||||
|
if(!isObject(EditorCameraSpeedOptions))
|
||||||
|
{
|
||||||
%this.cameraSpeedMenu = new PopupMenu(EditorCameraSpeedOptions)
|
%this.cameraSpeedMenu = new PopupMenu(EditorCameraSpeedOptions)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -57,6 +59,9 @@ function EditorGui::buildMenus(%this)
|
||||||
item[5] = "Fast" TAB %cmdCtrl @ "-Shift 6" TAB "165";
|
item[5] = "Fast" TAB %cmdCtrl @ "-Shift 6" TAB "165";
|
||||||
item[6] = "Fastest" TAB %cmdCtrl @ "-Shift 7" TAB "200";
|
item[6] = "Fastest" TAB %cmdCtrl @ "-Shift 7" TAB "200";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
if(!isObject(EditorFreeCameraTypeOptions))
|
||||||
|
{
|
||||||
%this.freeCameraTypeMenu = new PopupMenu(EditorFreeCameraTypeOptions)
|
%this.freeCameraTypeMenu = new PopupMenu(EditorFreeCameraTypeOptions)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -68,6 +73,9 @@ function EditorGui::buildMenus(%this)
|
||||||
item[3] = "Smoothed" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Camera\");";
|
item[3] = "Smoothed" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Camera\");";
|
||||||
item[4] = "Smoothed Rotate" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Rot Camera\");";
|
item[4] = "Smoothed Rotate" TAB "" TAB "EditorGuiStatusBar.setCamera(\"Smooth Rot Camera\");";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
if(!isObject(EditorPlayerCameraTypeOptions))
|
||||||
|
{
|
||||||
%this.playerCameraTypeMenu = new PopupMenu(EditorPlayerCameraTypeOptions)
|
%this.playerCameraTypeMenu = new PopupMenu(EditorPlayerCameraTypeOptions)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -76,6 +84,9 @@ function EditorGui::buildMenus(%this)
|
||||||
Item[0] = "First Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"1st Person Camera\");";
|
Item[0] = "First Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"1st Person Camera\");";
|
||||||
Item[1] = "Third Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"3rd Person Camera\");";
|
Item[1] = "Third Person" TAB "" TAB "EditorGuiStatusBar.setCamera(\"3rd Person Camera\");";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
if(!isObject(EditorCameraBookmarks))
|
||||||
|
{
|
||||||
%this.cameraBookmarksMenu = new PopupMenu(EditorCameraBookmarks)
|
%this.cameraBookmarksMenu = new PopupMenu(EditorCameraBookmarks)
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -83,6 +94,7 @@ function EditorGui::buildMenus(%this)
|
||||||
|
|
||||||
//item[0] = "None";
|
//item[0] = "None";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
%this.viewTypeMenu = new PopupMenu()
|
%this.viewTypeMenu = new PopupMenu()
|
||||||
{
|
{
|
||||||
superClass = "MenuBuilder";
|
superClass = "MenuBuilder";
|
||||||
|
|
@ -98,7 +110,7 @@ function EditorGui::buildMenus(%this)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Menu bar
|
// Menu bar
|
||||||
%this.menuBar = new MenuBar()
|
%this.menuBar = new MenuBar(WorldEditorMenubar)
|
||||||
{
|
{
|
||||||
dynamicItemInsertPos = 3;
|
dynamicItemInsertPos = 3;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,54 @@ set(ALSOFT_INSTALL OFF CACHE BOOL "Install headers and libraries" FORCE)
|
||||||
set(ALSOFT_NO_CONFIG_UTIL OFF CACHE BOOL "Disable building the alsoft-config utility" FORCE)
|
set(ALSOFT_NO_CONFIG_UTIL OFF CACHE BOOL "Disable building the alsoft-config utility" FORCE)
|
||||||
set(ALSOFT_HRTF_DEFS OFF CACHE BOOL "Install HRTF definition files" FORCE)
|
set(ALSOFT_HRTF_DEFS OFF CACHE BOOL "Install HRTF definition files" FORCE)
|
||||||
set(ALSOFT_AMBDEC_PRESETS OFF CACHE BOOL "Install AmbDec presets" FORCE)
|
set(ALSOFT_AMBDEC_PRESETS OFF CACHE BOOL "Install AmbDec presets" FORCE)
|
||||||
|
|
||||||
add_subdirectory( ${libDir}/openal-soft ${CMAKE_CURRENT_BINARY_DIR}/openal-soft)
|
add_subdirectory( ${libDir}/openal-soft ${CMAKE_CURRENT_BINARY_DIR}/openal-soft)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(TORQUE_SFX_OPENAL)
|
||||||
|
#Hide some unnecessary fields as advanced
|
||||||
|
mark_as_advanced(ALSOFT_AMBDEC_PRESETS)
|
||||||
|
mark_as_advanced(ALSOFT_BACKEND_DSOUND)
|
||||||
|
mark_as_advanced(ALSOFT_BACKEND_MMDEVAPI)
|
||||||
|
mark_as_advanced(ALSOFT_BACKEND_WAVE)
|
||||||
|
mark_as_advanced(ALSOFT_BACKEND_WINMM)
|
||||||
|
mark_as_advanced(ALSOFT_CONFIG)
|
||||||
|
mark_as_advanced(ALSOFT_CPUEXT_SSE)
|
||||||
|
mark_as_advanced(ALSOFT_CPUEXT_SSE2)
|
||||||
|
mark_as_advanced(ALSOFT_CPUEXT_SSE3)
|
||||||
|
mark_as_advanced(ALSOFT_CPUEXT_SSE4_1)
|
||||||
|
mark_as_advanced(ALSOFT_DLOPEN)
|
||||||
|
mark_as_advanced(ALSOFT_EMBED_HRTF_DATA)
|
||||||
|
mark_as_advanced(ALSOFT_EXAMPLES)
|
||||||
|
mark_as_advanced(ALSOFT_HRTF_DEFS)
|
||||||
|
mark_as_advanced(ALSOFT_INSTALL)
|
||||||
|
mark_as_advanced(ALSOFT_NO_CONFIG_UTIL)
|
||||||
|
mark_as_advanced(ALSOFT_NO_UID_DEFS)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_ALSA)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_COREAUDIO)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_DSOUND)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_JACK)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_MMDEVAPI)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_NEON)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_OPENSL)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_OSS)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_PORTAUDIO)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_PULSEAUDIO)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_QSA)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_SNDIO)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_SOLARIS)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_SSE)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_SSE2)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_SSE4_1)
|
||||||
|
mark_as_advanced(ALSOFT_REQUIRE_WINMM)
|
||||||
|
mark_as_advanced(ALSOFT_TESTS)
|
||||||
|
mark_as_advanced(ALSOFT_UTILS)
|
||||||
|
mark_as_advanced(ALSOFT_WERROR)
|
||||||
|
mark_as_advanced(COREAUDIO_FRAMEWORK)
|
||||||
|
mark_as_advanced(CMAKE_DEBUG_POSTFIX)
|
||||||
|
mark_as_advanced(FORCE_STATIC_VCRT)
|
||||||
|
endif()
|
||||||
|
|
||||||
mark_as_advanced(TORQUE_SFX_OPENAL)
|
mark_as_advanced(TORQUE_SFX_OPENAL)
|
||||||
option(TORQUE_HIFI "HIFI? support" OFF)
|
option(TORQUE_HIFI "HIFI? support" OFF)
|
||||||
mark_as_advanced(TORQUE_HIFI)
|
mark_as_advanced(TORQUE_HIFI)
|
||||||
|
|
@ -691,6 +737,63 @@ if(TORQUE_SDL)
|
||||||
addDef(TORQUE_SDL)
|
addDef(TORQUE_SDL)
|
||||||
addInclude(${libDir}/sdl/include)
|
addInclude(${libDir}/sdl/include)
|
||||||
addLib(SDL2)
|
addLib(SDL2)
|
||||||
|
|
||||||
|
SET(VIDEO_WAYLAND OFF CACHE BOOL "" FORCE)
|
||||||
|
mark_as_advanced(3DNOW)
|
||||||
|
mark_as_advanced(ALSA)
|
||||||
|
mark_as_advanced(ALTIVEC)
|
||||||
|
mark_as_advanced(ARTS)
|
||||||
|
mark_as_advanced(ASSEMBLY)
|
||||||
|
mark_as_advanced(ASSERTIONS)
|
||||||
|
mark_as_advanced(DIRECTX)
|
||||||
|
mark_as_advanced(DISKAUDIO)
|
||||||
|
mark_as_advanced(DUMMYAUDIO)
|
||||||
|
mark_as_advanced(ESD)
|
||||||
|
mark_as_advanced(FUSIONSOUND)
|
||||||
|
mark_as_advanced(INPUT_TSLIB)
|
||||||
|
mark_as_advanced(LIBC)
|
||||||
|
mark_as_advanced(MMX)
|
||||||
|
mark_as_advanced(NAS)
|
||||||
|
mark_as_advanced(NAS_SHARED)
|
||||||
|
mark_as_advanced(OSS)
|
||||||
|
mark_as_advanced(PTHREADS)
|
||||||
|
mark_as_advanced(PULSEAUDIO)
|
||||||
|
mark_as_advanced(RENDER_D3D)
|
||||||
|
mark_as_advanced(RPATH)
|
||||||
|
mark_as_advanced(SNDIO)
|
||||||
|
mark_as_advanced(SSE)
|
||||||
|
mark_as_advanced(SSE2)
|
||||||
|
mark_as_advanced(SSEMATH)
|
||||||
|
mark_as_advanced(WINDRES)
|
||||||
|
mark_as_advanced(SDL_ATOMIC)
|
||||||
|
mark_as_advanced(SDL_AUDIO)
|
||||||
|
mark_as_advanced(SDL_CPUINFO)
|
||||||
|
mark_as_advanced(SDL_DLOPEN)
|
||||||
|
mark_as_advanced(SDL_EVENTS)
|
||||||
|
mark_as_advanced(SDL_FILE)
|
||||||
|
mark_as_advanced(SDL_FILESYSTEM)
|
||||||
|
mark_as_advanced(SDL_HAPTIC)
|
||||||
|
mark_as_advanced(SDL_JOYSTICK)
|
||||||
|
mark_as_advanced(SDL_LOADSO)
|
||||||
|
mark_as_advanced(SDL_POWER)
|
||||||
|
mark_as_advanced(SDL_RENDER)
|
||||||
|
mark_as_advanced(SDL_SHARED)
|
||||||
|
mark_as_advanced(SDL_STATIC)
|
||||||
|
mark_as_advanced(SDL_THREADS)
|
||||||
|
mark_as_advanced(SDL_TIMERS)
|
||||||
|
mark_as_advanced(SDL_VIDEO)
|
||||||
|
mark_as_advanced(CLOCK_GETTIME)
|
||||||
|
mark_as_advanced(GCC_ATOMICS)
|
||||||
|
mark_as_advanced(VIDEO_WAYLAND)
|
||||||
|
mark_as_advanced(VIDEO_COCOA)
|
||||||
|
mark_as_advanced(VIDEO_DIRECTFB)
|
||||||
|
mark_as_advanced(VIDEO_DUMMY)
|
||||||
|
mark_as_advanced(VIDEO_MIR)
|
||||||
|
mark_as_advanced(VIDEO_OPENGL)
|
||||||
|
mark_as_advanced(VIDEO_OPENGLES)
|
||||||
|
mark_as_advanced(VIDEO_RPI)
|
||||||
|
mark_as_advanced(VIDEO_VIVANTE)
|
||||||
|
mark_as_advanced(VIDEO_X11)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TORQUE_STATIC_CODE_ANALYSIS)
|
if(TORQUE_STATIC_CODE_ANALYSIS)
|
||||||
|
|
|
||||||