summaryrefslogtreecommitdiff
path: root/src/effectvehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-20 15:31:26 +0000
committerrubidium <rubidium@openttd.org>2014-09-20 15:31:26 +0000
commit6c2abf0930c23e7da82a892fb37c97786c245c00 (patch)
tree13db191cf49b57df14fdbf2c71ce558bbda57f6a /src/effectvehicle.cpp
parentc4311903b71345a9c5ad0e5271ed722d71994c9e (diff)
downloadopenttd-6c2abf0930c23e7da82a892fb37c97786c245c00.tar.xz
(svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class
Diffstat (limited to 'src/effectvehicle.cpp')
-rw-r--r--src/effectvehicle.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp
index 48f3e6cdf..209b78d2e 100644
--- a/src/effectvehicle.cpp
+++ b/src/effectvehicle.cpp
@@ -46,7 +46,7 @@ static bool ChimneySmokeTick(EffectVehicle *v)
v->cur_image = SPR_CHIMNEY_SMOKE_0;
}
v->progress = 7;
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
}
return true;
@@ -79,7 +79,7 @@ static bool SteamSmokeTick(EffectVehicle *v)
moved = true;
}
- if (moved) VehicleUpdatePositionAndViewport(v);
+ if (moved) v->UpdatePositionAndViewport();
return true;
}
@@ -96,11 +96,11 @@ static bool DieselSmokeTick(EffectVehicle *v)
if ((v->progress & 3) == 0) {
v->z_pos++;
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
} else if ((v->progress & 7) == 1) {
if (v->cur_image != SPR_DIESEL_SMOKE_5) {
v->cur_image++;
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
} else {
delete v;
return false;
@@ -124,7 +124,7 @@ static bool ElectricSparkTick(EffectVehicle *v)
v->progress = 0;
if (v->cur_image != SPR_ELECTRIC_SPARK_5) {
v->cur_image++;
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
} else {
delete v;
return false;
@@ -161,7 +161,7 @@ static bool SmokeTick(EffectVehicle *v)
moved = true;
}
- if (moved) VehicleUpdatePositionAndViewport(v);
+ if (moved) v->UpdatePositionAndViewport();
return true;
}
@@ -178,7 +178,7 @@ static bool ExplosionLargeTick(EffectVehicle *v)
if ((v->progress & 3) == 0) {
if (v->cur_image != SPR_EXPLOSION_LARGE_F) {
v->cur_image++;
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
} else {
delete v;
return false;
@@ -203,7 +203,7 @@ static bool BreakdownSmokeTick(EffectVehicle *v)
} else {
v->cur_image = SPR_BREAKDOWN_SMOKE_0;
}
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
}
v->animation_state--;
@@ -227,7 +227,7 @@ static bool ExplosionSmallTick(EffectVehicle *v)
if ((v->progress & 3) == 0) {
if (v->cur_image != SPR_EXPLOSION_SMALL_B) {
v->cur_image++;
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
} else {
delete v;
return false;
@@ -304,7 +304,7 @@ static bool BulldozerTick(EffectVehicle *v)
return false;
}
}
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
}
return true;
@@ -477,7 +477,7 @@ static bool BubbleTick(EffectVehicle *v)
if (v->spritenum == 0) {
v->cur_image++;
if (v->cur_image < SPR_BUBBLE_GENERATE_3) {
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
return true;
}
if (v->animation_substate != 0) {
@@ -523,7 +523,7 @@ static bool BubbleTick(EffectVehicle *v)
v->z_pos += b->z;
v->cur_image = SPR_BUBBLE_0 + b->image;
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
return true;
}
@@ -607,7 +607,7 @@ EffectVehicle *CreateEffectVehicle(int x, int y, int z, EffectVehicleType type)
_effect_init_procs[type](v);
- VehicleUpdatePositionAndViewport(v);
+ v->UpdatePositionAndViewport();
return v;
}