diff options
| author | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
|---|---|---|
| committer | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
| commit | 6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch) | |
| tree | c44c4e61f18ddd537f7082cb48869cf33d422fbd /sword2 | |
| parent | 86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff) | |
| download | scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2 scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip | |
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'sword2')
| -rw-r--r-- | sword2/build_display.cpp | 2 | ||||
| -rw-r--r-- | sword2/console.cpp | 10 | ||||
| -rw-r--r-- | sword2/controls.cpp | 8 | ||||
| -rw-r--r-- | sword2/controls.h | 4 | ||||
| -rw-r--r-- | sword2/debug.cpp | 2 | ||||
| -rw-r--r-- | sword2/driver/animation.h | 2 | ||||
| -rw-r--r-- | sword2/driver/d_sound.cpp | 2 | ||||
| -rw-r--r-- | sword2/driver/menu.cpp | 6 | ||||
| -rw-r--r-- | sword2/driver/render.cpp | 2 | ||||
| -rw-r--r-- | sword2/driver/sprite.cpp | 2 | ||||
| -rw-r--r-- | sword2/function.cpp | 4 | ||||
| -rw-r--r-- | sword2/icons.cpp | 2 | ||||
| -rw-r--r-- | sword2/logic.h | 8 | ||||
| -rw-r--r-- | sword2/maketext.cpp | 4 | ||||
| -rw-r--r-- | sword2/maketext.h | 4 | ||||
| -rw-r--r-- | sword2/memory.cpp | 2 | ||||
| -rw-r--r-- | sword2/mouse.cpp | 4 | ||||
| -rw-r--r-- | sword2/mouse.h | 4 | ||||
| -rw-r--r-- | sword2/protocol.cpp | 2 | ||||
| -rw-r--r-- | sword2/resman.cpp | 8 | ||||
| -rw-r--r-- | sword2/router.cpp | 120 | ||||
| -rw-r--r-- | sword2/save_rest.cpp | 6 | ||||
| -rw-r--r-- | sword2/speech.cpp | 4 | ||||
| -rw-r--r-- | sword2/sword2.cpp | 12 | ||||
| -rw-r--r-- | sword2/walker.cpp | 2 |
25 files changed, 113 insertions, 113 deletions
diff --git a/sword2/build_display.cpp b/sword2/build_display.cpp index af8fcf0093..c95c176f41 100644 --- a/sword2/build_display.cpp +++ b/sword2/build_display.cpp @@ -186,7 +186,7 @@ void Screen::displayMsg(byte *text, int time) { byte oldPal[256 * 4]; debug(2, "DisplayMsg: %s", text); - + if (getFadeStatus() != RDFADE_BLACK) { fadeDown(); waitForFade(); diff --git a/sword2/console.cpp b/sword2/console.cpp index 76a96ea7fb..45cec9baeb 100644 --- a/sword2/console.cpp +++ b/sword2/console.cpp @@ -260,7 +260,7 @@ bool Debugger::Cmd_Mem(int argc, const char **argv) { DebugPrintf("%9ld %-3d %-4d %-20s %s\n", blocks[i]->size, blocks[i]->id, blocks[i]->uid, type, head->name); } - + free(blocks); DebugPrintf("---------------------------------------------------------------------------\n"); @@ -286,7 +286,7 @@ bool Debugger::Cmd_Res(int argc, const char **argv) { for (uint i = 0; i < numClusters; i++) { DebugPrintf("%-20s ", resFiles[i].fileName); - if (!(resFiles[i].cd & LOCAL_PERM)) { + if (!(resFiles[i].cd & LOCAL_PERM)) { switch (resFiles[i].cd & 3) { case BOTH: DebugPrintf("CD 1 & 2\n"); @@ -368,7 +368,7 @@ bool Debugger::Cmd_Start(int argc, const char **argv) { } int start = atoi(argv[1]); - + if (start < 0 || start >= (int) numStarts) { DebugPrintf("Not a legal start position\n"); return true; @@ -674,7 +674,7 @@ bool Debugger::Cmd_ShowVar(int argc, const char **argv) { } varNo = atoi(argv[1]); - + // search for a spare slot in the watch-list, but also watch out for // this variable already being in the list @@ -705,7 +705,7 @@ bool Debugger::Cmd_HideVar(int argc, const char **argv) { } varNo = atoi(argv[1]); - + // search for 'varNo' in the watch-list while (showVarNo < MAX_SHOWVARS && _showVar[showVarNo] != varNo) showVarNo++; diff --git a/sword2/controls.cpp b/sword2/controls.cpp index c677e3f4b2..7ff8df39b5 100644 --- a/sword2/controls.cpp +++ b/sword2/controls.cpp @@ -57,7 +57,7 @@ protected: byte *_surface; bool _original; }; - + WidgetSurface *_surfaces; int _numStates; int _state; @@ -103,7 +103,7 @@ public: class FontRendererGui { private: Sword2Engine *_vm; - + struct Glyph { byte *_data; int _width; @@ -170,7 +170,7 @@ void FontRendererGui::fetchText(uint32 textId, byte *buf) { if (buf) buf[i] = data[i + 2]; } - + buf[i] = 0; _vm->_resman->closeResource(textId / SIZE); } @@ -877,7 +877,7 @@ int QuitDialog::runModal() { OptionsDialog::OptionsDialog(Sword2Engine *vm) : Dialog(vm) { _fr = new FontRendererGui(_vm, _vm->_controlsFontId); - + _mixer = _vm->_mixer; _panel = new Widget(this, 1); diff --git a/sword2/controls.h b/sword2/controls.h index a2b199e6e2..59668f7d53 100644 --- a/sword2/controls.h +++ b/sword2/controls.h @@ -85,7 +85,7 @@ private: Widget *_gfxPreview; Button *_okButton; Button *_cancelButton; - + Audio::Mixer *_mixer; public: @@ -176,7 +176,7 @@ class RestoreDialog : public SaveRestoreDialog { public: RestoreDialog(Sword2Engine *vm) : SaveRestoreDialog(vm, kRestoreDialog) {} }; - + } // End of namespace Sword2 #endif diff --git a/sword2/debug.cpp b/sword2/debug.cpp index cc4745bc46..7726963eca 100644 --- a/sword2/debug.cpp +++ b/sword2/debug.cpp @@ -326,7 +326,7 @@ void Debugger::drawDebugGraphics() { // walk-grid if (_displayWalkGrid) - _vm->_logic->_router->plotWalkGrid(); + _vm->_logic->_router->plotWalkGrid(); // player feet coord marker diff --git a/sword2/driver/animation.h b/sword2/driver/animation.h index 5958d03692..99138ffd79 100644 --- a/sword2/driver/animation.h +++ b/sword2/driver/animation.h @@ -69,7 +69,7 @@ struct MovieInfo { uint frames; bool seamless; }; - + class MoviePlayer { private: Sword2Engine *_vm; diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index d936a43941..f24646a9af 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -247,7 +247,7 @@ MusicInputStream::MusicInputStream(int cd, SoundFileHandle *fh, uint32 musicId, _bufferEnd = _buffer + BUFFER_SIZE; _remove = false; _fading = 0; - + _decoder = getAudioStream(_fh, "music", _cd, _musicId, &_numSamples); if (_decoder) { _samplesLeft = _numSamples; diff --git a/sword2/driver/menu.cpp b/sword2/driver/menu.cpp index 065b2cf99b..e344d70fd5 100644 --- a/sword2/driver/menu.cpp +++ b/sword2/driver/menu.cpp @@ -142,7 +142,7 @@ void Mouse::processMenu() { // each frame we need to clear the icon area. clearIconArea(menu, i, &r1); - + if (_pocketStatus[menu][i] == MAXMENUANIMS) { xoff = (RDMENU_ICONWIDE / 2); r2.left = curx - xoff; @@ -183,7 +183,7 @@ void Mouse::processMenu() { } /** - * This function brings a specified menu into view. + * This function brings a specified menu into view. * @param menu RDMENU_TOP or RDMENU_BOTTOM, depending on which menu to show * @return RD_OK, or an error code */ @@ -261,7 +261,7 @@ int32 Mouse::setMenuIcon(uint8 menu, uint8 pocket, byte *icon) { // Check for invalid menu parameter. if (menu > RDMENU_BOTTOM) return RDERR_INVALIDMENU; - + // Check for invalid pocket parameter if (pocket >= RDMENU_MAXPOCKETS) return RDERR_INVALIDPOCKET; diff --git a/sword2/driver/render.cpp b/sword2/driver/render.cpp index 1b41f58f13..94b8fa305f 100644 --- a/sword2/driver/render.cpp +++ b/sword2/driver/render.cpp @@ -328,7 +328,7 @@ void Screen::startRenderCycle() { /** * This function should be called at the end of the render cycle. - * @return true if the render cycle is to be terminated, + * @return true if the render cycle is to be terminated, * or false if it should continue */ diff --git a/sword2/driver/sprite.cpp b/sword2/driver/sprite.cpp index a52faef3b9..8a0b3407f7 100644 --- a/sword2/driver/sprite.cpp +++ b/sword2/driver/sprite.cpp @@ -196,7 +196,7 @@ int32 Screen::decompressRLE16(byte *dst, byte *src, int32 decompSize, byte *colT src++; // if we've decompressed all of the data - if (dst == endDest) { + if (dst == endDest) { rv = 0; // return "OK" break; } diff --git a/sword2/function.cpp b/sword2/function.cpp index 60a418fb8c..3c93df22f6 100644 --- a/sword2/function.cpp +++ b/sword2/function.cpp @@ -813,7 +813,7 @@ int32 Logic::fnISpeak(int32 *params) { if (_vm->_sound->getSpeechStatus() != RDSE_SAMPLEFINISHED) return IR_REPEAT; - + // New fudge for 'fx' subtitles: If subtitles switched off, and // we don't want to use a wav for this line either, then just // quit back to script right now! @@ -897,7 +897,7 @@ int32 Logic::fnISpeak(int32 *params) { // Set the 'looping_flag' and the text-click-delays. We can // left-click past the text after half a second, and // right-click past it after a quarter of a second. - + ob_logic->looping = 1; _leftClickDelay = 6; _rightClickDelay = 3; diff --git a/sword2/icons.cpp b/sword2/icons.cpp index f3a445b93f..87cd0b4a88 100644 --- a/sword2/icons.cpp +++ b/sword2/icons.cpp @@ -191,7 +191,7 @@ void Mouse::buildSystemMenu() { for (int i = 0; i < ARRAYSIZE(icon_list); i++) { byte *icon = _vm->_resman->openResource(icon_list[i]) + sizeof(StandardHeader); - + // The only case when an icon is grayed is when the player // is dead. Then SAVE is not available. diff --git a/sword2/logic.h b/sword2/logic.h index ebb58f3e9e..15520b4219 100644 --- a/sword2/logic.h +++ b/sword2/logic.h @@ -168,10 +168,10 @@ public: int32 fnRegisterStartPoint(int32 *params); int32 fnInitBackground(int32 *params); int32 fnSetSession(int32 *params); - int32 fnBackSprite(int32 *params); - int32 fnSortSprite(int32 *params); - int32 fnForeSprite(int32 *params); - int32 fnRegisterMouse(int32 *params); + int32 fnBackSprite(int32 *params); + int32 fnSortSprite(int32 *params); + int32 fnForeSprite(int32 *params); + int32 fnRegisterMouse(int32 *params); int32 fnAnim(int32 *params); int32 fnRandom(int32 *params); int32 fnPreLoad(int32 *params); diff --git a/sword2/maketext.cpp b/sword2/maketext.cpp index 0b635de5eb..b42abd60bc 100644 --- a/sword2/maketext.cpp +++ b/sword2/maketext.cpp @@ -357,7 +357,7 @@ void FontRenderer::copyChar(FrameHeader *charPtr, byte *spritePtr, uint16 sprite // Apparently overlapping is never considered here? memcpy(dest, source, charPtr->width); source += charPtr->width; - } + } rowPtr += spriteWidth; } } @@ -435,7 +435,7 @@ uint32 FontRenderer::buildNewBloc(byte *ascii, int16 x, int16 y, uint16 width, u x = text_left_margin; else if (x > text_right_margin) x = text_right_margin; - + // Move if too high or too low if (y < text_top_margin) diff --git a/sword2/maketext.h b/sword2/maketext.h index 31477705e7..97207a811c 100644 --- a/sword2/maketext.h +++ b/sword2/maketext.h @@ -32,7 +32,7 @@ namespace Sword2 { // Usually the only texts on screen are the subtitles and the mouse-over text, // but there can also be a considerable number of debugging messages... - + #define MAX_text_blocs MAX_DEBUG_TEXTS + 1 enum { @@ -93,7 +93,7 @@ private: uint16 charHeight(uint32 fontRes); FrameHeader* findChar(byte ch, byte *charSet); void copyChar(FrameHeader *charPtr, byte *spritePtr, uint16 spriteWidth, uint8 pen); - + public: FontRenderer(Sword2Engine *vm) : _vm(vm) { for (int i = 0; i < MAX_text_blocs; i++) diff --git a/sword2/memory.cpp b/sword2/memory.cpp index 2030ecc0aa..98feaa360d 100644 --- a/sword2/memory.cpp +++ b/sword2/memory.cpp @@ -232,7 +232,7 @@ void MemoryManager::memFree(byte *ptr) { _memBlockIndex[idx]->ptr = NULL; _totAlloc -= _memBlockIndex[idx]->size; - + // Remove the memory block from the index _numBlocks--; diff --git a/sword2/mouse.cpp b/sword2/mouse.cpp index c12258c07b..2d7d9fe607 100644 --- a/sword2/mouse.cpp +++ b/sword2/mouse.cpp @@ -999,11 +999,11 @@ void Mouse::mouseOnOff() { setMouse(0); // so we know to set the mouse pointer back to normal if 2nd - // hot-spot doesn't register because mouse pulled away + // hot-spot doesn't register because mouse pulled away // quickly (onto nothing) mouse_flicked_off = 1; - + // reset luggage only when necessary } else { // Mouse was flicked off for one cycle, but then moved onto diff --git a/sword2/mouse.h b/sword2/mouse.h index d2fc2bdb03..a09841f704 100644 --- a/sword2/mouse.h +++ b/sword2/mouse.h @@ -70,7 +70,7 @@ struct MouseAnim { uint8 runTimeComp; // type of runtime compression used for the // frame data uint8 noAnimFrames; // number of frames in the anim - int8 xHotSpot; + int8 xHotSpot; int8 yHotSpot; uint8 mousew; uint8 mouseh; @@ -82,7 +82,7 @@ struct MouseAnim { // The MOUSE_holding mode is entered when the conversation menu is closed, and // exited when the mouse cursor moves off that menu area. I don't know why yet. - + // mouse unit - like ObjectMouse, but with anim resource & pc (needed if // sprite is to act as mouse detection mask) diff --git a/sword2/protocol.cpp b/sword2/protocol.cpp index 4941fa87d5..aba97478af 100644 --- a/sword2/protocol.cpp +++ b/sword2/protocol.cpp @@ -42,7 +42,7 @@ byte *Sword2Engine::fetchPalette(byte *screenFile) { palette[1] = 0; palette[2] = 0; palette[3] = 0; - + return palette; } diff --git a/sword2/resman.cpp b/sword2/resman.cpp index 987ac50577..60ea6cbc85 100644 --- a/sword2/resman.cpp +++ b/sword2/resman.cpp @@ -36,7 +36,7 @@ namespace Sword2 { // Welcome to the easy resource manager - written in simple code for easy // maintenance -// +// // The resource compiler will create two files // // resource.inf which is a list of ascii cluster file names @@ -154,7 +154,7 @@ ResourceManager::ResourceManager(Sword2Engine *vm) { for (i = 0; i < _totalClusters; i++) { file.read(cdInf[i].clusterName, sizeof(cdInf[i].clusterName)); cdInf[i].cd = file.readByte(); - + if (file.ioFailed()) error("Cannot read cd.inf"); } @@ -209,7 +209,7 @@ ResourceManager::~ResourceManager() { void convertEndian(byte *file, uint32 len) { int i; StandardHeader *hdr = (StandardHeader *)file; - + file += sizeof(StandardHeader); SWAP32(hdr->compSize); @@ -404,7 +404,7 @@ byte *ResourceManager::openResource(uint32 res, bool dump) { // Relative resource within the file // First we have to find the file via the _resConvTable uint16 actual_res = _resConvTable[(res * 2) + 1]; - + debug(5, "openResource %s res %d", _resFiles[cluFileNum].fileName, res); // If we're loading a cluster that's only available from one diff --git a/sword2/router.cpp b/sword2/router.cpp index 894389e391..36a5483002 100644 --- a/sword2/router.cpp +++ b/sword2/router.cpp @@ -38,8 +38,8 @@ /**************************************************************************** * JROUTER.C polygon router with modular walks * using a tree of modules - * 21 july 94 - * 3 november 94 + * 21 july 94 + * 3 november 94 * System currently works by scanning grid data and coming up with a ROUTE * as a series of way points(nodes), the smoothest eight directional PATH * through these nodes is then found, and a WALK created to fit the PATH. @@ -47,9 +47,9 @@ * Two funtions are called by the user, RouteFinder creates a route as a * module list, HardWalk creates an animation list from the module list. * The split is only provided to allow the possibility of turning the - * autorouter over two game cycles. + * autorouter over two game cycles. **************************************************************************** - * + * * Routine timings on osborne 486 * * Read floor resource (file already loaded) 112 pixels @@ -59,7 +59,7 @@ * * **************************************************************************** - * + * * Modified 12 Oct 95 * * Target Points within 1 pixel of a line are ignored ??? @@ -101,7 +101,7 @@ void Router::allocateRouteMem() { // in middle of route, the old route will be safely cleared from // memory just before they create a new one - slotNo = returnSlotNo(Logic::_scriptVars[ID]); + slotNo = returnSlotNo(Logic::_scriptVars[ID]); // if this slot is already used, then it can't be needed any more // because this id is creating a new route! @@ -126,12 +126,12 @@ void Router::allocateRouteMem() { WalkData *Router::getRouteMem() { uint8 slotNo = returnSlotNo(Logic::_scriptVars[ID]); - + return (WalkData *)_routeSlots[slotNo]; } void Router::freeRouteMem() { - uint8 slotNo = returnSlotNo(Logic::_scriptVars[ID]); + uint8 slotNo = returnSlotNo(Logic::_scriptVars[ID]); free(_routeSlots[slotNo]); _routeSlots[slotNo] = NULL; @@ -147,8 +147,8 @@ void Router::freeAllRouteMem() { int32 Router::routeFinder(ObjectMega *ob_mega, ObjectWalkdata *ob_walkdata, int32 x, int32 y, int32 dir) { /********************************************************************* * RouteFinder.C polygon router with modular walks - * 21 august 94 - * 3 november 94 + * 21 august 94 + * 3 november 94 * routeFinder creates a list of modules that enables HardWalk to * create an animation list. * @@ -157,15 +157,15 @@ int32 Router::routeFinder(ObjectMega *ob_mega, ObjectWalkdata *ob_walkdata, int3 * directional PATH through these nodes is then found, this * information is made available to HardWalk for a WALK to be created * to fit the PATH. - * + * * 30 november 94 return values modified - * + * * return 0 = failed to find a route - * + * * 1 = found a route * * 2 = mega already at target - * + * *********************************************************************/ int32 routeFlag = 0; @@ -181,7 +181,7 @@ int32 Router::routeFinder(ObjectMega *ob_mega, ObjectWalkdata *ob_walkdata, int3 // All route data now loaded start finding a route - // Check if we can get a route through the floor. changed 12 Oct95 JPS + // Check if we can get a route through the floor. changed 12 Oct95 JPS routeFlag = getRoute(); @@ -223,7 +223,7 @@ int32 Router::routeFinder(ObjectMega *ob_mega, ObjectWalkdata *ob_walkdata, int3 // The path is in module format, but steps taken in each // direction are not accurate - // if target dir = 8 then the walk isn't linked to an anim so + // if target dir = 8 then the walk isn't linked to an anim so // we can create a route without sliding and miss the exact // target @@ -265,9 +265,9 @@ int32 Router::getRoute() { * a ROUTE as a series of way points(nodes). * * static routeData _route[O_ROUTE_SIZE]; - * + * * return 0 = failed to find a route - * + * * 1 = found a route * * 2 = mega already at target @@ -291,7 +291,7 @@ int32 Router::getRoute() { if (routeGot == 0) { // still looking for a route check if target is within a pixel - // of a line + // of a line // scan through the nodes linking each node to its nearest // neighbour until no more nodes change @@ -340,7 +340,7 @@ int32 Router::smoothestPath() { // Secondly when walking in a given direction the number of steps // required to reach the end of that run is not calculated accurately. // This is because I was unable to derive a function to relate number - // of steps taken between two points to the shrunken step size + // of steps taken between two points to the shrunken step size int i; int32 steps = 0; @@ -393,7 +393,7 @@ int32 Router::smoothestPath() { dDS = dDS + NO_DIRECTIONS; // Determine the amount of turning involved in each possible - // path + // path dS = turntable[dS]; dD = turntable[dD]; @@ -403,7 +403,7 @@ int32 Router::smoothestPath() { dDS = turntable[dDS]; // get the best path out ie assume next section uses best - // direction + // direction if (dSD < dSS) dSS = dSD; @@ -447,8 +447,8 @@ int32 Router::smoothestPath() { assert(options); - i = 0; - steps = 0; + i = 0; + steps = 0; do { int32 opt = 1 << turns[i]; @@ -467,7 +467,7 @@ int32 Router::smoothestPath() { _smoothPath[steps].dir = 9; _smoothPath[steps].num = ROUTE_END_FLAG; - return 1; + return 1; } int32 Router::smoothCheck(int32 best, int32 p, int32 dirS, int32 dirD) { @@ -611,8 +611,8 @@ int32 Router::smoothCheck(int32 best, int32 p, int32 dirS, int32 dirD) { break; } - - return k; + + return k; } void Router::slidyPath() { @@ -715,7 +715,7 @@ void Router::earlySlowOut(ObjectMega *ob_mega, ObjectWalkdata *ob_walkdata) { // if this mega does actually have slow-out frames if (_usingSlowOutFrames) { - // overwrite the next step (half a cycle) of the walk + // overwrite the next step (half a cycle) of the walk // (ie .step - 0..5) do { @@ -790,11 +790,11 @@ void Router::addSlowOutFrames(WalkData *walkAnim) { if (_usingSlowOutFrames && _lastCount >= _framesPerStep) { // place stop frames here // slowdown at the end of the last walk - + slowOutFrameNo = _lastCount - _framesPerStep; debug(5, "SLOW OUT: slowOutFrameNo(%d) = _lastCount(%d) - _framesPerStep(%d)", slowOutFrameNo, _lastCount, _framesPerStep); - + // overwrite the last step (half a cycle) of the walk do { @@ -810,7 +810,7 @@ void Router::addSlowOutFrames(WalkData *walkAnim) { debug(5, "walkAnim[%d].frame = %d",slowOutFrameNo,walkAnim[slowOutFrameNo].frame); slowOutFrameNo++; } while (slowOutFrameNo < _lastCount); - + // add stationary frame(s) (OPTIONAL) for (slowOutFrameNo = _framesPerStep; slowOutFrameNo < _numberOfSlowOutFrames; slowOutFrameNo++) { @@ -834,7 +834,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) { * the route * * Parameters: georgeg, mouseg - * Returns: rout + * Returns: rout * * produce a module list from the line data *********************************************************************/ @@ -1081,7 +1081,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) { do { frameCount++; walkAnim[_lastCount + frameCount - 1].x += errorX * frameCount / frames; - } while (frameCount < frames); + } while (frameCount < frames); } if (errorY != 0) { @@ -1090,7 +1090,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) { do { frameCount++; walkAnim[_lastCount + frameCount - 1].y += errorY * frameCount / frames; - } while (frameCount < frames); + } while (frameCount < frames); } // Now is the time to put in the turn frames @@ -1099,7 +1099,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) { if (frames < _framesPerStep) { // this ensures that we don't put in // turn frames for this walk or the - // next + // next _currentDir = 99; } @@ -1120,11 +1120,11 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) { _frame = _lastCount - _framesPerStep; do { - // turning left + // turning left walkAnim[_frame].frame += _firstWalkingTurnLeftFrame; _frame++; } while (_frame < _lastCount); - } else if (lastDir == 1 || lastDir == -7 || lastDir == 2 || lastDir == -6) { + } else if (lastDir == 1 || lastDir == -7 || lastDir == 2 || lastDir == -6) { // turn at the end of the // current walk @@ -1272,7 +1272,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) { return; } -#ifndef FORCE_SLIDY +#ifndef FORCE_SLIDY // THE SOLID PATH ROUTINES @@ -1332,7 +1332,7 @@ int32 Router::solidPath() { solid = 2; _modularPath[1].dir = _smoothPath[0].dir; _modularPath[1].num = 0; - } + } _modularPath[solid - 1].x = _smoothPath[smooth - 1].x; _modularPath[solid - 1].y = _smoothPath[smooth - 1].y; @@ -1564,7 +1564,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) { } // check each turn condition in turn - if (lastDir != 99 && _currentDir != 99 && _usingWalkingTurnFrames) { + if (lastDir != 99 && _currentDir != 99 && _usingWalkingTurnFrames) { // only for george // 1 and -7 going right -1 and // 7 going left @@ -1582,7 +1582,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) { walkAnim[_frame].frame += _firstWalkingTurnLeftFrame; _frame++; } while (_frame < _lastCount); - } else if (lastDir == 1 || lastDir == -7 || lastDir == 2 || lastDir == -6) { + } else if (lastDir == 1 || lastDir == -7 || lastDir == 2 || lastDir == -6) { // turn at the end of // the current walk @@ -1603,7 +1603,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) { p++; lastDir = _currentDir; - // can only be valid first time round + // can only be valid first time round slowStart = false; } while (_modularPath[p].dir < NO_DIRECTIONS); @@ -1683,7 +1683,7 @@ bool Router::scan(int32 level) { // For all the nodes that have new values and a distance less than // enddist, ie dont check for new routes from a point we checked // before or from a point that is already further away than the best - // route so far. + // route so far. for (int i = 0; i < _nNodes; i++) { if (_node[i].dist < _node[_nNodes].dist && _node[i].level == level) { @@ -1719,12 +1719,12 @@ bool Router::scan(int32 level) { int32 Router::newCheck(int32 status, int32 x1, int32 y1, int32 x2, int32 y2) { /********************************************************************* * newCheck routine checks if the route between two points can be - * achieved without crossing any of the bars in the Bars array. + * achieved without crossing any of the bars in the Bars array. * * newCheck differs from check in that that 4 route options are * considered corresponding to actual walked routes. * - * Note distance doesnt take account of shrinking ??? + * Note distance doesnt take account of shrinking ??? * * Note Bars array must be properly calculated ie min max dx dy co *********************************************************************/ @@ -1905,7 +1905,7 @@ int32 Router::newCheck(int32 status, int32 x1, int32 y1, int32 x2, int32 y2) { // CHECK ROUTINES bool Router::check(int32 x1, int32 y1, int32 x2, int32 y2) { - // call the fastest line check for the given line + // call the fastest line check for the given line // returns true if line didn't cross any bars if (x1 == x2 && y1 == y2) @@ -1937,7 +1937,7 @@ bool Router::lineCheck(int32 x1, int32 y1, int32 x2, int32 y2) { int32 co = (y1 * dirx) - (x1 * diry); // new line equation for (int i = 0; i < _nBars && linesCrossed; i++) { - // skip if not on module + // skip if not on module if (xmax >= _bars[i].xmin && xmin <= _bars[i].xmax && ymax >= _bars[i].ymin && ymin <= _bars[i].ymax) { // Okay, it's a valid line. Calculate an intercept. Wow // but all this arithmetic we must have loads of time @@ -1952,13 +1952,13 @@ bool Router::lineCheck(int32 x1, int32 y1, int32 x2, int32 y2) { // skip if not on module if (xc >= xmin - 1 && xc <= xmax + 1) { - // skip if not on line + // skip if not on line if (xc >= _bars[i].xmin - 1 && xc <= _bars[i].xmax + 1) { int32 yc = ((_bars[i].co * diry) - (co * _bars[i].dy)) / slope; // skip if not on module if (yc >= ymin - 1 && yc <= ymax + 1) { - // skip if not on line + // skip if not on line if (yc >= _bars[i].ymin - 1 && yc <= _bars[i].ymax + 1) { linesCrossed = false; } @@ -1992,7 +1992,7 @@ bool Router::horizCheck(int32 x1, int32 y, int32 x2) { else { int32 ldy = y - _bars[i].y1; int32 xc = _bars[i].x1 + (_bars[i].dx * ldy) / _bars[i].dy; - // skip if not on module + // skip if not on module if (xc >= xmin - 1 && xc <= xmax + 1) linesCrossed = false; } @@ -2012,7 +2012,7 @@ bool Router::vertCheck(int32 x, int32 y1, int32 y2) { // anything for (int i = 0; i < _nBars && linesCrossed; i++) { - // skip if not on module + // skip if not on module if (x >= _bars[i].xmin && x <= _bars[i].xmax && ymax >= _bars[i].ymin && ymin <= _bars[i].ymax) { // Okay, it's a valid line calculate an intercept. Wow // but all this arithmetic we must have loads of time @@ -2025,7 +2025,7 @@ bool Router::vertCheck(int32 x, int32 y1, int32 y2) { else { int32 ldx = x - _bars[i].x1; int32 yc = _bars[i].y1 + (_bars[i].dy * ldx) / _bars[i].dx; - // the intercept overlaps + // the intercept overlaps if (yc >= ymin - 1 && yc <= ymax + 1) linesCrossed = false; } @@ -2047,22 +2047,22 @@ int32 Router::checkTarget(int32 x, int32 y) { // so ignore if it hits anything for (int i = 0; i < _nBars && onLine == 0; i++) { - // overlapping line + // overlapping line if (xmax >= _bars[i].xmin && xmin <= _bars[i].xmax && ymax >= _bars[i].ymin && ymin <= _bars[i].ymax) { int32 xc, yc; // okay this line overlaps the target calculate - // an y intercept for x + // an y intercept for x // vertical line so we know it overlaps y if (_bars[i].dx == 0) - yc = 0; + yc = 0; else { int ldx = x - _bars[i].x1; yc = _bars[i].y1 + (_bars[i].dy * ldx) / _bars[i].dx; } - // overlapping point for y + // overlapping point for y if (yc >= ymin && yc <= ymax) { // target on a line so drop out onLine = 3; @@ -2076,7 +2076,7 @@ int32 Router::checkTarget(int32 x, int32 y) { xc = _bars[i].x1 + (_bars[i].dx * ldy) / _bars[i].dy; } - // skip if not on module + // skip if not on module if (xc >= xmin && xc <= xmax) { // target on a line so drop out onLine = 3; @@ -2209,7 +2209,7 @@ void Router::extractRoute() { /********************************************************************* * extractRoute gets route from the node data after a full scan, route * is written with just the basic way points and direction options for - * heading to the next point. + * heading to the next point. *********************************************************************/ int32 prev; @@ -2308,7 +2308,7 @@ void Router::extractRoute() { // ANY direction _route[p].dirS = _route[p - 1].dirS; _route[p].dirD = _route[p - 1].dirD; - } else { + } else { _route[p].dirS = _targetDir; _route[p].dirD = _targetDir; } @@ -2377,7 +2377,7 @@ void Router::plotWalkGrid() { void Router::plotCross(int16 x, int16 y, uint8 colour) { _vm->_screen->drawLine(x - 1, y - 1, x + 1, y + 1, colour); - _vm->_screen->drawLine(x + 1, y - 1, x - 1, y + 1, colour); + _vm->_screen->drawLine(x + 1, y - 1, x - 1, y + 1, colour); } void Router::loadWalkGrid() { diff --git a/sword2/save_rest.cpp b/sword2/save_rest.cpp index fa7a10eb11..54af4de2f4 100644 --- a/sword2/save_rest.cpp +++ b/sword2/save_rest.cpp @@ -56,7 +56,7 @@ static void convertHeaderEndian(Sword2Engine::SaveGameHeader &header) { SWAP32(header.feet_x); SWAP32(header.feet_y); SWAP32(header.music_id); - + // ObjectHub SWAP32(header.player_hub.type); SWAP32(header.player_hub.logic_level); @@ -317,8 +317,8 @@ uint32 Sword2Engine::restoreFromBuffer(byte *buffer, uint32 size) { // Clean out the system kill list (no more objects to kill) _logic->resetKillList(); - - // Object hub is just after the standard header + + // Object hub is just after the standard header memcpy(_resman->openResource(CUR_PLAYER_ID) + sizeof(StandardHeader), &_saveGameHeader.player_hub, sizeof(ObjectHub)); _resman->closeResource(CUR_PLAYER_ID); diff --git a/sword2/speech.cpp b/sword2/speech.cpp index e15cc9c6ff..3be0e17b9d 100644 --- a/sword2/speech.cpp +++ b/sword2/speech.cpp @@ -119,11 +119,11 @@ void Logic::locateTalker(int32 *params) { // Leave space above their head _textY -= GAP_ABOVE_HEAD; - + // Adjust the text coords for RDSPR_DISPLAYALIGN ScreenInfo *screenInfo = _vm->_screen->getScreenInfo(); - + _textX -= screenInfo->scroll_offset_x; _textY -= screenInfo->scroll_offset_y; } diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp index a0d8d27d22..1d7927936c 100644 --- a/sword2/sword2.cpp +++ b/sword2/sword2.cpp @@ -77,7 +77,7 @@ GameList Engine_SWORD2_gameList() { DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) { DetectedGameList detectedGames; const Sword2GameSettings *g; - + // TODO: It would be nice if we had code here which distinguishes // between the 'sword2' and 'sword2demo' targets. The current code // can't do that since they use the same detectname. @@ -225,7 +225,7 @@ void Sword2Engine::setupPersistentResources() { Logic::_scriptVars = (uint32 *)(_resman->openResource(1) + sizeof(StandardHeader)); _resman->openResource(CUR_PLAYER_ID); } - + int Sword2Engine::init(GameDetector &detector) { // Get some falling RAM and put it in your pocket, never let it slip // away @@ -302,7 +302,7 @@ int Sword2Engine::init(GameDetector &detector) { startGame(); _screen->initialiseRenderCycle(); - + return 0; } @@ -378,7 +378,7 @@ int Sword2Engine::go() { _screen->buildDisplay(); #endif } - + return 0; } @@ -489,7 +489,7 @@ void Sword2Engine::parseInputEvents() { OSystem::Event event; uint32 now = _system->getMillis(); - + while (_system->pollEvent(event)) { switch (event.type) { case OSystem::EVENT_KEYDOWN: @@ -641,7 +641,7 @@ void Sword2Engine::pauseGame() { // Don't allow Pause while screen fading or while black if (_screen->getFadeStatus() != RDFADE_NONE) return; - + _sound->pauseAllSound(); _mouse->pauseGame(); diff --git a/sword2/walker.cpp b/sword2/walker.cpp index fb7d4bb8b6..e6ef4a011e 100644 --- a/sword2/walker.cpp +++ b/sword2/walker.cpp @@ -90,7 +90,7 @@ int Router::doWalk(ObjectLogic *ob_logic, ObjectGraphic *ob_graph, ObjectMega *o // an anim eg. repeatedly clicking on same object to repeat // an anim - no mega frame will appear in between runs of the // anim. - + if (ob_mega->feet_x == target_x && ob_mega->feet_y == target_y && ob_mega->current_dir == target_dir) { Logic::_scriptVars[RESULT] = 0; return IR_CONT; |
