mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 03:42:41 +01:00
Codechange: Move station tile flag cached bits from m6 to m3.
This frees up bits 0..1 of m6 for all tile types. No savegame bump is needed as these bits are always reset on load.
This commit is contained in:
committed by
Peter Nelson
parent
be505ec459
commit
44de8d77bf
@@ -431,7 +431,7 @@ inline bool IsHangarTile(Tile t)
|
||||
inline bool IsStationTileBlocked(Tile t)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
return HasBit(t.m6(), 0);
|
||||
return HasBit(t.m3(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -443,7 +443,7 @@ inline bool IsStationTileBlocked(Tile t)
|
||||
inline void SetStationTileBlocked(Tile t, bool b)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
AssignBit(t.m6(), 0, b);
|
||||
AssignBit(t.m3(), 0, b);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -455,7 +455,7 @@ inline void SetStationTileBlocked(Tile t, bool b)
|
||||
inline bool CanStationTileHaveWires(Tile t)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
return HasBit(t.m6(), 1);
|
||||
return HasBit(t.m3(), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -467,7 +467,7 @@ inline bool CanStationTileHaveWires(Tile t)
|
||||
inline void SetStationTileHaveWires(Tile t, bool b)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
AssignBit(t.m6(), 1, b);
|
||||
AssignBit(t.m3(), 1, b);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -479,7 +479,7 @@ inline void SetStationTileHaveWires(Tile t, bool b)
|
||||
inline bool CanStationTileHavePylons(Tile t)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
return HasBit(t.m6(), 7);
|
||||
return HasBit(t.m3(), 2);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -491,7 +491,7 @@ inline bool CanStationTileHavePylons(Tile t)
|
||||
inline void SetStationTileHavePylons(Tile t, bool b)
|
||||
{
|
||||
assert(HasStationRail(t));
|
||||
AssignBit(t.m6(), 7, b);
|
||||
AssignBit(t.m3(), 2, b);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user