Vertically flip any tile by placing an event

Version:

1.0

Added on:

20 Oct 2013 13:58

Tags:

Description:
What it says. In this case, the event is Leaf (119).

For best results, though, it should only be used on animated tiles, because otherwise the tile cache will interfere.
void onLevelBegin() {
  for (int x = 0; x < jjLayerWidth[4]; x++) {
    for (int y = 0; y < jjLayerHeight[4]; y++) {
      uint16 tile = jjTileGet(4, x, y);
            
      if (jjEventGet(x, y) == 119) jjTileSet(4, x, y, tile ^ TILE::VFLIPPED);
    }
  }
}