summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stuff.cc
Commit message (Collapse)AuthorAgeFilesLines
* Trim unnecessary #includes.Adam Borowski2010-01-131-1/+0
|
* Ignore obscured items in the UIStefan O'Rear2009-12-301-2/+2
| | | | I probably missed a few spots.
* Replace long debug message calls with dprf(), except for cases where a dumb ↵Adam Borowski2009-12-201-6/+3
| | | | | | compiler could call unnecessary functions. For paranoia, I left even any uses of std::string.
* Replace static snprintf() with make_sprintf() where the result is ↵Adam Borowski2009-12-171-3/+1
| | | | | | immediately cast to std::string.
* Disable cursor earlier on initialization.Robert Vollmert2009-12-061-0/+2
|
* Remove header includes from mon-place.h.Robert Vollmert2009-11-271-3/+8
|
* Remove unnecessary header-header includes.Robert Vollmert2009-11-271-0/+1
|
* Add ternary logic type maybe_bool.Robert Vollmert2009-11-241-0/+26
|
* Move silenced(pos) to areas.cc.Robert Vollmert2009-11-211-6/+1
|
* Possible fix for monsters in starting LOS.Robert Vollmert2009-11-161-4/+1
|
* Remove #include <conio.h> from all over the place. Convert COLORS to an enum.Adam Borowski2009-11-141-4/+0
|
* Make the radius_iterator do what it should.Robert Vollmert2009-11-121-1/+1
|
* An improved attempt at zapping monsters in starting LOS.Robert Vollmert2009-11-121-20/+11
| | | | | | | Now make sure that clouds don't temporarily block LOS to monsters in view of the starting position. It's possible that no clouds can exist at that point, but this is safer.
* Revert "Rewrite zap_los_monsters using monster_iter."Robert Vollmert2009-11-121-21/+33
| | | | This reverts commit a57747c0c0f207a2cb5bee3e4d576f1feb355f96.
* Rewrite zap_los_monsters using monster_iter.Robert Vollmert2009-11-121-33/+21
| | | | | Not sure it was broken before, but it's cleaner now. Also move tutorial item zapping into a separate function.
* stuff.cc: fix zap_los_monsters()Matthew Cline2009-11-111-3/+3
|
* Rename monspeak/monplace/monstuff to mon-speak/place/stuff.Jude Brown2009-11-121-2/+2
| | | | | I'm pretty sure I've managed to replace every instance of a reference to these files, so I hopefully haven't missed anything.
* Remove a few obsolete includes.Robert Vollmert2009-11-101-2/+0
| | | | Also add a few previously indirect includes.
* Split shouting and stealth code from view.cc.Robert Vollmert2009-11-101-0/+2
|
* Brief crash output for exit() crashesMatthew Cline2009-11-101-0/+7
| | | | | | | | If a crash happens while exit() callbacks are being processed then just output a bare minimum of info to stderr, since anything we might want to reference would likely have been free'd, and we don't want to reference free'd memory (plus information about the player, level and monsters probably won't be of any help in tracking down a crash of that kind).
* Remove option draw_it from viewwindow.Robert Vollmert2009-11-091-1/+1
| | | | | | The only use was just removed. Also move the draw check closer to where it's used.
* Remove player.h dependency from coordit.h.Robert Vollmert2009-11-081-1/+1
| | | | | | | | | adjacent_iterator had a default center of you.pos(), which is now gone (also the uses of). I was running into circular header dependencies with actor.h including los_def.h including coordit.h including player.h including actor.h.
* Get rid of env.show_los.Robert Vollmert2009-11-071-1/+1
|
* Move mons_is_friendly to monsters::friendly.Vsevolod Kozlov2009-11-061-3/+3
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-1/+1
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Extract morgue file time formatting into make_file_time.Robert Vollmert2009-11-061-0/+17
|
* Split up view.cc.Robert Vollmert2009-11-041-0/+2
|
* Get rid of multiple-meaning "int object" in env.show.Robert Vollmert2009-11-041-1/+1
| | | | | | | | | | | | | env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects.
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* Splitting up stuff.cc.Robert Vollmert2009-10-301-848/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* win32: eliminate need for WIN32TILES/WIN32CONSOLE macrosSteven Noonan2009-10-191-3/+5
| | | | | | | | | | | | | | Instead of defined(WIN32CONSOLE) we should use: defined(TARGET_OS_WINDOWS) && !defined(USE_TILE) As well as replace defined(WIN32TILES) with: defined(TARGET_OS_WINDOWS) && defined(USE_TILE) Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* More renaming and reorganization of feature checks.Robert Vollmert2009-10-171-1/+1
| | | | | | | | | There were a couple of functions is_something(dgn_feature_type feat) defined in travel.cc that were otherwise independent of travel. For consistency, move these to terrain.cc and rename to feat_is_something. One might also consider renaming the various feat_is_whatever functions to just is_whatever.
* Naming consistency.Robert Vollmert2009-10-171-1/+1
| | | | | Mostly rename functions from terrain.h that accept features of typ dgn_feature_type from grid_is_* to feat_is_*.
* Globally replace see_grid by see_cell.Robert Vollmert2009-10-171-2/+2
|
* Get rid of los_param outside of los.cc/losparam.cc.Robert Vollmert2009-10-161-1/+1
| | | | | | | | | | | The nicer interface to losight is now void losight(env_show_grid& sh, const coord_def& center, const opacity_func &opc = opc_default, const bounds_func &bds = bds_default); bounds_func provides the LOS boundary (usually just a circle with radius the current LOS radius). opacity_func is a mapping of grid coordinates to opacity values.
* stuff.cc: end() can output bigger messagesMatthew Cline2009-10-161-1/+1
| | | | Made end()'s buffer[] 1K long, so that end() can output long messages.
* Rename Summon Wraiths to Haunt everywhere, for consistency, and adjustDavid Lawrence Ramsey2009-10-131-1/+1
| | | | the tiles accordingly.
* project-wide: implement use of platform.h detection macrosSteven 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.
* Convert remaining uses of losight to los_param-style.Robert Vollmert2009-10-081-1/+1
|
* Split LOS code from view.cc.Robert Vollmert2009-10-081-0/+1
| | | | | | | | | los.cc: basic raycasting algorithm; losight(), see_grid() etc. ray.cc: ray_def implementation. mon-los.cc: monster_los This includes adding a bunch of #includes; there's probably some obsolete includes of view.h now.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* Harden the PRNG for public servers.Mikko Juola2009-10-011-1/+41
| | | | | | Detailed discussion is here: http://www.genodeen.net/index.clua?cwrng Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
* Set up a basic testing framework for LOS. ./crawl -test with a full debug ↵Darshan Shaligram2009-09-241-1/+2
| | | | build will run the test.
* Add spelling fixes.David Lawrence Ramsey2009-09-231-2/+2
|
* Allow vaults to request use of the acquirement code with "acquire ↵dshaligram2009-09-211-1/+1
| | | | | | <item_class>" or "acquire:<god> <item_class>" in item specs (due). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10765 c06c8d41-db1a-0410-9941-cceddc491573
* Implement part of [2837033]: Randomize colors, resistances, and attack dolorous2009-09-181-0/+16
| | | | | | | | types/flavors for ugly things. They now use the ghost_demon struct, expanded to account for these characteristics. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10709 c06c8d41-db1a-0410-9941-cceddc491573
* Generalized solution to the "disconnect at --more--" problem (e.g., disconnectzelgadis2009-07-281-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Tweak Shoals algorithm to place the islands a bit more central and away from j-p-e-g2009-07-141-5/+5
| | | | | | | | | | | | | | | the border (so they're not cut off anymore). Also add a new feature type DNGN_OPEN_SEA that is an impassible feature only intended for the Shoals border. Will need special handling for confusion, I guess. I've also tweaked the level generation, so Shoals vaults don't need to be connected anymore (the algorithm just adds superfluous floor corridors), but I still get loads of corridors on the bottom level - frustratingly enough only inside the map border, and they (usually) don't even contain any stairs or other features. It's maddening! git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10213 c06c8d41-db1a-0410-9941-cceddc491573