Vertically flip any tile by placing an event

Version:

1.0

Added on:

20 Oct 2013 15: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.
  1. void onLevelBegin() {
  2.   for (int x = 0; x < jjLayerWidth[4]; x++) {
  3.     for (int y = 0; y < jjLayerHeight[4]; y++) {
  4.       uint16 tile = jjTileGet(4, x, y);
  5.            
  6.       if (jjEventGet(x, y) == 119) jjTileSet(4, x, y, tile ^ TILE::VFLIPPED);
  7.     }
  8.   }
  9. }