summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-04-02main: skip trying to exit_nicely on failure to init mapHEADmasterJoshua Judson Rosen
exit_nicely() exits from the guile thread before it gets a chance to exit() from the process as a whole. And there's really nothing for the reporting-code in exit_nicely to actually report at this point, anyway.
2017-04-01main: exit with error on failure to init arenaJoshua Judson Rosen
This handler got broken when exit_nicely stopped actually triggering an exit from the entire process and started just exiting the guile thread. And, actually, it never exited with an error-status before-- which it does now.
2017-04-01ui-cmdwin: prevent excessive buffering on captured stdio streamsJoshua Judson Rosen
Streams that start out connected to non-tty FDs default to fully-buffered and retain that configuration after those underlying FDs are redirected, which prevents the "need to run from an xterm" fix from actually working unless we do something like this to reset the stream buffers.
2017-04-01Drop undocumented readline dependencyJoshua Judson Rosen
Yet another of the niceties that comes out of just using guile's REPL is that readline support is just figured out when building guile; so by the time gnurobots is being built, readline support is either there or it isn't--and even if our guile isn't readline-enabled, we can still just run without readline (though, in practice, I don't think I've ever seen a build of guile in the last 15 years that didn't have readline...).
2017-03-29robot-move: pause for USLEEP_TIME even after zero-length movesJoshua Judson Rosen
2017-03-28Let the GUI process between updates!Joshua Judson Rosen
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!
2017-03-28UI: show for _what_ types of things robot is smelling/feeling/lookingJoshua Judson Rosen
2017-03-28REPL: just use guile's normal REPLJoshua Judson Rosen
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...).
2017-03-28catch_handler: restore/fix reporting of actual error-messagesJoshua Judson Rosen
2017-03-28robot-move: signal DEATH only _after_ the display has been updatedJoshua Judson Rosen
This avoids weird off-by-1 errors in the GUI counters at game end.
2017-03-28ui-cmdwin: redirect all stdio into the embedded terminalJoshua Judson Rosen
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*.
2017-03-28Drop unnecessary spinlock (loading, ploading)Joshua Judson Rosen
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.
2017-03-28Invert GTK+/guile thread relationshipJoshua Judson Rosen
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.
2017-03-28api: accept symbols (as well as strings)Joshua Judson Rosen
This seems a lot more natural for scheme code.
2017-03-28robot-move: update display regardless of whether movement succeededJoshua Judson Rosen
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....
2017-03-28match apparent initial direction in GUI to actual directionJoshua Judson Rosen
2017-03-28Consistently specify directions symbolicallyJoshua Judson Rosen
2017-03-28UI: don't hide counters at startupJoshua Judson Rosen
2017-03-28typo-fix: "within a single box", not "withing ..."Joshua Judson Rosen
2017-03-28Prevent compiler warnings due to guile's bogus function-pointer typingJoshua Judson Rosen
2017-03-28Stop using deprecated APIs.Joshua Judson Rosen
2017-03-28Migrate to guile 2.0Iain R. Learmonth
Fixes: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746000>
2009-11-18Fix autoconf mess such that you can actually specify CFLAGS to the build.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2009-11-18Fix issues when compiling with optimisations.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-10-14Change email address for Jim Hall, upon request.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-08-03Adjust build system.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-08-03Correct Window title.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-08-03Use pkg-config to check for Guile 1.8.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-08-03Add Gtk interface. Using a Vte for guile input.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-05-20Change default font to fixed.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-05-17Upgrade license to GPLv3 or later. Bump version to 1.1.1.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-05-14Prepare for release of 1.1.0.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-05-05Scrap plug-able interfaces in preparation for GTK GUI.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-12Make UI update in a loop, and thread out input.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-10Remove sign hack.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-09Misc cleanups and GType style conversion.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-09Corrected all copyright headers, and misc cleanups.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-09Replace deprecated functions.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-08Change binary name to gnurobots.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-08Add error message when given an invalid instruction.Bradley Smith
Add initial ui update to avoid corruption. Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-08Correct Map and X11_Plugin types, and correct copyrights.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-08Add -Wall and -Wfatal-errors compile flags, and correct code to compile cleanly.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-03-07Add -pedantic-errors and -Werror flags to compile, and fix code to comply.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-01-21Reformatted src/userinterface.c.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-01-21Correct fsf address in copyright.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-01-21Reformatted src/map.c.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-01-21Corrected fsf address in copyright.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-01-21Reformatted src/grobot.c.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-01-21Corrected fsf address in copyright.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>
2008-01-21Reformatted src/api.c.Bradley Smith
Signed-off-by: Bradley Smith <brad@brad-smith.co.uk>