forked from mirror/OpenTTD
(svn r19235) -Add: [NewGRF] Add 2 bits of pseudo-random data for rail types, based on tile location.
This commit is contained in:
@@ -14,10 +14,13 @@
|
|||||||
#include "newgrf_commons.h"
|
#include "newgrf_commons.h"
|
||||||
#include "newgrf_railtype.h"
|
#include "newgrf_railtype.h"
|
||||||
#include "newgrf_spritegroup.h"
|
#include "newgrf_spritegroup.h"
|
||||||
|
#include "core/bitmath_func.hpp"
|
||||||
|
|
||||||
static uint32 RailTypeGetRandomBits(const ResolverObject *object)
|
static uint32 RailTypeGetRandomBits(const ResolverObject *object)
|
||||||
{
|
{
|
||||||
return 0;
|
TileIndex tile = object->u.routes.tile;
|
||||||
|
uint tmp = CountBits(tile + (TileX(tile) + TileY(tile)) * TILE_SIZE);
|
||||||
|
return GB(tmp, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32 RailTypeGetTriggers(const ResolverObject *object)
|
static uint32 RailTypeGetTriggers(const ResolverObject *object)
|
||||||
|
Reference in New Issue
Block a user