1
0
Fork 0
Commit graph

6110 commits

Author SHA1 Message Date
ehofman
6d5e37f674 MacOS-X fix. 2005-07-27 07:59:59 +00:00
ehofman
ef099d3cad Why this didn't ring any alarm bells during my previous test compile is beyond me, but this should get FlightGear in a compilable state again. 2005-07-26 20:12:03 +00:00
ehofman
dfeca621ae More updates. 2005-07-26 18:00:30 +00:00
ehofman
d4a3872f78 Remove a stale reference. 2005-07-26 16:57:56 +00:00
ehofman
73f06ccef3 Remove unused code, especially concidering the non-commercial clause in the copyright statement. 2005-07-26 08:08:41 +00:00
ehofman
15f3ef3cfb Harald JOHNSEN:
- AIManager.cxx :
  - we can now have multiple <scenario> entries in the sim/ai entry in preferences.xml
- AIBase.cxx :
  - added an exception handler around the loading of the 3D model to not exit FG
    if the model is not found
- AIScenario.cxx :
  - removed a duplicated read of the xml file, this was also exiting FG is the xml file
    does not exist
2005-07-24 14:05:28 +00:00
ehofman
7e024c549f Remove a copyright that doesn't belong there. This file was written from scratch for FlightGear. 2005-07-22 12:32:46 +00:00
ehofman
05f626e9fb Harald JOHSEN:
Changes
=======

- shadowvolume.cxx, renderer.cxx :
  - reduced the polygon offset a bit to eliminate some artifact ;
  - changed again the cleanup code for objects inside a tile because it could crash on rare occasion ;
  - the culling of shadow casters has been rewritten to traverse the scene graph, it should be
    a bit faster when there is a lot of objects ;
  - the range selector was not correctly handled, sometimes the wrong LOD was casting shadows.
  - added the option to display aircraft's transparent objects after the shadows, this will
    reduce the problem of shadows being hidden by the transparent object (propeller disk,
    rotor, etc). A side effect is that aircraft's transparent objects won't receive shadows
    anymore. This is usually a good thing except when the aircraft use a 'transparent'
    texture where it should not. A transparent texture in the plib context is a texture
    with an alpha channel or a material with alpha <= 0.99.

- model.cxx, animation.cxx, shadowvolume.cxx :
  - added an optional <condition> under the <noshadow> animation

- tower.cxx
  - correct a rare bug where all occurences of the aircraft are not deleted from the
  departure list causing a crash in FGTower::CheckDepartureList function.
2005-07-18 16:58:22 +00:00
curt
44b882abe4 Don't assume that gps times are integer only (some units kick out data at 10hz
and specify time down to tenths of a second.)
2005-07-18 15:03:45 +00:00
ehofman
e4390aac42 Perhaps it's better to compare the contents of the strings instead of comparing the pointers. 2005-07-18 11:55:39 +00:00
ehofman
0666590909 Fix a segmentation fault when switching to a new style and selecting a new dialog. I still need to find out why getColor doesn't work properly. 2005-07-18 10:00:02 +00:00
ehofman
0ec8fa64a4 IRIX fixes.
Somehow the MIPSpro compiler doesn't like an STL map entry being called
using a variable when the reference is an object and not a pointer to an
object.

Preliminary support for a fontcache is added which prevents fonts from
being loaded more than once and takes care of freeing them up again.
The fontcache isn't used yet since there seems to be a problem somewhere.
2005-07-18 09:18:24 +00:00
mfranz
6776103190 - don't abort if remote model isn't installed; output missing model's
path, so people know what to install
2005-07-15 09:45:57 +00:00
ehofman
1869b30b58 Mathias Fröhlich:
I have traced that reset on carrier problem down to several problems. One of
them is the fact that on reset the carrier is updated while the aircraft is
not. That made the aircraft drop down an elevator sometimes. Depending on the
passed realtime while loading some parts of the scenery.
2005-07-13 12:25:16 +00:00
mfranz
3e38a4d415 - suppress CygWin warnings (Vivian Meazza) 2005-07-13 11:43:00 +00:00
mfranz
036fbdb18e make /sim/current-gui an integer 2005-07-13 10:57:27 +00:00
mfranz
591001a24e - make tabula rasa on re-init
- check /sim/current-gui for where to get gui colors (default "/sim/gui[0]")
- call getFont() with gui font address (default "/sim/gui[0]/font")
2005-07-13 10:16:42 +00:00
mfranz
4ac0776e97 nasal dialogs are separate trees and have an empty name 2005-07-13 07:05:50 +00:00
mfranz
eefd7dee8c - fix alpha handling (hopefully)
- remove another leftover debugging line
2005-07-13 06:37:39 +00:00
mfranz
275a9a5cc0 - don't clamp when setting, but on request (allows to set an invalid color)
- adapt constness
- remove leftover debugging line
2005-07-12 16:48:16 +00:00
mfranz
387888862c - let FGColor setters/mergers report if they found something merge-worthy
- tune "use-<color>-node-for-pucol" masks
2005-07-11 08:01:28 +00:00
mfranz
01bca490b1 add missing paren 2005-07-09 14:01:52 +00:00
mfranz
f3e88fc05d - clear alpha like r/g/b
- fix warning
- replace tabs by 4 spaces, according to the style of the file
2005-07-09 13:53:25 +00:00
mfranz
f65eb6e3d5 tell the layouter about the default font (I wonder why
LayoutWidget::setDefaultFont() wants puFont* /and/ pointsize as extra
parameters, when puFont knows its pointsize anyway. Didn't want to change
that yet, though.) Now the HELVETICA_10 font makes actually sense. :-)
2005-07-08 20:12:06 +00:00
mfranz
18a874f1b2 disable automatic re-opening of dialogs on re-init; this does currently
not work correctly (forgets the bindings)
2005-07-08 16:42:26 +00:00
mfranz
8d2f921618 rename VERA_12B font to SANS_12B (as in sans-serif). This is a "Grotesk"
font similar to Helvetica/Swiss. The license doesn't allow to redistribute
modified fonts under the original name. While it's only a converted font,
and not manually modified, it can no longer be seen as original. Changes
so far are (a) conversion from vector to bitmap, (b) different empty space
width, (c) different & constant gap value, without other kerning information.
Further changes may be necessary in the future.
2005-07-08 13:28:40 +00:00
mfranz
f0b6030d31 Harald JOHNSEN:
[new_gui is] "using copies of puFont objects that are not yet initialized, I
think that dependant of link order (and so tor execution order) it can
work or not. Changing puFont font by puFont *font should work in all cases."
2005-07-08 11:15:17 +00:00
mfranz
ab63af1a91 shut up 2005-07-08 08:18:34 +00:00
mfranz
6361ec750b program that generates C code from a built-in font list; used for the
font definition in src/GUI/fonts.cxx
2005-07-08 08:17:43 +00:00
mfranz
ffb1515aa4 add missing copyright statements 2005-07-08 07:37:56 +00:00
mfranz
e675f80a66 remove commented out and non-functional code for now 2005-07-08 06:45:00 +00:00
mfranz
ae96deb2c1 read the splash font color from the gui style file. This is a bit of a
gimmick, but it may be nice to adjust the font color to match the splash
image, e.g. to make it darker for dark images, etc.
2005-07-07 21:43:22 +00:00
mfranz
81aaf4c7bd make property picker consider the new_gui colors; unfortunately, plib
hardcodes the text color as black, which makes them a bit hard to read
on dark backgrounds; fix sent to the plib list; (the added code isn't
pretty and hence fits the existing style quite well ;-)
2005-07-07 21:32:33 +00:00
mfranz
f2bf0a7cb3 - use color map information from new_gui.cxx and set puObject colors
accordingly;
- cleanup (call all puObjects "obj" for easier editing/copying)
- commented out code: (not-yet functional props preprocessor)
2005-07-07 21:30:34 +00:00
mfranz
e1a5398e4f - add gui color support: maintain color map with default colors and all
colors from /sim/gui/colors/ into map;
- set default color scheme
- handle fonts
- implement color class
- close all dialogs on reinit, set up style again, and then reopen all
  (non-nasal generated) dialogs again
2005-07-07 21:28:15 +00:00
mfranz
9b47b1b15b add fonts.cxx file 2005-07-07 21:24:28 +00:00
mfranz
9946347fa7 contains two fntBitmap fonts with iso8859-1 character set; this was
generated by freeglut's genfont utility. That application also generates
a copyright message that I did not copy into this file, because it is
wrong: the author of genfont claims copyright for data that *I* generated
using his program; this doesn't fly. Of course, the copyright will remain
in the (heavily edited) version of *his* code. I'll commit that, too.
2005-07-07 21:23:42 +00:00
ehofman
53b2902e70 Solaris fix. 2005-07-07 19:09:52 +00:00
curt
45bfaf8ed5 Tune pitch gain, fix a couple annoyance bugs. 2005-07-07 15:40:44 +00:00
mfranz
fb9453fc2d Patrick Quirk: fix typo (Norman: "looks like this is probably a bug") 2005-07-07 12:57:00 +00:00
ehofman
4c2c48b46a Fix another dependency. 2005-07-07 09:06:02 +00:00
ehofman
1eab60dd79 IRIX fixes. 2005-07-06 11:51:32 +00:00
curt
46d9714aaf Attempt to add -lwinmm for windows builds (untested.) 2005-07-05 13:56:03 +00:00
mfranz
cac0a9b326 - abstract out reading colors from the property tree into a routine.
This could also be used to read the default foreground/background color
  from a definition in preferences.xml or gui/color.xml.
2005-07-04 07:27:17 +00:00
mfranz
0730ecc8e2 Whoops. I had missed that we have that already. Reverting. Thanks Erik.
<binding>
     <command>reinit</command>
     <subsystem>gui</subsystem>
    </binding>
2005-07-03 15:43:32 +00:00
mfranz
133cc2b0c7 Rename "menu-reload" to "gui-reload", which is what is actually done
behind the scenes: It reloads all gui files from $FG_ROOT/gui/. That's
useful for gui development. Maybe we'll have a "menu-reload" later ...
2005-07-03 15:20:05 +00:00
mfranz
7f9b0fbb73 - add fgcommand to reload menubar; that's necessary to make changes visible
at runtime. Example:

  <key n="99">
      <name>c</name>
      <desc>Update completely useless menu entry.</desc>
      <binding>
          <command>nasal</command>
          <script>
              time = getprop("/sim/time/elapsed-sec");
              setprop("/sim/menubar/default/menu[9]/label", time);
          </script>
      </binding>
      <binding>
          <command>menu-reload</command>
      </binding>
  </key>
2005-07-03 15:06:29 +00:00
mfranz
11138e3739 - make menubar reloadable ... again. This was lost because FGBindings does
no longer save inaccessible bindings copies, but only pointer to the
  bindings in the property tree (which was desirable to get accurate
  error messages for Nasal bindings).
2005-07-03 14:43:47 +00:00
mfranz
2f2d14a41f better error message to help users and support staff 2005-07-03 10:27:35 +00:00
ehofman
4df7a3e9f8 Mathias Fröhlich:
I have introduced the posibility to start directly on the carrier.

With that patch you will have a --carrrier=id argument where id can either be
the pennant number configured in the nimitz scenario or the carriers name
also configured in the carriers scenario.
Additionaly you can use --parkpos=id to select different positions on the
carrier. They are also configured in the scenario file.

That includes the switch of the whole FGInterface class to make use of the
groundcache.
That means that an aircraft no longer uses the current elevation value from
the scenery class. It rather has its own local cache of the aircrafts
environment which is setup in the common_init method of FGInterface and
updated either manually by calling
 FGInterface::get_groundlevel_m(lat, lon, alt_m);
or implicitly by calling the above method in the
 FGInterface::_updateGeo*Position(lat, lon, alt);
methods.
A call get_groundlevel_m rebuilds the groundcache if the request is outside
the range of the cache.

Note that for the real usage of the groundcache including the correct
information about the movement of objects and the velocity information, you
still need to set up the groundcache in the usual way like YASim and JSBSim
currently does.
If you use the native interface, you will get only static objects correctly.
But for FDM's only using one single ground level for a whole step this is IMO
sufficient.

The AIManager gets a way to return the location of a object which is placed
wrt an AI Object. At the moment it only honours AICarriers for that.
That method is a static one, which loads the scenario file for that reason and
throws it away afterwards. This looked like the aprioriate way, because the
AIManager is initialized much later in flightgears bootstrap, and I did not
find an easy way to reorder that for my needs. Since this additional load is
very small and does only happen if such a relative location is required, I
think that this is ok.

Note that moving on the carrier will only work correctly for JSBSim and YASim,
but you should now be able to start and move on every not itself moving
object with any FDM.
2005-07-03 09:39:14 +00:00