Fix a few %l* instead of PRI*32
This commit is contained in:
@@ -4,8 +4,11 @@
|
|||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define __STDC_FORMAT_MACROS
|
||||||
|
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -146,10 +149,12 @@ public:
|
|||||||
{
|
{
|
||||||
if (package.Get()==NULL)
|
if (package.Get()==NULL)
|
||||||
return false;
|
return false;
|
||||||
printf("TEST %s\n", package->Title().String());
|
|
||||||
|
printf("TEST %s\n", package->Title().String());
|
||||||
|
|
||||||
for (int32 i = 0; i < fPackageLists.CountItems(); i++) {
|
for (int32 i = 0; i < fPackageLists.CountItems(); i++) {
|
||||||
if (fPackageLists.ItemAtFast(i)->Contains(package)) {
|
if (fPackageLists.ItemAtFast(i)->Contains(package)) {
|
||||||
printf(" contained in %ld\n", i);
|
printf(" contained in %" PRId32 "\n", i);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
* Alexandre Deckner <[email protected]>
|
* Alexandre Deckner <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define __STDC_FORMAT_MACROS
|
||||||
|
|
||||||
#include "StaticMesh.h"
|
#include "StaticMesh.h"
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
@@ -14,6 +16,7 @@
|
|||||||
#include <File.h>
|
#include <File.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -49,13 +52,13 @@ StaticMesh::_ReadText(const char* fileName)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fscanf(f, "%lu", &fFaceCount);
|
fscanf(f, "%" PRIu32, &fFaceCount);
|
||||||
fFaces = new Face[fFaceCount];
|
fFaces = new Face[fFaceCount];
|
||||||
|
|
||||||
for (uint32 i = 0; i < fFaceCount; i++) {
|
for (uint32 i = 0; i < fFaceCount; i++) {
|
||||||
|
|
||||||
uint32 vertexCount = 0;
|
uint32 vertexCount = 0;
|
||||||
fscanf(f, "%lu", &vertexCount);
|
fscanf(f, "%" PRIu32, &vertexCount);
|
||||||
fFaces[i].vertexCount = vertexCount;
|
fFaces[i].vertexCount = vertexCount;
|
||||||
|
|
||||||
for (uint32 vi = 0; vi < vertexCount; vi++) {
|
for (uint32 vi = 0; vi < vertexCount; vi++) {
|
||||||
@@ -68,7 +71,8 @@ StaticMesh::_ReadText(const char* fileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
printf("Mesh::_ReadText, loaded %s (%lu faces)\n", fileName, fFaceCount);
|
printf("Mesh::_ReadText, loaded %s (%" PRIu32 " faces)\n",
|
||||||
|
fileName, fFaceCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +93,8 @@ StaticMesh::_WriteBinary(const char* fileName)
|
|||||||
file.Write(&fFaces[i].v[vi], sizeof(Vertex));
|
file.Write(&fFaces[i].v[vi], sizeof(Vertex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("Mesh::_WriteBinary, wrote %s (%lu faces)\n", fileName, fFaceCount);
|
printf("Mesh::_WriteBinary, wrote %s (%" PRIu32 " faces)\n",
|
||||||
|
fileName, fFaceCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -111,7 +116,8 @@ StaticMesh::_ReadBinary(const char* fileName)
|
|||||||
file.Read(&fFaces[i].v[vi], sizeof(Vertex));
|
file.Read(&fFaces[i].v[vi], sizeof(Vertex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("Mesh::_ReadBinary, loaded %s (%lu faces)\n", fileName, fFaceCount);
|
printf("Mesh::_ReadBinary, loaded %s (%" PRIu32 " faces)\n",
|
||||||
|
fileName, fFaceCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -146,8 +152,8 @@ StaticMesh::_ReadResource(const char* resourceName)
|
|||||||
memoryIO.Read(&fFaces[i].v[vi], sizeof(Vertex));
|
memoryIO.Read(&fFaces[i].v[vi], sizeof(Vertex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("Mesh::_ReadResource, loaded %s (%lu faces)\n", resourceName,
|
printf("Mesh::_ReadResource, loaded %s (%" PRIu32 " faces)\n",
|
||||||
fFaceCount);
|
resourceName, fFaceCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,18 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* Alexandre Deckner <[email protected]>
|
* Alexandre Deckner <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define __STDC_FORMAT_MACROS
|
||||||
|
|
||||||
#include "BitmapTexture.h"
|
#include "BitmapTexture.h"
|
||||||
|
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -43,8 +46,8 @@ BitmapTexture::_Load(BBitmap* bitmap) {
|
|||||||
0, GL_BGRA, GL_UNSIGNED_BYTE,
|
0, GL_BGRA, GL_UNSIGNED_BYTE,
|
||||||
bitmap->Bits());
|
bitmap->Bits());
|
||||||
|
|
||||||
printf("BitmapTexture::_Load, loaded texture %u (%li, %li, %libits)\n",
|
printf("BitmapTexture::_Load, loaded texture %u (%" PRIi32 ", %" PRIi32 ", "
|
||||||
fId, (int32) bitmap->Bounds().Width(),
|
"%" PRIi32 "bits)\n", fId, (int32) bitmap->Bounds().Width(),
|
||||||
(int32) bitmap->Bounds().Height(),
|
(int32) bitmap->Bounds().Height(),
|
||||||
8 * bitmap->BytesPerRow() / (int)bitmap->Bounds().Width());
|
8 * bitmap->BytesPerRow() / (int)bitmap->Bounds().Width());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user