* 'Move' fire sprite. * @param sprite Fire sprite. */
| 1299 | * @param sprite Fire sprite. |
| 1300 | */ |
| 1301 | void Micropolis::doExplosionSprite(SimSprite *sprite) |
| 1302 | { |
| 1303 | short x, y; |
| 1304 | |
| 1305 | if ((spriteCycle & 1) == 0) { |
| 1306 | |
| 1307 | if (sprite->frame == 1) { |
| 1308 | // Convert sprite coordinates to tile coordinates. |
| 1309 | int explosionX = sprite->x >>4; |
| 1310 | int explosionY = sprite->y >>4; |
| 1311 | makeSound("city", "ExplosionHigh", explosionX, explosionY); /* explosion */ |
| 1312 | x = (sprite->x >>4) + 3; |
| 1313 | y = (sprite->y >>4); |
| 1314 | sendMessage(MESSAGE_EXPLOSION_REPORTED, x, y); |
| 1315 | } |
| 1316 | |
| 1317 | sprite->frame++; |
| 1318 | } |
| 1319 | |
| 1320 | if (sprite->frame > 6) { |
| 1321 | sprite->frame = 0; |
| 1322 | |
| 1323 | startFire(sprite->x + 48 - 8, sprite->y + 16); |
| 1324 | startFire(sprite->x + 48 - 24, sprite->y); |
| 1325 | startFire(sprite->x + 48 + 8, sprite->y); |
| 1326 | startFire(sprite->x + 48 - 24, sprite->y + 32); |
| 1327 | startFire(sprite->x + 48 + 8, sprite->y + 32); |
| 1328 | } |
| 1329 | } |
| 1330 | |
| 1331 | |
| 1332 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected