Original Post
I''m making a game where I load worlds by a method which reads a .RAW file which resembles a heightmap, and it stores the values in a byte array with this line:
fread(pByteArray, 1, size, pFile);
So now I have all the data in my pByteArray, let''s say pByteArray[1024 * 1024] for example.
These values are the y-coord of the vertices drawn. Now I want to store all the vertex info in vectors. So what I should get is
1024x1024 vectors. (g_pVertices = new CVector [1024 x 1024]) and there I need to store the data. But I can''t create a code which gives the vectors the right x, y, z coords. Can anyone please help me with this? I thought about for (i = ...) { for (j = ...) { code } } but I can''t figure it out
Thanks in advance...
BTW sorry for double post but I forgot to click "e-mail on reply"