summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-12-08 20:01:36 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-01-26 00:40:18 +0100
commit35673f843b19d211fb492608a273e56671cdc18b (patch)
tree48897bdb515e358dc737aae98b931fd24c3093f6 /crawl-ref/source/externs.h
parent3618f7815284163bd5c1f73f388dba0e83a95268 (diff)
downloadcrawl-ref-35673f843b19d211fb492608a273e56671cdc18b.tar.gz
crawl-ref-35673f843b19d211fb492608a273e56671cdc18b.zip
Restore save compatibility with 0.11 final.
This does not include trunk versions older than some time after 0.11 branching, although you can upgrade such saves in two steps, by loading in 0.11 and then in current trunk. I doubt this will lead to any troubles as 0.10 saves are not compatible anyway.
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index bedb0afa14..5706fe3d97 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -281,6 +281,24 @@ static inline monster_type operator++(monster_type &x)
return x;
}
+static inline monster_type operator--(monster_type &x)
+{
+ x = static_cast<monster_type>(x - 1);
+ return x;
+}
+
+static inline spell_type operator++(spell_type &x)
+{
+ x = static_cast<spell_type>(x + 1);
+ return x;
+}
+
+static inline spell_type operator--(spell_type &x)
+{
+ x = static_cast<spell_type>(x - 1);
+ return x;
+}
+
struct cloud_struct
{
coord_def pos;