From 46ffb3455bd4fac75027c0f1fc7926e541a90959 Mon Sep 17 00:00:00 2001 From: LuisAntonRebollo Date: Sat, 4 Oct 2014 11:20:43 +0200 Subject: [PATCH 1/4] Fixed OPCODE problems with x64. --- Engine/lib/opcode/OPC_AABBTree.cpp | 10 +++++----- Engine/lib/opcode/OPC_AABBTree.h | 6 +++--- Engine/lib/opcode/OPC_OptimizedTree.cpp | 14 +++++++------- Engine/lib/opcode/OPC_OptimizedTree.h | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Engine/lib/opcode/OPC_AABBTree.cpp b/Engine/lib/opcode/OPC_AABBTree.cpp index 0ad32a6e10..7da56c2f7a 100644 --- a/Engine/lib/opcode/OPC_AABBTree.cpp +++ b/Engine/lib/opcode/OPC_AABBTree.cpp @@ -291,21 +291,21 @@ bool AABBTreeNode::Subdivide(AABBTreeBuilder* builder) // Set last bit to tell it shouldn't be freed ### pretty ugly, find a better way. Maybe one bit in mNbPrimitives ASSERT(!(udword(&Pool[Count+0])&1)); ASSERT(!(udword(&Pool[Count+1])&1)); - mPos = udword(&Pool[Count+0])|1; + mPos = size_t(&Pool[Count+0])|1; #ifndef OPC_NO_NEG_VANILLA_TREE - mNeg = udword(&Pool[Count+1])|1; + mNeg = size_t(&Pool[Count+1])|1; #endif } else { // Non-complete trees and/or Opcode 1.2 allocate nodes on-the-fly #ifndef OPC_NO_NEG_VANILLA_TREE - mPos = (udword)new AABBTreeNode; CHECKALLOC(mPos); - mNeg = (udword)new AABBTreeNode; CHECKALLOC(mNeg); + mPos = (size_t)new AABBTreeNode; CHECKALLOC(mPos); + mNeg = (size_t)new AABBTreeNode; CHECKALLOC(mNeg); #else AABBTreeNode* PosNeg = new AABBTreeNode[2]; CHECKALLOC(PosNeg); - mPos = (udword)PosNeg; + mPos = (size_t)PosNeg; #endif } diff --git a/Engine/lib/opcode/OPC_AABBTree.h b/Engine/lib/opcode/OPC_AABBTree.h index 298f4827a2..ee2533db66 100644 --- a/Engine/lib/opcode/OPC_AABBTree.h +++ b/Engine/lib/opcode/OPC_AABBTree.h @@ -43,7 +43,7 @@ /* Following data always belong to the BV-tree, regardless of what the tree actually contains.*/ \ /* Whatever happens we need the two children and the enclosing volume.*/ \ volume mBV; /* Global bounding-volume enclosing all the node-related primitives */ \ - udword mPos; /* "Positive" & "Negative" children */ + size_t mPos; /* "Positive" & "Negative" children */ #else //! TO BE DOCUMENTED #define IMPLEMENT_TREE(base_class, volume) \ @@ -68,8 +68,8 @@ /* Following data always belong to the BV-tree, regardless of what the tree actually contains.*/ \ /* Whatever happens we need the two children and the enclosing volume.*/ \ volume mBV; /* Global bounding-volume enclosing all the node-related primitives */ \ - udword mPos; /* "Positive" child */ \ - udword mNeg; /* "Negative" child */ + size_t mPos; /* "Positive" child */ \ + size_t mNeg; /* "Negative" child */ #endif typedef void (*CullingCallback) (udword nb_primitives, udword* node_primitives, BOOL need_clipping, void* user_data); diff --git a/Engine/lib/opcode/OPC_OptimizedTree.cpp b/Engine/lib/opcode/OPC_OptimizedTree.cpp index 81b3a2462e..0779795c41 100644 --- a/Engine/lib/opcode/OPC_OptimizedTree.cpp +++ b/Engine/lib/opcode/OPC_OptimizedTree.cpp @@ -118,7 +118,7 @@ static void _BuildCollisionTree(AABBCollisionNode* linear, const udword box_id, udword PosID = current_id++; // Get a new id for positive child udword NegID = current_id++; // Get a new id for negative child // Setup box data as the forthcoming new P pointer - linear[box_id].mData = (udword)&linear[PosID]; + linear[box_id].mData = (size_t)&linear[PosID]; // Make sure it's not marked as leaf ASSERT(!(linear[box_id].mData&1)); // Recurse with new IDs @@ -171,7 +171,7 @@ static void _BuildNoLeafTree(AABBNoLeafNode* linear, const udword box_id, udword // Get a new id for positive child udword PosID = current_id++; // Setup box data - linear[box_id].mPosData = (udword)&linear[PosID]; + linear[box_id].mPosData = (size_t)&linear[PosID]; // Make sure it's not marked as leaf ASSERT(!(linear[box_id].mPosData&1)); // Recurse @@ -192,7 +192,7 @@ static void _BuildNoLeafTree(AABBNoLeafNode* linear, const udword box_id, udword // Get a new id for negative child udword NegID = current_id++; // Setup box data - linear[box_id].mNegData = (udword)&linear[NegID]; + linear[box_id].mNegData = (size_t)&linear[NegID]; // Make sure it's not marked as leaf ASSERT(!(linear[box_id].mNegData&1)); // Recurse @@ -549,8 +549,8 @@ bool AABBNoLeafTree::Walk(GenericWalkingCallback callback, void* user_data) cons if(!(Data&1)) \ { \ /* Compute box number */ \ - udword Nb = (Data - udword(Nodes))/Nodes[i].GetNodeSize(); \ - Data = udword(&mNodes[Nb]); \ + udword Nb = (Data - size_t(Nodes))/Nodes[i].GetNodeSize(); \ + Data = (size_t) &mNodes[Nb] ; \ } \ /* ...remapped */ \ mNodes[i].member = Data; @@ -612,7 +612,7 @@ bool AABBQuantizedTree::Build(AABBTree* tree) INIT_QUANTIZATION // Quantize - udword Data; + size_t Data; for(udword i=0;i Date: Sat, 4 Oct 2014 20:30:27 +1000 Subject: [PATCH 2/4] Fixed minor issues with Outpost level. * Black spots caused by wrongly named images. * HDR settings tweaked to be a bit brighter. --- .../Example/{grass1-dry.jpg => grass1_dry.jpg} | Bin .../Example/{grass1-dry_d.png => grass1_dry_d.png} | Bin Templates/Full/game/levels/Outpost.mis | 1 + Templates/Full/game/levels/Outpost.postfxpreset.cs | 4 ++-- 4 files changed, 3 insertions(+), 2 deletions(-) rename Templates/Full/game/art/terrains/Example/{grass1-dry.jpg => grass1_dry.jpg} (100%) rename Templates/Full/game/art/terrains/Example/{grass1-dry_d.png => grass1_dry_d.png} (100%) diff --git a/Templates/Full/game/art/terrains/Example/grass1-dry.jpg b/Templates/Full/game/art/terrains/Example/grass1_dry.jpg similarity index 100% rename from Templates/Full/game/art/terrains/Example/grass1-dry.jpg rename to Templates/Full/game/art/terrains/Example/grass1_dry.jpg diff --git a/Templates/Full/game/art/terrains/Example/grass1-dry_d.png b/Templates/Full/game/art/terrains/Example/grass1_dry_d.png similarity index 100% rename from Templates/Full/game/art/terrains/Example/grass1-dry_d.png rename to Templates/Full/game/art/terrains/Example/grass1_dry_d.png diff --git a/Templates/Full/game/levels/Outpost.mis b/Templates/Full/game/levels/Outpost.mis index 97c37c0aef..01c85c2f58 100644 --- a/Templates/Full/game/levels/Outpost.mis +++ b/Templates/Full/game/levels/Outpost.mis @@ -20,6 +20,7 @@ new SimGroup(MissionGroup) { soundDistanceModel = "Linear"; canSave = "1"; canSaveDynamicFields = "1"; + desc = "A \'one of everything\' test level that demonstrates lots of stock classes."; levelName = "Outpost"; }; new ScatterSky() { diff --git a/Templates/Full/game/levels/Outpost.postfxpreset.cs b/Templates/Full/game/levels/Outpost.postfxpreset.cs index a860946880..4a1d04b9ab 100644 --- a/Templates/Full/game/levels/Outpost.postfxpreset.cs +++ b/Templates/Full/game/levels/Outpost.postfxpreset.cs @@ -12,7 +12,7 @@ $PostFXManager::Settings::EnableHDR = "1"; $PostFXManager::Settings::EnableLightRays = "1"; $PostFXManager::Settings::EnablePostFX = "1"; -$PostFXManager::Settings::HDR::adaptRate = "2"; +$PostFXManager::Settings::HDR::adaptRate = "2.63846"; $PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27"; $PostFXManager::Settings::HDR::brightPassThreshold = "1"; $PostFXManager::Settings::HDR::enableBloom = "1"; @@ -21,7 +21,7 @@ $PostFXManager::Settings::HDR::gaussMean = "0"; $PostFXManager::Settings::HDR::gaussMultiplier = "0.3"; $PostFXManager::Settings::HDR::gaussStdDev = "0.8"; -$PostFXManager::Settings::HDR::keyValue = "0.18"; +$PostFXManager::Settings::HDR::keyValue = "0.244898"; $PostFXManager::Settings::HDR::minLuminace = "0.001"; $PostFXManager::Settings::HDR::whiteCutoff = "1"; $PostFXManager::Settings::LightRays::brightScalar = "0.75"; From a8d9f6c499144b666e07383e2caace1eae03ee40 Mon Sep 17 00:00:00 2001 From: Daniel Buckmaster Date: Mon, 6 Oct 2014 12:41:25 +1100 Subject: [PATCH 3/4] Fixed Full template art a bit. Player can now swim properly, and the physical zone elevator is a bit more helpful (i.e. it sends you to the landing rather than leaving you floating in midair). Fiddled some more with PostFX settings. --- Templates/Full/game/art/datablocks/player.cs | 1 + Templates/Full/game/levels/Outpost.mis | 23 ++++++++++---- .../Full/game/levels/Outpost.postfxpreset.cs | 30 +++++++++---------- 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/Templates/Full/game/art/datablocks/player.cs b/Templates/Full/game/art/datablocks/player.cs index a942f23de9..27933628c3 100644 --- a/Templates/Full/game/art/datablocks/player.cs +++ b/Templates/Full/game/art/datablocks/player.cs @@ -544,6 +544,7 @@ datablock PlayerData(DefaultPlayerData) maxCrouchBackwardSpeed = 2.0; maxCrouchSideSpeed = 2.0; + swimForce = 4320; maxUnderwaterForwardSpeed = 8.4; maxUnderwaterBackwardSpeed = 7.8; maxUnderwaterSideSpeed = 4.0; diff --git a/Templates/Full/game/levels/Outpost.mis b/Templates/Full/game/levels/Outpost.mis index 01c85c2f58..df29dd7ec0 100644 --- a/Templates/Full/game/levels/Outpost.mis +++ b/Templates/Full/game/levels/Outpost.mis @@ -29,7 +29,7 @@ new SimGroup(MissionGroup) { colorizeAmount = "0"; colorize = "0 0 0 1"; rayleighScattering = "0.0035"; - sunScale = "1 1 1 1"; + sunScale = "0.972549 0.996078 0.788235 1"; ambientScale = "1 1 1 1"; fogScale = "1 1 1 1"; exposure = "1"; @@ -51,7 +51,7 @@ new SimGroup(MissionGroup) { nightCubemap = "nightCubemap"; attenuationRatio = "0 1 1"; shadowType = "PSSM"; - texSize = "512"; + texSize = "1024"; overDarkFactor = "2000 1000 500 100"; shadowDistance = "400"; shadowSoftness = "0.15"; @@ -73,11 +73,11 @@ new SimGroup(MissionGroup) { axisTilt = "23.44"; dayLength = "120"; startTime = "0.1"; - time = "0.153243"; + time = "0.756599"; play = "1"; azimuthOverride = "1"; dayScale = "1"; - nightScale = "2"; + nightScale = "3"; position = "-182.594 54.5451 536.878"; rotation = "1 0 0 0"; scale = "1 1 1"; @@ -1229,9 +1229,9 @@ new SimGroup(MissionGroup) { gravityMod = "-1"; appliedForce = "0 0 0"; polyhedron = "-0.5000000 0.5000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000"; - position = "-75.81 34.2165 245.724"; + position = "-75.81 34.2165 245.552"; rotation = "1 0 0 0"; - scale = "4.70489 4.32539 20.7358"; + scale = "4.70489 4.32539 16.1481"; canSave = "1"; canSaveDynamicFields = "1"; }; @@ -1292,5 +1292,16 @@ new SimGroup(MissionGroup) { canSave = "1"; canSaveDynamicFields = "1"; }; + new PhysicalZone() { + velocityMod = "1"; + gravityMod = "0.5"; + appliedForce = "-2500 0 0"; + polyhedron = "-0.5000000 0.5000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 -1.0000000 0.0000000 0.0000000 0.0000000 1.0000000"; + position = "-79.5161 34.0702 259.951"; + rotation = "1 0 0 0"; + scale = "11.8676 3.54503 7.79052"; + canSave = "1"; + canSaveDynamicFields = "1"; + }; }; //--- OBJECT WRITE END --- diff --git a/Templates/Full/game/levels/Outpost.postfxpreset.cs b/Templates/Full/game/levels/Outpost.postfxpreset.cs index 4a1d04b9ab..bec904f6a3 100644 --- a/Templates/Full/game/levels/Outpost.postfxpreset.cs +++ b/Templates/Full/game/levels/Outpost.postfxpreset.cs @@ -12,34 +12,34 @@ $PostFXManager::Settings::EnableHDR = "1"; $PostFXManager::Settings::EnableLightRays = "1"; $PostFXManager::Settings::EnablePostFX = "1"; -$PostFXManager::Settings::HDR::adaptRate = "2.63846"; +$PostFXManager::Settings::HDR::adaptRate = "1.31846"; $PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27"; -$PostFXManager::Settings::HDR::brightPassThreshold = "1"; +$PostFXManager::Settings::HDR::brightPassThreshold = "0.631579"; $PostFXManager::Settings::HDR::enableBloom = "1"; $PostFXManager::Settings::HDR::enableBlueShift = "0"; $PostFXManager::Settings::HDR::enableToneMapping = "1"; -$PostFXManager::Settings::HDR::gaussMean = "0"; -$PostFXManager::Settings::HDR::gaussMultiplier = "0.3"; +$PostFXManager::Settings::HDR::gaussMean = "0.0526316"; +$PostFXManager::Settings::HDR::gaussMultiplier = "0.31746"; $PostFXManager::Settings::HDR::gaussStdDev = "0.8"; -$PostFXManager::Settings::HDR::keyValue = "0.244898"; +$PostFXManager::Settings::HDR::keyValue = "0.321429"; $PostFXManager::Settings::HDR::minLuminace = "0.001"; $PostFXManager::Settings::HDR::whiteCutoff = "1"; $PostFXManager::Settings::LightRays::brightScalar = "0.75"; -$PostFXManager::Settings::SSAO::blurDepthTol = "0.001"; -$PostFXManager::Settings::SSAO::blurNormalTol = "0.95"; -$PostFXManager::Settings::SSAO::lDepthMax = "2"; -$PostFXManager::Settings::SSAO::lDepthMin = "0.2"; +$PostFXManager::Settings::SSAO::blurDepthTol = "0.00149254"; +$PostFXManager::Settings::SSAO::blurNormalTol = "0.886139"; +$PostFXManager::Settings::SSAO::lDepthMax = "1.82464"; +$PostFXManager::Settings::SSAO::lDepthMin = "0.21327"; $PostFXManager::Settings::SSAO::lDepthPow = "0.2"; $PostFXManager::Settings::SSAO::lNormalPow = "2"; $PostFXManager::Settings::SSAO::lNormalTol = "-0.5"; -$PostFXManager::Settings::SSAO::lRadius = "1"; -$PostFXManager::Settings::SSAO::lStrength = "10"; -$PostFXManager::Settings::SSAO::overallStrength = "2"; -$PostFXManager::Settings::SSAO::quality = "0"; +$PostFXManager::Settings::SSAO::lRadius = "1.58836"; +$PostFXManager::Settings::SSAO::lStrength = "7.96209"; +$PostFXManager::Settings::SSAO::overallStrength = "1.49254"; +$PostFXManager::Settings::SSAO::quality = "1"; $PostFXManager::Settings::SSAO::sDepthMax = "1"; $PostFXManager::Settings::SSAO::sDepthMin = "0.1"; $PostFXManager::Settings::SSAO::sDepthPow = "1"; $PostFXManager::Settings::SSAO::sNormalPow = "1"; $PostFXManager::Settings::SSAO::sNormalTol = "0"; -$PostFXManager::Settings::SSAO::sRadius = "0.1"; -$PostFXManager::Settings::SSAO::sStrength = "6"; +$PostFXManager::Settings::SSAO::sRadius = "1.7542"; +$PostFXManager::Settings::SSAO::sStrength = "6.4455"; From 06a4db295aeadd5635b6c36c215e625872d22386 Mon Sep 17 00:00:00 2001 From: Daniel Buckmaster Date: Mon, 6 Oct 2014 14:51:39 +1100 Subject: [PATCH 4/4] Bump version to 3.6.1. --- Engine/source/app/version.h | 4 ++-- README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Engine/source/app/version.h b/Engine/source/app/version.h index ab035793d7..963fd452e2 100644 --- a/Engine/source/app/version.h +++ b/Engine/source/app/version.h @@ -41,10 +41,10 @@ /// code version, the game name, and which type of game it is (TGB, TGE, TGEA, etc.). /// /// Version number is major * 1000 + minor * 100 + revision * 10. -#define TORQUE_GAME_ENGINE 3600 +#define TORQUE_GAME_ENGINE 3610 /// Human readable engine version string. -#define TORQUE_GAME_ENGINE_VERSION_STRING "3.6" +#define TORQUE_GAME_ENGINE_VERSION_STRING "3.6.1" /// Gets the engine version number. The version number is specified as a global in version.cc U32 getVersionNumber(); diff --git a/README.md b/README.md index 412e858ff2..be83ee28c7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Torque 3D v3.6 +Torque 3D v3.6.1 ================ MIT Licensed Open Source version of [Torque 3D](http://www.garagegames.com/products/torque-3d) from [GarageGames](http://www.garagegames.com) @@ -21,7 +21,7 @@ Pre-compiled Version In addition to GitHub we also have a couple of pre-packaged files for you to download if you would prefer to not compile the code yourself: -* [Complete Torque 3D 3.6 zip package](http://mit.garagegames.com/Torque3D-3-6.zip) with updated TorqueScript documentation, the *Project Manager*, and compiled versions of the templates. +* [Complete Torque 3D 3.6.1 zip package](http://mit.garagegames.com/Torque3D-3-6-1.zip) with updated TorqueScript documentation, the *Project Manager*, and compiled versions of the templates. * [Torque 3D Project Manager v2.1](http://mit.garagegames.com/T3DProjectManager-2-1.zip) on its own for use in your T3D forks. If you're looking for an older release see the [Torque 3D Archive](https://github.com/GarageGames/Torque3D/wiki/Torque-3D-Archive)