summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_crawl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Make is_unavailable_god available to dlua.Neil Moore2014-08-011-0/+20
| | | | As crawl.unavailable_god("Jiyva")
* Remove stuffNicholas Feinberg2014-07-291-1/+1
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Add end.ccNicholas Feinberg2014-07-281-0/+1
|
* Create prompt.ccNicholas Feinberg2014-07-271-0/+1
|
* objstat: Item and monster generation statisticsgammafunk2014-06-251-0/+1
| | | | | | | | The -objstat command-line option will generate iterations of the given levels, compiling stats on every item and monster generated, and average the results over the iterations. It's only available in debug builds and uses the same map specification format as -mapstat. The default number of iterations is 100.
* Rename 'mesclr()' to 'clear_messages()'reaverb2014-06-221-63/+64
|
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* WhitespaceChris Oelmueller2013-12-141-1/+1
| | | | (cherry picked from commit 90afa1c4158637a5295dd5acd33c680158db0885)
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-3/+3
| | | | | | | | | Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
* More formatting fixes for return (...);Neil Moore2013-11-151-2/+2
|
* Reformat multi-line array literals.Adam Borowski2013-10-051-1/+2
|
* Cancel an american speling.Adam Borowski2013-08-241-3/+3
| | | | | | Looks like, unlike "target[t]ing" where a single t is used by many brits and even some aussies, "cancel[l]ing" has double l even for a good deal of americans.
* Make print_hint function non-static, and make it accessible in dlua.Eino Keskitalo2013-07-011-0/+2
| | | | It can now be used to quickly test hint messages from the database.
* Let vault code work normally during --mapstat and --test.Adam Borowski2013-06-211-1/+3
| | | | | Some layouts and vaults are lazy buggers who skip work during initial validation.
* Make list_opt = foo reset the list, not append.Neil Moore2013-05-261-13/+0
| | | | | | | We have been warning of the impending change since 0.11. Also remove the warn_list_append list and associated lua function, since it was used only to implement the aforementioned warning.
* Avoid use of gettimeofday() on Windows (not implemented on MSVC).Adam Borowski2013-05-151-9/+19
| | | | | | | Also, drop handling of an impossible error. A local variable on the stack is quite likely to be within the process' address space. And even for some reason (?!?) it'd be not, the very next line will give us a nice SIGSEGV anyway :)
* Don't give gettimeofday() an unused depreciated argument.Adam Borowski2013-05-151-2/+1
|
* Improve procedural functionalityPete Hurst2013-04-091-0/+39
|
* Allow crawl.millis() Lua call to be used on WindowsPete Hurst2013-04-021-7/+0
|
* Hush an -Og warning.Adam Borowski2013-03-291-2/+4
| | | | | | It's non-obvious that dims will never be more than 4. Even if at higher optimization numbers the compiler notices this, I as a human still failed to do so after first two readings.
* Add Lua exports for Simplex and Worley noise, and random_realPete Hurst2013-03-231-0/+73
| | | | | | | Lua API: - crawl.random_real() - crawl.worley(x,y,z) -> distance[0],distance[1],id[0],id[1],pos[0].x,pos[0].y,pos[0].z,pos[1].x,pos[1].y,pos[1].z - crawl.simplex(x,y,z,k) - z and k are optional if you only want 2D or 3D noise
* Remove unnecessary includes from header files.Jay3.14152012-10-231-0/+3
| | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* Fix crawl.split() crash (oops).Neil Moore2012-10-041-0/+1
|
* Allow prepending with listopt ^= foo.Neil Moore2012-10-041-1/+2
| | | | | | | | | | | | No documentation yet, and needs serious testing. For a few options*, this is slow: O((n+k)*k) where n is the length of the original list and k the number of new items. This could be fixed with some code code restructuring. [*] enemy_hp_colour, fire_order, message_colour, and the Lua-defined options runrest_ignore_message, runrest_stop_message, and runrest_ignore_monster.
* Make dumping via lua silent.elliptic2012-09-271-1/+1
|
* Lua wrap dump_char().elliptic2012-09-271-0/+4
|
* Add a lua call to check for touch UI.Raphael Langella2012-09-241-0/+12
| | | | Can be useful to share a config file between desktop and android version.
* Handle resetting, subtracting for Lua list options.Neil Moore2012-09-161-0/+35
| | | | | In particular, handle runrest_{ignore,stop}_message and runrest_ignore_monster{,_moving}.
* Use std namespace.Raphael Langella2012-08-261-9/+9
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Add a milestone for the first time each branch is exited.elliptic2012-08-221-1/+1
| | | | | | Only applies to branches with more than one level, so it shouldn't be too many milestones. In order to get oplace to work correctly, the report_origin_level argument to mark_milestone() was made slightly more flexible.
* Drop a bunch of parentheses from return statements.Adam Borowski2012-08-081-2/+2
| | | | | This is incomplete, partially because of me getting bored, partially because of doubts about the point of leaving simple addition/etc in parentheses.
* Massive style fix (braces, indentation, etc.)Neil Moore2012-08-011-0/+2
|
* Remove parentheses around return (simple_function_call).Adam Borowski2012-07-051-1/+1
| | | | For way too paranoid and underinclusive values of "simple".
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-68/+68
|
* clua: crawl.hints_type()Adam Borowski2012-06-281-0/+25
|
* Put tutorial messages for tutorial 5 into the database.Adam Borowski2012-06-281-0/+11
|
* Make is_tiles() available on the C++ side.Adam Borowski2012-06-221-7/+1
| | | | | | | | | | | | | | In webtiles, the same binary can run both, so this function returns whether this particular game is controlled from console or tiles (there may be spectators using either, possibly at the same time). Declared constexpr in other build modes, so if we ever turn on C++11ยน mode, they'll be as effective as #ifdefs. Without it, optimized builds may or may not eliminate code that depends on it, debug builds won't. [1]. While there are niceties like sane initialization of arrays, etc, FreeBSD and MacOS use truly ancient compilers, so C++11 is currently not an option.
* Remove spaces between function identifiers and arguments lists.Adam Borowski2012-06-211-1/+1
|
* Move dgn.mark_game_won() to crawl., it's not related to map generation.Adam Borowski2012-05-261-0/+3
|
* Don't let people in tutorial use clua to change their skills/etc.Adam Borowski2012-05-261-4/+4
| | | | At that point, it's probably time to merge these with non-tutorial calls.
* Drop pointless braces after else/else if as well.Adam Borowski2012-04-201-2/+0
|
* Drop pointless braces after if/for/while everywhere.Adam Borowski2012-04-201-2/+0
|
* A lua hook for div_rand_round.Raphael Langella2012-04-051-0/+3
|
* Let lua's crawl.is_tiles() know whether the controller plays tiles.Adam Borowski2011-12-161-1/+3
| | | | | In webtile-enabled builds, tile viewers can watch console games, console games can watch tiles, etc. Yet it's only the main player who counts.
* Add two clua functions.elliptic2011-11-251-0/+8
| | | | | | crawl.messages(n) returns the last n messages in your history. you.see_invisible() tells you whether you know that you can see invisible.
* Whitespace fixes.Adam Borowski2011-10-261-2/+2
|
* Merge branch 'luadoc'Samuel Bronson2011-10-241-3/+100
|\ | | | | | | | | Conflicts: crawl-ref/source/Makefile
| * Document a bit more of l_crawl.cc.Samuel Bronson2011-10-021-4/+28
| |
| * Start documenting l_crawl.cc.Samuel Bronson2011-10-021-1/+74
| |
* | Fix the skill menu for an experience card not showing up in Tiles.Florian Diebold2011-10-181-0/+1
|/ | | | | | | | | The (preliminary) skill training caused the title to be redrawn, which in turn made tiles switch to the normal layer (away from the menu). Redrawing of the title is now deferred to print_stats. This might fix #4755, but I couldn't reproduce the bug even before the fix.