* Set the animation of a Explosion. * @param e The Explosion to change. * @param animationMapID The animation map to use. */
| 173 | * @param animationMapID The animation map to use. |
| 174 | */ |
| 175 | static void Explosion_Func_SetAnimation(Explosion *e, uint16 animationMapID) |
| 176 | { |
| 177 | uint16 packed; |
| 178 | |
| 179 | packed = Tile_PackTile(e->position); |
| 180 | |
| 181 | if (Structure_Get_ByPackedTile(packed) != NULL) return; |
| 182 | |
| 183 | animationMapID += Tools_Random_256() & 0x1; |
| 184 | animationMapID += g_table_landscapeInfo[Map_GetLandscapeType(packed)].isSand ? 0 : 2; |
| 185 | |
| 186 | assert(animationMapID < 16); |
| 187 | Animation_Start(g_table_animation_map[animationMapID], e->position, 0, e->houseID, 3); |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * Set position at the left of a row. |
no test coverage detected