summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/cluautil.h
Commit message (Collapse)AuthorAgeFilesLines
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-2/+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.
* Allow specifying layout_chaotic_city material type from LuaPete Hurst2013-05-051-1/+2
| | | | Previously this couldn't be done so materials would be random in Dis.
* Use std namespace.Raphael Langella2012-08-261-2/+2
| | | | | | | | | | | | | 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.
* Make inline functions static.Adam Borowski2012-08-091-3/+3
| | | | | | | | | This avoids unnecessary non-inlined copies. Also, we had a few large functions that had no reason for inlining, let's have them be regular ones. I also made "static inline" always use the same order, for easier grepping.
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-7/+7
|
* Make a bunch of functions static or gone.Adam Borowski2012-06-231-1/+0
|
* Kill some longs.Adam Borowski2012-05-261-1/+1
| | | | | | In portable code, basically every use of long or %ld/%lu/%lx is a bug. A legitimate use in Crawl is the bit array: storing it in-memory should be preferably done a word at a time.
* Make tileidx_t 64 bits long.Florian Diebold2012-05-241-1/+1
|
* Merge branch 'master' into portal_branchesAdam Borowski2012-04-251-1/+4
|\
| * Return multiple items from items.get_items_at().Neil Moore2012-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Like full_describe_view(), we get the extra items from the stash tracker; on untracked levels we can get only the top. Difficulties arise because the stash tracker returns item_defs on the stack where they cannot safely be pointed to. To handle this properly, item_wrapper gains a new boolean member indicating whether the item_def is a temporary copy (as opposed to an element of mitm, for example); a new C function clua_push_item_temp() allocates a copy of an item_def and creates such a wrapper. If the temporary flag is true, the item_def will be freed when the wrapper is GCed.
| * Fix an evil macro masquerading like a function call but not behaving like one.Adam Borowski2012-04-201-1/+3
| |
* | Merge branch 'master' into portal_branchesAdam Borowski2011-11-191-1/+1
|\|
| * Hush a warning.Adam Borowski2011-11-151-1/+1
| |
* | Get rid of level_type, unify BRANCH_*, LEVEL_* and portal vaults.Adam Borowski2011-11-041-9/+5
|/
* Make file headers doxygen-friendly, drop useless fields.Adam Borowski2011-03-281-4/+4
| | | | | | | "File:" is shown in your editor's status bar. "Written by:" was used only for the first person who changed a file. We got git for that now, and pre-DCSS history is so woefully inaccurate it doesn't really matter.
* Massive spacing fixes: "( spaces after parentheses )".Adam Borowski2010-10-151-6/+6
| | | | | | I did review it manually to find places where they made sense (like some tables), but for a massive sed job like this there might be places that I missed.
* Rename class "monsters" to "monster".Robert Vollmert2010-09-051-3/+3
|
* Allow corpses to be placed in .des files.Darshan Shaligram2010-06-221-0/+2
| | | | | | | | | | | Add item property CORPSE_NO_DECAY to disallow decay on corpses/skeletons/chunks. Wizmode &% now creates an item using the .des file item name parser; &o remains the old wizmode item-gen command. Corpse decay for corpses placed by maps can be controlled using dgn.delayed_decay.
* Make MonsterWrap and friends accessible to other files.Robert Vollmert2010-02-131-1/+7
|
* Fix stash-tracker item annotations and restrict user scripts to access items ↵Darshan Shaligram2010-01-241-1/+1
| | | | only on the same turn the items were wrapped for Lua by the core C++ code.
* Convert items Lua library to use metatable. May case end-user issues.Jude Brown2010-01-241-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the monster library, the item library now uses a metatable to store its functions. Instead of using lightuserdata, as before, and passing this to the different item.* functions, the functions are now members of the actual item. The item library has also been renamed to "items": this allows for its use in Vault definitions without it clashing with the item specifier and dgn.item function. Example: * Previously, you would use: local x = item.inventory()[1] print(item.name(x, false)) * Now, you would use: local x = items.inventory()[1] print(x.name(false)) This will have an impact on end-user scripts that use the old version of the item library. I have already updated the uses of the items library in the dat/lua scripts, as well as vault definitions and marker definitions. I think I've caught them all. There may be bugs or issues, but hopefully that's everything. (Does cause issues with annotations such as {artefact}, will be fixed shortly.)
* Fix Shoal:$ generation bugs: stairs could be surrounded by deep water, hut ↵Darshan Shaligram2010-01-051-2/+6
| | | | | | entrances could be blocked by rock. shoal-hut.lua test generates 1k Shoal:$ levels and verifies that the levels pass sanity tests.
* Lua builder funcs act on map_lines, not grd.Enne Walker2009-11-021-1/+3
| | | | | | | This lets regular vaults use the same Lua functions that layout vaults do. Convert functions in l_dgnbld that acted on grd. Update layout vaults to use these new functions. Also, remove l_dgn_bf, as all of its functionality is now in l_dgnbld.
* lmark.synchronized_markers(): apply one marker's effects to multiple points ↵Darshan Shaligram2009-10-311-1/+17
| | | | | | | | | | | | | | | simultaneously. synchronized_markers() takes a marker, and a list of method names to override, and returns a set of markers that fire simultaneously, to allow, say, fog machines that fire at random intervals, but always fire in unison. lm_mslav.lua has details. volcano.des has an example volcano entry vault that uses this. Allow fetching a list of Lua markers/marker positions by property value. Renamed dgn.find_marker_prop -> dgn.find_marker_position_by_prop. s/helper/listener/ for fog machine listeners.
* Add lua binding for inspecting env.show.Robert Vollmert2009-10-271-0/+3
|
* Move more utility code from dlua to cluautil.Robert Vollmert2009-10-211-0/+2
|
* Move userdata templates to cluautil.h.Robert Vollmert2009-10-211-1/+80
|
* Move clua_register_metatable to cluautil.Robert Vollmert2009-10-211-1/+11
|
* Move more macros and functions to cluautil.cc.Robert Vollmert2009-10-211-1/+63
|
* Move utility functions from clua.cc to cluautil.cc.Robert Vollmert2009-10-211-0/+22
cluautil.cc should eventually contain all of the functions for passing objects from and to lua, at least the shared ones. Also cut down on clua.cc include list.