diff options
author | Robin Watts | 2008-11-29 18:01:16 +0000 |
---|---|---|
committer | Robin Watts | 2008-11-29 18:01:16 +0000 |
commit | 8f3b2e9b4d9f1f82682e1eed018153091cddee9f (patch) | |
tree | f2af64fa467e70a3ba25e9c615baa053e0818d88 | |
parent | 362bdf87d78f611f3e308e7e9234831208b93d68 (diff) | |
download | scummvm-rg350-8f3b2e9b4d9f1f82682e1eed018153091cddee9f.tar.gz scummvm-rg350-8f3b2e9b4d9f1f82682e1eed018153091cddee9f.tar.bz2 scummvm-rg350-8f3b2e9b4d9f1f82682e1eed018153091cddee9f.zip |
Remove warnings from NDS build.
svn-id: r35172
-rw-r--r-- | backends/fs/ds/ds-fs.cpp | 2 | ||||
-rw-r--r-- | backends/fs/stdiostream.cpp | 1 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/fat/disc_io.c | 54 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/wordcompletion.cpp | 5 | ||||
-rw-r--r-- | engines/agi/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/agos/script_s1.cpp | 2 | ||||
-rw-r--r-- | engines/agos/zones.cpp | 18 | ||||
-rw-r--r-- | engines/gob/sound/adlib.cpp | 4 | ||||
-rw-r--r-- | engines/lure/hotspots.cpp | 2 | ||||
-rw-r--r-- | engines/lure/menu.cpp | 4 | ||||
-rw-r--r-- | engines/saga/actor.cpp | 8 | ||||
-rw-r--r-- | engines/saga/interface.cpp | 2 | ||||
-rw-r--r-- | engines/saga/music.cpp | 2 | ||||
-rw-r--r-- | engines/saga/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/saga/sound.cpp | 2 | ||||
-rw-r--r-- | engines/saga/sprite.cpp | 42 | ||||
-rw-r--r-- | engines/scumm/resource_v2.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/sky/text.cpp | 4 | ||||
-rw-r--r-- | graphics/scaler.cpp | 6 | ||||
-rw-r--r-- | graphics/scaler/scalebit.cpp | 2 | ||||
-rw-r--r-- | sound/mpu401.cpp | 2 | ||||
-rw-r--r-- | sound/softsynth/ym2612.cpp | 2 |
23 files changed, 97 insertions, 84 deletions
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp index dda176bbcc..c0692c0713 100644 --- a/backends/fs/ds/ds-fs.cpp +++ b/backends/fs/ds/ds-fs.cpp @@ -588,7 +588,7 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) { return bytes / size; } - if ((size_t)(handle->pos + size * numItems) > handle->size) { + if ((int)(handle->pos + size * numItems) > handle->size) { numItems = (handle->size - handle->pos) / size; if (numItems < 0) numItems = 0; } diff --git a/backends/fs/stdiostream.cpp b/backends/fs/stdiostream.cpp index 3b0de253ab..d0592c8e50 100644 --- a/backends/fs/stdiostream.cpp +++ b/backends/fs/stdiostream.cpp @@ -85,6 +85,7 @@ #define fseek(handle, offset, whence) DS::std_fseek(handle, offset, whence) #define clearerr(handle) DS::std_clearerr(handle) #define fflush(file) DS::std_fflush(file) + #undef ferror #define ferror(handle) DS::std_ferror(handle) #endif diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c index 6d48674d62..9a65812f89 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.c +++ b/backends/platform/ds/arm9/source/fat/disc_io.c @@ -5,7 +5,7 @@ uniformed io-interface to work with Chishm's FAT library Written by MightyMax - + Modified by Chishm: 2005-11-06 * Added WAIT_CR modifications for NDS @@ -28,13 +28,13 @@ * Added EFA2 support */ -#include "disc_io.h" -#include "scummconsole.h" - #ifdef NDS #include <nds.h> #endif +#include "disc_io.h" +#include "scummconsole.h" + // Include known io-interfaces: #ifdef SUPPORT_MPCF @@ -87,7 +87,7 @@ LPIO_INTERFACE active_interface = 0; Disc Cache functions 2006-02-03: - Added by www.neoflash.com + Added by www.neoflash.com */ int discDetect = 0; @@ -99,7 +99,7 @@ int dldiFound = FALSE; #include <string.h> #define CACHE_FREE 0xFFFFFFFF - + static u8 cacheBuffer[ DISC_CACHE_COUNT * 512 ]; static struct { @@ -112,20 +112,20 @@ FATDevice currentDevice; static u32 disc_CacheFind(u32 sector) { u32 i; - + for( i = 0; i < DISC_CACHE_COUNT; i++ ) { if( cache[ i ].sector == sector ) return i; } - + return CACHE_FREE; } static u32 disc_CacheFindFree(void) { - + u32 i = 0, j; u32 count = -1; - + for( j = 0; j < DISC_CACHE_COUNT; j++ ) { if( cache[ j ].sector == CACHE_FREE ) { @@ -142,7 +142,7 @@ static u32 disc_CacheFindFree(void) { if( cache[ i ].sector != CACHE_FREE && cache[i].dirty != 0 ) { active_interface->fn_WriteSectors( cache[ i ].sector, 1, &cacheBuffer[ i * 512 ] ); - /* todo: handle write error here + // todo: handle write error here cache[ i ].sector = CACHE_FREE; cache[ i ].dirty = 0; @@ -368,7 +368,7 @@ bool disc_setDsSlotInterface (void) active_interface = DLDI_GetInterface(); - if (stricmp(&_dldi_driver_name, "Default (No interface)")) { + if (stricmp((char *)(&_dldi_driver_name), "Default (No interface)")) { char name[48]; memcpy(name, &_dldi_driver_name, 48); name[47] = '\0'; @@ -431,7 +431,7 @@ bool disc_setDsSlotInterface (void) #endif -bool disc_Init(void) +bool disc_Init(void) { #ifdef DISC_CACHE disc_CacheInit(); @@ -455,15 +455,15 @@ bool disc_Init(void) // could not find a working IO Interface active_interface = 0 ; return false ; -} +} -bool disc_IsInserted(void) +bool disc_IsInserted(void) { if (active_interface) return active_interface->fn_IsInserted() ; return false ; -} +} -bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer) +bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer) { #ifdef DISC_CACHE u8 *p=(u8*)buffer; @@ -480,9 +480,9 @@ bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer) if (active_interface) return active_interface->fn_ReadSectors(sector,numSecs,buffer) ; return false ; #endif -} +} -bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer) +bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer) { /*#ifdef DISC_CACHE u8 *p=(u8*)buffer; @@ -513,32 +513,32 @@ bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer) int r; for (r = 0; r < numSecs; r++) { - memcpy(sectorBuffer, &buffer[r * 512], 512); + memcpy(sectorBuffer, &((char *)buffer)[r * 512], 512); if (!active_interface->fn_WriteSectors(sector + r, 1, sectorBuffer)) { return false; } } - + return true; } #else if (active_interface) return active_interface->fn_WriteSectors(sector,numSecs,buffer) ; - return false ; #endif //#endif -} + return false ; +} -bool disc_ClearStatus(void) +bool disc_ClearStatus(void) { if (active_interface) return active_interface->fn_ClearStatus() ; return false ; -} +} -bool disc_Shutdown(void) +bool disc_Shutdown(void) { #ifdef DISC_CACHE disc_CacheFlush(); @@ -546,7 +546,7 @@ bool disc_Shutdown(void) if (active_interface) active_interface->fn_Shutdown() ; active_interface = 0 ; return true ; -} +} u32 disc_HostType (void) { diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp index ff52572a40..60ac673b69 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.cpp +++ b/backends/platform/ds/arm9/source/wordcompletion.cpp @@ -70,7 +70,6 @@ void sortAutoCompleteWordList() { // Sends the current available words to the virtual keyboard code for display bool findWordCompletions(char* input) { - char testWord[32]; int min = 0; int max = wordBufferPtrPos - 1; char* word; @@ -136,7 +135,7 @@ bool findWordCompletions(char* input) bool match = true; - for (int r = 0; r < strlen(partialWord); r++) { + for (int r = 0; partialWord[r] != 0; r++) { if (word[r] != partialWord[r]) { match = false; break; @@ -155,7 +154,7 @@ bool findWordCompletions(char* input) do { - for (int r = 0; r < strlen(partialWord); r++) { + for (int r = 0; partialWord[r] != 0; r++) { if (word[r] != partialWord[r]) { match = false; break; diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp index e8fb2522b1..3aedbfb9f3 100644 --- a/engines/agi/saveload.cpp +++ b/engines/agi/saveload.cpp @@ -80,8 +80,8 @@ int AgiEngine::saveGame(const char *fileName, const char *description) { tm curTime; _system->getTimeAndDate(curTime); - uint32 saveDate = (curTime.tm_mday & 0xFF) << 24 | ((curTime.tm_mon + 1) & 0xFF) << 16 | (curTime.tm_year + 1900) & 0xFFFF; - uint16 saveTime = (curTime.tm_hour & 0xFF) << 8 | (curTime.tm_min) & 0xFF; + uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF); + uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF); out->writeUint32BE(saveDate); debugC(5, kDebugLevelMain | kDebugLevelSavegame, "Writing save date (%d)", saveDate); diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp index 145d4a2694..030a4e5d74 100644 --- a/engines/agos/script_s1.cpp +++ b/engines/agos/script_s1.cpp @@ -481,7 +481,7 @@ void AGOSEngine_Simon1::os1_getPathPosn() { } x_diff += y_diff /= 4; - if (x_diff < best_dist || x_diff == best_dist && prev_i == i) { + if ((x_diff < best_dist) || ((x_diff == best_dist) && (prev_i == i))) { best_dist = x_diff; best_i = maxPath + 1 - i; best_j = j; diff --git a/engines/agos/zones.cpp b/engines/agos/zones.cpp index e754baec10..79199c90f1 100644 --- a/engines/agos/zones.cpp +++ b/engines/agos/zones.cpp @@ -197,9 +197,9 @@ void AGOSEngine_Feeble::checkZonePtrs() { uint count = ARRAYSIZE(_vgaBufferPointers); VgaPointersEntry *vpe = _vgaBufferPointers; do { - if (vpe->vgaFile1 < _blockEnd && vpe->vgaFile1End > _block || - vpe->vgaFile2 < _blockEnd && vpe->vgaFile2End > _block || - vpe->sfxFile < _blockEnd && vpe->sfxFileEnd > _block) { + if (((vpe->vgaFile1 < _blockEnd) && (vpe->vgaFile1End > _block)) || + ((vpe->vgaFile2 < _blockEnd) && (vpe->vgaFile2End > _block)) || + ((vpe->sfxFile < _blockEnd) && (vpe->sfxFileEnd > _block))) { vpe->vgaFile1 = NULL; vpe->vgaFile1End = NULL; vpe->vgaFile2 = NULL; @@ -218,8 +218,8 @@ void AGOSEngine::checkNoOverWrite() { vpe = &_vgaBufferPointers[_noOverWrite]; - if (_block <= vpe->vgaFile1 && _blockEnd >= vpe->vgaFile1 || - _vgaMemPtr <= vpe->vgaFile2 && _blockEnd >= vpe->vgaFile2) { + if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) || + ((_vgaMemPtr <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) { _rejectBlock = true; _vgaMemPtr = vpe->vgaFile1 + 0x5000; } else { @@ -232,8 +232,8 @@ void AGOSEngine::checkAnims(uint a) { vpe = &_vgaBufferPointers[a]; - if (_block <= vpe->vgaFile1 && _blockEnd >= vpe->vgaFile1 || - _block <= vpe->vgaFile2 && _blockEnd >= vpe->vgaFile2) { + if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) || + ((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) { _rejectBlock = true; _vgaMemPtr = vpe->vgaFile1 + 0x5000; } else { @@ -245,8 +245,8 @@ void AGOSEngine::checkZonePtrs() { uint count = ARRAYSIZE(_vgaBufferPointers); VgaPointersEntry *vpe = _vgaBufferPointers; do { - if (_block <= vpe->vgaFile1 && _blockEnd >= vpe->vgaFile1 || - _block <= vpe->vgaFile2 && _blockEnd >= vpe->vgaFile2) { + if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) || + ((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) { vpe->vgaFile1 = NULL; vpe->vgaFile2 = NULL; } diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index b3d392ad1e..90f7852b33 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -165,8 +165,8 @@ void AdLib::reset() { for (int i = 0; i < 9; i++) { writeOPL(0xA0 | i, 0); writeOPL(0xB0 | i, 0); - writeOPL(0xE0 | _operators[i] , 0); - writeOPL(0xE0 | _operators[i] + 3, 0); + writeOPL(0xE0 | _operators[i] , 0); + writeOPL(0xE0 |(_operators[i] + 3), 0); } // Authorize the control of the waveformes diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp index 57863c0feb..8c9a20ba7e 100644 --- a/engines/lure/hotspots.cpp +++ b/engines/lure/hotspots.cpp @@ -728,7 +728,7 @@ void Hotspot::updateMovement2(CharacterMode value) { } void Hotspot::resetPosition() { - setPosition(x() & 0xf8 | 5, y()); + setPosition((x() & 0xf8) | 5, y()); setDirection(direction()); } diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp index 112e6116a2..5027e6967e 100644 --- a/engines/lure/menu.cpp +++ b/engines/lure/menu.cpp @@ -480,10 +480,10 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) { byte whiteColour = isEGA ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR; - uint16 oldX = mouse.x(); - uint16 oldY = mouse.y(); const uint16 yMiddle = FULL_SCREEN_HEIGHT / 2; #ifndef LURE_CLICKABLE_MENUS + uint16 oldX = mouse.x(); + uint16 oldY = mouse.y(); mouse.cursorOff(); mouse.setPosition(FULL_SCREEN_WIDTH / 2, yMiddle); diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index 96d901fbba..52c07faca3 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -925,8 +925,8 @@ uint16 Actor::hitTest(const Point &testPoint, bool skipProtagonist) { CommonObjectOrderList::iterator drawOrderIterator; CommonObjectDataPointer drawObject; - int frameNumber; - SpriteList *spriteList; + int frameNumber = 0; + SpriteList *spriteList = NULL; createDrawOrderList(); @@ -1044,8 +1044,8 @@ void Actor::drawActors() { CommonObjectOrderList::iterator drawOrderIterator; CommonObjectDataPointer drawObject; - int frameNumber; - SpriteList *spriteList; + int frameNumber = 0; + SpriteList *spriteList = NULL; Surface *backBuffer; diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index 38d126c5d4..4f4c90fc9c 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -1243,7 +1243,7 @@ bool Interface::processTextInput(Common::KeyState keystate) { _textInputPos = _textInputStringLength + 1; break; default: - if (keystate.ascii <= 255 && isalnum(keystate.ascii) || (keystate.ascii == ' ') || + if (((keystate.ascii <= 255) && (isalnum(keystate.ascii))) || (keystate.ascii == ' ') || (keystate.ascii == '-') || (keystate.ascii == '_')) { if (_textInputStringLength < save_title_size - 1) { ch[0] = keystate.ascii; diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 328dee3566..b4a8f23203 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -139,7 +139,9 @@ DigitalMusicInputStream::~DigitalMusicInputStream() { } void DigitalMusicInputStream::createCompressedStream() { +#if defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_FLAC) uint numLoops = _looping ? 0 : 1; +#endif _memoryStream = _file->readStream(resourceData->size - 9); switch (soundType) { diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp index 7e85338a8d..d84435fc5d 100644 --- a/engines/saga/saveload.cpp +++ b/engines/saga/saveload.cpp @@ -190,8 +190,8 @@ void SagaEngine::save(const char *fileName, const char *saveName) { tm curTime; _system->getTimeAndDate(curTime); - uint32 saveDate = (curTime.tm_mday & 0xFF) << 24 | ((curTime.tm_mon + 1) & 0xFF) << 16 | (curTime.tm_year + 1900) & 0xFFFF; - uint16 saveTime = (curTime.tm_hour & 0xFF) << 8 | (curTime.tm_min) & 0xFF; + uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF); + uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF); out->writeUint32BE(saveDate); out->writeUint16BE(saveTime); diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp index 1d41d39cf2..107b637167 100644 --- a/engines/saga/sound.cpp +++ b/engines/saga/sound.cpp @@ -92,7 +92,9 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int buffer.size, buffer.frequency, flags, -1, volume); } else { Audio::AudioStream *stream = NULL; +#if defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_FLAC) MemoryReadStream *tmp = NULL; +#endif switch (buffer.soundType) { #ifdef USE_MAD diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index a1f78e1b9f..879299e290 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -254,11 +254,11 @@ void Sprite::drawClip(Surface *ds, const Rect &clipRect, const Point &spritePoin } void Sprite::draw(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int32 spriteNumber, const Point &screenCoord, int scale) { - const byte *spriteBuffer; - int width; - int height; - int xAlign; - int yAlign; + const byte *spriteBuffer = NULL; + int width = 0; + int height = 0; + int xAlign = 0; + int yAlign = 0; Point spritePointer; getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer); @@ -270,11 +270,13 @@ void Sprite::draw(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int } void Sprite::draw(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int32 spriteNumber, const Rect &screenRect, int scale) { - const byte *spriteBuffer; - int width; - int height; - int xAlign, spw; - int yAlign, sph; + const byte *spriteBuffer = NULL; + int width = 0; + int height = 0; + int xAlign = 0; + int spw; + int yAlign = 0; + int sph; Point spritePointer; getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer); @@ -292,13 +294,13 @@ void Sprite::draw(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int } bool Sprite::hitTest(SpriteList &spriteList, int spriteNumber, const Point &screenCoord, int scale, const Point &testPoint) { - const byte *spriteBuffer; + const byte *spriteBuffer = NULL; int i, j; const byte *srcRowPointer; - int width; - int height; - int xAlign; - int yAlign; + int width = 0; + int height = 0; + int xAlign = 0; + int yAlign = 0; Point spritePointer; getScaledSpriteBuffer(spriteList, spriteNumber, scale, width, height, xAlign, yAlign, spriteBuffer); @@ -319,17 +321,17 @@ bool Sprite::hitTest(SpriteList &spriteList, int spriteNumber, const Point &scre } void Sprite::drawOccluded(Surface *ds, const Rect &clipRect, SpriteList &spriteList, int spriteNumber, const Point &screenCoord, int scale, int depth) { - const byte *spriteBuffer; + const byte *spriteBuffer = NULL; int x, y; byte *destRowPointer; const byte *sourceRowPointer; const byte *sourcePointer; byte *destPointer; byte *maskPointer; - int width; - int height; - int xAlign; - int yAlign; + int width = NULL; + int height = 0; + int xAlign = 0; + int yAlign = 0; ClipData clipData; diff --git a/engines/scumm/resource_v2.cpp b/engines/scumm/resource_v2.cpp index 323aff849e..76e451183f 100644 --- a/engines/scumm/resource_v2.cpp +++ b/engines/scumm/resource_v2.cpp @@ -194,10 +194,11 @@ void ScummEngine_v2::readIndexFile() { break; case 0x132: printf("C64 V1 game detected\n"); - if (_game.id == GID_MANIAC) + if (_game.id == GID_MANIAC) { assert(_game.version == 0); - else + } else { assert(_game.version == 1); + } readClassicIndexFile(); break; case 0x032: diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 5fdd340fc9..577e338384 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -644,8 +644,8 @@ void ScummEngine::saveInfos(Common::WriteStream* file) { tm curTime; _system->getTimeAndDate(curTime); - section.date = (curTime.tm_mday & 0xFF) << 24 | ((curTime.tm_mon + 1) & 0xFF) << 16 | (curTime.tm_year + 1900) & 0xFFFF; - section.time = (curTime.tm_hour & 0xFF) << 8 | (curTime.tm_min) & 0xFF; + section.date = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF); + section.time = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF); file->writeUint32BE(section.type); file->writeUint32BE(section.version); diff --git a/engines/sky/text.cpp b/engines/sky/text.cpp index 19080d8ff9..88e42954cb 100644 --- a/engines/sky/text.cpp +++ b/engines/sky/text.cpp @@ -376,12 +376,12 @@ void Text::makeGameCharacter(uint8 textChar, uint8 *charSetPtr, uint8 *&dest, ui dataBit = (data & 0x8000) != 0; //check data data <<= 1; - if (maskBit) + if (maskBit) { if (dataBit) *curPos = color; else *curPos = 240; //black edge - + } curPos++; } //advance a line diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 395ea31e75..868ecb6ab7 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -127,6 +127,12 @@ void DestroyScalers(){ */ void Normal1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { + /* Spot the case when it can all be done in 1 hit */ + if (((int)srcPitch == 2*width) && ((int)dstPitch == 2*width)) + { + width *= height; + height = 1; + } while (height--) { memcpy(dstPtr, srcPtr, 2 * width); srcPtr += srcPitch; diff --git a/graphics/scaler/scalebit.cpp b/graphics/scaler/scalebit.cpp index 2210697d71..a6fd8df58f 100644 --- a/graphics/scaler/scalebit.cpp +++ b/graphics/scaler/scalebit.cpp @@ -131,7 +131,7 @@ static void scale2x(void* void_dst, unsigned dst_slice, const void* void_src, un } /** - * Apply the Scale32x effect on a bitmap. + * Apply the Scale3x effect on a bitmap. * The destination bitmap is filled with the scaled version of the source bitmap. * The source bitmap isn't modified. * The destination bitmap must be manually allocated before calling the function, diff --git a/sound/mpu401.cpp b/sound/mpu401.cpp index c2158f1329..fe18a3ee85 100644 --- a/sound/mpu401.cpp +++ b/sound/mpu401.cpp @@ -44,7 +44,7 @@ MidiDriver *MidiChannel_MPU401::device() { } void MidiChannel_MPU401::send(uint32 b) { - _owner->send(b & 0xFFFFFFF0 | (_channel & 0xF)); + _owner->send((b & 0xFFFFFFF0) | (_channel & 0xF)); } void MidiChannel_MPU401::noteOff(byte note) { diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index efdf292150..7dac630ef9 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -716,7 +716,7 @@ void MidiDriver_YM2612::createLookupTables() { int f10 = (fnum[i] >> 9) & 1; int f11 = (fnum[i] >> 10) & 1; int n4 = f11; - int n3 = f11&(f10|f9|f8) | (~f11&f10&f9&f8); + int n3 = (f11&(f10|f9|f8)) | (~f11&f10&f9&f8); int note = n4*2 + n3; // see p.207 keycodeTable[(block+1)*12+i] = block*4 + note; |