1
0
Fork 0
Commit graph

1251 commits

Author SHA1 Message Date
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 Fröhlich:
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 Fröhlich:
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 Fröhlich:
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