summaryrefslogtreecommitdiff
path: root/src/object_map.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-10-12 16:30:42 +0000
committerfrosch <frosch@openttd.org>2013-10-12 16:30:42 +0000
commit35d7e8bca4e24bc211ed24d07fba62193d5f5f31 (patch)
tree5bd7a702966ef90ce1c815b3d73d380e6be0e628 /src/object_map.h
parent2080a8c16ff4190a8a32f6f3618323f2d3671f5c (diff)
downloadopenttd-35d7e8bca4e24bc211ed24d07fba62193d5f5f31.tar.xz
(svn r25833) -Codechange: Move ObjectType from map array into pool item.
Diffstat (limited to 'src/object_map.h')
-rw-r--r--src/object_map.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/object_map.h b/src/object_map.h
index 7af58d27c..3c185b14b 100644
--- a/src/object_map.h
+++ b/src/object_map.h
@@ -15,17 +15,7 @@
#include "water_map.h"
#include "object_type.h"
-/**
- * Gets the ObjectType of the given object tile
- * @param t the tile to get the type from.
- * @pre IsTileType(t, MP_OBJECT)
- * @return the type.
- */
-static inline ObjectType GetObjectType(TileIndex t)
-{
- assert(IsTileType(t, MP_OBJECT));
- return (ObjectType)_m[t].m5;
-}
+ObjectType GetObjectType(TileIndex t);
/**
* Check whether the object on a tile is of a specific type.
@@ -77,15 +67,13 @@ static inline byte GetObjectRandomBits(TileIndex t)
/**
* Make an Object tile.
- * @note do not use this function directly. Use one of the other Make* functions.
* @param t The tile to make and object tile.
- * @param u The object type of the tile.
* @param o The new owner of the tile.
* @param index Index to the object.
* @param wc Water class for this object.
* @param random Random data to store on the tile
*/
-static inline void MakeObject(TileIndex t, ObjectType u, Owner o, ObjectID index, WaterClass wc, byte random)
+static inline void MakeObject(TileIndex t, Owner o, ObjectID index, WaterClass wc, byte random)
{
SetTileType(t, MP_OBJECT);
SetTileOwner(t, o);
@@ -93,7 +81,7 @@ static inline void MakeObject(TileIndex t, ObjectType u, Owner o, ObjectID index
_m[t].m2 = index;
_m[t].m3 = random;
_m[t].m4 = 0;
- _m[t].m5 = u;
+ _m[t].m5 = 0;
SB(_m[t].m6, 2, 4, 0);
_me[t].m7 = 0;
}