aboutsummaryrefslogtreecommitdiff
path: root/engines/cryo
diff options
context:
space:
mode:
authorD G Turner2018-07-29 03:32:40 +0100
committerD G Turner2018-07-29 03:32:40 +0100
commit733cb7dcc728763b65eab9b11d955e1aa13e16ad (patch)
treefad75d907fd1fa75c94e220fa08dba3ff4314401 /engines/cryo
parent275fc30f2716f742079574080d4260c8328b9401 (diff)
downloadscummvm-rg350-733cb7dcc728763b65eab9b11d955e1aa13e16ad.tar.gz
scummvm-rg350-733cb7dcc728763b65eab9b11d955e1aa13e16ad.tar.bz2
scummvm-rg350-733cb7dcc728763b65eab9b11d955e1aa13e16ad.zip
CRYO: Fix Debug Statement Format String Compiler Warnings.
Some of the debug statements in the engine compute values or sizes of various items by pointer subtraction (which is probably not recommended; I am not sure if this is why some of the structs were previous packed as noted and removed by snover). In any case, the subtractions should result in relatively small integer values, but using these into debug() calls with printf style format strings can cause warnings from the compiler with the format specifier depending on the underlying pointer sizes. To avoid these, have recast these to int. If this does cause any issues, they should be limited to debug() value changes and thus not a functional issue with the engine, which can be corrected by the engine developers.
Diffstat (limited to 'engines/cryo')
-rw-r--r--engines/cryo/eden.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index c4a76a47a2..bf8fbe4e4a 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -2012,7 +2012,7 @@ void EdenGame::loadCharacter(perso_t *perso) {
ptr += READ_LE_UINT16(ptr) - 2;
_globals->_persoSpritePtr = baseptr;
_globals->_persoSpritePtr2 = baseptr + READ_LE_UINT16(ptr);
- debug("load perso: b6 len is %ld", _globals->_persoSpritePtr2 - _globals->_persoSpritePtr);
+ debug("load perso: b6 len is %d", (int)(_globals->_persoSpritePtr2 - _globals->_persoSpritePtr));
} else {
useBank(_globals->_characterImageBank);
_characterBankData = _bankData;
@@ -3182,7 +3182,7 @@ void EdenGame::dialautooff() {
void EdenGame::follow() {
if (_globals->_roomCharacterType == PersonFlags::pfType12) {
- debug("follow: hiding person %ld", _globals->_roomCharacterPtr - _persons);
+ debug("follow: hiding person %d", (int)(_globals->_roomCharacterPtr - _persons));
_globals->_roomCharacterPtr->_flags |= PersonFlags::pf80;
_globals->_roomCharacterPtr->_roomNum = 0;
_globals->_gameFlags |= GameFlags::gfFlag8;
@@ -5845,7 +5845,7 @@ void EdenGame::perso_ici(int16 action) {
// Original name: setpersohere
void EdenGame::setCharacterHere() {
- debug("setCharacterHere, perso is %ld", _globals->_characterPtr - _persons);
+ debug("setCharacterHere, perso is %d", (int)(_globals->_characterPtr - _persons));
_globals->_partyOutside = 0;
_globals->_party = 0;
_globals->_roomCharacterPtr = nullptr;
@@ -5871,7 +5871,7 @@ void EdenGame::faire_suivre(int16 roomNum) {
// Original name: suis_moi5
void EdenGame::AddCharacterToParty() {
- debug("adding person %ld to party", _globals->_characterPtr - _persons);
+ debug("adding person %d to party", (int)(_globals->_characterPtr - _persons));
_globals->_characterPtr->_flags |= PersonFlags::pfInParty;
_globals->_characterPtr->_roomNum = _globals->_roomNum;
_globals->_party |= _globals->_characterPtr->_partyMask;
@@ -5888,7 +5888,7 @@ void EdenGame::addToParty(int16 index) {
// Original name: reste_ici5
void EdenGame::removeCharacterFromParty() {
- debug("removing person %ld from party", _globals->_characterPtr - _persons);
+ debug("removing person %d from party", (int)(_globals->_characterPtr - _persons));
_globals->_characterPtr->_flags &= ~PersonFlags::pfInParty;
_globals->_partyOutside |= _globals->_characterPtr->_partyMask;
_globals->_party &= ~_globals->_characterPtr->_partyMask;