Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Engine/source/T3D/components/game/triggerComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@

#include "gfx/sim/debugDraw.h"

IMPLEMENT_CALLBACK( TriggerComponent, onEnterViewCmd, void,
IMPLEMENT_CALLBACK( TriggerComponent, onEnterView, void,
( Entity* cameraEnt, bool firstTimeSeeing ), ( cameraEnt, firstTimeSeeing ),
"@brief Called when an object enters the volume of the Trigger instance using this TriggerData.\n\n"

"@param trigger the Trigger instance whose volume the object entered\n"
"@param obj the object that entered the volume of the Trigger instance\n" );

IMPLEMENT_CALLBACK( TriggerComponent, onExitViewCmd, void,
IMPLEMENT_CALLBACK( TriggerComponent, onExitView, void,
( Entity* cameraEnt ), ( cameraEnt ),
"@brief Called when an object enters the volume of the Trigger instance using this TriggerData.\n\n"

"@param trigger the Trigger instance whose volume the object entered\n"
"@param obj the object that entered the volume of the Trigger instance\n" );

IMPLEMENT_CALLBACK( TriggerComponent, onUpdateInViewCmd, void,
IMPLEMENT_CALLBACK( TriggerComponent, onUpdateInView, void,
( Entity* cameraEnt ), ( cameraEnt ),
"@brief Called when an object enters the volume of the Trigger instance using this TriggerData.\n\n"

"@param trigger the Trigger instance whose volume the object entered\n"
"@param obj the object that entered the volume of the Trigger instance\n" );

IMPLEMENT_CALLBACK( TriggerComponent, onUpdateOutOfViewCmd, void,
IMPLEMENT_CALLBACK( TriggerComponent, onUpdateOutOfView, void,
( Entity* cameraEnt ), ( cameraEnt ),
"@brief Called when an object enters the volume of the Trigger instance using this TriggerData.\n\n"

Expand Down
8 changes: 4 additions & 4 deletions Engine/source/T3D/components/game/triggerComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class TriggerComponent : public Component

void visualizeFrustums(F32 renderTimeMS);

DECLARE_CALLBACK(void, onEnterViewCmd, (Entity* cameraEnt, bool firstTimeSeeing));
DECLARE_CALLBACK(void, onExitViewCmd, (Entity* cameraEnt));
DECLARE_CALLBACK(void, onUpdateInViewCmd, (Entity* cameraEnt));
DECLARE_CALLBACK(void, onUpdateOutOfViewCmd, (Entity* cameraEnt));
DECLARE_CALLBACK(void, onEnterView, (Entity* cameraEnt, bool firstTimeSeeing));
DECLARE_CALLBACK(void, onExitView, (Entity* cameraEnt));
DECLARE_CALLBACK(void, onUpdateInView, (Entity* cameraEnt));
DECLARE_CALLBACK(void, onUpdateOutOfView, (Entity* cameraEnt));
};

#endif // _EXAMPLEBEHAVIOR_H_
3 changes: 3 additions & 0 deletions Engine/source/T3D/trigger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ bool Trigger::castRay(const Point3F &start, const Point3F &end, RayInfo* info)
DECLARE_STRUCT( Polyhedron );
IMPLEMENT_STRUCT( Polyhedron, Polyhedron,,
"" )
FIELD(mPointList, mPointList, 1, "")
FIELD(mPlaneList, mPlaneList, 1, "")
FIELD(mEdgeList, mEdgeList, 1, "")
END_IMPLEMENT_STRUCT;
ConsoleType(floatList, TypeTriggerPolyhedron, Polyhedron, "")

Expand Down
8 changes: 4 additions & 4 deletions Engine/source/T3D/vehicles/guiSpeedometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GuiSpeedometerHud : public GuiBitmapCtrl
F32 mMaxAngle; ///< Max pos of needle
F32 mMinAngle; ///< Min pos of needle
Point2F mCenter; ///< Center of needle rotation
LinearColorF mColor; ///< Needle Color
LinearColorF mNeedleColor; ///< Needle Color
F32 mNeedleLength;
F32 mNeedleWidth;
F32 mTailLength;
Expand Down Expand Up @@ -103,7 +103,7 @@ GuiSpeedometerHud::GuiSpeedometerHud()
mNeedleWidth = 3;
mNeedleLength = 10;
mTailLength = 5;
mColor.set(1,0,0,1);
mNeedleColor.set(1,0,0,1);
}

void GuiSpeedometerHud::initPersistFields()
Expand All @@ -122,7 +122,7 @@ void GuiSpeedometerHud::initPersistFields()
"Angle (in radians) of the needle when the Vehicle speed is >= maxSpeed. "
"An angle of 0 points right, 90 points up etc)." );

addField("color", TypeColorF, Offset( mColor, GuiSpeedometerHud ),
addField("needleColor", TypeColorF, Offset( mNeedleColor, GuiSpeedometerHud ),
"Color of the needle" );

addField("center", TypePoint2F, Offset( mCenter, GuiSpeedometerHud ),
Expand Down Expand Up @@ -210,7 +210,7 @@ void GuiSpeedometerHud::onRender(Point2I offset, const RectI &updateRect)
GFX->setTexture(0, NULL);

// Render the needle
PrimBuild::color4f(mColor.red, mColor.green, mColor.blue, mColor.alpha);
PrimBuild::color4f(mNeedleColor.red, mNeedleColor.green, mNeedleColor.blue, mNeedleColor.alpha);
PrimBuild::begin(GFXLineStrip, 5);
for(int k=0; k<5; k++){
rotMatrix.mulP(vertList[k]);
Expand Down
2 changes: 1 addition & 1 deletion Engine/source/afx/afxEffectGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void afxEffectGroupData::initPersistFields()
// for each of these, dummy_fx_entry is set and then a validator adds it to the appropriate effects list
static egValidator emptyValidator(0);

addFieldV("addEffect", TYPEID<afxEffectBaseData>(), myOffset(dummy_fx_entry), &emptyValidator,
addFieldV("effect", TYPEID<afxEffectBaseData>(), myOffset(dummy_fx_entry), &emptyValidator,
"...");

Parent::initPersistFields();
Expand Down
2 changes: 1 addition & 1 deletion Engine/source/afx/afxEffectron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void afxEffectronData::initPersistFields()
// for each of these, dummy_fx_entry is set and then a validator adds it to the appropriate effects list
static ewValidator emptyValidator(0);

addFieldV("addEffect", TYPEID<afxEffectBaseData>(), myOffset(dummy_fx_entry), &emptyValidator,
addFieldV("effect", TYPEID<afxEffectBaseData>(), myOffset(dummy_fx_entry), &emptyValidator,
"...");

Parent::initPersistFields();
Expand Down
10 changes: 5 additions & 5 deletions Engine/source/afx/afxMagicSpell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void afxMagicSpellData::initPersistFields()
"...");
addField("extraCastingTime", TypeF32, myOffset(mExtra_casting_time),
"...");
addFieldV("addCastingEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_castingPhrase,
addFieldV("castingEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_castingPhrase,
"...");
endGroup("Casting Stage");

Expand All @@ -236,9 +236,9 @@ void afxMagicSpellData::initPersistFields()
"...");
addField("extraDeliveryTime", TypeF32, myOffset(mExtra_delivery_time),
"...");
addFieldV("addLaunchEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_launchPhrase,
addFieldV("launchEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_launchPhrase,
"...");
addFieldV("addDeliveryEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_deliveryPhrase,
addFieldV("deliveryEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_deliveryPhrase,
"...");
endGroup("Delivery Stage");

Expand All @@ -249,9 +249,9 @@ void afxMagicSpellData::initPersistFields()
"...");
addField("extraLingerTime", TypeF32, myOffset(mExtra_linger_time),
"...");
addFieldV("addImpactEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_impactPhrase,
addFieldV("impactEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_impactPhrase,
"...");
addFieldV("addLingerEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_lingerPhrase,
addFieldV("lingerEffect", TYPEID<afxEffectBaseData>(), Offset(mDummy_fx_entry, afxMagicSpellData), &_lingerPhrase,
"...");
endGroup("Linger Stage");

Expand Down
2 changes: 2 additions & 0 deletions Engine/source/afx/arcaneFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,8 @@ DefineEngineMethod(NetConnection, ResolveGhost, S32, (int ghostIndex),,

IMPLEMENT_STRUCT( ByteRange, ByteRange,,
"" )
FIELD(low, low, 1, "")
FIELD(high, high, 1, "")
END_IMPLEMENT_STRUCT;

ConsoleType( ByteRange, TypeByteRange, ByteRange, "")
Expand Down
2 changes: 1 addition & 1 deletion Engine/source/afx/ce/afxPhraseEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void afxPhraseEffectData::initPersistFields()
// effect lists
// for each of these, dummy_fx_entry is set and then a validator adds it to the appropriate effects list
static ewValidator emptyValidator(0);
addFieldV("addEffect", TYPEID< afxEffectBaseData >(), myOffset(dummy_fx_entry), &emptyValidator,
addFieldV("effect", TYPEID< afxEffectBaseData >(), myOffset(dummy_fx_entry), &emptyValidator,
"A field macro which adds an effect wrapper datablock to a list of effects associated "
"with the phrase-effect's single phrase. Unlike other fields, addEffect follows an "
"unusual syntax. Order is important since the effects will resolve in the order they "
Expand Down
4 changes: 2 additions & 2 deletions Engine/source/cinterface/c_consoleInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

namespace Con
{
DefineNewEngineFunction(AddConsumer, void, (ConsumerCallback cb), , "")
TORQUE_API void fnAddConsumer(ConsumerCallback cb)
{
addConsumer(cb);
}

DefineNewEngineFunction(RemoveConsumer, void, (ConsumerCallback cb), , "")
TORQUE_API void fnRemoveConsumer(ConsumerCallback cb)
{
removeConsumer(cb);
}
Expand Down
3 changes: 2 additions & 1 deletion Engine/source/cinterface/c_simobjectInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DefineNewEngineMethod(SimObject, RegisterObject, bool, (),,"")
{
return object->registerObject();
}

/*
DefineNewEngineMethod(SimObject, GetField, String, (String fieldName, String arrayIndex),, "")
{
return object->getDataField(StringTable->insert(fieldName), StringTable->insert(arrayIndex));
Expand All @@ -37,6 +37,7 @@ DefineNewEngineMethod(SimObject, SetField, void, (String fieldName, String array
{
object->setDataField(StringTable->insert(fieldName), StringTable->insert(arrayIndex), StringTable->insert(value));
}
*/

DefineNewEngineMethod(SimObject, CopyFrom, void, (SimObject* parent),, "")
{
Expand Down
10 changes: 6 additions & 4 deletions Engine/source/console/codeInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2178,14 +2178,16 @@ OPCodeReturn CodeInterpreter::op_callfunc(U32 &ip)

// ConsoleFunctionType is for any function defined by script.
// Any 'callback' type is an engine function that is exposed to script.
if (mNSEntry->mType == Namespace::Entry::ConsoleFunctionType
|| cFunctionRes)
if (cFunctionRes
|| (mNSEntry && mNSEntry->mType == Namespace::Entry::ConsoleFunctionType))
{
ConsoleValue retVal;
ConsoleValueRef ret;
if (cFunctionRes)
{
StringStackConsoleWrapper retVal(1, &cRetRes);
ret = retVal.argv[0];
retVal.init();
ret.value = &retVal;
retVal.setStackStringValue(cRetRes);
}
else if (mNSEntry->mFunctionOffset)
{
Expand Down
4 changes: 2 additions & 2 deletions Engine/source/console/consoleFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2144,14 +2144,14 @@ DefineEngineFunction( gotoWebPage, void, ( const char* address ),,

//-----------------------------------------------------------------------------

DefineEngineFunction( displaySplashWindow, bool, (const char* path), (""),
DefineEngineFunction( displaySplashWindow, bool, (String path), (""),
"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"
"@param path relative path to splash screen image to display.\n"
"@return True if the splash window could be successfully initialized.\n\n"
"@ingroup Platform" )
{
if (path == NULL || *path == '\0')
if (path.isEmpty())
{
path = Con::getVariable("$Core::splashWindowImage");
}
Expand Down
Loading