Merge pull request #1328 from GarageGames/release-3.7

Release 3.7
This commit is contained in:
Daniel Buckmaster 2015-06-24 19:00:57 +10:00
commit 39f0e269d6
48 changed files with 317 additions and 102 deletions

View file

@ -0,0 +1,85 @@
//Microsoft Developer Studio generated resource script.
//
#define IDI_ICON1 103
#define IDI_ICON2 107
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 108
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "windows.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON DISCARDABLE "torque.ico"
IDI_ICON2 ICON DISCARDABLE "torque.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""windows.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -252,7 +252,7 @@ function parseMissionGroupForIds( %className, %childGroup )
if( (%currentGroup).getObject(%i).getClassName() $= "SimGroup" )
%classIds = %classIds @ parseMissionGroupForIds( %className, (%currentGroup).getObject(%i).getId());
}
return %classIds;
return trim( %classIds );
}
//------------------------------------------------------------------------------

View file

@ -20,11 +20,13 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
$PostFXManager::Settings::EnableVignette = "0";
$PostFXManager::Settings::EnableDOF = "0";
$PostFXManager::Settings::EnabledSSAO = "0";
$PostFXManager::Settings::EnableHDR = "0";
$PostFXManager::Settings::EnableLightRays = "0";
$PostFXManager::Settings::EnablePostFX = "0";
$PostFXManager::Settings::Vignette::VMax = "0.6";
$PostFXManager::Settings::DOF::BlurCurveFar = "";
$PostFXManager::Settings::DOF::BlurCurveNear = "";
$PostFXManager::Settings::DOF::BlurMax = "";

View file

@ -298,6 +298,9 @@ function PostFXManager::settingsApplyFromPreset(%this)
$DOFPostFx::FocusRangeMax = $PostFXManager::Settings::DOF::FocusRangeMax;
$DOFPostFx::BlurCurveNear = $PostFXManager::Settings::DOF::BlurCurveNear;
$DOFPostFx::BlurCurveFar = $PostFXManager::Settings::DOF::BlurCurveFar;
//Vignette settings
$VignettePostEffect::VMax = $PostFXManager::Settings::Vignette::VMax;
if ( $PostFXManager::forceEnableFromPresets )
{
@ -392,6 +395,8 @@ function PostFXManager::settingsApplyDOF(%this)
function PostFXManager::settingsApplyVignette(%this)
{
$PostFXManager::Settings::Vignette::VMax = $VignettePostEffect::VMax;
postVerbose("% - PostFX Manager - Settings Saved - Vignette");
}

View file

@ -50,7 +50,9 @@ function ForestEditorGui::onActiveForestUpdated( %this, %forest, %createNew )
/// Called from a message box when a forest is not found.
function ForestEditorGui::createForest( %this )
{
if ( isObject( theForest ) )
%forestObject = parseMissionGroupForIds("Forest", "");
if ( isObject( %forestObject ) )
{
error( "Cannot create a second 'theForest' Forest!" );
return;
@ -64,8 +66,42 @@ function ForestEditorGui::createForest( %this )
};
MECreateUndoAction::submit( theForest );
ForestEditorInspector.inspect( theForest );
ForestEditorGui.setActiveForest( theForest );
//Re-initialize the editor settings so we can start using it immediately.
%tool = ForestEditorGui.getActiveTool();
if ( isObject( %tool ) )
%tool.onActivated();
if ( %tool == ForestTools->SelectionTool )
{
%mode = GlobalGizmoProfile.mode;
switch$ (%mode)
{
case "None":
ForestEditorSelectModeBtn.performClick();
case "Move":
ForestEditorMoveModeBtn.performClick();
case "Rotate":
ForestEditorRotateModeBtn.performClick();
case "Scale":
ForestEditorScaleModeBtn.performClick();
}
}
else if ( %tool == ForestTools->BrushTool )
{
%mode = ForestTools->BrushTool.mode;
switch$ (%mode)
{
case "Paint":
ForestEditorPaintModeBtn.performClick();
case "Erase":
ForestEditorEraseModeBtn.performClick();
case "EraseSelected":
ForestEditorEraseSelectedModeBtn.performClick();
}
}
EWorldEditor.isDirty = true;
}

View file

@ -141,6 +141,13 @@ function ForestEditorPlugin::onActivated( %this )
ForestEditorPropertiesWindow.setVisible( true );
ForestEditorGui.makeFirstResponder( true );
//ForestEditToolbar.setVisible( true );
//Get our existing forest object in our current mission if we have one
%forestObject = parseMissionGroupForIds("Forest", "");
if(isObject(%forestObject))
{
ForestEditorGui.setActiveForest(%forestObject.getName());
}
%this.map.push();
Parent::onActivated(%this);
@ -232,9 +239,27 @@ function ForestEditorPlugin::clearDirty( %this )
function ForestEditorPlugin::onSaveMission( %this, %missionFile )
{
ForestDataManager.saveDirty();
if ( isObject( theForest ) )
theForest.saveDataFile();
//First, find out if we have an existing forest object
%forestObject = parseMissionGroupForIds("Forest", "");
if ( isObject( %forestObject ) )
{
//We do. Next, see if we have a file already by polling the datafield.
if(%forestObject.dataFile !$= "")
{
//If we do, just save to the provided file.
%forestObject.saveDataFile(%forestObject.dataFile);
}
else
{
//We don't, so we'll save in the same place as the mission file and give it the missionpath\missionName.forest
//naming convention.
%path = filePath(%missionFile);
%missionName = fileBase(%missionFile);
%forestObject.saveDataFile(%path @ "/" @ %missionName @ ".forest");
}
}
ForestBrushGroup.save( "art/forest/brushes.cs" );
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

View file

@ -25,7 +25,7 @@
datablock TSForestItemData(ExampleForestMesh)
{
shapeFile = "art/shapes/trees/defaulttree/defaulttree.dae";
shapeFile = "art/shapes/trees/defaulttree/defaulttree.DAE";
internalName = "ExampleForestMesh";
windScale = "1";
trunkBendScale = "0.02";

View file

@ -252,7 +252,7 @@ function parseMissionGroupForIds( %className, %childGroup )
if( (%currentGroup).getObject(%i).getClassName() $= "SimGroup" )
%classIds = %classIds @ parseMissionGroupForIds( %className, (%currentGroup).getObject(%i).getId());
}
return %classIds;
return trim( %classIds );
}
//------------------------------------------------------------------------------

View file

@ -20,11 +20,13 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
$PostFXManager::Settings::EnableVignette = "0";
$PostFXManager::Settings::EnableDOF = "0";
$PostFXManager::Settings::EnabledSSAO = "0";
$PostFXManager::Settings::EnableHDR = "0";
$PostFXManager::Settings::EnableLightRays = "0";
$PostFXManager::Settings::EnablePostFX = "0";
$PostFXManager::Settings::Vignette::VMax = "0.6";
$PostFXManager::Settings::DOF::BlurCurveFar = "";
$PostFXManager::Settings::DOF::BlurCurveNear = "";
$PostFXManager::Settings::DOF::BlurMax = "";

View file

@ -298,6 +298,9 @@ function PostFXManager::settingsApplyFromPreset(%this)
$DOFPostFx::FocusRangeMax = $PostFXManager::Settings::DOF::FocusRangeMax;
$DOFPostFx::BlurCurveNear = $PostFXManager::Settings::DOF::BlurCurveNear;
$DOFPostFx::BlurCurveFar = $PostFXManager::Settings::DOF::BlurCurveFar;
//Vignette settings
$VignettePostEffect::VMax = $PostFXManager::Settings::Vignette::VMax;
if ( $PostFXManager::forceEnableFromPresets )
{
@ -392,6 +395,8 @@ function PostFXManager::settingsApplyDOF(%this)
function PostFXManager::settingsApplyVignette(%this)
{
$PostFXManager::Settings::Vignette::VMax = $VignettePostEffect::VMax;
postVerbose("% - PostFX Manager - Settings Saved - Vignette");
}

View file

@ -1040,7 +1040,7 @@ new SimGroup(MissionGroup) {
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
dataFile = "levels/outpost.forest";
dataFile = "levels/Outpost.forest";
lodReflectScalar = "2";
};
new WheeledVehicle() {
@ -1277,7 +1277,7 @@ new SimGroup(MissionGroup) {
};
};
new TSStatic() {
shapeName = "art/shapes/trees/defaulttree/defaulttree.dae";
shapeName = "art/shapes/trees/defaulttree/defaulttree.DAE";
playAmbient = "1";
meshCulling = "0";
originSort = "0";

View file

@ -7,6 +7,7 @@ $PostFXManager::Settings::DOF::EnableAutoFocus = "";
$PostFXManager::Settings::DOF::EnableDOF = "";
$PostFXManager::Settings::DOF::FocusRangeMax = "";
$PostFXManager::Settings::DOF::FocusRangeMin = "";
$PostFXManager::Settings::EnableVignette = "0";
$PostFXManager::Settings::EnableDOF = "1";
$PostFXManager::Settings::EnabledSSAO = "1";
$PostFXManager::Settings::EnableHDR = "1";

View file

@ -187,13 +187,14 @@ void main()
#endif // !NO_SHADOW
vec3 lightcol = lightColor.rgb;
#ifdef USE_COOKIE_TEX
// Lookup the cookie sample.
vec4 cookie = texture( cookieMap, tMul( viewToLightProj, -lightVec ) );
// Multiply the light with the cookie tex.
lightColor.rgb *= cookie.rgb;
lightcol *= cookie.rgb;
// Use a maximum channel luminance to attenuate
// the lighting else we get specular in the dark
@ -211,7 +212,7 @@ void main()
normalize( -eyeRay ) ) * lightBrightness * atten * shadowed;
float Sat_NL_Att = saturate( nDotL * atten * shadowed ) * lightBrightness;
vec3 lightColorOut = lightMapParams.rgb * lightColor.rgb;
vec3 lightColorOut = lightMapParams.rgb * lightcol;
vec4 addToResult = vec4(0.0);
// TODO: This needs to be removed when lightmapping is disabled

View file

@ -121,13 +121,14 @@ void main()
#endif // !NO_SHADOW
vec3 lightcol = lightColor.rgb;
#ifdef USE_COOKIE_TEX
// Lookup the cookie sample.
vec4 cookie = texture( cookieMap, shadowCoord );
// Multiply the light with the cookie tex.
lightColor.rgb *= cookie.rgb;
lightcol *= cookie.rgb;
// Use a maximum channel luminance to attenuate
// the lighting else we get specular in the dark
@ -145,7 +146,7 @@ void main()
normalize( -eyeRay ) ) * lightBrightness * atten * shadowed;
float Sat_NL_Att = saturate( nDotL * atten * shadowed ) * lightBrightness;
vec3 lightColorOut = lightMapParams.rgb * lightColor.rgb;
vec3 lightColorOut = lightMapParams.rgb * lightcol;
vec4 addToResult = vec4(0.0);
// TODO: This needs to be removed when lightmapping is disabled

View file

@ -192,13 +192,14 @@ float4 main( ConvexConnectP IN,
#endif // !NO_SHADOW
float3 lightcol = lightColor.rgb;
#ifdef USE_COOKIE_TEX
// Lookup the cookie sample.
float4 cookie = texCUBE( cookieMap, mul( viewToLightProj, -lightVec ) );
// Multiply the light with the cookie tex.
lightColor.rgb *= cookie.rgb;
lightcol *= cookie.rgb;
// Use a maximum channel luminance to attenuate
// the lighting else we get specular in the dark
@ -216,7 +217,7 @@ float4 main( ConvexConnectP IN,
normalize( -eyeRay ) ) * lightBrightness * atten * shadowed;
float Sat_NL_Att = saturate( nDotL * atten * shadowed ) * lightBrightness;
float3 lightColorOut = lightMapParams.rgb * lightColor.rgb;
float3 lightColorOut = lightMapParams.rgb * lightcol;
float4 addToResult = 0.0;
// TODO: This needs to be removed when lightmapping is disabled

View file

@ -120,13 +120,14 @@ float4 main( ConvexConnectP IN,
#endif // !NO_SHADOW
float3 lightcol = lightColor.rgb;
#ifdef USE_COOKIE_TEX
// Lookup the cookie sample.
float4 cookie = tex2D( cookieMap, shadowCoord );
// Multiply the light with the cookie tex.
lightColor.rgb *= cookie.rgb;
lightcol *= cookie.rgb;
// Use a maximum channel luminance to attenuate
// the lighting else we get specular in the dark
@ -144,7 +145,7 @@ float4 main( ConvexConnectP IN,
normalize( -eyeRay ) ) * lightBrightness * atten * shadowed;
float Sat_NL_Att = saturate( nDotL * atten * shadowed ) * lightBrightness;
float3 lightColorOut = lightMapParams.rgb * lightColor.rgb;
float3 lightColorOut = lightMapParams.rgb * lightcol;
float4 addToResult = 0.0;
// TODO: This needs to be removed when lightmapping is disabled

View file

@ -50,7 +50,9 @@ function ForestEditorGui::onActiveForestUpdated( %this, %forest, %createNew )
/// Called from a message box when a forest is not found.
function ForestEditorGui::createForest( %this )
{
if ( isObject( theForest ) )
%forestObject = parseMissionGroupForIds("Forest", "");
if ( isObject( %forestObject ) )
{
error( "Cannot create a second 'theForest' Forest!" );
return;
@ -64,8 +66,42 @@ function ForestEditorGui::createForest( %this )
};
MECreateUndoAction::submit( theForest );
ForestEditorInspector.inspect( theForest );
ForestEditorGui.setActiveForest( theForest );
//Re-initialize the editor settings so we can start using it immediately.
%tool = ForestEditorGui.getActiveTool();
if ( isObject( %tool ) )
%tool.onActivated();
if ( %tool == ForestTools->SelectionTool )
{
%mode = GlobalGizmoProfile.mode;
switch$ (%mode)
{
case "None":
ForestEditorSelectModeBtn.performClick();
case "Move":
ForestEditorMoveModeBtn.performClick();
case "Rotate":
ForestEditorRotateModeBtn.performClick();
case "Scale":
ForestEditorScaleModeBtn.performClick();
}
}
else if ( %tool == ForestTools->BrushTool )
{
%mode = ForestTools->BrushTool.mode;
switch$ (%mode)
{
case "Paint":
ForestEditorPaintModeBtn.performClick();
case "Erase":
ForestEditorEraseModeBtn.performClick();
case "EraseSelected":
ForestEditorEraseSelectedModeBtn.performClick();
}
}
EWorldEditor.isDirty = true;
}

View file

@ -141,6 +141,13 @@ function ForestEditorPlugin::onActivated( %this )
ForestEditorPropertiesWindow.setVisible( true );
ForestEditorGui.makeFirstResponder( true );
//ForestEditToolbar.setVisible( true );
//Get our existing forest object in our current mission if we have one
%forestObject = parseMissionGroupForIds("Forest", "");
if(isObject(%forestObject))
{
ForestEditorGui.setActiveForest(%forestObject.getName());
}
%this.map.push();
Parent::onActivated(%this);
@ -232,9 +239,27 @@ function ForestEditorPlugin::clearDirty( %this )
function ForestEditorPlugin::onSaveMission( %this, %missionFile )
{
ForestDataManager.saveDirty();
if ( isObject( theForest ) )
theForest.saveDataFile();
//First, find out if we have an existing forest object
%forestObject = parseMissionGroupForIds("Forest", "");
if ( isObject( %forestObject ) )
{
//We do. Next, see if we have a file already by polling the datafield.
if(%forestObject.dataFile !$= "")
{
//If we do, just save to the provided file.
%forestObject.saveDataFile(%forestObject.dataFile);
}
else
{
//We don't, so we'll save in the same place as the mission file and give it the missionpath\missionName.forest
//naming convention.
%path = filePath(%missionFile);
%missionName = fileBase(%missionFile);
%forestObject.saveDataFile(%path @ "/" @ %missionName @ ".forest");
}
}
ForestBrushGroup.save( "art/forest/brushes.cs" );
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B