Age | Commit message (Collapse) | Author |
|
Move the GDK lock-management into the various arena action functions
so that we can release the lock _before_ sleeping in the guile thread,
allowing the GUI thread to update when the sleep starts
rather than when the sleep ends, so that the messages actually
stand a chance at remaining visible for something close to USLEEP_TIME--
rather than not showing until USLEEP_TIME has already expired.
Otherwise many of the updates get lost, e.g.:
(while (robot-feel "space") (robot-move 1))
... never seems to actually spend any time with the "Robot feels ..."
messages visible onscreen between the "Robot moves.." messages.
Note also that this change allows the GUI to generally be much more
responsive to user interaction (e.g.: scrolling, selection/copy/paste)
while a robot program is running!
|
|
|
|
This gives _much_ more useful readline behavior,
since (ice-9 readline) actually knows how to autocomplete
based on the scheme environment, handle multi-line input, etc.;
and properly displays return values and error-messages,
and supports switching to different front-end programming languages
like ecmascript.
Note that we're keeping catch_handler so that we have a chance
of diagnosing problems that could _conceivably_ occur
when interacting with guile during bootstrap
(e.g.: missing readline support, changed REPL API...).
|
|
|
|
This avoids weird off-by-1 errors in the GUI counters at game end.
|
|
Users should no longer need to run from an xterm to see
to see things like final energy/score/odometry stats,
map-file path, copyright, load-messages, etc.
Note that this also means we no longer need to redirect readline,
since we're just redirecting *everything*.
|
|
After some of the restructuring that was involved
in the inversion of the GTK+/guile threads,
these variables are no longer needed.
Though note that we do actually still busywait
specifically on creation of the map.
|
|
Making the GTK+ thread the main thread, and subordinating the guile thread,
lets the GUI continue to live after the robot has died--
which means that we'll be able to switch to just doing
everything in the GUI without requiring a separate xterm
to see the final stats after the robot dies.
|
|
This seems a lot more natural for scheme code.
|
|
|
|
Even if there's no movement to animate per se, we still want
to be able to see the energy/shields stats decrementing
as we bump into things--otherwise we might be surprised
when our robots suddenly dies with our counters all still
_apparently_ well above zero!
Note that we're still charging only 1 hit against energy and shields
per failed move *command* regardless of how many spaces
the robot was attempting to go....
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Using C99 is a bit of a mixed bag, but lets us more easily eliminate
warnings than other variants....
Earlier C variants have no "long long" type, which we don't even use
but is still a problem for us because there are some deprecated
function prototypes that come in through the libguile.h header
and *they* are defined in terms of "long long".
C99 criminalizes guile's behavior of passing function-pointers
via "void *"..., but we can work around that....
|
|
Necessary to support GUILE_FLAGS in guile 2.0
|
|
Fixes: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746000>
|
|
|
|
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
(Note: glade will not be used for the UI, this is just a design)
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|
|
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
|