1
0
Fork 0
Commit graph

1643 commits

Author SHA1 Message Date
durk
f5e9e1898f Miscellaneous tweaks and Bugfixes. Mostly memory leaks ported from the plib
version
* Delete ai list objects in ~ATC/AIMgr.cxx:AIMgr::~AIMgr()
* Delete colors in GUI/new_gui.cxx: NewGui::~NewGui.cxx
* Delete memory allocated to the class member "route" in
  Instrumentation/gps.cxx
* Delete all globals (except a few "unsafe" ones that still cause segfaults
  and need further examination.
* Use an SGShared pointer for navaid memory allocation, so that pointers to
  individual navaid objects can be included safely in multiple navaid lists
2007-10-20 08:36:21 +00:00
mfranz
dbd0b136b8 - use refcounted node pointers, so that no subsystem (nasal!) can invalidate them
- add frame signal for debugging purposes
2007-10-16 15:01:19 +00:00
mfranz
2b338113af give FDMs one update cycle time before setting the fdm-initialized signal
(YASim needs that to fully initialize the landing gear)
2007-10-16 07:55:43 +00:00
mfranz
79fec97f9f save some startup parameters under /sim/startup/options/. options.cxx puts
them under /sim/presets/ but they aren't save there, and as fgInitPosition
and its subroutines overwrite them, we lose the information about what the
user really wanted. This is a temporary solution -- it really belongs into
options.cxx.
2007-10-07 19:27:05 +00:00
mfranz
516ef6bc4b fix another victim of the new runway search method 2007-10-05 14:34:04 +00:00
mfranz
2cef9cc16a revert pitch/roll change (caused problems on reset and on the carrier) 2007-10-04 21:52:50 +00:00
timoore
411435a48f Make comparisons against OSG version less flakey
Turn OPENSCENEGRAPH_MAJOR_VERSION, OPENSCENEGRAPH_MINOR_VERSION and
OPENSCENEGRAPH_PATCH_VERSION into a single number for comparisons in the
preprocessor.
2007-10-04 20:40:29 +00:00
mfranz
6a8197968a on't hardcode heading-deg to 270 (and pitch-deg to 0.424 ...) 2007-10-04 17:14:37 +00:00
mfranz
7c3f46e82f - if no heading preset was given (>=9999), use wind-from direction
- write chosen runway to /sim/atc/runway, so that ATC can give a hint
- minor cleanup
2007-10-04 17:13:41 +00:00
timoore
78228d2734 Change tower location to an SGGeod. Include taxiways too.
This has been split from Csaba's ATC ground radar contribution.
2007-09-09 23:21:48 +00:00
timoore
aa2858b5bd Handle scroll wheel events in osgViewer version 2007-08-20 21:38:25 +00:00
timoore
86c1a089a4 osgviewer mouse warp fixes
After a mouse warp drop all pointer motion events for the entire frame.

Author: Melchior FRANZ
2007-08-19 05:29:00 +00:00
timoore
3f41c9f91b Really implement fgWarpMouse for osgviewer
This fixes a bug that caused both the x and y values of the mouse to
be reset when the cursor was recentered due to hitting the screen
edge.

Based on a suggested patch from Stuart Buchanan
2007-08-18 22:07:11 +00:00
timoore
3bf9ab1098 Fix test for osg::Viewer.setUpdateVisitor
My last attempt reversed the sense of the test and for to include the
osg/Version header file.
2007-08-13 15:02:42 +00:00
timoore
41a22fa6a9 Compilation fix for OSG 2.1.4
setUpdateViewer has been moved to the osgViewer::Viewer object.
2007-08-12 23:01:51 +00:00
mfranz
991c2ff06a add unescape function for conversion of \t, \n, \x1b etc. in <format> strings 2007-07-29 12:26:33 +00:00
mfranz
b0bb63bf79 Nick "Lethe" WARNE: prevent crash caused by improper use of --multiplay
mf: stripped down the log message a bit :-)
2007-07-25 15:17:06 +00:00
timoore
3a0b1286ff Support for linking against OSG debugging libraries. 2007-07-20 17:29:31 +00:00
durk
da77779436 Martin Spott:
On most Unix platforms like FreeBSD, Solaris, IRIX (AIX is even worse)
- just not on Linux - the linker wants to know about _all_ required
libraries. So even if a shared library "libosgViewer" itself is linked
against "libosgGA" and "libosgText", you still have to name these in
order to build an "fgfs" binary.

Currently, other libraries like "-losgDB" and "-losgUtil" are
explicitly mentioned on the "fgfs" linker command, but "-losgGA" and
"-losgText" are not. This simple patch lets the linker honour
everything that's required
2007-07-17 18:00:06 +00:00
mfranz
f8691bb86e make properties created via --prop option default to type UNSPECIFIED.
For compatibility with the old behavior just ask for a string:
--prop:string:foo=0  or shorter  --prop:s:foo=0
2007-07-12 14:45:46 +00:00
mfranz
98d23457ac Maik JUSTUS: swap stereo L/R, and fix Doppler 2007-07-06 20:53:48 +00:00
mfranz
d1dfc42dce remove the "terrain-elevation" command again. This is no longer necessary,
as we have the geodinfo() Nasal function now.
2007-07-03 15:41:03 +00:00
mfranz
d40678628f John DENKER: don't grow /sim/logging/classes indefinitely on read-out 2007-07-03 05:46:59 +00:00
mfranz
9d0c571c9a Tim MOORE:
"This patch fixes the use of the keypad with numlock in the osgViewer
version of FlightGear."

"This also restores the handling of resize events while trying to stay
out of the way of the multiple display code."
2007-07-01 16:39:52 +00:00
mfranz
8c3f03ae03 make it nicer & shorter :-) 2007-06-28 19:23:57 +00:00
mfranz
cb15006f53 allow to specify a node type: --prop:[type:]name=value
where type is one of string (default), double, float, long, int, bool
Using only the first letter works, too.

  --prop:foo=123         ... sets property foo to string 123 (old behavior)
  --prop:string:foo=123  ... verbose version of above
  --prop:s:foo=123       ... slightly less verbose version of above
  --prop:bool:foo=1      ... makes property a bool of value 'true'

I hope this isn't considered a silly gimmick. I need this often and maybe
other developers do, too. It's useful in cases where the difference really
matters. if (getprop("/foo")), for instance, is TRUE even when the property
contains string "false", as all strings are TRUE.
2007-06-28 11:26:40 +00:00
mfranz
ae4b9b0ce3 Maik JUSTUS: avoid Doppler artifacts (listener changes position quickly, etc.) 2007-06-24 20:32:02 +00:00
mfranz
848d850328 Tim MOORE: addCamera() method (needed by og_gauge) 2007-06-24 07:52:50 +00:00
mfranz
6dd5f0f6d5 Maik JUSTUS: prevent occasional OpenAL crashes after resets 2007-06-22 16:51:12 +00:00
mfranz
aca95e99e0 Maik JUSTUS: fix/implement directional sound 2007-06-21 21:49:46 +00:00
mfranz
2c208deab8 ... but use the exception text, of course. :-) 2007-06-19 10:56:50 +00:00
mfranz
5123de61ee fix bug that prevented /sim/sceneryloaded from ever becoming "true" if
/sim/screneryloaded-override was "true". At least one subsystem (od_gauge)
waits for /sim/sceneryloaded to bypass CPU intensive code until the scenery
is up. This broke e.g. the RTT-radar when using /sim/screneryloaded-override

--prop:sim/sceneryloaded-override=true has the effect that fgfs
doesn't show the splash screen until the scenery is loaded, but shows
the OTW view (scenery/aircraft) at the earliest possible moment. This is
useful for developers who often need to run fgfs only to check some minor
detail, while not caring about stuttering caused by scenery loading.
2007-06-19 10:18:14 +00:00
mfranz
588ce7e470 loadxml, savexml: don't pop up a GUI error message on error, but use a
simple SG_LOG instead. The user didn't call the fgcommand, so why should
s/he be bothered with that? And the actually caller of the command gets a
return value and can pop up a dialog if it thinks it's necessary.
2007-06-19 10:10:00 +00:00
mfranz
49a89950a8 256 Bytes ought to be enough for anybody ... hmm, better 512.
Why /sim/fg-current at all? Because we have a file selector dialog
(still unfinished), and one might like to start it from the current
directory, to find saved flights/screenshots/whatever.
2007-06-17 08:14:02 +00:00
mfranz
0c6ecd1271 set /sim/fg-current to current working directory; getcwd() is defined in
unistd.h (which was already included), and should be available in direct.h
under name _getcwd on MS Windows.
2007-06-16 21:35:16 +00:00
mfranz
b502cef066 Don't catch a (potentially) meaningful exception only to replace it with
a meaningless one. bootstrap.cxx/main() will catch it, anyway.
2007-06-16 16:25:40 +00:00
fredb
69f0a797b3 OSG file renamed 2007-06-16 16:15:49 +00:00
mfranz
b5917d62d2 Tim MOORE:
FGManipulator.*:
"This patch works around a bug in OSG's handling of modifier keys. The
symptom of the bug is that modifier keys don't appear to be released."

fg_os_osgviewer.cxx:
"This patch fixes the test for support of cursor changes in OSG 2.0."
2007-06-16 09:39:56 +00:00
mfranz
c09224cb11 Make loadxml use an absolute path, like savexml (for consistency reasons, and
because this allows to load from FG_HOME. To reduce security risks, always
append an ".xml" extension if there was none. Makes it hard to read /etc/secret
and to overwrite ~/.bashrc.  :-)
2007-06-12 16:13:21 +00:00
mfranz
37b4f921e1 - make next_view()/pref_view() trigger listeners, otherwise the "view_cycle"
fgcommand doesn't activate Dynamic View, Fly-By View, etc.
- consistent indentation (broke that with my last commit :-)
2007-06-11 19:02:01 +00:00
mfranz
dbdfc9012b use getNode instead of hasValue (it's just a dir node and doesn't need a value) 2007-06-09 10:15:50 +00:00
frohlich
01f9b2d7b2 Modified Files:
fg_os_osgviewer.cxx: Enable mouse cursor change code on
	sufficiently recent osg versions.
2007-06-08 07:14:56 +00:00
frohlich
94bb4ac29b Modified Files:
src/Main/options.cxx:
	Olaf Flebbe: Make use of SGSceneFeatues for anisotropic filtering,
        clean up.
2007-06-08 06:50:38 +00:00
mfranz
b3b87842b1 savexml: analog to loadxml, if no <sourcenode> is given, save file
contents from the argument tree's <data> node. That way one doesn't have
to plug a temporary branch into the main tree.
2007-06-06 21:18:25 +00:00
frohlich
532389a5bd Modified Files:
FGManipulator.cxx: Stuart Buchanan: add tab key translation.
2007-06-05 17:44:49 +00:00
mfranz
ff454131d5 loadxml: if argument "targetnode" isn't defined, return the file data in
the argument tree under "data". This is useful in cases where the file
data are only needed temporarily and shouldn't remain in the main tree.
2007-06-04 10:07:31 +00:00
frohlich
b59e3fe6ec Modified Files:
src/GUI/dialog.cxx src/GUI/menubar.cxx
	src/Include/config.h-msvc8 src/Main/fg_os_osgviewer.cxx:
	Olaf Flebbe: build fixes for osgviewer on win32.
2007-05-30 13:15:14 +00:00
frohlich
8bce048752 Modified Files:
src/Main/options.cxx:
	Olaf Flebbe: Improoved texture filtering.
2007-05-28 05:21:45 +00:00
frohlich
46ccdeffd4 Modified Files:
src/Input/input.cxx src/Input/input.hxx
	src/Main/FGManipulator.cxx src/Main/fg_os.cxx
 	src/Main/fg_os.hxx src/Main/fg_os_osgviewer.cxx
	src/Main/fg_os_sdl.cxx src/Main/renderer.cxx
	src/Main/renderer.hxx: First cut of osg multi view configurations.
2007-05-26 13:53:46 +00:00
frohlich
0b44409fca Modified Files:
src/GUI/gui.h src/GUI/gui_funcs.cxx src/Main/fg_commands.cxx
	src/Main/renderer.cxx src/Main/renderer.hxx: Tim Moore:
	These patches implement a command to dump the entire OSG scene graph as
        a .osg text file. While large, this allows debuggers to really see
        what's happening in the scene graph.
2007-05-26 11:39:13 +00:00
frohlich
c9c90f17fe Modified Files:
src/Main/renderer.cxx:
	Tim Moore:
	This patch fixes the (lack of) spin animation in the osgViewer version.
2007-05-26 11:33:11 +00:00
frohlich
e21d51c4bb Modified Files:
src/Main/FGManipulator.cxx: Tim Moore:
	This adds support for the keypad and the ever-important backspace and
	delete (!) to the osgViewer code.
2007-05-25 18:08:37 +00:00
frohlich
ca69697ca6 Quit the application on window close. 2007-05-23 17:57:05 +00:00
andy
66cef84e55 Need to pull in config.h before plib/pu.h or else PUI thinks it's in
Glut mode and the build breaks under SDL
2007-05-21 19:24:57 +00:00
frohlich
7443b8b5e8 Modified Files:
configure.ac src/Main/Makefile.am src/Main/fg_os.cxx
	src/Main/fg_os.hxx src/Main/fg_os_sdl.cxx src/Main/main.cxx
	src/Main/renderer.cxx src/Main/renderer.hxx
	src/Network/jpg-httpd.cxx
Added Files:
	src/Main/FGManipulator.cxx src/Main/FGManipulator.hxx
	src/Main/fg_os_osgviewer.cxx:
	Tim Moore: Make use of osgViewer.
2007-05-21 17:50:02 +00:00
curt
a8a971b79d For now, OSG head should look for the same "data" tree version as the plib
branch.
2007-05-16 03:53:47 +00:00
mfranz
1bdea279cd - don't abort just because a sample wasn't found
- rename to play-audio-sample (not every sound is a message)
2007-05-15 14:39:56 +00:00
mfranz
30295a7d37 let "terrain-elevation" also return material name ("material" -> "Grass")
and solid state ("solid")
2007-05-13 19:03:15 +00:00
mfranz
aa386b577d silence MSVC8 2007-05-13 08:43:40 +00:00
mfranz
794f5cc154 - One of the most frequent bug reports is about "terminate called after
throwing an instance of 'sg_io_exception'\nAbandon". And this is caused
  by compiling fgfs/sg without exception support (unlikely) or linking
  against a libSDL/libglut that was compiled/linked without execption
  support. While we can't fix that, we can tell the users who's to blame. :-)
- handle  const char *  exceptions
2007-05-10 12:50:50 +00:00
frohlich
16a2bb0118 Modified Files:
src/ATC/AIPlane.cxx src/ATC/ATC.cxx src/ATC/ATCDialog.cxx
	src/ATC/ATCmgr.cxx src/ATC/Makefile.am src/ATC/approach.cxx
	src/ATC/atis.cxx src/ATC/ground.cxx src/ATC/tower.cxx
	src/GUI/mouse.cxx src/Main/Makefile.am src/Main/fg_init.cxx
	src/Main/fg_props.cxx src/Main/globals.cxx
	src/Main/globals.hxx src/Main/main.cxx src/Main/renderer.cxx
	src/Model/acmodel.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tilemgr.cxx
	src/Scenery/tilemgr.hxx
Removed Files:
	src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx:
	Remove unused functions and the disabled ATC display.
2007-05-09 20:41:08 +00:00
frohlich
b51292d9db Modified Files:
src/FDM/groundcache.cxx src/Main/fg_commands.cxx
	src/Main/main.cxx src/Main/renderer.cxx
	src/Scenery/FGTileLoader.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tileentry.cxx
	src/Scenery/tileentry.hxx src/Scenery/tilemgr.cxx
	src/Scenery/tilemgr.hxx: Simplify scenegraph structure.
2007-05-08 06:12:26 +00:00
mfranz
1ec6acce39 cosmetics: make the reason for the cast obvious. (Now that almost all of
fgfs has to be recompiled (because of a patch to simgear/props/props.hxx)
this is the right time to commit this completely unimportant patch. :-)
2007-05-07 14:06:05 +00:00
mfranz
3d9ed0a10f revert last: keep --props option because of option architecture 2007-05-05 09:57:17 +00:00
mfranz
158e3ebdb4 Declare --props option obsolete and issue a warning message. Rationale:
- props is easy to mix up with the --prop option (for setting properties)
- the name is unspecific and inconsistent: other option names describe
  the protocol -- the way to get the properties. How is, for example,
  --httpd less about prop(ertie)s?
- two identical options easily confuse people, as can be seen in The
  FlightGear Manual, where --telnet and --props were described differently
2007-05-05 09:16:59 +00:00
frohlich
4fe615fff5 Modified Files:
src/AIModel/AIBase.cxx src/AIModel/AICarrier.cxx
	src/ATC/AIEntity.cxx src/Cockpit/hud_rwy.cxx
 	src/FDM/Makefile.am src/FDM/flight.hxx src/FDM/groundcache.cxx
	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
	src/Main/fg_init.cxx src/Main/main.cxx src/Main/renderer.cxx
	src/Main/viewer.cxx src/Main/viewer.hxx src/Model/acmodel.cxx
	src/Model/modelmgr.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tileentry.cxx
	src/Time/tmp.cxx: Remove the scenery center handling.
	Osg has double valued transforms at any relevant place.
2007-05-05 08:08:24 +00:00
mfranz
f80d5676b4 add missing property names 2007-05-04 19:34:19 +00:00
mfranz
5d8f383ded - remove dependence on /sim/number-views: the view manager just uses all
/sim/view[*] that it finds. It's not only unnecessary that view definitions
  have subsequent indices, but aircraft are now *requested* to use indices
  100++. /sim/view[0] .. /sim/view[99] are reserved for the system. (Not
  that we'd ever need that many, This is just a convention, it's nowhere
  hard-coded.)
- replace the string operations for property paths by method calls & other
  improvements
2007-05-04 14:58:52 +00:00
mfranz
3eb6d4f708 new fgcommand: "terrain-elevation"
- input:  longitude-deg, latitude-deg
- output: elevation-m
2007-05-03 19:15:20 +00:00
frohlich
19e2e7a461 Modified Files:
src/Main/renderer.cxx src/Scenery/Makefile.am
Added Files:
	src/Scenery/redout.cxx src/Scenery/redout.hxx:
	Add simple redout effect.
2007-05-03 18:47:39 +00:00
frohlich
2f8beb56ea Modified Files:
src/GUI/new_gui.cxx src/GUI/new_gui.hxx src/Main/main.cxx
 	src/Main/renderer.cxx src/Main/renderer.hxx
	src/Main/splash.cxx src/Main/splash.hxx
	src/Scenery/scenery.hxx: Move splash screen into the scenegraph.
2007-05-03 18:12:29 +00:00
mfranz
9438288755 Free the splash texture memory when it's no longer needed. Nowadays splash
textures are mostly 512x512 pixels, so we wasted 786 kB (RGB) or 1MB (RGBA)
during the whole fgfs runtime for mere startup prettification.
2007-05-02 18:49:31 +00:00
mfranz
1f07903cd6 move the "interpolator" subsystem into the INIT group (same as "nasal"),
because nasal's f_interpolate() may be called in Nasal at times when the
GENERAL subsystem group is being deconstructed; access it by addressing
the group directly, as using globals->get_subsystem() does then not
work any more then; yeah, it's all for a rare border case ...  :-)
2007-05-01 18:06:48 +00:00
mfranz
ac0f49a929 remove util.cxx workaround for listener-call-at-exit-segfault, and make
NasalSys.cxx more robust instead. The reason for the crash was that during
fgfs shutdown destroyed subsystems (GENERAL group) still need Nasal access
(for AI Model destruction listeners), but at that point globals->get_subsystem()
can't even deliver the "nasal" subsystem (INIT group). One way to solve that
problem would have been to replace  globals->get_subsystem("nasal") by
globals->get_subsystem_mgr()->get_group(SGSubsystemMgr::INIT)->get_subsystem("nasal"),
but Andy decided to store a pointer to the active "nasal" subsysten in
NasalSys.cxx instead, as the "nasal" subsystem needs to be accessed in
every single Nasal extension function, and multiple "nasal" subsystems are
out of the question, anyway.
2007-05-01 17:03:50 +00:00
mfranz
83418376d7 since the submodel_mgr subsystem does now also hold references to AI models,
we need to explicitly destroy that here, too, so that it has guaranteed
access to the Nasal subsystem. Otherwise we get a segfault on exit. When
the next subsystem needs this special treatement (radar?), we should
introduce a new subsystem group (in addition to INIT and GENERAL)
2007-05-01 09:18:11 +00:00
mfranz
b0c7a401d6 set viewport in every progress step, so that the splash texture gets rescaled
on window resize in fg/osg (works in fg/plib without that, but can't hurt
there either)                                       (thanks to Tim MOORE)
2007-04-29 21:15:45 +00:00
mfranz
a516ad6bcd (hopefully) fix the problem that some people have:
"FATAL: PUI: No Live Interface! Forgot to call puInit ?"
We shouldn't use the splash progress message before guiInit().

Leave the "idle_state" step for now, to keep the similarity
with fg/plib as big as possible. This can be dropped later.
2007-04-29 09:58:37 +00:00
mfranz
4e1d4bf3e6 re-order gl commands for better rgba texture support 2007-04-28 20:34:21 +00:00
mfranz
8f17140003 allow rgba splash textures (I don't expect that they'll be used much, but
they don't cost much either, and allow contoured images with colored
backgrounds -- nice for squadron emblems etc.)
2007-04-28 12:37:20 +00:00
mfranz
235b35ef9a set tower position at startup 2007-04-26 20:27:25 +00:00
curt
c8986567ae Syd Adams:
Patch to enable atc chatter (and any other arbitrary "message" audio file)
to be played at any specified volume.  (Previously these messages were always
played at a hardcoded volume of 1.0)
2007-04-20 18:32:42 +00:00
frohlich
f690bfd113 Modified Files:
src/Main/renderer.cxx src/Model/panelnode.hxx: Make it compile with
	current osg svn.
2007-04-07 09:54:18 +00:00
mfranz
df4f1aa248 - save pairs of <file>/<path> for each *-set.xml file in autosave.xml
- loop up file name in the cache at startup. If it's found, check if the
  file exists and use it, otherwise scan $FG_ROOT/Aircraft/ as usual,
  and create a new cache while doing that. Rebuild cache on FG_ROOT change.
2007-04-05 19:59:44 +00:00
mfranz
d996d27121 - move fgInitTowerLocationListener() from fgInitPosition() to the init
part of fgIdleFunction() in main.cxx. fgInitPosition() is called again
  at every reset, which would every time attach another listener.
2007-04-04 19:05:59 +00:00
mfranz
1eb5de245b fgFindAircraftPath(): put the MAX_DEPTH check at a place where it makes sense 2007-04-02 23:19:36 +00:00
mfranz
caa83238b8 fix spectacularly useless error messages 2007-03-29 21:26:33 +00:00
frohlich
b230c0a1e8 Modified Files:
src/Main/renderer.cxx: Guard the OpenGL state around pui a bit more
2007-03-01 18:12:48 +00:00
frohlich
b81a7c8180 Modified Files:
src/Main/Makefile.am: Remove junk
2007-02-14 17:45:57 +00:00
fredb
9ae7377c95 Fix the jpg http server 2007-02-10 16:32:21 +00:00
frohlich
d4ecbb8856 Modified Files:
src/Main/renderer.cxx: Avoid an additional camera.
	Guard the plain OpenGL drawables better.
	This change now requires the new osg tarball or osg cvs.
2007-02-06 05:32:24 +00:00
frohlich
0edd68cd36 Modified Files:
src/Main/bootstrap.cxx: Olaf Flebbe: Appears to be requierd for
	static linkage and pthreadswin32.
2007-01-31 20:44:44 +00:00
frohlich
a8a85fa80c Modified Files:
src/Main/util.cxx: Olaf Flebbe: flush the osgDB cache just before
	exit. This avoids a static destructor cleanup problem with static
	osg linkage.
2007-01-31 20:43:10 +00:00
frohlich
dc9750f16e Modified Files:
src/Main/renderer.cxx: Fix typo
2007-01-31 20:37:43 +00:00
frohlich
14c52fb33d Modified Files:
src/Main/renderer.cxx: Avoid the ClearNode
2007-01-30 20:34:07 +00:00
frohlich
4ec7d1553c Modified Files:
src/Main/renderer.cxx: Make it work with current osg cvs.
2007-01-28 20:01:47 +00:00
mfranz
8a489eed0b only WARN if fgcommand "load" doesn't find the file; it returns the
success/failure result, and it's up to the caller to complain or ignore
2007-01-20 23:06:44 +00:00
mfranz
b7a7de4f30 don't search *-set.xml files in the the *complete* $FG_ROOT/Aircraft/ tree
(including all subdirs and with max depth!), but only the outmost level.
There are no *-set.xml files in deeper nested dirs, and with an ever growing
number of aircraft the search just lasts too long.
2007-01-15 20:58:20 +00:00
frohlich
826866b327 Modified Files:
src/GUI/gui.h src/GUI/gui_funcs.cxx src/GUI/gui_local.cxx
	src/GUI/mouse.cxx src/GUI/sgVec3Slider.cxx
	src/GUI/sgVec3Slider.hxx src/Main/fg_commands.cxx:
	Remove some dead code.
2007-01-07 15:51:29 +00:00
frohlich
a788ebf487 Modified Files:
src/Input/input.cxx src/Main/renderer.cxx
	src/Main/renderer.hxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx: Move scenery picking into the renderer.
	There is most of the required data defined. Also we can better use
	the pick visitor that will be needed with th upcommung panel code.
2007-01-07 12:02:50 +00:00
frohlich
eff14788a7 Modified Files:
src/Main/renderer.cxx: Don't try to render the moon without light...
2007-01-06 15:09:42 +00:00
frohlich
b8dffe05ab Modified Files:
src/Cockpit/panel.cxx src/Main/renderer.cxx: Make sure we run on
	texture unit 0 in plain opengl code.
2007-01-06 13:51:47 +00:00
frohlich
059c906be5 Modified Files:
src/Cockpit/panel.cxx src/Cockpit/panel.hxx
 	src/Cockpit/panel_io.cxx src/GUI/dialog.cxx src/GUI/dialog.hxx
	src/GUI/menubar.cxx src/GUI/menubar.hxx src/GUI/new_gui.hxx
	src/Input/input.cxx src/Input/input.hxx src/Main/renderer.cxx
	src/Scenery/scenery.cxx src/Scenery/scenery.hxx:
	Use SGBinding instead of FGBinding. Remove FGBinding. Install hooks
	to make the pick animation work.
2007-01-04 13:22:27 +00:00
frohlich
bc539e6284 Modified Files:
globals.cxx: Use the command manager singleton
2007-01-04 12:48:21 +00:00
frohlich
001bff4cbc Modified Files:
src/Main/options.cxx: Olaf Flebbe: remove leftover snprintf
2007-01-03 10:51:54 +00:00
frohlich
f63c96bf0e Modified Files:
options.cxx: Olaf Flebbe: Fix some problems with --help --verbose
	caused by the usage of snprintf. Elimate snprintf usage in favour
	plain std::string manipulations.
2007-01-02 08:32:32 +00:00
durk
0547e72d17 Modified (cleaner) traffic manager initialization procedure, corresponding
to the new data/AI/Aircraft directory scan code that will be committed
in a minute.
2006-12-27 11:50:13 +00:00
frohlich
bb3d4ad3af Modified Files:
src/Main/renderer.cxx src/Main/viewer.cxx: Clean up the viewers
	frames a bit. Do no longer require a axis permutation in osg's
	viewer.
2006-12-27 09:28:15 +00:00
fredb
c9401da22d Remove two g++ warnings 2006-12-17 18:32:56 +00:00
fredb
2422747bcc Port jpg-httpd to OSG 2006-12-16 17:44:46 +00:00
frohlich
66b6fa0001 Modified Files:
renderer.cxx: set TexEnv for the 2d stuff.
2006-12-03 16:50:00 +00:00
frohlich
037a961280 Modified Files:
renderer.cxx: Put light information into the update visitor
2006-12-03 16:48:25 +00:00
frohlich
6ad85fbae9 Modified Files:
src/Main/renderer.cxx: Use a LightSource for the Light.
2006-11-23 17:50:49 +00:00
frohlich
0adac854dc Modified Files:
renderer.cxx: Fill in that information into the update visitor
2006-11-20 18:16:31 +00:00
frohlich
42528de4ab Modified Files:
src/Main/renderer.cxx src/Cockpit/panel.cxx: Move some more into
	simple scenegraph wrappers. That fixes current problems with
	invisible panels.
2006-11-15 06:07:42 +00:00
frohlich
16aee6ac41 Modified Files:
src/Main/renderer.cxx: Fix some ugly triangle artefacts on the
	bo105's Instrument panel.
2006-11-12 17:22:02 +00:00
frohlich
29778f1496 Modified Files:
src/Main/main.cxx src/Main/renderer.cxx: Avoid an extra clear of
	of the color buffer.
2006-11-12 12:38:57 +00:00
frohlich
bb7c889bbb Modified Files:
src/Time/tmp.cxx src/Time/light.hxx src/Time/light.cxx
	src/Main/renderer.cxx src/Cockpit/panel.cxx: Initialize sky colors
2006-11-10 05:37:50 +00:00
frohlich
bd97270782 Modified Files:
src/Main/renderer.cxx: Make sure the normalize mode is not set
2006-11-08 20:45:21 +00:00
frohlich
6e370ce895 Modified Files:
fg_init.cxx: Oops, forgot to commit that chunk
2006-11-01 22:26:57 +00:00
frohlich
7e5d6d1d75 Modified Files:
Time/tmp.cxx Main/viewer.hxx Main/viewer.cxx Main/renderer.cxx
	Get rid of an other OSGFIXME. The view matrix had some plib specials
	included. The viewer is now updated for that.
2006-11-01 21:22:25 +00:00
frohlich
6b9d29194b Modified Files:
src/AIModel/AIBase.cxx src/Main/main.cxx src/Main/renderer.cxx
	Reflect last change in SimGear
2006-10-31 06:27:34 +00:00
frohlich
c53eef58e4 Modified Files:
src/Main/Makefile.am: now we need libsgutil ...
2006-10-31 06:19:53 +00:00
frohlich
b0f9d24f9d Modified Files:
configure.ac src/AIModel/AIAircraft.cxx src/AIModel/AIBase.cxx
 	src/AIModel/AIBase.hxx src/AIModel/AICarrier.cxx
 	src/AIModel/AICarrier.hxx src/AIModel/AIManager.cxx
 	src/AIModel/AIManager.hxx src/ATC/AIEntity.cxx
 	src/ATC/AIEntity.hxx src/ATC/AIMgr.cxx src/ATC/AIMgr.hxx
 	src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx
 	src/Cockpit/cockpit.cxx src/Cockpit/cockpit.hxx
 	src/Cockpit/hud.cxx src/Cockpit/hud.hxx
 	src/Cockpit/hud_rwy.cxx src/Cockpit/panel.cxx
 	src/Cockpit/panel.hxx src/Cockpit/built_in/FGMagRibbon.cxx
 	src/Cockpit/built_in/FGMagRibbon.hxx src/FDM/flight.cxx
 	src/FDM/groundcache.cxx src/FDM/groundcache.hxx
 	src/GUI/gui_funcs.cxx src/Input/input.cxx
 	src/Instrumentation/od_gauge.cxx
 	src/Instrumentation/od_gauge.hxx
 	src/Instrumentation/render_area_2d.cxx
 	src/Instrumentation/render_area_2d.hxx
 	src/Instrumentation/wxradar.cxx
 	src/Instrumentation/wxradar.hxx
 	src/Instrumentation/HUD/HUD.cxx
 	src/Instrumentation/HUD/HUD.hxx
 	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
 	src/Main/main.cxx src/Main/renderer.cxx src/Main/renderer.hxx
 	src/Main/viewmgr.cxx src/Model/acmodel.cxx
 	src/Model/acmodel.hxx src/Model/model_panel.cxx
 	src/Model/model_panel.hxx src/Model/modelmgr.cxx
 	src/Model/modelmgr.hxx src/Model/panelnode.cxx
 	src/Model/panelnode.hxx src/Navaids/awynet.cxx
 	src/Scenery/Makefile.am src/Scenery/hitlist.cxx
 	src/Scenery/hitlist.hxx src/Scenery/newcache.cxx
 	src/Scenery/scenery.cxx src/Scenery/scenery.hxx
 	src/Scenery/tileentry.cxx src/Scenery/tileentry.hxx
 	src/Scenery/tilemgr.cxx src/Scripting/NasalSys.cxx
 	src/Scripting/NasalSys.hxx src/Time/light.cxx
	Big BLOB on the way to OSG.
2006-10-29 19:30:21 +00:00
mfranz
546d76269a emit signal /sim/signals/fdm-initialized when the FDM is up; this is
useful to attach listeners and have their functions run at a time when
they can safely access FDM generated properties
2006-10-26 09:07:41 +00:00
durk
fee78e5119 Fixed a potentially tiny memory leak. 2006-09-30 05:17:45 +00:00
fredb
ec4887d1d2 Win32 only : Advertise we need a console when the program is linked as a 'Windows' subsystem 2006-09-27 20:18:08 +00:00
frohlich
4ea7fc6327 Attemp to fix the 'bogous tile problem' 2006-08-31 05:07:50 +00:00
fredb
2fc8a4bb4b Remove compilation warnings 2006-08-21 07:41:23 +00:00
curt
2d6f291d4f Add an initial implementation of the Garmin 400 series "Aviation In" data
format.  I have a Garmin 295 to test with, but so far I haven't been able
to make this work (code should compile cleanly though.)  I don't know if
I've made a mistake in the protocol or if my 295 just doesn't support this.
More work on this to come.
2006-08-20 23:37:13 +00:00
mfranz
ad0921f3e0 print the whole autosave.xml path, not just the filename. Unfortunately,
in the case of fg_init.cxx we'll only see that if the log-level is set
in preferences.xml, because command line options weren't even processed
at that time.  :-/
2006-08-10 11:21:15 +00:00
mfranz
eb38d1f92b remove experimental and unused code (we read the splash screen style
from /sim/gui/style[0] since a while, not from the preferred style.
This allows overriding it from *-set.xml files.)
2006-08-07 15:19:22 +00:00
mfranz
74391d55a1 cosmetics only:
- unify indentation (throw out 2-space indentation; this file uses 4 spaces)
- fix mixed indentation
- remove trailing spaces
- fix a couple of spelling mistakes
2006-08-07 15:16:46 +00:00
mfranz
d84043fbe2 move GL_TEXTURE_LOD_BIAS_EXT one section up and document what it does
(this was the reason why the first two text lines on the splash screen
looked more blurry than the others). BTW: I played with other values
than -0.5, but this turned out to be the best already. It makes textures
sharper than 0, but not too sharp (and thus flickering).
2006-08-07 15:11:46 +00:00
mfranz
6ce68a226a remove confusing error message that leads first-time users on the wrong
track and is a PITA for support staff. It's this message:

Error reading properties:
Failed to open file
 at /home/newbie/.fgfs/autosave.xml
 (reported by SimGear XML Parser)
2006-08-03 09:37:31 +00:00
frohlich
cdb725528d Clean up scenery center handling. It is set now less often. 2006-07-27 16:36:22 +00:00
durk
943b1b8e79 Enable the airway database parsing. 2006-07-27 14:49:41 +00:00
durk
a69dfbbc9a Mark's dynamic sun color changes. 2006-07-27 05:16:06 +00:00
curt
ae62896f9f Small tweaks to point lighting configuration to better control the appearance
of approach rabbits.
2006-07-21 15:48:57 +00:00
curt
0cec9290db Add a configuration property to turn on/off the use of point sprites.
Generally you want point sprites for performance reasons when enhanced runway
lighting (and smooth points) are activated.  Most hardware doesn't
accelerate the rendering of standard smooth points, so without point sprites
you will kill your night time performance if you turn on enhanced runway
lighting.

Note that enhanced runway lighting "breaks" our clever scheme to make the
runway lighting brightness vary with the relative view angle.  This means
with enhanced lighting on, all lights are equally bright no matter what
direction you view them from.  So perpendicular runways are just as bright
as runways you are directly lined up with (when enhanced runway lighthing
is activated.)

You can revert to the original lighting scheme by turning off enhance runway
lights, turning off distance-attenuation, and turning off point-sprites in
the rendering options menu.
2006-07-20 03:47:39 +00:00
curt
5831d99fc0 Always check for if glPointParameterIsSupported, even if we haven't asked
for point light distance attenuation, because we may want to toggle this
on via the rendering options gui.
2006-07-20 03:43:07 +00:00
ehofman
a4265a3b0a Use one standard define for enableing of the Special Purpose FDM code. 2006-07-17 17:58:53 +00:00
durk
d68723f3da Time initialization fixes. 1) Offset types "system-offset", "gmt-offset",
and "latitude-offset" should not use a precalculated value of warp.
2) Since the values of cur_time and crrGMT are identical in the current
version of the SGTime class, the calculations of the "system", "gmt", and
"latitude" are re-evaluated and updated where necessary.
2006-07-09 08:02:47 +00:00
mfranz
e46036d55f initialize HUD class and call its drawing routine from renderer
(basically a NOOP if /sim/hud/visibility[1] is false)
2006-07-04 15:54:41 +00:00
mfranz
0beba6c967 add new HUD to build system 2006-07-04 15:52:09 +00:00
mfranz
8de07e024e make clear that "Failed to find runway ..." doesn't have fatal consequences 2006-07-01 16:00:27 +00:00
curt
98c03f95e1 Vivian Meazza:
I attach 2 new files and a diff file for the associated changes to add a
“fluxgate compass” to the instrument inventory. Whist this outputs
essentially the same data as /orientation/heading-magnetic-deg, it has to
be powered, and can be made to fail. I also followed Roy’s suggestion to
generate the error properties for this instrument here rather than in
xmlauto.xml.

When this instrument is included in cvs, I intend to use it in the Hunter,
A4F Seahawk and KC135. After a bit more research, it might be appropriate
for the Spitfire and Hurricane as well. AJ would also like to use it for his
Lightning model.
2006-06-24 03:42:30 +00:00
mfranz
2360487b19 getGMTstring: remove leading space, cleanup 2006-06-17 18:25:12 +00:00
mfranz
b0271d17db - add direction letter to numeric mode, too
- avoid negative sign on 0.00
2006-06-17 18:08:53 +00:00
mfranz
af0ad80b51 move generation of lon/lat string representations here from cockpit.cxx.
Thanks to tied functions, this is only executed when the node is read. This
will be done by the old & new HUD code, the latter of which won't have a
special lon/lat mode at all. Instead it will be regular labels that point
to these properties for displaying lon/lat.
   I would have liked to avoid the duplication of code (lon and lat being
basically the same thing), and to avoid using static buffers and all, but
... if anyone wants to make it prettier, go ahead.
   The format is controlled by /sim/lon-lat-format (will be changed if I
find a better place).
2006-06-17 16:33:00 +00:00
mfranz
56d8181da3 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 ...
2006-06-11 15:18:48 +00:00
frohlich
14fe03ba6f 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.
2006-06-11 13:34:18 +00:00
mfranz
e48967cb1d 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.
2006-06-11 10:21:10 +00:00
mfranz
c4463b311c make sure the "nasal" subsystem is one of the last to be removed. That
way it can still process listener code during shutdown.
2006-06-10 22:24:05 +00:00
mfranz
b2b9a32e4b 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.)
2006-06-10 07:23:15 +00:00
mfranz
14ab303877 remove obsolete HUD fgcommands 2006-06-07 17:59:28 +00:00
mfranz
c5e74d090a better always use style[0] (again). Otherise *-set.xml can't easily change
background/font
2006-06-06 17:30:49 +00:00
mfranz
d8cd8f96aa read font and colors from the selected style, not always from /sim/gui/style[0] 2006-06-05 22:03:23 +00:00
mfranz
55903e9a07 use the global fontcache; this has the nice side-effect that the font is
now settable via /sim/gui/style/fonts/splash/{name,size,slant}
2006-06-05 20:49:35 +00:00
mfranz
d5fd30249f make fontcache globally available 2006-06-05 20:21:45 +00:00
mfranz
6cc4cbd696 fix the splash background color property path 2006-06-04 17:18:05 +00:00
fredb
35a8d66415 Mask error message 'Failed to find runway 28R at ...' when no runway is requested in the command line 2006-05-31 07:20:10 +00:00
fredb
d6320ad76b Create the /sim/ai node if someone has the unfortunate idea of removing it from preferences.xml 2006-05-20 13:29:31 +00:00
fredb
b55833dffb Add an option to enable ai scenarii from the command line instead of editing preferences.xml 2006-05-20 12:19:33 +00:00
mfranz
fa62bc3ec2 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.)
2006-05-17 21:21:38 +00:00
mfranz
93f4180597 linking with the puaux lib would be recommendable, if we are using its
widgets  ;-)
2006-05-14 12:22:53 +00:00
mfranz
f9959b7f2c - move auto_gui's addWaypoint to routemgr.cxx
- add command interface property (monitored by listener)
- remove all traces of auto_gui.[ch]xx
- remove some trailing spaces, fix indentation
2006-05-08 14:35:29 +00:00
mfranz
29ff85142b - merge FGDialog::{update,apply}Value{,s} ... there's really no need to have
two almost identical functions for these methods. It only forces to repeat
  the redundancy for every small change to either.
- abstract out generation and destruction of plib string arrays
- abstract out generation of lists from <value> children
2006-04-28 11:49:11 +00:00
mfranz
eb19c2650d newgui.[ch]xx: implement FGDialog *NewGUI::getDialog(cont string&)
fg_command.cxx: add possibility to "dialog-apply" or "dialog-update"
                an arbitrary active (= open) dialog or widget
2006-04-28 10:27:54 +00:00
mfranz
3b4e532372 working on the termination of the last hardcoded dialogs in Autopilot/auto_gui.cxx:
- move fg_init/parseWaypoints() to route_mgr/postinit()
- don't delete initial string list to keep it available for subsystem reinit
2006-04-27 15:30:42 +00:00
mfranz
4b856b508a cosmetics:
- only call globals->set_initial_waypoints() if the waypoints list address
  has actually changed, that is: if it has just been initialized
- remove trailing spaces
- fix indentation
2006-04-27 10:35:03 +00:00
mfranz
7eb26c4ab3 set /sim/startup/[xy]size initially again. (This was always done in the past,
but got changed so that Nasal listeners wouldn't be triggered needlessly.
Doesn't make sense, though, as Nasal will never be available before the
video size is set, and it prevents the window interface from setting the
startup size.)
2006-04-25 20:16:01 +00:00
fredb
23e2efd5e3 Revert last change 2006-04-02 08:42:36 +00:00
fredb
e126e12fbc Under Windows, set fg-home to My Documents, or whatever localized name this folder has. 2006-04-01 11:07:45 +00:00
frohlich
2cc4b3fbc6 Modified Files:
src/Main/renderer.cxx: Remove some more unused variables
2006-04-01 10:50:52 +00:00
mfranz
18a342b624 dialog-apply only applies (use dialog-update if you want to update) 2006-03-31 10:15:55 +00:00
curt
6d17cb8002 Marc Frajola:
Here is one patch that to make FlightGear run without floating point
exceptions on FreeBSD.  Apparently, if we do not ignore floating point
exceptions per this patch, there is some occasional condition where the
nvidia driver is involved in delivering spurious floating point exceptions
to the fgfs process, causing it to core-dump occasionally without the patch.

With only this patch, FlightGear will compile and run properly on
FreeBSD 6.X as long as the nvidia accelerated driver is installed,
modulo proper switches to the SimGear and FlightGear configure script
executions.

Again, kudos to your team for the great work on the big release
push; it is super to see things come together like this!
2006-03-28 21:18:32 +00:00
frohlich
798e3c505c Remove unused variables 2006-03-25 19:11:33 +00:00
curt
d5e57b8c1f Preparations for first v0.9.10 prerelease. 2006-03-21 18:52:19 +00:00
fredb
69dc912333 More sanity checks 2006-03-21 14:53:38 +00:00
fredb
1e032d35e0 Add sanity check on option parameter 2006-03-21 14:43:38 +00:00
mfranz
6b501169a5 add missing break :-) 2006-03-14 15:30:35 +00:00
mfranz
f82a8fba52 close Aircraft/ dir after scanning for *-set.xml files 2006-03-14 15:28:29 +00:00
mfranz
1dae811546 always make some property string values upper case 2006-03-10 11:46:03 +00:00
frohlich
dc958d6e8e We need to flush all pending mouse move events past a mouse warp to avoid
a race condition ending in warping twice and having huge increments for the
second warp.
I am not aware of such a flush function in glut. So we emulate that by
ignoring mouse move events between a warp mouse and the next frame.
That should make glut behavour aequivalent to sdl behavour.
2006-03-10 07:13:59 +00:00
fredb
acd09b99cb Jean-Yves Lefort :
I have implemented a Honeywell MK VIII EGPWS emulation for FlightGear.
The MK VIII is an Enhanced Ground Proximity Warning System aimed at
regional turboprop and small turbofan aircrafts such as the Citation,
Citation Bravo, B1900D, Beechcraft 99 and L410.

Frederic Bouvier:
make the MSVC compilation possible. Rearrange base package directories.
2006-03-04 20:21:32 +00:00
mfranz
1ece476355 make abortion more efficient ;-) 2006-02-23 12:55:57 +00:00
mfranz
d33b6da077 catch string exceptions 2006-02-23 08:32:27 +00:00
mfranz
c9813d1b5d new FSF address 2006-02-21 01:16:04 +00:00
ehofman
5fe860750e Mathias Frhlich:
This patch makes use of the vectors now available in simgear with that past
patch. And using that it simplyfies the carrier code somehow.

- Small additional factory's to the quaternion code are done in the simgear
  part. Also more explicit unit names in the factory functions.
- The flightgear part makes use of them and simplyfies some computations
  especially in the carrier code.
- The data part fixes the coordinate frames I used for the park positions in
  the carrier to match the usual ones. I believed that I had done so, but it
  was definitly different. Also there are more parking positions avaliable now.
2006-02-19 17:28:31 +00:00
mfranz
f928df6caf display deposit depths < 1mm correctly (although this is rather a
theoretical problem :-)
2006-02-19 13:59:39 +00:00
fredb
36e4045810 Add missing include files needed by the new math code under windows 2006-02-18 13:58:09 +00:00
ehofman
da6568ad50 Mathias Frhlich:
The new multiplayer patch with an extension to transmit some properties with
the base package. The properties are transmitted in a way that will not
immediately brake the packet format if we need new ones.
Even if the maxmimum number needs to be limited somehow, that format might
work well until we have an improoved packet format which is even more compact
and that does not require to retransmit redundant information with each
packet.

That part is relatively fresh and based on that what Oliver provides on his
multiplayer server web page.

The properties are transferred to the client and I have modified the seahawks
rudder animation property to use a relative property path to verify that it
works appart from the fact that you can see it changing in the property
browser.

The movement is still a bit jerky, but that can be fixed/tuned later without
again braking the packet format.
2006-02-17 09:43:33 +00:00
mfranz
8e8b2bba04 in fgWarpMouse() we need to flush all mouse motion events before we can set
the mouse pointer to a new position. Otherwise it can happen that the new
position is first set, but then come a few still unprocessed events for the
old position. This makes ugly jumps in mouse view mode.
2006-02-16 21:02:09 +00:00
mfranz
2aedb080d7 noise reduction 2006-02-15 22:03:15 +00:00
mfranz
9f227bf837 reduce noise 2006-02-14 22:24:53 +00:00
mfranz
a9228ee582 screenPrint() is obsolete. Use screen.log.write() for the same purpose,
or write to the color properties in /sim/screen/. If this Nasal/GUI
implementation turns out to be too slow, we'll write a generic OpenGL/plib
version simliar to the ATCdisplay code.  (OK'ed by Andy and Stuart)
2006-02-13 19:59:07 +00:00
mfranz
3a2148828e screenPrint() is obsolete. Use screen.log.write() for the same purpose,
or write to the color properties in /sim/screen/. If this Nasal/GUI
implementation turns out to be too slow, we'll write a generic OpenGL/plib
version simliar to the ATCdisplay code.  (OK'ed by Andy and Stuart)
2006-02-13 19:46:03 +00:00
mfranz
3b047b1831 set /sim/fg-home in analogy to /sim/fg-root. This is useful for various
scripts that load/write user specific data that shouldn't go to PWD, and
can't go to $FG_ROOT (due to permissions and clean separation of 'official'
data and local modifications)
2006-02-13 16:49:18 +00:00
mfranz
2385e5d387 Just a gimmick: make background color configurable. Maybe some dark color
might look nicer for certain aircraft specific splash screens. Test with:
$ fgfs --prop:/sim/gui/colors/splash-screen/blue=0.35
2006-02-12 20:37:57 +00:00
ehofman
5045b936a2 Remove old festival code." 2006-02-12 17:11:07 +00:00
ehofman
975887eac8 Remove old festival code. 2006-02-12 17:04:22 +00:00
ehofman
4bfd1722df Mathias Froehlich:
This patch removes some useless indirection when creating AIModels. It
obsolets AIScenario*.

AIEntities are just an intermediate copy of an other intermediate copy of an
xml file on the way from the ai scenario configuration file to the AIModels.
As such the AImodels can now be created directly from the property tree read
from the scenario file.

This reduces the amount of work needed to add an other AIModel and reduces the
amount of copy operations done during initialization.

It also moves internal knowledge of special AI models into these special AI
models class instead of spreading that into the whole AIModel subdirectory
which in turn enables to use carrier internal data structures for carrier
internal data ...

Also some unused variables are removed from the AIModel classes.
I believe that there are still more of them, but that is what I stumbled
accross ...

Tested, like the other splitouts these days in a seperate tree and using the
autopilot for some time, and in this case with a carrier start ...
2006-02-11 13:16:56 +00:00
mfranz
13c923fcc5 start "voice" subsystem 2006-02-11 12:02:40 +00:00
mfranz
4010611300 rename user preferences.xml' to autosave.xml'. The former name lead to
problems because a lot of people already have their *real* preferences
set in ~/.fgfs/preferences.xml (and don't want fgfs to stomp over them),
because the name doesn't tell people that their data aren't save there
(comments!), and because this is inconsistent with the global preferences.xml
file, where user changes *are* respected.
2006-02-11 11:51:20 +00:00
ehofman
5bd2ef1edb Vivian Meazza:
This patch is a combined effort by Gregor Richards, Oliver Schroeder, and
Vivian Meazza (and code cleanups and improvements by Erik Hofman). It corrects
the bug in which a Multiplayer model responds to local inputs, and the view
number bug which caused certain aircraft to appear as cockpit only models. It
passes remote properties over the net, and all major control surfaces and gear
are now animated correctly, providing that the local ~model.xml file contains
no leading "/" in the <property></property> data entries. MP objects
are now extrapolated using 1st and 2nd derivatives to make their movement
appear more smooth. The sim is now halted while a new client joins the net.

Known problems with MP are non-display of the remote client under certain
circumstances of starting/resetting, and a freeze on starting. These bugs are
long standing, and are not addressed by this patch.

Special thanks must go to AJ Macleod for his patient testing of this patch over many evenings.

We have also moved part of multiplayer into AIModels as part of the ongoing
development of MP.
2006-02-09 12:29:05 +00:00
ehofman
a47725e92f Mathias Frhlich:
Make use of the automatic reference counting class for ssg* data in flightgear.
2006-02-08 10:25:56 +00:00
ehofman
c695e7c788 Vassilii Khachaturov:
Fix the current buggy rain orientation behaviour for the views attached to the
aircraft (while still inheriting bugs with the views attached to anything else).
2006-02-02 09:57:33 +00:00
ehofman
c90596b8ec Tie the sun halo texture to point sprites. 2006-01-31 15:14:45 +00:00
ehofman
bd1f711b51 Durk Talsma:
- Feet to meter conversion mistake (in AI getGround elev)
- Improved ground following code (not yet perfect, but for now no one will
  notice it within the marginal altitiude differences at the taxitrack or
  runway)
- Exclusion of the "AI" directory witihin data/Aircraft in
  main/init/fgSearchAircraft, to prevent AI aircraft to be picked up by the
  aircraft search function
2006-01-30 13:29:49 +00:00
ehofman
6bdaa05351 Mathias Frhlich:
This patch limits the maximum simtime we do simulation computations for.
That is highly sensible if you run flightgear in valgrind or some realy slow
debug build. In such a case it is possible that flightgear gets totally
unresponsible, because simulation time might increase slower than real time.
That patch introduces a maximum simulation time per rendered frame to limit
that effect.

If the property /sim/max-simtime-per-frame is set to something strictly
positive, the simulation time is limited to that value.
The default is unchanged - no limit.

Anyway, from the point of view of gui responsiveness and responsiveness to
realtime controls like joystick inputs it might be a good idea to limit that
by default to say 1 second. If you have less than 1fps, flightgear is
unplayable anyway and I believe we do not longer need to care for realtime
correctness for that case ...
2006-01-30 10:50:28 +00:00
mfranz
eb69ef592e make it consistent 2006-01-29 20:33:33 +00:00
mfranz
810d7b2297 another signal for listener callback functions:
setlistener("/sim/signals/quit", func { print("I'm called on exit.")});
2006-01-29 20:11:10 +00:00
mfranz
ebe5fc3092 don't set zero width or height 2006-01-29 14:58:52 +00:00
mfranz
dc7cc2015b restore the uglyness: call the resize callback every frame again, even
though the window wasn't resized. I'm just not adventurous enough for
a cleaner solution in the light of the upcoming release. At least the
xsize/ysize properties aren't set each frame any more, so listeners
work now properly.
2006-01-28 16:06:03 +00:00
mfranz
8f9d8cab03 now that the renderer doesn't resize the window for every frame, we need
to do it manually here
2006-01-28 13:38:28 +00:00
mfranz
bae5d4e92b write to /sim/startup/xsize only if the size really changed; likewise for
ysize. This is useful for listeners, e.g. the one that will re-position the
FPS dialog.
2006-01-28 10:40:47 +00:00
mfranz
a4bbb31927 Resizing is done when fg_os{,_sdl}.cxx says so, not in every single frame.
(This defeats the purpose of the resize callback and makes "listening" to
the xsize useless.)
2006-01-28 00:10:39 +00:00
ehofman
5441622a28 Add support for point sprites. 2006-01-26 09:37:32 +00:00
ehofman
907b99a669 Use smooth (aliased) lines and points when available in hardware. 2006-01-21 12:07:40 +00:00
ehofman
919ccdb96a Remove a leftover from a previous patch. 2006-01-21 10:03:36 +00:00
ehofman
619226e9d0 Integrate a large part of John Wojnaroski's 747 cockpit project.
Erik Hofman:
This patch contains an update to net_ctrls.hxx that adds an extra 100 bytes
(or an equivalent of 25 (u)int32_t types) of reserved space. This could be
used to make the protocol forward and backward compatibel within a certain
scope. Be sure to read the instructions at the begining of the header file
when addinf new variables.
2006-01-20 17:19:01 +00:00
fredb
28b5a6d8bd Remove the filtersjb left over 2006-01-13 14:33:07 +00:00
ehofman
932b38a87e sync. with JSBSim v. 2.0 2006-01-12 15:04:22 +00:00
ehofman
fcfe5d2010 Don't display the menubar in e highres screenshot. 2006-01-11 10:53:04 +00:00
curt
ee065ee6ef Write 'fg_root' in the property tree at /sim/fg-root 2006-01-09 03:47:33 +00:00
curt
3ed73e16b6 Add a do_play_audio_message() function which is tied to the
"play-audio-function" command.  This function can be called from internal
code, from nasal scripts, or from external scripts to play a single one-off
wav file.  File/audio data is loaded and unloaded on the fly automatically.
2006-01-09 02:23:02 +00:00
ehofman
0e16419f0d Stuart Buchanan:
- Provide a Nasal interface to display simple text messages on the screen
  like the ATC display. In fact, I copied the code from the ATCDisplay.cxx
  and simply shifted it further down the screen.


Erik:

TODO: Integrate the two pieces of code.
2006-01-06 09:50:58 +00:00
ehofman
4be621fbe9 Durk Talsma, Olaf Flebbe & Mathias Frhlich:
Split up simple.cxx
2005-12-29 13:58:21 +00:00
ehofman
d11df8fcc8 Remove a debugging cout. 2005-12-27 14:30:56 +00:00
ehofman
7b1f1d73e6 Detect the hostname as early as possible to prevent a segmentation fault (and an unknown exception in the main loop situation. 2005-12-27 14:02:38 +00:00
mfranz
a67cb7d6fb no more "Aborting ...\nPossible cause: Success" 2005-12-22 23:32:23 +00:00
ehofman
faf91ae9e9 Revert to the previous version, this is just a glimps of the future. 2005-12-22 15:13:50 +00:00
ehofman
62c6063fa1 Only test for --fg-root and --aircraft in ~/.fgfsrc et all if it wasn't specified at the command line. 2005-12-22 14:14:08 +00:00
ehofman
b788a204c4 Add an option to enable or disable the save-on-exit option. Add a season commandline option. 2005-12-22 13:51:11 +00:00
ehofman
ffa92dfe4b Put the user configuration file sequence into it's own function. This will slightly tidy up the code but more importantly will make it consistant across the program. 2005-12-22 10:25:07 +00:00
fredb
653f063bcf Fix a typo and an unitialized variable 2005-12-22 06:42:00 +00:00
ehofman
49ba607726 Get the environment variables HOME and HOSTNAME only once. 2005-12-21 13:36:04 +00:00
ehofman
3986347f37 MSVC fix. 2005-12-18 09:35:01 +00:00
ehofman
f6174d2bf0 Stefan Seifert: implement persistent dialog options, so changes in rendering, static LOD and sound settings dialogs are made permanent. 2005-12-17 15:34:37 +00:00
curt
bbb8b066eb Mathias Fröhlich:
Computes the pick direction and starting point.  This is code that translates
a screen coordinate into a vector in the FlightGear world (between the eye and
the on-screen coordinate.)  Armed with this vector in FG world coordinates,
you could call a scenery intersection routine and lookup the lon/lat/elev of
the point in the world that was clicked on.
2005-12-12 21:15:20 +00:00
ehofman
90a149ffa3 Vassilii Khachaturov:
* in some cases more specific sg exception types were used in place
  of the more generic one, e.g., sg_io_exception instead of sg_exception
  when the context of the error was an IO error
* in some cases, the error message was made more specific
* minor style fix for exception rethrowing --- using throw; whenever
  a re-throw is made; sometimes optimizing away the exception symbol name
  in the catch handler at all
* more specific catch handlers added in some places -- e.g.,
  an sg_io_exception caught ahead of sg_exception
2005-12-11 13:37:06 +00:00
ehofman
6773bf9571 Additional checks to io arguments. This prevents fg from crashing on invalid
arguments.
2005-12-11 13:12:26 +00:00
mfranz
72f46a4a6f globals.cxx -- FGGlobals::set_fg_scenery():
Insert empty string as marker between FG_SCENERY path elements.
    FG_SCENERY=A:B expands to [A/Terrain, A/Objects, "", B/Terrain, B/Objects, ""]
    (assuming that both A/ and B/ have Terrain/ and Objects/ subdirs).

tileentry.cxx -- FGTileEntry::load():
    Check all tile dirs in FG_SCENERY from left to right: add all objects
    to the scenery until a terrain tile was found: In this case read the
    rest of that group (i.e. the Objects/ twin dir) and then stop scanning.

    Better structuring of log messages & fix warnings.
2005-12-03 10:20:35 +00:00
daveluff
4be8a31d4b Build the KLN89 stuff... 2005-11-30 00:50:07 +00:00
david
fbd53e772e Correct conditional so that FlightGear will compile without
special-purpose FDMs.
2005-11-29 03:12:24 +00:00
ehofman
e80e60ab7e Use the prefered GLUT game_mode_string format and add the posibility to match the screen refresh rate and the framerate. 2005-11-27 10:27:55 +00:00
curt
eca17c0dd8 Final updates for v0.9.9 2005-11-17 22:54:46 +00:00
curt
40bd985d36 Expose local timezone offset in the property tree. 2005-11-17 15:47:01 +00:00
ehofman
496dd14e21 This section was accidentally committed togetehr with another patch, it turned out it needed a fix since env was already declared. 2005-11-13 10:20:15 +00:00
ehofman
a76bbbd23f Use the new clouds3d-enable property instead. 2005-11-13 10:07:23 +00:00