1
0
Fork 0
Commit graph

706 commits

Author SHA1 Message Date
ehofman
f541c30e46 gcc 2.95 fix? 2004-12-20 08:36:56 +00:00
ehofman
800dad8273 Make sound audiable not until after the scenery is loaded. 2004-12-16 13:19:01 +00:00
curt
634e79353f Roy Vegard Ovesen:
I've finished the emigration of the radiostack, and I've also removed it
completely. It turned out that the comm radio is completely implemented in
the ATC subsystem. I've changed the affected ATC files to point
to /instrumentation/com, but I guess that the maintainer of the ATC code
should decide wether to make it configureable, and how.

I also had to change some files in Network and Main. The changes in network
should be obvious, but the changes in Main were a bit suspect. The files
included radiostack.hxx, but they weren't directly depending on
radiostack-hxx. They were depending on other files that were included by
radiostack.hxx. I got it to compile, but I'm not sure if I included the
correct directly depending file.

For the data directory I changed every occurrence of /radios/
with /instrumentation/ with this simple one-liner that I found on the net:

find -name '*.xml' -type f | xargs perl -pi -e
's/\/radios\//\/instrumentation\//g'

Instead of me sending all the files that got changed by this I suggest that
you execute the one-liner yourself. Of course I can not guarantee that this
will work perfectly, but I considered hand editing to be not an option (I'm
lazy). I don't want to test every aircraft to see if everything still works,
I think it's better to wait and see if anyone complaints about broken nav
radios/instruments.
2004-12-03 21:21:16 +00:00
ehofman
337d0d1be6 Add some missing bits from Mathias' carrier code. 2004-11-20 12:44:42 +00:00
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
ehofman
96e24a3e8d Melchior:
Don't overwrite user settings from config files.

fgfs had in any case set bump-mapping to false, no matter if this
node did already exist (because it was defined in a config file).
2004-10-20 08:18:29 +00:00
ehofman
8b53b86aa0 A first stab at an ACMS (Aircraft Condition Monitoring System) Special Purpose support FDM. Move the ADA FDM into the Special Purpose directory and make the SP FDM's a configure option. 2004-10-19 11:10:20 +00:00
ehofman
2b6b970b80 Frederic Bouvier:
This is a patch to make display list usage optional. They are on by default.
Use --prop:/sim/rendering/use-display-list=false to use immediate mode.
There is also a change in exception handling in main.cxx and bootstrap.cxx
2004-10-17 17:29:34 +00:00
ehofman
986492d72d Finish what was committed in a broken state yesterday.
Split up main.cxx into a program manegement part (which remains in
main.cxx) and a render part (the new renderer.?xx files). Also turn
the renderer into a small class of it's own. At this time not really
exctining because most of the stuff is still global, but it allows us
to slowly migrate some of the global definitions into the new class.

The FGRenderer class is now managed by globals, so to get the renderer
just call gloabals->get_renderer()

At some pijt it might be a good idea to also turn the remaining code in
main into a class of it's own. With a bit of luck we end up with a more
robust, and better maintainable code.
2004-09-20 13:21:51 +00:00
ehofman
de47d1a7d8 Revert to CVS as of 5000 seconds ago. 2004-09-19 17:59:40 +00:00
ehofman
cbdeb3be16 Remove unnecessary inclusions of sg.h ans ssg.h 2004-09-19 16:47:00 +00:00
curt
2b22f5678c Preparations for the 0.9.6-pre1 release. 2004-09-10 18:34:00 +00:00
ehofman
2a610d77e7 Move the atexit() handler over to bootstrap.cxx (which makes libMain.a behave like a real library) and fix a segmentation fault when running 'fgfs -h'. The exit handler tried to change the (still uninitialized) mouse cursor causing a core dump. 2004-08-24 08:40:41 +00:00
ehofman
d88f31fda2 Show the mouse cursor again, just before exiting. This could prevent an X windows crash for certain harware setups. 2004-08-15 16:53:11 +00:00
ehofman
827cfded73 iFrederic Bouvier: Postpone rendering the scene until the scenery is loaded. This means that the splash screen remains a bit longer, but the scenery loading time is cut in half. 2004-08-15 11:25:15 +00:00
curt
7857ef0381 Tweaks for 0.9.5 release. 2004-07-29 21:54:15 +00:00
curt
f9af52b588 Tweaks for 0.9.5-pre3 release. 2004-07-27 21:40:37 +00:00
ehofman
ef84402da1 How on earth???? Replace "and" by && and "or" by || to match C++ more closely........ 2004-07-23 07:33:24 +00:00
ehofman
9d972d86bf Jim Wilson: This patch prevents FDM execution until intial scenery load completes making
midair starts in the KSFO area possible again.
2004-07-22 16:42:14 +00:00
curt
517a7a3e5a Updates for v0.9.5-pre2. 2004-07-21 21:49:54 +00:00
curt
6076c83904 Various tweaks for v0.9.5-pre1. 2004-07-15 18:07:02 +00:00
ehofman
b7352ead12 Updates for the bump-mapped 2d cloud code. 2004-05-21 14:57:42 +00:00
ehofman
14d28907dd Add a property to be able to turn the bump-mapped cloud code on and off at runtime. 2004-05-20 13:27:40 +00:00
curt
2fce07a4ce main.cxx - small tweak to sound updating logic.
options.cxx - change property name /sim/sound/audible to /sim/sound/pause
2004-05-14 15:50:28 +00:00
curt
944a82b576 Clean up some sound buffer allocation/deallocation issues. 2004-05-10 21:24:30 +00:00
ehofman
8db96e10fb Add /sim/initialised which is set to true when we're ready to go. 2004-05-05 09:01:21 +00:00
curt
0aabc112b4 Make several assumptions:
1. The listener is always positioned at the origin.
2. All sounds eminate from the aircraft's model position.
3. Sound positions are relative to the listener location.
2004-04-27 20:49:00 +00:00
curt
8ab1e47021 Hook in the fgOSExit() function. 2004-04-25 02:17:03 +00:00
curt
2f1e2bc6e9 Register an atexit() function so we can delete the global constructor.
This also gives us a proper hook if we want to clean up SDL (Andy?)
2004-04-25 02:06:55 +00:00
ehofman
bd3c57beee Frederic Bouvier:
my code was accidentally drawing the cockpit twice
in view 0. This patch should fix the problem of
lights not seen through canopies or prop discs.

It was also drawing the lights ( ground and rw )
after the clouds, so they were not obscured by
them.
2004-04-14 07:59:50 +00:00
andy
395c9bc638 API changes to get fullscreen mode working with SDL. It can't switch
modes after creating the window, so it needs a flag in
fgOSOpenWindow().
2004-04-06 14:28:22 +00:00
ehofman
966e0bdd4d Frederic Bouvier:
I restored the output to cout / cerr
for the options and the warning for the version mismatch.
There is a dummy SG_LOG to allow the windows version to
popup the console.

The snapshot rendering use multipass now.
2004-04-03 09:27:38 +00:00
ehofman
ace81503d6 Match the changes in SimGear to fix an NVidia problem. 2004-04-02 19:44:42 +00:00
ehofman
7c616bb5bd Frederic Bouvier:
Cure the performance penalty that leads to draw the aircraft twice.
Also cure the transparency bug over the aircraft.
2004-04-02 16:50:38 +00:00
ehofman
dba02e35d4 Frederic Bouvier:
FG_ENABLE_MULTIPASS_CLOUDS must be defined to enable
 the algorithm. I made this because the stencil buffer
 must be initialized at the beginning of the program and
 OpenGL can fallback to software rendering if it can't
 find a visual with stencil buffer. I didn't touch the
 configure script, so CXXFLAGS=-DFG_ENABLE_MULTIPASS_CLOUDS
 must be set before running ./configure.

 If FG_ENABLE_MULTIPASS_CLOUDS is defined, the main render
 loop begins by reading the /sim/rendering/multi-pass-clouds
 property. It is a boolean property so there are only two
 quality levels. false means no multi pass and no use of
 the stencil buffer, true means an additionnal pass for
 both upper and lower cloud layers.

 The algorithms are as follow :
  /sim/rendering/multi-pass-clouds=false
   1. draw sky dome
   2. draw terrain only
   3. draw clouds above the viewer
   4. draw models except the aircraft
   5. draw clouds below the viewer
   6. draw the aircraft.
  The cloud rendering doesn't update the depth buffer.
  This means that models overwrite clouds above the viewer.
  This is only noticeable for tall buildings and when
  flying very low. Also, drawing low clouds after models
  means that they are not blended with models' translucent
  surfaces. Large transparent area require alpha test
  enabled and AI aircraft canopy are making holes. The
  pilot's aircraft being rendered at the end, there is no
  problem with canopy or prop disc.

  /sim/rendering/multi-pass-clouds=true
   1. draw the sky dome
   2. draw the terrain only
   3. draw all clouds
   4. draw models except the aircraft
   5. redraw the clouds where the models where drawn ( stencil
      test on )
   6. draw the aircraft
  The assumptions made by this algoritm are that the terrain
  is not transparent ( should be true in all cases and
  that there are no clouds between the aircraft and the viewer.
  Assuming these facts, there should be no blending bugs.

  The screenshot rendering is not updated yet.
2004-04-02 14:40:54 +00:00
andy
ae2dbe4f25 Re-enable glut game mode for now 2004-04-01 15:44:13 +00:00
curt
2acdd02879 Clean up various compiler warnings that have crept into the code. This
by no means get's them all, but it's a start.
2004-04-01 15:27:53 +00:00
andy
c0b4531d04 Yank out all the glut dependencies and concentrate them in a (easily
reimplementable) Main/fg_os.cxx file.
2004-03-31 21:10:32 +00:00
ehofman
d430290e48 Frederic Bouvier:
trying the --show-aircraft option, I noticed that I had
no output. This is because there are still output to
cout or cerr, that are not triggering my console patch
for windows. The patch attached use SG_LOG instead.
A request to hit a key is also added because otherwise,
the console window will disappear as soon as the program
stop.

This problem is minor though given the fact that fgfs.exe
is shipped with fgrun that do show the available aircraft
in a much nicer manner.
2004-03-30 09:05:05 +00:00
curt
f7fc455b0d Jim Wilson:
Remove some hardcoded dependencies between fdm, viewer and acmodel classes and
replaced them with property references.   Fix roll offset in viewer.
2004-03-19 03:30:18 +00:00
curt
a1a68b9c93 Various preparations for the next release. 2004-03-18 02:37:01 +00:00
david
25290c4467 Remove the old WeatherCM module. 2004-03-16 20:19:07 +00:00
david
d535c7c6b1 Reverted recent changes -- the dependencies are badly (and
unnecessarily) tangled.
2004-02-27 16:48:27 +00:00
david
721e9f469d Add the aircraft model, model manager, view manager, and scenery
manager to the standard subsystem collection manager, rather than
using extra code to initialize and update them.
2004-02-27 15:16:23 +00:00
david
9409d5e35e Change fg_props.[ch]xx into a proper subsystem, under the control of
the subsystem manager.

Add properties for the individual parts of the time and date.
2004-02-20 17:35:33 +00:00
curt
da5ea10d5d Curt Olson:
Autopilot overhaul.
2004-01-31 19:47:45 +00:00
curt
492d5fbd8d Fix a small mistake in the scene graph arrangement for vasi lights. 2004-01-11 19:45:29 +00:00
ehofman
465d13b045 Add support for an aircraft specific splash screen 2003-12-22 21:49:11 +00:00
andy
439a9fa1e4 Minor API changes to support the new sg_geodesy implementation. A few
places now use sgCartToGeod() instead of rolling their own
approximation.  And YASim is now using exactly the same 3D coordinate
system as the rest of FlightGear is.
2003-12-19 02:42:32 +00:00
david
01f8f51614 Remove the seriously-outdated DCS code (we have different facilities
for including external objects now).

Set the default logging level to 'alert' (i.e. pending disaster).
2003-11-24 17:46:38 +00:00
curt
e4295262d0 Currently, when the sim pauses, all IO is also halted. To me it generally
makes more sense to keep I/O running.  That way remote telnet connections
will still respond, and the sim can still accept and send data.  This also
allows a remote script or gui to pause and (more importantly) be able to
the unpause the sim.
2003-11-21 23:35:25 +00:00
ehofman
e322c70f52 Depreciate NetworkOLK. A big thanks goes to Oliver Delise for implementing it in the first place. 2003-11-13 14:42:47 +00:00
ehofman
177e081a2a Disable two sided light model because Andy's patch to plib makes it unneeded. This should also increase framerate a bit 2003-11-09 15:07:23 +00:00
curt
cc7b15fa7b Various 0.9.3 updates. 2003-10-24 17:06:39 +00:00
curt
58cadee5f3 Updates for 0.9.3-pre1 2003-10-16 03:29:04 +00:00
ehofman
980012e168 Move FGEventMgr and FGSubsystemMgr over to SimGear, add SGEventMgr to FlightGear's globals structre and some small code cleanups 2003-09-24 17:20:55 +00:00
ehofman
2764b9181b Fix a problem where the upper cloud layers are draw
n with the sun punch through value
2003-09-23 08:43:19 +00:00
ehofman
7d6cafba6e Use the log level environment already set up by David instead of mine 2003-09-22 09:22:05 +00:00
ehofman
e0dda6ad52 A small fix to have a smoot transition of cloud colors when in time warp mode 2003-09-20 11:05:12 +00:00
ehofman
a33ad90ed7 Convert fgLIGHT to FGLight and make it FGSubsystem compatible. Let the subsystem manager handle it and let FGLight::update() handle the repositioning of the sun and the moon. 2003-09-20 09:38:32 +00:00
ehofman
7d6aea909d Remove some unused UIUC specific code 2003-09-18 09:33:13 +00:00
ehofman
15f45ad9a5 Reorginize the code just before fgMainLoop a bit so that the lighting update actually has any effect 2003-09-17 10:02:36 +00:00
curt
9bb782ce72 Added a command line option to specify a starting time of day in the sense of:
--timeofday=dawn
  --timeofday=dusk
  --timeofday=noon
  --timeofday=midnight
2003-09-15 22:55:39 +00:00
ehofman
7249aaea33 Frederic Bouvier:
This patch is there to correct a problem that prevent to load static objects when specifying a relative fg-root or a different, relative, fg-scenery. It appears that there is a mix between fg-root, fg-scenery and PLIB's model-dir.
It has been reported on the list that users are not able to see the buildings, especially those running the win32 builds because they run 'runfgfs.bat' that set FG_ROOT=./DATA.

I decided not to use model-dir because it just add confusion and to build a valid path earlier.
2003-09-13 11:47:30 +00:00
ehofman
2be37c04fe Enable two sided lighting calculations when specular highlight is enabled 2003-09-13 09:27:50 +00:00
ehofman
dd963990dc Turn back to default lighting when specular-highlight gets disabled 2003-09-12 22:09:54 +00:00
ehofman
9812739a71 Add the posibillity to disable specular highlight because it looks like some implementations switch over to sofware rendering when this is enabled 2003-09-12 21:43:01 +00:00
ehofman
774faa157d Make it possible for textured object to change color to white when lit by a strong light source. This might affect rendering time a bit 2003-09-12 09:27:19 +00:00
ehofman
82ba3ebbde Remove a possible glut dependency and do some code cleaning 2003-08-29 16:46:21 +00:00
ehofman
69d0052375 Fix an undeclared function refference in one of the supported compiler environments 2003-08-25 12:41:40 +00:00
ehofman
ced6b4f520 Updates needed for z-ordewring of the cloud layers 2003-08-22 08:05:00 +00:00
ehofman
5ae096b225 Reorganization of main.cxx 2003-08-17 09:54:41 +00:00
ehofman
be863ee240 Work around a problem in certain NVidia adapters hat don't support fgPushAttrib(FG_FOG_BIT) 2003-08-15 17:47:34 +00:00
ehofman
5898b8f828 Needed for SimGear update 2003-07-31 14:47:56 +00:00
ehofman
62ce453136 Use a pointer to a structure instead of a large number of variables when calling a function to keep the stack clean 2003-07-31 09:06:15 +00:00
ehofman
c1fa7f95bd Comment out the UIUC ground trimming code 2003-07-27 07:49:33 +00:00
ehofman
860545bfa9 This patch increases the threshold below which the uiuc models are forced above the ground. 2003-07-26 07:56:46 +00:00
curt
c5110a3650 Try to make the replay system honor /sim/speed-up, but not fully working yet. 2003-07-25 20:09:30 +00:00
curt
fff2989853 Modified the replay system to work without enabling the master or clock freeze. 2003-07-18 14:14:24 +00:00
curt
75861ec95d Avoid collecting garbage data before the FDM is initialized. 2003-07-18 01:51:45 +00:00
curt
419f09f804 Curt:
I have added a fledgling replay system that records flight data and control
positions during the flight.

I have added an internal command called "replay" which will trigger a replay
of the entire saved flight data set.  This could be bound to a keyboard or
menu command, in fact this entire module is screaming for someone to build
a gui to control playback speed, amount of playback, etc.

This is the initial version so there are kinks that still need to be worked
out, please be patient.
2003-07-17 18:24:17 +00:00
david
2da219ef5e Update magvar model before using it to initialize compass error. 2003-07-17 00:26:38 +00:00
david
34e4ff4922 Kludge the HI error so that it initially matches the magnetic variation. 2003-07-17 00:06:03 +00:00
ehofman
7b778e859c Replace some of the most used fgGetXXXX() calls with a local variable. The next best thing would be replacing the fgGetXXXX()functions with cached pointers 2003-07-05 09:59:03 +00:00
ehofman
484bab7bc8 Make sure the functions won't be called if the extension is not supported. This also clears the main loop a bitsrc/Main/main.cxx. 2003-06-29 17:14:13 +00:00
ehofman
9e07e0ac36 Mac OS X fixes 2003-06-20 20:18:40 +00:00
ehofman
ef96cce83f (temporary) Apple OS X fix 2003-06-19 07:54:29 +00:00
ehofman
6b2b6edb2d Use a different way to call OpenGL extensions and move over to our own extension checking function instead of the one provided by glut 2003-06-18 09:19:41 +00:00
ehofman
654037b83b gcc 3.2 fixes 2003-06-17 17:51:55 +00:00
ehofman
0eda5f3872 Add:
/sim/rendering/horizon-effect
   toggle sun and moon resizing effect near the horizon

/sim/rendering/enhanced-lighting
   toggle enhanced runway lighting on or off

/sim/rendering/distance-attenuation
   add distance attenuation to the enhanced runway lighting
2003-06-17 16:59:26 +00:00
ehofman
b082300ab1 Model the effect where the sun and moon look 1.5 times larger when close to the horizon 2003-06-15 12:23:55 +00:00
ehofman
0c5115e69a Base sun and moon diameter and distance on actual numbers 2003-06-14 09:32:06 +00:00
curt
6db343914f Changes corresponding to simgear sky api tweak. 2003-06-11 19:06:48 +00:00
curt
f4403fdea8 Cosmetic changes ... 2003-06-09 20:24:50 +00:00
david
e588cbadd8 Removed FGEnvironmentMgr as a special case in globals, initialization,
etc.

Improved the weather system to interpolate between different
elevations and deal with boundary-layer conditions.  The configuration
properties are now different (see $FG_ROOT/preferences.xml).
2003-06-08 14:47:03 +00:00
curt
bfaaa63bb2 Changes in preparation for the 0.9.2 release. 2003-06-04 20:27:05 +00:00
curt
9c0c54ef6c Implimented a simple frame rate throttle.
Normally for smoothest frame rates you would configure to sync
to your monitor's vertical refresh signal.  This is card/platform
dependent ... for instance with Linux/Nvidia there is
an environment variable you can set to enable this feature.

However, if your monitor is refreshing at 60hz and you can't quite sustain
that with flightgear, you can get smoother frame rates by artificially
throttling yourself to 30hz.  Note that once you are about about 24fps, it
is *change* or inconsistancy in frame rate that leads to percieved jerkiness.

You want to do whole divisors of your monitor refresh rate, so if your
display is syncing at 75 hz, you might want to try throttling to 25 hz.
2003-06-02 16:35:36 +00:00
ehofman
f30f40a2fb Fix a initialization ordering bug:
Melchior FRANZ:
The reason: these models are to be added to the scenery, but the
scenery isn't yet set up at this point. The correct order is:

 - set up model_lib (needed by the scenery)
 - set up scenery (needed by the model manager)
 - set up model manager
2003-05-31 13:38:10 +00:00
curt
21b317ff21 Move simgear/sky/ to simgear/scene/sky as part of the consolodation of
graphics code.
2003-05-30 15:16:57 +00:00
curt
56592f3869 Moved random ground cover object management code (userdata.[ch]xx) over
to SimGear.
2003-05-28 20:29:05 +00:00
ehofman
ff7408fdf2 Adjust sunset/sun rise color scheme 2003-05-16 16:33:23 +00:00
curt
6200c3cb62 Changes to track updates to SimGear. 2003-05-15 21:35:51 +00:00
curt
d6ae1c2205 Create an instance of SGMaterialLib in the "globals" structure and use
that.
2003-05-14 18:33:56 +00:00
curt
3c7bdc31d9 Cosmetic changes for new code moved into simgear to make the naming scheme
better follow simgear conventions.
2003-05-13 03:18:42 +00:00
curt
65c3caa032 Moved fgfs_src/Object/newmat.[ch]xx and fgfs_src/Object/matlib.[ch]xx into
simgear/scene/material/
Adjusted flightgear code to match this change.
2003-05-12 21:34:29 +00:00
curt
56db994994 Moved src/Model/loader.[ch]xx and src/Model/model.[ch]xx to
simgear/scene/model/
2003-05-09 20:40:59 +00:00
ehofman
5ecfcca7e4 Extract the sound code from FlightGear and move it to SimGear 2003-05-09 18:44:33 +00:00
curt
fe7a61d3ff Moved src/Model/*Animation* classes over to simgear. 2003-05-08 16:33:48 +00:00
curt
b85ff8c210 Timed animations now working again. 2003-05-08 15:56:31 +00:00
curt
677ec873be Clean up various dead, depricated, or otherwise unused code. I don't believe
the ascii scenery file format has actually worked in quite some time, and the
ADA runway light code has been supersceded by a slightly different mechanism.
2003-05-08 03:29:49 +00:00
ehofman
18dec3596d Curtis found another inconsistency in the sky repaint check. I am afraid that adding more checks would eventually give the same framerate as repainting every frame. Consider this a failed experiment. 2003-05-07 15:53:50 +00:00
curt
2119db35c3 This is step "1" of probably "many" in the process of separating out the
scene management code and organizing it within simgear.  My strategy is
to identify the code I want to move, and break it's direct flightgear
dependencies.  Then it will be free to move over into the simgear package.

- Moved some property specific code into simgear/props/
- Split out the condition code from fgfs/src/Main/fg_props and put it
  in it's own source file in simgear/props/
- Created a scene subdirectory for scenery, model, and material property
  related code.
- Moved location.[ch]xx into simgear/scene/model/
- The location and condition code had dependencies on flightgear's global
  state (all the globals-> stuff, the flightgear property tree, etc.)  SimGear
  code can't depend on it so that data has to be passed as parameters to the
  functions/methods/constructors.
- This need to pass data as function parameters had a dramatic cascading
  effect throughout the FlightGear code.
2003-05-06 23:46:24 +00:00
ehofman
b49b93f1ed Make sure the sky is also repainted when the relative view direction gets out of sync. Add a refference to /sim/rendering/debug for always repainting the sky dome. 2003-05-06 14:00:18 +00:00
ehofman
5a66847064 Repaint the sky when the view heading changes also 2003-05-05 12:39:05 +00:00
ehofman
80c8fbe4a3 Temporary disable the sky reposition speedup code until I discover the magic key that unlocks the proper behaviour. It's not like this causes a noticable decrease in framerate. 2003-04-20 09:13:03 +00:00
ehofman
d1982a9a8c Reposition the sky modules only when the lat or long position is changed for 5 micro degree. This doesn't sound much, but at least it means the modules aren't repositioned every frame 2003-04-17 15:42:18 +00:00
ehofman
d26a39cfe1 Oops, the repositioning code needs more work to be usefull. 2003-04-15 14:30:37 +00:00
ehofman
8732d3968a Magically improve the framerate by only repainting and repositioning the sky related subsystems if the sun position is changed by 0.28 degrees 2003-04-15 14:10:47 +00:00
ehofman
5454a4f281 Set the initial log-level back to info 2003-04-01 18:45:34 +00:00
ehofman
cdd7998c90 David Luff:
The one to fg_init.cxx initialises the AI subsystem regardless of whether it's enabled or not so that later enabling by the user doesn't crash it, and the one to main.cxx avoids running the ATC manager and ATC display system unless enabled.
2003-04-01 13:42:10 +00:00
ehofman
891e83809e Remove an unnecessary check. This is done in fgPanelVisible already 2003-03-31 08:36:49 +00:00
ehofman
58937e7e6b Fix a bug where current_panel was called before it was initialized properly 2003-03-31 08:25:00 +00:00
ehofman
7948238156 Declare fgReshape into gui.h 2003-03-30 19:40:43 +00:00
ehofman
4b62426109 Move current_panel to globals 2003-03-30 12:46:08 +00:00
ehofman
37c427558a A first stab at an aircraft selection dialog 2003-03-29 15:04:52 +00:00
curt
7f28165daf Added a property /sim/rendering/draw-otw which specifies whether or not
we want to draw the out-the-window view (defaults to true in properties.xml)
2003-03-29 03:21:48 +00:00
ehofman
0782e877a9 Add runtime log level support 2003-03-22 10:38:15 +00:00
ehofman
4c55a5aeb4 Andy wrote:
This is just a port of an old 3D HUD patch to the new view code.
This pans the HUD with the view, by pasting it onto a quad fixed in front of the viewer.  It also fixes the awful, arbitrary scaling problems the HUD code has.  The old HUD only looks right when viewed at 1024x768 and 55 degree FOV.  This works the scale out magically so that it looks right in all views.  It also redefines the "<compression-factor>" tag in the ladder to (1) mean compression instead of expansion and (2) have non-psychopathic units (now "1" means 1 degree per degree).  Fix this in your existing HUD ladder files before reporting bugs.  It's definitely a cosmetic win -- the velocity vector points at the right thing and the horizon lines up properly.

Norman wrote:

I have created a modified version of Andy's patch that implements the 3D HUD as the 'normal' and the 2D HUD as the 'minimal' HUD.   < i > and < shift I > keys
2003-03-21 15:02:23 +00:00
ehofman
df2ce45ab7 Change cout and cerr in SG_LOG() where appropriate, otherwise comment it out 2003-03-20 10:43:02 +00:00
ehofman
e46c59d4d0 Add multiplayer support from Duncan McCreanor and Diarmuid Tyson 2003-03-19 20:45:09 +00:00
curt
c32c8aca51 Wire frame mode got broke somehow. This seems to fix it. 2003-03-14 02:07:45 +00:00
david
c90d7e96c2 Make sure the atmosphere is updated before the flight model. 2003-03-02 01:43:00 +00:00
david
4b9060b064 Invoke fgInitNav() before fgInitPos(). 2003-02-21 02:46:07 +00:00
david
57da4bf02d Removed the old FGSteam module from FlightGear. 2003-01-29 15:30:29 +00:00
curt
f2dac6306f #ifdef out a bit more code that could cause compile problems on platforms
that don't have all the latest opengl extensions.
2003-01-12 14:28:26 +00:00
curt
6a45be1d72 Oops missed some more usage of opengl extensions that may not be on everyone's systems. 2003-01-06 21:43:59 +00:00
curt
e160b3b312 #ifdef out experimental lighting for now until someone has time to investigate
the "right" way to test for and use extensions.

Hopefully this will clear up compile problems a lot of people have been
haveing.
2003-01-06 02:50:29 +00:00
david
71f08e795d Patches from Erik Hofman for SGI compatibility:
Some more cmall changes to the SimGear header files and removed the
SG_HAVE_NATIVE_SGI_COMPILERS dependancies from FlightGear.

I've added a seperate JSBSim patch for the JSBSim source tree.
2002-12-31 18:26:02 +00:00
david
7cc894be4b Require /sim/rendering/experimental-lighting to be true before using
experimental lighting rendering (which is very expensive on my
machine, for example).  To use distance attenuation,
/sim/rendering/distance-attenuation must also be true.
2002-12-31 01:15:59 +00:00
david
e80c093681 Distance attenuation patch from Erik Hofman:
It adds a command line options to enable/disbale distance attenuation
using a property rather than using a #define inside the code. It also
adds a small change for systems that don't support the OpenGL extension,
so that the lights *do* fade away as they get furher away but they don't
get smaller in size.
2002-12-30 21:49:56 +00:00
curt
6225936ead Various tweaks. 2002-12-21 05:01:51 +00:00
curt
5c8e6a5841 Tweak taxi light rendering so they don't look completely bogus at dusk. 2002-12-12 01:24:48 +00:00
curt
43e48070fe - Some refactoring of the configure.ac script.
- Better Mac OS X support (they put glut.h in GLUT/glut.h) :-(
2002-12-10 20:50:48 +00:00
curt
69b5c093dd #ifdef out all references to sgCloud3d until more of it's issues can be
addressed.
2002-12-10 19:25:12 +00:00
curt
1feedec8d1 - Change the global_tile_mgr to a globals->get_tile_mgr() which is
dynamically created at run time.
- Further clean ups to the FGTileMgr class interface.
2002-12-06 22:29:46 +00:00
curt
a4600f85c7 Updates for 0.9.1 2002-12-05 15:31:09 +00:00
curt
a6ce9a5b2a A small amount of additional massaging of tile manager update() interface. 2002-11-30 14:22:00 +00:00
curt
bcf9fa3695 Massaging the FGTileMgr->update() interface towards using FGLocation. 2002-11-30 03:05:34 +00:00
curt
89874fd5f5 Make tile_mgr->prep_ssg_nodes() use an FGLocation object. 2002-11-28 01:08:25 +00:00
curt
3aa5e5fcdf Don't force ground lighting to have the same limited visibility as runway
lighting.
2002-11-26 16:01:39 +00:00
curt
98dca16794 Having the runway lights "pop" in at a specific range is not 100% realistic.
I have updated the lighting code to use fog to try to fade the runway lights
in smoothly, but still keep them from being visible until you are about 7-10
miles out, and then only have them be very faint at first.  I think what I
have is a bit nicer than before since it completely avoids the "popping" effect,
but I've very open to tweaking the actual ranges based on people's real
world experiences.
2002-11-26 02:29:03 +00:00
curt
2384d0ed51 Added some cheap eye candy to entertain myself for a few minutes. Splash
screen now fades out revealing the scene.
2002-11-17 01:21:13 +00:00
curt
35f24baf32 Clean ups to the code that determines initial position based on command
line options or defaults.
2002-11-16 21:34:51 +00:00
curt
52a322decc Some various massaging and clean ups of initialization code. 2002-11-16 20:17:11 +00:00
curt
52312f2a13 Restructuring some of the initialization code.
The general idea is to help clean up some aspects of the FDM init and be
able to provide startup conditions in a less ambiguous manner.

Previously, things like positions, orientations, and velocites were set on
"the bus".  These had to be read by the FDMs which then were supposed to
initialized themselves to those values and turn write around and start
modifying those values.  It was messy and cumbersome.

Now, all the initial fdm conditions are written to a sub-[property-]tree
under /sim/presets/

The values in /sim/presets/ always stay set to what the user has specified.
The user can change these at his/her liesure, and then request a "reset"
which will reset to the new conditions.  I don't even want to say how this
worked before. :-)

Now, an script, or gui interface can stage a set of initial conditions while
the sim is running (without disrupting it), and then call "reset" to commit
the change.

People who should worry about all this are FDM writters, and a small few
others who care about over all program structure and flow.
2002-11-15 21:13:29 +00:00
curt
dbf997a2d3 Put taxiway lights in their own scene graph so we can adjust their brightness
(or fog punch through) independently from the ground or runway lighting.
2002-11-01 21:56:48 +00:00
curt
72017fc671 Andy Ross:
The biggest and coolest patch adds mouse sensitivity to the 3D
cockpits, so we can finally work the radios.  This ended up requiring
significant modifications outside of the 3D cockpit code.  Stuff folks
will want to look at:

+ The list of all "3D" cockpits is stored statically in the
   panelnode.cxx file.  This is clumsy, and won't migrate well to a
   multiple-aircraft feature.  Really, there should be a per-model list
   of 3D panels, but I couldn't find a clean place to put this.  The
   only handle you get back after parsing a model is a generic ssg
   node, to which I obviously can't add panel-specific methods.

+ The aircraft model is parsed *very* early in the initialization
   order.  Earlier, in fact, than the static list of allowable command
   bindings is built in fgInitCommands().  This is bad, as it means
   that mouse bindings on the instruments can't work yet.  I moved the
   call to fgInitCommands, but someone should look carefully to see
   that I picked the right place.  There's a lot of initialization
   code, and I got a little lost in there... :)

+ I added yet another "update" hook to the fgRenderFrame routine to
   hook the updates for the 3D panels.  This is only required for
   "mouse press delay", and it's a fairly clumsy mechanism based on
   frame rate instead of real time.  There appears to be delay handling
   already in place in the Input stuff, and there's a discussion going
   on about different mouse behavior right now.  Maybe this is a good
   time to unify these two (now three) approaches?
2002-10-29 19:44:03 +00:00
curt
4c2e97be18 Default to experimental point lighting disabled. 2002-10-24 14:05:40 +00:00
curt
b0d12281c8 Minor tweak to avoid some compile errors people are seeing with the
glPointParameterExt.
2002-10-21 03:22:27 +00:00
curt
55b7dc661e Playing with glPointParameterfEXT. 2002-10-17 04:34:32 +00:00
curt
4ef75aa6c8 Playing with point lighting effects. 2002-10-16 03:44:44 +00:00
david
f962e24fee Use default visibility instead of modified sky visibility when 2D
clouds are disabled.
2002-10-13 10:46:37 +00:00
curt
470d233f0d Eric Hofman:
Now the options can be localized as well. This adds a slight problem for
the --language options, but not that much (worst case, the strings are
loaded twice consuming some more memory). I tried to be as accurate as
posiible when copying the options texts, but there might be some
mostakes left.
2002-10-10 15:02:50 +00:00
curt
9dcf7dd13f Erik Hofman:
This adds supports for a language specific font, defined in locale.xml
I've also moved the fgInitLocale() routine from main.cxx to fg_init.cxx
to prevent an ungly extern definition in options.cxx.
2002-10-07 15:45:00 +00:00
curt
c162577340 Begin work on rendering runway lights using environment maps. The basics
are now working.  A runway light is defined by a point and a direction.  The
point and direction are combined with the local up vector to create a small
triangle orthogonal to the direction.  The two ficticous corners of the
triangle are given an alpha value of zero, the orignal corner is given an
alpha of one.  The triangle is drawn in glPolygonMode(GL_FRONT, GL_POINT)
mode which means only the corner points are drawn, and since two have alpha=0
only the original point is drawn.  This is a long way to go to draw a point,
but it ensures that the point is only visible within 90 degrees of the light
direction, behind the light it is not visible.  This is still a long way
to get to drawing a point, but we use an environement map, with the direction
vector as the normal to mimic a light that is brightest when viewed head
on and dimmest when viewed perpendicularly or disappears when viewed from
behind.

- warning, there is a bug in how the current runway light direction vector
  is calculated which will adversely effect runway lighting.  The airports
  should be regenerated in order to fix this problem.
2002-10-06 03:53:19 +00:00
curt
5cf14e78c4 Erik Hofman:
This patch fixes some bugs for correctly reporting un-updated
configuration files, and adds support for a --language=<code>
commandline option, overriding the language specified by the OS.
2002-10-04 15:19:07 +00:00
david
29eb5f7f5d Eliminated current_input and added FGInput to the subsystems managed
by FGSubsystemMgr.
2002-10-04 13:20:53 +00:00
david
38f0d6a35c First draft of subsystem manager; moved some subsystems into it. 2002-10-03 21:20:56 +00:00
curt
44fcbbd0af Better internationalization infrastructure. We now supports the "LANG"
environment variable.
2002-10-03 14:39:37 +00:00
david
03b508adb7 Support Dave Luff's AI plane if /sim/ai-traffic/enabled is set to
true.
2002-10-02 15:25:58 +00:00
david
c542559097 When the clock is frozen, set delta time to 0 so that the subsystems
won't keep updating themselves; that effectively freezes the
instrumentation.
2002-09-27 22:02:48 +00:00
david
682feb8f2d Flattened src/Systems/ subtree.
Added src/Instrumentation/ with partial stab at a vacuum-driven
attitude indicator.
2002-09-24 14:51:37 +00:00
curt
43af8026d8 More tweaks to opengl state management when drawing 3d clouds. 2002-09-23 22:05:36 +00:00
david
7c057de4fe Started new module and sub-modules for aircraft systems, including an
initial simplistic vacuum system that's not yet connected to anything.
2002-09-23 19:55:10 +00:00
curt
29e72b0b90 Various tweaks and fixes to navcom radios.
Oops, taking the address of a temporary in main.cxx: 3dcloud rendering.
2002-09-23 18:44:09 +00:00
curt
578073a6f3 Slightly cleaned up 3d cloud positioning code. 2002-09-23 13:34:51 +00:00
curt
e23b22fabe There is something wierd about moving the cloud base around, let's just leave
it rooted in place until we sort out the positioning.
2002-09-22 23:07:01 +00:00
curt
ab49022465 Patch to position 3d clouds at center of <current> tile. This means the clouds
jump whenever you cross a tile, but there are currently a lot of other
positioning problems as well, so this doesn't really detract too much and
means you can play with 3d clouds from just about any starting point.
2002-09-20 15:30:54 +00:00
david
2d7d0034d0 Do 3D cloud state changes only when 3D clouds are selected. 2002-09-20 14:01:06 +00:00
curt
53b9eacf74 Stabalize cloud shading. 2002-09-19 02:21:23 +00:00
curt
b350c6cd0f Miscellanious flailings trying to get 3d cloud imposter rendering to work
correctly.
2002-09-19 01:27:49 +00:00
curt
e0a7536e55 Erik Hofman:
This patch shows fatal error messages even when ./configure --disable-logging
is specified.
2002-09-18 16:13:08 +00:00
curt
c5f7f15f5b Updated from Norman to hack on clouds ... some progress. 2002-09-18 14:57:20 +00:00
curt
cc87fb93ba Updates for 3d cloud rendering. 2002-09-16 14:56:16 +00:00
curt
73c4fd481d Changed the clouds3d header install directory. 2002-09-15 04:32:49 +00:00
curt
82c87b2456 Updated the base package version required. 2002-09-14 01:58:40 +00:00
curt
bdde29e203 Update base package version. 2002-09-13 23:37:55 +00:00
curt
a4b3e35c0e Stubbed in initial support for 3d clouds. 2002-09-13 20:38:15 +00:00
curt
ed4a2e6db6 Darrell Walisser:
This allows it to behave like a certified Mac OS X citizen.
2002-09-10 19:43:33 +00:00
david
d4f92d6aff Removed unused cur_view_fdm variable as suggested by Bernie Bright. 2002-08-31 19:48:28 +00:00
curt
25c4d9b620 Minor tweaks to sound subsystem update rates. 2002-08-26 20:46:13 +00:00
curt
ee35eecb54 Erik Hofman:
I removed some pending random code and I also fixed a
small cosmetic glitch where dt_play was cleared before it was printed.

Curt: Erik changed the sound update intervale and I further I tweaked it.
The issue is that if we put too much into the sound buffer, then we can't react
quick enough to sounds like tire squeek that need to be synced with the visuals
and the action.  We put too little into the sound buffer and we risk the
audio dropping out for moment if a frame takes longer to draw than the amount
of audio in the buffer.
2002-08-25 23:27:00 +00:00
curt
df6989a37a Bernie Bright:
Here is a FGIO class derived from FGSubsystem that replaces the fgIOInit()
and fgIOProcess() functions.  The FGIO::update(double delta) doesn't use the
delta argument yet.  I suspect it could be used as a replacement for the
calculated interval value but I'm not familiar enough with that piece of code
just yet.

I've also added two "command properties" to fg_commands.cxx that select the
next or previous view.  Writing any value to these properties triggers the
corresponding action.  As an example I modified my keyboard.xml:

 <key n="118">
  <name>v</name>
  <desc>Next view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/next</property>
   <value type="bool">true</value>
  </binding>
 </key>

 <key n="86">
  <name>V</name>
  <desc>Prev view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/prev</property>
   <value type="bool">true</value>
  </binding>
 </key>

And of course these actions can also be triggered from external scripts via
the props server.
2002-08-25 20:56:16 +00:00
david
0ebe8ec8f0 Removed the FG3DModel class and replaced it with fgLoad3DModel.
Animations are now contained within the scene graph itself and are
updated whenever the graph is traversed -- that saves time by not
updating animations not currently in sight, and it allows animations
to be used for static objects and random objects as well.

Added new FGModelLoader and FGTextureLoader classes.  These are intern
tables for models, to guarantee (mostly) that no model is loaded more
than once.  FGTextureLoader is not yet used anywhere, but
FGModelLoader is now in place everywhere that ssgLoad* used to be
used (thus adding the ability to use animations).

In the future, FGModelLoader will add some interesting functionality,
including the ability to reload 3D models on the fly.
2002-08-07 01:34:49 +00:00
curt
94c44fc172 A couple fixes to the network fdm interface. 2002-07-30 04:37:16 +00:00
david
0178c65981 I totally misunderstood sgFrustum. This patch should put it right,
and also adds an optimization to avoid traversing anything closer than
1000m.
2002-07-26 01:52:51 +00:00
david
9bf3c10743 Change the extra culling to do only a quarter of the scene every 200
frames rather than the whole thing, to avoid tiny stutters.
2002-07-25 17:47:42 +00:00
david
1c35d89eb4 Fix a problem with the culling of out-of-range random objects. When
the triangles containing the objects were out of the view Frustum,
they were never traversed by ssg (and thus, never culled).  Now, every
200 frames, do a pass through the whole scene graph with cull-testing
disabled and without drawing anything; that will allow random-objects
to be collected incrementally.
2002-07-25 17:29:08 +00:00
curt
e85939a814 Removed some redundant glLight() calls. 2002-07-21 17:03:29 +00:00
curt
f330ae1234 Patch to explicitely control the specular lighting component. 2002-07-21 15:40:51 +00:00
david
5aee96c481 Change FGSteam into a proper subsystem rather than a collection of
static methods, and remove outdated dependency in panel_io.cxx.
2002-07-07 15:45:56 +00:00
curt
0ba0a278b9 Patch from Norman to do the code/base version comparison check a little
more sensibly (and print the correct error message.)
2002-06-07 23:26:07 +00:00
david
5bec60a602 Set up cloud layers when thesky is allocated, to ensure that they are
created only once.
2002-06-05 17:44:39 +00:00
curt
b2cefb1450 Check for the proper base package version. 2002-05-30 15:37:39 +00:00
curt
2cafd466e2 Tony Peden:
Defeated the invasion once and for all.
2002-05-20 16:19:26 +00:00
curt
8ae364a220 Jim Wilson:
This is a small fix for what turned out to be a major bug.  Ground elevation
was calculated incorrectly when distant from one of the view locations. This
resulted in several problems including bizarre gear trimming, mid air
"crashes" (as in thinking we hit the ground) and so on when close to or on the
ground.

Unfortunately it does require a second ssg traversal when in tower view
(only), but the increased load isn't all that noticable.  For the time being
this really is the best solution.  In a future update I will be eliminating
the unecessary per frame traversals for the static views (without having to
maintain multiple ssgRoots).

When we go to multiple FDM instances we will perhaps need to put the ssg
traversal and ground elevation queries for the FDMs into an event timer that
updates the FDMs ground elevation in a round robin fashion (maybe every 1/n
seconds where n is the number of FDM instances running).
2002-05-20 16:13:37 +00:00
david
89483df079 No longer initialize static cloud layers (handled dynamically in
environment_mgr.cxx).  The /environment/clouds/status property is now
checked each frame, so clouds can be turned on or off in the middle of
a session.
2002-05-17 19:04:20 +00:00
curt
b1674cb506 From: "Jim Wilson" <jimw@kelcomaine.com>
This is a new improved patch for the previous tile manager fixes.

Rather than building dependencies between FGlocation or the viewer or fdm with
tilemgr what I ended up doing was linking the pieces together in the Mainloop
in main.cxx.  You'll see what I mean...it's been commented fairly well.  More
than likely we should move that chunk somewhere...just not sure where yet.

The changes seem clean now. As I get more ideas there could be some further
improvement in organizing the update in tilemgr.  You'll note that I left an
override in there for the tilemgr::update() function to preserve earlier
functionality if someone needs it (e.g. usage independent of an fdm or
viewer), not to mention there are a few places in flightgear that call it
directly that have not been changed to the new interface (and may not need to be).

The code has been optimized to avoid duplicate traversals and seems to run
generally quite well.  Note that there can be a short delay reloading tiles
that have been dropped from static views.  We could call the tile scheduler on
a view switch, but it's not a big deal and at the moment I'd like to get this
in so people can try it and comment on it as it is.

Everything has been resycned with CVS tonight and I've included the
description submitted earlier (below).

Best,

Jim

Changes synced with CVS approx 20:30EDT 2002-05-09 (after this evenings updates).

Files:
http://www.spiderbark.com/fgfs/viewer-update-20020516.tar.gz
 or
http://www.spiderbark.com/fgfs/viewer-update-20020516.diffs.gz

Description:
In a nutshell, these patches begin to take what was one value for ground
elevation and calculate ground elevation values seperately for the FDM and the
viewer (eye position).  Several outstanding view related bugs have been fixed.

With the introduction of the new viewer code a lot of that Flight Gear code
broke related to use of a global variable called "scenery.cur_elev".

Therefore the ground_elevation and other associated items (like the current
tile bucket) is maintained per FDM instance and per View.  Each of these has a
"point" or location that can be identified.  See changes to FGLocation class
and main.cxx.

Most of the problems related to the new viewer in terms of sky, ground and
runway lights, and tower views are fixed.

There are four minor problems remaining.  1) The sun/moon spins when you pan
the "lookat" tower view only (view #3).  2) Under stress (esp. magic carpet
full speed with max visibility), there is a memory leak in the tile caching
that was not introduced with these changes.  3) I have not tested these
changes or made corrections to the ADA or External FDM interfaces.  4) The
change view function doesn't call the time/light update (not a problem unless
a tower is very far away).

Details:
FDM/flight.cxx, flight.hxx - FGInterface ties to FGAircraftModel so that it's
 location data can be accessed for runway (ground elevation under aircraft)
 elevation.

FDM/larsim.cxx, larcsim.hxx - gets runway elevation from FGInterface now.
Commented out function that is causing a namespace conflict, hasn't been
called with recent code anyway.

FDM/JSBSim/JSBSim.cxx, YASim/YASim.cxx - gets runway elevation from
FGInterface now.

Scenery/newcache.cxx, newcache.hxx - changed caching scheme to time based
(oldest tiles discard).

Scenery/tileentry.cxx, tileentry.hxx - added place to record time, changed
rendering to reference viewer altitude in order to fix a problem with ground
and runway lights.

Scenery/tilemgr.cxx, tilemgr.hxx - Modified update() to accept values for
multiple locations.   Refresh function added in  order to periodically make
the tiles current for a non-moving view (like a tower).

Main/fg_init.cxx - register event for making tiles current in a non-moving
view (like a tower).

Main/location.hxx - added support for current ground elevation data.

Main/main.cxx - added second tilemgr call for fdm, fixed places where viewer
position data was required for correct sky rendering.

Main/options.cxx - fixed segfault reported by Curtis when using --view-offset
command line parameter.

Main/viewer.cxx, viewer.hxx - removed fudging of view position. Fixed numerous
bugs that were causing eye and target values to get mixed up.
2002-05-17 17:25:28 +00:00
curt
fcd6b28e0f Bernie Bright:
I've defined snprintf as _snprintf in compiler.h for MSVC and MINGW
targets and removed duplicate definitions from FG sources.
2002-05-17 16:41:27 +00:00
david
279643226a Temporarily modified to support changes in SGSky and SGCloudLayer;
this will soon be removed into a separate module that allows dynamic
changes to cloud layers.
2002-05-17 01:23:00 +00:00
curt
f9f05aa870 Bernie Bright:
Here is the new super improved telnet property interface.  CVS changelog
is at the end of this message.  Once this new telnet code is in and
compiles every where we can remove Network/props.[ch]xx.  I've added a
--telnet=<port> command line option to invoke the new server.  Later on
we could remove the --props option, or least change it to invoke the new
server.  I'll let you decide.

I've added some new commands to the telnet interface:

view next      Select the next view.
view prev      Select the previous view.
view set <n>   Select view 'n'
view get       Return index of current view

I'm not sure if these same effects could be achieved through property
operations.  The commands provide a convenient shortcut in any case.

I'm also planning on adding a panel command to manipulate panels and
objects contained therein (eg simulated mouse clicks).  There is going
to be some commonality with the command objects so we may need to
rationalize this in the near future.

Finally, I've also included my python stuff.  This is still very much a
work in progress, basically I've been using it to test the new telnet
server.  I have  tested it with python 2.2.  Feel free to add it to the
repository if you want.  I would suggest a scripts/python directory

CVS Changelog

Network/telnet.cxx: New property telnet protocol interface.  It supports
the same user interface provided by the --props server.  Additionally it
handles multiple simultaneous connections.  Added "view" command to
manipulate viewmgr.

Network/protocol.hxx: Added protocol configuration exception.

Main/fg_io.cxx:  Added new "telnet" protocol.  Added protocol
configuration parse exceptions.  Simplified protocol configuration
parsing.

Main/options.cxx: Added --telnet=<port> command line option and help
message.
2002-05-15 21:44:34 +00:00
curt
487a14d05b Moved some scenery component initialization into FGScenery. 2002-05-14 06:08:28 +00:00
curt
92a58f6555 Consolodating scenery structures in scenery.hxx. 2002-05-14 05:49:47 +00:00
curt
47825dcbae Moved "scenery" from being declaried in scenery.cxx to being declared
in globals.hxx.
2002-05-14 05:22:52 +00:00
david
1fe50d4cd2 Removed configuration option --with-old-mouse and FG_OLD_MOUSE macro.
Removed configuration option --with-new-environment and
FG_NEW_ENVIRONMENT macro.

Added configuration option --with-weathercm and FG_WEATHERCM macro.

FGEnvironment is now the default; use --with-weathercm to get the old
weather.
2002-05-12 00:12:19 +00:00
david
ee4c3f728d Remove some dead code. 2002-05-11 21:10:11 +00:00
david
5a849b66e8 Major overhaul:
- changed FGSubsystem::update(int) to
  FGSubsystem::update(delta_time_sec); the argument is now delta time
  in seconds rather than milliseconds

- added FGSubsystem::suspend(), FGSubsystem::suspend(bool),
  FGSubsystem::resume(), and FGSubsystem::is_suspended(), all with
  default implementations; is_suspended takes account of the master
  freeze as well as the subsystem's individual suspended state

- the FDMs now use the delta time argument the same as the rest of
  FlightGear; formerly, main.cxx made a special case and passed a
  multiloop argument

- FDMs now calculate multiloop internally instead of relying on
  main.cxx

There are probably some problems -- I've done basic testing with the
major FDMs and subsystems, but we'll probably need a few weeks to
sniff out bugs.
2002-05-11 16:28:50 +00:00
david
ff6943bd09 Regularized the position initialization:
1. If /position/longitude-deg and /position/latitude-deg are in range,
   use them.
2. Otherwise, if /sim/startup/airport-id is not empty, use it.
3. Otherwise, set the lon/lat to the middle of the KSFO field.

The default used to be Globe, AZ, but that doesn't make sense since we
don't distribute that scenery by default any more.

With this change, starting from a save file seems to work properly:

  fgfs myflight.sav
2002-05-01 23:13:36 +00:00
curt
6b22c85e24 Comment out ATC AI manager init() and update() calls until we can resolve
the tremendous performance hit they are imposing.
2002-04-22 22:28:00 +00:00
curt
586d767ab6 There was an integer overflow in the way elapsed_time_ms. Because the
SGTimeStamp "-" operator returns it's result in usec's, there is an upper bound of 37.8 minutes on the maximum difference this operator can reliably report
before the math overflows.  I change the global "int elapsed_time_ms" variable
to a "double sim_time_ms" and restructured how the value is calculated.
----
The practical result of the overflow bug is that a large negative dt was
passed to the event manager and the end effect was that no events would
be run until their counters caught up ... in another 37.8 minutes or so.
2002-04-20 14:52:43 +00:00
curt
4656e3adca Jim Wilson:
Minor patch for flicker glitch when crossing from one tile to another.
2002-04-19 00:25:25 +00:00
curt
71598c12f8 Jim Wilson:
These are the updates for the View manager properties.  Removed the last of
items (within the viewer/viewmgr) hard coded to view number.  Added support
for per view configuration of ground level nearplane value.  Tower views look
very nice with little or no z-buffer problem in the models.  Pilot offset
dialog can be used to move eye in all views.
2002-04-18 16:51:47 +00:00
curt
7311318e7e Small tweak to make the Irix compiler happy. 2002-04-16 17:28:57 +00:00
david
c5f6293f17 Fix for vanishing-model problem: models are drawn in the same scene
graph as the terrain, except for internal cockpit view.  The SSG
scene-graph variables (except for the lighting root -- I'll get that
later) are now held in globals.hxx.

FGModelMgr::draw() is obsolete; I'll remove it in a future revision.
2002-04-13 21:36:22 +00:00
david
8bed5a8cf4 Added support for additional animated, dynamic 3D models configured in
XML.
2002-04-12 12:45:49 +00:00
david
3bb69f35d1 Replace --with-new-mouse with --with-old-mouse, defaulting to 'no'. 2002-04-11 17:09:06 +00:00
curt
42a5ee93d7 This patch includes the FGLocation class, a few fixes, cleanup in viewer code.
Synced to CVS 19:36 EDT 2002-04-10 (after this evenings JSMsim and Base
package updates).

Description:
Added FGLocation class which is new home for calculating matrix rotations.
Viewer can now be configured to access rotations created by the model rather
than repeating the same calculations again.

Changed model initialization for the time being so that its location data is
available for the viewer (currently required by other subsystems).  At some
point we can move this back to fg_init along with the viewer initialization.

Seperated the update from the draw function in the model code.  The viewer
code needs the same matrix data, and moving the update portion at this time
does not increase the number of matrix math iterations.

Moved the model draw so that it always appears "in front" of lights and clouds.

Reogranized viewer update routine for using the FGLocation class and
simplified some more tasks.  The routine is fairly easy to follow now, with
the steps ordered and spelled out in comments.

Viewmgr only updates the current (visible) view now, with the exception of an
old reference to "chase view" that will be corrected in forthcoming changes.
Also will be doing some work on the viewmgr outputs.

Model is now clears the z-buffer in all modes.  This will be changed with the
next viewmgr update.  The only side effect is that models always disappear
when over 5km distant from the eye point (can't really see them anyway:-)).

Other than a flag to indicate "internal" view I don't anticipate the
configuration interface for viewmgr/views will be changed a lot for now.  It
is close to done.  The next viewmgr update will however rework the outputs so
may change location.

This code will run with the previous version of preferences.xml, but will run
faster with the newer version.  I am attaching a preferences.xml that should
not be commited before the code.  All the changes are in the /sim/view section
and should show a simpler view configuration that references model locations.
 Note that I've added a 2nd tower view in "lookfrom" mode for illustration
purposes. You can look around using the mouse.  You may want to remove that or
comment it out.
2002-04-11 04:26:07 +00:00
david
a82e15a653 The 3D aircraft model scene is now managed by
FGAircraftModel::update.  We should do the same thing for the scenery,
to simplify the top-level loop.
2002-04-09 21:08:28 +00:00
david
cde90e06d5 Removed current_model global variable and added a reference in
FGGlobals instead (we still need to do the same with current_input and
a few other globals).
2002-04-09 18:58:24 +00:00
david
6e5d22789b Patches from Norm Vine to improve framerate and add a new
#ifdef'ed-out mode for syncing fullscreen with user settings in
Windows.
2002-04-07 15:24:32 +00:00
david
a1294ea398 Viewer update from Jim Wilson:
Minor patches to initial tower view code.  Added calculation for "tower" at
any airport, placed a couple fractions of a degree off the center.  Moved the
farplane from 100m to 5km so that "lookfrom" mode can see the model.  5km is
still in a reasonable range for a depth buffer.  Note that looking at a model
anything but a small distance will cause some problems on older cards.
Temporarily changed viewer to always report elevation/lon/lat of the aircraft
in order to avoid a problem with the ground trim getting recalculated when
tower and aircraft are on different tiles.
2002-04-06 17:23:18 +00:00
curt
41a4d0b351 Here is the 'boostified' event manager plus relevant changes to
radiostack.cxx, fg_init.cxx and main.cxx.  If these changes are accepted
then you can remove Time/event.[ch]xx and Include/fg_callback.hxx from
the repository.
2002-04-05 20:03:49 +00:00
david
ec6888d4a4 Viewer update from Jim Wilson:
Tower View and viewer config is in place.  Note that the interface is
still in a state of flux.  A couple of the config items (namely the
offsets) are still using the old settings.  The tower is hard coded
into the base package for a position off the starting runway at KSFO
and is probably not in the right place for there even.  Looks pretty
cool though!  Tower View is the third view.  If you aren't at KSFO
you'll just see blank space in view 3. It's looking through the earth or
something like that :-).  Important note: zoom in with a few
hits of the "x" key to see the plane better in tower view.
2002-04-05 18:49:04 +00:00
david
625572663e Moved FGAircraftModel subsystem out into its own directory, and
separated out a new class, FG3DModel, that allows any arbitrary 3D
model to be positioned, oriented, and animated (not just the
aircraft).
2002-04-05 03:19:34 +00:00
curt
59107c791c Various code cleanups. 2002-04-05 00:38:55 +00:00
david
f450e6d9d1 Let exceptions fall through to main, and use cerr to report them (in
case logging is disabled).  This way, when people specify a
non-existant aircraft or have an error in a custom XML file, they'll
get an error report, at least.
2002-04-04 17:51:40 +00:00
curt
fd8d48d011 Make the base package check [failed] message a bit more informative about
where it was looking.
2002-04-04 05:03:18 +00:00
david
21d8c07576 Changed cockpit near plane to 0.01m for interior view. Far plane is
100m, so it should be OK.
2002-04-04 01:32:57 +00:00
curt
7543409e47 Attached are a fairly extensive series of patches to the ATC
system.  A chap from Germany called Alexander Kappes (cc'd) got
in touch with me a few weeks ago and has written the start of
Approach control.  At the moment tuning in to a valid approach
frequency (Dortmund or East Midlands) should result in vectors to
a spot about 3 miles from the active runway, and a telling off if you
stray too far from the correct course, in the console window.  He
seems to know what he's doing so expect this to improve rapidly!!

I've added a rudimentry AI manager and a hardwired Cessna at
KEMT on the runway - I'll remove it before the next release if I don't
have it flying by then.  There seems to be an issue with framerate
which drops alarmingly when looking at it - I've a feeling that I've
possibly created several Cessnas on top of each other, but am not
sure.
2002-04-03 23:54:44 +00:00
david
0c1fa5f1a5 Changed far clip plane for cockpit interior to 100m. 2002-04-02 20:57:32 +00:00
david
6a443bb173 Start tracking delta time in milliseconds and passing it to the update
method of each subsystem.
2002-03-30 21:22:02 +00:00
david
faf2fa91d2 Patch from Jim Wilson:
Clear frame buffer and render model after rest of 3D scene. This has a
small frame rate cost (YMV). But who thought 3D cockpit would be cheap?
If anyone has a better idea, have at it!

Just did some more careful testing and I see little or no frame rate loss
with the depth buffer clear.  Also you can change the near plane to 0.1
and get rid of the "sunroof" (so I don't have to make up another set of
patches.
2002-03-30 12:52:24 +00:00
david
58e664a060 Patches from Jim Wilson:
This patch creates a seperate scene graph for the cockpit.  The near plane is
only moved up when in the interior (pilot) view.  This is because with
rounding (I presume) it the visible ground is a bit up higher than it is with
the older nearplane setting.  Not much, but it is enough to bury the wheels.
I suspected this might be true but spliting to two sg's confirms it.  If
necessary we can adjust the model up a bit when in interior view.  This might
be good so we can set the near plane even closer when in the cockpit (its
still at 0.2m).

In general this looks a lot better on my Voodoo with this patch.  No
perceptibel change in frame rate on my system.  In terms of future plans I'd
see the sense in making the model plug into either scene.  This will be
necessary when we have multiple model instances in the frame.
2002-03-28 16:14:04 +00:00
david
db7013c83a More work on the configurable mouse. Mouse motion is now configurable
as well as mouse clicks.  You must configure with --with-new-mouse to
get this.
2002-03-26 13:45:44 +00:00
curt
0a035c7f36 Oops, in the latest property manager rewrite, a typo crept in on
somewhat of a global scale.  This commit should fix all these up.
2002-03-26 02:38:11 +00:00
david
de9682e32a Patch from Erik Hofman:
This patch gets F8 working again.
2002-03-25 19:37:49 +00:00
david
9709dcb307 First steps towards configurable mouse input. Soon, this new code
(mainly in src/Input/input.cxx) will make src/GUI/mouse.cxx obsolete
and bring the mouse into the same input system as the joystick and
keyboard.  This is just preliminary work allowing, covering mouse
clicks (no motion yet), and it actually crashes on a middle or right
click.

The new mouse support is disabled by default until it become stable;
to try it out, you need to configure --with-new-mouse.
2002-03-23 23:16:13 +00:00
david
da621105a0 Removed unused function fgFindNode (the version used now is in model.cxx). 2002-03-22 13:24:29 +00:00
david
d0d3b2bd7a Use !strcmp for all property string-value comparisons. 2002-03-20 22:15:22 +00:00
curt
99fa3a6e79 Various Irix cleanups.
Float/Double clean ups for fg_sound.cxx
2002-03-20 15:57:31 +00:00