diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-19 15:19:03 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-19 15:19:03 +0000 |
commit | 047dbc83010295b9937e88293d627f52792d182f (patch) | |
tree | 04774830bbb2277ad9a976dcbbca96c834873b29 | |
parent | 367b5d24ecaee850b6c76ee589d00a54208ffa92 (diff) | |
download | crawl-ref-047dbc83010295b9937e88293d627f52792d182f.tar.gz crawl-ref-047dbc83010295b9937e88293d627f52792d182f.zip |
[1944570] Fixing bug where the unexplored stairs marker wasn't being saved for tiles (due to only storing shorts, which truncated off that flag.) Unsurprisingly, this breaks saves with tiles.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4373 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/tags.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index 2121d9a2eb..5333899f1a 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -1829,8 +1829,8 @@ void tag_construct_level_tiles(writer &th) { #ifdef USE_TILE unsigned short rle_count = 0; // for run-length encoding - unsigned short tile = 0; - unsigned short last_tile = 0; + unsigned int tile = 0; + unsigned int last_tile = 0; // Ver marshallShort(th, 71); // tile routine subversion @@ -1854,14 +1854,14 @@ void tag_construct_level_tiles(writer &th) rle_count++; if (rle_count == 0x100) { - marshallShort(th, last_tile); + marshallLong(th, last_tile); marshallByte(th, (char)0xFF); rle_count = 1; } } else { - marshallShort(th, last_tile); + marshallLong(th, last_tile); // Note: the unsigned char tile count gets streamed // as a signed char here. It gets read back into // an unsigned char in the read function. @@ -1870,7 +1870,7 @@ void tag_construct_level_tiles(writer &th) } } } - marshallShort(th, tile); + marshallLong(th, tile); marshallByte(th, rle_count); // fg @@ -1888,20 +1888,20 @@ void tag_construct_level_tiles(writer &th) rle_count++; if (rle_count == 0x100) { - marshallShort(th, last_tile); + marshallLong(th, last_tile); marshallByte(th, (char)0xFF); rle_count = 1; } } else { - marshallShort(th, last_tile); + marshallLong(th, last_tile); marshallByte(th, rle_count); rle_count = 1; } } } - marshallShort(th, tile); + marshallLong(th, tile); marshallByte(th, rle_count); // flavor @@ -2156,7 +2156,7 @@ void tag_read_level_tiles(struct reader &th) } unsigned char rle_count = 0; - unsigned short tile = 0; + unsigned int tile = 0; int ver = unmarshallShort(th); if (ver == 0) return; @@ -2174,7 +2174,7 @@ void tag_read_level_tiles(struct reader &th) { if (rle_count == 0) { - tile = unmarshallShort(th); + tile = unmarshallLong(th); rle_count = unmarshallByte(th); } env.tile_bk_bg[i][j] = tile; @@ -2190,7 +2190,7 @@ void tag_read_level_tiles(struct reader &th) { if (rle_count == 0) { - tile = unmarshallShort(th); + tile = unmarshallLong(th); rle_count = unmarshallByte(th); } env.tile_bk_fg[i][j] = tile; |