summaryrefslogtreecommitdiff
path: root/src/newgrf_industrytiles.cpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-19 21:02:30 +0000
committerskidd13 <skidd13@openttd.org>2007-11-19 21:02:30 +0000
commit71c4325c50ae594a5adf01cac7c9e527b239cdcb (patch)
tree21212e0b25777aac62f30d88b981e2bd624c4616 /src/newgrf_industrytiles.cpp
parent58bb5c752568f8f9a1cb4d9533268d0ecad34e12 (diff)
downloadopenttd-71c4325c50ae594a5adf01cac7c9e527b239cdcb.tar.xz
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r--src/newgrf_industrytiles.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 3804b4ee7..36ab7bc2d 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -182,7 +182,7 @@ void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte r
if (IS_CUSTOM_SPRITE(image)) image += stage;
- if (HASBIT(image, PALETTE_MODIFIER_COLOR)) {
+ if (HasBit(image, PALETTE_MODIFIER_COLOR)) {
if (pal == 0) {
pal = GENERAL_SPRITE_COLOR(rnd_color);
}
@@ -196,7 +196,7 @@ void IndustryDrawTileLayout(const TileInfo *ti, const SpriteGroup *group, byte r
ti->x + dtss->delta_x, ti->y + dtss->delta_y,
dtss->size_x, dtss->size_y,
dtss->size_z, ti->z + dtss->delta_z,
- !HASBIT(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_INDUSTRIES)
+ !HasBit(image, SPRITE_MODIFIER_OPAQUE) && IsTransparencySet(TO_INDUSTRIES)
);
} else {
AddChildSpriteScreen(image, pal, (byte)dtss->delta_x, (byte)dtss->delta_y, IsTransparencySet(TO_INDUSTRIES));
@@ -227,7 +227,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
if (ti->tileh != SLOPE_FLAT) {
bool draw_old_one = true;
- if (HASBIT(inds->callback_flags, CBM_INDT_DRAW_FOUNDATIONS)) {
+ if (HasBit(inds->callback_flags, CBM_INDT_DRAW_FOUNDATIONS)) {
/* Called to determine the type (if any) of foundation to draw for industry tile */
uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, i, ti->tile);
draw_old_one = callback_res != 0;
@@ -289,7 +289,7 @@ void AnimateNewIndustryTile(TileIndex tile)
const IndustryTileSpec *itspec = GetIndustryTileSpec(gfx);
byte animation_speed = itspec->animation_speed;
- if (HASBIT(itspec->callback_flags, CBM_INDT_ANIM_SPEED)) {
+ if (HasBit(itspec->callback_flags, CBM_INDT_ANIM_SPEED)) {
uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_ANIMATION_SPEED, 0, 0, gfx, ind, tile);
if (callback_res != CALLBACK_FAILED) animation_speed = Clamp(callback_res & 0xFF, 0, 16);
}
@@ -304,8 +304,8 @@ void AnimateNewIndustryTile(TileIndex tile)
byte frame = GetIndustryAnimationState(tile);
uint16 num_frames = GB(itspec->animation_info, 0, 8);
- if (HASBIT(itspec->callback_flags, CBM_INDT_ANIM_NEXT_FRAME)) {
- uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_ANIM_NEXT_FRAME, HASBIT(itspec->animation_special_flags, 0) ? Random() : 0, 0, gfx, ind, tile);
+ if (HasBit(itspec->callback_flags, CBM_INDT_ANIM_NEXT_FRAME)) {
+ uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_ANIM_NEXT_FRAME, HasBit(itspec->animation_special_flags, 0) ? Random() : 0, 0, gfx, ind, tile);
if (callback_res != CALLBACK_FAILED) {
frame_set_by_callback = true;
@@ -362,7 +362,7 @@ bool StartStopIndustryTileAnimation(TileIndex tile, IndustryAnimationTrigger iat
IndustryGfx gfx = GetIndustryGfx(tile);
const IndustryTileSpec *itspec = GetIndustryTileSpec(gfx);
- if (!HASBIT(itspec->animation_triggers, iat)) return false;
+ if (!HasBit(itspec->animation_triggers, iat)) return false;
Industry *ind = GetIndustryByTile(tile);
ChangeIndustryTileAnimationFrame(tile, iat, random, gfx, ind);