Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
This is accomplished by changing it to a single member struct with the appropriate operator overloads to make it all work with not too much source modifications.
This commit is contained in:
@@ -204,7 +204,7 @@ static inline TileIndex TileVirtXY(uint x, uint y)
|
||||
*/
|
||||
static inline uint TileX(TileIndex tile)
|
||||
{
|
||||
return tile & MapMaxX();
|
||||
return tile.value & MapMaxX();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,7 +214,7 @@ static inline uint TileX(TileIndex tile)
|
||||
*/
|
||||
static inline uint TileY(TileIndex tile)
|
||||
{
|
||||
return tile >> MapLogX();
|
||||
return tile.value >> MapLogX();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user