| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Since its expansion called in_bounds().
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
These print the out-of-bounds coordinate as part of the assertion
message.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The syntax is ASSERTM(condition, text, args...)
Where text is the format string for an additional message to
be printed after the condition and file/line#, and args are
additional arguments with which to format the string.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These show up on gcc -Wextra, and in clang by default. These come from two
sources:
* us checking currently true cases that may change in the future
* clang narrowing enum types and then looking at the narrowed size
The latter is quite bogus, as an enum with < 128 values will break the
moment 128th value is added, something this assertion guards against.
In any case, assertions by definition are meant to catch stuff that
shouldn't happen, and if flow analysis proves it indeed can't happen,
that doesn't make the assertion less valuable.
After this commit, remaining warnings in -Wextra --std=c++11 in Crawl
proper (TODO: rltiles) are either compiler bugs (clang's: private field
'foo' is not used [-Wunused-private-field]) or annoying crap that can't
be disabled (gcc's: enumeral and non-enumeral type in conditional
expression [enabled by default]).
|
|
|
|
|
| |
We'd need some way to have a static_assert() without using C++11 that
doesn't spam warnings in the no failure case.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
I could just use the sizeof() trick everywhere, but:
* the old way produced a better message on gcc before 4.8 (it included the
words "compile_check")
* if C++11 has explicit support for this (static_assert()), we can use it
when building in that mode (not the default for Crawl)
|
|
|
|
|
| |
If we want them back for assertions, it'd be far better to save _before_
going into the crash handler.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This confuses people into thinking the error is there and that it's
important information that will help us find the crash's cause.
It'd be nice to know the real caller, but C++ doesn't give us that.
|
|
|
|
|
|
|
| |
"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.
|
| |
|
|
|
|
|
|
|
|
| |
It's what the old DEBUGSTR() did except for failing to be fatal in non-assert
builds.
Rationale: not aborting in known failure leads to further damage, and unlike
actual (conditional) assertions, there's no gain in skipping checks.
|
|
|
|
|
| |
It did resolve in __declspec(noreturn) which is used by the system headers
as well...
|
| |
|
|
|
|
|
|
|
| |
I use a similar include, but there's no reason to not have this properly
as a part of the project -- as others can benefit from it as well.
Something like this is needed for times such as debugging the save browser
or the text display itself.
|
|
|
|
|
|
|
| |
the game when the assert fails (doy).
ASSERT_SAVE is currently used only for term size checks, but it can be used any
place if it's known that the game is safe to save at that point.
|
|
|
|
| |
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
These were of questionable use and freshness.
Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Use TARGET_COMPILER_VC instead, unless you need to find
the Visual C++ version information.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7057 c06c8d41-db1a-0410-9941-cceddc491573
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
replaced with SDL/OpenGL.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6550 c06c8d41-db1a-0410-9941-cceddc491573
|