diff options
author | Willem Jan Palenstijn | 2013-10-01 23:20:24 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-10-01 23:20:43 +0200 |
commit | a97907241051b493875950285f858c6e215238e3 (patch) | |
tree | 1c0223a2843cd141f4cfacf6c2ee9612a083cc18 /engines/wintermute/ad/ad_talk_def.cpp | |
parent | e0dd19a21cb07ab4704991800e23bf4ac2dfb0ef (diff) | |
download | scummvm-rg350-a97907241051b493875950285f858c6e215238e3.tar.gz scummvm-rg350-a97907241051b493875950285f858c6e215238e3.tar.bz2 scummvm-rg350-a97907241051b493875950285f858c6e215238e3.zip |
WINTERMUTE: Clean up byte/char casts in loading/parsing
Diffstat (limited to 'engines/wintermute/ad/ad_talk_def.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_talk_def.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/wintermute/ad/ad_talk_def.cpp b/engines/wintermute/ad/ad_talk_def.cpp index f10a0e2fb9..1fdeed418f 100644 --- a/engines/wintermute/ad/ad_talk_def.cpp +++ b/engines/wintermute/ad/ad_talk_def.cpp @@ -71,7 +71,7 @@ AdTalkDef::~AdTalkDef() { ////////////////////////////////////////////////////////////////////////// bool AdTalkDef::loadFile(const char *filename) { - byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename); + char *buffer = (char *)BaseFileManager::getEngineInstance()->readWholeFile(filename); if (buffer == nullptr) { _gameRef->LOG(0, "AdTalkDef::LoadFile failed for file '%s'", filename); return STATUS_FAILED; @@ -101,7 +101,7 @@ TOKEN_DEF(DEFAULT_SPRITE) TOKEN_DEF(EDITOR_PROPERTY) TOKEN_DEF_END ////////////////////////////////////////////////////////////////////////// -bool AdTalkDef::loadBuffer(byte *buffer, bool complete) { +bool AdTalkDef::loadBuffer(char *buffer, bool complete) { TOKEN_TABLE_START(commands) TOKEN_TABLE(TALK) TOKEN_TABLE(TEMPLATE) @@ -112,22 +112,22 @@ bool AdTalkDef::loadBuffer(byte *buffer, bool complete) { TOKEN_TABLE(EDITOR_PROPERTY) TOKEN_TABLE_END - byte *params; + char *params; int cmd; BaseParser parser; if (complete) { - if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_TALK) { + if (parser.getCommand(&buffer, commands, ¶ms) != TOKEN_TALK) { _gameRef->LOG(0, "'TALK' keyword expected."); return STATUS_FAILED; } buffer = params; } - while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) { + while ((cmd = parser.getCommand(&buffer, commands, ¶ms)) > 0) { switch (cmd) { case TOKEN_TEMPLATE: - if (DID_FAIL(loadFile((char *)params))) { + if (DID_FAIL(loadFile(params))) { cmd = PARSERR_GENERIC; } break; @@ -145,11 +145,11 @@ bool AdTalkDef::loadBuffer(byte *buffer, bool complete) { break; case TOKEN_DEFAULT_SPRITE: - BaseUtils::setString(&_defaultSpriteFilename, (char *)params); + BaseUtils::setString(&_defaultSpriteFilename, params); break; case TOKEN_DEFAULT_SPRITESET_FILE: - BaseUtils::setString(&_defaultSpriteSetFilename, (char *)params); + BaseUtils::setString(&_defaultSpriteSetFilename, params); break; case TOKEN_DEFAULT_SPRITESET: { |