diff options
author | rubidium <rubidium@openttd.org> | 2010-08-08 10:59:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-08 10:59:30 +0000 |
commit | 3da3d131c6a1e17db81d08c161b944c2c00533da (patch) | |
tree | 1793f2ebfc20fc2be1e028ad2252f8140f45334a /src/saveload | |
parent | abc14d8fbfb9ca313d6a5ab50fc726a2507de6a4 (diff) | |
download | openttd-3da3d131c6a1e17db81d08c161b944c2c00533da.tar.xz |
(svn r20411) -Codechange: rename unmovables as quite a lot of them are actually movable; e.g. HQ and owned land are pretty movable.
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 16 | ||||
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 2bd49e1b8..ce2ef047b 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -36,7 +36,7 @@ #include "../elrail_func.h" #include "../signs_func.h" #include "../aircraft.h" -#include "../unmovable_map.h" +#include "../object_map.h" #include "../tree_map.h" #include "../company_func.h" #include "../road_cmd.h" @@ -1789,22 +1789,22 @@ bool AfterLoadGame() for (TileIndex t = 0; t < map_size; t++) { /* Check for HQ bit being set, instead of using map accessor, * since we've already changed it code-wise */ - if (IsTileType(t, MP_UNMOVABLE) && HasBit(_m[t].m5, 7)) { + if (IsTileType(t, MP_OBJECT) && HasBit(_m[t].m5, 7)) { /* Move size and part identification of HQ out of the m5 attribute, * on new locations */ _m[t].m3 = GB(_m[t].m5, 0, 5); - _m[t].m5 = UNMOVABLE_HQ; + _m[t].m5 = OBJECT_HQ; } } } if (CheckSavegameVersion(144)) { for (TileIndex t = 0; t < map_size; t++) { - if (!IsTileType(t, MP_UNMOVABLE)) continue; + if (!IsTileType(t, MP_OBJECT)) continue; - /* Reordering/generalisation of the unmovable bits. */ - UnmovableType type = GetUnmovableType(t); - SetUnmovableAnimationStage(t, type == UNMOVABLE_HQ ? GB(_m[t].m3, 2, 3) : 0); - SetUnmovableOffset(t, type == UNMOVABLE_HQ ? GB(_m[t].m3, 1, 1) | GB(_m[t].m3, 0, 1) << 4 : 0); + /* Reordering/generalisation of the object bits. */ + ObjectType type = GetObjectType(t); + SetObjectAnimationStage(t, type == OBJECT_HQ ? GB(_m[t].m3, 2, 3) : 0); + SetObjectOffset(t, type == OBJECT_HQ ? GB(_m[t].m3, 1, 1) | GB(_m[t].m3, 0, 1) << 4 : 0); /* Make sure those bits are clear as well! */ _m[t].m4 = 0; diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index da1afdd7c..7de25c170 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -323,7 +323,7 @@ static bool FixTTOMapArray() } break; - case MP_UNMOVABLE: + case MP_OBJECT: _m[t].m2 = 0; _m[t].m3 = 0; break; |