Loading

Paste #pmrjva0fa

  1. /**
  2.  * Returns the direction of a corner in relation to the centre of the tile
  3.  *
  4.  * @param corner A #Corner.
  5.  * @return The direction the corner is in relation to the center of the tile. Or INVALID_DIR if the corner is not valid.
  6.  */
  7. static inline Direction GetCornerDirection(Corner corner)
  8. {
  9.     switch (corner) {
  10.         case CORNER_W: return DIR_W;
  11.         case CORNER_S: return DIR_S;
  12.         case CORNER_E: return DIR_E;
  13.         case CORNER_N: return DIR_N;
  14.         default: return INVALID_DIR;
  15.     }
  16. }

Comments