diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-07 11:32:10 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-07 11:32:10 +0000 |
commit | 10aeabaacb1c2cdc6b6227328df34287b7f75d4f (patch) | |
tree | dbae642faf43e6acf5871b53a3ee82eb30047b38 /crawl-ref | |
parent | 82a29029599d795c3fabd0ac941f38016f77958a (diff) | |
download | crawl-ref-10aeabaacb1c2cdc6b6227328df34287b7f75d4f.tar.gz crawl-ref-10aeabaacb1c2cdc6b6227328df34287b7f75d4f.zip |
Increased max monsters to 350, breaks saves, may be buggy. Incremented save major version.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2352 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/AppHdr.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/acr.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/debug.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/defines.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 4 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/tags.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/version.h | 2 |
9 files changed, 12 insertions, 13 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h index 64440ba36c..308618888b 100644 --- a/crawl-ref/source/AppHdr.h +++ b/crawl-ref/source/AppHdr.h @@ -447,6 +447,6 @@ template < class T > inline void UNUSED(const volatile T &) { -} // Note that this generates no code with CodeWarrior or MSVC (if inlining is on). +} #endif diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index cc53e9424f..8d7af5c50d 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3610,7 +3610,7 @@ static void move_player(int move_x, int move_y) const int targ_x = you.x_pos + move_x; const int targ_y = you.y_pos + move_y; const dungeon_feature_type targ_grid = grd[ targ_x ][ targ_y ]; - const unsigned char targ_monst = mgrd[ targ_x ][ targ_y ]; + const unsigned short targ_monst = mgrd[ targ_x ][ targ_y ]; const bool targ_solid = grid_is_solid(targ_grid); if (targ_monst != NON_MONSTER && !mons_is_submerged(&menv[targ_monst])) diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 42aec99974..c493ed5d81 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -470,7 +470,7 @@ void create_spec_monster_name(int x, int y) // Need to set a name for the player ghost if (mspec.mid == MONS_PLAYER_GHOST) { - unsigned char mid = mgrd[x][y]; + unsigned short mid = mgrd[x][y]; if (mid >= MAX_MONSTERS || menv[mid].type != MONS_PLAYER_GHOST) { diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 60e472378f..d13910e61c 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -51,7 +51,7 @@ #define MAX_GHOSTS 10 // max size of monter array {dlb}: -#define MAX_MONSTERS 200 +#define MAX_MONSTERS 350 // number of monster enchantments #define NUM_MON_ENCHANTS 6 // non-monster for mgrd[][] -- (MNST + 1) {dlb}: diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 1a29da26da..5bff06df19 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1218,9 +1218,9 @@ public: FixedVector< monsters, MAX_MONSTERS > mons; // monster list feature_grid grid; // terrain grid - FixedArray< unsigned char, GXM, GYM > mgrid; // monster grid + FixedArray< unsigned short, GXM, GYM > mgrid; // monster grid FixedArray< int, GXM, GYM > igrid; // item grid - FixedArray< unsigned char, GXM, GYM > cgrid; // cloud grid + FixedArray< unsigned short, GXM, GYM > cgrid; // cloud grid FixedArray< unsigned short, GXM, GYM > grid_colours; // colour overrides FixedArray< map_cell, GXM, GYM > map; // discovered terrain diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index a78285ff01..ed6bd37546 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1609,11 +1609,10 @@ bool i_feel_safe(bool announce, bool want_move) { for ( int x = xstart; x < xend; ++x ) { - /* if you can see a nonfriendly monster then you feel - unsafe */ + // if you can see a nonfriendly monster then you feel unsafe if ( see_grid(x,y) ) { - const unsigned char targ_monst = mgrd[x][y]; + const unsigned short targ_monst = mgrd[x][y]; if ( targ_monst != NON_MONSTER ) { const monsters *mon = &menv[targ_monst]; diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 2a1c040da5..961df346ea 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -2612,7 +2612,7 @@ bool followers_abandon_you() { for ( int x = xstart; x < xend; ++x ) { - const unsigned char targ_monst = mgrd[x][y]; + const unsigned short targ_monst = mgrd[x][y]; if ( targ_monst != NON_MONSTER ) { monsters *monster = &menv[targ_monst]; diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 8b8eb8db18..46505fdbe5 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -1517,7 +1517,7 @@ static void tag_construct_level(struct tagHeader &th) marshallShort(th, env.map[count_x][count_y].object); marshallShort(th, env.map[count_x][count_y].colour); marshallShort(th, env.map[count_x][count_y].flags); - marshallByte(th, env.cgrid[count_x][count_y]); + marshallShort(th, env.cgrid[count_x][count_y]); } } @@ -1745,7 +1745,7 @@ static void tag_read_level( struct tagHeader &th, char minorVersion ) env.map[i][j].flags = unmarshallShort(th); mgrd[i][j] = NON_MONSTER; - env.cgrid[i][j] = (unsigned char) unmarshallByte(th); + env.cgrid[i][j] = (unsigned short) unmarshallShort(th); } } diff --git a/crawl-ref/source/version.h b/crawl-ref/source/version.h index 31eb346d28..78e8536ca9 100644 --- a/crawl-ref/source/version.h +++ b/crawl-ref/source/version.h @@ -58,6 +58,6 @@ #define VERSION_DETAIL BUILD_DATE #endif -#define SAVE_MAJOR_VERSION 3 +#define SAVE_MAJOR_VERSION 4 #endif |