mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Phase 2: #ifdef for Zodiacs and particles
This commit is contained in:
parent
0c65f9ee8e
commit
b8f722e2f9
|
|
@ -47,10 +47,12 @@
|
|||
class RenderPassManager;
|
||||
class ParticleData;
|
||||
|
||||
#define AFX_CAP_PARTICLE_POOLS
|
||||
#if defined(AFX_CAP_PARTICLE_POOLS)
|
||||
class afxParticlePoolData;
|
||||
class afxParticlePool;
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
#define AFX_CAP_PARTICLE_POOLS
|
||||
#if defined(AFX_CAP_PARTICLE_POOLS)
|
||||
class afxParticlePoolData;
|
||||
class afxParticlePool;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//*****************************************************************************
|
||||
|
|
|
|||
|
|
@ -194,12 +194,14 @@ bool GameConnection::client_cache_on = false;
|
|||
//----------------------------------------------------------------------------
|
||||
GameConnection::GameConnection()
|
||||
{
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
mRolloverObj = NULL;
|
||||
mPreSelectedObj = NULL;
|
||||
mSelectedObj = NULL;
|
||||
mChangedSelectedObj = false;
|
||||
mPreSelectTimestamp = 0;
|
||||
zoned_in = false;
|
||||
#endif
|
||||
|
||||
#ifdef AFX_CAP_DATABLOCK_CACHE
|
||||
client_db_stream = new InfiniteBitStream;
|
||||
|
|
@ -1177,6 +1179,7 @@ void GameConnection::readPacket(BitStream *bstream)
|
|||
{
|
||||
mMoveList->clientReadMovePacket(bstream);
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
// selected object - do we have a change in status?
|
||||
if (bstream->readFlag())
|
||||
{
|
||||
|
|
@ -1188,6 +1191,8 @@ void GameConnection::readPacket(BitStream *bstream)
|
|||
else
|
||||
setSelectedObj(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool hadFlash = mDamageFlash > 0 || mWhiteOut > 0;
|
||||
mDamageFlash = 0;
|
||||
mWhiteOut = 0;
|
||||
|
|
@ -1431,6 +1436,7 @@ void GameConnection::writePacket(BitStream *bstream, PacketNotify *note)
|
|||
// all the damage flash & white out
|
||||
|
||||
S32 gIndex = -1;
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
if (mChangedSelectedObj)
|
||||
{
|
||||
S32 gidx;
|
||||
|
|
@ -1459,6 +1465,7 @@ void GameConnection::writePacket(BitStream *bstream, PacketNotify *note)
|
|||
}
|
||||
else
|
||||
bstream->writeFlag(false);
|
||||
#endif
|
||||
|
||||
if (!mControlObject.isNull())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -385,7 +385,8 @@ protected:
|
|||
DECLARE_CALLBACK( void, setLagIcon, (bool state) );
|
||||
DECLARE_CALLBACK( void, onDataBlocksDone, (U32 sequence) );
|
||||
DECLARE_CALLBACK( void, onFlash, (bool state) );
|
||||
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
// GameConnection is modified to keep track of object selections which are used in
|
||||
// spell targeting. This code stores the current object selection as well as the
|
||||
// current rollover object beneath the cursor. The rollover object is treated as a
|
||||
|
|
@ -415,7 +416,7 @@ private:
|
|||
public:
|
||||
bool isZonedIn() const { return zoned_in; }
|
||||
void setZonedIn() { zoned_in = true; }
|
||||
|
||||
#endif
|
||||
#ifdef AFX_CAP_DATABLOCK_CACHE
|
||||
private:
|
||||
static StringTableEntry server_cache_filename;
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@
|
|||
#include "T3D/physics/physicsPlugin.h"
|
||||
#include "T3D/physics/physicsBody.h"
|
||||
#include "T3D/physics/physicsCollision.h"
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
#include "afx/ce/afxZodiacMgr.h"
|
||||
#endif
|
||||
|
||||
/// Minimum square size allowed. This is a cheap way to limit the amount
|
||||
/// of geometry possibly generated by the GroundPlane (vertex buffers have a
|
||||
|
|
@ -362,8 +363,9 @@ void GroundPlane::prepRenderImage( SceneRenderState* state )
|
|||
createGeometry( state->getCullingFrustum() );
|
||||
if( mVertexBuffer.isNull() )
|
||||
return;
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
afxZodiacMgr::renderGroundPlaneZodiacs(state, this);
|
||||
#endif
|
||||
// Add a render instance.
|
||||
|
||||
RenderPassManager* pass = state->getRenderPass();
|
||||
|
|
|
|||
|
|
@ -58,8 +58,9 @@
|
|||
using namespace Torque;
|
||||
|
||||
extern bool gEditingMission;
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
#include "afx/ce/afxZodiacMgr.h"
|
||||
#endif
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(TSStatic);
|
||||
|
||||
|
|
@ -136,7 +137,9 @@ TSStatic::TSStatic()
|
|||
mHasGradients = false;
|
||||
mInvertGradientRange = false;
|
||||
mGradientRangeUser.set(0.0f, 180.0f);
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
afxZodiacData::convertGradientRangeFromDegrees(mGradientRange, mGradientRangeUser);
|
||||
#endif
|
||||
}
|
||||
|
||||
TSStatic::~TSStatic()
|
||||
|
|
@ -721,9 +724,10 @@ void TSStatic::prepRenderImage( SceneRenderState* state )
|
|||
}
|
||||
}
|
||||
mShapeInstance->render( rdata );
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
if (!mIgnoreZodiacs && mDecalDetailsPtr != 0)
|
||||
afxZodiacMgr::renderPolysoupZodiacs(state, this);
|
||||
#endif
|
||||
if ( mRenderNormalScalar > 0 )
|
||||
{
|
||||
ObjectRenderInst *ri = state->getRenderPass()->allocInst<ObjectRenderInst>();
|
||||
|
|
@ -1399,11 +1403,13 @@ void TSStatic::set_special_typing()
|
|||
|
||||
void TSStatic::onStaticModified(const char* slotName, const char*newValue)
|
||||
{
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
if (slotName == afxZodiacData::GradientRangeSlot)
|
||||
{
|
||||
afxZodiacData::convertGradientRangeFromDegrees(mGradientRange, mGradientRangeUser);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
set_special_typing();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,9 @@
|
|||
#include "T3D/physics/physicsBody.h"
|
||||
#include "T3D/physics/physicsCollision.h"
|
||||
#include "environment/nodeListManager.h"
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
#include "afx/ce/afxZodiacMgr.h"
|
||||
#endif
|
||||
|
||||
#define MIN_METERS_PER_SEGMENT 1.0f
|
||||
#define MIN_NODE_DEPTH 0.25f
|
||||
|
|
@ -829,7 +830,9 @@ void MeshRoad::prepRenderImage( SceneRenderState* state )
|
|||
// otherwise obey the smShowRoad flag
|
||||
if ( smShowRoad || !smEditorOpen )
|
||||
{
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
afxZodiacMgr::renderMeshRoadZodiacs(state, this);
|
||||
#endif
|
||||
MeshRenderInst coreRI;
|
||||
coreRI.clear();
|
||||
coreRI.objectToWorld = &MatrixF::Identity;
|
||||
|
|
|
|||
|
|
@ -52,8 +52,9 @@
|
|||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
#include "afx/arcaneFX.h"
|
||||
#endif
|
||||
#include "afx/ce/afxZodiacMgr.h"
|
||||
#endif
|
||||
|
||||
#include "gfx/gfxTransformSaver.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "gfx/bitmap/ddsFile.h"
|
||||
|
|
@ -430,7 +431,9 @@ void TerrainBlock::_renderBlock( SceneRenderState *state )
|
|||
if ( isColorDrawPass )
|
||||
lm = LIGHTMGR;
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
bool has_zodiacs = afxZodiacMgr::doesBlockContainZodiacs(state, this);
|
||||
#endif
|
||||
for ( U32 i=0; i < renderCells.size(); i++ )
|
||||
{
|
||||
TerrCell *cell = renderCells[i];
|
||||
|
|
@ -492,10 +495,11 @@ void TerrainBlock::_renderBlock( SceneRenderState *state )
|
|||
}
|
||||
|
||||
inst->defaultKey = (U32)cell->getMaterials();
|
||||
|
||||
#ifdef TORQUE_AFX_ENABLED
|
||||
if (has_zodiacs)
|
||||
afxZodiacMgr::renderTerrainZodiacs(state, this, cell);
|
||||
// Submit it for rendering.
|
||||
#endif
|
||||
renderPass->addInst( inst );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue