Commit Graph
100 Commits
Author SHA1 Message Date
mfranz ad302db9a8 segfault-- 2009-06-03 00:08:04 +02:00
mfranz 13a2b92a32 remove duplicated header entry 2009-05-19 23:53:25 +02:00
mfranz f91d96b51a - fix one broken #include path (in a not usually compiled test app)
- turn four #include paths from the "foo" form to <foo>

The quotes form is normally only used for headers with path relative
to the including file's path, though the standard doesn't strictly
mandate this. This is consistent with the rest of sg, it makes the
code's intent clearer and helps to find headers. (And it's a few
milliseconds faster, too.)
2009-05-16 16:18:37 +02:00
mfranz bc19609147 tcpserver: typo 2009-05-16 16:17:39 +02:00
mfranz 1ccaf3a0bd fix leaks 2009-05-16 16:17:39 +02:00
mfranz 1eade74e5a warning-- 2009-03-18 07:53:50 +01:00
mfranz caeb32488e "io.flush() implementation from Melchior. Also add a final filetype
element to the io.stat() array, which has been sitting around on my
box for a while and doesn't seem to have broken anything."  -- Andy

(forward port from nasal/cvs)
2009-02-16 00:46:29 +01:00
mfranz ce2a6cfe5c Csaba HALASZ: set _arg even if there's no <command> (crash fix) 2009-01-28 07:46:31 +01:00
mfranz 74a4144193 compilation fix: <cstring> for strcmp() 2008-12-22 18:01:34 +00:00
mfranz 5c44cb0f01 - shininess is in the rage 0..128
- restore fg/plib compatibility (there is/was no <shininess> group)
  (we may want to change that in the (near?) future, though)
2008-12-21 15:01:11 +00:00
mfranz f4ec02a592 James TURNER: make the index of the current waypoint available 2008-12-18 22:51:58 +00:00
mfranz 2ccd58e917 fix regression: sgLoad3DModel_internal should not make assumptions
about the type of SGModelData. This *can* have to do with Nasal,
but doesn't have to. That's entirely that class instance's business.
2008-10-18 18:44:36 +00:00
mfranz 7585ad430a add global switch for particle systems 2008-10-17 21:15:58 +00:00
mfranz c105c5a449 allow to modify the XML animation config of a loaded submodel by
defining an <overlay> branch, which is copied over the submodel's
properties before the animations are evaluated
2008-10-14 13:01:01 +00:00
mfranz 54065b59a1 Move omit-node part from startElement to endElement to allow nodes
of this type to have children. We have to save the omit state on the
stack for that.
2008-10-14 11:03:39 +00:00
mfranz 2f8621ed3d s/multiplayer/multiplay/, as this seems to be the slightly more
official version (--multiplay option, /sim/multiplay/ properties etc.)
2008-10-10 09:48:03 +00:00
mfranz 98a3e7cffa if a model XML file contains a <multiplayer> block, copy its contents
to the model's property root (/ai/models/multiplayer[*])
2008-10-09 22:20:33 +00:00
mfranz 315d83bc88 s/getChild/getNode/ (otherwise "start/size" wouldn't work) 2008-07-12 15:31:29 +00:00
mfranz 223aa0ccd5 - XML interface changes:
* condition at top level
  * <start|end>/<color|size> hierarchy
  * wind/gravity -> bool
  * rename some properties (rotspeed -> rotation-speed, etc.)
  * unit suffixes
- remove redundant code
- warnings--
2008-07-12 14:06:11 +00:00
mfranz 38494a48d8 fix SGPropertyNode::LAST_USED_ATTRIBUTE 2008-07-10 10:33:32 +00:00
mfranz 38456bddb5 write-protection warning: use simplified path 2008-07-09 17:31:55 +00:00
mfranz b8a12b0e5b let readProperties() refuse to overwrite write-proteced properties 2008-07-09 16:17:52 +00:00
mfranz 2d37c0aa42 remove redundant #defines (they are already in compiler.h) 2008-06-22 18:07:50 +00:00
mfranz 3b6f47aea1 warnings-- 2008-06-07 14:45:22 +00:00
mfranz f4f5ab2392 xmlsound: warning-- 2008-05-21 14:51:39 +00:00
mfranz b20b3229bf add <delay-sec> parameter that defines how many seconds after triggering
the sound should be played (default: 0)
2008-05-21 14:47:06 +00:00
mfranz 77fb93bb61 update library version requirements 2008-05-19 15:17:55 +00:00
mfranz 74116057a7 Till BUSCH: enable HOT intersection tests on random buildings 2008-05-01 12:21:52 +00:00
mfranz 9deb40216e Nicolas: let SGPath::create_dir() return success/failure (for screenshot) 2008-04-26 15:25:29 +00:00
mfranz daef76ec0b Till BUSCH:
"tim recently noticed the database pager was repeatedly loading and unloading
the same objects. he also tracked down the problem to missing bounding sphere
information in osgDB::PagedLOD. this is a simplicistic approach to fix this:
SGPagedLOD will now remember whatever value it sees for getBound() after
loading a child. this patch will make database pager run much calmer."
2008-04-25 08:41:29 +00:00
mfranz 8f48515b80 Till BUSCH:
this is a small (-1/+3) patch to fix pick animations on scenery objects.
since picking apparently doesn't care for polygon offsets, the objects
got into the picklist in the wrong way. now, no matter if the "highlight
group" or the "normal group" gets hit first, the callback will fire.
2008-04-23 12:28:45 +00:00
mfranz 55c1ac36e3 - warnings--
- make one-shot sounds subject to volume and pitch control (To get
  constant volume/pitch during the whole lifetime, just *configure*
  the sound that way.)
2008-03-20 17:20:54 +00:00
mfranz 6491746809 use new arrow shortcuts for compatibility reasons (will be removed later) 2008-03-04 11:48:51 +00:00
mfranz db2216848d don't reset visibility modifier in the M5SM case 2008-02-20 23:36:27 +00:00
mfranz cfffe91ed5 Syd ADAMS: remove season suffix, this is now done via <condition>s 2008-02-16 22:09:40 +00:00
mfranz a95aed1047 remove getRootNode(), as this resets the model root 2008-02-16 17:01:01 +00:00
mfranz 2883a36c76 Csaba HALASZ: implement conditional (e.g. seasonal) texture loading at startup 2008-02-15 17:54:01 +00:00
mfranz 95d857e091 - comparison: don't crash if second element is missing
- better messages ("panel"?!)
2007-12-06 17:57:41 +00:00
mfranz de9070dba1 better standard compliance: allow empty top level tags (<PropertyList>) 2007-10-10 12:45:53 +00:00
mfranz 46a32dd3ee coding style fixes 2007-07-22 13:58:26 +00:00
mfranz ecb4dc57b4 Maik JUSTUS: workaround for broken Doppler effect in OpenAL
mf: this patch is meant to be removed as soon as OpenAL got fixed. (The
    OpenAL developers acknowleged the bug and announced that it'll get
    fixed.) For removal try
    $ cd simgear/sound
    $ cvs diff -rAFTER_OPENAL_DOPPLER_WORKAROUND -rBEFORE_OPENAL_DOPPLER_WORKAROUND|patch
2007-07-22 13:50:24 +00:00
mfranz 89d426470b Maik JUSTUS: Doppler fixes (add option to turn off Doppler for sounds that
shouldn't be affected -- marker beep, ATIS messages, etc.)

mf: this is the first part of the original patch. It is supposed to contain
    fixes that are not caused by OpenAL bugs, and thus aren't meant to be
    reverted later. The second part will contain a temprary workaround for
    OpenAL bugs. Unfortunately, I had to do the split myself as the contributor
    refused to do it.
2007-07-22 13:33:23 +00:00
mfranz 23c7a1b5b7 - close loophole through which one could sneak in illegal property names
containing slashes, colons and all sorts of evil characters. In Nasal
  this could be done via props.globals.getChild("1!@#$//[]{}", 0, 1).setValue(0);
  The cause is that getChild() hands the given name directly over to an
  alternative SGPropertyNode ("convenience") constructor which sets the
  name without any checks.
- unify exception messages: first character is lower case
2007-07-17 14:52:51 +00:00
mfranz 2dfc057135 replace exit() by throw sg_exception(). Of course, we have to be aware
that interdependencies between sg libs are generally unwelcome, but
sg_exception is a rather basic part, and it's already used by xml, props,
scene, sound and, of course, structure. Since props and xml are core
libs, we can assume that sg_exceptions are available.  (OK'ed by Curt)
2007-07-02 15:42:19 +00:00
mfranz a25eebef9b add SG_ORIGIN macro that expands to a string __FILE__":"__LINE__
Note that __LINE__ is a number and can't be directly used in string
context, which makes the macro worthwhile. (IMHO :-)
2007-07-02 12:55:10 +00:00
mfranz 741c4ca15a back out last changes (radar patch) 2007-06-29 22:45:37 +00:00
mfranz 0bcdf2e4dc easyxml.cxx: add missing endXML visitor call
testEasyXML.cxx: beef it up
2007-06-29 10:46:52 +00:00
mfranz cd5a720211 Vivian MEAZZA: add support for aircraft radar signatures 2007-06-24 08:09:07 +00:00
mfranz 5cb04946b0 don't only complain that the volume is larger than 1.0, but say how much
it actually is
2007-06-23 16:48:01 +00:00
mfranz c8953c6275 Maik JUSTUS: fix/implement directional sound 2007-06-21 21:46:21 +00:00
mfranz e8dc9c9454 d'oh ... beautify the TRACE message that we actually see! :-} 2007-06-19 18:22:32 +00:00
mfranz a0c325681f beautify TRACE message 2007-06-19 18:11:06 +00:00
mfranz 8d3bf19422 sooner than planned: fix "scale" animation offsets (1 -> 0) 2007-06-17 21:01:40 +00:00
mfranz 80bcaa49e6 Nick WARNE: add file name to screenshot info line 2007-06-14 20:20:18 +00:00
mfranz 0096c1bb02 advance tracing messages from SG_INFO to SG_ALERT. If a developer has
demanded tracing, then he shouldn't get these important messages buried
in thousands of lines of meaningless bulk.
2007-06-11 16:09:50 +00:00
mfranz 38b37a068d - allow for (rather unusual) ////// cloud groups
- fix potential use of uninitialized memory: dew
2007-06-09 18:36:56 +00:00
mfranz 2e9a15f523 Tim Moore 2007-05-15 22:28:08 +00:00
mfranz bb0d2ddc53 add Mathias and Maik (to make it look less selfish that I add myself :-)
I'm sure I forgot a lot of people, but it's a start.
2007-05-15 22:02:06 +00:00
mfranz 702fb014a5 s/resistence/resistance/ 2007-05-13 11:53:06 +00:00
mfranz a85da04601 Add method to return the number of attached listeners. Listeners have become
a much more important feature than they were two years or something ago, and
it's helpful for debugging and exploration to get this important node property
shown in property tree dumps or in the property browser (verbose mode).
2007-05-07 14:03:44 +00:00
mfranz 414f1c27e4 - fix bug where a property tree saved with writeProperties() and read back
in with readProperties() would not look the same, because element indices
  of '0' were even dropped when a node has a "secret" value *and* children

- introduce "omit-node" modifier attribute for the "include" attribute.
  This inserts the given file in place of the including node, while the
  node is dropped. This is desirable for multiple includes (which can't
  be done by multiply using the "include" attribute, as this isn't valid
  XML spec syntax)
2007-05-06 17:33:15 +00:00
mfranz c76e2eb900 better warning text for <global> in material animations 2007-05-05 11:16:35 +00:00
mfranz d95e3e0055 don't rely on a compressed scanline being properly closed
(GIMP apparently generates corrupted files)
2007-04-28 23:13:13 +00:00
mfranz 2cc31ff425 SGTexture::read_rgb(a)_texture:
- support greyscale and greyscale/alpha format
- cleanup & make it faster
2007-04-28 12:30:38 +00:00
mfranz a354c841f1 Csaba HALASZ:
- fix bug that messed up leg distances after inserting and deleting waypoints
  not at the end of the route
- move add_waypoint() and delete_waypoint from hxx to cxx
- beef up routetest
2007-04-06 09:54:35 +00:00
mfranz 53d8cff835 Csaba HALASZ: when a path_cache ceases to exist, unregister from all nodes
that had been told that this node is linking to them

mf: remove old erase-by-key methods; they are now unused and always were
    problematic, so they won't be used in the future either
2007-02-17 10:50:49 +00:00
mfranz 00fe97ff88 - don't leak node in both hash_table::bucket::erase()
- remove bad code from hash_table::bucket::erase(const char *) that was
  introduced with the last patch. (This function isn't used anywhere and
  is scheduled for removal. Leaving it in for now as a reference.)
- remove leaves first in remove_from_path_caches()

- cosmetics: indentation, one trailing space, variable name change, comment
  (Sorrry for mixing that with actual code, but I think it's easy to see.)
2007-02-16 15:32:21 +00:00
mfranz 8663c265d8 Maik JUSTUS:
"""
- make every node maintain list of properties that link to it
- add functions to erase node by address from hash bucket/entry in their
  path caches, so that all references can be removed
- if a node is removed, it (and all children, grandchildren, ...) calls
  all linked properties to remove them from their path-cache


This fixes problems with the aerotow over multiplayer and maybe some
other problems, where nodes are queried by name.
"""
2007-02-11 11:05:23 +00:00
mfranz 95532cb318 fix error message 2007-02-05 21:41:40 +00:00
mfranz de6b32d8c6 writePropeties(): create dir if necessary 2007-01-12 21:24:50 +00:00
mfranz 3175fa3aca + .deps/ 2006-11-01 21:24:24 +00:00
mfranz 65d18445d3 Makefile(.in) 2006-10-29 20:08:27 +00:00
mfranz 98a603a570 - don't need a guarded pointer here
- shorten variable, fix indentation
2006-10-24 20:28:08 +00:00
mfranz 5876052170 allow to switch on/off at runtime a whole imported <model> via <condition>:
<model>
      <path>some/model.xml</path>
      <condition>
          <property>model/switch</property>
      </condition>
  </model>

Of course, one could add "select" animations for all <object-name> in the
<model>, but this is tedious and can hardly be done e.g. for all
objects in all instruments in $FG_ROOT/Aircraft/Instruments-3d/ etc.

The feature will be used in the bo105, so that civilian variants can
have a HSI instrument, where military variants have a TACAN etc.
2006-10-24 19:44:38 +00:00
mfranz 4f0bfbab21 - // This will come back and remove
- // the current item each time.  Is
- // that OK?

No, it is not OK. This messes up the vector and confuses the iterator.
And it leads to crashes. Better read the vector in reverse order.
2006-10-22 13:08:09 +00:00
mfranz aebb1f6ec8 compile (gcc 4.1.0)
("In member function 'T SGPersonalityParameter<T>::shuffle()':
28: error: there are no arguments to 'sg_random' that depend on a template
parameter, so a declaration of 'sg_random' must be available")
2006-08-24 23:03:52 +00:00
mfranz a0412d026c remove the last redundant "delete" check in all of fgfs/sg (except JSBSim) 2006-07-05 09:31:36 +00:00
mfranz 735f475c24 actually query the <condition> that is already set up in SGShaderAnimation 2006-07-01 20:06:05 +00:00
mfranz 353dd73e24 add knots <-> feet-per-second conversion constants 2006-06-25 11:55:56 +00:00
mfranz 52b8f924aa add float_to_int() rounding function from Cockpit/hud_opts.hxx. The original
file said "(c) FlightGear Project" and "probably written by Norman Vine".
2006-06-16 09:29:54 +00:00
mfranz c815f70831 whoops, sorry (Yes, it *was* tested, but then I made another "trivial"
change and ...)
2006-05-24 10:16:09 +00:00
mfranz 0da50eaa79 if we are going to die we better tell all our listeners 2006-05-24 09:37:44 +00:00
mfranz b0af84a549 add optional position argument to SGRoute::add_waypoint(). Default is -1,
which appends the WP like it used to. Valid vector indices insert the WP
at this position.
2006-05-08 11:31:16 +00:00
mfranz ea47a2973c add method to delete any waypoint (last waypoint if n is out of range) 2006-04-28 15:43:13 +00:00
mfranz 6f0baf6ca9 thanks to Erik's texture map I can now drop empty.rgb altogether and just
specify the same texture in the "foo.lighted" and "foo.unlighted" material
entry. This also allows to drop the state cloning and thereby solves the
most urgent apt_signs.cxx TODO. :-)
2006-04-22 13:41:06 +00:00
mfranz a2a91520aa don't allow new command name to overwrite material name 2006-04-20 17:46:40 +00:00
mfranz fd7b5d3de7 - don't use hard-coded emission values for unlighted signs, but load both
states from material.xml (separate <material> entries for now)
- clone state less often: not once per sign element, but once per material
  switch (TODO: clone only once per material)
2006-04-20 16:06:00 +00:00
mfranz 30ea844c43 fix "unknown.rgb" path (the wrong path was the reason why we always only
got plib's lowres red-white chequer-board pattern along with an error
message, and not ours ... which is much prettier, but also bigger.
(Should we downscale it?)
2006-04-20 15:20:40 +00:00
mfranz efac53b121 make headers include headers they depend on, don't rely on the c(xx)
file to do that. (This is a requirement for header precompiling.)
2006-04-17 11:29:01 +00:00
mfranz 73c0ef59c1 rename OBJECT_TAXI_SIGN to OBJECT_SIGN. This isn't about taxi signs any
more, but all sorts of signs. Now is the best time to get rid of a
misleading name.
2006-04-14 14:50:08 +00:00
mfranz 7e65ab2d3b add <condition> support to textranslate & texrotate animation 2006-04-12 20:27:38 +00:00
mfranz fec769f632 set sign orientation such, that when the sign heading=0, one looks straight
on the sign face when looking North
2006-04-12 12:13:03 +00:00
mfranz 90e42642b6 lower signs 2006-04-11 23:04:24 +00:00
mfranz 9d9610a882 add minimalistic backside to signs as a temporary solution 2006-04-11 21:32:15 +00:00
mfranz 1fc81f4b66 re-add hard-coded vertical distance. The coordinates should be surface
points and not add this distance, which depends on the sign housing/hardware,
after all.
2006-04-11 17:34:17 +00:00
mfranz 4f0b1e847c - commands do now have to start with @
- add commands @size, @material, @light
- make "BlackSign" texture default
- make @B, @R, @L, @Y open close their frames automatically (this can be
  avoided by setting the @material manually)
- add number variants for those 4 sign commands: @Y2, @B5, etc (according
  to the spec; defaulting to the respective biggest panel size, i.e. @B = @B3)
(detailed description will be added to $FG_ROOT/Docs/)
2006-04-11 15:57:08 +00:00
mfranz 9567ac32f2 remove obsolete files (on request by Christian Mayer, who has introduced them):
- they are not used anywhere in sg/fgfs
- and are very clearly *not* GPL compatible!
2006-04-10 16:36:52 +00:00
mfranz dbda8ef893 drop xscale member again, and use xsize/ysize instead. (One interface
element less to confuse people.)
2006-04-10 15:32:55 +00:00
mfranz cd143c15d5 rewrite of OBJECT_TAXI_SIGN code. The name is a bit misleading, as this
type can also create runway signs. (/me thinks about changing that ...)
2006-04-09 19:51:00 +00:00
mfranz 509a388ccc support for font textures. They are normal (but rather lenghty) <material>,
but contain <glyph> entries with <name>, <left> and <right>. The latter two
describe where in the texture a letter or symbol begins and where it ends.
(range 0-1). <xscale> defines a horizontal scaling factor.
2006-04-09 19:21:13 +00:00