File diff r15761:680dbdd50e09 → r15762:7fbf9fe78040
src/object_map.h
Show inline comments
 
@@ -10,12 +10,13 @@
 
/** @file object_map.h Map accessors for object tiles. */
 

	
 
#ifndef OBJECT_MAP_H
 
#define OBJECT_MAP_H
 

	
 
#include "tile_map.h"
 
#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)
 
@@ -159,17 +160,19 @@ static inline void SetObjectOffset(TileI
 
 * @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 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;
 
	_m[t].m5 = u;
 
	SB(_m[t].m6, 2, 4, 0);
 
	_me[t].m7 = 0;