| 284 | }; |
| 285 | |
| 286 | static bool BulldozerTick(EffectVehicle *v) |
| 287 | { |
| 288 | v->progress++; |
| 289 | if ((v->progress & 7) == 0) { |
| 290 | const BulldozerMovement *b = &_bulldozer_movement[v->animation_state]; |
| 291 | |
| 292 | v->sprite_cache.sprite_seq.Set(SPR_BULLDOZER_NE + b->image); |
| 293 | |
| 294 | v->x_pos += _inc_by_dir[b->direction].x; |
| 295 | v->y_pos += _inc_by_dir[b->direction].y; |
| 296 | |
| 297 | v->animation_substate++; |
| 298 | if (v->animation_substate >= b->duration) { |
| 299 | v->animation_substate = 0; |
| 300 | v->animation_state++; |
| 301 | if (v->animation_state == lengthof(_bulldozer_movement)) { |
| 302 | delete v; |
| 303 | return false; |
| 304 | } |
| 305 | } |
| 306 | v->UpdatePositionAndViewport(); |
| 307 | } |
| 308 | |
| 309 | return true; |
| 310 | } |
| 311 | |
| 312 | static void BubbleInit(EffectVehicle *v) |
| 313 | { |
nothing calls this directly
no test coverage detected