summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/macro.cc
Commit message (Collapse)AuthorAgeFilesLines
* Apply tutorial fixes as well as the macro/wininit path to 0.4.j-p-e-g2008-07-081-7/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6448 c06c8d41-db1a-0410-9941-cceddc491573
* For functions that return char*'s, don't return a c_str() of an dolorous2008-06-251-4/+4
| | | | | | | | | | | | | | | std::string, since as soon as the function returns, the std::string goes out of scope, and the c_str() becomes a dangling pointer, which usually points to the same area as before, but occasionally points to garbage. Instead, make them return std::string's, and call c_str() on the return value outside the functions. Among other things, this should fix [1999515]. Note that I've only fixed direct c_str() returns for now. There might be some indirect ones that I missed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6139 c06c8d41-db1a-0410-9941-cceddc491573
* [1909218] Fixing issue where keymaps were affecting menu choices done by ↵ennewalker2008-06-121-2/+4
| | | | | | | | | keyboard or through the tiles mouse interface. I couldn't think of any reason why keymaps should ever apply to menu selections (and certainly not the KC_DEFAULT map), so I added a new special keymap context called KC_NONE which doesn't apply keymaps to new input. This is used for all menus. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5739 c06c8d41-db1a-0410-9941-cceddc491573
* Another code cleanup.j-p-e-g2008-04-151-20/+29
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4244 c06c8d41-db1a-0410-9941-cceddc491573
* Another one of those pesky spacing changes.j-p-e-g2008-04-151-91/+91
| | | | | | | | One of these days Crawl *will* win the Cleanest Code Championship, just you wait... :p git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4242 c06c8d41-db1a-0410-9941-cceddc491573
* [1896152] Fixed infinite loops when repeating commands (the repeat buffer ↵dshaligram2008-03-311-19/+3
| | | | | | was seeing keys not intended for the command being repeated). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3975 c06c8d41-db1a-0410-9941-cceddc491573
* For 1909388: command key changespauldubois2008-03-101-5/+19
| | | | | | | | | | Added init.txt option additional_macro_file, which does what you expect. Macros are read after the player's macro.txt. Documented new option. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3565 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed macro bug reported on the antichri^W^W Windows Vista.dshaligram2008-01-121-29/+9
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3254 c06c8d41-db1a-0410-9941-cceddc491573
* Tiles!ennewalker2008-01-051-1/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3194 c06c8d41-db1a-0410-9941-cceddc491573
* Attempt to fix [1850593] by reverting r3020, as getch_ck() acts dolorous2007-12-141-1/+1
| | | | | | | differently under Windows and Unix-line systems. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3063 c06c8d41-db1a-0410-9941-cceddc491573
* Use c_getch() instead of m_getch() in getch_mul(), as the translation dolorous2007-12-071-1/+1
| | | | | | | | | provided by c_getch() makes Ctrl-H act as expected on Unix-like terminals where Ctrl-H returns KEY_BACKSPACE, instead of producing the "Unknown command." message. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3020 c06c8d41-db1a-0410-9941-cceddc491573
* Input buffer needs to be flushed if the first iteration of commandzelgadis2007-09-191-1/+1
| | | | | | | | | | | repetition is canceled. Repetitions of searching and go-nowhere weren't being interrupted. Wasn't generating activity interrupts for AI_FULL_MP and AI_FULL_HP. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2150 c06c8d41-db1a-0410-9941-cceddc491573
* Added new commands "re-do previous command" (bound to `) and "repeatzelgadis2007-09-191-9/+184
| | | | | | | | | | next command" (bound to 0). Though this is just an interface change, it changes code in the core input processing function (input() in acr.cc), and also messes around with the input buffer, so it could probably do with more testing before merging it into the 0.3 branch. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2137 c06c8d41-db1a-0410-9941-cceddc491573
* Split off portions of externs.h and enum.h into other files. Thezelgadis2007-09-151-0/+1
| | | | | | | | | | | | | crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
* 1622385: there is now a Confirm keymap context for yesno() andharanp2007-07-021-5/+14
| | | | | | | yesnoquit(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1714 c06c8d41-db1a-0410-9941-cceddc491573
* Experimental mouse support for ncurses (enable with mouse_input=yes indshaligram2007-06-201-10/+7
| | | | | | .crawlrc). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1610 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed broken macros on Windows (Erik).dshaligram2007-06-091-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1565 c06c8d41-db1a-0410-9941-cceddc491573
* Flush macro input buffer when fire command fails (Erik).dshaligram2007-06-081-36/+117
| | | | | | | | | Allow using the special sequence \{!more} in macros to disable -more- prompts while processing the macro expansion. Fixed a couple of off-by-one errors in the level-map. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1557 c06c8d41-db1a-0410-9941-cceddc491573
* Allow Mac users to double-click to launch Crawl:dshaligram2007-05-041-1/+1
| | | | | | | | | - Use argv[0] to figure out where Crawl lives and where to find data files. The Mac Finder sets the working directory to / and the full path to the executable is available in argv[0] when the user double-clicks. - Converted some of the old char*s to std::string. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1407 c06c8d41-db1a-0410-9941-cceddc491573
* Cleaned up a lot of code which was using info[] to use mprf() directlyharanp2007-04-231-13/+8
| | | | | | | | | instead. Fixed a bug with affix_weapon_enchantment messaging (mea culpa.) Fixed shatter() messages getting surpressed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1347 c06c8d41-db1a-0410-9941-cceddc491573
* Tweaked to allow building without CLUA_BINDINGS, but allowingdshaligram2007-04-161-2/+0
| | | | | | Lua-conditionalised search patterns. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1320 c06c8d41-db1a-0410-9941-cceddc491573
* Added #ifdef to allow compatibility with the old -macro <file> option. Thisdshaligram2007-04-021-2/+6
| | | | | | | option is restricted to dgamelaunch because it has security issues if used with the traditional multiuser setuid/setgid install. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1187 c06c8d41-db1a-0410-9941-cceddc491573
* Added DGL_NAMED_MACRO_FILE option to make life easier for dgamelaunch to keepdshaligram2007-04-011-1/+5
| | | | | | user macro files distinct (paxed). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1168 c06c8d41-db1a-0410-9941-cceddc491573
* Removed USE_NEW_RANDOM, USE_MACROS.dshaligram2007-01-251-3/+0
| | | | | | | | | | | | | 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
* Added morgue_dir as an init.txt option.dshaligram2006-12-291-4/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@718 c06c8d41-db1a-0410-9941-cceddc491573
* Added -morgue option to specify where morgues are saved.dshaligram2006-12-151-4/+3
| | | | | | | Added -macro option to specify location of macro file. Morgue files are named morgue-<cname>-<time>.txt, provided Crawl is compiled without SHORT_FILE_NAMES. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@637 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-6/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up a mistake in the SVN import.nlanza2006-08-131-0/+731
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573