diff options
Diffstat (limited to 'engines/wintermute/ad/ad_actor.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_actor.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/engines/wintermute/ad/ad_actor.cpp b/engines/wintermute/ad/ad_actor.cpp index 94df17c543..967270b9bd 100644 --- a/engines/wintermute/ad/ad_actor.cpp +++ b/engines/wintermute/ad/ad_actor.cpp @@ -119,7 +119,7 @@ AdActor::~AdActor() { ////////////////////////////////////////////////////////////////////////// bool AdActor::loadFile(const char *filename) { - byte *buffer = BaseFileManager::getEngineInstance()->readWholeFile(filename); + char *buffer = (char *)BaseFileManager::getEngineInstance()->readWholeFile(filename); if (buffer == nullptr) { _gameRef->LOG(0, "AdActor::LoadFile failed for file '%s'", filename); return STATUS_FAILED; @@ -179,7 +179,7 @@ TOKEN_DEF(EDITOR_PROPERTY) TOKEN_DEF(ANIMATION) TOKEN_DEF_END ////////////////////////////////////////////////////////////////////////// -bool AdActor::loadBuffer(byte *buffer, bool complete) { +bool AdActor::loadBuffer(char *buffer, bool complete) { TOKEN_TABLE_START(commands) TOKEN_TABLE(ACTOR) TOKEN_TABLE(X) @@ -219,12 +219,12 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) { TOKEN_TABLE(ANIMATION) TOKEN_TABLE_END - byte *params; + char *params; int cmd; BaseParser parser; if (complete) { - if (parser.getCommand((char **)&buffer, commands, (char **)¶ms) != TOKEN_ACTOR) { + if (parser.getCommand(&buffer, commands, ¶ms) != TOKEN_ACTOR) { _gameRef->LOG(0, "'ACTOR' keyword expected."); return STATUS_FAILED; } @@ -234,55 +234,55 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) { AdGame *adGame = (AdGame *)_gameRef; AdSpriteSet *spr = nullptr; int ar = 0, ag = 0, ab = 0, alpha = 0; - 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_X: - parser.scanStr((char *)params, "%d", &_posX); + parser.scanStr(params, "%d", &_posX); break; case TOKEN_Y: - parser.scanStr((char *)params, "%d", &_posY); + parser.scanStr(params, "%d", &_posY); break; case TOKEN_NAME: - setName((char *)params); + setName(params); break; case TOKEN_CAPTION: - setCaption((char *)params); + setCaption(params); break; case TOKEN_FONT: - setFont((char *)params); + setFont(params); break; case TOKEN_SCALABLE: - parser.scanStr((char *)params, "%b", &_zoomable); + parser.scanStr(params, "%b", &_zoomable); break; case TOKEN_ROTABLE: case TOKEN_ROTATABLE: - parser.scanStr((char *)params, "%b", &_rotatable); + parser.scanStr(params, "%b", &_rotatable); break; case TOKEN_REGISTRABLE: case TOKEN_INTERACTIVE: - parser.scanStr((char *)params, "%b", &_registrable); + parser.scanStr(params, "%b", &_registrable); break; case TOKEN_SHADOWABLE: case TOKEN_COLORABLE: - parser.scanStr((char *)params, "%b", &_shadowable); + parser.scanStr(params, "%b", &_shadowable); break; case TOKEN_ACTIVE: - parser.scanStr((char *)params, "%b", &_active); + parser.scanStr(params, "%b", &_active); break; case TOKEN_WALK: @@ -348,7 +348,7 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) { break; case TOKEN_SCRIPT: - addScript((char *)params); + addScript(params); break; case TOKEN_CURSOR: @@ -362,12 +362,12 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) { break; case TOKEN_SOUND_VOLUME: - parser.scanStr((char *)params, "%d", &_sFXVolume); + parser.scanStr(params, "%d", &_sFXVolume); break; case TOKEN_SCALE: { int s; - parser.scanStr((char *)params, "%d", &s); + parser.scanStr(params, "%d", &s); _scale = (float)s; } @@ -375,14 +375,14 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) { case TOKEN_RELATIVE_SCALE: { int s; - parser.scanStr((char *)params, "%d", &s); + parser.scanStr(params, "%d", &s); _relativeScale = (float)s; } break; case TOKEN_SOUND_PANNING: - parser.scanStr((char *)params, "%b", &_autoSoundPanning); + parser.scanStr(params, "%b", &_autoSoundPanning); break; case TOKEN_PROPERTY: @@ -432,15 +432,15 @@ bool AdActor::loadBuffer(byte *buffer, bool complete) { break; case TOKEN_IGNORE_ITEMS: - parser.scanStr((char *)params, "%b", &_ignoreItems); + parser.scanStr(params, "%b", &_ignoreItems); 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_PROPERTY: @@ -1410,20 +1410,20 @@ bool AdActor::mergeAnims(const char *animsFilename) { TOKEN_TABLE_END - byte *fileBuffer = BaseFileManager::getEngineInstance()->readWholeFile(animsFilename); + char *fileBuffer = (char *)BaseFileManager::getEngineInstance()->readWholeFile(animsFilename); if (fileBuffer == nullptr) { _gameRef->LOG(0, "AdActor::MergeAnims failed for file '%s'", animsFilename); return STATUS_FAILED; } - byte *buffer = fileBuffer; - byte *params; + char *buffer = fileBuffer; + char *params; int cmd; BaseParser parser; bool ret = STATUS_OK; - while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) { + while ((cmd = parser.getCommand(&buffer, commands, ¶ms)) > 0) { switch (cmd) { case TOKEN_ANIMATION: { AdSpriteSet *anim = new AdSpriteSet(_gameRef, this); |