This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void PlatformWindowSDL::setVideoMode( const GFXVideoMode &mode ) | |
{ | |
mVideoMode = mode; | |
mSuppressReset = true; | |
// Set our window to have the right style based on the mode | |
if(mode.fullScreen && !Platform::getWebDeployment() && !mOffscreenRender) | |
{ | |
setSize(mode.resolution); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datablock afxPlayerMovementData(SpeedUp_CE) | |
{ | |
speedBias = 1; | |
movement = "$$ %%._speed"; | |
movementOp = "multiply"; | |
}; | |
datablock afxEffectWrapperData(SpeedUp_EW) | |
{ | |
effect = SpeedUp_CE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool AIPlayer::getAIMove(Move *movePtr) | |
{ | |
if (mFalling) return true; | |
*movePtr = NullMove; | |
// Use the eye as the current position. | |
MatrixF eye; | |
getEyeTransform(&eye); | |
Point3F location = eye.getPosition(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define cb_zThickness 2 // thickness to ascribe to each pixel in the depth buffer | |
#define cb_nearPlaneZ 0.01 // the camera's near z plane | |
#define cb_stride 2 // Step in horizontal or vertical pixels between samples. This is a float | |
// because integer math is slow on GPUs, but should be set to an integer >= 1. | |
#define cb_maxSteps 10 // Maximum number of iterations. Higher gives better images but may be slow. | |
#define cb_maxDistance 0.9999 // Maximum camera-space distance to trace before returning a miss. | |
#define cb_strideZCutoff 0.5 // More distant pixels are smaller in screen space. This value tells at what point to | |
// start relaxing the stride to give higher quality reflections for objects far from | |
// the camera. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GFXCubemap* GFXTextureManager::createCubemap( const Torque::Path &path ) | |
{ | |
// Very first thing... check the cache. | |
CubemapTable::Iterator iter = mCubemapTable.find( path.getFullPath() ); | |
if ( iter != mCubemapTable.end() ) | |
return iter->value; | |
// Not in the cache... we have to load it ourselves. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(%i = 0; %i < 20; %i++) | |
{ | |
%obj = objective @ %i; | |
if (isObject(%obj)) | |
{ | |
%db = %obj.getDatablock(); | |
eval("$tempval = theLevelInfo.objective" @ %i @"["@ %roundCount @"];"); | |
%targ = $tempval; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Projectile::simulate( F32 dt ) | |
{ | |
if ( mHasExploded ) | |
return; | |
// ... otherwise, we have to do some simulation work. | |
RayInfo rInfo; | |
Point3F oldPosition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
singleton Material(TerrainFX_grass1) | |
{ | |
mapTo = "grass1"; | |
footstepSoundId = "4"; | |
terrainMaterials = "1"; | |
ShowDust = "1"; | |
showFootprints = "1"; | |
materialTag0 = "Terrain"; | |
effectColor[0] = "0.42 0.42 0 1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find all "clientscenegraph", Subfolders, Find Results 1, Entire Solution, "" | |
\Engine\source\afx\ce\afxModel.cpp(566): gClientSceneGraph->addObjectToScene(this); | |
\Engine\source\afx\ce\afxParticleEmitter.cpp(1012): gClientSceneGraph->addObjectToScene(this); | |
\Engine\source\afx\ui\afxGuiTextHud.cpp(133): F32 visDistance = gClientSceneGraph->getVisibleDistance(); | |
\Engine\source\afx\afxConstraint.cpp(1037): SceneManager* sg = (on_server) ? gServerSceneGraph : gClientSceneGraph; | |
\Engine\source\environment\VolumetricFogRTManager.cpp(49): gClientSceneGraph->addObjectToScene(gVolumetricFogRTManager); | |
\Engine\source\environment\VolumetricFogRTManager.cpp(54): gClientSceneGraph->removeObjectFromScene(gVolumetricFogRTManager); | |
\Engine\source\gui\3d\guiTSControl.cpp(404): gClientSceneGraph->setDisplayTargetResolution(renderSize); | |
\Engine\source\gui\3d\guiTSControl.cpp(424): gClientSceneGraph->setNonClipProjection(mSaveProjection); | |
\Engine\source\gui\controls\guiMaterialCtrl.cpp(147): gClientSceneGrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------------------- | |
F32 Projectile::getUpdatePriority(CameraScopeQuery *camInfo, U32 updateMask, S32 updateSkips) | |
{ | |
F32 ret = Parent::getUpdatePriority(camInfo, updateMask, updateSkips); | |
ret++; <<------------------------------------------------------------------------ massively up relative priority. bullets hurt | |
// if the camera "owns" this object, it should have a slightly higher priority | |
if(mSourceObject == camInfo->camera) | |
return ret + 0.2; | |
return ret; |