1
0
Fork 0
Commit graph

864 commits

Author SHA1 Message Date
ehofman
ef37b45dc7 Frederic Bouvier's assorted set of MSVC fixes 2003-03-23 09:59:46 +00:00
ehofman
1b450bee25 Make callsign parameter aware 2003-03-22 15:43:24 +00:00
ehofman
9ef6b16054 Remove old if..then..else kludge an favour of Frederic Bouvier's new code. This also fixes a problem with MultiPlayer options being defined in the wrong place 2003-03-22 14:52:15 +00:00
ehofman
0782e877a9 Add runtime log level support 2003-03-22 10:38:15 +00:00
ehofman
10e9877d83 Latest episode of the MultiPlayer saga 2003-03-21 20:33:41 +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
076e9878d1 Fix a typo 2003-03-20 22:31:25 +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
f2e2101264 David Luff writes:
I've fixed a bug in FGRunways::search(aptid, tgt_hdg) which wasn't working properly for airports with multiple parallel runways. I've also firmed up and pulled out into it's own function the GetReverseRunwayNo code, and done some input checking.

As a result of fixing the above in runways.cxx, I've pulled out the
parallel implementation in the functions that set position by airport and
heading/runway number in fg_init.cxx and called the runways functions
instead.
2003-03-20 09:38:06 +00:00
ehofman
e46c59d4d0 Add multiplayer support from Duncan McCreanor and Diarmuid Tyson 2003-03-19 20:45:09 +00:00
ehofman
01be2ed8e4 Compiler warning fixes and small updates 2003-03-19 17:46:52 +00:00
curt
c32c8aca51 Wire frame mode got broke somehow. This seems to fix it. 2003-03-14 02:07:45 +00:00
david
d94bd7526c Make sure that all elapsed time gets passed to update when a subsystem
has a minimum time slice.
2003-03-09 03:22:12 +00:00
curt
000e86756c Add support for --fdm=pipe,<pipe_name> 2003-03-03 04:34:27 +00:00
david
c90d7e96c2 Make sure the atmosphere is updated before the flight model. 2003-03-02 01:43:00 +00:00
david
e1bb9b67f5 Refactor things so that individual subsystems can override suspension. 2003-03-01 21:29:16 +00:00
david
58adf467bf Add a new <power> property to allow raising an axis to a power other
than 1 or 2 (<squared/> still works as well, and is equivalent to
<power>2</power>).
2003-03-01 21:28:51 +00:00
david
afb2e68f89 Add new options:
--vor=ID
  --ndb=ID
  --fix=ID
  --turbulence=NORM
2003-02-21 02:46:44 +00:00
david
4b9060b064 Invoke fgInitNav() before fgInitPos(). 2003-02-21 02:46:07 +00:00
david
22097a5272 Add fgInitNav() function so that navaids and fixes can be loaded
earlier, before fgInitSubsystems().

Modify fgInitPos() so that the plane is not automatically aligned with
a runway when an airport is the reference point unless (a) a runway
was explicitly requested, or (b) the plane is on the ground with no
offset distance specified.  To set up the plane lined up on an
approach to a runway, use something like

  fgfs --airport=CYOW --runway=32 --altitude=300 --offset-distance=0.5

This way, it's possible to specify a starting position relative to an
airport without getting snapped onto a runway approach (unless you
want to be).
2003-02-21 02:45:47 +00:00
david
7d7a137d86 Declare fgInitNav(). 2003-02-21 02:42:45 +00:00
curt
86bf012f50 Erik Hofman:
Sort aircraft when using --show-aircraft option.
2003-02-11 21:17:36 +00:00
curt
5efcc9c1d9 Dave Luff:
Patch to remove initialisation of atislist,towerlist and
approachlist which have been superceeded by commlist.
2003-02-10 20:42:18 +00:00
curt
79b3e39251 There are a number of little changes. Tested with current cvs as of 20:30EST
04Feb.  Actually been running since the beginning of January with these
patches.  All changes work without crashing with the current base package cvs,
but there are some visual problems with the views (other than pilot view)
without changes to the base package.

As soon as you can build test and commit I can add in those base package
updates that will make it all work nicely.  I will also go through all the 3D
Aircraft configs to make sure the change in the "pitch-offset" for cockpit
views (see below) are made to maintain current behavior.

Here are the files (changes listed below):
http://www.spiderbark.com/fgfs/viewerupdate.diffs.gz
http://www.spiderbark.com/fgfs/viewerupdate.tar.gz
2003-02-06 19:44:32 +00:00
david
8506e731a2 Minor logging changes.
All logs and log entries are now disabled by default, unless
explicitly enabled by an 'enabled' property.  This works much more
intuitively with the GUI dialog.
2003-02-01 17:59:52 +00:00
david
57da4bf02d Removed the old FGSteam module from FlightGear. 2003-01-29 15:30:29 +00:00
curt
8cc7b283d5 Refactored some of the navlist code and removed the built in "fail to find"
if the station is too far away.  Instead, simply return the closest station.
All the code that searches navaids does it's own range checking anyway.
This will make the navlist query functions a bit more useful for other
types of functionality where you may need to lookup a station without
consideration of range (i.e. presetting your position relative to a navaid.)
2003-01-25 20:45:39 +00:00
david
9679c7da15 Changed 'exit' command to quit immediately, rather than displaying a
built-in dialog (use an XML dialog instead).

Added an fgExit() function to simplify exit and cleanup.
2003-01-24 03:08:23 +00:00
david
f61d73e546 Make fgLoadProps more flexible, to read from $FG_ROOT or the current
directory.
2003-01-21 02:08:00 +00:00
david
e0c7b29aa7 Added reinit, suspend, and resume commands. 2003-01-21 02:07:29 +00:00
david
40bed0a3f1 Change GUI method names.
Do not delete GUI objects directly; let the GUI manager do it instead.

Simplify some code for readability.
2003-01-20 16:03:48 +00:00
curt
e00fa3dbaf Tweaks to protocol names to match recent changes in options.cxx (so they
will work.) :-)
2003-01-20 03:09:54 +00:00
david
35935cb23a Major overhaul by Frederic Bouvier to make options table-driven. 2003-01-19 23:02:51 +00:00
david
6205d5eb1a Do an update after apply to see what really got into FlightGear. 2003-01-19 17:22:05 +00:00
david
013c322dd3 Added the property-cycle command. 2003-01-18 21:13:11 +00:00
curt
d8f4bfa9ae Make the destructor virtual.
(I thought I'd slip this in along with David's change to the default menu
configure option.  I believe that will cause a new config.h to be generated
which will cause a near complete rebuild of FG (as will this globals.hxx
change) so it shouldn't cause additional grief to have these happen at the
same time.)
2003-01-18 19:40:28 +00:00
david
c10ce7bd26 Renamed GUIWidget to FGDialog. 2003-01-18 15:57:51 +00:00
david
55182238e6 Do not require libScripting.a unless PSL is available. 2003-01-17 18:25:34 +00:00
david
04f1dc4837 Make all PSL support conditional, because it's not included in plib
1.6.  The macro is HAVE_PLIB_PSL.
2003-01-17 12:41:47 +00:00
david
2256c3d5fd Simplify subsystem handling through FGGlobals. 2003-01-16 16:01:26 +00:00
david
b2518a0056 Broadcast suspend/resume/reinit through the manager and its groups. 2003-01-16 15:11:04 +00:00
curt
ea543c1210 Renamed mini_fdm to native_gui which makes a lot more sense to me. 2003-01-15 02:09:10 +00:00
curt
9bff823e0a Added velocity and climb_rate to mini_fdm structure. 2003-01-13 00:27:50 +00:00
curt
f3d4f741f0 Update to the Mini FDM network protocal (mostly renaming class and file names)
Wired this in to options.cxx and fg_io.cxx so it can be activated.
2003-01-12 23:39:18 +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
david
9bbe8a78b6 Added simple proof-of-concept support for running PSL scripts from
input bindings.  They will work only with the latest CVS; otherwise,
./configure will disable them.  There is a new command, 'script',
which takes a single argument, also called 'script', containing PSL
code (currently PSL requires a main() function).

Erik Hofman has written some more elaborate code for triggering PSL
code from drop-down menus and scheduling events; I will look at
integrating that next.
2003-01-11 16:30:32 +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
curt
be703a92b4 Add support for in-air preset starts relative to a VOR, NDB, or Fix. 2003-01-05 00:10:36 +00:00
curt
30dc5aab90 Ooops, the presets_commit command was lost going from the 1.8 -> 1.9 version
(Sun Dec 22 19:58:34 2002 UTC)
2003-01-04 21:22:43 +00:00
david
1ec788b6da Patch from Julian Foad to fix wrapping behaviour for property-adjust
and property-multiply:

Firstly, change back to wrapping modulo the interval, with "min <= x <
max" semantics.  I believe the previous implementation did that.  The
inline function that Norman mentioned also does that.

Secondly, make it snap to the nearest value (min + N*resolution) when a
"resolution" tag is present, taking special care of floating-point
precision.  Or perhaps specify "number of divisions in the interval" as
an integer, instead of "resolution" by which I meant a floating-point
"size of a division".

[also fixed]

While working on this file I noticed some potentially serious warnings:

fg_commands.cxx: In function `bool do_property_adjust(const
SGPropertyNode*)':
fg_commands.cxx:435: warning: control reaches end of non-void function
fg_commands.cxx: In function `bool do_property_multiply(const
SGPropertyNode*)':
fg_commands.cxx:465: warning: control reaches end of non-void function
/usr/local/include/simgear/misc/props.hxx: At top level:
fg_commands.cxx:600: warning: `bool do_presets_commit(const
SGPropertyNode*)' defined but not used
2003-01-04 18:47:25 +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
e4409c5222 Add the 'offset' and 'factor' arguments back into property-adjust;
they're needed for the mouse.
2002-12-31 12:08:32 +00:00
david
ea6448c956 Modify the property-assign command to optionally copy a value from
another property (suggested by Jim Wilson).
2002-12-31 03:05:38 +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
david
0d12c4d83d Removed the (apparently unused) 'factor' and 'offset' arguments from
property-adjust.

Modified property-adjust and property-multiply so that they always
work with double values, to simplify the code.

Factored out some common code.

Added a 'mask' argument to the property-adjust and property-multiply
commands.  If mask is set to "all" (the default), then the command
works as before; if mask is set to "integer", it works only to the
left of the decimal point; and if mask is set to "decimal", it works
only to the right of the decimal place.  This functionality is useful
for tuning VHF COM and NAV radios.
2002-12-30 19:50:17 +00:00
david
a7e56cf399 Added new commands:
- dialog-open
- dialog-close
- dialog-update
- dialog-apply

The last two can copy a value from a property to a GUI field or
vice-versa either individually or across the whole dialog.
2002-12-22 19:58:34 +00:00
curt
6225936ead Various tweaks. 2002-12-21 05:01:51 +00:00
david
8e7dfbe292 Add a reinit() stub for subsystems, so that they can be reinitialized
when needed (say, to reload the configuration files).
2002-12-15 14:58:08 +00:00
curt
0e69acaff7 Simplified to use the delta_time_sec that is passed to the update() routine
rather than calculating a separate delta_t and using that.
2002-12-14 14:39:56 +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
10baa71a65 Fix out of order initialization crash (not sure how it worked before
unless some recent changes subtlely changed some init order items around.)
2002-12-11 21:07:30 +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
7674741abb Add -lplibjs where needed. 2002-12-03 14:55:23 +00:00
curt
ebc2fbd684 Exposed the fg_commands though the httpd interface.
Added a built in command to preset to what ever values are in /sim/presets/
Twiddling with preset code.
2002-11-30 20:10:16 +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
df2356050d Added a "Presets" menu. 2002-11-18 21:31:33 +00:00
curt
8f3a988e0e If a non existant runway is specified with --runway=xxx fall back to
finding the runway that is the closest match to the specified (or default)
heading.
2002-11-17 04:17:27 +00:00
curt
13bb01a70e Added a --runway= option which can be used in conjunction with the --airport=
option to specify a starting airport + specific runway.  If you don't specify
a runway, you get the one that's closest to your specified (or default)
heading.
2002-11-17 04:04:21 +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
b3935aa01f Make the routines that scan the command line options and config files more
general so we can eliminate the option specific versions of these.
2002-11-16 20:41:00 +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
david
2de88f278b Started new, XML-configurable GUI subsystem. 2002-11-07 16:27:47 +00:00
david
0de065b0ec Added fgLoadProps to load properties from a path relative to FG_ROOT. 2002-11-06 18:57:31 +00:00
david
f06a658bee Modified /sim/current-view/axes/long and /sim/current-view/axes/lat to
use the user-configurable view defaults.
2002-11-02 21:43:15 +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
david
fa87fe5c1d Modified for simpler command-manager interface. 2002-10-26 01:19:23 +00:00
david
d43dfa54df Major code simplification. 2002-10-25 22:19:51 +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
curt
8166467292 Cleaned up some old cruft. 2002-10-16 03:44:19 +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
david
76cda01641 Fixed init-order bug that caused c172-set.xml defaults always to be
used unless explicitly overwritten.  Now, the options are parsed
twice, and only the *-set.xml file for the *last* aircraft specified
is loaded.
2002-10-10 18:39:52 +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
f0b7744fd5 Frederic Bouvier:
The FGGlobals constructor does not initialise the locale pointer.
Under MSVC, uninitialized pointer have a value of 0xcdcdcdcd, not
0, so a test in mainLoop fails and the program segfault.

This patch set un initial value to locale.
2002-10-04 20:57:18 +00:00