1
0
Fork 0
Commit graph

733 commits

Author SHA1 Message Date
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
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
curt
bacbd50eaa Init 3d clouds at starting location. 2002-10-03 03:19:35 +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
curt
0d87fad65c Shuffled location of ExternalNet.[ch]xx to it's own subdir.
Removed External.[ch]xx which is a duplicate of NullFDM.[ch]xx
--fdm=external is preserved but just maps to NullFDM.
2002-09-28 21:42:03 +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
3da2de39fc Add utils.[ch]xx. 2002-09-27 22:02:09 +00:00
david
84d2627236 Globally-useful functions, starting with Alex Perry's low-pass
function from steam.cxx.
2002-09-27 22:01:33 +00:00
curt
90e64f9430 Stub in a place holder for the electrical system model. 2002-09-24 15:24:04 +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
bb4fe6907f Bernie Bright:
Fix a problem compiling Main/fg_io.cxx with MSVC.
2002-09-17 16:16:54 +00:00
curt
cc87fb93ba Updates for 3d cloud rendering. 2002-09-16 14:56:16 +00:00
david
95e1b51068 Added --enable-clouds3d and --disable-clouds3d options. 2002-09-16 02:46:23 +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