diff options
author | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
commit | 66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985 (patch) | |
tree | e27aadabecd8dd910884280e6559ff9c94c3d73c /engines/saga | |
parent | 278857698dc7b1623096fe1ad12511dc4c886c7e (diff) | |
download | scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.gz scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.bz2 scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.zip |
Removed trailing spaces.
svn-id: r30664
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/actor.cpp | 28 | ||||
-rw-r--r-- | engines/saga/actor.h | 2 | ||||
-rw-r--r-- | engines/saga/actor_path.cpp | 8 | ||||
-rw-r--r-- | engines/saga/actor_walk.cpp | 6 | ||||
-rw-r--r-- | engines/saga/animation.cpp | 12 | ||||
-rw-r--r-- | engines/saga/console.cpp | 2 | ||||
-rw-r--r-- | engines/saga/detection.cpp | 6 | ||||
-rw-r--r-- | engines/saga/detection_tables.h | 2 | ||||
-rw-r--r-- | engines/saga/font.cpp | 2 | ||||
-rw-r--r-- | engines/saga/font.h | 4 | ||||
-rw-r--r-- | engines/saga/ihnm_introproc.cpp | 4 | ||||
-rw-r--r-- | engines/saga/interface.cpp | 20 | ||||
-rw-r--r-- | engines/saga/ite_introproc.cpp | 4 | ||||
-rw-r--r-- | engines/saga/module.mk | 2 | ||||
-rw-r--r-- | engines/saga/music.cpp | 6 | ||||
-rw-r--r-- | engines/saga/objectmap.cpp | 2 | ||||
-rw-r--r-- | engines/saga/puzzle.cpp | 2 | ||||
-rw-r--r-- | engines/saga/rscfile.cpp | 20 | ||||
-rw-r--r-- | engines/saga/rscfile.h | 2 | ||||
-rw-r--r-- | engines/saga/saga.h | 8 | ||||
-rw-r--r-- | engines/saga/sagaresnames.h | 2 | ||||
-rw-r--r-- | engines/saga/scene.cpp | 4 | ||||
-rw-r--r-- | engines/saga/script.cpp | 8 | ||||
-rw-r--r-- | engines/saga/sfuncs.cpp | 8 | ||||
-rw-r--r-- | engines/saga/sndres.cpp | 6 | ||||
-rw-r--r-- | engines/saga/sprite.cpp | 2 | ||||
-rw-r--r-- | engines/saga/xref.txt | 2 |
27 files changed, 87 insertions, 87 deletions
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index 81cc2bcf2c..8bc07c55ee 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -338,9 +338,9 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource int stateResourceId; freeActorList(); - + _vm->_resource->loadResource(_actorContext, actorsResourceID, actorListData, actorListLength); - + _actorsCount = actorCount; if (actorListLength != (uint)_actorsCount * ACTOR_INHM_SIZE) { @@ -348,14 +348,14 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource } MemoryReadStream actorS(actorListData, actorListLength); - + _actors = (ActorData **)malloc(_actorsCount * sizeof(*_actors)); for (i = 0; i < _actorsCount; i++) { actor = _actors[i] = new ActorData(); actor->_id = objectIndexToId(kGameObjectActor, i); //actorIndexToId(i); actor->_index = i; debug(4, "init actor id=0x%x index=%d", actor->_id, actor->_index); - actorS.readUint32LE(); //next displayed + actorS.readUint32LE(); //next displayed actorS.readByte(); //type actor->_flags = actorS.readByte(); actor->_nameIndex = actorS.readUint16LE(); @@ -450,10 +450,10 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource } MemoryReadStream statesIds(idsResourcePointer, idsResourceLength); - + for (i = 0; i < protagStatesCount; i++) { stateResourceId = statesIds.readUint32LE(); - + loadFrameList(stateResourceId, _protagStates[i]._frames, _protagStates[i]._framesCount); } free(idsResourcePointer); @@ -485,20 +485,20 @@ void Actor::loadObjList(int objectCount, int objectsResourceID) { byte* objectListData; size_t objectListLength; freeObjList(); - + _vm->_resource->loadResource(_actorContext, objectsResourceID, objectListData, objectListLength); - + _objsCount = objectCount; MemoryReadStream objectS(objectListData, objectListLength); - + _objs = (ObjectData **)malloc(_objsCount * sizeof(*_objs)); for (i = 0; i < _objsCount; i++) { object = _objs[i] = new ObjectData(); object->_id = objectIndexToId(kGameObjectObject, i); object->_index = i; debug(9, "init object id=%d index=%d", object->_id, object->_index); - objectS.readUint32LE(); //next displayed + objectS.readUint32LE(); //next displayed objectS.readByte(); //type object->_flags = objectS.readByte(); object->_nameIndex = objectS.readUint16LE(); @@ -624,7 +624,7 @@ void Actor::setProtagState(int state) { } int Actor::getFrameType(ActorFrameTypes frameType) { - + if (_vm->getGameType() == GType_ITE) { switch (frameType) { case kFrameStand: @@ -915,10 +915,10 @@ uint16 Actor::hitTest(const Point &testPoint, bool skipProtagonist) { // id in this case, even though the chalk was drawn after the circle. // Therefore, for IHNM, we iterate through the whole draw list and // return the last match found, not the first one. - // Unfortunately, it is only possible to search items in the sorted draw + // Unfortunately, it is only possible to search items in the sorted draw // list from start to end, not reverse, so it's necessary to search // through the whole list to get the item drawn last - + uint16 result = ID_NOTHING; if (!_vm->_scene->getSceneClip().contains(testPoint)) @@ -1162,7 +1162,7 @@ void Actor::actorSpeech(uint16 actorId, const char **strings, int stringsCount, // HACK for the compact disk in Ellen's chapter // Once Ellen starts saying that "Something is different", bring the compact disk in the - // scene. After speaking with AM, the compact disk is visible. She always says this line + // scene. After speaking with AM, the compact disk is visible. She always says this line // when entering room 59, after speaking with AM, if the compact disk is not picked up yet // Check Script::sfDropObject for the other part of this hack if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 3 && diff --git a/engines/saga/actor.h b/engines/saga/actor.h index 4aa1f4508a..c31b78731f 100644 --- a/engines/saga/actor.h +++ b/engines/saga/actor.h @@ -298,7 +298,7 @@ public: Point _screenPosition; // screen coordinates int32 _screenDepth; // int32 _screenScale; // - + void saveState(Common::OutSaveFile *out) { out->writeUint16LE(_flags); out->writeSint32LE(_nameIndex); diff --git a/engines/saga/actor_path.cpp b/engines/saga/actor_path.cpp index 92d7310f16..1a6fff8395 100644 --- a/engines/saga/actor_path.cpp +++ b/engines/saga/actor_path.cpp @@ -184,8 +184,8 @@ bool Actor::scanPathLine(const Point &point1, const Point &point2) { point.x += s.x; errterm -= fDelta.y; } - - point.y += s.y; + + point.y += s.y; errterm += fDelta.x; if (!validPathCellPoint(point)) { @@ -205,7 +205,7 @@ bool Actor::scanPathLine(const Point &point1, const Point &point2) { point.y += s.y; errterm -= fDelta.x; } - + point.x += s.x; errterm += fDelta.y; @@ -381,7 +381,7 @@ int pathLine(Point *pointList, const Point &point1, const Point &point2) { tempPoint.y = delta.y * 2; if (delta.y > delta.x) { - + errterm = tempPoint.x - delta.y; res = delta.y; diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp index 0a3cc9aa4f..7e66a67560 100644 --- a/engines/saga/actor_walk.cpp +++ b/engines/saga/actor_walk.cpp @@ -208,7 +208,7 @@ void Actor::updateActorsScene(int actorsEntrance) { if (actor->_flags & kProtagonist) { actor->_finalTarget = actor->_location; _centerActor = _protagonist = actor; - } else if (_vm->getGameType() == GType_ITE && + } else if (_vm->getGameType() == GType_ITE && _vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) { continue; } @@ -938,7 +938,7 @@ bool Actor::actorWalkTo(uint16 actorId, const Location &toLocation) { ((actor->_currentAction >= kActionWalkToPoint && actor->_currentAction <= kActionWalkDir) || (_vm->getGameType() == GType_ITE && actor == _protagonist)) && !_vm->_scene->canWalk(pointFrom)) { - + int max = _vm->getGameType() == GType_ITE ? 8 : 4; for (i = 1; i < max; i++) { @@ -1109,7 +1109,7 @@ bool Actor::actorEndWalk(uint16 actorId, bool recurse) { actor->_location.toScreenPointUV(testPoint); // it's wrong calculation, but it is used in ITE else actor->_location.toScreenPointXY(testPoint); - + hitZoneIndex = _vm->_scene->_actionMap->hitTest(testPoint); if (hitZoneIndex != -1) { hitZone = _vm->_scene->_actionMap->getHitZone(hitZoneIndex); diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 4324496f7d..6690f07bbe 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -168,7 +168,7 @@ int Anim::playCutaway(int cut, bool fade) { warning("Could not allocate cutaway animation slot"); return 0; } - + // Some cutaways in IHNM have animResourceId equal to 0, which means that they only have // a background frame and no animation. Those animations are actually game scripts. // An example is the "nightfall" animation in Ben's chapter (fadein-fadeout), the animation @@ -461,7 +461,7 @@ void Anim::setCycles(uint16 animId, int cycles) { int Anim::getCycles(uint16 animId) { if (animId >= MAX_ANIMATIONS && _cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) return 0; - + return getAnimation(animId)->cycles; } @@ -484,7 +484,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) { return; if (animId >= MAX_ANIMATIONS && _cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) { - // In IHNM, cutaways without an animation bit are not rendered, but the framecount + // In IHNM, cutaways without an animation bit are not rendered, but the framecount // needs to be updated _vm->_frameCount++; @@ -538,7 +538,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) { // FIXME: if start > 0, then this works incorrectly decodeFrame(anim, anim->frameOffsets[frame], displayBuffer, _vm->getDisplayWidth() * _vm->getDisplayHeight()); - _vm->_frameCount++; + _vm->_frameCount++; anim->currentFrame++; if (anim->completed != 65535) { anim->completed++; @@ -547,7 +547,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) { if (anim->currentFrame > anim->maxFrame) { anim->currentFrame = anim->loopFrame; - _vm->_frameCount++; + _vm->_frameCount++; if (anim->state == ANIM_STOPPING || anim->currentFrame == -1) { anim->state = ANIM_PAUSE; @@ -728,7 +728,7 @@ void Anim::decodeFrame(AnimationData *anim, size_t frameOffset, byte *buf, size_ // Begin RLE decompression to output buffer - do { + do { markByte = readS.readByte(); switch (markByte) { case SAGA_FRAME_START: diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp index 87e825272d..47b2484547 100644 --- a/engines/saga/console.cpp +++ b/engines/saga/console.cpp @@ -117,7 +117,7 @@ bool Console::cmdPlayCutaway(int argc, const char **argv) { } bool Console::cmdCurrentScene(int argc, const char **argv) { - DebugPrintf("Current Scene is: %i, scene resource id: %i\n", + DebugPrintf("Current Scene is: %i, scene resource id: %i\n", _vm->_scene->currentSceneNumber(), _vm->_scene->currentSceneResourceId()); return true; } diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index f95730eeb7..aeac536af3 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -58,7 +58,7 @@ const bool SagaEngine::isMacResources() const { return (getPlatform() == Common: const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; } const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; } const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->sfxInfo; } -const GameSoundInfo *SagaEngine::getMusicInfo() const { +const GameSoundInfo *SagaEngine::getMusicInfo() const { static GameSoundInfo musicInfo; musicInfo.resourceType = kSoundPCM; musicInfo.frequency = 11025; @@ -68,7 +68,7 @@ const GameSoundInfo *SagaEngine::getMusicInfo() const { musicInfo.isBigEndian = false; musicInfo.isSigned = true; - return &musicInfo; + return &musicInfo; } const GameFontDescription *SagaEngine::getFontDescription(int index) { @@ -89,7 +89,7 @@ uint32 SagaEngine::getFeatures() const { if (_gf_compressed_sounds) result |= GF_COMPRESSED_SOUNDS; - return result; + return result; } Common::Language SagaEngine::getLanguage() const { return _gameDescription->desc.language; } diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h index 0b84669b7f..7a987b6057 100644 --- a/engines/saga/detection_tables.h +++ b/engines/saga/detection_tables.h @@ -690,7 +690,7 @@ static const SAGAGameDescription gameDescriptions[] = { {"scripts.res", GAME_SCRIPTFILE, "be38bbc5a26be809dbf39f13befebd01", -1}, //{"sfx.res", GAME_SOUNDFILE, "1c610d543f32ec8b525e3f652536f269", -1}, // There are two English versions of the game, each one with a different sfx.res file - // Known MD5 checksums for sfx.res in the English version of the game are + // Known MD5 checksums for sfx.res in the English version of the game are // 1c610d543f32ec8b525e3f652536f269 and 45a9a9f5d37740be24fd2ae2edf36573 {"sfx.res", GAME_SOUNDFILE, NULL, -1}, { NULL, 0, NULL, 0} diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp index 9a0892dbd0..157fed1216 100644 --- a/engines/saga/font.cpp +++ b/engines/saga/font.cpp @@ -249,7 +249,7 @@ int Font::getStringWidth(FontId fontId, const char *text, size_t count, FontEffe int ch; const byte *txt; - + font = getFont(fontId); txt = (const byte *) text; diff --git a/engines/saga/font.h b/engines/saga/font.h index 92ec5de312..6b930ddca0 100644 --- a/engines/saga/font.h +++ b/engines/saga/font.h @@ -141,7 +141,7 @@ class Font { } void textDrawRect(KnownFont font, Surface *ds, const char *text, const Common::Rect &rect, int color, int effectColor, FontEffectFlags flags) { textDrawRect(knownFont2FontIdx(font), ds, text, rect, color, effectColor, flags); - } + } void setFontMapping(int mapping) { _fontMapping = mapping; } @@ -168,7 +168,7 @@ class Font { void createOutline(FontData *font); void draw(FontId fontId, Surface *ds, const char *text, size_t count, const Common::Point &point, int color, int effectColor, FontEffectFlags flags); void outFont(const FontStyle &drawFont, Surface *ds, const char *text, size_t count, const Common::Point &point, int color, FontEffectFlags flags); - + FontData *getFont(FontId fontId) { validate(fontId); return _fonts[fontId]; diff --git a/engines/saga/ihnm_introproc.cpp b/engines/saga/ihnm_introproc.cpp index eaaff19c94..5f1d0157d5 100644 --- a/engines/saga/ihnm_introproc.cpp +++ b/engines/saga/ihnm_introproc.cpp @@ -228,7 +228,7 @@ bool Scene::playTitle(int title, int time, int mode) { break; } } - + if (checkKey()) { _vm->_scene->cutawaySkip(); interrupted = true; @@ -244,7 +244,7 @@ bool Scene::playTitle(int title, int time, int mode) { playParameter = false; frameTime = curTime; - + _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, backBufferSurface->w, backBufferSurface->h); } diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index b13bf94650..ef31b85156 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -69,14 +69,14 @@ static int verbTypeToTextStringsIdLUT[2][kVerbTypeIdsMax] = { -1, -1, -1}, - {-1, + {-1, kVerbIHNMWalk, kVerbIHNMLookAt, - kVerbIHNMTake, - kVerbIHNMUse, + kVerbIHNMTake, + kVerbIHNMUse, kVerbIHNMTalkTo, kVerbIHNMSwallow, - kVerbIHNMGive, + kVerbIHNMGive, kVerbIHNMPush} }; @@ -95,7 +95,7 @@ static int IHNMTextStringIdsLUT[56] = { 8, // Give 10, // Options 11, // Test - 12, // + 12, // 13, // Help 14, // Quit Game 16, // Fast @@ -672,7 +672,7 @@ bool Interface::processAscii(Common::KeyState keystate) { if (keystate.keycode == Common::KEYCODE_ESCAPE || keystate.keycode == Common::KEYCODE_RETURN) { _vm->_script->wakeUpThreads(kWaitTypeRequest); _vm->_interface->setMode(kPanelMain); - + _protectHash = 0; for (char *p = _textInputString; *p; p++) @@ -772,7 +772,7 @@ void Interface::draw() { drawStatusBar(); - if (_panelMode == kPanelMain || _panelMode == kPanelMap || + if (_panelMode == kPanelMain || _panelMode == kPanelMap || (_panelMode == kPanelNull && _vm->getGameId() == GID_IHNM_DEMO)) { _mainPanel.getRect(rect); backBuffer->blit(rect, _mainPanel.image); @@ -2336,7 +2336,7 @@ void Interface::drawVerbPanelText(Surface *ds, PanelButton *panelButton, KnownCo if (_vm->getGameType() == GType_ITE) { textId = verbTypeToTextStringsIdLUT[0][panelButton->id]; text = _vm->getTextString(textId); - } else { + } else { textId = verbTypeToTextStringsIdLUT[1][panelButton->id]; text = _vm->_script->_mainStrings.getString(textId + 1); textShadowKnownColor = kKnownColorTransparent; @@ -2397,7 +2397,7 @@ bool Interface::converseAddText(const char *text, int strId, int replyId, byte r for (i = len; i >= 0; i--) { c = _converseWorkString[i]; - + if (_vm->getGameType() == GType_ITE) { if ((c == ' ' || c == '\0') && (_vm->_font->getStringWidth(kKnownFontSmall, _converseWorkString, i, kFontNormal) <= _vm->getDisplayInfo().converseMaxTextWidth)) break; @@ -2674,7 +2674,7 @@ void Interface::mapPanelShow() { rect.left = rect.top = 0; - _vm->_resource->loadResource(_interfaceContext, + _vm->_resource->loadResource(_interfaceContext, _vm->_resource->convertResourceId(RID_ITE_TYCHO_MAP), resource, resourceLength); if (resourceLength == 0) { error("Interface::mapPanelShow() unable to load Tycho map resource"); diff --git a/engines/saga/ite_introproc.cpp b/engines/saga/ite_introproc.cpp index 0def0f5b22..2aa263b097 100644 --- a/engines/saga/ite_introproc.cpp +++ b/engines/saga/ite_introproc.cpp @@ -372,7 +372,7 @@ int Scene::ITEIntroCave1Proc(int param) { Event event; Event *q_event; int lang = 0; - + if (_vm->getLanguage() == Common::DE_DEU) lang = 1; else if (_vm->getLanguage() == Common::IT_ITA) @@ -485,7 +485,7 @@ int Scene::ITEIntroCave2Proc(int param) { Event event; Event *q_event; int lang = 0; - + if (_vm->getLanguage() == Common::DE_DEU) lang = 1; else if (_vm->getLanguage() == Common::IT_ITA) diff --git a/engines/saga/module.mk b/engines/saga/module.mk index a3765ef01c..c1b1c364f6 100644 --- a/engines/saga/module.mk +++ b/engines/saga/module.mk @@ -39,5 +39,5 @@ ifdef BUILD_PLUGINS PLUGIN := 1 endif -# Include common rules +# Include common rules include $(srcdir)/rules.mk diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 4158cd84c4..52a6734b8a 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -347,7 +347,7 @@ Music::Music(SagaEngine *vm, Audio::Mixer *mixer, MidiDriver *driver, int enable _currentVolume = 0; xmidiParser = MidiParser::createParser_XMIDI(); - smfParser = MidiParser::createParser_SMF(); + smfParser = MidiParser::createParser_SMF(); _digitalMusicContext = _vm->_resource->getContext(GAME_MUSICFILE); @@ -424,7 +424,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { MidiParser *parser; ResourceContext *context = NULL; byte *resourceData; - size_t resourceSize; + size_t resourceSize; uint32 loopStart; debug(2, "Music::play %d, %d", resourceId, flags); @@ -507,7 +507,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { context = _vm->_resource->getContext(GAME_MUSICFILE_GM); if (context == NULL) { context = _vm->_resource->getContext(GAME_RESOURCEFILE); - } + } } else { // I've listened to music from both the FM and the GM // file, and I've tentatively reached the conclusion diff --git a/engines/saga/objectmap.cpp b/engines/saga/objectmap.cpp index ef9bbc935c..c500ccf5ab 100644 --- a/engines/saga/objectmap.cpp +++ b/engines/saga/objectmap.cpp @@ -78,7 +78,7 @@ HitZone::HitZone(MemoryReadStreamEndian *readStream, int index, int sceneNumber) // WORKAROUND: bug #1259608: "ITE: Riff ignores command in Ferret merchant center" // Apparently ITE Mac version has bug in game data. Both ObjectMap and ActionMap - // for exit area are little taller (y = 123) and thus Riff goes to exit + // for exit area are little taller (y = 123) and thus Riff goes to exit // when clicked on barrel of nails. if (sceneNumber == 18 && index == 0 && i == 0 && j == 0 && point->y == 123) point->y = 129; diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp index 71fe937987..23eaa42531 100644 --- a/engines/saga/puzzle.cpp +++ b/engines/saga/puzzle.cpp @@ -149,7 +149,7 @@ void Puzzle::initPieces(void) { int frameNumber; SpriteList *spriteList; _vm->_actor->getSpriteParams(puzzle, frameNumber, spriteList); - + for (int i = 0; i < PUZZLE_PIECES; i++) { spI = &(spriteList->infoList[i]); _pieceInfo[i].offX = (byte)(spI->width >> 1); diff --git a/engines/saga/rscfile.cpp b/engines/saga/rscfile.cpp index 00e9415379..7914b3ed3b 100644 --- a/engines/saga/rscfile.cpp +++ b/engines/saga/rscfile.cpp @@ -143,7 +143,7 @@ bool Resource::loadMacContext(ResourceContext *context) { uint32 macDataOffset; MacResMap macResMap; - MacResType *macResTypes; + MacResType *macResTypes; MacResType *macResType; MacResource *macResource; @@ -209,7 +209,7 @@ bool Resource::loadMacContext(ResourceContext *context) { for (i = macResMap.numTypes, macResType = macResTypes; i > 0; i--, macResType++) { context->file->seek(macResType->offset + macMapOffset + macResMap.typeOffset); - for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) { + for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) { macResource->id = context->file->readUint16BE(); macResource->nameOffset = context->file->readUint16BE(); macResource->dataOffset = context->file->readUint32BE(); @@ -222,7 +222,7 @@ bool Resource::loadMacContext(ResourceContext *context) { } } - for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) { + for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) { if (macResource->nameOffset != -1) { context->file->seek(macResource->nameOffset + macMapOffset + macResMap.nameOffset); macNameLen = context->file->readByte(); @@ -235,7 +235,7 @@ bool Resource::loadMacContext(ResourceContext *context) { for (i = macResMap.numTypes, macResType = macResTypes; i > 0; i--, macResType++) { //getting offsets & sizes of midi if (((context->fileType & GAME_MUSICFILE_GM) > 0) && (macResType->id == ID_MIDI)) { - + context->count = macResType->maxItemId + 1; context->table = (ResourceData *)calloc(context->count, sizeof(*context->table)); for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) { @@ -283,10 +283,10 @@ bool Resource::loadContext(ResourceContext *context) { if (context->fileType & GAME_SWAPENDIAN) context->isBigEndian = !context->isBigEndian; - + isMacBinary = (context->fileType & GAME_MACBINARY) > 0; context->fileType &= ~GAME_MACBINARY; - + if (isMacBinary) { if (!loadMacContext(context)) { return false; @@ -447,7 +447,7 @@ bool Resource::createContexts() { sprintf(_voicesFileName[0], "voicesd.cmp"); _vm->_gf_compressed_sounds = true; } - } else if (Common::File::exists("inherit the earth voices") || + } else if (Common::File::exists("inherit the earth voices") || Common::File::exists("inherit the earth voices.cmp")) { _contextsCount++; voicesFileIndex = _contextsCount - 1; @@ -547,7 +547,7 @@ bool Resource::createContexts() { context->fileType = GAME_MUSICFILE; } else if (!soundFileInArray && i == soundFileIndex) { context->fileName = soundFileName; - context->fileType = GAME_SOUNDFILE; + context->fileType = GAME_SOUNDFILE; } else if (!voicesFileInArray && i == voicesFileIndex) { context->fileName = _voicesFileName[0]; // can be GAME_VOICEFILE or GAME_SOUNDFILE | GAME_VOICEFILE or GAME_VOICEFILE | GAME_SWAPENDIAN @@ -740,7 +740,7 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) { } free(_vm->_sndRes->_fxTable); - + _vm->_sndRes->_fxTableLen = resourceLength / 4; _vm->_sndRes->_fxTable = (FxTable *)malloc(sizeof(FxTable) * _vm->_sndRes->_fxTableLen); @@ -791,7 +791,7 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) { } free(_vm->_music->_songTable); - + _vm->_music->_songTableLen = resourceLength / 4; _vm->_music->_songTable = (int32 *)malloc(sizeof(int32) * _vm->_music->_songTableLen); diff --git a/engines/saga/rscfile.h b/engines/saga/rscfile.h index 765f362489..ee2181ae09 100644 --- a/engines/saga/rscfile.h +++ b/engines/saga/rscfile.h @@ -165,7 +165,7 @@ private: bool loadContext(ResourceContext *context); bool loadMacContext(ResourceContext *context); - bool loadSagaContext(ResourceContext *context, uint32 contextOffset, uint32 contextSize); + bool loadSagaContext(ResourceContext *context, uint32 contextOffset, uint32 contextSize); public: MetaResource _metaResource; diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 9b6217ed19..85b1111503 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -445,8 +445,8 @@ enum ColorId { enum KnownColor { kKnownColorTransparent, - kKnownColorBrightWhite, - kKnownColorWhite, + kKnownColorBrightWhite, + kKnownColorWhite, kKnownColorBlack, kKnownColorSubtitleTextColor, @@ -655,8 +655,8 @@ private: public: ColorId KnownColor2ColorId(KnownColor knownColor); - void setTalkspeed(int talkspeed); - int getTalkspeed(); + void setTalkspeed(int talkspeed); + int getTalkspeed(); }; } // End of namespace Saga diff --git a/engines/saga/sagaresnames.h b/engines/saga/sagaresnames.h index 99d32a2d13..5bce483c3e 100644 --- a/engines/saga/sagaresnames.h +++ b/engines/saga/sagaresnames.h @@ -87,7 +87,7 @@ namespace Saga { #define RID_ITEDEMO_MAIN_PANEL 2 #define RID_ITEDEMO_CONVERSE_PANEL 3 -#define RID_ITEDEMO_OPTION_PANEL 3 // FIXME: should be 4 but it is an empty resource. +#define RID_ITEDEMO_OPTION_PANEL 3 // FIXME: should be 4 but it is an empty resource. #define RID_ITEDEMO_MAIN_SPRITES 5 // Proper fix would be not load options panel when demo is running #define RID_ITEDEMO_MAIN_PANEL_SPRITES 6 #define RID_ITEDEMO_MAIN_STRINGS 8 //main strings diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 5390009616..4520c3f406 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -676,9 +676,9 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { debug(3, "Loading scene number %d:", _sceneNumber); if (isNonInteractiveIHNMDemoPart()) { - // WORKAROUND for the non-interactive part of the IHNM demo: When restarting the + // WORKAROUND for the non-interactive part of the IHNM demo: When restarting the // non-interactive demo, opcode sfMainMode is incorrectly called. Therefore, if any - // of the scenes of the non-interactive demo are loaded (scenes 144-149), set panel + // of the scenes of the non-interactive demo are loaded (scenes 144-149), set panel // to null and lock the user interface _vm->_interface->deactivate(); _vm->_interface->setMode(kPanelNull); diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index cf61df8ea8..7664af314f 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -665,7 +665,7 @@ void Script::playfieldClick(const Point& mousePoint, bool leftButton) { doVerb(); return; } - } else { + } else { if (_vm->getGameType() == GType_IHNM) { if ((hitZone->getFlags() & kHitZoneNoWalk) && (_pendingVerb != getVerbType(kVerbWalkTo))) { doVerb(); @@ -738,8 +738,8 @@ void Script::playfieldClick(const Point& mousePoint, bool leftButton) { // (screens with Gorrister's heart) in IHNM. For some reason, this zone does // not have a corresponding action zone, so we auto-use it here, like the exits // in Benny's chapter - if (_vm->_scene->currentChapterNumber() == 1 && - _vm->_scene->currentSceneNumber() >= 16 && + if (_vm->_scene->currentChapterNumber() == 1 && + _vm->_scene->currentSceneNumber() >= 16 && _vm->_scene->currentSceneNumber() <= 19 && _pendingVerb == getVerbType(kVerbWalkTo) && hitZone != NULL && hitZone->getHitZoneId() == 24576) { @@ -813,7 +813,7 @@ void Script::whichObject(const Point& mousePoint) { // Note: for IHNM, the default right button action is "Look at" for actors, // but "Talk to" makes much more sense newRightButtonVerb = getVerbType(kVerbTalkTo); - // Slight hack because of the above change: the jukebox in Gorrister's chapter + // Slight hack because of the above change: the jukebox in Gorrister's chapter // is an actor, so change the right button action to "Look at" if (_vm->getGameType() == GType_IHNM && objectId == 8199) newRightButtonVerb = getVerbType(kVerbLookAt); diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 39ca8ac112..4862ce3be0 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -840,7 +840,7 @@ void Script::sfDropObject(SCRIPTFUNC_PARAMS) { obj->_sceneNumber = _vm->_scene->currentSceneNumber(); // HACK for the compact disk in Ellen's chapter - // Change the scene number of the compact disk so that it's not shown. It will be shown + // Change the scene number of the compact disk so that it's not shown. It will be shown // once Ellen says that there's something different (i.e. after speaking with AM) // See Actor::actorSpeech for the other part of this hack if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 3 && @@ -982,7 +982,7 @@ void Script::sfCycleFrames(SCRIPTFUNC_PARAMS) { actor->_actorFlags |= kActorRandom; } if (flags & kCycleReverse) { - if (_vm->getGameType() == GType_IHNM && + if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 2 && _vm->_scene->currentSceneNumber() == 41) { // WORKAROUND: Prevent Benny from walking backwards after talking to the child via the monitor. This // occurs in the original as well, and is fixed by not setting the kActorBackwards flag at this point @@ -1728,7 +1728,7 @@ void Script::sfScriptStartCutAway(SCRIPTFUNC_PARAMS) { thread->pop(); // Not used int16 fade = thread->pop(); - _vm->_anim->setCutAwayMode(kPanelCutaway); + _vm->_anim->setCutAwayMode(kPanelCutaway); _vm->_anim->playCutaway(cut, fade != 0); } @@ -1804,7 +1804,7 @@ void Script::sfShowIHNMDemoHelpBg(SCRIPTFUNC_PARAMS) { } void Script::sfAddIHNMDemoHelpTextLine(SCRIPTFUNC_PARAMS) { - int stringId = thread->pop(); + int stringId = thread->pop(); TextListEntry textEntry; Event event; diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index 9f8a155e32..d6114b3fc4 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -172,7 +172,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff } else { soundInfo = _vm->getSfxInfo(); } - + context->table[resourceId].fillSoundPatch(soundInfo); MemoryReadStream readS(soundResource, soundResourceLength); @@ -184,8 +184,8 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff resourceType = kSoundVOC; } else if (!memcmp(soundResource, "RIFF", 4) != 0) { resourceType = kSoundWAV; - } - + } + bool uncompressedSound = false; // If patch data exists for sound resource 4 (used in ITE intro), don't treat this sound as compressed // Patch data for this resource is in file p2_a.iaf or p2_a.voc diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index 34b54e30f9..b5c675a403 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -120,7 +120,7 @@ void Sprite::loadList(int resourceId, SpriteList &spriteList) { if (offset >= spriteListLength) { // ITE Mac demos throw this warning warning("Sprite::loadList offset exceeded"); - return; + return; } spritePointer = spriteListData; diff --git a/engines/saga/xref.txt b/engines/saga/xref.txt index 1d3aff0824..ea775f5b2e 100644 --- a/engines/saga/xref.txt +++ b/engines/saga/xref.txt @@ -9,7 +9,7 @@ Watcom C++ arguments order: Sceneres.h ========== - LOADREQ_FIGURE + LOADREQ_FIGURE LOADREQ_OBJECT LOADREQ_BACKGROUND SAGA_BG_IMAGE LOADREQ_ZBUF SAGA_BG_MASK |