mfranz
0fed31d7b7
- fixpath: don't need to remove leading/trailing slashes "manually"; that's
...
a side effect of the stack loop already
- replace all backslashes by slashes, to avoid security problems on UNIX
(if support for them is desirable on MS Windows, then we'd need an OS
property)
2007-06-13 20:31:09 +00:00
mfranz
120d09b5e6
Andy ROSS: functions to check for stat()[2] flags, such as isdir()
...
mf: fixpath(): function to normalize file paths (doesn't handle escaped
characters yet)
2007-06-13 16:46:41 +00:00
mfranz
d9910b27e7
simplification
2007-06-12 22:08:18 +00:00
mfranz
3c73eaa45f
documentation update and cosmetics
2007-06-12 21:27:48 +00:00
mfranz
4c2ded3509
throw out load_xml_nasal and implement load_nasal(<file> [, <module>]);
...
This can be used to load and run Nasal code at runtime (without need
for an XML frame).
2007-06-12 19:13:28 +00:00
mfranz
a1fd54cfdf
aircraft.nas, gui.nas: adapt loadxml for absolute paths, drop second fgcommand arg
...
debug.nas, tutorial.nas: adapt for abs. paths
fuel.nas: cleanup
screen.nas: don't remove listeners -- that's done automatically by removind
the node in NasalSys.cxx
xml.nas: minor documentation fix
2007-06-12 16:20:55 +00:00
mfranz
39ee6cff4f
fix backtrace() (probably broken since the last Nasal update)
2007-06-10 20:31:33 +00:00
andy
30502189d8
The screen-capture command no longer pops up a dialog, so toss up a tip
...
from within the F3 keybaord handler instead.
2007-06-07 16:59:07 +00:00
mfranz
0fcdafe2aa
add autotrim class to help with trimming (read the class documentation for
...
an explanation). There's no button/key using this by default (yet?).
2007-06-07 10:12:03 +00:00
mfranz
71fa47d99d
drop clumsy handling of temporary file data branch, and use the "savexml"
...
fgcommand's temporary <data> argument branch instead
2007-06-06 21:40:47 +00:00
mfranz
c050b436fa
livery handling: add sort option and next()/previous() methods
2007-06-05 14:21:12 +00:00
mfranz
95caf1a918
add livery singleton class that maintains livery XML files.
...
TODO: allow explicit sorting (currently only alphabetic) and add next()
and previous() methods
2007-06-04 13:45:23 +00:00
mfranz
6cb769ebf7
in addition to aircraft dialogs from arbitrary paths also allow gui.Dialog
...
to handle regular dialogs from $FG_ROOT/gui/dialogs/.
Example: var fps = gui.Dialog.new("fps"); fps.open(); fps.close();
2007-06-04 12:42:29 +00:00
mfranz
fef7057bfc
flyby: don't choke on <view>s without <name>, even though these are bugs
2007-06-03 20:54:31 +00:00
mfranz
9a37371eaa
document geo.put_model()
2007-05-31 20:19:26 +00:00
mfranz
eb1e986889
whoops ... no comment
2007-05-15 20:46:59 +00:00
curt
203c61aaa1
Minor cosmetic changes.
2007-05-15 16:07:15 +00:00
mfranz
bec64d9c9e
s/play-audio-message/play-audio-sample/
2007-05-15 14:40:58 +00:00
mfranz
436bf87c54
debug.benchmark(): helper function that prints the system time in seconds
...
for the given function call
2007-05-14 16:28:53 +00:00
mfranz
a9b9c86750
- add Node.getValues() in analogy to Node.setValues(). Returns a hash with
...
all children, vectors for multiply used names, further hashes for subtrees
etc. Meant for quickly pulling in config branches where (almost) all values
are needed.
- usage of "var" keyword and named parameters in other (but not all) funcs
2007-05-14 15:15:00 +00:00
mfranz
02b4dc58e8
geo.nas:
...
- add put_model() function to place models at given lon/lat. If
elevation is nil, then it will be put on the surface. The path is
relative to $FG_ROOT.
- let geo.click_position() and geo.aircraft_position() return copies
of the Coord class, not just a reference
view.nas: adaptation for geo.nas change; minor changes
2007-05-12 18:38:57 +00:00
mfranz
1a19f8a8e5
- make viewReset reset fly-by view
...
- cleanup
2007-05-11 21:16:35 +00:00
mfranz
874d55b6e7
simplify by using the props.Node.setBinding() method
2007-05-11 19:02:20 +00:00
mfranz
5f97465d6e
- make view_manager singleton class
...
- simplify lookat wrapper with a call()
- cosmetics
2007-05-11 18:59:34 +00:00
mfranz
47d675bfd5
- make the HUD and the data class singleton classes
...
- use var everywhere, cosmetics
2007-05-11 18:04:51 +00:00
mfranz
c54fbb1e39
_c should be a valid function from the beginning
2007-05-11 18:03:44 +00:00
mfranz
d92ae39349
- skip DOCTYPE
...
- optional attr prefix in xml.dump
2007-05-11 15:44:16 +00:00
mfranz
8befda2655
whoops ... forgot one "arg" fix
2007-05-10 17:37:28 +00:00
mfranz
e22a4086ff
"fixed" the "arg bug". (Wasn't really a bug, just old-style Nasal code
...
that doesn't work with new nasal. :-)
2007-05-10 17:33:28 +00:00
mfranz
80fd0740e5
new commands:
...
debug.color(bool) turns terminal colors on/off
debug.tree(property="", mode=1); dumps property tree in flat
mode (0) or space indented mode (1).
Flat tree mode is similar to props.debug(), but colored, and it outputs
all attribute flags and the number of attached listeners.
2007-05-09 17:31:45 +00:00
mfranz
3b6a79ee8b
- use Nasal's rethrow capabilities
...
- remove redundant lines
2007-05-08 22:21:34 +00:00
mfranz
072610c001
aircraft.steering: redefine the controls.applyBrakes() wrapper, too.
...
If this isn't what the aircraft developer wants, then s/he can still
redefine it again afterwards.
2007-05-08 14:22:54 +00:00
mfranz
6b533c19a9
add class that implements differential braking with rudder input
2007-05-08 09:52:13 +00:00
mfranz
f7a9ef4d37
- use heading instead of last course (works better in curves)
...
- stop at crash
2007-05-05 21:36:31 +00:00
mfranz
d225de2aea
fix behavior for begin and end of replay
2007-05-05 15:07:54 +00:00
mfranz
c13914937e
make "terrain-elevation" wrapper more efficient
2007-05-05 10:09:13 +00:00
mfranz
d4e030f9c6
- don't update when aircraft stays within threshold distance
...
- randomize left/right, better parameters
- don't reset on pause
2007-05-04 22:48:40 +00:00
mfranz
66f9e552ba
- first stab at fly-by view mode
...
- hack for the panView functions: work in paused mode, too!
2007-05-04 18:01:26 +00:00
mfranz
9785ce8e36
- make stepView robuster and view order changeable (via view.views vector)
...
- de-classify view.point
2007-05-04 17:19:31 +00:00
mfranz
9f1bc7efeb
add "terrain-elevation" utility function
2007-05-03 22:09:34 +00:00
mfranz
d9b0226d30
- add process_file() function (still reads the whole file into memory)
...
- handle "processing instructions"
- don't gobble leading spaces in non-cdata data sections
- minor fixes, cosmetics, documentation changes
2007-05-03 15:56:59 +00:00
mfranz
af56aed55e
simple xml parser that allows to read non-fgfs-standard xml files such as
...
those from traffic manager and AI, so that it will later be possible to
load the data into the UFO Scenery Object Editor, to visualize and edit
parking positions, taxiing routes etc. The parser also allows to suck
arbitrary (simple) XML data files into fgfs from Nasal context.
In the long run the non-standard XML files in fgfs shall, of course, be
converted to standard format, in which no data may be stored in attributes.
2007-05-02 20:55:54 +00:00
mfranz
24b8156e9f
HUD: only consider i/I/H presses when a HUD is displayed
2007-05-01 19:36:41 +00:00
mfranz
1e446a26ae
setlistener(): don't drop calls with invalid property -- the c++ side
...
outputs a nice error message in this case
2007-04-27 15:52:54 +00:00
mfranz
944e6a8548
in debug levels "debug" and "bulk" output listener id, file name, and
...
line-number for every setlistener() wrapper call. This allows to identify
listeners later by their id.
2007-04-27 14:27:01 +00:00
sydadams
bafa93e8fd
Added volume control to the atc-chatter
2007-04-19 04:42:20 +00:00
mfranz
47f5e58005
can't hurt to initialized light.endstate (state after number of sequences)
2007-04-06 21:53:46 +00:00
mfranz
5471f0cd5b
- remove hack around Nasal bug, which is already fixed
...
- add second optional argument to light.blink() method, which
defines which state should be set after the end of the sequences
(defaults: 0)
2007-04-06 21:33:22 +00:00
mfranz
c331a49dea
add optional argument to blink() method:
...
blink() ... set signal generator to unlimited blinking
blink(3) ... set signal generator to blinking only 3 sequences
after turning the switch on.
2007-04-06 20:03:47 +00:00
mfranz
38c170baa5
props.copy: add third argument that, if set, also copies the node attributes
2007-04-04 14:44:13 +00:00