MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Animation_Func_SetOverlayTile

Function Animation_Func_SetOverlayTile

src/animation.c:102–114  ·  view source on GitHub ↗

* Set the overlay sprite of the tile. * @param animation The Animation for which we change the overlay sprite. * @param parameter The TileID to which the overlay sprite is set. */

Source from the content-addressed store, hash-verified

100 * @param parameter The TileID to which the overlay sprite is set.
101 */
102static void Animation_Func_SetOverlayTile(Animation *animation, int16 parameter)
103{
104 uint16 packed = Tile_PackTile(animation->tile);
105 Tile *t = &g_map[packed];
106 assert(parameter >= 0);
107
108 if (!Map_IsPositionUnveiled(packed)) return;
109
110 t->overlayTileID = g_iconMap[g_iconMap[animation->iconGroup] + parameter];
111 t->houseID = animation->houseID;
112
113 Map_Update(packed, 0, false);
114}
115
116/**
117 * Rewind the animation.

Callers 1

Animation_TickFunction · 0.85

Calls 2

Map_IsPositionUnveiledFunction · 0.85
Map_UpdateFunction · 0.85

Tested by

no test coverage detected