diff options
author | Paul Gilbert | 2012-05-04 22:03:03 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-05-04 22:03:03 +1000 |
commit | 5498f9a0b770ed8985ace1da232b505c650d70a7 (patch) | |
tree | 84e7aca74ac9c44bc19f710bc6f9f92fdaabc387 | |
parent | 557c43c2dbd6d830332be8c8b69c7660d53d665f (diff) | |
download | scummvm-rg350-5498f9a0b770ed8985ace1da232b505c650d70a7.tar.gz scummvm-rg350-5498f9a0b770ed8985ace1da232b505c650d70a7.tar.bz2 scummvm-rg350-5498f9a0b770ed8985ace1da232b505c650d70a7.zip |
TONY: Fix invalid casts and remove some unused variables
-rw-r--r-- | engines/tony/adv.h | 1 | ||||
-rw-r--r-- | engines/tony/game.cpp | 8 | ||||
-rw-r--r-- | engines/tony/tony.cpp | 2 | ||||
-rw-r--r-- | engines/tony/utils.cpp | 9 | ||||
-rw-r--r-- | engines/tony/utils.h | 2 |
5 files changed, 8 insertions, 14 deletions
diff --git a/engines/tony/adv.h b/engines/tony/adv.h index bcf62a0c24..6d675c2bbe 100644 --- a/engines/tony/adv.h +++ b/engines/tony/adv.h @@ -70,6 +70,7 @@ namespace Tony { // FIXME: Some of these can likely be removed when refactoring is completed #define MAX_DRIVE 10 #define MAX_DIR 255 +#define MAX_PATH 255 #define MAX_FNAME 100 #define MAX_EXT 10 diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp index a1737cb089..884dda5587 100644 --- a/engines/tony/game.cpp +++ b/engines/tony/game.cpp @@ -92,11 +92,7 @@ bool bPatIrqFreeze; /* Funzioni globali per la DLL Custom */ /****************************************/ -static char path_buffer[_MAX_PATH]; -static char drive[MAX_DRIVE]; -static char dir[MAX_DIR]; -static char fname[MAX_FNAME]; -static char ext[MAX_EXT]; +static char path_buffer[MAX_PATH]; HANDLE MainLoadLocation(int nLoc, RMPoint pt, RMPoint start) { return _vm->GetEngine()->LoadLocation(nLoc, pt,start); @@ -494,7 +490,7 @@ void RMOptionScreen::RefreshAll(void) { if (m_statePos == 0 && i == 0) s.Format("Autosave"); else - s.Format("%02d)%s", m_statePos + i, m_curThumbName[i]); + s.Format("%02d)%s", m_statePos + i, (const char *)m_curThumbName[i]); } num[i] = new RMText; diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index 9dda1b9d4d..1415b86ef8 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -130,7 +130,7 @@ void TonyEngine::GUIError(const Common::String &msg) { GUIErrorMessage(msg); } -char nextMusic[_MAX_PATH]; +char nextMusic[MAX_PATH]; bool nextLoop; int nextChannel; int nextSync; diff --git a/engines/tony/utils.cpp b/engines/tony/utils.cpp index 69ad5633d7..7a750c2975 100644 --- a/engines/tony/utils.cpp +++ b/engines/tony/utils.cpp @@ -393,17 +393,14 @@ RMDataStream &operator>>(RMDataStream &df, RMString &var) { /** * Formats a string */ -void RMString::Format(char* str, ...) { - warning("TODO: Refactor RMString::Format if needed"); - /* +void RMString::Format(const char *str, ...) { static char buf[2048]; va_list argList; - va_start(argList,str); - wvsprintf(buf,str,argList); + va_start(argList, str); + vsprintf(buf, str, argList); va_end(argList); *this = buf; -*/ } /****************************************************************************\ diff --git a/engines/tony/utils.h b/engines/tony/utils.h index 0ce4e83f27..c8ffe062ea 100644 --- a/engines/tony/utils.h +++ b/engines/tony/utils.h @@ -219,7 +219,7 @@ public: friend RMDataStream& operator>>(RMDataStream& df, RMString &var); // Formattazione di stringa - void Format(char *str, ...); + void Format(const char *str, ...); private: void Resize(int size, bool bMantain = false); |