JANITORIAL: Add some long casts to match %ld format

Needed on Win64 compilation.
This commit is contained in:
Orgad Shaneh 2022-06-02 23:23:15 +03:00 committed by Eugene Sandulenko
parent 09aa76d048
commit b2322a8c4f
8 changed files with 13 additions and 11 deletions

View File

@ -2481,7 +2481,7 @@ void QDM2Stream::qdm2_synthesis_filter(uint8 index)
}
bool QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream &in, QueuingAudioStream *audioStream) {
debug(1, "QDM2Stream::qdm2_decodeFrame in.pos(): %ld in.size(): %ld", in.pos(), in.size());
debug(1, "QDM2Stream::qdm2_decodeFrame in.pos(): %ld in.size(): %ld", long(in.pos()), long(in.size()));
int ch, i;
const int frame_size = (_sFrameSize * _channels);

View File

@ -3238,7 +3238,7 @@ static void gagt_display_debug() {
paragraph ? paragraph->id + 1 : 0,
paragraph ? paragraph->line_count : 0,
paragraph && paragraph->special
? paragraph->special - GAGT_SPECIALS + 1 : 0,
? long(paragraph->special - GAGT_SPECIALS + 1) : 0,
line->buffer.allocation, line->buffer.length,
line->indent, line->outdent,
line->real_length,

View File

@ -306,7 +306,7 @@ bool Map::loadMap(char *name) {
}
bool Map::load(Common::SeekableReadStream *stream) {
debug(5, "map stream size: %ld(%lx)", stream->size(), stream->size());
debug(5, "map stream size: %ld(%lx)", long(stream->size()), long(stream->size()));
// Load MSM data header
stream->read(_name, 32);

View File

@ -44,7 +44,7 @@ bool LibFile::open(const Common::String &prefix, const Common::String &filename,
uint32 start = libfile.size();
FileEntry f;
libfile.seek(offset);
debugC(1, kHypnoDebugParser, "parsing at offset %d with size %li", offset, libfile.size());
debugC(1, kHypnoDebugParser, "parsing at offset %d with size %li", offset, long(libfile.size()));
while (true) {
f.name = "";
f.data.clear();

View File

@ -40,7 +40,7 @@ namespace Saga2 {
#define IMMED_WORD(w) ((w = *pc++),(w |= (*pc++)<<8)); \
debugC(3, kDebugScripts, "IMMED_WORD(%d 0x%04x)", w, w)
#define BRANCH(w) pc = codeSeg + (w); \
debugC(3, kDebugScripts, "BRANCH(%ld 0x%04lx)", pc - codeSeg, pc - codeSeg)
debugC(3, kDebugScripts, "BRANCH(%ld 0x%04lx)", long(pc - codeSeg), long(pc - codeSeg))
const uint32 sagaID = MKTAG('S', 'A', 'G', 'A'),
dataSegID = MKTAG('_', '_', 'D', 'A'),
@ -561,9 +561,9 @@ static void print_stack(int16 *stackBase, int16 *stack) {
}
#define D_OP(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s", (pc - codeSeg - 1), (pc - codeSeg - 1), #x)
#define D_OP1(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s = %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, *stack)
#define D_OP2(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] = %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, (void *)addr, *stack)
#define D_OP3(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] %d", (pc - codeSeg - 1), (pc - codeSeg - 1), #x, (void *)addr, *addr)
#define D_OP1(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s = %d", long(pc - codeSeg - 1), long(pc - codeSeg - 1), #x, *stack)
#define D_OP2(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] = %d", long(pc - codeSeg - 1), long(pc - codeSeg - 1), #x, (void *)addr, *stack)
#define D_OP3(x) debugC(1, kDebugScripts, "[%04ld 0x%04lx]: %s [%p] %d", long(pc - codeSeg - 1), long(pc - codeSeg - 1), #x, (void *)addr, *addr)
bool Thread::interpret() {
uint8 *pc,

View File

@ -726,7 +726,7 @@ ActorAppearance *LoadActorAppearance(uint32 id, int16 banksNeeded) {
const int poseSize = 14;
debugC(1, kDebugLoading, "Pose List: bytes: %ld numAnimations: %d poseOffset: %d calculated offset: %d numPoses: %d",
poseStream->size(), as->numAnimations, as->poseOffset, 8 + as->numAnimations * 32, poseBytes / poseSize);
long(poseStream->size()), as->numAnimations, as->poseOffset, 8 + as->numAnimations * 32, poseBytes / poseSize);
if (poseBytes % poseSize != 0)
warning("Incorrect number of poses, %d bytes more", poseBytes % poseSize);

View File

@ -91,7 +91,9 @@ void CloudTests::infoCallback(Cloud::Storage::StorageInfoResponse response) {
Testsuite::logPrintf("Info! User's ID: %s\n", response.value.uid().c_str());
Testsuite::logPrintf("Info! User's email: %s\n", response.value.email().c_str());
Testsuite::logPrintf("Info! User's name: %s\n", response.value.name().c_str());
Testsuite::logPrintf("Info! User's quota: %lu bytes used / %lu bytes available\n", response.value.used(), response.value.available());
Testsuite::logPrintf("Info! User's quota: %lu bytes used / %lu bytes available\n",
static_cast<unsigned long>(response.value.used()),
static_cast<unsigned long>(response.value.available()));
}
void CloudTests::directoryListedCallback(Cloud::Storage::FileArrayResponse response) {

View File

@ -256,7 +256,7 @@ int16 ScriptInterpreter::readInt16() {
void ScriptInterpreter::execOpcode(byte opcode) {
int16 ofs;
debug(2, "[%ld] %d", _code - _codeStart - 1, opcode);
debug(2, "[%ld] %d", long(_code - _codeStart - 1), opcode);
switch (opcode) {
case 0: