summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libunix.cc
Commit message (Collapse)AuthorAgeFilesLines
* Default libunix curses scrolling to off.Robert Vollmert2009-11-291-9/+1
| | | | | There may have been some obscure reason for turning this on, but as far as I can tell it only causes problems.
* Simplify scrolling handling in message_out.Robert Vollmert2009-11-261-6/+7
| | | | | | | | | | The newline parameter to message_out is gone. Instead, a pointer to the message line is passed which may lie outside the message window. The window is then scrolled to make that line the last line. This also updates libnonunix.cc, but I haven't been able to test those changes.
* Only scroll if window is actually full.Robert Vollmert2009-11-261-4/+3
|
* Reorder message window scrolling.Robert Vollmert2009-11-261-3/+3
| | | | This should fix display of bottom message window line.
* only refresh when actually necessaryJesse Luehrs2009-11-211-7/+5
|
* Remove unused crawl_exit_hook.Robert Vollmert2009-11-201-6/+0
|
* Remove a few obsolete includes.Robert Vollmert2009-11-101-1/+0
| | | | Also add a few previously indirect includes.
* Split shouting and stealth code from view.cc.Robert Vollmert2009-11-101-0/+1
|
* Split up view.cc.Robert Vollmert2009-11-041-0/+1
|
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* Adding you.in_branch(string) as a lua function.Enne Walker2009-10-311-7/+0
| | | | | | This also removes you.where_are_you() so as not to require lua scripts to know the value of C++ enums. This change also fixes stricmp incorrectly falling through to strcmp on non-MSVC platforms.
* (void) the ncurses warnings away.Adam Borowski2009-10-271-4/+4
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* libunix.h: declare itoa and stricmp as extern "C", itoa returns char*Steven Noonan2009-10-101-3/+3
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Remove a lot of unneccessary includes.Robert Vollmert2009-10-091-1/+0
| | | | | | | The console version still compiles on Linux; both console and tiles version compile in OS X. I haven't been able to test the DOS and Windows compiles -- please fix or tell me about any errors that show up.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-3/+0
|
* Add spelling fixes.David Lawrence Ramsey2009-09-231-1/+1
|
* libunix.cc: remove textattr() from USE_TILE buildsSteven Noonan2009-09-231-0/+2
| | | | | | | | USE_TILE builds instead pay attention to the textattr macro. Leaving this function here causes a duplicate function declaration in such builds. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* libunix.cc: add forward declarations where neededSteven Noonan2009-09-231-0/+6
| | | | | | | unixcurses_{startup,shutdown}() and sighup_save_and_exit() were used before they were declared/defined. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Generalized solution to the "disconnect at --more--" problem (e.g., disconnectzelgadis2009-07-281-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | | at the more after "You have lost your religion!" to avoid the negative consequences of excommunication): when a HUP signal is received, instead of immediately saving the game, close the stdin stream, which will cause all of the Curses calls which normal block on key-presses to unblock, so that the code after a more() call will execute before the disconnected game is saved (which will happen in _input() in acr.cc). This only affects Curses (non-tiles/console) UNIX builds which have both USE_UNIX_SIGNALS and SIGHUP_SAVE defined. Exceptions to the above: * If HUP is received during a call to yesno() with safeanswer == 0, then the game will be saved immediately, since there's no way for the function to tell which answer is safe to give automatically. * If HUP is received while selecting the target for a controlled teleport then the teleport will be canceled, since otherwise a target other than the intended one might be the one under the cursor when the disconnect happened. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10443 c06c8d41-db1a-0410-9941-cceddc491573
* Apply my recent commits to trunk.j-p-e-g2009-06-151-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9984 c06c8d41-db1a-0410-9941-cceddc491573
* Remove tabs.dolorous2009-05-301-17/+17
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9852 c06c8d41-db1a-0410-9941-cceddc491573
* Add spacing fixes.dolorous2009-04-301-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9709 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2151183]: SIGHUP with the range view annotator active maintainedharanp2009-02-081-0/+6
| | | | | | | | | | | the annotated colours when saving. Fixed by adding the ability to store arbitrary exit hooks to be executed on (unusual) shutdown; for now they're executed FIFO, but it should probably be LIFO with a stack. Anyway the only thing that uses this now is the range view annotator. Oh, and it only works if you're using libunix.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8999 c06c8d41-db1a-0410-9941-cceddc491573
* Added castamir's patch to fix 2550022. Seems to work.haranp2009-02-031-27/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8885 c06c8d41-db1a-0410-9941-cceddc491573
* Put platform dependant crash handling code into crash-X.cc files, and linkzelgadis2009-01-221-154/+0
| | | | | | | against them in the make files like libunix/libgui/etc are. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8675 c06c8d41-db1a-0410-9941-cceddc491573
* Limit crash handling recursion to being commented upon just once.zelgadis2009-01-181-1/+6
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8544 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, forgot to put "#ifndef USE_TILE" around unixcurses_shutdown() (though itzelgadis2009-01-181-0/+2
| | | | | | | | probably doesn't make much difference if the game is in the process of crashing). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8536 c06c8d41-db1a-0410-9941-cceddc491573
* When dumping info upon a crash:zelgadis2009-01-181-6/+10
| | | | | | | | | | | | * For Unix builds, shut down curses in case the crash reporter can't open up a file and has to dump the crash directly to stderr. * Include all saved messages in the crash report. * Use EOL instead of \n or \r\n. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8535 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented crash data reporting, though it's only some stubs on Windows andzelgadis2009-01-181-0/+146
| | | | | | | | | | | | | | | | | | | | | | | DOS. On UNIX with USE_UNIX_SIGNALS defined, when any crash causing signal happens it will dump to a file the current crawl_state, anything caught by the items and monsters scans, and level building info if the crash happened during level generation. Also, if crawl is linked against the GNU C library (and the exectuable is in ELF format) it will dump the stack trace. The code attempts to automatically detect the presence of glibc, but that might not work on all systems. This should work on OS X, since there's an OS X man page for the glibc functions that get the stack trace. Don't know if it would work with MinGW. Actually getting function names for the stack trace requires the use of the "-rdynamic" linker option, which increases the size of the stripped executable by 27% (yikes!), but still prints the function names even when stripped. All of the function names in the stack trace are mangled C++ ones, but that shouldn't be too much of a problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8532 c06c8d41-db1a-0410-9941-cceddc491573
* Conditionalise define_key on ncurses as a token gesture to classic curses ↵dshaligram2009-01-101-0/+2
| | | | | | compatibility. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8381 c06c8d41-db1a-0410-9941-cceddc491573
* [2149330] Apply castamir's keypad patch.dshaligram2009-01-101-0/+85
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8380 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-16/+0
| | | | | | | | | | into a file crawlhistory.txt in docs/obsolete. I used a perl script to do this under the assumption that all these change logs used the same system following the keyword "Change History". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6930 c06c8d41-db1a-0410-9941-cceddc491573
* Enable core dumps automatically for dgamelaunch builds ↵dshaligram2008-09-131-0/+13
| | | | | | (-DDGL_ENABLE_CORE_DUMP) to make it easier to track down crashes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6912 c06c8d41-db1a-0410-9941-cceddc491573
* 0.4->trunk r6788: Fixed bug where start time of games would go backward or ↵dshaligram2008-08-071-0/+8
| | | | | | forward in time on dgl builds (oops). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6789 c06c8d41-db1a-0410-9941-cceddc491573
* Fix 1870427: Max hp misreported if frail and rotted.j-p-e-g2008-07-061-9/+9
| | | | | | | | | | Fix 2002931: feature_item_brand not working No, it's not the important bugs, but at least these are bugs I can reproduce. :P git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6433 c06c8d41-db1a-0410-9941-cceddc491573
* Add spelling fixes where possible: "gray" -> "grey".dolorous2008-07-041-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6381 c06c8d41-db1a-0410-9941-cceddc491573
* Apply patch 1888160: Missing langinfo.h for UNICODEj-p-e-g2008-04-141-17/+18
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4234 c06c8d41-db1a-0410-9941-cceddc491573
* Add a neutral monster brand (defaulting to darkgrey).j-p-e-g2008-03-211-6/+7
| | | | | | | | | | | | Of course we still need something like this for Tiles! Make Ctrl+Dir call close_door() if the square in question is a closed door. I've tested it, and found this change (suggested by dpeg) extremely convenient. Also fixed the information leak about an invisible monster blocking a doorway without time passing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3778 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed use_fake_cursor brokenness for DEC, fixed stringize_glyph mangling DEC ↵dshaligram2008-02-211-5/+7
| | | | | | if Crawl was built with Unicode support. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3452 c06c8d41-db1a-0410-9941-cceddc491573
* [1896775][1896772] Charset handling fixes (Paul Du Bois).dshaligram2008-02-211-44/+66
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3451 c06c8d41-db1a-0410-9941-cceddc491573
* Fix collision between gotoxy(int,int,int) and DOS djgpp gotoxy().dshaligram2008-01-251-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3337 c06c8d41-db1a-0410-9941-cceddc491573
* FR 1861017: add info on enchanting hides to enchant armour descriptionj-p-e-g2008-01-141-1/+1
| | | | | | | | | | | | | FR 1840678: upon failed sacrifice give hint on correct item class part of FR 1857701: Give a message when a weapon of returning does NOT return (and add a message_colour line in init.txt) Also, change Zin's donation messages to reflect the piety status the player will have once the piety pool has emptied into the actual piety, and modify descriptions of the good gods (by David). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3274 c06c8d41-db1a-0410-9941-cceddc491573
* Monsters get multilevel resists (incomplete). Monster data needs to bedshaligram2008-01-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | adjusted per monster to hand out the right resists. The current MR_RES_FIRE gives one level of resistance only. Added a real ghost structure, discarded the old ghost values array. Adjusted bones file format so bones will work out-of-the-box with Hearse. Breaks bones format, older bones will be rejected. Fixed some maps with bad DEPTHs. Added more safe answers in Y/N prompts, added a check to make it less likely that Crawl will spin in a tight loop reading input from a closed tty. (Experimental) !a will override existing foe of friendlies in LOS. Blademasters no longer pick up stuff to throw (Erik). Zombies of swimming things are also swimming things. Currently applies only to zombies explicitly placed in .des files, since fish zombies cannot be generated otherwise (can of worms). Morgue is now saved before showing the inventory and other boring end-of-game stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3231 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* Merged fix for IBM graphics glitches on Unix from 0.3 (2990-2991).dshaligram2007-12-031-2/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2992 c06c8d41-db1a-0410-9941-cceddc491573
* Add minor whitespace and comment fixes.dolorous2007-12-031-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2986 c06c8d41-db1a-0410-9941-cceddc491573
* Allow UNICODE_LOCALE=. in makefile.unix to specify a setlocale(LC_ALL,"") ↵dshaligram2007-11-201-2/+5
| | | | | | call instead of forcing a specific locale (adapted from Guus' Debian patch). Also fixed some makefile.unix checks to strip variables that are prone to trailing spaces. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2885 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed level-map not showing column 79 if the term is 80 columns (bobbens).dshaligram2007-11-021-0/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2723 c06c8d41-db1a-0410-9941-cceddc491573