Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1.             float posx = Metrics::MapMidPoint - mHeader.position.Y;
  2.             float posy = Metrics::MapMidPoint + mHeader.position.X;
  3.             float posz = mHeader.position.Z;
  4.  
  5.             mVertices.resize(145);
  6.  
  7.             uint32 counter = 0;
  8.  
  9.             for (int i = 0; i < 17; ++i) {
  10.                 for (int j = 0; j < (((i % 2) != 0) ? 8 : 9); ++j) {
  11.                     AdtVertex& v = mVertices[counter];
  12.                     v.x = posx + j * Metrics::UnitSize;
  13.                     v.y = posy - i * Metrics::UnitSize * 0.5f;
  14.                     if (i % 2) {
  15.                         v.x += 0.5f * Metrics::UnitSize;
  16.                     }
  17.  
  18.                     v.z = heights[counter] + posz;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement