Changeset - r21732:a9c964208420
[Not reviewed]
master
0 2 0
rubidium - 10 years ago 2014-09-21 11:18:10
rubidium@openttd.org
(svn r26875) -Codechange: move TropicZone information from m6 to type
2 files changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/saveload/afterload.cpp
Show inline comments
 
@@ -574,6 +574,8 @@ bool AfterLoadGame()
 
		/* In old savegame versions, the heightlevel was coded in bits 0..3 of the type field */
 
		for (TileIndex t = 0; t < map_size; t++) {
 
			_m[t].height = GB(_m[t].type, 0, 4);
 
			SB(_m[t].type, 0, 2, GB(_m[t].m6, 0, 2));
 
			SB(_m[t].m6, 0, 2, 0);
 
		}
 
	}
 

	
src/tile_map.h
Show inline comments
 
@@ -206,7 +206,7 @@ static inline void SetTropicZone(TileInd
 
{
 
	assert(tile < MapSize());
 
	assert(!IsTileType(tile, MP_VOID) || type == TROPICZONE_NORMAL);
 
	SB(_m[tile].m6, 0, 2, type);
 
	SB(_m[tile].type, 0, 2, type);
 
}
 

	
 
/**
 
@@ -218,7 +218,7 @@ static inline void SetTropicZone(TileInd
 
static inline TropicZone GetTropicZone(TileIndex tile)
 
{
 
	assert(tile < MapSize());
 
	return (TropicZone)GB(_m[tile].m6, 0, 2);
 
	return (TropicZone)GB(_m[tile].type, 0, 2);
 
}
 

	
 
/**
0 comments (0 inline, 0 general)