Commit Graph

796 Commits

Author SHA1 Message Date
curt
c4cfad6069 Additional tweaks that got lost somehow. 2002-08-27 21:48:51 +00:00
curt
5bddb88ce2 Ooops, minor typo fixed. 2002-08-27 21:45:48 +00:00
curt
8c4ee69aeb Modernize the autoconf scripts a bit. 2002-08-27 21:44:39 +00:00
curt
b3a533f8ce Add #ifdef'd out support for plibs cheesy lens flare object. 2002-08-27 21:43:35 +00:00
curt
a885314a39 Tidy up the autoconf/automake configuration a bit.
- Removed some old cruft.

- Removed some support for older versions of automake which technically was
  correct, but caused the newer automakes to squawk warnings during an
  initial sanity check (which isn't done very intelligently.)

  NOTE: this fix is technically not correct for older version of automake.
  These older version use the variable "INCLUDES" internally and could have
  them already set to an important value.  That is why we were appending
  our values to them.  However, newer versions of automake don't set this
  value themselves so it is an error to append to a non-existant variable.
  We seem to "get away" with overwriting the value on older versions of
  automake, but if you have problems, consider upgrading to at least
  automake-1.5.
2002-08-25 17:31:47 +00:00
curt
0567a76445 It probably is better not to hide warning messages. Removed spaces from
AC_DEFINE( SYMBOL ) -> AC_DEFINE(SYMBOL)
2002-08-24 18:21:49 +00:00
curt
d6dc2d6eab Brandon Bergren:
2. I changed Simgear's autogen.sh so it is quieter, and errors out if
autoheader or autoconf fails.  It puts all error output in autogen.err, and
deletes it if nothing errored out.  The patch is in (sg.autogen.sh.patch.gz)
This patch applies to flightgear, too.  If someone doesn't like what I did
here, please speak up!  I really believe that this patch will help cause
less confusion among people new to compiling flightgear.
2002-08-24 03:54:45 +00:00
curt
b75a694682 Bernie Bright:
Here are some changes that gave me a significant frame rate increase of about 10 fps with random objects disabled.  The interesting thing is that these changes aren't in the main loop but are in tile loader.  My guess is that I've reduced the memory footprint just enough to reduce CPU cache misses, though I have no hard evidence of this.

Initially I modified all SGBinObject member functions to pass/return by reference instead of by-value.  This gives little or no speed up but allows for some optimizations in fgBinObjLoad().  It is these changes that reduce the number of memory allocations.  Needless copying of vectors, and vectors of vectors, can be very memory intensive, especially if they are large.

Anyway I would be interested to see if you get similar results.  I would emphasize that the frame rate increase only occurs with random objects disabled.  I lose about 10-15 fps on my GF2MX 32MB with random objects, probably a fill-rate limitation or texture memory thing.
2002-08-23 17:52:10 +00:00
david
2e7e9b73a0 Change from Norman Vine to add new random-number algorithm. 2002-08-05 18:43:28 +00:00
david
7a11523692 Random-number seed patch from Erik Hofman. 2002-07-31 17:14:29 +00:00
curt
f85a9866fe Remove efence support in favor of valgrind. 2002-07-30 14:10:08 +00:00
david
9b05c27938 Remove ECMAScript interpreter from the default build for now. It can
still be built from inside the directory.
2002-07-30 11:58:34 +00:00
david
fd96729362 Patch from Cameron Moore:
* Fixed (un)signed comparison
2002-07-18 20:30:18 +00:00
david
c57cc096f8 Patch from Cameron Moore:
* Rearranged member initializers to shut gcc -Wall up
2002-07-18 20:30:02 +00:00
david
c8efd0a465 Added JavaScript interpreter, repackaged by Tony Peden. It's not tied
into anything yet, but it builds OK inside SimGear.
2002-07-18 20:27:46 +00:00
david
db60139845 Downgrade cloud-base alert to a debug warning. 2002-07-18 20:23:30 +00:00
david
cadefd323a Quick fix for bug reported by Julian Foad, where the simplify flag was
not honoured after the first call.  This isn't all that efficient, and
the return type probably should change to string eventually, but this
fix avoids changing the headers for now.
2002-07-18 20:04:50 +00:00
david
baab88f42a Fix deletes in destructor. 2002-07-06 15:00:37 +00:00
david
767b74dd35 Added new getDisplayName method that gets the name with its index.
Suggested by Julian Foad.
2002-07-06 14:58:38 +00:00
david
90e8287f43 Made SGPropertyNode::getPath extremely efficient: it now caches its
result, so after the first call for any node, it simply tests and
returns a pointer.  This also fixes the problem of buffer conflicts
with make_string.

Added SGPropertyNode::hasChild(const char * name, int index = 0) to
provide a syntactically-cleaner way to test for the existence of a
child node, i.e.

  for (int i = 0; i < 9; i++) {
    if (node->hasChild("foo", i))
      foo[i] = node->getChild("foo", i)->getDoubleValue();
  }
2002-07-06 13:19:02 +00:00
david
d8b7e5b8fd Added simgear_config.h.in 2002-07-06 12:06:40 +00:00
curt
7769447283 Fixed a couple minor compiler warnings. 2002-07-03 17:35:49 +00:00
david
d6a790cf13 MSVC++ bug work-around from Frederic Bouvier. 2002-07-03 02:06:23 +00:00
curt
033c66363d Fixes for IA-64 with Intel compiler. 2002-07-02 18:44:20 +00:00
david
3ff1789963 Fixed an MSVC compilation problem reported by Frederic Bouvier. 2002-06-28 17:02:42 +00:00
david
9737c0c4dd Fixed bug reported by Julian Foad:
While investigating, I found that SGPropertyNode::getPath returns a
(char *) pointer to the character data of a string on its stack,
i.e. to undefined memory after it returns.  I remember someone was
changing strings to char* for efficiency.  Perhaps this bug was
introduced then.  I'll include a patch for it with my eventual patch
for the above, unless someone beats me to it.  I don't think it
affects any existing callers: they all want a string anyway.
2002-06-28 16:56:14 +00:00
david
b201383a80 Patch from Julian Foad:
Initialise a "possibly uninitialised" variable (which was already
functionally correct).

[Note from DPM: this patch will be blown away if we ever update to a
newer version of Expat.]
2002-06-28 15:55:11 +00:00
david
2253b82304 Patch from Julian Foad:
Remove a hack that originally worked around a buffer overflow
elsewhere in the file.  The buffer overflow was fixed long ago, but
the hack was not removed.
2002-06-28 15:54:34 +00:00
david
2581446d85 Patch from Julian Foad:
Remove trailing comma (unportable).
2002-06-28 15:54:15 +00:00
david
a6291b286c Patch from Julian Foad:
Remove unused static function (warning because it cannot possibly be used).
2002-06-28 15:53:58 +00:00
david
96a396bfcb Patch from Julian Foad:
This file should be removed from CVS because it is generated by
autogen.sh.
2002-06-28 15:53:31 +00:00
david
0833a11686 Significant improvements to the change-listener support. There are
now three different change events, and the listener base class removes
itself from the parent in the destructor.
2002-06-18 21:17:42 +00:00
david
9c7f7f3d32 Added a ptr() method to SGPropertyNode_ptr to get the raw pointer.
Added the SGPropertyChangeListener interface and addChangeListener and
firePropertyChange methods.
2002-06-18 01:26:09 +00:00
david
7847fe8074 Patch from Melchior Franz:
layer_span used uninitialized in SGCloudLayer::rebuild (line 162, 170, etc.)
2002-06-07 17:39:38 +00:00
david
c57d25ac51 Be more conservative and reuse SSG objects. 2002-06-05 19:12:50 +00:00
david
1341b5b9f8 Try to avoid some memory leaks. 2002-06-05 15:43:04 +00:00
curt
fb54e9e103 Include the autogen.sh script in the distribution. 2002-05-23 13:46:19 +00:00
david
3a835dde7d Skip drawing clear cloud layers. 2002-05-17 16:53:19 +00:00
curt
128a4a36ca Bernie Bright:
I've defined snprintf as _snprintf in compiler.h for MSVC and MINGW
targets and removed duplicate definitions from FG sources.
2002-05-17 14:38:03 +00:00
david
255bb6dd07 Preparation for making dynamic cloud layers -- moved cloud state out
of sky.[ch]xx and into cloud.[ch]xx, and added setters for modifying
the state of an existing layer.
2002-05-16 23:16:39 +00:00
curt
786b1e3a30 Removed SG_STATIC_CONST define. 2002-05-16 02:44:35 +00:00
curt
d5f38a558e Minor tweaks. 2002-05-16 02:30:06 +00:00
curt
ce5d4b7db8 Erik Hofman:
Some small patches to make the code Irix/Muli platform compatible and
one small fix to make it plib-1.4.2 compatible also.
2002-05-15 19:21:54 +00:00
curt
8c0b36fe9e Added SG_COMPILER macro. This is a string that identifies the build
compiler and version.  It might be useful to display it during program
startup.
2002-05-14 18:59:03 +00:00
david
c7e6459c64 Modified to work with the new SGPropertyNode_ptr class. 2002-05-10 22:58:03 +00:00
david
86e31e696d Patch from Frederic Bouvier:
I have modified the SGPropertyNode interface to support node removal
and address the issues you mention yesterday.

I added the SGPropertyNode_ptr class that is a smart pointer that
increment and decrement a counter in SGPropertyNode. The _children
vector is changed to a vector<SGPropertyNode_ptr> in order for the
node to hold a reference to its children. I also added a
_removedChildren vector of the same type. When removeChild is called
with the keep parameter set to true, the reference is removed from
_children and inserted in _removedChildren, and the attribute REMOVED
is set. When getChild is called with create set to true, the _children
vector is searched, then the _removedChildren and then a new node is
created. If a resurrected node is returned, the REMOVED bit is cleared.
The static const int LAST_USED_ATTRIBUTE is also added.

The footprint of this patch is light. SGPropertyNode is one int
longer in size, SGPropertyNode_ptr is one pointer large without
virtual functions. Some functions can be inlined if your current
policy change.

The FlightGear patch is to take account the change in the getChildren
function that now returns a vector<SGPropertyNode_ptr>. If the
removeChild functionnality is to be added in FlightGear, all those
SGPropertyNode * floating around should be changed to
SGPropertyNode_ptr.
2002-05-10 22:57:36 +00:00
david
be0b1bb994 Mac OS X fixes from Jonathan Polley. 2002-05-10 21:33:12 +00:00
david
03e74bfeb4 Ignore binaries. 2002-05-10 21:31:55 +00:00
david
972223cd50 Eliminate an unsigned-int comparison warning. 2002-05-10 21:31:15 +00:00
curt
761b7b9354 Bernie Bright:
Here's a first cut at SGSocket reimplemented using plib.net.  I've
maintained the same TCP server behaviour, that is only one client
connection at a time.  I don't think it is possible within the current
framework to handle simultaneous clients.

I've also added two simple test programs, tcp_client and tcp_server.
2002-05-10 13:53:22 +00:00