summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-14 03:50:17 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-14 03:50:17 -0800
commit704b61fedeafc27485cbe688b135b3f8ebd00955 (patch)
treee8e7663cd070b31c2b0d5f8189f6de1adb0d6e24 /crawl-ref/source
parent843ae0761b1d04d05208b0a74d9d721e6ebbaeb5 (diff)
downloadcrawl-ref-704b61fedeafc27485cbe688b135b3f8ebd00955.tar.gz
crawl-ref-704b61fedeafc27485cbe688b135b3f8ebd00955.zip
Reset tag_minor_version to 0
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/exclude.cc7
-rw-r--r--crawl-ref/source/store.cc6
-rw-r--r--crawl-ref/source/tags.cc86
-rw-r--r--crawl-ref/source/tags.h15
4 files changed, 27 insertions, 87 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc
index 416fff369b..25728fe67a 100644
--- a/crawl-ref/source/exclude.cc
+++ b/crawl-ref/source/exclude.cc
@@ -406,11 +406,8 @@ void unmarshallExcludes(reader& inf, char minorVersion, exclvec &excludes)
const int radius = unmarshallShort(inf);
bool autoexcl = false;
monster_type mon = MONS_NO_MONSTER;
- if (minorVersion >= TAG_ANNOTATE_EXCL)
- {
- autoexcl = unmarshallBoolean(inf);
- mon = static_cast<monster_type>(unmarshallShort(inf));
- }
+ autoexcl = unmarshallBoolean(inf);
+ mon = static_cast<monster_type>(unmarshallShort(inf));
excludes.push_back(travel_exclude(c, radius, autoexcl, mon));
}
}
diff --git a/crawl-ref/source/store.cc b/crawl-ref/source/store.cc
index f52a97d510..df8f5b345c 100644
--- a/crawl-ref/source/store.cc
+++ b/crawl-ref/source/store.cc
@@ -1329,12 +1329,6 @@ void CrawlHashTable::read(reader &th)
if (_size == 0)
return;
- if (th.getMinorVersion() < TAG_MINOR_SMALL_HASH)
- {
- unmarshallByte(th);
- unmarshallByte(th);
- }
-
init_hash_map();
for (hash_size i = 0; i < _size; i++)
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 017a4d2db4..72c792dbbb 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1356,8 +1356,7 @@ static void tag_read_you(reader &th, char minorVersion)
you.religion = static_cast<god_type>(unmarshallByte(th));
- if (minorVersion >= TAG_MINOR_JIYVA)
- you.second_god_name = unmarshallString(th);
+ you.second_god_name = unmarshallString(th);
you.piety = unmarshallByte(th);
you.rotting = unmarshallByte(th);
@@ -1369,14 +1368,11 @@ static void tag_read_you(reader &th, char minorVersion)
you.where_are_you = static_cast<branch_type>( unmarshallByte(th) );
you.char_direction = static_cast<game_direction_type>(unmarshallByte(th));
- if (minorVersion >= TAG_MINOR_ZOT_OPEN)
- you.opened_zot = (bool) unmarshallByte(th);
+ you.opened_zot = (bool) unmarshallByte(th);
- if (minorVersion >= TAG_MINOR_JELLY)
- you.royal_jelly_dead = (bool) unmarshallByte(th);
+ you.royal_jelly_dead = (bool) unmarshallByte(th);
- if (minorVersion >= TAG_MINOR_TRANS)
- you.transform_uncancellable = (bool) unmarshallByte(th);
+ you.transform_uncancellable = (bool) unmarshallByte(th);
you.your_level = unmarshallByte(th);
you.is_undead = static_cast<undead_state_type>(unmarshallByte(th));
@@ -1411,8 +1407,7 @@ static void tag_read_you(reader &th, char minorVersion)
you.intel = unmarshallByte(th);
you.dex = unmarshallByte(th);
- if (minorVersion >= TAG_MINOR_JIYVA)
- you.last_chosen = (stat_type) unmarshallByte(th);
+ you.last_chosen = (stat_type) unmarshallByte(th);
you.hit_points_regeneration = unmarshallByte(th);
you.magic_points_regeneration = unmarshallByte(th);
@@ -1509,17 +1504,14 @@ static void tag_read_you(reader &th, char minorVersion)
you.demon_pow[j] = unmarshallByte(th);
}
- if (minorVersion >= TAG_MINOR_DSTRAITS)
+ count_c = unmarshallByte(th);
+ you.demonic_traits.clear();
+ for (j = 0; j < count_c; ++j)
{
- count_c = unmarshallByte(th);
- you.demonic_traits.clear();
- for (j = 0; j < count_c; ++j)
- {
- player::demon_trait dt;
- dt.level_gained = unmarshallByte(th);
- dt.mutation = static_cast<mutation_type>(unmarshallShort(th));
- you.demonic_traits.push_back(dt);
- }
+ player::demon_trait dt;
+ dt.level_gained = unmarshallByte(th);
+ dt.mutation = static_cast<mutation_type>(unmarshallShort(th));
+ you.demonic_traits.push_back(dt);
}
// how many penances?
@@ -1576,26 +1568,11 @@ static void tag_read_you(reader &th, char minorVersion)
mprf(MSGCH_ERROR, "Failed to load Lua persist table: %s",
dlua.error.c_str());
- if (minorVersion < TAG_MINOR_GITREV)
- {
- std::string rev_str = unmarshallString(th);
- int rev_int = unmarshallLong(th);
-
- UNUSED(rev_str);
- UNUSED(rev_int);
- }
-
- if (minorVersion >= TAG_MINOR_GITREV)
- {
- std::string rev_str = unmarshallString(th);
- UNUSED(rev_str);
- }
+ std::string rev_str = unmarshallString(th);
+ UNUSED(rev_str);
- if (minorVersion >= TAG_MINOR_YOU_PROP)
- {
- you.props.clear();
- you.props.read(th);
- }
+ you.props.clear();
+ you.props.read(th);
}
static void tag_read_you_items(reader &th, char minorVersion)
@@ -1748,12 +1725,8 @@ static void tag_read_you_dungeon(reader &th, char minorVersion)
unmarshall_level_pos, unmarshallByte);
unmarshallMap(th, level_annotations,
unmarshall_level_id, unmarshallStringNoMax);
-
- if (minorVersion >= TAG_ANNOTATE_EXCL)
- {
- unmarshallMap(th, level_exclusions,
- unmarshall_level_id, unmarshallStringNoMax);
- }
+ unmarshallMap(th, level_exclusions,
+ unmarshall_level_id, unmarshallStringNoMax);
PlaceInfo place_info = unmarshallPlaceInfo(th);
ASSERT(place_info.is_global());
@@ -2351,11 +2324,8 @@ void unmarshallMonster(reader &th, monsters &m)
if (mons_is_ghost_demon(m.type))
m.set_ghost(unmarshallGhost(th, _tag_minor_version));
- if (_tag_minor_version >= TAG_MINOR_MON_PROP)
- {
- m.props.clear();
- m.props.read(th);
- }
+ m.props.clear();
+ m.props.read(th);
m.check_speed();
}
@@ -2597,10 +2567,7 @@ static void unmarshallResists(reader &th, mon_resist_def &res,
res.asphyx = unmarshallByte(th);
res.acid = unmarshallByte(th);
res.sticky_flame = unmarshallByte(th);
-
- if (minorVersion >= TAG_MINOR_ROTTING)
- res.rotting = unmarshallByte(th);
-
+ res.rotting = unmarshallByte(th);
res.pierce = unmarshallByte(th);
res.slice = unmarshallByte(th);
res.bludgeon = unmarshallByte(th);
@@ -2667,19 +2634,14 @@ static ghost_demon unmarshallGhost(reader &th, char minorVersion)
ghost.see_invis = unmarshallByte(th);
ghost.brand = static_cast<brand_type>( unmarshallShort(th) );
- if (minorVersion >= TAG_MINOR_UGLY)
- {
- ghost.att_type = static_cast<mon_attack_type>( unmarshallShort(th) );
- ghost.att_flav = static_cast<mon_attack_flavour>( unmarshallShort(th) );
- }
+ ghost.att_type = static_cast<mon_attack_type>( unmarshallShort(th) );
+ ghost.att_flav = static_cast<mon_attack_flavour>( unmarshallShort(th) );
unmarshallResists(th, ghost.resists, minorVersion);
ghost.spellcaster = unmarshallByte(th);
ghost.cycle_colours = unmarshallByte(th);
-
- if (minorVersion >= TAG_MINOR_UGLY)
- ghost.colour = unmarshallByte(th);
+ ghost.colour = unmarshallByte(th);
ghost.fly = static_cast<flight_type>( unmarshallShort(th) );
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h
index fcab5d15ac..e7399bd705 100644
--- a/crawl-ref/source/tags.h
+++ b/crawl-ref/source/tags.h
@@ -49,20 +49,7 @@ enum tag_major_version
// the dungeon Lua changes.
enum tag_minor_version
{
- TAG_MINOR_ARTEFACT = 0, // Turned fixed arts into unrandarts.
- TAG_MINOR_JIYVA = 1, // Added some player bits for Jiyva.
- TAG_MINOR_ZOT_OPEN = 2, // Remember whether Zot was opened.
- TAG_MINOR_JELLY = 3, // Remember whether the royal jelly is dead.
- TAG_ANNOTATE_EXCL = 4, // Store exclusion information for annotations.
- TAG_MINOR_UGLY = 5, // More ghost bits for (very) ugly things.
- TAG_MINOR_ROTTING = 6, // Added monster-specific rotting resistance.
- TAG_MINOR_TRANS = 7, // Keep track of cancellable transformations.
- TAG_MINOR_GITREV = 8, // Removed SVN revision and added Git revision.
- TAG_MINOR_DSTRAITS = 9, // Pre-calculate demonspawn mutations
- TAG_MINOR_YOU_PROP = 10, // Player class has CrawlHashTable
- TAG_MINOR_SMALL_HASH = 11, // Reduced RAM size of CrawlHashTable
- TAG_MINOR_MON_PROP = 12, // Monster class has CrawlHashTable
- TAG_MINOR_VERSION = 12 // Current version. (Keep equal to max.)
+ TAG_MINOR_VERSION = 0 // Current version. (Keep equal to max.)
};
struct enum_info