That's where you use l->Tile and l->Flip: You want to set up a pair of tiles, one facing up, the next tile on the page facing right. Set l->Tile to the first of the two, and if Link->Dir == DIR_DOWN, set its flip to flip down. If Link->Dir == DIR_LEFT or DIR_RIGHT, use l->Tile++ and set the Flip based on his direction.