AGI: Fix warnings
This commit is contained in:
parent
f6a9c6727d
commit
d0bb81f566
3 changed files with 4 additions and 5 deletions
|
@ -1083,7 +1083,7 @@ void GfxMgr::putPixelsA(int x, int y, int n, uint8 *p) {
|
|||
|
||||
// Choose the correct screen to read from. If AGI256 or AGI256-2 is used and we're not trying to show the priority information,
|
||||
// then choose the 256 color screen, otherwise choose the 16 color screen (Which also has the priority information).
|
||||
p += _vm->getFeatures() & (GF_AGI256 | GF_AGI256_2) && !_vm->_debug.priority ? FROM_SBUF16_TO_SBUF256_OFFSET : 0;
|
||||
p += ((_vm->getFeatures() & (GF_AGI256 | GF_AGI256_2)) && !_vm->_debug.priority) ? FROM_SBUF16_TO_SBUF256_OFFSET : 0;
|
||||
|
||||
if (_vm->_renderMode == Common::kRenderCGA) {
|
||||
for (x *= 2; n--; p++, x += 2) {
|
||||
|
@ -1091,7 +1091,7 @@ void GfxMgr::putPixelsA(int x, int y, int n, uint8 *p) {
|
|||
*(uint16 *)&_agiScreen[x + y * GFX_WIDTH] = (q >> rShift) & 0x0f0f;
|
||||
}
|
||||
} else {
|
||||
const uint16 mask = _vm->getFeatures() & (GF_AGI256 | GF_AGI256_2) && !_vm->_debug.priority ? 0xffff : 0x0f0f;
|
||||
const uint16 mask = ((_vm->getFeatures() & (GF_AGI256 | GF_AGI256_2)) && !_vm->_debug.priority) ? 0xffff : 0x0f0f;
|
||||
for (x *= 2; n--; p++, x += 2) {
|
||||
register uint16 q = ((uint16)*p << 8) | *p;
|
||||
*(uint16 *)&_agiScreen[x + y * GFX_WIDTH] = (q >> rShift) & mask;
|
||||
|
|
|
@ -300,7 +300,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
|
|||
_game.state = (State)in->readByte();
|
||||
|
||||
in->read(loadId, 8);
|
||||
if (strcmp(loadId, _game.id) && checkId) {
|
||||
if (strcmp(loadId, _game.id) != 0 && checkId) {
|
||||
delete in;
|
||||
warning("This save seems to be from a different AGI game (save from %s, running %s), not loaded", loadId, _game.id);
|
||||
return errBadFileOpen;
|
||||
|
@ -331,7 +331,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
|
|||
warning("Since your game was only detected via the fallback detector, there is no possibility to assure the save is compatible with your game version");
|
||||
|
||||
debug(0, "The game used for saving is \"%s\".", md5);
|
||||
} else if (strcmp(md5, getGameMD5())) {
|
||||
} else if (strcmp(md5, getGameMD5()) != 0) {
|
||||
warning("Game was saved with different gamedata - you may encounter problems");
|
||||
|
||||
debug(0, "Your game is \"%s\" and save is \"%s\".", getGameMD5(), md5);
|
||||
|
|
|
@ -240,7 +240,6 @@ char *AgiEngine::wordWrapString(const char *s, int *len) {
|
|||
|
||||
while (*s) {
|
||||
pWord = s;
|
||||
wLen = 0;
|
||||
|
||||
while (*s != '\0' && *s != ' ' && *s != '\n' && *s != '\r')
|
||||
s++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue