Skip to content

Commit

Permalink
TONY: Fix invalid casts and remove some unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 4, 2012
1 parent 557c43c commit 5498f9a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
1 change: 1 addition & 0 deletions engines/tony/adv.h
Expand Up @@ -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

Expand Down
8 changes: 2 additions & 6 deletions engines/tony/game.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion engines/tony/tony.cpp
Expand Up @@ -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;
Expand Down
9 changes: 3 additions & 6 deletions engines/tony/utils.cpp
Expand Up @@ -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;
*/
}

/****************************************************************************\
Expand Down
2 changes: 1 addition & 1 deletion engines/tony/utils.h
Expand Up @@ -219,7 +219,7 @@ class RMString {
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);
Expand Down

0 comments on commit 5498f9a

Please sign in to comment.