1
0
Fork 0
Commit graph

2171 commits

Author SHA1 Message Date
Torsten Dreyer
e43456ba43 Merge branch 'next' of gitorious.org:fg/flightgear into next 2010-08-15 20:35:14 +02:00
Torsten Dreyer
60f7d0f16c Downgrade the ridgelift to a subsystem of environment 2010-08-15 20:33:29 +02:00
James Turner
bca3494462 Support relative paths in 'loadxml' command
(relative to FG_ROOT or an aircraft dir)
2010-08-15 11:02:15 +01:00
Torsten Dreyer
bb2d1f55e9 Interpret environment variables and hostname on Windows
- Point the homedir variable to %APPDATA%/flightgear.org. This
enables .fgfsrc in this path for windows users.
- Evaluate the returncode of gethostname() to not strdup() bogus
characters on failure. Also mainly on windows.
2010-08-06 09:06:32 +02:00
James Turner
7f36caede6 Create TimeManager subsystem, and collect the time related code out of main.cxx and fg_init.cxx into it.
Remove the unfortunately named 'tmp.[cxx|hxx]', pushing the remaining code in FGLight.
(second try, with init bug fixed)
2010-08-04 09:16:37 +01:00
David Luff
53358a55bf Remove old AI system 2010-08-03 00:21:56 +01:00
James Turner
47fd8a8a2a Revert "Create TimeManager subsystem" - not quite ready for prime-time yet!
This reverts commit 50eb95dcad.
2010-08-02 00:23:36 +01:00
James Turner
50eb95dcad Create TimeManager subsystem, and collect the time related code out of main.cxx and fg_init.cxx into it.
Remove the unfortunately named 'tmp.[cxx|hxx]', pushing the remaining code in FGLight.
2010-08-01 20:33:11 +01:00
James Turner
388a0a5b6a Make saveInitialProperties smarter, and hence simplify the reset code path. 2010-08-01 19:04:20 +01:00
Durk Talsma
7c73c7d3e5 Added some stubs in the flightgear main code to eventually add a full, FGSubsystems based ATIS system that will serve as a replacement for the ATCDCL code. 2010-08-01 16:16:33 +02:00
James Turner
d9236f33b2 Remove use of simgear/screen/extensions.h. 2010-07-31 15:15:40 +01:00
James Turner
8e5f3ac8a3 Set the key SGModelLib callback to make aircraft-dir OSG loading work. 2010-07-29 01:07:32 +01:00
James Turner
ab495d1370 Add --fg-aircraft option, and aircraft dir path list. Partial support in places that load files, for respecting the setting.
Add helper to look for an aircraft branch path in multiple candidate locations.
Update the main subsystems to use the helper, and hence load from any aircraft dir.
2010-07-28 22:03:10 +01:00
James Turner
d1852430bf Make various implicit includes (via PLIB) explicit. 2010-07-28 10:25:42 +01:00
James Turner
9604908a8d Remove all (2) uses of simgear/math/vector.h from FlightGear. 2010-07-23 13:26:07 +01:00
James Turner
900fce6374 Fix issues exposed by PLIB-free SimGear. 2010-07-23 09:41:37 +01:00
James Turner
bf52c378a4 Clean up names in --show-aircraft; avoid -set.xml suffixes. 2010-07-22 01:36:32 +01:00
James Turner
c95a5db23d Rewrite --show-aircraft and --aircraft handling to share directory search code.
As a bonus, sort the --show-aircraft list case-insensitively.
2010-07-17 14:12:52 +01:00
James Turner
af3f072c21 Convert scenery path setup to use simgear::Dir 2010-07-17 14:12:52 +01:00
James Turner
2c90eb8370 Convert --show-aircraft to use simgear::Dir 2010-07-17 14:12:52 +01:00
James Turner
c32da90e5c Ensure sim/signals/fdm-initialized is only fired on a rising edge; add sim/fdm-initialized as the state value. 2010-07-13 13:47:24 +01:00
James Turner
c47d4f2f30 Fix bug 141, by ensuring certain subsystems are assigned to the 'post FDM' group (which is new) 2010-07-08 23:24:39 +01:00
James Turner
07d055b4de One more juggle to appease the linker gods. 2010-07-02 10:00:05 +01:00
James Turner
cfe9aaac4c Juggle fgfs link order to keep GNU ld happy. 2010-07-02 09:06:57 +01:00
James Turner
88e65f7662 aircraft.[cxx|hxx] is gone. 2010-07-01 22:56:22 +01:00
James Turner
18d42ec1af Rename reInit() method to 'resetSimulator', and document that it's hooked up to the 'reset' command. 2010-07-01 22:50:11 +01:00
James Turner
d279c394d7 Clean fg_init.hxx 2010-07-01 22:43:28 +01:00
James Turner
01e0156b5d Remove current_aircraft global, fgAIRCRAFT struct, and dead code for reading aircraft dirs. 2010-07-01 22:33:51 +01:00
James Turner
3f26d2b14b Trivial cleanup commit, to test continuous integration server. 2010-07-01 19:51:05 +01:00
James Turner
fec7cb977c Clarify warnings from fgUntie, and fix one source of such warnings, in FGInterface. 2010-07-01 02:04:16 +01:00
Durk Talsma
3c60bf6511 Make sure also not to try running AI_mgr when compiling fgfs with --disable-atcdcl. FlightGear can now actually run without segfaulting when compiled this way. 2010-06-27 10:08:26 +02:00
Torsten Dreyer
4466729987 fix assertion in sunsolver.cxx with --timeofday=xx 2010-06-26 21:58:45 +02:00
Torsten Dreyer
2e6d7e111a gcc warning fixes 2010-06-26 21:24:46 +02:00
Torsten Dreyer
e1b9d3d759 Don't crash if built with --disable-atcdcl 2010-06-26 20:24:34 +02:00
James Turner
180e524a0e Fix automake build after mainloop changes - especially, JSBSim includes. 2010-06-26 18:37:51 +01:00
James Turner
f9ec605ffb Fix ordering of aircraft-model updates against flight model. 2010-06-26 10:31:22 +01:00
James Turner
85be9be1e0 Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
James Turner
4756cd4882 Wrap SGEphemeris in a subsytem/property interface, and remove from mainloop. 2010-06-26 10:31:21 +01:00
James Turner
3fbf3aa080 Make FGAircraftModel more subsystem-alike, move update to fgMainLoop. 2010-06-26 10:31:21 +01:00
Torsten Dreyer
d558b52cb6 New autopilot subsystem implementation.
Split the former single-file-implementation in xmlauto.?xx into multiple
files and use some OO techniques. Started with documentation to be used
with doxygen.
2010-06-24 17:09:33 +02:00
Tim Moore
0f8312150d Log OpenGL vendor and version string 2010-06-15 23:58:55 +02:00
Mathias Froehlich
f433f4d973 Default the screen and display number to a value >= 0 2010-06-14 22:05:15 +02:00
Tim Moore
b692a165fb Remove osgGA/MatrixManipulator include
From AndersG; the file is gone from recent OSG.
2010-06-06 23:31:47 +02:00
Torsten Dreyer
c89b18ddbd Ignore generated files
add generated files to gitignore that has also been in cvsignore
remove generated config.h-msvc* from source control
2010-06-02 11:27:16 +02:00
Tim Moore
473cea7f17 remove references to osgGA::MatrixManipulator
This class has been removed in current OSG sources.
2010-05-31 07:06:55 +02:00
James Turner
ad19acf1c6 Remove C++ autobrake code - this can all be done easier in XML now! 2010-05-29 10:36:23 +01:00
Jeff Taylor
09f3ee6351 Fix fgviewer segfault
fgviewer crashes when reading weird channel options (which it doesn't use).
Here is a patch which fixes this by adding a pointer check.
2010-05-23 20:13:09 +02:00
Tim Moore
fcb255d19e Merge branch 'ehofman/sound-reinit' into next 2010-04-12 10:02:01 +02:00
ehofman
5d0d6998d2 Don't forget to resume the sound system after reinit 2010-04-12 10:01:51 +02:00
ehofman
2b83ed9cbe allow reinitializing the sound system by setting /sim/sound/working to false at runtime. 2010-04-12 10:01:28 +02:00
Tim Moore
33aead9a21 Merge branch 'jmt/view' into next 2010-04-03 22:34:15 +02:00
jmt
bc7c3ad4c6 bug99 - Fix case where damping is enabled, but factor is 0. 2010-04-03 22:34:07 +02:00
jmt
a33745e888 Bug #99 - change viewer damping calculation, to work correctly regardless of set/recalc/update ordering per frame. 2010-04-03 22:34:00 +02:00
Tim Moore
2229af9f78 Merge branch 'ehofman/particle' into next 2010-03-28 00:35:35 +01:00
ehofman
e78c56af7d Allow particles to be frozen on pause. 2010-03-28 00:35:28 +01:00
Tim Moore
dba4a69e2c Merge branch 'torsten/commands' into next 2010-03-27 15:45:44 +01:00
torsten
5df9f6a951 Code cleanup: reuse duplicate code. 2010-03-27 15:45:25 +01:00
Tim Moore
7ee645aa20 Merge branch 'timoore/getpath-rebase' into next 2010-03-09 11:25:18 +01:00
Tim Moore
7ff80d11a0 changes for SGPropertyNode::getPath return type
It's now a std::string.
2010-03-09 11:24:45 +01:00
Tim Moore
d61d14aa91 Merge branch 'jmt/gui' 2010-02-25 12:04:58 +01:00
Tim Moore
351d1ddb5e Merge branch 'jmt/gui' into next 2010-02-17 07:41:48 +01:00
jmt
4f99561f63 Quiet: reduce log-level of various things from INFO to DEBUG or BULK, and tune the categories/level of some specific messages.
Commit split by timoore in order to apply most of it to maint branch.
2010-02-17 07:41:23 +01:00
V Meazza
00a9151b1a Add Stencil Lighting
Signed-off-by: V Meazza <vivina.meazza@lineone.net>
2010-02-10 15:54:48 +01:00
Tim Moore
fba05c527f Merge branch 'torsten/track' 2010-02-10 00:45:28 +01:00
Tim Moore
988a6771aa Merge branch 'durk/atcdcl-cond'
Conflicts:
	src/ATC/trafficcontrol.cxx
	src/Main/Makefile.am
2010-02-10 00:45:06 +01:00
Tim Moore
3e0489bd91 Merge branch 'torsten/auto' 2010-02-10 00:41:44 +01:00
durk
e54798a8e2 A couple of last-minute patched / bugfixes to mitigate the probability of collisions between user controlled aircraft and AI traffic.
* AI aircraft distance to user proximity detection works again (lat/lon were inverted).
  * The parking uses by the user aircraft is marked as such to prevent it being reused by an AI aicraft
  * AI aircraft won't receive permission for pushback until the user aircraft is at a fair distance.
2010-01-31 17:52:43 +01:00
fredb
00e9ad3055 MINGW patch from Benot Laniel 2010-01-25 17:12:04 +01:00
durk
a023700ebe Update base package version check. 2010-01-21 06:30:35 +01:00
Tim Moore
98d8a98ef2 Merge branch 'ehofman/sound' 2010-01-13 07:30:52 +01:00
Tim Moore
a89a28c4e6 Merge branch 'ehofman/version' 2010-01-12 09:16:02 +01:00
Tim Moore
0d9f2e3c95 Merge branch 'topic/pu-crash' 2010-01-11 07:46:27 +01:00
ehofman
8e4d979aca Don't initialize the soundmanager wehn defining --disable-sound. Sound can still be enabled at runtime by setting /sim/sound/working to 'true' 2010-01-10 23:33:57 +01:00
durk
d8ae90801a Some additional changes to ensure that FlightGear at least compiles after configuring with --disable-atcdcl. Some substitution code is added in ATC/atcutils.cxx and ATC/atcutils.hxx. Note that the new code doesn't run properly yet. Instead, it is just meant to identify which parts need replacement. Getting that to work will be the next step. 2010-01-05 22:21:49 +01:00
torsten
78d8e7edfd now that there is a true track property, the magnetic track is nice to have, too. 2010-01-05 22:19:58 +01:00
durk
8114d1d899 Conditional compilation of ATCDCL module. Use --disable-atcdcl to try building flightgear without ATCDCL code. 2009-12-30 17:44:06 +01:00
Tim Moore
1e6ed8db68 Move getLoggingClasses() result buffer to file level.
Getting it out of the function fixes some corruption problems at program exit.
2009-12-30 17:34:58 +01:00
ehofman
90e44c6696 Display the (default) OpenAL renderer as well as the OpenAL vendor when requesting the list of sound devices. 2009-12-27 09:33:14 +01:00
Tim Moore
d2c7179cd0 Merge branches 'jmt/aircraft-name' and 'jmt/runway' 2009-12-22 00:16:38 +01:00
Tim Moore
15b6c431c0 Merge branch 'timoore/merge-effects' 2009-12-20 12:05:07 +01:00
Tim Moore
b5c46a8d59 Merge branch 'ehofman/sound' 2009-12-20 11:11:16 +01:00
Tim Moore
6acd657a05 Attach an empty shader program to the scene graph root
This establishes a default state of using the OpenGL fixed function pipeline.
Otherwise a shader program from a state set can leak into state sets that don't
use shaders at all.
2009-12-20 10:34:07 +01:00
Tim Moore
9a94b26609 Changes for animated effects 2009-12-20 10:34:07 +01:00
ehofman
b0e87c8d6e A better way to stringize the predefined SimGear version number 2009-12-14 22:49:47 +01:00
ehofman
ba77293c10 John Denker: Fancier --version information. 2009-12-14 22:49:42 +01:00
jmt
106aa02b76 Case-insensitive aircraft names, for the startup arg, so 'C172', 'F16', etc work. 2009-12-07 07:00:01 +01:00
Tim Moore
6324d5a03d Change int to unsigned in sound device traversal 2009-12-07 06:59:04 +01:00
ehofman
c7ef67df80 add avionics enable/disable and volume control to the sound fx class. 2009-12-03 06:43:40 +01:00
Tim Moore
124713b136 set DYNAMIC variance on gui and hud/2dpanel drawables 2009-12-02 07:28:36 +01:00
ehofman
e657a53b32 Turned out a tied proeprty can't be used as a user archive, use a different one 2009-12-01 19:12:56 +01:00
ehofman
86cd525200 update to allow selection of a new sound device 2009-11-30 22:45:33 +01:00
ehofman
fde1a925fe Change of thoughts since it makes life easier:
/sim/sound/working		enable/disable the use of OpenAL
/sin/sound/enabled		master mute/unmute
2009-11-30 22:45:23 +01:00
ehofman
a3b66adf51 add a new command line option: --show-sound-devices 2009-11-30 22:44:57 +01:00
Tim Moore
78ebe9424b Add HAVE_CULLSETTINGS_CLEAR_MASK to configure.ac and check it in camera code
This works around a behavior / interface change in OSG post 2.9.6.
2009-11-30 09:29:07 +01:00
Csaba Halasz
4fc7105675 Update camera inheritance masks because of OSG changeset 10838 2009-11-30 07:00:43 +01:00
ehofman
3a4892cede New Property layout:
/sim/sound/enabled		enable/disable the use of OpenAL
/sin/sound/pause		master mute, effects all SampleGroups
/sim/sound/volume		master volume
/sim/sound/effects/enabled	enable/disable (mute) sound fx
/sim/sound/effects/volume	effects volume
/sim/sound/chatter/enabled	enable/disable (mute) atc chatter
/sim/sound/chatter/volume	chatter (sample queue) volume
2009-11-29 15:57:37 +01:00
ehofman
3abb7afa45 List all available playback devices under '/sim/sound/devcies' 2009-11-29 15:57:17 +01:00
ehofman
ef4814599d * Fix --disable-sound
* Add a new command line option: --sound-device=""
  This makes OpenAL use the sepcified audio device instead of the default
  output device. (Look for playback devices when calling openal-info of alcinfo)
2009-11-29 15:57:02 +01:00
torsten
179a799333 - fix the <condition> element which was no longer working due to an invalid property root
- allow multiple <autopilot> elements within an aircraft. All autopilot live in an individual FGXMLAutopilot subsystem which run within a subsystem group now.
2009-11-29 15:56:13 +01:00
Tim Moore
b39599f578 Merge branch 'ehofman/sky' 2009-11-26 23:32:20 +01:00
Tim Moore
ad9366ed99 Merge branch 'ehofman/jsbsim' 2009-11-26 23:31:59 +01:00
ehofman
3d19352f13 proper listener velocity calculation, this has no effect yet but is required when other models start emitting sounds. 2009-11-24 14:22:54 +01:00
ehofman
97db69cf8f restore listener position with offset 2009-11-19 21:03:05 +01:00
ehofman
0578b06a0c temporarily remove listener (viewer) and source offsets. they mess things up 2009-11-12 23:01:41 +01:00
ehofman
96b7939947 put the debugging quat strings as doubles under /sim/current-view/debug instead. 2009-11-11 17:49:42 +01:00
ehofman
769bac95e3 put the debugging quat strings as doubles under /sim/current-view/debug instead. 2009-11-11 17:49:42 +01:00
Tim Moore
8117134879 don't define constant objects in header files 2009-11-09 10:24:46 +01:00
ehofman
e750dc368d John Denker:
Together with previous patch, make view reference frame, view offset,
and current view visible in property tree.
Also some comments about the concepts behind these variables.
2009-11-09 10:07:42 +01:00
ehofman
fe834dedfb Save a costly SGVec3d::fromGeod() calculation 2009-11-07 08:54:03 +01:00
Tim Moore
ef152ee411 Merge branches 'durk/scenery' and 'ehofman/fog' 2009-11-06 23:39:17 +01:00
ehofman
2d2710d5da pass the geodetic position and view orientation quat to the sky repositioning function 2009-11-05 16:28:11 +01:00
ehofman
ab149d0036 John Denker:
Add a view debugging functions and represent the viewer quats in the property tree for debugging.

Do a nontrivial calculation, demonstrating how to find the 12:00 orientation given the view and the view offset.  it, and observe that the 12:00 direction does not change when you change the view offset, which is a nontrivial result.

Erik: This already proved to be useful since I now obserbed that the sky and fog coloring code depends on view offset rather that the view orientations. This is why those effects are out of line in some views.
2009-11-05 16:27:58 +01:00
ehofman
342744fddb Use the proper absolute position for the listener 2009-11-04 23:14:33 +01:00
ehofman
3b5792e7cc minor upodate by John 2009-11-02 23:30:34 +01:00
ehofman
0be434936e John Denker: Simplify redundant code and superfluous variable 2009-11-02 23:30:29 +01:00
ehofman
6e5673de21 Position and orientation fixes for the sound code, thanks to Tim Moore 2009-11-02 23:30:02 +01:00
ehofman
7efed53475 proper sound orientation(?) and comment out velocity since it messes with OpenAL in such a way that volume doesn't work properly anymore 2009-11-01 22:05:56 +01:00
Tim Moore
28d221cd7c Revert lighting "cleanup" for now.
The osgViewer headlight appears to be critical for enabling lighting.
2009-10-31 23:00:11 +01:00
ehofman
d2799cd832 another attempt at getting something useful without any result. 2009-10-31 22:57:27 +01:00
Tim Moore
e0a779adb1 fix moon lighting at night
This hasn't worked since the OSG port was initially checked in. A real
phase-of-the-moon bug!
2009-10-30 23:12:14 +01:00
ehofman
9535c4e339 Commit the current state of affairs to see if it fixes the position code for others 2009-10-29 23:09:21 +01:00
ehofman
c56c520ab5 initlialize _playing for FGATC. Proper listerner orientation based on view offset. proper velocity orientation 2009-10-28 23:23:53 +01:00
ehofman
290bef5749 MSVC fix 2009-10-26 22:12:10 +01:00
durk
b4eb30a6c5 Revoke url change detection code. 2009-10-26 07:45:04 +01:00
Tim Moore
c563cd034a delete char array with delete[] 2009-10-24 22:50:43 +02:00
durk
904a99714e Two patches:
1) Fix for the "use custom scenery airport data" property.
2) Make it a little harder for stupid people to make money behind our backs.
2009-10-24 19:53:03 +02:00
ehofman
f9445874a0 Don't make the SoundManager a memebr of the subsystem manager; It needs to be initialized very early and destroyed as late as possible. That doesn't work as a subsystem meber onless some sort of priority scheme gets implemented. Get rid of auto_ptr which doesn work for the samples either. 2009-10-24 19:51:39 +02:00
ehofman
afb0ada81f Make sure the unbind method is called for all registered subsystems proir to deleting the subsystem manager. 2009-10-20 00:00:08 +02:00
ehofman
73d4b78396 explicitly activate the sound manager 2009-10-18 18:19:52 +02:00
ehofman
a9b3fc7a56 move some of the sound postion and orientation calculations over to the sample class which also makes the main code nice and clean 2009-10-16 11:24:10 +02:00
Tim Moore
21122fa03e Merge branches 'jmt/brakes' and 'jmt/dump' 2009-10-12 11:05:36 +02:00
ehofman
b582c118bd Correct (and verrified) position, orientation and velocity vector. Todo: proper sound orientation (the all face forward using the airplane orientation now) and disabling doppler effect when tied to the listener 2009-10-12 07:58:11 +02:00
ehofman
33e816abb9 Split up FGFX into a dedicated effects class (FGFX) and a sample queue class. Register the sample queue cass as 'queue' at the SoundManager and tie it to the listener position. 2009-10-08 10:38:10 +02:00
ehofman
5107a9d07f (try to) properly align model and viewer 2009-10-07 08:23:41 +02:00
ehofman
b64259b295 allow disabling sound completely (note: openal gets initialized but shuts down a bit later leaving the soundmanager to handle only very specific commands). At this time by specifying '--prop:/sim/sound/enabled=false', not sure why '--disable-sound' doesn't work properly 2009-10-06 10:23:15 +02:00
ehofman
446b200edc Add the Sound Manager before any other subsystem that uses it. This makes sure the SoundMgr is available at construction time which makes the code much cleaner. Call the update_last() after any other class 2009-10-06 10:23:03 +02:00
ehofman
86f462933d Initial commit of the new sound system, expect more updates to follow 2009-10-06 10:22:09 +02:00
Tim Moore
5f134cdec8 Merge branch 'topic/atis' into merge/master-atis 2009-10-06 10:21:19 +02:00
Tim Moore
8b10bb12f5 Merge branches 'jmt/navradio', 'jmt/cleanup' and 'torsten/gps-fix' 2009-10-01 15:17:24 +02:00
jmt
4d67c69462 A generic, configurable autobrake system. Not fully features yet, but works quite nicely in the 777, including RTO modes and auto-disengage on pilot input. 2009-09-21 22:51:40 +02:00
jmt
0dbf2de0b6 Remove audio update from main.cxx, back to FGFX (but keep the timing-dependent piece done artificially late) 2009-09-20 00:20:17 +02:00
jmt
0c8c8380b1 Break viewmgr.hxx dependency on on viewer.hxx. 2009-09-20 00:20:17 +02:00
jmt
05626756e7 Put back an unfortunate include, until ViewMgr can be fixed to not inline FGViewer destructor calls. 2009-09-18 20:25:54 +02:00
jmt
3c62011f03 Drat, this is really needed. Yuck, yuck, yuck. 2009-09-18 20:25:54 +02:00
jmt
8b649b06c4 Header clean-ups in viewer/view-mgr. 2009-09-18 20:25:54 +02:00
jmt
14a09673b9 ATIS overhaul by John Denker, adapted to trunk by me.
8:: AWOS is available at AWOS locations.  (Previously only ATIS was
   implemented.)

 9:: ATIS phraseology now more nearly conforms to international
   standard METAR pattern, and therefore to usual FAA practice.(*)

Items marked with a (*) are fully implemented in the /text/ of the
ATIS message, but the voiced version of the message is degraded by
limitations of the FGFS built-in text-to-speech system.

 10:: ATIS now reports sky condition.(*)

 11:: ATIS now reports multiple layers of clouds, not just the lowest
 layer.(*)

 12:: ATIS now takes field elevation into account when calculating
   sky condition and ceiling.

 13:: ATIS now reports dewpoint.(*)

 14:: ATIS now can handle negative quantities (temperature and dewpoint).(*)

 15:: ATIS can now report report fractional-mile visibility.(*)

 16:: ATIS now uses magnetic (not true) wind directions, as it should.

 17:: ATIS generates correct runway number and suffix (nine right,
   one one left).

 18:: ATIS can be received on nav frequencies, not just comm.

 19:: Nothing bad happens if the same ATIS is tuned up on more than
   one receiver.

 20:: ATIS can be updated at times other than at the top of the hour.

 21:: ATIS listens for an "attention" signal, and responds to changes
   in the weather by issuing a new ATIS message (somewhat like a
   "special observation").

 22:: ATIS volume now responds to radio volume setting.

 23:: Area-related services (i.e. approach radar) are handled
   more-nearly consistently with radio-frequency related services.

 24:: ATIS sequence-letter generation has been fixed.

 25:: ATIS messages are now in the property tree, so they can be read
   e.g. via the http interface.
2009-09-18 20:18:54 +02:00
torsten
16eefc84d1 Tatsuhiro Nishioka:
Patches for configure.ac and Makefile.am files in FG/SG so Mac developers can build these in a unix way.
These also enables Mac developers to choose either PLIB framework or PLIB static libs.
2009-09-17 22:54:42 +02:00
torsten
a893748d4e Tatsuhiro Nishioka:
Handle number keys on Keypad properly on Mac OS X
2009-09-09 08:56:32 +02:00
ehofman
10611c1522 Dont execute code in case the soundmanager isn't properly initialized 2009-09-09 08:56:32 +02:00
frohlich
2f6107982c Use the new vector conversion functions.
Modified Files:
	src/FDM/groundcache.cxx src/Main/renderer.cxx
	src/Main/viewer.cxx src/Scenery/scenery.cxx
2009-09-09 08:56:31 +02:00
ehofman
ea4a3ee1df Make FGIO a proper subsystem and add a reinit method for the generic protocol. This should allow for easy runtime reloading of the configuration file. 2009-09-09 08:56:31 +02:00
frohlich
d9d725f28d Remove obsolete version test.
Modified Files:
	src/Main/fg_os_osgviewer.cxx
2009-09-09 08:56:31 +02:00
frohlich
4e7b084568 Simplify, fix some comments.
Modified Files:
	src/Main/viewer.cxx
2009-09-09 08:56:31 +02:00
torsten
e98d7a1ea4 Tatsuhiro Nishioka:
FG crashes at exit at very high likelihood.
The cause of the crash is that some subsystems (input and gui) call get_subsystems() at their destructor.
This is very dangerous since SGSubSystemMgr::get_subsystem() can refer to already deleted subsystems.
2009-09-09 08:56:31 +02:00
frohlich
8676c2bbd8 Replace the SGVec*::sg() methods with the equivalent SGVec*::data() calls.
Modified Files:
	src/Traffic/Schedule.cxx src/Sound/fg_fx.cxx src/Main/main.cxx
	src/Instrumentation/navradio.cxx
	src/AIModel/AIFlightPlanCreateCruise.cxx
2009-09-09 08:56:30 +02:00
jmt
5a01c55335 Allow the joystick hat to move the view, even when the sim is paused. 2009-09-09 08:56:30 +02:00
Tim Moore
0a64405cad fix warnings in Main 2009-08-24 18:03:49 +02:00
fredb
efbe6984c2 Win32 fix and suppress one warning 2009-08-23 21:43:08 +02:00
timoore
8bac481865 fgviewer: support random objects, vegetation, and static models 2009-08-23 21:43:08 +02:00
torsten
5c57153e62 Advanced input subsystem - Step3: Adding support for the Linux event devices 2009-08-12 23:45:54 +02:00
timoore
3bce312213 Get fgviewer working as a part of fgfs
Move fgviewer code into fgfs binary. Its osgViewer-style main function is
called from bootstrap.cxx if the --fgviewer argument is passed to fgfs.

Use fgfs initialization functions in fgviewer codepath. Read
command-line arguments and autosave.xml.
2009-08-12 23:45:54 +02:00
timoore
b65f0ae0dc From Till Busch - reload shaders command
Also, more documentation for effects.
2009-08-10 07:14:38 +02:00
torsten
0c2db22988 Advanced input subsystem - Step1: cleanup dependencies 2009-08-08 08:37:14 +02:00
fredb
94caa0b891 Fix case typo 2009-07-27 23:52:33 +02:00
fredb
9718338560 Compile under MSVC9 2009-07-27 23:52:33 +02:00
Tim Moore
7d6c567fde Refer to property types using props:: namespace
BOOL, FLOAT etc. conflict with typedefs in windows.h.
2009-07-17 14:54:12 +02:00
timoore
890b584b8f Enable EffectCullVisitor 2009-07-16 12:10:48 +02:00
timoore
4cc3084256 SGPropertyNode::Type moves to simgear::props namespace 2009-07-16 12:10:47 +02:00
frohlich
05a0a1f231 Remove ViewPartitionNode that is obviously superseeded by the
CameraGroup implementation and that is not used by flightgear.

Modified Files:
	FlightGear.dsp configure.ac projects/VC7.1/FlightGear.vcproj
 	src/FDM/Makefile.am src/Main/Makefile.am
Removed Files:
	src/Main/ViewPartitionNode.cxx src/Main/ViewPartitionNode.hxx
2009-07-02 08:59:16 +02:00
frohlich
e9c0c01ebb Remove now unused functions.
Modified Files:
 	src/Main/renderer.cxx src/Main/renderer.hxx
2009-07-02 08:59:16 +02:00
ehofman
90581f8bf0 changes matching those of generic.?xx 2009-06-23 10:54:09 +02:00
ehofman
879b4df9fc Return an error when not enough tokens are parsed for the generic protocol, that must be better than causing a segmentation fault. 2009-06-23 10:54:09 +02:00
Tim Moore
b588a92b7f adapt to changes in sg_exception interface
sg_location now uses C strings. Also, change uses of sg_throwable to more
specific exceptions like sg_io_exception.
2009-06-16 11:46:47 +02:00
timoore
f0bfb4d137 Realize viewer explicitly
The osgViewer needs to be "realized" so that, among other things, threading
will start. This is normally done by osgViewer::run, but we don't call
that.
Don't realize graphics contexts; Let osgViewer code do it. This way
osgViewer::isRealized returns the correct answer.
2009-06-15 11:25:06 +02:00
fredb
3b024e3dab Suppress warnings 2009-06-15 10:29:44 +02:00
frohlich
e837aefceb Remove old osg 2.2 code.
Modified Files:
	src/Main/renderer.cxx
2009-06-11 16:05:21 +02:00
jmt
e1583cb28c Update FGViewer position clients to work with SGGeod directly 2009-06-11 16:05:20 +02:00
jmt
2fa160d41a Replace plain doubles with SGGeod in FGViewer for position and target pos. 2009-06-11 16:05:20 +02:00
torsten
4aacda2390 new command line option --metar="some metar"
new handling of real-weather-fetch
major code cleanup
2009-06-03 00:18:56 +02:00
frohlich
28996902a1 Adapt to simgears changes.
The season is already checked by the properties.

Modified Files:
	src/Main/fg_init.cxx
2009-06-03 00:18:54 +02:00
fredb
8585b2c7b7 Functions should always return a value 2009-06-03 00:18:54 +02:00
timoore
8e1248e1e1 Add --enable-fpe option to cause a trap on floating point exceptions
Only on Linux for now; traps on divide by zero and "invalid", which includes
generating a NaN and overflowing an integer conversion.
2009-06-03 00:18:54 +02:00
fredb
7d1440adb8 Allows multi samples > 1 2009-05-18 12:24:16 +02:00
mfranz
095c710c0e leak fixes 2009-05-18 12:24:16 +02:00
torsten
7e3531ef5c Implementation of ridge lift from Patrice Poly based on an algorithm of Ian Forster-Lewis 2009-05-02 00:44:20 +02:00
ehofman
30ae6e0564 Let the fog color transition into the sky dome to give a more natural effect 2009-04-15 23:19:30 +02:00
mfranz
35ed31972a Csaba HALASZ: fix uninitialized _aspect_ratio member in Main/viewer.cxx 2009-04-01 09:23:54 +02:00
frohlich
5168166a9f Update with changes in simgear.
Modified Files:
 	src/Main/renderer.cxx src/Main/main.cxx
2009-03-18 08:00:09 +01:00
frohlich
183b871b48 Fix a problem with two concurent 'round to multiple of basic simulation
time' code paths. The problem may lead to skipped fdm updates at very high
frame rates. The most visible effect of that was that the aircraft
slips backwards wrt the forward moving carrier.
Remove unused stuff.

Modified Files:
	configure.ac projects/VC7.1/FlightGear.vcproj
	projects/VC8/FlightGearLib.vcproj src/Cockpit/cockpit.cxx
 	src/FDM/Makefile.am src/FDM/flight.cxx src/FDM/flight.hxx
 	src/FDM/SP/Balloon.cxx src/FDM/SP/BalloonSim.cpp
 	src/FDM/SP/BalloonSim.h src/Main/Makefile.am
 	src/Main/fg_init.cxx src/Main/main.cxx src/Time/Makefile.am
Removed Files:
 	src/Time/fg_timer.cxx src/Time/fg_timer.hxx
2009-03-18 08:00:09 +01:00
frohlich
aadf568c91 Remove unused stuff.
Modified Files:
 	src/Main/main.cxx src/Main/main.hxx
2009-03-18 08:00:09 +01:00
frohlich
a99ea1c7b5 Port over remaining Point3D usage to the more type and unit safe SG* classes.
Remove leftover headers from plib/sg.

Modified Files:
 	src/AIModel/AIBase.cxx
 	src/AIModel/AIFlightPlanCreateCruise.cxx
 	src/ATCDCL/AIEntity.cxx src/ATCDCL/AIEntity.hxx
 	src/ATCDCL/AIGAVFRTraffic.cxx src/ATCDCL/AIGAVFRTraffic.hxx
 	src/ATCDCL/AILocalTraffic.cxx src/ATCDCL/AILocalTraffic.hxx
 	src/ATCDCL/AIMgr.cxx src/ATCDCL/ATC.hxx
 	src/ATCDCL/ATCDialog.cxx src/ATCDCL/ATCProjection.cxx
 	src/ATCDCL/ATCProjection.hxx src/ATCDCL/ATCutils.cxx
 	src/ATCDCL/ATCutils.hxx src/ATCDCL/approach.cxx
 	src/ATCDCL/commlist.cxx src/ATCDCL/ground.cxx
	src/ATCDCL/ground.hxx src/ATCDCL/tower.cxx
 	src/ATCDCL/tower.hxx src/Airports/calc_loc.cxx
 	src/Airports/dynamics.cxx src/Airports/groundnetwork.cxx
 	src/Airports/parking.cxx src/Airports/runwayprefs.cxx
 	src/Airports/simple.cxx src/Cockpit/cockpit.cxx
 	src/Cockpit/hud.hxx src/Cockpit/hud_card.cxx
 	src/Cockpit/hud_rwy.cxx src/Environment/environment.cxx
 	src/FDM/UFO.cxx src/FDM/SP/MagicCarpet.cxx src/GUI/dialog.hxx
 	src/Instrumentation/HUD/HUD.hxx
 	src/Instrumentation/HUD/HUD_runway.cxx
 	src/Instrumentation/KLN89/kln89.cxx src/Main/fg_init.cxx
 	src/Main/viewer.cxx src/Main/viewmgr.cxx
 	src/Model/panelnode.cxx src/MultiPlayer/mpmessages.hxx
 	src/Scenery/tilemgr.cxx src/Traffic/SchedFlight.cxx
 	src/Traffic/TrafficMgr.cxx
2009-03-18 08:00:08 +01:00
frohlich
f9f9350b96 Adapt to SGTimeStamp changes.
Modified Files:
	configure.ac src/Cockpit/panel.cxx src/FDM/Makefile.am
	src/FDM/flight.hxx src/FDM/ExternalNet/ExternalNet.hxx
	src/Instrumentation/marker_beacon.cxx src/Main/Makefile.am
	src/Main/fg_init.cxx src/Main/main.cxx
	src/MultiPlayer/multiplaymgr.cxx src/Time/fg_timer.cxx
	utils/GPSsmooth/MIDG_main.cxx utils/GPSsmooth/UGear_main.cxx
	utils/GPSsmooth/gps_main.cxx
2009-03-18 08:00:08 +01:00
frohlich
7e73a87882 Improove FGTileMgr::scenery_available for small ranges.
Use SGGeod in FGTileMgr, FGScenery apis.

Modified Files:
	src/AIModel/AIBallistic.cxx src/Main/main.cxx
	src/Scenery/scenery.cxx src/Scenery/scenery.hxx
	src/Scenery/tilemgr.cxx src/Scenery/tilemgr.hxx
	src/Scripting/NasalSys.cxx
2009-03-18 08:00:07 +01:00
frohlich
f07e8a7e94 Avoid casts if there is a method for the apropriate job.
Modified Files:
	src/Main/main.cxx
2009-03-11 23:14:34 +01:00
frohlich
19331f2813 Fix problem introduced with yesterdays viewer change.
Modified Files:
	src/Main/viewer.cxx
2009-03-11 23:14:34 +01:00
frohlich
e51c8bdce9 Silence valgrind error.
Modified Files:
	src/Main/viewer.cxx
2009-03-11 23:14:34 +01:00
frohlich
b125315e50 Avoid SGLocation usage.
Again, the previous commit did not complete for some reason.

Modified Files:
        configure.ac src/AIModel/AIBase.cxx
        src/ATCDCL/AILocalTraffic.cxx src/FDM/Makefile.am
        src/FDM/flight.hxx src/FDM/LaRCsim/LaRCsim.cxx
        src/Main/Makefile.am src/Main/fg_init.cxx src/Main/main.cxx
        src/Main/viewer.cxx src/Main/viewer.hxx
        src/Scenery/tilemgr.cxx src/Scenery/tilemgr.hxx
2009-03-11 23:14:34 +01:00
frohlich
82b54e7a25 Avoid SGLocation usage.
Modified Files:
	configure.ac src/AIModel/AIBase.cxx
	src/ATCDCL/AILocalTraffic.cxx src/FDM/Makefile.am
	src/FDM/flight.hxx src/FDM/LaRCsim/LaRCsim.cxx
	src/Main/Makefile.am src/Main/fg_init.cxx src/Main/main.cxx
	src/Main/viewer.cxx src/Main/viewer.hxx
	src/Scenery/tilemgr.cxx src/Scenery/tilemgr.hxx
2009-03-11 23:14:34 +01:00
frohlich
30b05ee7a3 ompute some vectors from the current view when they are used.
Simplifies the update hell in the viewer a bit.

Modified Files:
	src/Main/renderer.cxx src/Main/viewer.cxx src/Main/viewer.hxx
	src/Time/tmp.cxx
2009-03-11 23:14:34 +01:00
frohlich
5f76fdd07a Use the positon from the model placment.
Use SGGeod based apis in the scenery/tilemanager.
Remove ground query that is no longer used.

Modified Files:
	src/Main/main.cxx
2009-03-11 23:14:33 +01:00
frohlich
ff2e5d5999 Zap compiler warning.
Modified Files:
	src/Main/options.cxx
2009-03-05 10:52:03 +01:00
frohlich
3efab8ddb8 Link with the bvh library. It is used from simgear up t o now.
Modified Files:
	src/Main/Makefile.am
2009-03-05 10:52:03 +01:00
mfranz
83edcb2949 add /sim/time/real/ (local machine time) analog to /sim/time/utc/
localtime() is once commented out in simgear/io/sg_binobj.cxx and
a warning says the it can screw up sim time. This is only because
localtime() isn't thread-safe (and its thread-safe cousin localtime_r()
isn't portable). As long as all timing is done in the main thread
(which is the case) there should be no problem. Otherwise we'd have
to implement a simple mutex locked wrapper.
2009-02-16 00:56:44 +01:00
Tim Moore
f9de92f53d merging in topic/makej
Merge branch 'topic/makej' into next

* topic/makej:
  get make -j to work
2009-02-13 12:36:06 +01:00
Tim Moore
28337e84fa get make -j to work 2009-02-13 12:33:23 +01:00
Tim Moore
43c47f3823 Merge branch 'maint' into next 2009-02-02 00:59:18 +01:00
mfranz
d9e9331422 do_save: s/reading/writing/ in the error message 2009-02-02 00:59:05 +01:00
mfranz
46d381cc87 x/y/z offsets are in m, not deg 2009-02-02 00:58:01 +01:00
durk
c6f88e5b9b Development for two new features:
* Some support for geometry information provided by the custom scenery
   project. Current support is for AI groundnets and runway use files only
   since this is a switch that involves a lot of data verification and
   updating, during the transistion the actual path where the data can be
   read from is user configurable. setting the property

   /sim/traffic-manager/use-custom-scenery-data to true

  will cause flightgear to read the ground networks from the scenery
  directory (--{fg-scenery}/Airports/[I]/[C]/[A]/[ICAO].groundnet.xml to be
  precise). Setting this property to false will retain the original
  behvior.
* For departing aircraft, runway takeoff calculations will be done on the
  basis of the performance database. For testing purposes, a performance
 estimate for a heavy jet has been added.
2009-02-01 23:44:10 +01:00
mfranz
5efca258c1 data hack: escalate some more; this disgusting hack must die *soon*! 2009-02-01 23:44:10 +01:00
mfranz
aa0dccf1e1 escalate warning for the ugly data hack 2009-02-01 23:44:10 +01:00
curt
d95f541528 Add a variant of the ARNAV (AV400) protocol to drive a Garmin 400/430/530
series GPS from FlightGear.
2009-01-21 09:55:33 +01:00
mfranz
1382c81dca add support for resizing mouse cursors
(except on OSX, where OSG uses a default)
2009-01-12 13:04:33 +01:00
mfranz
79ad3d44b8 create $FG_HOME/Export/ 2009-01-12 13:03:40 +01:00
Tim Moore
35396de6f8 Merge branch 'maint' into next 2009-01-10 00:12:49 +01:00
Tim Moore
da8dd13138 Change the near plane value back to .1
By popular demand...
2009-01-10 00:11:41 +01:00
Tim Moore
89010e6b0a Merge branch 'maint2' into next 2009-01-04 00:25:04 +01:00
timoore
2b0ffae339 Protect against divide-by-zero in setCameraParameters
Found by Csaba Halász
2009-01-04 00:24:49 +01:00
Tim Moore
0603aba9ae Merge branch 'tbm/graphics-bug' into next 2009-01-04 00:03:26 +01:00
timoore
61a496c2ea Set far camera reference frame to ABSOLUTE_RF
This was lost when I stopped cloning the near camera to make the far
camera. The result was a lot of breakage, including explicit camera
configurations not working and various ordering issues too.
2009-01-03 23:56:58 +01:00
timoore
ada7f622d7 Change the order of the main cameras from NESTED_RENDER to POST_RENDER
This seems to be accepted OSG usage for slave cameras. It's possible
that this order is important for rendering instruments that use RTT
textures on systems without frame buffer object support. I'm thinking
that the resulting bugs may be implicated in the "black rectangle" problem.
2009-01-03 23:56:03 +01:00
timoore
60e8f14d5b Don't clone far camera; create a new one and initialize it from the near camera
The clone operation may be sharing things that shouldn't be shared.
2009-01-03 23:55:44 +01:00
timoore
d43e0b83f7 Expose the CameraGroup near, far, and near/far boundry as properties
The near/far boundary, called "near-field", can be set to 0 which
disables the far camera and renders the whole scene using only one
camera. I'm hoping that this may be useful in resolving some
system-specific rendering bugs.

Various fixes were made to correctly render the scene using only the
near camera.
2009-01-03 23:53:04 +01:00
jmt
f1b10eddfa FGAirportList is gone. Everything should work as before, especially the
AirportList dialog. (It would now be possible to trivially implement a
VOR or NDB named search, if anyone wants such a thing).
2008-12-27 13:20:08 +00:00
jmt
0f4f044a94 Kill off many Point3D includes, and a couple of uses in the HUD code.
Requires a SimGear update to get some new SGGeodesy helpers.
2008-12-26 12:28:05 +00:00
jmt
988de9dbca Remove all name and spatial queries from FGNavList. All remaining queries are
by frequency (which makes sense), and use the FGPositioned spatial data if
required. As a result, the marker beacon list is gone (since beacons are only
searched spatially). In the process, clean up various minor things - most
notably, all the 'airport-related' navaids (ILS, GS, LOC, and the beacons) now
store a FGRunway* instead of an airport id string. This is more precise, and
saves string allocations.
2008-12-25 23:11:43 +00:00
jmt
059f2e6a8e Convert the only remaining user of FGFixList to use an FGPositioned query,
and hence remove the query code from fix-list. The only remaining code deals
with parsing fix.dat.
2008-12-23 14:41:58 +00:00
mfranz
163e593331 viewer position: tie variables directly, rather than getter functions 2008-12-20 12:49:37 +00:00
curt
231225da67 Attempt to sort out the version number mess in preparation for the v1.9.0
release.
2008-12-19 20:41:57 +00:00
mfranz
df0f0a531f export absolute viewer coordinates 2008-12-19 13:37:54 +00:00
mfranz
4560580a4d now that /environment/weather-scenario is respected at startup, we
actually have to set it to get live weather.
--enable-real-weather-fetch shall imply weather-sceneario=METAR.
2008-12-18 13:08:44 +00:00
timoore
a6909b4ada fix some backslashes in include file names 2008-12-09 14:34:30 +00:00
fredb
e2bf85e67e James Turner : this patch
- updates how filtering is done on the various FGPositioned query functions - both spatial and ident-based.
- updates the KLN-89b / DCLGPS code to use FGPositioned for all Navaid/Airport queries.

me:
Add few include directives in globals.cxx to avoid such MSVC warning messages :
deletion of pointer to incomplete type 'FGAirportList'; no destructor called
deletion of pointer to incomplete type 'FGNavList'; no destructor called
deletion of pointer to incomplete type 'FGTACANList'; no destructor called
deletion of pointer to incomplete type 'FGFixList'; no destructor called
2008-12-09 07:58:46 +00:00
curt
ebea9d798e Loosen the check for stationary versus moving view point. I some cases when
the view has an "offset" location, the actual location of a "stationary" view
point moves a small amount as the view direction rotates.
2008-12-01 16:13:12 +00:00
timoore
68c06775c8 Make computeIntersections work with the near and far cameras 2008-11-26 09:02:48 +00:00
timoore
5f7441f778 Restore camera properties on reInit
From Tatsuhiro Nishioka
2008-11-25 22:50:20 +00:00
timoore
723a1e4397 Fix some viewport problems on startup
From Csaba Halász
2008-11-21 23:11:27 +00:00
timoore
52c46e65a1 Use simgear clone function instead of OSG's.
This should remove a dependency on an unreleased version of OSG (2.7.3).
2008-11-21 14:53:37 +00:00
timoore
1955e5bd28 Don't call idle and draw functions from FGEventHandler::handle.
These functions are now called in fgOSMainLoop. The fgMainLoop
function was being called twice, which resulted in a slow-down, but
also caused the displayed frame rate to double!
2008-11-20 11:01:05 +00:00
timoore
8afab2045b Update osg::Camera's viewport when it is created.
This fixes a problem where /sim/startup/[xy]size were not set properly
because the GUI camera's viewport was not correct at startup.
2008-11-19 22:55:42 +00:00
mfranz
12cf1c41ad add "add-model" command, which adds model properties to the first
free /models/model[*] slot and lets the model manager load the
model. The target address is returned under "property". Simple
use in Nasal:

  fgcommand("add-model", props.Node.new({
          "path": "Models/Fauna/cow.ac",
          "latitude-deg": 16.234,
          "longitude-deg": 48.321,
          "elevation-ft": 300,
  });

An "elevation-m" property can alternatively be used and overrides
the "elevation-ft" property.

Each of the properties "latitude-deg", "longitude-deg", "elevation-ft",
"heading-deg", "pitch-deg", and "roll-deg" can alternatively be used
with "-prop" suffix. Their values must then be property path strings
pointing to a node that can be changed at runtime to move the model.
2008-11-19 15:59:54 +00:00
mfranz
54744f58e0 Update the model manager after the event manager, so that model
coordinates that were set relative to the aircraft's position
are picked up before the view update rather than the next cycle.
This avoids ugly fluttering of "passengers" at higher speed.
2008-11-19 07:46:10 +00:00
timoore
4e047d456f Update the camera properties after a resize event. 2008-11-18 22:46:19 +00:00
timoore
4f4434787f Cleanup of camera code in preperation for shadows
Partition depth in CameraGroup:
Remove the ViewPartionNode scenegraph node. The split rendering of the
scene, done to avoid Z buffer precision problems, is now done by two
slave cameras of the viewer.

Rename FGManipulator to FGEventHandler.

Remove virtual member functions that aren't required for event handlers.

Begin using camera group properties to update cameras at runtime;
Initially only the viewport properties are used.

When no camera group is found in the property tree (the default),
create the properties for one. Expose the default window by name.

Add a test for Boost headers to configure.ac. Boost is now a
dependency.

Remove GLUT and SDL versions of the OSG graphics.
2008-11-18 22:45:57 +00:00
curt
4529449b83 Incremental improvement of openal sound velocities. This should help
stabilize some of the odd artifacts we were hearing, that were especially
noticable in clean sound samples like the stall horn or the marker beacon
codes.  The change still preserves the doppler effect and maintains the
good work of a previous developer figuring out how to align the model and
listener velocity vectors correctly.
2008-11-10 15:59:14 +00:00
curt
e8ff28f9f8 Tidy up for a source code "snapshot" release. 2008-10-30 18:35:44 +00:00
timoore
5592bb326f Don't allow negative values as argument to pow().
This was a source of a spew of "NaN" error messages at night when the
sun is at a large angle to the zenith. I don't know why this wasn't a
problem before now.
2008-10-28 12:10:27 +00:00
timoore
fe83ba7110 Disable on-screen statistics for the GUI camera 2008-10-28 12:10:01 +00:00
mfranz
76b609738f set /sim/rendering/particles as global particle switch 2008-10-17 21:25:03 +00:00
mfranz
c3b1d4e806 .rgb -> .png for generic splash textures 2008-10-14 06:11:44 +00:00
mfranz
a29ee7c257 warn about badly set fg-root 2008-10-02 08:33:49 +00:00
mfranz
b6a354980d make isatty() available for stdout/stderr (hope it works on MS Windows) 2008-10-01 15:03:53 +00:00
fredb
9ebb9128c8 MINGW patch by Csaba Halasz, reworked by me to avoid breaking MSVC or Cygwin build 2008-09-28 08:27:32 +00:00
ehofman
49030e700b Add the alpha test back in so the instruments won't disappear after changing the view direction 2008-09-14 09:34:17 +00:00
fredb
dddbbf7954 Compile again with MSVC. APIENTRY not defined after last changes 2008-09-13 08:41:22 +00:00
ehofman
fe020badf0 James Turner:
By way of example, here's a patch to make the position init code (in fg_init.cxx) cleaner, partly thanks to the FGPositioned changes. It reduces the file size by 200 lines - virtually all of which was copy-and-paste. Once the remaining class (FGAirport) is converted to inherit FGPositioned, all the future patches should be like this - touching one or a few files at most.

This factors the start-offset logic out into a helper, which also does the final property setting (which has to happen on both the /preset and 'real' values). Using the accessors in FGPositioned, and the offset helper, a couple of cases become trivial (fix and nav) and others become much simpler.
2008-09-13 08:06:15 +00:00
ehofman
bb2b03c7e3 James Turner:
Convert FGNavRecord to inherit FGPositioned. This is much more self-contained than the FGRunway change, since FGNavRecord already had good encapsulation of its state. However, it's a large diff due to moving around two nasty pieces of code - the 'align navaid with extended runway centerline' logic and the 'penalise transmitters at the opposite runway end' logic.

In general things are more readable because I've replaced the Navaid type enum, and the use of Robin's integer type codes, with   switches on the FGPositioned::Type code - no more trying to recall that '6' is an outer marker in Robin's data. The creation code path is also pushed down from navdb into navrecord itself.
2008-09-12 08:46:15 +00:00
timoore
398c4c25d0 remove cruft 2008-09-11 10:28:28 +00:00
ehofman
aa78341698 James Turner:
Convert FGRunway to be heap-based, and inherit FGPositioned. This is a large, ugly change, since FGRunway was essentially a plain struct, with no accessors or abstraction. This change adds various helpers and accessors to FGRunway, but doesn't change many places to use them - that will be a follow up series of patches. It's still a large patch, but outside of FGAirport and FGRunway, mostly mechanical search-and-replace.

An interesting part of this change is that reciprocal runways now exist as independent objects, rather than being created on the fly by the search methods. This simplifies some pieces of code that search for and iterate runways. For users who only want one 'end' of a runway, the new 'isReciprocal' predicate allows them to ignore the 'other' end. Current the only user of this is the 'ground-radar' ATC feature. If we had data on which runways are truly 'single-ended', it would now be trivial to use this in the airport loader to *not* create the reciprocal.
2008-09-11 08:38:09 +00:00
ehofman
3b486e1aee James Turner:
Here's part 2 - converting FGFix (the simplest one) to be both heap-based and inherit FGPositioned. One minor benefit from this is replacing some dangerous code in FGFixList which used to return the address of an iterator member ('&it->second'). To keep the diff a sensible size, I'm not updating the callers to use the richer FGPositioned types - i.e replacing separate lat/lon handling with SGGeod. I will make those cleanups, but in future patches.
2008-09-10 08:54:49 +00:00
ehofman
eada914350 Commit the proper patch stupid :( now with the positioning and orientation code included... 2008-09-05 19:46:21 +00:00
ehofman
2963b90195 revert the move of the sound positioning code, at least till i found out why it doesn't work this way. 2008-09-05 11:05:21 +00:00
ehofman
a6f885b1fb Move the soundmanager update code back to the main loop, just prior to updating all the SGSubsystems. Hopefuly this silves the sound problem. 2008-09-05 09:18:33 +00:00
fredb
b53badf201 Stefan C. Mller :
Small patch fixing bugs I've encountered while getting the current CVS to build in MSVC.
* std::lower_bound was used with the key-type of a map, but lower_bound expects the value-type of the collection it works on, with is std::pair. MSVC seems to be more strict about this.
* Added an missing include statement.
* Replaced an rint() call with floor() (MSVC does not offer rint).
2008-08-31 18:32:43 +00:00
ehofman
da96156c30 Move SGSoundMgr stuff oevr to FGFX 2008-08-21 14:26:27 +00:00
durk
301054204e James Turner: Improved runway management code:
- Runways are now part of an airport, instead of a separate list
 - Runways are no longer represented as a boring struct, but as a class
   of their own.
 -Improved runway access to unify various runway access methods.
2008-08-14 18:13:39 +00:00
timoore
0d0bd58268 Allow generic file protocol to terminate fg after a number of repetitions. 2008-08-07 22:24:47 +00:00
timoore
b1dd2eed8c Restore sky
Don't clear BACKGROUND_BIT in the master camera's cull
mask. ViewPartitionNode does that where needed.
2008-08-02 22:32:55 +00:00
fredb
e5201fbb70 MSVC 7.1 fix 2008-08-02 10:01:08 +00:00
timoore
6f802959ce CameraGroup class for managing multiple cameras.
CameraGroup supports cameras opened in different windows or in the
same window, with flexible view and perspective specification.

Clean up mouse click handling via osgViewer. Don't let any camera
"have focus;" this forces events to be reported in window coordinates
and simplifies life. Don't use the osgViewer::View::requestWarpPointer
method; instead use our own code which only deals with window
coordinates.

Make glut and sdl versions work with CameraGroup too.
2008-08-01 15:57:29 +00:00
ehofman
14885374de header cleanups 2008-07-31 12:04:32 +00:00
timoore
7f49272e5e Explicitly set traversal mask for near camera.
Don't depend on camera inheritance; set the mask in the traverse() method.
2008-07-31 09:20:35 +00:00
timoore
f08e16cd55 Changed ViewPartition to use two cameras instead of three.
I thought that this would fix the "black hole in the sky" problem,
which turned out to be caused by an OpenSceneGraph bug. Nevertheless
it is a simplification.
2008-07-29 11:18:21 +00:00
ehofman
429f2530de James Turner:
* experimental clean-up / reduction on two of the FG headers:
   (I'm going to await feedback on the developers list before doing more of
    these, to avoiding going over files multiple times, but in principle it
    seems pretty straightforward.)

 * final fixes for SG_USING_STD removal
2008-07-29 08:27:48 +00:00
ehofman
667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
   extensions.hxx was pulling in all of Carbon to the global namespace
   - very scary. As a result, I now need to explicitly include CoreFoundation
   in fg_init.cxx.
 - change SG_USING_STD(x) to using std::x
2008-07-27 16:25:13 +00:00
fredb
3db0cf1659 Remove unneeded inclusions of windows.h, GL.h and GLU.H 2008-07-27 15:18:34 +00:00
fredb
41f7fc256c Remove unused variables 2008-07-27 09:45:33 +00:00
mfranz
b68b751fd4 get rid of mouse.cxx and pu{Show|Hide}Cursor() 2008-07-27 09:39:10 +00:00
ehofman
46ae218672 remove all the FX and XMESA cruft relating to Glide support. 2008-07-27 07:54:13 +00:00
durk
f20136d00f But I do think we need to remove *this* reference to BaloonSim. :-) 2008-07-26 07:33:15 +00:00
fredb
25bda87015 Balloon and MagicCarpet already moved to SP_FDM 2008-07-25 21:56:49 +00:00
ehofman
d9bfd5a425 This should apply, and everything should build cleanly, in isolation from the
SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets
rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than
replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed
the small number of places to use std:: explicitly. So we're no longer polluting
the global namespace with the entire contents of std, in many cases.

There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X),
but I want to keep that separate from everything else. (There's another
mechnical change, replacing <math.h> with <cmath> and so on *everywhere*, but
one step at a time)
2008-07-25 18:38:29 +00:00
ehofman
eccddb3dfd Attached patches remove BORLANDC, and hence SG_MATH_EXCEPTION_CLASH and SG_INCOM
PLETE_FUNCTIONAL from SimGear and FlightGear.

As a result, SG_HAVE_STD_INCLUDES is now *always* set, so I will get the boring
fixes for that done, but separately. I'm still auditing the other things in comp
ilers.h - there's a lot that can die now BORLAND is gone.
2008-07-25 10:39:53 +00:00
ehofman
c8a9fd2bd4 Some Mac / __APPLE___ cleanups:
- remove the OSX_BUNDLE crap *I* introduced years ago - we're always a a bun
dle on Mac now.

    - fix up the default fg-root on Mac to be FlightGear.app/Contents/Resources/
data - i.e the location used by the macflightgear.org distro, and indeed the obv
ious 'correct' location. Not sure why I didn't use that in the first place, back
 in the day.

    - remove the CPSForegroundEnable hack. For one thing, we're a bundle and don
't need it, and for another, osgViewer on Mac does the same logic using a newer,
 public API rather than a hack into the OS.

    - remove the strange logic for doing fgOSInit 'early' (in bootstrap rather t
han main) when running from the command line on Mac; again this is obsolete, and
 no one seems to know why it was ever necessary. I guess it was an interaction w
ith SDL when running without a bundle.

    - (not Mac related) remove obsolete code bracketed by ENABLE_PLIB_JOYSTICK a
nd USE_GLIDE (neither of which are ever set, even from config.h that I can see)
in main.cxx
2008-07-25 08:39:28 +00:00
ehofman
6c4061bdc5 Remove the remaining macintosh (not MacOS-X) and MWERKS workarounds. 2008-07-25 07:29:20 +00:00
mfranz
5033779192 - use path validation for parsexml() nasal command
- util.cxx: add comment
2008-07-22 20:26:17 +00:00
timoore
79e6712d7e Add repeat capability to input from files. 2008-07-19 16:23:05 +00:00
fredb
03a180ac83 Restore code after unwanted change in last commit 2008-07-17 21:32:20 +00:00
fredb
4b50a369c8 SIGPIPE is a unix thing 2008-07-17 21:28:43 +00:00
mfranz
ba27bab1b2 make sure that the validation nodes are readable and writable 2008-07-17 08:38:13 +00:00
mfranz
f79dbc23bf ignore SIGPIPE. If we pipe our output to another application, let's say
to kst, and kst is closed, this does *not* mean that we want FlightGear
to "abort".
2008-07-15 16:55:23 +00:00
durk
17c42deae1 Initial attempt to establish a better integration between AI and ATC code.
Various other patches that have been lingering around for a while:
 * Moved trafficcontrol.[ch]xx from the Airports directory to ATC, where
   it really belongs.
 * AI aircraft will request startup clearance, and ground control will
   approve.
 * Starting AI Aircraft will be pushed back to a predefined holding point
   on the ground network, and wait a while before taxiing out to the runway
2008-07-13 12:51:06 +00:00
mfranz
44fdf77601 "load"/"save" flight: enforce ".sav" extension 2008-07-11 20:55:43 +00:00
mfranz
76a13e689d use same path validation process for fgcommands "load", "save",
"loadxml", ans "savexml" as is used for io.open(). This is still
Nasal based for now. See $FG_ROOT/Nasal/io.nas.
2008-07-11 16:36:54 +00:00
mfranz
1ace68e836 don't run the help browser from a property that a user could have
changed to something evil, but rather make sure that the browser
string can be trusted. (TODO: change system() to vfork()/execvp() ?)
2008-07-09 19:35:53 +00:00
mfranz
1b062a1cf0 let the --prop: option overwrite write-protected properties
("The user is always right, but not always bright.")
2008-07-09 15:09:23 +00:00
mfranz
9f571a0f00 remove depreciated gui_local.[ch]xx:
- drop unused parts (MouseQuat/GuiQuat)
- move "old-reinit-dialog" fgcommand to fg_command.cxx under new name
  "reset" for now. (May later get merged with fgcommand "reinit".)
- move reInit() to fg_init.cxx: This was used by Shift-Esc and
  Menu->File-Reset (via fgcommand "old-reinit-dialog"). We have already
  a similar function fgReInitSubsystems() in fg_init.cxx, so these two
  functions will probably get merged later.)
2008-07-09 12:22:33 +00:00
mfranz
889f3926f2 - make sure /sim/fg-current can't get preset and write protected, so
it's reliable at Nasal init time.
- make sure the cwd buffer is terminated
2008-06-22 11:29:32 +00:00
mfranz
88839f0b7a set_fg_root: prevent circumvention of the Nasal security code through
pre-setting and write-protecting /sim/fg-root in *-set.xml files
2008-06-16 07:46:55 +00:00
mfranz
afc5225272 - allow users to set fg-home dir via FG_HOME environment variable, but
- don't allow to do that from any XML file. This is to prevent malign
  code from writing a new fg-home in ~/.fgfs/autosave.xml or other files
  in ~/.fgfs/.
2008-06-13 10:52:47 +00:00
timoore
876bd2055c Don't add guiCamera, which is now a slave, to the scene graph. 2008-06-08 20:50:30 +00:00
timoore
18bece731a Fix GUI and HUD text rendering problems.
After the changes that moved the GUI and HUD to a slave camera, the
texture-based fonts wouldn't display. The main fixes here are making
sure that the TXF textures are all loaded into the font cache early,
and explicitly setting the active texture unit in the GUI / HUD
drawImplementation.
2008-06-06 19:02:17 +00:00
mfranz
b27f73f4f4 make route manager input case insensitive 2008-06-06 07:49:41 +00:00
timoore
32e9505eed Clean up header file use of iostream and "using" declarations
Replace include <iostream> with istream, ostream and/or iosfwd as
appropriate.

Remove using namespace std and using std::foo from header files.
2008-06-02 21:09:51 +00:00
timoore
fe1dd9474e iostream cleanup wip 2008-06-02 21:09:10 +00:00
timoore
a251fd35cb Include <iostream> and using declarations as needed.
SimGear no longer includes iostream and avoids using declarations in
header files, so various fixups are needed.
2008-06-02 21:07:35 +00:00
frohlich
61dc8df110 Implement rotation offsets for cameras. 2008-05-26 20:34:26 +00:00
fredb
cc8c65a6ee puInitialize returns nothing. 2008-05-20 06:35:37 +00:00
timoore
580ebf637b Clean up OSG camera setup and interface to plib PUI
Switch to defining PU_USE_NONE and providing our own callback
functions to pui for "get window" and "get window size." A new
WindowSystemAdapter class assigns ID numbers to windows for the
purpose of identifying them to plib; the window size can be extracted
from the osg::GraphicsContext class in all the different
implementations (osgViewer, glut, sdl).

Implement a GraphicsContextOperation that runs code in a particular
graphics context, perhaps in another thread, and provides an
isFinished() method to test if the operation has finished. This allows
us to initialize plib PUI properly if there are multiple graphics
contexts without using fgMakeCurrent(). fgMakeCurrent() can't work in
multi-threaded OSG configurations.

Eliminate fgMakeCurrent() and all its uses, either by using
GraphicsContextOperation or by seeing that it is not necessary.

Attach the GUI camera as a slave camera.

Don't manipulate the OSG state in the drawImplementation() functions
for SGHUDAndPanelDrawable and SGPuDrawable; it's not needed.
2008-05-19 21:21:03 +00:00
mfranz
c92dcc6b24 - use fireValueChanged() instead of setBoolValue(true) (micro-optimization :-)
- comment out rather pointless FDM status message
2008-05-18 21:13:25 +00:00
timoore
4dea9807f6 fg: move most scenery-related code to simgear
From Till Busch.
2008-05-14 22:10:07 +00:00
durk
ee405fbdd0 Make sure that the compiler knows about the new location of the ATC code. 2008-05-12 14:58:43 +00:00
durk
4e24fba0d5 Merging David Luff's AI/ATC code with AIModels. Part 1:
- Move Dave's original code to a new directory (ATCDCL) so we can recycle
    the original ATC directory for generic ATC functions.
2008-05-12 10:38:04 +00:00
mfranz
a6a78b7185 - rename fgcommand "set-mouse" to "set-cursor"
- write new {x,y} coords to /devices/status/mice/mouse/{x,y}, so that
  they are immediately available
2008-05-08 10:07:51 +00:00
mfranz
60dc921a80 add fgcommand "set-mouse", which sets mouse coordinates and cursor type 2008-05-07 21:49:35 +00:00
mfranz
ff06e015c9 read runway start offset from /sim/airport/runways/start-offset-m
(Defaults to 5.0, which was hard-coded before. /sim/airport/runways/
does already exist and contains the runway search parameters.)
2008-05-02 21:31:30 +00:00
mfranz
ad2788bf74 add unit suffixes -nm and -deg to /sim/presets/offset-{distance,azimuth} 2008-05-01 21:14:02 +00:00
mfranz
2ece66aded - improve comments (contents and spelling)
- fix bad indentation (mixed 2/4 spaces or tabs/spaces)
2008-04-29 14:49:44 +00:00
mfranz
c8f2013c77 Nicolas: make screenshot target dir configurable (idea and first draft)
--prop:sim/paths/screenshot-dir=/tmp
2008-04-26 22:34:46 +00:00
mfranz
8f509ba82a restore NumPad translation 2008-04-26 17:01:08 +00:00
mfranz
160e246a0c add hyper support 2008-04-25 23:21:47 +00:00
mfranz
dd3fbd50d8 after OSG 2.4 upgrade, remove modifier workaround and comment out numpad
workaround (we have yet to verify if the latter is really obsolete)
2008-04-25 22:45:43 +00:00
timoore
de277df8b8 make --enable-osgviewer the default
From Till Busch
2008-04-25 21:29:03 +00:00
mfranz
5588acbd42 - make online stats mode directly settable, rather than just in steps
- cosmetics: put each argument list member in a separate line, so that
  one doesn't have to break lines again whenever one inserts a new
  member
2008-04-21 14:18:30 +00:00
mfranz
b61cc37e30 - let the OSG on-screen-statistics function no longer be hard-coded
on the '*'-key, but allow to cycle it by setting
  /sim/rendering/on-screen-statistics to "true"
- move that function to the Debug menu (no more key assigned!)
- add "print-statistics" menu entry
2008-04-20 18:24:52 +00:00
durk
8055c315ac Torsten Dreyer: Check whether a valid graphic context has been created
before using a camera.
2008-04-19 10:28:07 +00:00
timoore
ebf2e996e9 Fixes for compiling with gcc 4.3
Include standard header files and qualify with std:: where needed.

Qualify various char parameters and variables with const.
2008-04-13 21:12:36 +00:00
timoore
fd492a297a model paging patch from Till Busch
From Till:
i started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.

currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there

2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.

3. simplify mode-loading functions (avoid passing around fg_root)

4. avoid supurious MatrixTransform nodes in loaded models

5. fix some memory leaks
2008-03-22 09:31:06 +00:00
mfranz
d03e63a059 remove debug message :-) 2008-03-15 12:52:22 +00:00
mfranz
fa30b79576 add --version option that works something like this:
$ fgfs --version
  2.0pre-20080314
  FG_ROOT=/usr/local/share/FlightGear
  FG_HOME=/home/foo/.fgfs

... assuming that VERSION in config.h is "2.0pre-20080314". Which it isn't.
Instead it's "1.0.0" since yesterday, and was "0.9.10" before that. This
has yet to be discussed, and I'll add the option to options.xml later.
2008-03-15 12:10:44 +00:00
mfranz
e5c22e159f Tatsuhiro NISHIOKA: "enables osgviewer version of FlightGear to show
window frame, menubar, and Docks properly" (Mac OSX)
2008-03-12 12:38:54 +00:00
mfranz
f375f649c1 remove redundant --airport-id option (OK'ed by Curt, no longer used by fgrun) 2008-03-10 17:08:37 +00:00
timoore
b8de58bcdd cleanup of precipitation contribution
Reindent to Stroustrup style.

Make FGPrecipitationMgr an SGSubsystem and remove all references to it
in main.cxx and renderer.cxx.

Use SGGeod::makeZUpFrame instead of a private function in
tileentry.cxx. Rewrite that function, WorldCoordinate, to use
makeZUpFrame too.
2008-03-04 09:03:54 +00:00
timoore
eb26cb3590 precipitation effects from Nicolas Vivien 2008-03-04 09:02:24 +00:00
fredb
482f1db990 Csaba Halsz :
Makes it possible to start at a parking location defined in the AI/Airports/*/parking.xml files, using the parkpos command line option.
Note that the name to pass is the concatenation of the "name" and "number" fields in the xml.
2008-02-28 21:39:25 +00:00
mfranz
366178f801 Change update order to event manager -> view manager -> io manager.
This allows Nasal managed views thanks to the proximity of the
event manager (which executes Nasal loops). The io manager must
come after the view manager to avoid jitter in network replay.
2008-02-25 12:59:24 +00:00
mfranz
0bca82cb6c revert revisions 1.246 to 1.248. This fixes the jitter for chase
view in network replay, and re-introduces jitter in some (rare)
cases of Nasal managed views.
2008-02-23 09:45:56 +00:00
mfranz
b99a5465b0 Csaba HALASZ: implement conditional (e.g. seasonal) texture loading at startup 2008-02-15 17:54:23 +00:00
timoore
bb90bb4466 Call particle initialization code in simgear namespace 2008-02-15 06:45:38 +00:00
timoore
113be9d8be particles from Tiago_G 2008-02-15 06:45:19 +00:00
durk
ecc6548d71 cygwin related fixes, and some minor future release related maintenance
work.
2008-02-04 20:03:52 +00:00
fredb
fc55979c34 near and far are #defined in MSVC 2008-01-26 07:48:05 +00:00
timoore
b47157041e Fix main window aspect ratios other than 4/3
This also fixes distortion weirdness in the osgviewer version. That
was caused by osg::GraphicsContext getting in the act on resize events
and adding its own scaling to the projectionOffset of slave cameras!
2008-01-25 18:44:45 +00:00
timoore
00f8463ab4 Another round of memory leak fixes from Till Busch 2008-01-24 23:05:58 +00:00
mfranz
f754d42fcf remove last traces of PSL 2008-01-23 13:03:50 +00:00
andy
2679517fff OS X build fixes from Hans Fugal 2008-01-09 19:59:56 +00:00
timoore
1066c6b23a cleanup of dead code and change ViewPartitionNode::makeNewProjMat be public static 2008-01-06 23:03:19 +00:00
timoore
4208cf8226 Add ViewPartionNode to the scenegraph
ViewPartitionNode addresses Z-fighting issues by rendering near and far
parts of the scene seperately.
2008-01-04 07:35:43 +00:00
curt
9f9d2f934a Return the --fov= to it's original functionality. 2007-12-29 21:51:39 +00:00
frohlich
e81af16b75 Modified Files:
src/Main/renderer.cxx: Use osg::Hint instead of glHint.
2007-12-26 20:33:55 +00:00
frohlich
b69ec6fceb Modified Files:
fg_os_osgviewer.cxx: Use the DISPLAY environment variable
	if not set otherwise.
2007-12-26 12:19:20 +00:00
timoore
d5ba35dddb Remove references to SceneView and CameraView 2007-12-22 23:26:56 +00:00
timoore
853e371d1e Fix for "falling through ground" problem
The LOD far range on the tile entry scenegraph node was initialized to
0. This meant that any traverals of active children that happened
before the tile manager updated the node would ignore the node
altogether. Among these is the groundcache traversal which was failing
at startup even though scenery was loaded.

Also added a function to dump scene graph nodes to files; very handy
in gdb.
2007-12-20 23:20:51 +00:00
timoore
17b321c44f Set up pager in GLUT embedded osgViewer 2007-12-14 22:52:15 +00:00
timoore
616b2bf4f6 Use the OSG DatabasePager instead of FGTileLoader
Make an OSG file reader for .stg files.

New class flightgear::SceneryPager, which is a subclass
osg::DatabasePager to handle explicit delete requests.

Modify FGNewCache, FGTileEntry, and FGTileManager to use
SceneryPager. Mostly this involved removing the queues that talked to
FGTileLoader.

Calculate accurate tile timestamps from the time they are traversed in
the cull stage (which means that they are visible) instead of updating
them periodically.

Replace tile entry transform and range node with one LOD node
2007-12-14 22:51:56 +00:00
timoore
149419386d Update GroundLightManager
Also use GroundLightManager to manage light node masks.
2007-12-13 23:30:54 +00:00
timoore
3b26a3219c Fix mouse warping for embedded osgviewer in SDL
As in the GLUT implementation, let the FGManipulator drain its event queue.
2007-12-12 22:36:23 +00:00
timoore
1ec9d615ff Handle warped pointer in embedded GLUT osgViewer
Signal the FGManipulator that a warp has occured so that it can drain its
event queue, but otherwise no warp handling is done in GLUT specific code.
2007-12-12 08:24:27 +00:00
durk
50ba7b93b8 Make sure fgfs finds the correct version of the base package. 2007-12-11 21:48:00 +00:00
mfranz
b0cd31415a Tatsuhiro NISHIOKA: initialize classes (fixes segfault on exit on MacOS) 2007-12-10 19:17:57 +00:00
timoore
3426e3cde3 Changed GLUT support to use an embedded osgViewer too 2007-12-07 09:11:46 +00:00
mfranz
2d6f38505d make the state of the Meta and Super modifier keys available. These keys
are not available out-of-the-box on all systems and keyboards, and should
therefore not be used in files committed to CVS. This makes them well
suited for local key bindings, as they aren't likely to get overwritten
with later releases. SDL supports Meta and Super, OSG supports only Meta,
and GLUT supports neither.

(Somehow this part escaped the previous commit. :-)
2007-12-02 10:36:58 +00:00
mfranz
9fa86acc65 make the state of the Meta and Super modifier keys available. These keys
are not available out-of-the-box on all systems and keyboards, and should
therefore not be used in files committed to CVS. This makes them well
suited for local key bindings, as they aren't likely to get overwritten
with later releases. SDL supports Meta and Super, OSG supports only Meta,
and GLUT supports neither.
2007-12-01 13:09:11 +00:00
timoore
ae8509c827 Rewrite SDL code to use an embedded osgViewer.
This uses the osgViewer infrastructure instead of setting up and osg::SceneView.
When the same change is made for glut, much of render.cxx can be deleted.
2007-11-30 00:01:01 +00:00
timoore
49f7330150 move callback registration functions to fg_os_common.cxx 2007-11-30 00:00:36 +00:00
mfranz
d76f26dcea Tiago GUSMAO: keep sound muted after pause/unpause 2007-11-24 08:40:04 +00:00
curt
8f64d4820c Add a command to dump just the terrain portion of the scene graph to a .osg
file.  Possible uses of this functionality could include converting the
model to some other format or coordinate system for use in some other
visualization or simulation.
2007-11-21 20:51:49 +00:00
mfranz
9ce320c558 initialize release_keys array 2007-11-17 17:38:48 +00:00
mfranz
8ec42c1aae - move temporary keyboard fix from input.cxx to fg_os{,_sdl}.cxx.
This is required to make sure the same letter key gets released,
  which got the press event. (After Ctrl-press -> a-press -> Ctrl-release
  a-release we want the Ctrl-a binding released, not the a binding.)

- add key listener interface for direct key access from Nasal space
2007-11-12 19:29:08 +00:00
mfranz
5b76cb5409 also copy name & type to /sim/current-view
That's useful for animations, and we can't rely on numbers. And shouldn't.
2007-11-09 17:43:22 +00:00
mfranz
2d23ccd650 mainloop: move event_mgr and viewmgr updated before spatial sound calculations 2007-11-07 15:57:38 +00:00
mfranz
271487328a move event_mgr and view_mgr bundle right before the requestRedraw()
This fixes the last jitter problems with views attached to MP/AI
objects, and doesn't seem to cause any new ones.
2007-11-06 21:05:38 +00:00
mfranz
0ad534b55d change update order to fdm -> events -> viewmanager
This removes some jitter in cases where Nasal is used to set up view
parameters from FDM data, such as position and orientation. (The event
subsystem handles Nasal's settimer() calls.)
2007-11-06 12:01:29 +00:00
mfranz
7810fbc632 revert swapping of x & y offsets in "lookat" mode
This was correct in the old repository and in revision 1.1 of the new,
but then broken in revision 1.2. After that, "lookat" and "lookfrom"
mode used different coordinate systems, and the "Adjust View Distance"
didn't work correctly in "lookat" mode.
2007-11-05 22:19:39 +00:00
mfranz
5d8e5f29e0 Csaba HALASZ: fix IVSI instrument problem
"I have been investigating the Concorde IVSI problem. I came to the
conclusion that the trouble is that the environment altitude and thus
the pressure (which is calculated from that) is lagging by 1 frame.
Normally that wouldn't be a problem, but the IVSI calculates rate of
change and it will use the new dt with the old value difference,
thereby arriving at bad results if dt changes (and it does)."
2007-11-03 21:02:28 +00:00
curt
0ddb883451 Add a --vehicle= option which is a synonym for --aircraft= but is more
natural when selecting ground vehicles like a jeep or a snowplow.
2007-11-02 18:39:10 +00:00
mfranz
57a70fc141 unescape \a and \b as well 2007-10-27 17:25:39 +00:00
mfranz
1c1559f36c make sure snprintf() buffer is terminated 2007-10-27 17:16:00 +00:00
durk
f5e9e1898f Miscellaneous tweaks and Bugfixes. Mostly memory leaks ported from the plib
version
* Delete ai list objects in ~ATC/AIMgr.cxx:AIMgr::~AIMgr()
* Delete colors in GUI/new_gui.cxx: NewGui::~NewGui.cxx
* Delete memory allocated to the class member "route" in
  Instrumentation/gps.cxx
* Delete all globals (except a few "unsafe" ones that still cause segfaults
  and need further examination.
* Use an SGShared pointer for navaid memory allocation, so that pointers to
  individual navaid objects can be included safely in multiple navaid lists
2007-10-20 08:36:21 +00:00
mfranz
dbd0b136b8 - use refcounted node pointers, so that no subsystem (nasal!) can invalidate them
- add frame signal for debugging purposes
2007-10-16 15:01:19 +00:00
mfranz
2b338113af give FDMs one update cycle time before setting the fdm-initialized signal
(YASim needs that to fully initialize the landing gear)
2007-10-16 07:55:43 +00:00
mfranz
79fec97f9f save some startup parameters under /sim/startup/options/. options.cxx puts
them under /sim/presets/ but they aren't save there, and as fgInitPosition
and its subroutines overwrite them, we lose the information about what the
user really wanted. This is a temporary solution -- it really belongs into
options.cxx.
2007-10-07 19:27:05 +00:00
mfranz
516ef6bc4b fix another victim of the new runway search method 2007-10-05 14:34:04 +00:00
mfranz
2cef9cc16a revert pitch/roll change (caused problems on reset and on the carrier) 2007-10-04 21:52:50 +00:00
timoore
411435a48f Make comparisons against OSG version less flakey
Turn OPENSCENEGRAPH_MAJOR_VERSION, OPENSCENEGRAPH_MINOR_VERSION and
OPENSCENEGRAPH_PATCH_VERSION into a single number for comparisons in the
preprocessor.
2007-10-04 20:40:29 +00:00
mfranz
6a8197968a on't hardcode heading-deg to 270 (and pitch-deg to 0.424 ...) 2007-10-04 17:14:37 +00:00
mfranz
7c3f46e82f - if no heading preset was given (>=9999), use wind-from direction
- write chosen runway to /sim/atc/runway, so that ATC can give a hint
- minor cleanup
2007-10-04 17:13:41 +00:00
timoore
78228d2734 Change tower location to an SGGeod. Include taxiways too.
This has been split from Csaba's ATC ground radar contribution.
2007-09-09 23:21:48 +00:00
timoore
aa2858b5bd Handle scroll wheel events in osgViewer version 2007-08-20 21:38:25 +00:00
timoore
86c1a089a4 osgviewer mouse warp fixes
After a mouse warp drop all pointer motion events for the entire frame.

Author: Melchior FRANZ
2007-08-19 05:29:00 +00:00
timoore
3f41c9f91b Really implement fgWarpMouse for osgviewer
This fixes a bug that caused both the x and y values of the mouse to
be reset when the cursor was recentered due to hitting the screen
edge.

Based on a suggested patch from Stuart Buchanan
2007-08-18 22:07:11 +00:00
timoore
3bf9ab1098 Fix test for osg::Viewer.setUpdateVisitor
My last attempt reversed the sense of the test and for to include the
osg/Version header file.
2007-08-13 15:02:42 +00:00
timoore
41a22fa6a9 Compilation fix for OSG 2.1.4
setUpdateViewer has been moved to the osgViewer::Viewer object.
2007-08-12 23:01:51 +00:00
mfranz
991c2ff06a add unescape function for conversion of \t, \n, \x1b etc. in <format> strings 2007-07-29 12:26:33 +00:00
mfranz
b0bb63bf79 Nick "Lethe" WARNE: prevent crash caused by improper use of --multiplay
mf: stripped down the log message a bit :-)
2007-07-25 15:17:06 +00:00
timoore
3a0b1286ff Support for linking against OSG debugging libraries. 2007-07-20 17:29:31 +00:00
durk
da77779436 Martin Spott:
On most Unix platforms like FreeBSD, Solaris, IRIX (AIX is even worse)
- just not on Linux - the linker wants to know about _all_ required
libraries. So even if a shared library "libosgViewer" itself is linked
against "libosgGA" and "libosgText", you still have to name these in
order to build an "fgfs" binary.

Currently, other libraries like "-losgDB" and "-losgUtil" are
explicitly mentioned on the "fgfs" linker command, but "-losgGA" and
"-losgText" are not. This simple patch lets the linker honour
everything that's required
2007-07-17 18:00:06 +00:00
mfranz
f8691bb86e make properties created via --prop option default to type UNSPECIFIED.
For compatibility with the old behavior just ask for a string:
--prop:string:foo=0  or shorter  --prop:s:foo=0
2007-07-12 14:45:46 +00:00
mfranz
98d23457ac Maik JUSTUS: swap stereo L/R, and fix Doppler 2007-07-06 20:53:48 +00:00
mfranz
d1dfc42dce remove the "terrain-elevation" command again. This is no longer necessary,
as we have the geodinfo() Nasal function now.
2007-07-03 15:41:03 +00:00