diff options
Diffstat (limited to 'engines/wintermute/ad/ad_region.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_region.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/engines/wintermute/ad/ad_region.cpp b/engines/wintermute/ad/ad_region.cpp index bc9ac903c6..1c0cf41e86 100644 --- a/engines/wintermute/ad/ad_region.cpp +++ b/engines/wintermute/ad/ad_region.cpp @@ -69,7 +69,7 @@ bool AdRegion::hasDecoration() const { ////////////////////////////////////////////////////////////////////////// bool AdRegion::loadFile(const char *filename) { - byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename); + char *buffer = (char *)BaseFileManager::getEngineInstance()->readWholeFile(filename); if (buffer == nullptr) { _gameRef->LOG(0, "AdRegion::LoadFile failed for file '%s'", filename); return STATUS_FAILED; @@ -110,7 +110,7 @@ TOKEN_DEF(PROPERTY) TOKEN_DEF(EDITOR_PROPERTY) TOKEN_DEF_END ////////////////////////////////////////////////////////////////////////// -bool AdRegion::loadBuffer(byte *buffer, bool complete) { +bool AdRegion::loadBuffer(char *buffer, bool complete) { TOKEN_TABLE_START(commands) TOKEN_TABLE(REGION) TOKEN_TABLE(TEMPLATE) @@ -131,12 +131,12 @@ bool AdRegion::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_REGION) { + if (parser.getCommand(&buffer, commands, ¶ms) != TOKEN_REGION) { _gameRef->LOG(0, "'REGION' keyword expected."); return STATUS_FAILED; } @@ -150,67 +150,67 @@ bool AdRegion::loadBuffer(byte *buffer, bool complete) { int ar = 255, ag = 255, ab = 255, alpha = 255; - 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; case TOKEN_NAME: - setName((char *)params); + setName(params); break; case TOKEN_CAPTION: - setCaption((char *)params); + setCaption(params); break; case TOKEN_ACTIVE: - parser.scanStr((char *)params, "%b", &_active); + parser.scanStr(params, "%b", &_active); break; case TOKEN_BLOCKED: - parser.scanStr((char *)params, "%b", &_blocked); + parser.scanStr(params, "%b", &_blocked); break; case TOKEN_DECORATION: - parser.scanStr((char *)params, "%b", &_decoration); + parser.scanStr(params, "%b", &_decoration); break; case TOKEN_ZOOM: case TOKEN_SCALE: { int j; - parser.scanStr((char *)params, "%d", &j); + parser.scanStr(params, "%d", &j); _zoom = (float)j; } break; case TOKEN_POINT: { int x, y; - parser.scanStr((char *)params, "%d,%d", &x, &y); + parser.scanStr(params, "%d,%d", &x, &y); _points.add(new BasePoint(x, y)); } break; case TOKEN_ALPHA_COLOR: - parser.scanStr((char *)params, "%d,%d,%d", &ar, &ag, &ab); + parser.scanStr(params, "%d,%d,%d", &ar, &ag, &ab); break; case TOKEN_ALPHA: - parser.scanStr((char *)params, "%d", &alpha); + parser.scanStr(params, "%d", &alpha); break; case TOKEN_EDITOR_SELECTED: - parser.scanStr((char *)params, "%b", &_editorSelected); + parser.scanStr(params, "%b", &_editorSelected); break; case TOKEN_EDITOR_SELECTED_POINT: - parser.scanStr((char *)params, "%d", &_editorSelectedPoint); + parser.scanStr(params, "%d", &_editorSelectedPoint); break; case TOKEN_SCRIPT: - addScript((char *)params); + addScript(params); break; case TOKEN_PROPERTY: |