Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float ox = x * (float)Geometry.MapHexWidth;
  2. float oy = y * (float)Geometry.MapHexHeight;
  3. xcoord = (oy - ox) - proto.OffsetX;
  4. ycoord = ((cy + (cx / 2)) * Geometry.MapHexLineHeight) - proto.OffsetY;
  5.  
  6. if (!(y == 0 && x == 0))
  7. {
  8.     if (x % 2 == 1)
  9.     {
  10.         ycoord -= 6;
  11.     }
  12.     if (x > 1)
  13.     {
  14.         xcoord += (x/2)*Geometry.MapHexHeight;
  15.     }
  16. }
  17.  
  18. // Offset when drawing stuff... this is probably wrong...
  19. xcoord -= (Bitmaps[scenery].Width)
  20. ycoord -= (Bitmaps[scenery].Height)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement