diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp index 078a5a2d624..cff313cea4b 100644 --- a/backends/sdl/sdl.cpp +++ b/backends/sdl/sdl.cpp @@ -35,7 +35,7 @@ #if !defined(_WIN32_WCE) && !defined(__MAEMO__) #if defined (WIN32) -int WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*iShowCmd*/) { +int __stdcall WinMain(HINSTANCE /*hInst*/, HINSTANCE /*hPrevInst*/, LPSTR /*lpCmdLine*/, int /*iShowCmd*/) { SDL_SetModuleHandle(GetModuleHandle(NULL)); return main(__argc, __argv); } @@ -102,7 +102,6 @@ int main(int argc, char *argv[]) { } #endif - void OSystem_SDL::initBackend() { assert(!_inited); diff --git a/base/options.cpp b/base/commandLine.cpp similarity index 99% rename from base/options.cpp rename to base/commandLine.cpp index e01621af0a5..2dec1703f5a 100644 --- a/base/options.cpp +++ b/base/commandLine.cpp @@ -24,7 +24,7 @@ #include "common/stdafx.h" #include "base/engine.h" -#include "base/options.h" +#include "base/commandLine.h" #include "base/plugins.h" #include "base/version.h" diff --git a/base/options.h b/base/commandLine.h similarity index 100% rename from base/options.h rename to base/commandLine.h diff --git a/base/main.cpp b/base/main.cpp index c5f646c7a4c..292b57afdda 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -32,7 +32,7 @@ #include "common/stdafx.h" #include "backends/fs/fs.h" #include "base/engine.h" -#include "base/options.h" +#include "base/commandLine.h" #include "base/plugins.h" #include "base/version.h" #include "common/config-manager.h" diff --git a/base/module.mk b/base/module.mk index 5af0e1349cc..3a515b4f5c3 100644 --- a/base/module.mk +++ b/base/module.mk @@ -3,7 +3,7 @@ MODULE := base MODULE_OBJS := \ engine.o \ main.o \ - options.o \ + commandLine.o \ plugins.o \ version.o diff --git a/dists/msvc8/gob.vcproj b/dists/msvc8/gob.vcproj index f2c29bcbf3c..b2b61cab8dd 100644 --- a/dists/msvc8/gob.vcproj +++ b/dists/msvc8/gob.vcproj @@ -190,6 +190,14 @@ RelativePath="..\..\engines\gob\draw.h" > + + + + @@ -206,6 +214,14 @@ RelativePath="..\..\engines\gob\game.h" > + + + + @@ -238,6 +254,14 @@ RelativePath="..\..\engines\gob\init.h" > + + + + @@ -358,6 +382,14 @@ RelativePath="..\..\engines\gob\video.h" > + + + + diff --git a/dists/msvc8/kyra.vcproj b/dists/msvc8/kyra.vcproj index b0de755d4a5..c182546aa7d 100644 --- a/dists/msvc8/kyra.vcproj +++ b/dists/msvc8/kyra.vcproj @@ -190,6 +190,10 @@ RelativePath="..\..\engines\kyra\kyra.h" > + + diff --git a/dists/msvc8/scumm.vcproj b/dists/msvc8/scumm.vcproj index 0cee3729a59..5120208a329 100644 --- a/dists/msvc8/scumm.vcproj +++ b/dists/msvc8/scumm.vcproj @@ -310,6 +310,14 @@ + + + + @@ -418,6 +426,18 @@ RelativePath="..\..\engines\scumm\imuse\instrument.h" > + + + + + + + + + + @@ -207,17 +215,21 @@ > + + @@ -226,6 +238,10 @@ RelativePath="..\..\base\plugins.h" > + + @@ -275,11 +291,15 @@ > + + + + + + @@ -889,6 +917,10 @@ RelativePath="..\..\gui\TabWidget.h" > + + @@ -897,6 +929,10 @@ RelativePath="..\..\gui\theme.h" > + + diff --git a/dists/msvc8/simon.vcproj b/dists/msvc8/simon.vcproj index f5b8b162f7d..3c49c31a035 100644 --- a/dists/msvc8/simon.vcproj +++ b/dists/msvc8/simon.vcproj @@ -159,6 +159,14 @@ + + + + @@ -183,6 +191,14 @@ RelativePath="..\..\engines\simon\debugger.h" > + + + + @@ -239,6 +255,14 @@ RelativePath="..\..\engines\simon\sound.h" > + + + + @@ -251,6 +275,10 @@ RelativePath="..\..\engines\simon\vga.h" > + + diff --git a/dists/msvc8/sword2.vcproj b/dists/msvc8/sword2.vcproj index f91633e45b7..38def46c26c 100644 --- a/dists/msvc8/sword2.vcproj +++ b/dists/msvc8/sword2.vcproj @@ -186,10 +186,6 @@ RelativePath="..\..\engines\sword2\controls.h" > - - @@ -282,10 +278,6 @@ RelativePath="..\..\engines\sword2\protocol.cpp" > - - diff --git a/dists/scummvm.rc b/dists/scummvm.rc index a18e4bd76fb..e01a69fdd90 100644 --- a/dists/scummvm.rc +++ b/dists/scummvm.rc @@ -1,6 +1,6 @@ #include "winresrc.h" -IDI_ICON ICON DISCARDABLE "icons/scummvm.ico" +IDI_ICON ICON DISCARDABLE "../../icons/scummvm.ico" VS_VERSION_INFO VERSIONINFO FILEVERSION 0,9,0,0 diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in index 6cc4818be0d..8876989c499 100644 --- a/dists/scummvm.rc.in +++ b/dists/scummvm.rc.in @@ -1,6 +1,6 @@ #include "winresrc.h" -IDI_ICON ICON DISCARDABLE "icons/scummvm.ico" +IDI_ICON ICON DISCARDABLE "../../icons/scummvm.ico" VS_VERSION_INFO VERSIONINFO FILEVERSION @VER_MAJOR@,@VER_MINOR@,@VER_PATCH@,0 diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 44c00747605..e38fbf5934b 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -1201,7 +1201,7 @@ void CharsetRendererCommon::enableShadow(bool enable) { void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) { // Indy3 / Zak256 / Loom - int width, height, origWidth, origHeight; + int width, height, origWidth = 0, origHeight; VirtScreen *vs; byte *charPtr, *dst; int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0; diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index 686e6262db3..fa014a44650 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -606,7 +606,7 @@ void ScummEngine::writeVar(uint var, int value) { if (_game.heversion <= 73 && vm.slot[_currentScript].number == 1) return; assert(value == 0 || value == 1); - ConfMan.setBool("subtitles", value); + ConfMan.setBool("subtitles", (value != 0)); } if (VAR_NOSUBTITLES != 0xFF && var == VAR_NOSUBTITLES) { // Ignore default setting in HE60-71 games diff --git a/engines/simon/oracle.cpp b/engines/simon/oracle.cpp index e159d55e575..8e90befff18 100644 --- a/engines/simon/oracle.cpp +++ b/engines/simon/oracle.cpp @@ -386,7 +386,7 @@ void SimonEngine::saveUserGame(int slot) { } if (_keyPressed == 10 || _keyPressed == 13) { if (!saveGame(readVariable(55), name)) - _variableArray[55] = 0xFFFF; + _variableArray[55] = (int16)0xFFFF; else _variableArray[55] = 0; break; diff --git a/graphics/font.cpp b/graphics/font.cpp index 18379d7e8cf..b40f6fc283d 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -172,8 +172,8 @@ NewFontData* bdf_read_font(Common::SeekableReadStream &fp) { /* read bdf font header information, return 0 on error*/ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) { - int encoding; - int nchars, maxwidth; + int encoding = 0; + int nchars = 0, maxwidth; int firstchar = 65535; int lastchar = -1; char buf[256]; @@ -308,8 +308,8 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) { int bdf_read_bitmaps(Common::SeekableReadStream &fp, NewFontData* pf) { long ofs = 0; int maxwidth = 0; - int i, k, encoding, width; - int bbw, bbh, bbx, bby; + int i, k, encoding = 0, width = 0; + int bbw, bbh = 0, bbx = 0, bby = 0; int proportional = 0; int encodetable = 0; long l; @@ -627,7 +627,7 @@ NewFont *NewFont::loadFromCache(Common::SeekableReadStream &stream) { data->bits[i] = stream.readUint16BE(); } - bool hasOffsetTable = stream.readByte(); + bool hasOffsetTable = (stream.readByte() != 0); if (hasOffsetTable) { data->offset = (unsigned long*)malloc(sizeof(unsigned long)*data->size); if (!data->offset) { @@ -641,7 +641,7 @@ NewFont *NewFont::loadFromCache(Common::SeekableReadStream &stream) { } } - bool hasWidthTable = stream.readByte(); + bool hasWidthTable = (stream.readByte() != 0); if (hasWidthTable) { data->width = (unsigned char*)malloc(sizeof(unsigned char)*data->size); if (!data->width) { diff --git a/sound/audiocd.cpp b/sound/audiocd.cpp index 1487f4491ae..15b16b5e45a 100644 --- a/sound/audiocd.cpp +++ b/sound/audiocd.cpp @@ -31,6 +31,8 @@ #include "common/util.h" #include "common/system.h" +DECLARE_SINGLETON(Audio::AudioCDManager); + namespace Audio { struct TrackFormat { @@ -61,8 +63,6 @@ static const TrackFormat TRACK_FORMATS[] = { }; -DECLARE_SINGLETON(AudioCDManager); - AudioCDManager::AudioCDManager() { memset(&_cd, 0, sizeof(_cd)); memset(_cachedTracks, 0, sizeof(_cachedTracks));