|
@@ -544,7 +544,7 @@ int TombRaider::Load(char *filename, void (*percent)(int))
|
544
|
544
|
|
545
|
545
|
_num_textiles = usz / sizeof(tr2_textile32_t);
|
546
|
546
|
|
547
|
|
- printDebug("LoadTR4", "_num_textiles = %i/%i = %i",
|
|
547
|
+ printDebug("LoadTR4", "_num_textiles = %i/%lu = %i",
|
548
|
548
|
usz, sizeof(tr2_textile32_t), _num_textiles);
|
549
|
549
|
|
550
|
550
|
_textile32 = new tr2_textile32_t[_num_textiles];
|
|
@@ -594,7 +594,7 @@ int TombRaider::Load(char *filename, void (*percent)(int))
|
594
|
594
|
|
595
|
595
|
_num_textiles = usz / sizeof(tr2_textile16_t);
|
596
|
596
|
|
597
|
|
- printDebug("Load", "TR4 _num_textiles = %i/%i = %i",
|
|
597
|
+ printDebug("Load", "TR4 _num_textiles = %i/%lu = %i",
|
598
|
598
|
usz, sizeof(tr2_textile16_t), _num_textiles);
|
599
|
599
|
|
600
|
600
|
_textile16 = new tr2_textile16_t[_num_textiles];
|
|
@@ -4769,7 +4769,7 @@ int TombRaider::Fread(void *buffer, size_t size, size_t count, FILE *f)
|
4769
|
4769
|
}
|
4770
|
4770
|
else
|
4771
|
4771
|
{
|
4772
|
|
- print("Fread(%p, %d, %d, %p)", "ERROR: Returned %d bytes too far",
|
|
4772
|
+ print("Fread", "(%p, %lu, %lu, %p) ERROR: Returned %d bytes too far",
|
4773
|
4773
|
buffer, size, count, f, num_read);
|
4774
|
4774
|
reset();
|
4775
|
4775
|
exit(2);
|
|
@@ -5122,7 +5122,7 @@ int TombRaider::loadTR5(FILE *f, void (*percent)(int))
|
5122
|
5122
|
|
5123
|
5123
|
_num_textiles = usz / sizeof(tr2_textile32_t);
|
5124
|
5124
|
|
5125
|
|
- printDebug("LoadTR5", "_num_textiles = %i/%i = %i",
|
|
5125
|
+ printDebug("LoadTR5", "_num_textiles = %i/%lu = %i",
|
5126
|
5126
|
usz, sizeof(tr2_textile32_t), _num_textiles);
|
5127
|
5127
|
|
5128
|
5128
|
_textile32 = new tr2_textile32_t[_num_textiles];
|
|
@@ -5169,7 +5169,7 @@ int TombRaider::loadTR5(FILE *f, void (*percent)(int))
|
5169
|
5169
|
|
5170
|
5170
|
_num_textiles = usz / sizeof(tr2_textile16_t);
|
5171
|
5171
|
|
5172
|
|
- printDebug("LoadTR5", "_num_textiles = %i/%i = %i",
|
|
5172
|
+ printDebug("LoadTR5", "_num_textiles = %i/%lu = %i",
|
5173
|
5173
|
usz, sizeof(tr2_textile16_t), _num_textiles);
|
5174
|
5174
|
|
5175
|
5175
|
_textile16 = new tr2_textile16_t[_num_textiles];
|
|
@@ -5435,7 +5435,7 @@ int TombRaider::loadTR5(FILE *f, void (*percent)(int))
|
5435
|
5435
|
// Start 20byte structure ///////////////
|
5436
|
5436
|
printDebug("LoadTR5", "20byte struct {");
|
5437
|
5437
|
Fread(mRoomsTR5[i].seperator6, 6, 1, f);
|
5438
|
|
- printDebug("LoadTR5", "6 bytes 0xFF = 0x%x%x%x%x%x",
|
|
5438
|
+ printDebug("LoadTR5", "6 bytes 0xFF = 0x%x%x%x%x%x%x",
|
5439
|
5439
|
mRoomsTR5[i].seperator6[0], mRoomsTR5[i].seperator6[1],
|
5440
|
5440
|
mRoomsTR5[i].seperator6[2], mRoomsTR5[i].seperator6[3],
|
5441
|
5441
|
mRoomsTR5[i].seperator6[4], mRoomsTR5[i].seperator6[5]);
|
|
@@ -5468,7 +5468,7 @@ int TombRaider::loadTR5(FILE *f, void (*percent)(int))
|
5468
|
5468
|
Fread(&mRoomsTR5[i].unknownR6, 4, 1, f);
|
5469
|
5469
|
printDebug("LoadTR5", "unknownR6 = %i", mRoomsTR5[i].unknownR6);
|
5470
|
5470
|
Fread(&mRoomsTR5[i].roomX, 4, 1, f);
|
5471
|
|
- printDebug("LoadTR5", "roomX = %i", mRoomsTR5[i].roomX);
|
|
5471
|
+ printDebug("LoadTR5", "roomX = %f", mRoomsTR5[i].roomX);
|
5472
|
5472
|
|
5473
|
5473
|
Fread(&mRoomsTR5[i].seperator9, 4, 1, f);
|
5474
|
5474
|
printDebug("LoadTR5", "seperator9 CDCDCDCD | 0x0 = 0x%x",
|
|
@@ -5483,7 +5483,7 @@ int TombRaider::loadTR5(FILE *f, void (*percent)(int))
|
5483
|
5483
|
}
|
5484
|
5484
|
|
5485
|
5485
|
Fread(&mRoomsTR5[i].roomZ, 4, 1, f);
|
5486
|
|
- printDebug("LoadTR5", "roomZ = %i", mRoomsTR5[i].roomZ);
|
|
5486
|
+ printDebug("LoadTR5", "roomZ = %f", mRoomsTR5[i].roomZ);
|
5487
|
5487
|
printDebug("LoadTR5", "}");
|
5488
|
5488
|
|
5489
|
5489
|
|
|
@@ -6218,7 +6218,7 @@ int TombRaider::loadTR5(FILE *f, void (*percent)(int))
|
6218
|
6218
|
|
6219
|
6219
|
if (u != 0xcdcdcdcd)
|
6220
|
6220
|
{
|
6221
|
|
- print("LoadTR5", "Check 0xCDCDCDCD != 0x%X @ %u", u, ftell(f));
|
|
6221
|
+ print("LoadTR5", "Check 0xCDCDCDCD != 0x%X @ %ld", u, ftell(f));
|
6222
|
6222
|
return -5;
|
6223
|
6223
|
}
|
6224
|
6224
|
|
|
@@ -6318,7 +6318,6 @@ int TombRaider::loadTR5(FILE *f, void (*percent)(int))
|
6318
|
6318
|
return 0;
|
6319
|
6319
|
}
|
6320
|
6320
|
|
6321
|
|
-
|
6322
|
6321
|
void TombRaider::print(const char *methodName, const char *s, ...)
|
6323
|
6322
|
{
|
6324
|
6323
|
va_list args;
|