diff options
Diffstat (limited to 'Samples/CommonSrc/Render/Render_XmlSceneLoader.cpp')
-rw-r--r-- | Samples/CommonSrc/Render/Render_XmlSceneLoader.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Samples/CommonSrc/Render/Render_XmlSceneLoader.cpp b/Samples/CommonSrc/Render/Render_XmlSceneLoader.cpp index 5f31250..3d035e2 100644 --- a/Samples/CommonSrc/Render/Render_XmlSceneLoader.cpp +++ b/Samples/CommonSrc/Render/Render_XmlSceneLoader.cpp @@ -52,9 +52,9 @@ bool XmlHandler::ReadFile(const char* fileName, OVR::Render::RenderDevice* pRend // Extract the relative path to our working directory for loading textures filePath[0] = 0; - SPInt pos = 0; - SPInt len = strlen(fileName); - for(SPInt i = len; i > 0; i--) + intptr_t pos = 0; + intptr_t len = strlen(fileName); + for(intptr_t i = len; i > 0; i--) { if (fileName[i-1]=='\\' || fileName[i-1]=='/') { @@ -76,7 +76,7 @@ bool XmlHandler::ReadFile(const char* fileName, OVR::Render::RenderDevice* pRend for(int i = 0; i < textureCount; ++i) { const char* textureName = pXmlTexture->Attribute("fileName"); - SPInt dotpos = strcspn(textureName, "."); + intptr_t dotpos = strcspn(textureName, "."); char fname[300]; if (pos == len) @@ -216,8 +216,8 @@ bool XmlHandler::ReadFile(const char* fileName, OVR::Render::RenderDevice* pRend Models[i]->Fill = shader; //add all the vertices to the model - const UPInt numVerts = vertices->GetSize(); - for(UPInt v = 0; v < numVerts; ++v) + const size_t numVerts = vertices->GetSize(); + for(size_t v = 0; v < numVerts; ++v) { if(diffuseTextureIndex > -1) { @@ -246,18 +246,18 @@ bool XmlHandler::ReadFile(const char* fileName, OVR::Render::RenderDevice* pRend const char* indexStr = pXmlModel->FirstChildElement("indices")-> FirstChild()->ToText()->Value(); - UPInt stringLength = strlen(indexStr); + size_t stringLength = strlen(indexStr); - for(UPInt j = 0; j < stringLength; ) + for(size_t j = 0; j < stringLength; ) { - UPInt k = j + 1; + size_t k = j + 1; for(; k < stringLength; ++k) { if (indexStr[k] == ' ') break; } char text[20]; - for(UPInt l = 0; l < k - j; ++l) + for(size_t l = 0; l < k - j; ++l) { text[l] = indexStr[j + l]; } @@ -268,10 +268,10 @@ bool XmlHandler::ReadFile(const char* fileName, OVR::Render::RenderDevice* pRend } // Reverse index order to match original expected orientation - Array<UInt16>& indices = Models[i]->Indices; - UPInt indexCount = indices.GetSize(); + Array<uint16_t>& indices = Models[i]->Indices; + size_t indexCount = indices.GetSize(); - for (UPInt revIndex = 0; revIndex < indexCount/2; revIndex++) + for (size_t revIndex = 0; revIndex < indexCount/2; revIndex++) { unsigned short itemp = indices[revIndex]; indices[revIndex] = indices[indexCount - revIndex - 1]; @@ -366,14 +366,14 @@ bool XmlHandler::ReadFile(const char* fileName, OVR::Render::RenderDevice* pRend void XmlHandler::ParseVectorString(const char* str, OVR::Array<OVR::Vector3f> *array, bool is2element) { - UPInt stride = is2element ? 2 : 3; - UPInt stringLength = strlen(str); - UPInt element = 0; + size_t stride = is2element ? 2 : 3; + size_t stringLength = strlen(str); + size_t element = 0; float v[3]; - for(UPInt j = 0; j < stringLength;) + for(size_t j = 0; j < stringLength;) { - UPInt k = j + 1; + size_t k = j + 1; for(; k < stringLength; ++k) { if(str[k] == ' ') @@ -382,7 +382,7 @@ void XmlHandler::ParseVectorString(const char* str, OVR::Array<OVR::Vector3f> *a } } char text[20]; - for(UPInt l = 0; l < k - j; ++l) + for(size_t l = 0; l < k - j; ++l) { text[l] = str[j + l]; } |