diff options
author | Johannes Schickel | 2012-09-26 04:17:31 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-09-26 04:17:55 +0200 |
commit | 89abab97e3124fa25eb4c7d3e8b38501747a8d17 (patch) | |
tree | d60a833c9ed352fbe44c0b9a6b8ff43fcbc29419 /engines/sci | |
parent | a6c6c74350bb673c178d9756a1625ca128d24f21 (diff) | |
download | scummvm-rg350-89abab97e3124fa25eb4c7d3e8b38501747a8d17.tar.gz scummvm-rg350-89abab97e3124fa25eb4c7d3e8b38501747a8d17.tar.bz2 scummvm-rg350-89abab97e3124fa25eb4c7d3e8b38501747a8d17.zip |
JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/file.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/kfile.cpp | 6 | ||||
-rw-r--r-- | engines/sci/engine/kvideo.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/vm.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/controls32.cpp | 6 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 14 | ||||
-rw-r--r-- | engines/sci/graphics/paint16.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sound/drivers/fmtowns.cpp | 12 | ||||
-rw-r--r-- | engines/sci/video/robot_decoder.cpp | 6 | ||||
-rw-r--r-- | engines/sci/video/robot_decoder.h | 4 |
12 files changed, 32 insertions, 32 deletions
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index a0f7ebf4a2..3dc042389e 100644 --- a/engines/sci/engine/file.cpp +++ b/engines/sci/engine/file.cpp @@ -95,7 +95,7 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u outFile = saveFileMan->openForSaving(wrappedName, isCompressed); if (!outFile) debugC(kDebugLevelFile, " -> file_open(_K_FILE_MODE_CREATE): failed to create file '%s'", englishName.c_str()); - + // QfG1 opens the character export file with _K_FILE_MODE_CREATE first, // closes it immediately and opens it again with this here. Perhaps // other games use this for read access as well. I guess changing this @@ -387,7 +387,7 @@ uint32 VirtualIndexFile::read(char *buffer, uint32 size) { uint32 VirtualIndexFile::write(const char *buffer, uint32 size) { _changed = true; uint32 curPos = _ptr - _buffer; - + // Check if the buffer needs to be resized if (curPos + size >= _bufferSize) { _bufferSize = curPos + size + 1; diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index f5f46285be..b6b36c47e7 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -524,7 +524,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(PalCycle), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, // SCI2 Empty functions - + // Debug function used to track resources { MAP_EMPTY(ResourceTrack), SIG_EVERYWHERE, "(.*)", NULL, NULL }, // Future TODO: This call is used in the floppy version of QFG4 to add diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index f7cc4f44b5..e977f15c0c 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -340,7 +340,7 @@ reg_t kFileIOClose(EngineState *s, int argc, reg_t *argv) { if (argv[0] == SIGNAL_REG) return s->r_acc; - + uint16 handle = argv[0].toUint16(); #ifdef ENABLE_SCI32 @@ -624,7 +624,7 @@ reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) { // Special case for KQ6 Mac: The game checks for two video files to see // if they exist before it plays them. Since we support multiple naming // schemes for resource fork files, we also need to support that here in - // case someone has a "HalfDome.bin" file, etc. + // case someone has a "HalfDome.bin" file, etc. if (!exists && g_sci->getGameId() == GID_KQ6 && g_sci->getPlatform() == Common::kPlatformMacintosh && (name == "HalfDome" || name == "Kq6Movie")) exists = Common::MacResManager::exists(name); @@ -998,7 +998,7 @@ reg_t kMakeSaveFileName(EngineState *s, int argc, reg_t *argv) { if ((virtualId < SAVEGAMEID_OFFICIALRANGE_START) || (virtualId > SAVEGAMEID_OFFICIALRANGE_END)) error("kMakeSaveFileName: invalid savegame ID specified"); uint saveSlot = virtualId - SAVEGAMEID_OFFICIALRANGE_START; - + Common::Array<SavegameDesc> saves; listSavegames(saves); diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp index 6bf9aff2fe..9b0cb38f51 100644 --- a/engines/sci/engine/kvideo.cpp +++ b/engines/sci/engine/kvideo.cpp @@ -275,7 +275,7 @@ reg_t kRobot(EngineState *s, int argc, reg_t *argv) { // Signal the engine scripts that the video is done writeSelector(s->_segMan, argv[1], SELECTOR(signal), SIGNAL_REG); } else { - writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG); + writeSelector(s->_segMan, argv[1], SELECTOR(signal), NULL_REG); } break; default: diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 951fc7c363..04c1dab158 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -825,7 +825,7 @@ byte *SegManager::allocDynmem(int size, const char *descr, reg_t *addr) { } bool SegManager::freeDynmem(reg_t addr) { - if (addr.getSegment() < 1 || addr.getSegment() >= _heap.size() || + if (addr.getSegment() < 1 || addr.getSegment() >= _heap.size() || !_heap[addr.getSegment()] || _heap[addr.getSegment()]->getType() != SEG_TYPE_DYNMEM) return false; // error diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 3f43966976..ef8f165084 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -228,7 +228,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP uint32 exportAddr = scr->validateExportFunc(pubfunct, false); if (!exportAddr) return NULL; - + // Check if a breakpoint is set on this method g_sci->checkExportBreakpoint(script, pubfunct); diff --git a/engines/sci/graphics/controls32.cpp b/engines/sci/graphics/controls32.cpp index ad1d9e8623..5535a7408a 100644 --- a/engines/sci/graphics/controls32.cpp +++ b/engines/sci/graphics/controls32.cpp @@ -68,7 +68,7 @@ void GfxControls32::kernelTexteditChange(reg_t controlObject) { while (captureEvents) { curEvent = g_sci->getEventManager()->getSciEvent(SCI_EVENT_KEYBOARD | SCI_EVENT_PEEK); - + if (curEvent.type == SCI_EVENT_NONE) { eventMan->getSciEvent(SCI_EVENT_KEYBOARD); // consume the event } else { @@ -170,11 +170,11 @@ void GfxControls32::kernelTexteditChange(reg_t controlObject) { // Note: the following checkAltInput call might make the text // too wide to fit, but SSCI fails to check that too. } - + reg_t hunkId = readSelector(_segMan, controlObject, SELECTOR(bitmap)); Common::Rect nsRect = g_sci->_gfxCompare->getNSRect(controlObject); //texteditCursorErase(); // TODO: Cursor - + // Write back string _segMan->strcpy(textReference, text.c_str()); // Modify the buffer and show it diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 968014c032..8b7fa2c384 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -197,7 +197,7 @@ void GfxFrameout::kernelUpdatePlane(reg_t object) { } else { it->planeOffsetX = 0; } - + if (it->planeRect.top < 0) { it->planeOffsetY = -it->planeRect.top; it->planeRect.top = 0; @@ -420,7 +420,7 @@ void GfxFrameout::deletePlaneItems(reg_t planeObject) { } else { objectMatches = true; } - + if (objectMatches) { FrameoutEntry *itemEntry = *listIterator; listIterator = _screenItems.erase(listIterator); @@ -661,7 +661,7 @@ void GfxFrameout::kernelFrameout() { if (!itemEntry->visible) continue; - + if (itemEntry->object.isNull()) { // Picture cel data _coordAdjuster->fromScriptToDisplay(itemEntry->y, itemEntry->x); @@ -703,7 +703,7 @@ void GfxFrameout::kernelFrameout() { view->getCelRect(itemEntry->loopNo, itemEntry->celNo, itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->celRect); else - view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo, + view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo, itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->scaleX, itemEntry->scaleY, itemEntry->celRect); @@ -755,10 +755,10 @@ void GfxFrameout::kernelFrameout() { if (view) { if (!clipRect.isEmpty()) { if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128)) - view->draw(itemEntry->celRect, clipRect, translatedClipRect, + view->draw(itemEntry->celRect, clipRect, translatedClipRect, itemEntry->loopNo, itemEntry->celNo, 255, 0, view->isSci2Hires()); else - view->drawScaled(itemEntry->celRect, clipRect, translatedClipRect, + view->drawScaled(itemEntry->celRect, clipRect, translatedClipRect, itemEntry->loopNo, itemEntry->celNo, 255, itemEntry->scaleX, itemEntry->scaleY); } } @@ -817,7 +817,7 @@ void GfxFrameout::printPlaneItemList(Console *con, reg_t planeObject) { for (FrameoutList::iterator listIterator = _screenItems.begin(); listIterator != _screenItems.end(); listIterator++) { FrameoutEntry *e = *listIterator; reg_t itemPlane = readSelector(_segMan, e->object, SELECTOR(plane)); - + if (planeObject == itemPlane) { Common::String curItemName = _segMan->getObjectName(e->object); Common::Rect icr = e->celRect; diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index 89f3625e2c..d20aa80c77 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -559,8 +559,8 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) { SciTrackOriginReply originReply; SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, kDisplay_workarounds, &originReply); if (solution.type == WORKAROUND_NONE) - error("Unknown kDisplay argument (%04x:%04x) from method %s::%s (script %d, localCall %x)", - PRINT_REG(displayArg), originReply.objectName.c_str(), originReply.methodName.c_str(), + error("Unknown kDisplay argument (%04x:%04x) from method %s::%s (script %d, localCall %x)", + PRINT_REG(displayArg), originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr, originReply.localCallOffset); assert(solution.type == WORKAROUND_IGNORE); break; diff --git a/engines/sci/sound/drivers/fmtowns.cpp b/engines/sci/sound/drivers/fmtowns.cpp index 6d8bb2e525..21cb2f1e43 100644 --- a/engines/sci/sound/drivers/fmtowns.cpp +++ b/engines/sci/sound/drivers/fmtowns.cpp @@ -52,8 +52,8 @@ public: uint16 _duration; private: - uint8 _id; - uint8 _velo; + uint8 _id; + uint8 _velo; uint8 _program; MidiDriver_FMTowns *_drv; @@ -76,7 +76,7 @@ public: void addChannels(int num); void dropChannels(int num); - + uint8 currentProgram() const; private: @@ -132,7 +132,7 @@ private: TownsMidiPart **_parts; TownsChannel **_out; - + uint8 _masterVolume; bool _soundOn; @@ -590,7 +590,7 @@ void MidiDriver_FMTowns::addMissingChannels() { avlChan -= _parts[i]->_chanMissing; uint8 m = _parts[i]->_chanMissing; _parts[i]->_chanMissing = 0; - _parts[i]->addChannels(m); + _parts[i]->addChannels(m); } else { _parts[i]->_chanMissing -= avlChan; _parts[i]->addChannels(avlChan); @@ -601,7 +601,7 @@ void MidiDriver_FMTowns::addMissingChannels() { void MidiDriver_FMTowns::updateParser() { if (_timerProc) - _timerProc(_timerProcPara); + _timerProc(_timerProcPara); } void MidiDriver_FMTowns::updateChannels() { diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 608c77136f..0337a8d306 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -109,13 +109,13 @@ bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) { } bool RobotDecoder::load(GuiResourceId id) { - // TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) - + // TODO: RAMA's robot 1003 cannot be played (shown at the menu screen) - // its drawn at odd coordinates. SV can't play it either (along with some // others), so it must be some new functionality added in RAMA's robot // videos. Skip it for now. if (g_sci->getGameId() == GID_RAMA && id == 1003) return false; - + // TODO: The robot video in the Lighthouse demo gets stuck if (g_sci->getGameId() == GID_LIGHTHOUSE && id == 16) return false; @@ -247,7 +247,7 @@ void RobotDecoder::readNextPacket() { audioTrack->queueBuffer(g_sci->_audio->getDecodedRobotAudioFrame(_fileStream, audioChunkSize), audioChunkSize * 2); } else { _fileStream->skip(audioChunkSize); - } + } } void RobotDecoder::readHeaderChunk() { diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h index ebc3262939..437954f7fb 100644 --- a/engines/sci/video/robot_decoder.h +++ b/engines/sci/video/robot_decoder.h @@ -45,13 +45,13 @@ public: bool loadStream(Common::SeekableReadStream *stream); bool load(GuiResourceId id); void close(); - + void setPos(uint16 x, uint16 y) { _pos = Common::Point(x, y); } Common::Point getPos() const { return _pos; } protected: void readNextPacket(); - + private: class RobotVideoTrack : public FixedRateVideoTrack { public: |