* Make the structure explode. * * Stack: *none* * * @param script The script engine to operate on. * @return unknown. */
| 555 | * @return unknown. |
| 556 | */ |
| 557 | uint16 Script_Structure_Explode(ScriptEngine *script) |
| 558 | { |
| 559 | Structure *s; |
| 560 | uint16 position; |
| 561 | uint16 layout; |
| 562 | uint16 i; |
| 563 | |
| 564 | VARIABLE_NOT_USED(script); |
| 565 | |
| 566 | s = g_scriptCurrentStructure; |
| 567 | layout = g_table_structureInfo[s->o.type].layout; |
| 568 | position = Tile_PackTile(s->o.position); |
| 569 | |
| 570 | for (i = 0; i < g_table_structure_layoutTileCount[layout]; i++) { |
| 571 | tile32 tile; |
| 572 | |
| 573 | tile = Tile_UnpackTile(position + g_table_structure_layoutTiles[layout][i]); |
| 574 | |
| 575 | Map_MakeExplosion(EXPLOSION_STRUCTURE, tile, 0, 0); |
| 576 | } |
| 577 | |
| 578 | return 0; |
| 579 | } |
| 580 | |
| 581 | /** |
| 582 | * Destroy a structure and spawn soldiers around the place. |
nothing calls this directly
no test coverage detected