diff options
author | Max Horn | 2011-06-20 00:59:48 +0200 |
---|---|---|
committer | Max Horn | 2011-06-20 00:59:48 +0200 |
commit | 88913c0139ac6d1dfb356d3048702b7bc8ef4079 (patch) | |
tree | a7436d20333c28f87f2ed0bc15c743b5eb8144ee /engines/m4/mads_logic.cpp | |
parent | 3853e76202b132e769ae149720eca931cd87104a (diff) | |
download | scummvm-rg350-88913c0139ac6d1dfb356d3048702b7bc8ef4079.tar.gz scummvm-rg350-88913c0139ac6d1dfb356d3048702b7bc8ef4079.tar.bz2 scummvm-rg350-88913c0139ac6d1dfb356d3048702b7bc8ef4079.zip |
ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
Diffstat (limited to 'engines/m4/mads_logic.cpp')
-rw-r--r-- | engines/m4/mads_logic.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp index b1e57bd7f3..cc28a26e68 100644 --- a/engines/m4/mads_logic.cpp +++ b/engines/m4/mads_logic.cpp @@ -177,7 +177,7 @@ void MadsSceneLogic::initializeDataMap() { uint32 MadsSceneLogic::getDataValue(int dataId) { switch (dataId) { - case 1: + case 1: return _madsVm->scene()->_abortTimersMode2; case 2: return _madsVm->scene()->_abortTimers; @@ -208,7 +208,7 @@ uint32 MadsSceneLogic::getDataValue(int dataId) { void MadsSceneLogic::setDataValue(int dataId, uint16 dataValue) { switch (dataId) { - case 1: + case 1: _madsVm->scene()->_abortTimersMode2 = (AbortTimerMode)dataValue; break; case 2: @@ -297,7 +297,7 @@ uint16 MadsSceneLogic::startReversibleSpriteSequence(uint16 srcSpriteIdx, bool f uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2), spriteFrame->y + (spriteFrame->height() / 2))); - return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0, + return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0, true, 100, depth - 1, 1, ANIMTYPE_REVERSIBLE, 0, 0); } @@ -306,7 +306,7 @@ uint16 MadsSceneLogic::startCycledSpriteSequence(uint16 srcSpriteIdx, bool flipp uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2), spriteFrame->y + (spriteFrame->height() / 2))); - return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0, + return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0, true, 100, depth - 1, 1, ANIMTYPE_CYCLED, 0, 0); } @@ -315,7 +315,7 @@ uint16 MadsSceneLogic::startSpriteSequence3(uint16 srcSpriteIdx, bool flipped, i uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2), spriteFrame->y + (spriteFrame->height() / 2))); - return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0, + return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0, true, 100, depth - 1, -1, ANIMTYPE_CYCLED, 0, 0); } @@ -335,11 +335,11 @@ void MadsSceneLogic::getPlayerSpritesPrefix() { strcpy(_madsVm->_player._spritesPrefix, "RXSM"); else if (_madsVm->globals()->_nextSceneId == 112) strcpy(_madsVm->_player._spritesPrefix, ""); - + if (strcmp(oldName, _madsVm->_player._spritesPrefix) != 0) _madsVm->_player._spritesChanged = true; - if ((_madsVm->globals()->_nextSceneId == 105) || + if ((_madsVm->globals()->_nextSceneId == 105) || ((_madsVm->globals()->_nextSceneId == 109) && (_madsVm->globals()->_globals[15] != 0))) { // TODO: unknown flag setting _madsVm->_player._spritesChanged = true; @@ -420,7 +420,7 @@ void MadsSceneLogic::initializeScripts() { if ((language != 1) || (_madsVm->getLanguage() != Common::EN_ANY)) continue; - // Found script block for the given game and language. + // Found script block for the given game and language. _scriptsSize = (i < (offsets.size() - 1)) ? offsets[i + 1] - offsets[i] : f.size() - offsets[i]; break; } @@ -433,7 +433,7 @@ void MadsSceneLogic::initializeScripts() { // Load up the list of subroutines into a hash map uint32 blockOffset = f.pos() - 3; - uint32 subsStart = 0; + uint32 subsStart = 0; for (;;) { // Get next entry Common::String subName; @@ -593,12 +593,12 @@ void MadsSceneLogic::execute(uint32 subOffset) { } case OP_DSTORE: { // Stores data variable - param = getParam(scriptOffset, opcode); + param = getParam(scriptOffset, opcode); ScriptVar v = stack.pop(); setDataValue(param, v.isInt() ? v.get() : 0); break; } - + case OP_LOAD: // loads local variable onto stack param = getParam(scriptOffset, opcode); stack.push(locals[param]); @@ -621,7 +621,7 @@ void MadsSceneLogic::execute(uint32 subOffset) { case OP_GSTORE: // pops stack and stores in global variable param = getParam(scriptOffset, opcode); - assert(param < TOTAL_NUM_VARIABLES); + assert(param < TOTAL_NUM_VARIABLES); _madsVm->globals()->_globals[param] = stack.pop().get(); break; @@ -647,7 +647,7 @@ void MadsSceneLogic::execute(uint32 subOffset) { // Condition satisfied - do the jump scriptOffset = param; break; - + case OP_JMPTRUE: // conditional jump param = subOffset + getParam(scriptOffset, opcode); if (stack.pop().get() != 0) @@ -708,7 +708,7 @@ void MadsSceneLogic::execute(uint32 subOffset) { case OP_OR: param1 |= param2; break; case OP_EOR: param1 ^= param2; break; } - + stack.push(ScriptVar(param1)); } break; @@ -774,7 +774,7 @@ uint32 MadsSceneLogic::getParam(uint32 &scriptOffset, int opcode) { */ void MadsSceneLogic::getCallParameters(int numParams, Common::Stack<ScriptVar> &stack, ScriptVar *callParams) { assert(numParams <= MAX_CALL_PARAMS); - for (int i = 0; i < numParams; ++i, ++callParams) + for (int i = 0; i < numParams; ++i, ++callParams) *callParams = stack.pop(); } @@ -881,7 +881,7 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac case 14: { // DynamicHotspots_add EXTRACT_PARAMS(7); - int idx = _madsVm->scene()->_dynamicHotspots.add(p[0], p[1], p[2], + int idx = _madsVm->scene()->_dynamicHotspots.add(p[0], p[1], p[2], Common::Rect(p[6], p[5], p[6] + p[4], p[5] + p[3])); stack.push(ScriptVar(idx)); break; |