mfranz [Sun, 11 Jun 2006 15:32:18 +0000 (15:32 +0000)]
add Nasal/Listener hooks for adding/removing AI/MP models. Things like
MP chat or Nasal/xml based radar instruments need that. It uses fgSetString,
because this is in a very "cold path" and shouldn't clutter the AIBase.
mfranz [Sun, 11 Jun 2006 15:18:48 +0000 (15:18 +0000)]
remove the "ai_model" subsystem manually before the other subsystems
are taken down by the C++ runtime environment. This will later be done
with runlevels. Why would we want to run nasal code in subsystem
destructors? We don't really. But some data structures may use nasal,
which are normally created/destroyed during runtime. And these will
also be destroyed at fgfs exit. In the past things like these didn't
happen, because someone had disabled all subsystem destructors ...
frohlich [Sun, 11 Jun 2006 13:34:18 +0000 (13:34 +0000)]
Modified Files:
src/AIModel/AIAircraft.cxx src/ATC/AILocalTraffic.cxx
src/FDM/flight.cxx src/FDM/flight.hxx src/FDM/groundcache.cxx
src/FDM/groundcache.hxx src/Main/fg_init.cxx src/Main/main.cxx
src/Scenery/hitlist.cxx src/Scenery/hitlist.hxx
src/Scenery/scenery.cxx src/Scenery/scenery.hxx
Make use of the attached SGMaterial reference userdata on scenegraph
leafs. Make the SGMaterial pointer available to the ground query
routines.
mfranz [Sun, 11 Jun 2006 10:21:10 +0000 (10:21 +0000)]
fix another crash on exit by finally converting the rest of unguarded
SGPropertyNode to guarded ones. This is also done for JSBSim/JSBSim.hxx,
for which JSB had given explicit permission a while ago. I postponed that
back then, but now is the time.
mfranz [Sat, 10 Jun 2006 15:25:48 +0000 (15:25 +0000)]
the special line width doesn't make much sense, as it's only applied to the
arrow head marks. It was probably thought for all lines, but as those are
wide enough, I just comment that out for now.
mfranz [Sat, 10 Jun 2006 09:22:27 +0000 (09:22 +0000)]
treat colors like the other parameters: only copy them from the palette
color group /sim/hud/palette/color[*]/ to the active group /sim/hud/color/
if they really exist. (Parameters like <antialiased> can be set in the
active group and be left alone, or set by each <palette> color group.)
mfranz [Sat, 10 Jun 2006 07:23:15 +0000 (07:23 +0000)]
consider new HUD path. It doesn't seem to make sense to put "antialiased"
into the <color> group, but that's because on HUD color changes a whole
"color" set from /sim/hud/palette/color[*] is copied to /sim/hud/color/, and
antialiasing needs to be considered with that. (I'm not entirely happy
with the property names yet.)
mfranz [Tue, 6 Jun 2006 19:25:33 +0000 (19:25 +0000)]
bark if the requested font isn't a texture font. A more graceful recovery
doesn't buy us much, as the font is only set at initialization time and not
changeable later. Better tell the user immediately that he goofed.
mfranz [Sat, 3 Jun 2006 11:20:19 +0000 (11:20 +0000)]
- display of SGPropertyNode flags can now be toggled per <property-list>
widget (Ctrl-click on "." entry), so we don't need a global property
for this
- s/dotFiles/_dot_files/ for consistency reasons
curt [Thu, 1 Jun 2006 21:13:56 +0000 (21:13 +0000)]
Fix a dumb bug where I inadvertantly did a computation in int32 land causing
me to loose 2 decimal places in my location data before converting to lon/lat.
mfranz [Wed, 24 May 2006 14:00:56 +0000 (14:00 +0000)]
- force multiline contents (Nasal scripts!) into one line, so that they
don't print over other entries or even leak out of the widget
- warning-- (MSVC)
mfranz [Wed, 24 May 2006 09:42:10 +0000 (09:42 +0000)]
ok, now I know why the destructor was commented out in prop_picker.cxx:
there's a bug that I had copied: update() checks each list node: if it
has no children, then a listener is attached. Later, when freeing the
children list, it assumed again that each node without children would
have a listener attached. This caused a crash when a node had children
before, but lost them in the meantime. Now we tried to remove a listener
where there never was one.
mfranz [Tue, 23 May 2006 18:55:38 +0000 (18:55 +0000)]
don't abort fgfs only because a nasal script called a property function
with an invalid path, as in getprop("/sim/model/737") or x.getNode("f:1").
Forward sg's error message to the Nasal runtime error function instead, so
you get something like:
Nasal runtime error: name must begin with alpha or '_'
at /home/m/fgfs/Base.local/Nasal/props.nas, line 30
Unfortunately, the location points to the line where the ghost wrapper
sits, rather than the offending script line.
mfranz [Tue, 23 May 2006 16:49:32 +0000 (16:49 +0000)]
ugly "fix": the constructor was commented out in prop_picker.cxx since
*many* years, so the property browser always leaked memory. I activated
this line in property_list.cxx and ... got a crash right there. So this
was the reason for it being commented out? Doing the same for now, until
I know the exact reason and can really fix it.
mfranz [Mon, 22 May 2006 20:18:40 +0000 (20:18 +0000)]
Vivian MEAZZA:
"Bug Fix - amend the code so that JSBSIm can have more than one tanker in
the environment at the same time. A nasal script has to be added to each
aar-capable JSBSim model to complete this fix."
mfranz [Mon, 22 May 2006 14:33:01 +0000 (14:33 +0000)]
- backport plib/cvs (transparency feature; never tried that :-)
- backport submissions for plib 1.8.5:
* set slider size correctly
* remove slider/arrow when all entries fit into the view
* don't allow to scroll off the list
mfranz [Sun, 21 May 2006 22:14:18 +0000 (22:14 +0000)]
the last patch fixed the AirportList ... and broke all other PUCLASS_LIST.;
Unfortunately, there's no simple way to distinguish them. plib has no
user defined widget classes, and getTypeString() -- which could be used
for that -- isn't virtual. Sigh. I'll discuss the problem on the plib list.
For now I can only offer an ugly workaround. (Don't look closely!)
mfranz [Sat, 20 May 2006 15:25:38 +0000 (15:25 +0000)]
- replace string methods with property methods The class was originally adapted
from plib's file-picker, where it made some sense to keep the current path as
string, and to chop off elements when leaving a dir, and adding them when
entering. But it doesn't make the least sense in SGPropertyNode space, where
we already have everything to move in a tree.
- add R & W flags for TRACE_READ and TRACE_WRITE. Remember: lower case letters:
disabled (rw ... reading/writing), upper case letters: enabled (RWAUT)
- remove some verbosity & further cleanup ... to make further work easier :-)
mfranz [Sat, 20 May 2006 11:35:28 +0000 (11:35 +0000)]
fix "airport list" crash: I had wrongly assumed that now all PUCLASS_LIST
would actually be an fgList class. The airport list is a PUCLASS_LIST, too,
so we have to check for that. -> Use getTypeString() for identification.
mfranz [Fri, 19 May 2006 10:59:04 +0000 (10:59 +0000)]
- unify several indentation and coding styles (and no, this is not my
preferred style, but the most sane of those used :-)
- remove trailing spaces
- cleanup
(all of this will make further work on the files easier)
mfranz [Thu, 18 May 2006 16:59:04 +0000 (16:59 +0000)]
Vivian MEAZZA:
"Add Air to Air TACAN and User-User refuelling over the Multiplayer Network.
With this change, your TACAN instrument can be tuned to the channel of a
Multiplayer ac. It also activates fuel flow between User and User aircraft
when they are less than 50 ft apart. To participate in multiplayer as a
tanker, all you require to do is to use the callsign MOBIL* (where * is some
number) on the net. Only MOBIL1, MOBIL2 and MOBIL3 have been assigned TACAN
channels, but any MOBIL callsign will be able to give fuel."
mfranz [Wed, 17 May 2006 21:21:38 +0000 (21:21 +0000)]
SDL 1.2.10 (released today!) doesn't report unicode on key release. Now
we have to ourselves which unicode code a key release even should fire.
(Tested with 1.2.9 and an 1.2.10. Please report any new keyboard problems.)
mfranz [Tue, 16 May 2006 12:45:38 +0000 (12:45 +0000)]
- undefine PUCLASS_LIST, as we have our own (old_warning--)
- PropertyObject: remove additional "values" member again
- don't create entry lists for <list>, <select>, and <combo> at dialog
creation and delete them on dialog close, but let a separate class
fgValueList handle this. The three widgets are now subclassed and the
derived widget lets fgValueList manage the lists
- make <select> consistent with <list>. This breaks backwards
compatibility, but not a single dialog in fgfs uses it and did so
since ... forever. (Shoot me!)
Rationale: now that dialogs are a bit more dynamic than they used to be
(thanks to embedded Nasal), we have to delete and recreate entry lists
during dialog use. Deleting only at dialog closing doesn't cut it anymore.
Especially list widgets that are updated several times per second would
use up a lot of memory otherwise. The route-manager doesn't update that
often, but it did already leak. One TODO less. :-)
mfranz [Sat, 13 May 2006 09:06:57 +0000 (09:06 +0000)]
Vivian MEAZZA:
"Preparations for an upgrade to Air-to-Air Refuelling to allow more than one
tanker in the environment at a time. This will only work with YASim models.
JSBSim models are unaffected by this change."
mfranz [Fri, 12 May 2006 09:36:21 +0000 (09:36 +0000)]
only lock AP automatically if above /autopilot/route-manager/min-lock-altitude-agl-ft
The ufo sets this to a very low value, "serious" aircraft (which don't want this
unrealistic automatism at all) set it to a very high value, and those that don't
care ... don't need to care.
mfranz [Tue, 9 May 2006 09:39:28 +0000 (09:39 +0000)]
add "signals" for start and end of screenshot capturing. Like the other
signals, this is meant for attaching listeners. The ufo will use that to
hide/reveal the status line in screenshots. The following signal properties
are now available:
/sim/signals/exit ... set to 1 right before quitting
/sim/signals/reinit ... set to 1 on re-init (Shift-Esc)
/sim/signals/screenshot ... set to 1 before and to 0 after screenshot
/sim/signals/click ... set to 1 after mouse clicks at terrain, signalling
that the geo coords in /sim/input/click/ were updated