diff options
Diffstat (limited to 'engines/wintermute')
-rw-r--r-- | engines/wintermute/AdActorDir.h | 2 | ||||
-rw-r--r-- | engines/wintermute/AdObject.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/BDiskFile.cpp | 3 | ||||
-rw-r--r-- | engines/wintermute/BFileManager.cpp | 12 | ||||
-rw-r--r-- | engines/wintermute/BParser.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/BPkgFile.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/BRegion.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/FontGlyphCache.h | 2 | ||||
-rw-r--r-- | engines/wintermute/Matrix4.h | 2 | ||||
-rw-r--r-- | engines/wintermute/PlatformSDL.cpp | 11 | ||||
-rw-r--r-- | engines/wintermute/VidPlayer.cpp | 3 | ||||
-rw-r--r-- | engines/wintermute/VidTheoraPlayer.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/detection.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/scriptables/SXStore.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/scriptables/ScScript.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/wintermute.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/wintermute.h | 2 | ||||
-rw-r--r-- | engines/wintermute/wme_debugger.h | 2 |
18 files changed, 33 insertions, 32 deletions
diff --git a/engines/wintermute/AdActorDir.h b/engines/wintermute/AdActorDir.h index ffb9c1ff7c..5df19f2aeb 100644 --- a/engines/wintermute/AdActorDir.h +++ b/engines/wintermute/AdActorDir.h @@ -43,4 +43,4 @@ public: } // end of namespace WinterMute
-#endif // WINTERMUTE_ADACTORDIR_H
\ No newline at end of file +#endif // WINTERMUTE_ADACTORDIR_H
diff --git a/engines/wintermute/AdObject.cpp b/engines/wintermute/AdObject.cpp index 122a4bdbb6..188eb19fc9 100644 --- a/engines/wintermute/AdObject.cpp +++ b/engines/wintermute/AdObject.cpp @@ -873,7 +873,7 @@ void CAdObject::Talk(const char *Text, const char *Sound, uint32 Duration, const // set duration by text length
if (_sentence->_duration <= 0) {// TODO: Avoid longs.
- _sentence->_duration = MAX((unsigned long)1000, Game->_subtitlesSpeed * strlen(_sentence->_text));
+ _sentence->_duration = MAX((size_t)1000, Game->_subtitlesSpeed * strlen(_sentence->_text));
}
diff --git a/engines/wintermute/BDiskFile.cpp b/engines/wintermute/BDiskFile.cpp index a2ec38a57e..e559708b5b 100644 --- a/engines/wintermute/BDiskFile.cpp +++ b/engines/wintermute/BDiskFile.cpp @@ -179,8 +179,9 @@ HRESULT CBDiskFile::Read(void *Buffer, uint32 Size) { //////////////////////////////////////////////////////////////////////////
HRESULT CBDiskFile::Seek(uint32 Pos, TSeek Origin) {
+ // TODO: Should this really need to use uint32?
if (_compressed) {
- int32 NewPos = 0;
+ uint32 NewPos = 0;
switch (Origin) {
case SEEK_TO_BEGIN:
diff --git a/engines/wintermute/BFileManager.cpp b/engines/wintermute/BFileManager.cpp index 21688a5ea9..7ac64e3236 100644 --- a/engines/wintermute/BFileManager.cpp +++ b/engines/wintermute/BFileManager.cpp @@ -427,7 +427,7 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign package->seek(DirOffset, SEEK_SET);
}
- for (int i = 0; i < hdr.NumDirs; i++) {
+ for (uint32 i = 0; i < hdr.NumDirs; i++) {
CBPackage *pkg = new CBPackage(Game);
if (!pkg) return E_FAIL;
@@ -447,7 +447,7 @@ HRESULT CBFileManager::RegisterPackage(Common::String Filename , bool SearchSign // read file entries
uint32 NumFiles = package->readUint32LE();
- for (int j = 0; j < NumFiles; j++) {
+ for (uint32 j = 0; j < NumFiles; j++) {
char *Name;
uint32 Offset, Length, CompLength, Flags, TimeDate1, TimeDate2;
@@ -818,8 +818,10 @@ CBFile *CBFileManager::OpenFileRaw(const char *Filename) { HRESULT CBFileManager::RestoreCurrentDir() {
if (!_basePath) return S_OK;
else {
- if (!chdir(_basePath)) return S_OK;
- else return E_FAIL;
+ /*if (!chdir(_basePath)) return S_OK;
+ else return E_FAIL;*/
+ warning("CBFileManager::RestoreCurrentDir - ignored");
+ return S_OK;
}
}
@@ -852,7 +854,7 @@ bool CBFileManager::FindPackageSignature(Common::File *f, uint32 *Offset) { int StartPos = 1024 * 1024;
- int BytesRead = StartPos;
+ uint32 BytesRead = StartPos;
while (BytesRead < FileSize - 16) {
int ToRead = MIN((unsigned int)32768, FileSize - BytesRead);
diff --git a/engines/wintermute/BParser.cpp b/engines/wintermute/BParser.cpp index 97a191eff1..f672684f73 100644 --- a/engines/wintermute/BParser.cpp +++ b/engines/wintermute/BParser.cpp @@ -89,7 +89,7 @@ long CBParser::GetObject(char **buf, TokenDesc *tokens, char **name, char **data if (tokens->id == 0) {
char *p = strchr(*buf, '\n');
if (p && p > *buf) {
- strncpy(_lastOffender, *buf, MIN((long int)255, p - *buf)); // TODO, clean
+ strncpy(_lastOffender, *buf, MIN((uint32)255, (uint32)(p - *buf))); // TODO, clean
} else strcpy(_lastOffender, "");
return PARSERR_TOKENNOTFOUND;
diff --git a/engines/wintermute/BPkgFile.cpp b/engines/wintermute/BPkgFile.cpp index 055748b520..dd04fdec03 100644 --- a/engines/wintermute/BPkgFile.cpp +++ b/engines/wintermute/BPkgFile.cpp @@ -61,7 +61,7 @@ HRESULT CBPkgFile::Open(Common::String Filename) { strcpy(fileName, Filename.c_str());
// correct slashes
- for (int i = 0; i < strlen(fileName); i++) {
+ for (uint32 i = 0; i < strlen(fileName); i++) {
if (fileName[i] == '/') fileName[i] = '\\';
}
@@ -78,7 +78,7 @@ HRESULT CBPkgFile::Open(Common::String Filename) { if (_compressed) {
// TODO: Really, most of this logic might be doable directly in the fileEntry?
// But for now, this should get us rolling atleast.
- _file = wrapCompressedReadStream(new Common::SeekableSubReadStream(_file, _fileEntry->_offset, _fileEntry->_offset + _fileEntry->_length, DisposeAfterUse::YES));
+ _file = Common::wrapCompressedReadStream(new Common::SeekableSubReadStream(_file, _fileEntry->_offset, _fileEntry->_offset + _fileEntry->_length, DisposeAfterUse::YES));
} else {
_file = new Common::SeekableSubReadStream(_file, _fileEntry->_offset, _fileEntry->_offset + _fileEntry->_length, DisposeAfterUse::YES);
}
@@ -128,7 +128,7 @@ HRESULT CBPkgFile::Read(void *Buffer, uint32 Size) { HRESULT CBPkgFile::Seek(uint32 Pos, TSeek Origin) {
if (!_fileEntry) return E_FAIL;
- int32 NewPos = 0;
+ uint32 NewPos = 0;
switch (Origin) {
case SEEK_TO_BEGIN:
diff --git a/engines/wintermute/BRegion.cpp b/engines/wintermute/BRegion.cpp index f775c61091..37ab7ff35c 100644 --- a/engines/wintermute/BRegion.cpp +++ b/engines/wintermute/BRegion.cpp @@ -506,4 +506,4 @@ HRESULT CBRegion::Mimic(CBRegion *Region, float Scale, int X, int Y) { return CreateRegion() ? S_OK : E_FAIL;
}
-} // end of namespace WinterMute
\ No newline at end of file +} // end of namespace WinterMute
diff --git a/engines/wintermute/FontGlyphCache.h b/engines/wintermute/FontGlyphCache.h index 3092c60a74..a385125d82 100644 --- a/engines/wintermute/FontGlyphCache.h +++ b/engines/wintermute/FontGlyphCache.h @@ -122,4 +122,4 @@ private: } // end of namespace WinterMute
-#endif // WINTERMUTE_FONTGLYPHCACHE_H
\ No newline at end of file +#endif // WINTERMUTE_FONTGLYPHCACHE_H
diff --git a/engines/wintermute/Matrix4.h b/engines/wintermute/Matrix4.h index 019c429789..da5fd1393a 100644 --- a/engines/wintermute/Matrix4.h +++ b/engines/wintermute/Matrix4.h @@ -56,4 +56,4 @@ public: } // end of namespace WinterMute
-#endif // WINTERMUTE_MATRIX4_H
\ No newline at end of file +#endif // WINTERMUTE_MATRIX4_H
diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp index 5ab8ba8932..6cc18f5209 100644 --- a/engines/wintermute/PlatformSDL.cpp +++ b/engines/wintermute/PlatformSDL.cpp @@ -519,17 +519,6 @@ AnsiString CBPlatform::GetPlatformName() { }
//////////////////////////////////////////////////////////////////////////
-int scumm_stricmp(const char *str1, const char *str2) {
- return ::strcasecmp(str1, str2);
-}
-
-//////////////////////////////////////////////////////////////////////////
-int scumm_strnicmp(const char *str1, const char *str2, size_t maxCount) {
- return ::strncasecmp(str1, str2, maxCount);
-}
-
-
-//////////////////////////////////////////////////////////////////////////
char *CBPlatform::strupr(char *string) {
if (string) {
for (size_t i = 0; i < strlen(string); ++i) {
diff --git a/engines/wintermute/VidPlayer.cpp b/engines/wintermute/VidPlayer.cpp index 40d953f67b..e6459e26f1 100644 --- a/engines/wintermute/VidPlayer.cpp +++ b/engines/wintermute/VidPlayer.cpp @@ -119,6 +119,7 @@ HRESULT CVidPlayer::Cleanup() { return SetDefaults(); #endif + return 0; } @@ -268,6 +269,7 @@ HRESULT CVidPlayer::Update() { } else return E_FAIL; } else return S_OK; #endif + return 0; } @@ -289,6 +291,7 @@ HRESULT CVidPlayer::Display() { return res; #endif + return 0; } diff --git a/engines/wintermute/VidTheoraPlayer.cpp b/engines/wintermute/VidTheoraPlayer.cpp index f27a27b724..f802620bdd 100644 --- a/engines/wintermute/VidTheoraPlayer.cpp +++ b/engines/wintermute/VidTheoraPlayer.cpp @@ -328,6 +328,7 @@ HRESULT CVidTheoraPlayer::Initialize(char *Filename, char *SubtitleFile) { return Res; #endif + return 0; } @@ -588,6 +589,7 @@ float CVidTheoraPlayer::GetMovieTime() { else if (m_Sound) return (float)(m_Sound->GetPosition()) / 1000.0f + m_TimeOffset; else return (float)(m_CurrentTime - m_StartTime) / 1000.0f + m_TimeOffset; #endif + return 0; } @@ -599,6 +601,7 @@ int CVidTheoraPlayer::GetMovieFrame() { return Time / ((double)m_TheoraInfo.fps_denominator / m_TheoraInfo.fps_numerator); #endif + return 0; } @@ -808,6 +811,7 @@ byte CVidTheoraPlayer::GetAlphaAt(int X, int Y) { if (_alphaImage) return _alphaImage->GetAlphaAt(X, Y); else return 0xFF; #endif + return 0; } @@ -894,6 +898,7 @@ HRESULT CVidTheoraPlayer::Pause() { return S_OK; } else return E_FAIL; #endif + return 0; } ////////////////////////////////////////////////////////////////////////// @@ -905,6 +910,7 @@ HRESULT CVidTheoraPlayer::Resume() { return S_OK; } else return E_FAIL; #endif + return 0; } ////////////////////////////////////////////////////////////////////////// diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp index f0066e4686..15e695441d 100644 --- a/engines/wintermute/detection.cpp +++ b/engines/wintermute/detection.cpp @@ -144,4 +144,4 @@ public: REGISTER_PLUGIN_DYNAMIC(WINTERMUTE, PLUGIN_TYPE_ENGINE, WinterMuteMetaEngine); #else REGISTER_PLUGIN_STATIC(WINTERMUTE, PLUGIN_TYPE_ENGINE, WinterMuteMetaEngine); -#endif
\ No newline at end of file +#endif diff --git a/engines/wintermute/scriptables/SXStore.cpp b/engines/wintermute/scriptables/SXStore.cpp index 9308065499..ef801feb89 100644 --- a/engines/wintermute/scriptables/SXStore.cpp +++ b/engines/wintermute/scriptables/SXStore.cpp @@ -508,4 +508,4 @@ void StoreKit_RestoreFinishedCallback(void *data, int error) { #endif // __IPHONEOS__
-} // end of namespace WinterMute
\ No newline at end of file +} // end of namespace WinterMute
diff --git a/engines/wintermute/scriptables/ScScript.cpp b/engines/wintermute/scriptables/ScScript.cpp index b3eca0f346..0b1f81bd0e 100644 --- a/engines/wintermute/scriptables/ScScript.cpp +++ b/engines/wintermute/scriptables/ScScript.cpp @@ -442,7 +442,7 @@ HRESULT CScScript::ExecuteInstruction() { HRESULT ret = S_OK;
uint32 dw;
- const char *str;
+ const char *str = NULL;
//CScValue* op = new CScValue(Game);
_operand->Cleanup();
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp index b7da386054..d2473c8dd2 100644 --- a/engines/wintermute/wintermute.cpp +++ b/engines/wintermute/wintermute.cpp @@ -118,4 +118,4 @@ Common::Error WinterMuteEngine::run() { return Common::kNoError; } -} // End of namespace WinterMute
\ No newline at end of file +} // End of namespace WinterMute diff --git a/engines/wintermute/wintermute.h b/engines/wintermute/wintermute.h index efa07ac669..e1f5047239 100644 --- a/engines/wintermute/wintermute.h +++ b/engines/wintermute/wintermute.h @@ -62,4 +62,4 @@ public: } // End of namespace Wintermute -#endif
\ No newline at end of file +#endif diff --git a/engines/wintermute/wme_debugger.h b/engines/wintermute/wme_debugger.h index 95e2a894ea..e89f9e55a2 100644 --- a/engines/wintermute/wme_debugger.h +++ b/engines/wintermute/wme_debugger.h @@ -169,4 +169,4 @@ typedef bool (*WMEDBG_SHUTDOWN)(IWmeDebugServer *Server); } // end of namespace WinterMute
-#endif // WME_DEBUGGER_H
\ No newline at end of file +#endif // WME_DEBUGGER_H
|