(svn r20446) -Codechange: unify the location of the water class

This commit is contained in:
rubidium
2010-08-11 14:14:06 +00:00
parent 43d6740f2d
commit ab5b0ceff2
10 changed files with 91 additions and 59 deletions

View File

@@ -13,6 +13,7 @@
#define OBJECT_MAP_H
#include "tile_map.h"
#include "water_map.h"
#include "object_type.h"
/**
@@ -162,11 +163,13 @@ static inline void SetObjectOffset(TileIndex t, uint8 offset)
* @param o The new owner of the tile.
* @param offset The offset to the northern tile of this object.
* @param index Generic index associated with the object type.
* @param wc Water class for this obect.
*/
static inline void MakeObject(TileIndex t, ObjectType u, Owner o, uint8 offset, uint index)
static inline void MakeObject(TileIndex t, ObjectType u, Owner o, uint8 offset, uint index, WaterClass wc)
{
SetTileType(t, MP_OBJECT);
SetTileOwner(t, o);
SetWaterClass(t, wc);
_m[t].m2 = index;
_m[t].m3 = offset;
_m[t].m4 = 0;