Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loadMap(string elements)
- {
- vector<string> elementsVector = split(elements, "\n");
- nameMap = elementsVector[0];
- for(int i = 1; i < (int)elementsVector.size(); i++)
- {
- vector<string> inf = split(elementsVector[i], " ");
- double tex[4][2], vertex[4][3];
- for(int x = 0; x < 4; x++)
- {
- vector<string> texVector = split(inf[3 + x], ";");
- for(int y = 0; y < 2; y++)
- tex[x][y] = convertStrToDouble(texVector[y]);
- }
- for(int x = 0; x < 4; x++)
- {
- vector<string> vertexVector = split(inf[5 + x], ";");
- for(int y = 0; y < 3; y++)
- tex[x][y] = convertStrToDouble(vertexVector[y]);
- }
- objects[i - 1] = Gl_object(convertStrToInt(inf[0]), inf[1], inf[2], tex, vertex);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement