diff --git a/Docs/README.commands b/Docs/README.commands
index 6df451b30..7ca81ccbb 100644
--- a/Docs/README.commands
+++ b/Docs/README.commands
@@ -120,6 +120,8 @@ script - execute a PSL script
exit - prompt and quit FlightGear
+pause - pause/resume the simulation
+
load - load properties from an XML file
file: the name of the file to load, relative to the current
directory (defaults to "fgfs.sav")
@@ -234,6 +236,9 @@ dialog-apply - copy values from the active dialog box to FlightGear
presets-commit - commit preset values from /sim/presets
+open-browser - open the web browser and show given file
+ path: name of the local file to be opened.
+ url: URL to be opened (http://..., ftp://...).
The following commands are temporary, and will soon disappear or be
renamed; do NOT rely on them:
@@ -280,8 +285,6 @@ old-ap-adjust-dialog - adjust the autopilot settings
old-lat-lon-format-dialog - toggle the lat/lon format in the HUD
-old-help-dialog - offer online help
-
Adding New Commands in C++
--------------------------
diff --git a/Effects/flutter.eff b/Effects/flutter.eff
new file mode 100644
index 000000000..404eda994
--- /dev/null
+++ b/Effects/flutter.eff
@@ -0,0 +1,161 @@
+
+
+ Effects/flutter
+ Effects/model-default
+
+ true
+
+ 1
+
+
+ smooth
+
+
+
+
+ 0.0
+ 0.08
+
+
+
+
+ /sim/rendering/shader-effects
+
+
+ 2.0
+
+
+
+ GL_ARB_shader_objects
+ GL_ARB_shading_language_100
+ GL_ARB_vertex_shader
+ GL_ARB_fragment_shader
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 9
+ noise
+
+
+
+
+
+ Shaders/flutter.vert
+ Shaders/default.frag
+
+
+
+ colorMode
+ int
+
+
+
+
+
+ WindSpeed
+ float
+
+
+
+
+
+ Offset
+ float
+
+
+
+
+
+ AmpFactor
+ float
+
+
+
+
+
+ Noise
+ sampler-3d
+ 9
+
+
+
+
+
diff --git a/Shaders/flutter.vert b/Shaders/flutter.vert
new file mode 100644
index 000000000..640edd885
--- /dev/null
+++ b/Shaders/flutter.vert
@@ -0,0 +1,79 @@
+// -*-C++-*-
+
+// Shader that uses OpenGL state values to do per-pixel lighting
+//
+// The only light used is gl_LightSource[0], which is assumed to be
+// directional.
+//
+// Diffuse colors come from the gl_Color, ambient from the material. This is
+// equivalent to osg::Material::DIFFUSE.
+
+#define MODE_OFF 0
+#define MODE_DIFFUSE 1
+#define MODE_AMBIENT_AND_DIFFUSE 2
+
+// The ambient term of the lighting equation that doesn't depend on
+// the surface normal is passed in gl_{Front,Back}Color. The alpha
+// component is set to 1 for front, 0 for back in order to work around
+// bugs with gl_FrontFacing in the fragment shader.
+varying vec4 diffuse_term;
+varying vec3 normal;
+varying float fogCoord;
+
+uniform int colorMode;
+uniform float osg_SimulationTime;
+uniform float WindSpeed, Offset, AmpFactor;
+uniform sampler3D Noise;
+
+void main()
+{
+ // map noise vector
+ vec4 noisevec = texture3D(Noise, gl_Vertex.xyz);
+
+ //waving effect
+ float tsec = osg_SimulationTime;
+ vec4 pos = gl_Vertex;
+ vec4 oldpos = gl_Vertex;
+
+ float freq = (10 * WindSpeed) + 10;
+ pos.y = sin((pos.x * 5.0 + tsec * freq )/5.0) * 0.5 ;
+ pos.y += sin((pos.z * 5.0 + tsec * freq/2)/5.0) * 0.125 ;
+
+ pos.y *= pow(pos.x - Offset, 2.0) * AmpFactor;
+
+ gl_Position = gl_ModelViewProjectionMatrix * pos;
+
+ vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
+
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ normal = gl_NormalMatrix * gl_Normal;
+ vec4 ambient_color, diffuse_color;
+
+ if (colorMode == MODE_DIFFUSE) {
+ diffuse_color = gl_Color;
+ ambient_color = gl_FrontMaterial.ambient;
+ } else if (colorMode == MODE_AMBIENT_AND_DIFFUSE) {
+ diffuse_color = gl_Color;
+ ambient_color = gl_Color;
+ } else {
+ diffuse_color = gl_FrontMaterial.diffuse;
+ ambient_color = gl_FrontMaterial.ambient;
+ }
+
+ diffuse_term = diffuse_color * gl_LightSource[0].diffuse;
+ vec4 ambient_term = ambient_color * gl_LightSource[0].ambient;
+
+ // Super hack: if diffuse material alpha is less than 1, assume a
+ // transparency animation is at work
+ if (gl_FrontMaterial.diffuse.a < 1.0)
+ diffuse_term.a = gl_FrontMaterial.diffuse.a;
+ else
+ diffuse_term.a = gl_Color.a;
+
+ // Another hack for supporting two-sided lighting without using
+ // gl_FrontFacing in the fragment shader.
+ gl_FrontColor.rgb = ambient_term.rgb; gl_FrontColor.a = 0.0;
+ gl_BackColor.rgb = ambient_term.rgb; gl_FrontColor.a = 1.0;
+ fogCoord = abs(ecPosition.z / ecPosition.w);
+
+}
diff --git a/Textures/Symbols/unidirectionalgreen.dds b/Textures/Symbols/unidirectionalgreen.dds
new file mode 100644
index 000000000..f33252773
Binary files /dev/null and b/Textures/Symbols/unidirectionalgreen.dds differ
diff --git a/Textures/Symbols/unidirectionalgreen.png b/Textures/Symbols/unidirectionalgreen.png
new file mode 100644
index 000000000..7f7f17312
Binary files /dev/null and b/Textures/Symbols/unidirectionalgreen.png differ
diff --git a/Textures/Symbols/unidirectionalred.dds b/Textures/Symbols/unidirectionalred.dds
new file mode 100644
index 000000000..9654e3228
Binary files /dev/null and b/Textures/Symbols/unidirectionalred.dds differ
diff --git a/Textures/Symbols/unidirectionalred.png b/Textures/Symbols/unidirectionalred.png
new file mode 100644
index 000000000..da2ccd0be
Binary files /dev/null and b/Textures/Symbols/unidirectionalred.png differ
diff --git a/gui/dialogs/map.xml b/gui/dialogs/map.xml
index c80efd179..d2d1f6dac 100644
--- a/gui/dialogs/map.xml
+++ b/gui/dialogs/map.xml
@@ -16,9 +16,31 @@ command interface /autopilot/route-manager/input:
vbox
true
+
+ 0.41
+ 0.4
+ 0.42
+ 1.0
+ 1.0
+
+
-
+ var mapDialog = cmdarg();
+ var setTransparency = func(updateDialog){
+ var alpha = (getprop("/gui/map/transparent") or 0);
+ mapDialog.getNode("color/alpha").setValue(1-alpha*0.3);
+ mapDialog.getNode("color/red").setValue(0.41-alpha*0.2);
+ mapDialog.getNode("color/green").setValue(0.4-alpha*0.2);
+ mapDialog.getNode("color/blue").setValue(0.42-alpha*0.2);
+ var n = props.Node.new({ "dialog-name": "map" });
+ if (updateDialog)
+ {
+ fgcommand("dialog-close", n);
+ fgcommand("dialog-show", n);
+ }
+ }
+ setTransparency(0);
@@ -128,6 +150,19 @@ command interface /autopilot/route-manager/input:
true
+
+
+ 100
+ /gui/map/magnetic-headings
+ true
+
+ dialog-apply
+
+
+ property-toggle
+
+
+
100
@@ -155,9 +190,9 @@ command interface /autopilot/route-manager/input:
-
+
100
- /gui/map/magnetic-headings
+ /gui/map/transparent
true
dialog-apply
@@ -165,11 +200,16 @@ command interface /autopilot/route-manager/input:
property-toggle
+
+ nasal
+
+
true
+
Zoom %d
@@ -222,17 +263,18 @@ command interface /autopilot/route-manager/input:
-
- 22
- 22
+ zoomin
+
+ 22
+ 22
-
- property-adjust
- /gui/map/zoom
- 1
- 12
-
-
+
+ property-adjust
+ /gui/map/zoom
+ 1
+ 12
+
+
diff --git a/gui/dialogs/replay.xml b/gui/dialogs/replay.xml
index acaef886c..d584a4c83 100644
--- a/gui/dialogs/replay.xml
+++ b/gui/dialogs/replay.xml
@@ -20,14 +20,40 @@
new : func( dlgRoot ) {
var obj = { parents: [ReplayDialogController] };
obj.dlgRoot = dlgRoot;
+ obj.initViews(1);
return obj;
},
+ # Populate the view combo box with a list of the available views
+ initViews : func(update) {
+ var combo = me.findElementByName( me.dlgRoot, "view-selector" );
+ if (update)
+ combo.removeChildren("value");
+
+ var current_view = getprop("/sim/current-view/view-number");
+ var i = 0;
+ foreach (var v; view.views) {
+ var name = "Unnamed view " ~ v.getIndex();
+ if (v.getNode("name") != nil) {
+ name = v.getNode("name").getValue();
+ }
+
+ # Pre-populate the combo box selected value
+ if (i == current_view) {
+ setprop("/sim/replay/view-name", name);
+ }
+ if (update)
+ combo.getNode("value[" ~ i ~ "]", 1).setValue(name);
+ i = i + 1;
+ }
+ },
+
open : func {
var replaySlider = me.findElementByName( me.dlgRoot, "replay-time-slider" );
me.maxProp = replaySlider.getChild("max");
me.minProp = replaySlider.getChild("min");
- me.maxListenerId = setlistener( "/sim/speed-up", func(n) { me.updateListener(n); }, 1, 1 );
+ me.speedUpListenerId = setlistener( "/sim/speed-up", func(n) { me.updateListener(n); }, 1, 1 );
+ me.viewListenerId = setlistener( "/sim/current-view/view-number", func(n) { me.updateListener(n); }, 1, 1 );
if (getprop("/sim/replay/end-time")!=nil)
{
# update max/min range of replay-time slider
@@ -45,10 +71,12 @@
SpeedUp = "1/" ~ SpeedUp;
}
setprop("/sim/gui/dialogs/replay/time-factor","" ~ SpeedUp ~ "x");
+ me.initViews(0);
},
close : func {
- #removelistener( me.maxListenerId );
+ removelistener( me.speedUpListenerId );
+ removelistener( me.viewListenerId );
},
findElementByName : func(base,name) {
@@ -66,6 +94,8 @@
var controller = ReplayDialogController.new( cmdarg() );
controller.open();
+ if (props.globals.getNode("/rotors",0)!=nil)
+ setprop("/sim/replay/disable-my-controls",1);
]]>
1
-
+
1
@@ -378,10 +391,12 @@
hbox
- center
- false
+ fill
+ true
3
+ 26
+
true
@@ -394,7 +409,7 @@
/sim/freeze/master
true
- 47
+ 70
property-toggle
/sim/freeze/clock
@@ -405,52 +420,68 @@
+ 80
+
-
- Esc
- 1
+ mute
+
+ 2
+ 55
0.3
0.3
0.3
0.8
-
+ left
+ /sim/replay/mute
+ true
- property-assign
- /sim/replay/disable
- true
-
-
- dialog-close
+ nasal
+
-
+
+
+
+ 1
+
+ 1
+ 0.3
+ 0.3
+ 0.8
+
+
+
+ /sim/replay/disable-my-controls
+
+
+ /sim/flight-model
+ yasim
+
+
+
+
+
+ 90
+
+ property-assign
+ /sim/freeze/replay-state
+ 3
+
+
+ property-assign
+ /sim/replay/disable
+ true
+
+
+ dialog-close
+
+
+
+
+
+ Esc
+ 1
+ 90
+
+ 0.3
+ 0.3
+ 0.3
+ 0.8
+
+
+ property-assign
+ /sim/replay/disable
+ true
+
+
+ dialog-close
+
+
+
diff --git a/gui/dialogs/stopwatch.xml b/gui/dialogs/stopwatch.xml
index a2154c1f5..95a5fff4f 100644
--- a/gui/dialogs/stopwatch.xml
+++ b/gui/dialogs/stopwatch.xml
@@ -7,6 +7,12 @@
8
-5
5
+
+ 0.2
+ 0.2
+ 0.2
+ 0.7
+
@@ -104,6 +110,12 @@
true
47
+
+ 0.3
+ 0.3
+ 0.3
+ 0.8
+
nasal
@@ -114,6 +126,12 @@
true
47
+
+ 0.3
+ 0.3
+ 0.3
+ 0.8
+
nasal
@@ -124,6 +142,12 @@
Delete
47
+
+ 0.3
+ 0.3
+ 0.3
+ 0.8
+
nasal
@@ -132,6 +156,12 @@
+
+ 0.3
+ 0.3
+ 0.3
+ 0.8
+
Esc
47
diff --git a/gui/menubar.xml b/gui/menubar.xml
index 834c0c71b..3e0fa9247 100644
--- a/gui/menubar.xml
+++ b/gui/menubar.xml
@@ -759,7 +759,8 @@
help-browser
- old-help-dialog
+ open-browser
+ Docs/index.html
diff --git a/keyboard.xml b/keyboard.xml
index 107e04889..00fe83b08 100644
--- a/keyboard.xml
+++ b/keyboard.xml
@@ -1101,7 +1101,7 @@ top down before the key bindings are parsed.
-
+
F3
diff --git a/materials-dds.xml b/materials-dds.xml
index 68a0e88e3..a60f7481c 100644
--- a/materials-dds.xml
+++ b/materials-dds.xml
@@ -1337,8 +1337,7 @@ Shared parameters for various materials.
Effects/water
Lagoon
- Lake
- Terrain/water-lake.png
+ Terrain/water-lake.png
400
400
@@ -1373,6 +1372,7 @@ Shared parameters for various materials.
Effects/water-inland
+ Lake
Pond
Reservoir
Stream
@@ -4777,6 +4777,29 @@ Shared parameters for various materials.
+
+ UnidirectionalTaperRed
+ Symbols/unidirectionalred.dds
+
+ 0.92157
+ 0.92157
+ 0.76471
+ 1.0
+
+
+
+
+ UnidirectionalTaperGreen
+ Symbols/unidirectionalgreen.dds
+
+ 0.92157
+ 0.92157
+ 0.76471
+ 1.0
+
+
+
+
BidirectionalTaper
Symbols/bidirectional.dds
diff --git a/materials.xml b/materials.xml
index eb70fdced..8224eee8e 100644
--- a/materials.xml
+++ b/materials.xml
@@ -3381,6 +3381,29 @@ Shared parameters for various materials.
1.0
+
+
+ UnidirectionalTaperRed
+ Symbols/unidirectionalred.png
+
+ 0.92157
+ 0.92157
+ 0.76471
+ 1.0
+
+
+
+
+ UnidirectionalTaperGreen
+ Symbols/unidirectionalgreen.png
+
+ 0.92157
+ 0.92157
+ 0.76471
+ 1.0
+
+
+
BidirectionalTaper
diff --git a/preferences.xml b/preferences.xml
index f9bd58988..41e014afe 100644
--- a/preferences.xml
+++ b/preferences.xml
@@ -785,6 +785,9 @@ Started September 2000 by David Megginson, david@megginson.com
/Aircraft/Generic/flightrecorder/generic-piston-propeller-4.xml
+
+ false
+