Codechange: rename byte to uint8_t (#12308)
This commit is contained in:
@@ -91,7 +91,7 @@ inline bool LiftHasDestination(Tile t)
|
||||
* @param t the tile
|
||||
* @param dest new destination
|
||||
*/
|
||||
inline void SetLiftDestination(Tile t, byte dest)
|
||||
inline void SetLiftDestination(Tile t, uint8_t dest)
|
||||
{
|
||||
SetBit(t.m7(), 0);
|
||||
SB(t.m7(), 1, 3, dest);
|
||||
@@ -102,7 +102,7 @@ inline void SetLiftDestination(Tile t, byte dest)
|
||||
* @param t the tile
|
||||
* @return destination
|
||||
*/
|
||||
inline byte GetLiftDestination(Tile t)
|
||||
inline uint8_t GetLiftDestination(Tile t)
|
||||
{
|
||||
return GB(t.m7(), 1, 3);
|
||||
}
|
||||
@@ -123,7 +123,7 @@ inline void HaltLift(Tile t)
|
||||
* @param t the tile
|
||||
* @return position, from 0 to 36
|
||||
*/
|
||||
inline byte GetLiftPosition(Tile t)
|
||||
inline uint8_t GetLiftPosition(Tile t)
|
||||
{
|
||||
return GB(t.m6(), 2, 6);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ inline byte GetLiftPosition(Tile t)
|
||||
* @param t the tile
|
||||
* @param pos position, from 0 to 36
|
||||
*/
|
||||
inline void SetLiftPosition(Tile t, byte pos)
|
||||
inline void SetLiftPosition(Tile t, uint8_t pos)
|
||||
{
|
||||
SB(t.m6(), 2, 6, pos);
|
||||
}
|
||||
@@ -181,10 +181,10 @@ inline void SetHouseCompleted(Tile t, bool status)
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
* @return the building stage of the house
|
||||
*/
|
||||
inline byte GetHouseBuildingStage(Tile t)
|
||||
inline uint8_t GetHouseBuildingStage(Tile t)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
return IsHouseCompleted(t) ? (byte)TOWN_HOUSE_COMPLETED : GB(t.m5(), 3, 2);
|
||||
return IsHouseCompleted(t) ? (uint8_t)TOWN_HOUSE_COMPLETED : GB(t.m5(), 3, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -193,7 +193,7 @@ inline byte GetHouseBuildingStage(Tile t)
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
* @return the construction stage of the house
|
||||
*/
|
||||
inline byte GetHouseConstructionTick(Tile t)
|
||||
inline uint8_t GetHouseConstructionTick(Tile t)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
return IsHouseCompleted(t) ? 0 : GB(t.m5(), 0, 3);
|
||||
@@ -260,7 +260,7 @@ inline TimerGameCalendar::Year GetHouseAge(Tile t)
|
||||
* @param random the new random bits
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
*/
|
||||
inline void SetHouseRandomBits(Tile t, byte random)
|
||||
inline void SetHouseRandomBits(Tile t, uint8_t random)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
t.m1() = random;
|
||||
@@ -273,7 +273,7 @@ inline void SetHouseRandomBits(Tile t, byte random)
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
* @return random bits
|
||||
*/
|
||||
inline byte GetHouseRandomBits(Tile t)
|
||||
inline uint8_t GetHouseRandomBits(Tile t)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
return t.m1();
|
||||
@@ -286,7 +286,7 @@ inline byte GetHouseRandomBits(Tile t)
|
||||
* @param triggers the activated triggers
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
*/
|
||||
inline void SetHouseTriggers(Tile t, byte triggers)
|
||||
inline void SetHouseTriggers(Tile t, uint8_t triggers)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
SB(t.m3(), 0, 5, triggers);
|
||||
@@ -299,7 +299,7 @@ inline void SetHouseTriggers(Tile t, byte triggers)
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
* @return triggers
|
||||
*/
|
||||
inline byte GetHouseTriggers(Tile t)
|
||||
inline uint8_t GetHouseTriggers(Tile t)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
return GB(t.m3(), 0, 5);
|
||||
@@ -311,7 +311,7 @@ inline byte GetHouseTriggers(Tile t)
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
* @return time remaining
|
||||
*/
|
||||
inline byte GetHouseProcessingTime(Tile t)
|
||||
inline uint8_t GetHouseProcessingTime(Tile t)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
return GB(t.m6(), 2, 6);
|
||||
@@ -323,7 +323,7 @@ inline byte GetHouseProcessingTime(Tile t)
|
||||
* @param time the time to be set
|
||||
* @pre IsTileType(t, MP_HOUSE)
|
||||
*/
|
||||
inline void SetHouseProcessingTime(Tile t, byte time)
|
||||
inline void SetHouseProcessingTime(Tile t, uint8_t time)
|
||||
{
|
||||
assert(IsTileType(t, MP_HOUSE));
|
||||
SB(t.m6(), 2, 6, time);
|
||||
@@ -350,7 +350,7 @@ inline void DecHouseProcessingTime(Tile t)
|
||||
* @param random_bits required for newgrf houses
|
||||
* @pre IsTileType(t, MP_CLEAR)
|
||||
*/
|
||||
inline void MakeHouseTile(Tile t, TownID tid, byte counter, byte stage, HouseID type, byte random_bits)
|
||||
inline void MakeHouseTile(Tile t, TownID tid, uint8_t counter, uint8_t stage, HouseID type, uint8_t random_bits)
|
||||
{
|
||||
assert(IsTileType(t, MP_CLEAR));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user