summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/debug.h
Commit message (Collapse)AuthorAgeFilesLines
* Split up debug.ccMatthew Cline2009-11-061-93/+1
|
* Remove "called from:" comments.Vsevolod Kozlov2009-11-031-5/+0
| | | | | | These were of questionable use and freshness. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* debug.h: add #ifdef for __MSL__ macroSteven Noonan2009-10-131-0/+2
| | | | | | | I still don't know what this macro is, but '#if __MSL__' doesn't make any sense without it defined, so we can ifdef it out. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* platform detection: clean up abuse of '_MSC_VER' macroSteven Noonan2009-10-131-0/+2
| | | | | | | Use TARGET_COMPILER_VC instead, unless you need to find the Visual C++ version information. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* fix 'DEBUG' macro usage consistencySteven Noonan2009-10-131-3/+3
| | | | | | | | | | | | | Sometimes we were doing #if DEBUG and others we were doing #ifdef DEBUG. If we mix both, we have problems: If the DEBUG macro isn't defined, the statement '#if DEBUG' doesn't really make sense logically, because 'DEBUG' has no value. And if we '#define DEBUG 0', then the '#ifdef DEBUG's become true statements. The easiest fix is to swap out the #ifs with #ifdefs. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-2/+0
|
* * Also allow Maurice to steal the occasional spellbook or piece ofj-p-e-g2009-09-241-0/+1
| | | | | | | | | | | | | jewellery. * As per FR 1937144, leave a purple cloud if the player or a monster blinks or teleports away. For some reason this doesn't yet work correctly with scrolls of blinking, even though wizard blink (which uses the same function) does work. -- (from svn) Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
* Since fixed artefacts are going to be folded into unrandarts, and unrandartszelgadis2009-06-081-1/+1
| | | | | | | | | | | have already become almost identical to randarts, change "randart" to "artefact" everywhere except for things that deal exclusively with randarts. Artefact related files will be renamed later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9921 c06c8d41-db1a-0410-9941-cceddc491573
* Run some sanity checks when loading ghosts. If anything seems fishyj-p-e-g2009-05-261-2/+0
| | | | | | | | | | | | | | | | | | | | * don't load the ghost(s) * print an error message mentioning the bones file * don't delete the bones file, so players can attach it to a bug report The last point means that the player (or admin, in the case of the servers) has to delete a buggy bones file themselves, but the benefits of making tracking down bugs easier should outweigh that inconvenience. Add a new wizmode command that calls debug_stethoscope even if the game is not compiled in debugging mode. Also, Stone Soup 0.5 bones files are now officially incompatible with 0.4. (The changes to the spell ids cause ghosts casting spells to crash the game.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9832 c06c8d41-db1a-0410-9941-cceddc491573
* Apply minor fixes patch [2727286] by kotk, minus the sqldbm.h type dolorous2009-04-171-1/+1
| | | | | | | changes (as I have no way of testing them on multiple platforms). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9615 c06c8d41-db1a-0410-9941-cceddc491573
* Mutations cleanup. Fixes [2641583]. Syncing between the various listsharanp2009-02-261-1/+1
| | | | | | | | | | | | | is no longer necessary. However, holes in the mutation numbering will cause a crash (random2(NUM_MUTATIONS) is used in a few places.) Breaks saves badly, sorry. I tested this somewhat but some bugs might have slipped in. Fixes a few other bugs (e.g. draconians not having any messages if their wings disappear) and highlights some unused code (e.g. no way to get the stinger mutation.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9234 c06c8d41-db1a-0410-9941-cceddc491573
* Clean up wizard commands.haranp2009-01-301-10/+17
| | | | | | | Fix a bug in wizard-spawning monsters (max was used instead of min.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8852 c06c8d41-db1a-0410-9941-cceddc491573
* Move the monster dumping code from state.cc to debug.cc, and dump to stderr tozelgadis2009-01-281-0/+5
| | | | | | | reduce the need to pass a file pointer all over the place. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8837 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented crash data reporting, though it's only some stubs on Windows andzelgadis2009-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | DOS. On UNIX with USE_UNIX_SIGNALS defined, when any crash causing signal happens it will dump to a file the current crawl_state, anything caught by the items and monsters scans, and level building info if the crash happened during level generation. Also, if crawl is linked against the GNU C library (and the exectuable is in ELF format) it will dump the stack trace. The code attempts to automatically detect the presence of glibc, but that might not work on all systems. This should work on OS X, since there's an OS X man page for the glibc functions that get the stack trace. Don't know if it would work with MinGW. Actually getting function names for the stack trace requires the use of the "-rdynamic" linker option, which increases the size of the stripped executable by 27% (yikes!), but still prints the function names even when stripped. All of the function names in the stack trace are mangled C++ ones, but that shouldn't be too much of a problem. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8532 c06c8d41-db1a-0410-9941-cceddc491573
* Some wizard/debugging commands:zelgadis2008-12-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | * The &" command now shows the total experience value of all monster on the level. * &G now prevents dismissed monsters from dropping their original equipment, except for unrandarts and fixed arts. You can force the dismissed monsters to drop all of their non-summoned items by adding "keepitem" to the regexp string. * &R can now either change the random monster spawn rate for the current level, or immediately spawn a given number of random monsters. * &^D can be used to examine and alter player enchantments/durations. * The targeting command "S" can be used to turn a permanent monster into a summoned one. * The targeting command "~" can be used to polymorph a monster into one of a particular type. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7870 c06c8d41-db1a-0410-9941-cceddc491573
* Fixing compilation error.ennewalker2008-09-281-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7057 c06c8d41-db1a-0410-9941-cceddc491573
* Implement the first part of FR 2055862: Make the database search alsoj-p-e-g2008-09-271-0/+6
| | | | | | | | | | | | output AC/EV and damage/accuracy/speed for armour and weapons, respectively. Also, you can now wish for specific fixed and randarts in wizard mode via the 'o' command. (I was getting annoyed at always having to create all of them whenever I wanted to play around with the Singing Sword.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7048 c06c8d41-db1a-0410-9941-cceddc491573
* Remove pre-Stone Soup change history from source files, and push it allj-p-e-g2008-09-141-7/+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
* Massive overhaul to move towards coord_def().haranp2008-07-301-1/+2
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented monster spell miscasts. Spell miscasting is now handledzelgadis2008-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by the MiscastEffect class, which has helper methods to make most of the non-helper code agnostic with respect to whether the miscaster is the player or a monster. Mummy death curses now affect monsters, and Zot traps now directly affect friendly and good-neutral monsters. In wizard mode you can force the player or a monster to miscast by targeting it and pressing 'M'. Todo/issues/notes: * Clouds now have a killer_type in addition to a kill_category. * There aren't any divination monster miscast effects yet. * Many of the harmless message-only miscast effects are missing monster messages. * If a monster actually miscasts a spell (not getting a mummy death curse or setting off a Zot trap) and this kills both the monster and the player then the wrong monster will be listed in hiscore entry. Since monsters can't do true spell miscasts yet, this can wait. * There was old, non-functioning code making Zot traps heal, haste or turn invisible hostile monsters that triggered it. I fixed it and then commented it out. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6723 c06c8d41-db1a-0410-9941-cceddc491573
* [2026251] Fixed Elf:1 arrival sometimes being disconnected - the map used ↵dshaligram2008-07-241-0/+1
| | | | | | | | | | | ORIENT: south, but defined no exits. Fixed by applying the old floating vault exit behaviour to all vaults (apart from minivaults) so explicit @ exits are now optional. Also fixed maps being unable to place monsters on shallow water. Added debug_mons_scan to scan the mgrd for stranded monsters in fulldebug mode. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6659 c06c8d41-db1a-0410-9941-cceddc491573
* Large tiles-related changes. Platform-specific rendering removed and ↵ennewalker2008-07-151-0/+2
| | | | | | replaced with SDL/OpenGL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6550 c06c8d41-db1a-0410-9941-cceddc491573
* Remove unneeded methods (including the old resistance screen), renamej-p-e-g2008-06-121-84/+39
| | | | | | | debugging functions, and some other clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5757 c06c8d41-db1a-0410-9941-cceddc491573
* Implement pathfinding for monsters, using the A* algorithm.j-p-e-g2008-06-041-0/+1
| | | | | | | | | | | | | | | | It's not actually used anywhere yet, but I've implemented a wizmode testing function (x on monster, then 'w') that calculates the shortest path to any playerchosen destination on the level, and it seems to work quite well. The monsters tend to take zigzag paths but that should be easy enough to smooth out and in any case doesn't matter all that much since the player usually won't witness this. Oh, and though I tested the whole thing in a labyrinth, it went ridiculously fast! I'd rather doubted that but Darshan was completely right, as usually. :p Please don't remove the debugging output yet, I still need them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5476 c06c8d41-db1a-0410-9941-cceddc491573
* Add new wizard targeting command 'm', to move monsters around (or tozelgadis2008-06-021-0/+1
| | | | | | | | | | move the player like wizard blink if there's no monster at the chosen square). Two monsters can be made to swap positions, and unseen monsters/squares can be targeted. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5423 c06c8d41-db1a-0410-9941-cceddc491573
* Fix wizard mode being unable to create monsters of nonfloor habitat.j-p-e-g2008-06-011-1/+1
| | | | | | | | | | | | | | | | Changed labyrinth handling for minotaurs: Instead of being magic mappable, labyrinths are plain mappable. Yes, that makes everything much easier, but allowing magic mapping and yet you still have to trudge along by hand (rather than use autotravel) is worse. To make up for it, we might want to boost the monster minotaur (trying to defend its home against a rival?) Or we could just remove the difference altogether... Cleaned up debug.cc a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5401 c06c8d41-db1a-0410-9941-cceddc491573
* * Add a wizard function apply_monster_blessing to allow for easy testingj-p-e-g2008-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | of dolorous' fabulous blessing routines. * Allow the possibility of naming monsters: A monster's random name seed is stored in its number property, and the actual name gets picked from randname.txt. (Once this leaves the experimental stage I'll move them into a file of their own.) This means that monster types that already use number for something else (hydras for #heads, manticores for #spikes, or zombies for monster type) cannot be named. Use the new functions for naming orcs blessed by Beogh. Only non-generic orcs may get named, e.g. orcs promoted to priesthood or orc warriors that get their weapon enchanted. I tried to come up with a number of thematic orcish names, and if anyone would like to contribute, they're welcome to do so. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4586 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-0/+1
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [ 1902141 ] Documentation wrongpauldubois2008-03-021-2/+2
| | | | | | | | | | | | - changed number comments on a few enums - added a few COMPILE_CHECKs so they'll get caught Other: - Fix COMPILE_CHECK macro so it doesn't cause a warning in gcc. - Replace ASSERT(...) with COMPILE_CHECK(...) where possible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3501 c06c8d41-db1a-0410-9941-cceddc491573
* Add "item generations stats" (Ctrl-I) wizard command, which currentlyzelgadis2007-12-081-0/+1
| | | | | | | | | | | | | | only generates stats on items attained via acquirement. Move the acquirement logic of turning non-wearable headgear to wearable headgear from acquirement() to find_acquirement_subtype() so that it will happen before acquirement()'s can_wear_armour() check. The old way of doing it meant that players who couldn't wear helmets/helms had the armour acquirement chance for headgear reduced from the noraml 10% to around 1%. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3022 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, my "dismiss monsters by regex" change didn't take into account thatzelgadis2007-09-211-1/+1
| | | | | | | the "debug atuoexplore" debug command uses the dismiss-monsters command. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2169 c06c8d41-db1a-0410-9941-cceddc491573
* Identification overhaul part II. Okay, not really. ;)j-p-e-g2007-09-101-0/+1
| | | | | | | | Applying Matthew's latest patch (1789869): Identify items you see monsters use. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2068 c06c8d41-db1a-0410-9941-cceddc491573
* Implementing patch 1775415 (outsourcing monster speech) byj-p-e-g2007-09-041-0/+3
| | | | | | | | | | | zelgadis. Currently, shout.txt and speak.txt share in with the .des files in /dat. That should be changed, but I've no idea how to do this. Also implementing a bug fix by ennewalker (1787428). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2052 c06c8d41-db1a-0410-9941-cceddc491573
* Implemented patch 1773718 (improved wizard commands) andj-p-e-g2007-09-021-1/+2
| | | | | | | patch 1783003 (ímproved menu sorting), both by zelgadis. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2041 c06c8d41-db1a-0410-9941-cceddc491573
* Item class name is now "jewellery", not "jewelry" for consistency (David).dshaligram2007-08-091-0/+2
| | | | | | | Added &O command to show the number of turns used by explore to fully-explore the (reachable areas of) the current level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1983 c06c8d41-db1a-0410-9941-cceddc491573
* Added wizmode &L command to place a map on the current level by name. Thisdshaligram2007-07-281-0/+1
| | | | | | | | only really works for non-encompass vaults, and dungeon fixups are not applied (so random deep water -> shallow water conversion, auto-placement of water creatures, etc. will not happen). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1942 c06c8d41-db1a-0410-9941-cceddc491573
* &^X allows you to set experience level directly in wizmode.dshaligram2007-07-151-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1877 c06c8d41-db1a-0410-9941-cceddc491573
* Beogh balancing:dshaligram2007-07-121-0/+1
| | | | | | | | | | | | | | | - Cut Beogh's racial armour bonus. - Reduced weapon damage bonus by 50% at low piety. - Increased smiting food and piety cost. The piety cost may still be too low given how easy it is to gain Beogh piety. Tweaked monster generation, which had become too bland. Reintroduced shoal vault (onia_ninara_012_swampy_vault_shoal) which seems to work now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1844 c06c8d41-db1a-0410-9941-cceddc491573
* [1734352] Added checks in the dungeon builder to ensure vaults placed at thedshaligram2007-07-111-0/+2
| | | | | | | | | | end of level generation do not isolate parts of the level that were not already isolated. This does not apply to weird level-types such as Labyrinths and the Abyss. Added level veto stats to -mapstat output. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1831 c06c8d41-db1a-0410-9941-cceddc491573
* Added debugging code to generate multiple dungeons (all branches and levels)dshaligram2007-07-081-0/+8
| | | | | | | | | and gather statistics on maps used and Lua errors encountered. To use it, run "crawl -mapstat" with a full-debug build. Output will be mapgen.log in the current directory. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1805 c06c8d41-db1a-0410-9941-cceddc491573
* Added a debug card command.haranp2007-05-151-0/+2
| | | | | | | Documented some of the debug commands in the help. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1475 c06c8d41-db1a-0410-9941-cceddc491573
* Added wizmode command to simulate monster vs player combat (&^F).dshaligram2007-03-211-1/+1
| | | | | | | | | | | | Apply 4.1ish monster to-hit calculations. M_FIGHTER monsters get bonus to-hit. Split melee and beam to-hit calculations again. Melee to-hit is now largely 4.1ish, but uses randomised player evasion. Applied 4.1 unique rebalancing. Higher level uniques now hit harder and have more hp. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1074 c06c8d41-db1a-0410-9941-cceddc491573
* Modified wizmode &" and &~ commands so that you can jump to any level of anydshaligram2007-02-091-1/+1
| | | | | | | branch instead of only up and down in the current branch. Wizmode &d, &u remains unchanged, although you can also hit &"> and &"< to do the same thing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@946 c06c8d41-db1a-0410-9941-cceddc491573
* 'C' creates monsters on a targeted square in wizmode. 'D' kill-resets targeteddshaligram2006-12-061-1/+1
| | | | | | monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@582 c06c8d41-db1a-0410-9941-cceddc491573
* Merged stone_soup r15:451 into trunk.dshaligram2006-11-221-0/+6
| | | | 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/+147
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10 c06c8d41-db1a-0410-9941-cceddc491573