summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.h
Commit message (Collapse)AuthorAgeFilesLines
* [212] Fixing prompts clearing screen in tiles.Enne Walker2010-01-031-0/+1
| | | | | | | The line reader was always switching back to GOTO_CRT. When receiving input from the message window, this ended up causing the screen to blank and switch to the CRT layer. Adding a function get the current cursor region allows the line reader to not change regions.
* Fix bad varargs handling.Robert Vollmert2009-12-171-0/+1
| | | | You can't pass a va_list to a variadic function.
* Use snprintf() on DOS, we don't want crashes. Non-ancient compilers have it.Adam Borowski2009-12-171-4/+0
| | | | | Preferably, we would detect the presence of such functions, but _some_ folks oppose feature tests.
* cgotoxy now takes GotoRegion instead of int.Robert Vollmert2009-12-101-1/+1
|
* Add formatting fixes.David Lawrence Ramsey2009-11-211-2/+2
| | | | This mostly puts && and || on the proper lines, per the style guide.
* Remove AppHdr.h from header filesMatthew Cline2009-11-011-1/+0
| | | | | gcc precompiled headers didn't work properly if AppHdr.h was included in include files, or included twice.
* Adding you.in_branch(string) as a lua function.Enne Walker2009-10-311-0/+4
| | | | | | 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.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* libutil.cc: add escape_path_spaces()Steven Noonan2009-09-301-0/+2
| | | | | | | | Spaces need to be escaped in any system() calls, so we have this simple function which escapes spaces with either doublequotes (Windows style) or backslashes (UNIX style). Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Fix use of the serial comma.dolorous2009-02-121-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9050 c06c8d41-db1a-0410-9941-cceddc491573
* Tweak punctuation.dolorous2009-02-121-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9047 c06c8d41-db1a-0410-9941-cceddc491573
* Add arena_force_ai option (also settable as "force_ai" or "no_force_ai" in ↵dshaligram2009-01-031-0/+2
| | | | | | the arena spec) that when unset, uses the real game's monster AI, and when set, forces monsters to attack. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8160 c06c8d41-db1a-0410-9941-cceddc491573
* Show place as "Sewer" in the HUD and in character dumps for the sewer portal ↵dshaligram2008-11-181-0/+2
| | | | | | vaults (portal vault entry marker's dst field is used as the name). Portal vault entrance is replaced with stone arch on use. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7474 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fixes.dolorous2008-09-281-8/+8
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7054 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-5/+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
* Large tiles-related changes. Platform-specific rendering removed and ↵ennewalker2008-07-151-0/+22
| | | | | | replaced with SDL/OpenGL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6550 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
* [1801838] Use a menu to show mutation list so long lists don't scroll off ↵dshaligram2008-01-251-1/+2
| | | | | | the end of the terminal. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3331 c06c8d41-db1a-0410-9941-cceddc491573
* New Zot levels, courtesy Lemuel (David).dshaligram2008-01-121-0/+12
| | | | | | | | | | Added more control when specifying draconians in maps (any yellow draconian, green draconian knight, any nonbase red draconian, any base draconian, etc.). Fixed crash when dragon or draconian breathes and the player is unarmed. Replaced magic number 250 in monster creation with enum constant MONS_PROGRAM_BUG. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3253 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* [1849483] Warn player when fire_items_start option is blocking selection of ↵dshaligram2007-12-281-0/+11
| | | | | | | | | the only available missile (note that this doesn't entirely address the problem). [1852034] Added greedy_items option to explore_stop to force greedy explore to stop and announce even items that it plans to pick up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3137 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed bad messages when uniques are poisoned by toxic radiance.dshaligram2007-11-281-19/+0
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2927 c06c8d41-db1a-0410-9941-cceddc491573
* [1818799] Reduce message spam from Olgreb's toxic radiance.dshaligram2007-10-241-0/+29
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2535 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed segfault in explore discovery reporting (syllogism).dshaligram2007-10-021-3/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2295 c06c8d41-db1a-0410-9941-cceddc491573
* Can now search the description database by name (keyword) with '?/'.zelgadis2007-09-211-0/+7
| | | | | | | Not adding to 0.3-branch yet in case it needs some tweaks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2170 c06c8d41-db1a-0410-9941-cceddc491573
* Replaced timed markers with Lua markers. Breaks save compatibility.dshaligram2007-07-261-0/+3
| | | | | | KFEAT: feature names are now as in the dungeon_feature_type enum. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1930 c06c8d41-db1a-0410-9941-cceddc491573
* Allow monster symbols to be customised using the mon_glyph option.dshaligram2007-07-231-5/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1916 c06c8d41-db1a-0410-9941-cceddc491573
* Updated level-design.txt.dshaligram2007-07-211-0/+6
| | | | | | | | | | | Moved map markers to mapmark.cc. Added support for timer markers that remove a feature after a certain timeout. Need to hook up messaging to Lua. Added bazaars (need more bazaar layouts). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1899 c06c8d41-db1a-0410-9941-cceddc491573
* Force monsters generated with only a missile launcher to wield the launcherdshaligram2007-07-091-0/+1
| | | | | | when being generated (instead of switching to it before firing the first shot). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1816 c06c8d41-db1a-0410-9941-cceddc491573
* Debian 421212: remove superfluous semicolon that breaks build on gcc 4.3.dshaligram2007-07-061-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1772 c06c8d41-db1a-0410-9941-cceddc491573
* [1748837] Merge identical features when reporting explore discoveries, dshaligram2007-07-061-1/+6
| | | | | | distinguish between stairs and portals. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1770 c06c8d41-db1a-0410-9941-cceddc491573
* Manual update (David).dshaligram2007-07-031-0/+2
| | | | | | | | | | | Added javelins and sling bullets. Only Urug gets javelins at the moment. No monster gets sling bullets, but they can be randomly generated. Added deep elf blademasters and master archers to provide Silence-users some entertainment on Elf:7. I've adjusted the non-rogue-layout Elf:7s to use blademasters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1732 c06c8d41-db1a-0410-9941-cceddc491573
* Added support for a validation hook for maps to check if they're A-Ok.dshaligram2007-06-261-6/+12
| | | | | | | | | Tweaked savefile format (breaks saves) to allow the game to perform emergency saves if level-generation fails (followers are lost, needs to be fixed). [1743698] Re-refixed SP_ELF stub (Eino). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1659 c06c8d41-db1a-0410-9941-cceddc491573
* Allow glob patterns in KFEAT lines. For instance:dshaligram2007-06-241-12/+30
| | | | | | KFEAT: A = gate * Abyss git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1633 c06c8d41-db1a-0410-9941-cceddc491573
* Override loadfile and dofile in the Lua user-script interpreter so they have todshaligram2007-06-211-0/+2
| | | | | | | | use datafile_path, and cannot use shell metacharacters (not that it matters) and ../ paths. Multiple loading is not prevented; we could probably add another function that does that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1614 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental mouse support for ncurses (enable with mouse_input=yes indshaligram2007-06-201-141/+1
| | | | | | .crawlrc). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1610 c06c8d41-db1a-0410-9941-cceddc491573
* Remember choice of Beogh in character selection.dshaligram2007-06-141-2/+3
| | | | | | Some code reindenting and housekeeping. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1587 c06c8d41-db1a-0410-9941-cceddc491573
* sort_menus now allows the user to choose what menus to sort, and how todshaligram2007-05-311-0/+2
| | | | | | sort items, at the cost of obfuscating the sort_menus option massively. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1494 c06c8d41-db1a-0410-9941-cceddc491573
* Added new orc entries and vaults (Lemuel).dshaligram2007-05-281-0/+7
| | | | | | | | | | Added support to the map designer for specifying the monster-type for zombies, skeletons, simulacra and spectral things. Also allow specifying the number of heads for hydras ("12-headed hydra"). Fixed lexer rule bug (IDENTIFIER). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1490 c06c8d41-db1a-0410-9941-cceddc491573
* Allow */' to work in targeting (/+dir no longer selects a direction in Unix, Idshaligram2007-04-041-1/+2
| | | | | | | | can live with that). Upped monster MR slightly, weakened ensorcelled hibernation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1217 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up hiscores xlog format (suggested by Shawn Moore). Breaks compatbilitydshaligram2007-03-251-0/+4
| | | | | | with older xlogfiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1093 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up monster enchantments. Instead of the old enum abuse (ENCH_ABJ_I, II,dshaligram2007-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | etc.), enchantment is stored as a struct (ENCH_which, degree, whose_enchantment). This allows us to do such things as award experience for monsters poisoned by friends, or confused monsters bashing themselves or falling into lava (not implemented, but could be :-)). Doing monster_die() correctly is a little tricky for friendly-enchantment-deaths because the original monster may not be around to answer questions, so we fake the killer's stats for indirect friendly kills (which means that some gods may not award piety for minion-cast enchantments, f'r'instance). I think we can live with that for now. Breaks save file compatibility as usual. Clouds could also use similar treatment - poison clouds created by a friendly are not correctly tracked yet. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1075 c06c8d41-db1a-0410-9941-cceddc491573
* Added message_colour option to allow custom-colouring individual messages. Thisdshaligram2007-03-161-1/+7
| | | | | | | | | does not affect formatted_mpr. Moved low magic warning to the danger channel and added a message_colour option to colour it lightcyan in the stock init.txt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1050 c06c8d41-db1a-0410-9941-cceddc491573
* [1657502] Added use_fake_cursor option to make Crawl draw a cursor for Unixdshaligram2007-03-111-9/+6
| | | | | | | | | | | | terminals that cannot draw cursors on black spaces or darkgrey areas. May need some work, since the fake cursor tends to leave artifacts on the scrolling edge. Removed the +1 X offset to the viewport. Fixed crash when monster wielding a weapon of orc slaying hits player (Erik). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1016 c06c8d41-db1a-0410-9941-cceddc491573
* Kill hard tabs in .h files and crawl_options.txt.dshaligram2007-03-071-2/+2
| | | | | | Turn off mp_warning by default. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@990 c06c8d41-db1a-0410-9941-cceddc491573
* SYMBOL: is now obsolete in maps, replaced by SUBST:dshaligram2007-02-201-0/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@956 c06c8d41-db1a-0410-9941-cceddc491573
* Removed USE_NEW_RANDOM, USE_MACROS.dshaligram2007-01-251-4/+6
| | | | | | | | | | | | | Removed DOS_TERM, PLAIN_TERM special casery - all platforms get PLAIN_TERM. Better end-of-greedy-explore reporting for items on traps (Erik). Cleaned up find_travel_pos - moved guts of travel pathfinding to travel_pathfind class. Miscellaneous other stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@882 c06c8d41-db1a-0410-9941-cceddc491573
* Turn off autoprayer and autopickup if attacked by an invisible monster.dshaligram2007-01-091-1/+1
| | | | | | NOTE: autopickup is turned off only if safe_autopickup is enabled. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@817 c06c8d41-db1a-0410-9941-cceddc491573
* [1622126] Fixed shift+direction keys canceling the targeting prompt. Hopefullydshaligram2006-12-291-0/+5
| | | | | | this works on Windows and DOS, but I'm unsure. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@723 c06c8d41-db1a-0410-9941-cceddc491573
* Handle SIGHUP. Could use improvement, but it's a start.dshaligram2006-12-191-0/+17
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@673 c06c8d41-db1a-0410-9941-cceddc491573