diff options
113 files changed, 833 insertions, 833 deletions
diff --git a/engines/pegasus/ai/ai_area.cpp b/engines/pegasus/ai/ai_area.cpp index e4d31049f2..5ac8af8812 100644 --- a/engines/pegasus/ai/ai_area.cpp +++ b/engines/pegasus/ai/ai_area.cpp @@ -53,7 +53,7 @@ AIArea::AIArea(InputHandler *nextHandler) : InputHandler(nextHandler), _leftArea startIdling(); } -AIArea::~AIArea() { +AIArea::~AIArea() { if (_middleAreaOwner == kBiochipSignature) { BiochipItem *currentBiochip = ((PegasusEngine *)g_engine)->getCurrentBiochip(); if (currentBiochip && currentBiochip->isSelected()) @@ -83,7 +83,7 @@ void AIArea::saveAIState() { vm->_aiSaveStream = new Common::MemoryReadStream(out.getData(), out.size(), DisposeAfterUse::YES); } - + void AIArea::restoreAIState() { PegasusEngine *vm = (PegasusEngine *)g_engine; @@ -101,14 +101,14 @@ void AIArea::readAIRules(Common::ReadStream *stream) { void AIArea::initAIArea() { allocateSurface(Common::Rect(0, 0, 384, 96)); - + _leftAreaMovie.shareSurface(this); _leftAreaMovie.initFromMovieFile("Images/Items/Left Area Movie"); _leftAreaMovie.moveElementTo(kAILeftAreaLeft, kAILeftAreaTop); _leftAreaMovie.setDisplayOrder(kAILeftAreaOrder); _leftAreaMovie.startDisplaying(); _leftAreaMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel()); - + _middleAreaMovie.shareSurface(this); _middleAreaMovie.initFromMovieFile("Images/Items/Middle Area Movie"); _middleAreaMovie.moveElementTo(kAIMiddleAreaLeft, kAIMiddleAreaTop); @@ -116,7 +116,7 @@ void AIArea::initAIArea() { _middleAreaMovie.setDisplayOrder(kAIMiddleAreaOrder); _middleAreaMovie.startDisplaying(); _middleAreaMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel()); - + _rightAreaMovie.shareSurface(this); _rightAreaMovie.initFromMovieFile("Images/Items/Right Area Movie"); _rightAreaMovie.moveElementTo(kAIRightAreaLeft, kAIRightAreaTop); @@ -124,7 +124,7 @@ void AIArea::initAIArea() { _rightAreaMovie.setDisplayOrder(kAIRightAreaOrder); _rightAreaMovie.startDisplaying(); _rightAreaMovie.setVolume(((PegasusEngine *)g_engine)->getSoundFXLevel()); - + _AIMovie.setDisplayOrder(kAIMovieOrder); } @@ -274,7 +274,7 @@ void AIArea::playAIAreaSequence(const LowerClientSignature, const LowerAreaSigna bool AIArea::playAIMovie(const LowerAreaSignature area, const Common::String &movieName, bool keepLastFrame, const InputBits interruptFilter) { PegasusEngine *vm = (PegasusEngine *)g_engine; - + lockAIOut(); InputDevice.waitInput(interruptFilter); @@ -373,7 +373,7 @@ void AIArea::setLeftMovieTime(const TimeValue time) { _leftInventoryTime = time; } -void AIArea::setMiddleMovieTime(const LowerClientSignature client, const TimeValue time) { +void AIArea::setMiddleMovieTime(const LowerClientSignature client, const TimeValue time) { if (client == kInventorySignature) { _middleInventoryTime = time; if (_middleAreaOwner == kBiochipSignature) { @@ -419,7 +419,7 @@ void AIArea::handleInput(const Input &input, const Hotspot *cursorSpot) { InputHandler::handleInput(input, cursorSpot); } -void AIArea::toggleMiddleAreaOwner() { +void AIArea::toggleMiddleAreaOwner() { if (_middleAreaOwner == kInventorySignature) { BiochipItem *currentBiochip = ((PegasusEngine *)g_engine)->getCurrentBiochip(); if (currentBiochip) { @@ -437,7 +437,7 @@ void AIArea::toggleMiddleAreaOwner() { void AIArea::activateHotspots() { PegasusEngine *vm = (PegasusEngine *)g_engine; - + if (_middleAreaOwner == kBiochipSignature) { BiochipItem *currentBiochip = ((PegasusEngine *)g_engine)->getCurrentBiochip(); if (currentBiochip) @@ -593,7 +593,7 @@ TimeValue AIArea::getBigInfoTime() { return 0xffffffff; } -void AIArea::getSmallInfoSegment(TimeValue &start, TimeValue &stop) { +void AIArea::getSmallInfoSegment(TimeValue &start, TimeValue &stop) { if (_middleAreaOwner == kInventorySignature) { InventoryItem *currentItem = ((PegasusEngine *)g_engine)->getCurrentInventoryItem(); currentItem->getInfoRightTimes(start, stop); diff --git a/engines/pegasus/ai/ai_area.h b/engines/pegasus/ai/ai_area.h index 10bfc933a1..806e6ef6bb 100644 --- a/engines/pegasus/ai/ai_area.h +++ b/engines/pegasus/ai/ai_area.h @@ -43,15 +43,15 @@ namespace Common { 1) the inventory/AI help area 2) the middle area 3) the biochip display area - + Area 1 is used for displaying the current inventory item. When the player changes the current item, either by selecting a new one in the inventory list or by picking up a new item, area 1 updates to show the new item. - + If the AI decides to give a message, the AI's head temporarily takes over area 1 for the duration of the message, then goes away, returning the area to the current inventory item. - + Area 2 is used to display the current inventory item's state, the current biochip's state, and any extra information from the AI. The contention for this area is resolved as follows: @@ -70,7 +70,7 @@ namespace Common { at arbitrary times. The map biochip is one example which causes drawing when the player takes a step. Another example is the poison gas canister, which flashes in this area to indicate a dangerous compound. - + Area 3 is used to display the current biochip. When the player changes the current biochip, either by selecting a new one from the biochip list or by picking up a new one, area 3 updates to show the new item. In addition, some biochips can play @@ -92,13 +92,13 @@ public: void saveAIState(); void restoreAIState(); - + void handleInput(const Input &, const Hotspot *); void activateHotspots(); void clickInHotspot(const Input &, const Hotspot *); - + void setAIVolume(const uint16); - + // There are only so many legal combinations of client/area. // Here is the list of supported pairs: // kInventorySignature kLeftAreaSignature @@ -109,7 +109,7 @@ public: // Further, the kAISignature never sets a static frame time in the left area, // but only plays a sequence from the AI movie. void setAIAreaToTime(const LowerClientSignature, const LowerAreaSignature, const TimeValue); - + // The "Play" functions play the requested sequence synchronously. void playAIAreaSequence(const LowerClientSignature, const LowerAreaSignature, const TimeValue, const TimeValue); @@ -139,7 +139,7 @@ public: TimeValue getBigInfoTime(); void getSmallInfoSegment(TimeValue &, TimeValue &); -protected: +protected: void useIdleTime(); void setLeftMovieTime(const TimeValue); diff --git a/engines/pegasus/ai/ai_condition.cpp b/engines/pegasus/ai/ai_condition.cpp index 09ecbfe349..9fc9272566 100644 --- a/engines/pegasus/ai/ai_condition.cpp +++ b/engines/pegasus/ai/ai_condition.cpp @@ -67,7 +67,7 @@ void AITwoChildrenCondition::writeAICondition(Common::WriteStream *stream) { if (_leftChild) _leftChild->writeAICondition(stream); - if (_rightChild) + if (_rightChild) _rightChild->writeAICondition(stream); } @@ -81,14 +81,14 @@ void AITwoChildrenCondition::readAICondition(Common::ReadStream *stream) { AINotCondition::AINotCondition(AICondition* child) : AIOneChildCondition(child) { } - + bool AINotCondition::fireCondition() { return _child && !_child->fireCondition(); } AIAndCondition::AIAndCondition(AICondition *leftChild, AICondition *rightChild) : AITwoChildrenCondition(leftChild, rightChild) { } - + bool AIAndCondition::fireCondition() { return _leftChild && _leftChild->fireCondition() && _rightChild && _rightChild->fireCondition(); } @@ -229,7 +229,7 @@ bool AIDoesntHaveItemCondition::fireCondition() { AICurrentItemCondition::AICurrentItemCondition(const ItemID item) { _item = item; } - + bool AICurrentItemCondition::fireCondition() { InventoryItem *item = ((PegasusEngine *)g_engine)->getCurrentInventoryItem(); @@ -245,7 +245,7 @@ AICurrentBiochipCondition::AICurrentBiochipCondition(const ItemID biochip) { bool AICurrentBiochipCondition::fireCondition() { BiochipItem *biochip = ((PegasusEngine *)g_engine)->getCurrentBiochip(); - + if (_biochip == kNoItemID) return biochip == 0; @@ -281,7 +281,7 @@ bool AILastExtraCondition::fireCondition() { AICondition *makeLocationAndDoesntHaveItemCondition(const RoomID room, const DirectionConstant direction, const ItemID item) { AILocationCondition *location = new AILocationCondition(1); location->addLocation(MakeRoomView(room, direction)); - + AIDoesntHaveItemCondition *doesntHaveItem = new AIDoesntHaveItemCondition(item); return new AIAndCondition(location, doesntHaveItem); diff --git a/engines/pegasus/ai/ai_condition.h b/engines/pegasus/ai/ai_condition.h index f7fa1f33c8..ae85168a36 100644 --- a/engines/pegasus/ai/ai_condition.h +++ b/engines/pegasus/ai/ai_condition.h @@ -62,7 +62,7 @@ class AIOneChildCondition : public AICondition { public: AIOneChildCondition(AICondition *); virtual ~AIOneChildCondition(); - + virtual void writeAICondition(Common::WriteStream *); virtual void readAICondition(Common::ReadStream *); @@ -78,7 +78,7 @@ class AITwoChildrenCondition : public AICondition { public: AITwoChildrenCondition(AICondition *, AICondition *); virtual ~AITwoChildrenCondition(); - + virtual void writeAICondition(Common::WriteStream *); virtual void readAICondition(Common::ReadStream *); @@ -131,7 +131,7 @@ public: void stopTimer(); virtual bool fireCondition(); - + virtual void writeAICondition(Common::WriteStream *); virtual void readAICondition(Common::ReadStream *); diff --git a/engines/pegasus/ai/ai_rule.h b/engines/pegasus/ai/ai_rule.h index bccd4ecb06..aa2ca07332 100644 --- a/engines/pegasus/ai/ai_rule.h +++ b/engines/pegasus/ai/ai_rule.h @@ -48,7 +48,7 @@ public: _ruleAction = rule; _ruleActive = true; } - + ~AIRule() { if (_ruleCondition) delete _ruleCondition; diff --git a/engines/pegasus/compass.cpp b/engines/pegasus/compass.cpp index 6ae4e11a0d..5de8b91b11 100644 --- a/engines/pegasus/compass.cpp +++ b/engines/pegasus/compass.cpp @@ -62,7 +62,7 @@ void Compass::setFaderValue(const int32 angle) { FaderAnimation::setFaderValue(a); } -void Compass::draw(const Common::Rect &r1) { +void Compass::draw(const Common::Rect &r1) { if (_compassImage.isSurfaceValid()) { Common::Rect bounds; getBounds(bounds); diff --git a/engines/pegasus/compass.h b/engines/pegasus/compass.h index d66b432a38..67a8e06294 100644 --- a/engines/pegasus/compass.h +++ b/engines/pegasus/compass.h @@ -30,7 +30,7 @@ #include "pegasus/surface.h" namespace Pegasus { - + // Compass is defined with 0 as north, 90 east, 180 south, 270 west. // Clockwise rotation increases the angle, counterclockwise rotation decreases the angle. @@ -38,11 +38,11 @@ class Compass : public FaderAnimation { public: Compass(); virtual ~Compass(); - + void initCompass(); void deallocateCompass(); bool isCompassValid() const { return _compassImage.isSurfaceValid(); } - + void setFaderValue(const int32); protected: diff --git a/engines/pegasus/constants.h b/engines/pegasus/constants.h index 77a80256ac..f81d2197ac 100644 --- a/engines/pegasus/constants.h +++ b/engines/pegasus/constants.h @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ - + #ifndef PEGASUS_CONSTANTS_H #define PEGASUS_CONSTANTS_H diff --git a/engines/pegasus/cursor.cpp b/engines/pegasus/cursor.cpp index 205336a00b..5babdf34af 100644 --- a/engines/pegasus/cursor.cpp +++ b/engines/pegasus/cursor.cpp @@ -142,10 +142,10 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) { if (!cicnStream) error("Failed to find color icon %d", cursorInfo.tag); - + // PixMap section Graphics::PICTDecoder::PixMap pixMap = Graphics::PICTDecoder::readPixMap(*cicnStream); - + // Mask section cicnStream->readUint32BE(); // mask baseAddr uint16 maskRowBytes = cicnStream->readUint16BE(); // mask rowBytes @@ -159,17 +159,17 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) { cicnStream->readUint16BE(); // left uint16 height = cicnStream->readUint16BE(); // bottom cicnStream->readUint16BE(); // right - + // Data section cicnStream->readUint32BE(); // icon handle cicnStream->skip(maskRowBytes * height); // FIXME: maskHeight doesn't work here, though the specs say it should cicnStream->skip(rowBytes * height); - + // Palette section cicnStream->readUint32BE(); // always 0 cicnStream->readUint16BE(); // always 0 cursorInfo.colorCount = cicnStream->readUint16BE() + 1; - + cursorInfo.palette = new byte[cursorInfo.colorCount * 3]; for (uint16 i = 0; i < cursorInfo.colorCount; i++) { cicnStream->readUint16BE(); @@ -177,7 +177,7 @@ void Cursor::loadCursorImage(CursorInfo &cursorInfo) { cursorInfo.palette[i * 3 + 1] = cicnStream->readUint16BE() >> 8; cursorInfo.palette[i * 3 + 2] = cicnStream->readUint16BE() >> 8; } - + // PixMap data if (pixMap.pixelSize == 8) { cursorInfo.surface->create(pixMap.rowBytes, pixMap.bounds.height(), Graphics::PixelFormat::createFormatCLUT8()); diff --git a/engines/pegasus/detection.cpp b/engines/pegasus/detection.cpp index d9afacbf3e..908005b665 100644 --- a/engines/pegasus/detection.cpp +++ b/engines/pegasus/detection.cpp @@ -127,7 +127,7 @@ SaveStateList PegasusMetaEngine::listSaves(const char *target) const { Common::String desc = filenames[i].c_str() + 8; for (int j = 0; j < 4; j++) desc.deleteLastChar(); - + saveList.push_back(SaveStateDescriptor(i, desc)); } diff --git a/engines/pegasus/elements.cpp b/engines/pegasus/elements.cpp index 0310d26292..c84d555444 100644 --- a/engines/pegasus/elements.cpp +++ b/engines/pegasus/elements.cpp @@ -397,7 +397,7 @@ void Sprite::removeFrame(const uint32 frameNum) { --_currentFrameNum; } -void Sprite::setCurrentFrameIndex(const int32 frameNum) { +void Sprite::setCurrentFrameIndex(const int32 frameNum) { if (frameNum < 0) { if (_currentFrameNum != 0xffffffff) { _currentFrameNum = 0xffffffff; @@ -440,7 +440,7 @@ SpriteSequence::SpriteSequence(const DisplayElementID id, const DisplayElementID FrameSequence(id), _sprite(spriteID), _transparent(false) { } -void SpriteSequence::openFrameSequence() { +void SpriteSequence::openFrameSequence() { if (!isSequenceOpen()) { FrameSequence::openFrameSequence(); diff --git a/engines/pegasus/elements.h b/engines/pegasus/elements.h index d96d2173b1..140553f675 100644 --- a/engines/pegasus/elements.h +++ b/engines/pegasus/elements.h @@ -46,25 +46,25 @@ friend class GraphicsManager; public: DisplayElement(const DisplayElementID); virtual ~DisplayElement(); - + void setDisplayOrder(const DisplayOrder); DisplayOrder getDisplayOrder() const { return _elementOrder; } - + bool validToDraw(DisplayOrder, DisplayOrder); - + virtual void draw(const Common::Rect&) {} bool isDisplaying() { return _elementIsDisplaying; } virtual void startDisplaying(); virtual void stopDisplaying(); - + virtual void show(); virtual void hide(); bool isVisible() { return _elementIsVisible; } - + // triggerRedraw only triggers a draw if the element is displaying and visible. void triggerRedraw(); void setTriggeredElement(DisplayElement *); - + virtual void setBounds(const CoordType, const CoordType, const CoordType, const CoordType); virtual void setBounds(const Common::Rect &); virtual void getBounds(Common::Rect &) const; @@ -94,7 +94,7 @@ public: virtual ~DropHighlight() {} void setHighlightColor(const uint32 &highlight) { _highlightColor = highlight; } - void getHighlightColor(uint32 &highlight) const { highlight = _highlightColor; } + void getHighlightColor(uint32 &highlight) const { highlight = _highlightColor; } void setHighlightThickness(const uint16 thickness) { _thickness = thickness; } uint16 getHighlightThickness() const { return _thickness; } @@ -118,16 +118,16 @@ public: class IdlerAnimation : public Animation, public Idler { public: IdlerAnimation(const DisplayElementID); - + virtual void startDisplaying(); virtual void stopDisplaying(); - + TimeValue getLastTime() const { return _lastTime; } protected: virtual void useIdleTime(); virtual void timeChanged(const TimeValue); - + TimeValue _lastTime; }; @@ -146,12 +146,12 @@ public: virtual void openFrameSequence(); virtual void closeFrameSequence(); bool isSequenceOpen() const; - + uint16 getNumFrames() const { return _numFrames; } virtual uint16 getFrameNum() const { return _currentFrameNum; } virtual void setFrameNum(const int16); -protected: +protected: virtual void timeChanged(const TimeValue); virtual void newFrame(const uint16) {} @@ -176,18 +176,18 @@ public: virtual uint32 addFrame(SpriteFrame *, const CoordType, const CoordType); virtual void removeFrame(const uint32); virtual void discardFrames(); - + // Setting the current frame. // If the index is negative, sets the current frame to NULL and hides the sprite. // If the index is larger than the number of frames in the sprite, the number // is treated modulo the number of frames. virtual void setCurrentFrameIndex(const int32); virtual uint32 getCurrentFrameIndex() const { return _currentFrameNum; } - + virtual SpriteFrame *getFrame(const int32); - + virtual void draw(const Common::Rect &); - + uint32 getNumFrames() const { return _numFrames; } protected: @@ -236,13 +236,13 @@ class SoundLevel : public DisplayElement { public: SoundLevel(const DisplayElementID); virtual ~SoundLevel() {} - + void incrementLevel(); void decrementLevel(); - + uint16 getSoundLevel(); void setSoundLevel(uint16); - + void draw(const Common::Rect &); protected: diff --git a/engines/pegasus/energymonitor.cpp b/engines/pegasus/energymonitor.cpp index 7a9ca7878a..8aa77eb341 100644 --- a/engines/pegasus/energymonitor.cpp +++ b/engines/pegasus/energymonitor.cpp @@ -245,7 +245,7 @@ void EnergyMonitor::draw(const Common::Rect &r) { void EnergyMonitor::calibrateEnergyBar() { PegasusEngine *vm = (PegasusEngine *)g_engine; - + _calibrating = true; vm->setEnergyDeathReason(-1); diff --git a/engines/pegasus/fader.cpp b/engines/pegasus/fader.cpp index 77ad2cbe4e..a2bbf22944 100644 --- a/engines/pegasus/fader.cpp +++ b/engines/pegasus/fader.cpp @@ -39,7 +39,7 @@ void Fader::setFaderValue(const int32 newValue) { _currentValue = newValue; } -bool Fader::initFaderMove(const FaderMoveSpec &spec) { +bool Fader::initFaderMove(const FaderMoveSpec &spec) { bool faderMoves = false; int32 value = 0; @@ -86,7 +86,7 @@ void Fader::startFader(const FaderMoveSpec &spec) { } void Fader::startFaderSync(const FaderMoveSpec &spec) { - if (initFaderMove(spec)) { + if (initFaderMove(spec)) { setFlags(0); setScale(spec._faderScale); setSegment(spec._knots[0].knotTime, spec._knots[spec._numKnots - 1].knotTime); @@ -128,7 +128,7 @@ void Fader::continueFader() { start(); } -void Fader::timeChanged(const TimeValue newTime) { +void Fader::timeChanged(const TimeValue newTime) { if (_currentFaderMove._numKnots != 0) { uint32 i; for (i = 0; i < _currentFaderMove._numKnots; i++) @@ -163,7 +163,7 @@ void FaderMoveSpec::makeTwoKnotFaderSpec(const TimeScale faderScale, const TimeV _knots[1].knotValue = value2; } -void FaderMoveSpec::insertFaderKnot(const TimeValue knotTime, const int32 knotValue) { +void FaderMoveSpec::insertFaderKnot(const TimeValue knotTime, const int32 knotValue) { if (_numKnots != kMaxFaderKnots) { uint32 index; for (index = 0; index < _numKnots; index++) { @@ -203,7 +203,7 @@ void SoundFader::attachSound(Sound *sound) { _sound = sound; } -void SoundFader::setFaderValue(const int32 newVolume) { +void SoundFader::setFaderValue(const int32 newVolume) { if (_sound) _sound->setVolume((newVolume * _masterVolume) >> 8); diff --git a/engines/pegasus/fader.h b/engines/pegasus/fader.h index 24ecae021b..0a8cd549e6 100644 --- a/engines/pegasus/fader.h +++ b/engines/pegasus/fader.h @@ -63,7 +63,7 @@ protected: TimeValue knotTime; int32 knotValue; }; - + TimeScale _faderScale; uint32 _numKnots; @@ -92,7 +92,7 @@ public: protected: bool initFaderMove(const FaderMoveSpec &); virtual void timeChanged(const TimeValue); - + int32 _currentValue; FaderMoveSpec _currentFaderMove; }; diff --git a/engines/pegasus/gamestate.cpp b/engines/pegasus/gamestate.cpp index 601960e5de..7a4e657e02 100644 --- a/engines/pegasus/gamestate.cpp +++ b/engines/pegasus/gamestate.cpp @@ -62,7 +62,7 @@ Common::Error GameStateManager::writeGameState(Common::WriteStream *stream) { if (stream->err()) return Common::kWritingFailed; - + return Common::kNoError; } @@ -77,12 +77,12 @@ Common::Error GameStateManager::readGameState(Common::ReadStream *stream) { _lastRoom = stream->readUint16BE(); _lastDirection = stream->readByte(); _openDoorRoom = stream->readUint16BE(); - _openDoorDirection = stream->readByte(); + _openDoorDirection = stream->readByte(); _globalFlags.readFromStream(stream); _scoringFlags.readFromStream(stream); _itemTakenFlags.readFromStream(stream); - + readCaldoriaState(stream); readTSAState(stream); readPrehistoricState(stream); @@ -92,7 +92,7 @@ Common::Error GameStateManager::readGameState(Common::ReadStream *stream) { if (stream->err()) return Common::kReadingFailed; - + return Common::kNoError; } @@ -531,7 +531,7 @@ GameScoreType GameStateManager::getTotalScore() { ///////////////////////////////////////////// // // Caldoria data - + void GameStateManager::writeCaldoriaState(Common::WriteStream *stream) { _caldoriaFlags.writeToStream(stream); stream->writeUint32BE(_caldoriaFuseTimeLimit); @@ -2163,7 +2163,7 @@ void GameStateManager::setMarsHitRobotWithCannon(bool flag) { bool GameStateManager::getMarsHitRobotWithCannon() { return _marsFlags.getFlag(kMarsHitRobotWithCannonFlag); } - + void GameStateManager::setMarsReadyForShuttleTransport(bool value) { _marsFlags.setFlag(kMarsReadyForShuttleTransportFlag, value); } @@ -2179,7 +2179,7 @@ void GameStateManager::setMarsFinishedCanyonChase(bool flag) { bool GameStateManager::getMarsFinishedCanyonChase() { return _marsFlags.getFlag(kMarsFinishedCanyonChaseFlag); } - + void GameStateManager::setMarsThreadedMaze(bool flag) { _marsFlags.setFlag(kMarsThreadedMazeFlag, flag); } diff --git a/engines/pegasus/gamestate.h b/engines/pegasus/gamestate.h index 14ff5335f5..dd47bd6e51 100644 --- a/engines/pegasus/gamestate.h +++ b/engines/pegasus/gamestate.h @@ -94,12 +94,12 @@ enum { kScoringShieldedCardBombFlag, kScoringStunnedSinclairFlag, kScoringDisarmedNukeFlag, - + kScoringThrewBreakerFlag, kScoringExtendedBridgeFlag, kScoringGotHistoricalLogFlag, kScoringFinishedPrehistoricFlag, - + kScoringThrownByRobotFlag, kScoringGotMarsCardFlag, kScoringSawMarsKioskFlag, @@ -121,7 +121,7 @@ enum { kScoringStoppedRobotsShuttleFlag, kScoringGotMarsOpMemChipFlag, kScoringFinishedMarsFlag, - + kScoringSawSecurityMonitorFlag, kScoringFilledOxygenCanisterFlag, kScoringFilledArgonCanisterFlag, @@ -137,7 +137,7 @@ enum { kScoringStoppedNoradRobotFlag, kScoringGotNoradOpMemChipFlag, kScoringFinishedNoradFlag, - + kScoringRemovedDartFlag, kScoringAnalyzedDartFlag, kScoringBuiltAntidoteFlag, @@ -158,11 +158,11 @@ enum { kScoringStoppedWSCRobotFlag, kScoringGotWSCOpMemChipFlag, kScoringFinishedWSCFlag, - + kScoringMarsGandhiFlag, kScoringNoradGandhiFlag, kScoringWSCGandhiFlag, - + kNumScoringFlags }; @@ -297,21 +297,21 @@ public: // Base game state Common::Error writeGameState(Common::WriteStream *stream); Common::Error readGameState(Common::ReadStream *stream); - + void resetGameState(); - + void getCurrentLocation(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction); void setCurrentLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction); - + NeighborhoodID getCurrentNeighborhood(); void setCurrentNeighborhood(const NeighborhoodID neighborhood); RoomID getCurrentRoom(); void setCurrentRoom(const RoomID room); DirectionConstant getCurrentDirection(); void setCurrentDirection(const DirectionConstant direction); - + RoomViewID getCurrentRoomAndView(); - + void getNextLocation(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction); void setNextLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction); @@ -321,32 +321,32 @@ public: void setNextRoom(const RoomID room); DirectionConstant getNextDirection(); void setNextDirection(const DirectionConstant direction); - + void getLastLocation(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction); void setLastLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction); - + NeighborhoodID getLastNeighborhood(); void setLastNeighborhood(const NeighborhoodID neighborhood); RoomID getLastRoom(); void setLastRoom(const RoomID room); DirectionConstant getLastDirection(); void setLastDirection(const DirectionConstant direction); - + RoomViewID getLastRoomAndView(); - + void getOpenDoorLocation(RoomID &room, DirectionConstant &direction); void setOpenDoorLocation(const RoomID room, const DirectionConstant direction); RoomID getOpenDoorRoom(); void setOpenDoorRoom(const RoomID room); DirectionConstant getOpenDoorDirection(); void setOpenDoorDirection(const DirectionConstant direction); - + RoomViewID getDoorOpenRoomAndView(); - + bool isCurrentDoorOpen(); // Pegasus Prime - + // Scoring... // Scoring "Set" functions. // Caldoria/TSA scoring @@ -460,7 +460,7 @@ public: void setScoringMarsGandhi(const bool = true); void setScoringNoradGandhi(const bool = true); void setScoringWSCGandhi(const bool = true); - + // Scoring "Get" functions. bool getScoringSawINN(); bool getScoringTookShower(); @@ -574,27 +574,27 @@ public: void writeCaldoriaState(Common::WriteStream *stream); void readCaldoriaState(Common::ReadStream *stream); void resetCaldoriaState(); - + void writeTSAState(Common::WriteStream *stream); void readTSAState(Common::ReadStream *stream); void resetTSAState(); - + void writePrehistoricState(Common::WriteStream *stream); void readPrehistoricState(Common::ReadStream *stream); void resetPrehistoricState(); - + void writeNoradState(Common::WriteStream *stream); void readNoradState(Common::ReadStream *stream); void resetNoradState(); - + void writeMarsState(Common::WriteStream *stream); void readMarsState(Common::ReadStream *stream); void resetMarsState(); - + void writeWSCState(Common::WriteStream *stream); void readWSCState(Common::ReadStream *stream); void resetWSCState(); - + // Globals. void setWalkthroughMode(bool); bool getWalkthroughMode(); @@ -619,7 +619,7 @@ public: bool isTakenItemID(ItemID); void setTakenItem(Item *, bool); bool isTakenItem(Item *); - + // Caldoria void setCaldoriaFuseTimeLimit(const TimeValue); TimeValue getCaldoriaFuseTimeLimit(); @@ -653,7 +653,7 @@ public: bool getCaldoriaDoorBombed(); void setCaldoriaGunAimed(bool); bool getCaldoriaGunAimed(); - + // TSA void setRipTimerTime(TimeValue); TimeValue getRipTimerTime(); @@ -703,7 +703,7 @@ public: bool getTSASeenWSCAltered(); void setTSABiosuitOn(bool); bool getTSABiosuitOn(); - + // Prehistoric void setPrehistoricTriedToExtendBridge(bool); bool getPrehistoricTriedToExtendBridge(); @@ -717,7 +717,7 @@ public: bool getPrehistoricSeenBridgeZoom(); void setPrehistoricBreakerThrown(bool); bool getPrehistoricBreakerThrown(); - + // Norad void setNoradSeenTimeStream(bool); bool getNoradSeenTimeStream(); @@ -743,10 +743,10 @@ public: NoradSubPrepState getNoradSubPrepState(); void setNoradArrivedFromSub(bool); bool getNoradArrivedFromSub(); - + // Mars void setMarsSeenTimeStream(bool); - bool getMarsSeenTimeStream(); + bool getMarsSeenTimeStream(); void setMarsHeardUpperPodMessage(bool); bool getMarsHeardUpperPodMessage(); void setMarsRobotThrownPlayer(bool); @@ -857,25 +857,25 @@ private: FlagsArray<byte, kNumGlobalFlags> _globalFlags; FlagsArray<byte, kNumScoringFlags> _scoringFlags; FlagsArray<uint32, kNumItems> _itemTakenFlags; - + FlagsArray<byte, kNumCaldoriaFlags> _caldoriaFlags; TimeValue _caldoriaFuseTimeLimit; - + TimeValue _TSARipTimerTime; TimeValue _TSAFuseTimeLimit; byte _TSAState; byte _T0BMonitorMode; TimeValue _T0BMonitorStart; FlagsArray<byte, kNumTSAFlags> _TSAFlags; - + FlagsArray<byte, kNumPrehistoricFlags> _prehistoricFlags; - + FlagsArray<byte, kNumNoradFlags> _noradFlags; uint16 _noradSubRoomPressure; NoradSubPrepState _noradSubPrepState; - + FlagsArray<byte, kNumMarsFlags> _marsFlags; - + FlagsArray<byte, kNumWSCFlags> _WSCFlags; }; diff --git a/engines/pegasus/graphics.cpp b/engines/pegasus/graphics.cpp index 1712ed5f1a..8dbd678809 100644 --- a/engines/pegasus/graphics.cpp +++ b/engines/pegasus/graphics.cpp @@ -50,7 +50,7 @@ GraphicsManager::GraphicsManager(PegasusEngine *vm) : _vm(vm) { _updatesEnabled = true; _screenFader = new ScreenFader(); } - + GraphicsManager::~GraphicsManager() { _workArea.free(); delete _screenFader; @@ -270,7 +270,7 @@ void GraphicsManager::shakeTheWorld(TimeValue duration, TimeScale scale) { // Convert to millis duration = duration * 1000 / scale; - + uint32 startTime = g_system->getMillis(); while (g_system->getMillis() < startTime + duration) { diff --git a/engines/pegasus/graphics.h b/engines/pegasus/graphics.h index 799f996e16..fcdf1c9e78 100644 --- a/engines/pegasus/graphics.h +++ b/engines/pegasus/graphics.h @@ -72,7 +72,7 @@ public: protected: void markCursorAsDirty(); -private: +private: PegasusEngine *_vm; bool _modifiedScreen, _erase; diff --git a/engines/pegasus/hotspot.h b/engines/pegasus/hotspot.h index 623609d862..64d3fb19f9 100644 --- a/engines/pegasus/hotspot.h +++ b/engines/pegasus/hotspot.h @@ -36,10 +36,10 @@ /* Hot spots combine a pixel area, an ID value and an active flag. - + A point is considered in a hot spot if the point is in the hot spot's pixel area and the active flag is set. - + In addition, hot spots have a 32 bit word of bit flags for filtering use. */ @@ -95,18 +95,18 @@ public: void getArea(Region &) const; void getCenter(Common::Point&) const; void getCenter(CoordType&, CoordType&) const; - + void moveSpotTo(const CoordType, const CoordType); void moveSpotTo(const Common::Point); void moveSpot(const CoordType, const CoordType); void moveSpot(const Common::Point); - + bool pointInSpot(const Common::Point) const; - + void setActive(); void setInactive(); bool isSpotActive() const; - + HotSpotFlags getHotspotFlags() const; void setHotspotFlags(const HotSpotFlags); void setMaskedHotspotFlags(const HotSpotFlags flags, const HotSpotFlags mask); @@ -135,7 +135,7 @@ public: void activateOneHotspot(const HotSpotID); void deactivateOneHotspot(const HotSpotID); - + void removeOneHotspot(const HotSpotID); void removeMaskedHotspots(const HotSpotFlags = kNoHotSpotFlags); diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp index e11be2c8e7..b74e4a4c45 100644 --- a/engines/pegasus/input.cpp +++ b/engines/pegasus/input.cpp @@ -132,7 +132,7 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) { input.setInputLocation(g_system->getEventManager()->getMousePos()); // Set the outgoing bits - InputBits filteredBits = currentBits & filter; + InputBits filteredBits = currentBits & filter; input.setInputBits((filteredBits & kAllButtonDownBits) | (filteredBits & _lastRawBits & kAllAutoBits)); // Update the last bits @@ -246,7 +246,7 @@ void InputHandler::pollForInput() { void InputHandler::getInput(Input &input, Hotspot *&cursorSpot) { Cursor *cursor = ((PegasusEngine *)g_engine)->_cursor; - + if (_inputHandler) _lastFilter = _inputHandler->getInputFilter(); else diff --git a/engines/pegasus/input.h b/engines/pegasus/input.h index f6c29e7780..3e938fa42a 100644 --- a/engines/pegasus/input.h +++ b/engines/pegasus/input.h @@ -63,15 +63,15 @@ enum { kButtonDownBit = 0, kAutoButtonBit = 1, kBitsPerButton = 2, - + kButtonDownMask = 1 << kButtonDownBit, kAutoButtonMask = 1 << kAutoButtonBit, - + kButtonStateBits = kButtonDownMask | kAutoButtonMask, - + kRawButtonUp = 0, kRawButtonDown = kButtonDownMask | kAutoButtonMask, - + kButtonUp = 0, kButtonDown = kButtonDownMask, kButtonAutoUp = kAutoButtonMask, @@ -151,7 +151,7 @@ enum { (kAutoButtonMask << kMod1ButtonShift) | (kAutoButtonMask << kMod2ButtonShift) | (kAutoButtonMask << kMod3ButtonShift), - + kFilterUpButton = kButtonDownMask << kUpButtonShift, kFilterUpAuto = kAutoButtonMask << kUpButtonShift, kFilterUpButtonAny = kFilterUpButton | kFilterUpAuto, @@ -191,7 +191,7 @@ enum { kFilterMod3Button = kButtonDownMask << kMod3ButtonShift, kFilterMod3Auto = kAutoButtonMask << kMod3ButtonShift, kFilterMod3ButtonAny = kFilterMod3Button | kFilterMod3Auto, - + kFilterNoInput = 0, kFilterAllInput = kFilterUpButton | kFilterUpAuto | @@ -219,7 +219,7 @@ enum { kFilterMod2Auto | kFilterMod3Button | kFilterMod3Auto, - + kFilterAllDirections = kFilterUpButton | kFilterUpAuto | kFilterLeftButton | @@ -228,7 +228,7 @@ enum { kFilterDownAuto | kFilterRightButton | kFilterRightAuto, - + kFilterButtons = kFilterOneButton | kFilterOneAuto | kFilterTwoButton | @@ -237,12 +237,12 @@ enum { kFilterThreeAuto | kFilterFourButton | kFilterFourAuto, - + kFilterFireButtons = kFilterLeftFireButton | kFilterLeftFireAuto | kFilterRightFireButton | kFilterRightFireAuto, - + kFilterAllButtons = kFilterLeftFireButton | kFilterLeftFireAuto | kFilterRightFireButton | @@ -261,7 +261,7 @@ enum { kFilterMod2Auto | kFilterMod3Button | kFilterMod3Auto, - + kFilterAllInputNoAuto = kFilterUpButton | kFilterLeftButton | kFilterDownButton | @@ -288,15 +288,15 @@ static const InputBits kOpticalInterruption = kFilterAllInputNoAuto; fireLeft, fireRight: fire buttons. mod1, mod2, mod3: modifier buttons, similar to shift, control, etc. a, b, c, d: general purpose buttons. - + button state is held as bits in a long word, two bits per button. - + Filter bits: for each button, two bits are assigned for filtering. If bit 0 is set, the corresponding button is available for "button down" input. If bit 1 is set, the corresponding button is available for "auto down" input. Note that bit 1 is meaningful only if bit 0 is set. - + */ class Input { @@ -310,27 +310,27 @@ public: bool upButtonDown() const { return (_inputState & (kButtonStateBits << kUpButtonShift)) == (kButtonDown << kUpButtonShift); } bool upButtonAutoDown() const { return (_inputState & (kButtonStateBits << kUpButtonShift)) == (kButtonAutoDown << kUpButtonShift); } bool upButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kUpButtonShift)) != 0; } - + bool leftButtonDown() const { return (_inputState & (kButtonStateBits << kLeftButtonShift)) == (kButtonDown << kLeftButtonShift); } bool leftButtonAutoDown() const { return (_inputState & (kButtonStateBits << kLeftButtonShift)) == (kButtonAutoDown << kLeftButtonShift); } bool leftButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kLeftButtonShift)) != 0; } - + bool downButtonDown() const { return (_inputState & (kButtonStateBits << kDownButtonShift)) == (kButtonDown << kDownButtonShift); } bool downButtonAutoDown() const { return (_inputState & (kButtonStateBits << kDownButtonShift)) == (kButtonAutoDown << kDownButtonShift); } bool downButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kDownButtonShift)) != 0; } - + bool rightButtonDown() const { return (_inputState & (kButtonStateBits << kRightButtonShift)) == (kButtonDown << kRightButtonShift); } bool rightButtonAutoDown() const { return (_inputState & (kButtonStateBits << kRightButtonShift)) == (kButtonAutoDown << kRightButtonShift); } bool rightButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kRightButtonShift)) != 0; } - + bool leftFireButtonDown() const { return (_inputState & (kButtonStateBits << kLeftFireButtonShift)) == (kButtonDown << kLeftFireButtonShift); } bool leftFireButtonAutoDown() const { return (_inputState & (kButtonStateBits << kLeftFireButtonShift)) == (kButtonAutoDown << kLeftFireButtonShift); } bool leftFireButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kLeftFireButtonShift)) != 0; } - + bool rightFireButtonDown() const { return (_inputState & (kButtonStateBits << kRightFireButtonShift)) == (kButtonDown << kRightFireButtonShift); } bool rightFireButtonAutoDown() const { return (_inputState & (kButtonStateBits << kRightFireButtonShift)) == (kButtonAutoDown << kRightFireButtonShift); } bool rightFireButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kRightFireButtonShift)) != 0; } - + bool oneButtonDown() const { return (_inputState & (kButtonStateBits << kOneButtonShift)) == (kButtonDown << kOneButtonShift); } bool oneButtonAutoDown() const { return (_inputState & (kButtonStateBits << kOneButtonShift)) == (kButtonAutoDown << kOneButtonShift); } bool oneButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kOneButtonShift)) != 0; } @@ -338,34 +338,34 @@ public: bool twoButtonDown() const { return (_inputState & (kButtonStateBits << kTwoButtonShift)) == (kButtonDown << kTwoButtonShift); } bool twoButtonAutoDown() const { return (_inputState & (kButtonStateBits << kTwoButtonShift)) == (kButtonAutoDown << kTwoButtonShift); } bool twoButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kTwoButtonShift)) != 0; } - + bool threeButtonDown() const { return (_inputState & (kButtonStateBits << kThreeButtonShift)) == (kButtonDown << kThreeButtonShift); } bool threeButtonAutoDown() const { return (_inputState & (kButtonStateBits << kThreeButtonShift)) == (kButtonAutoDown << kThreeButtonShift); } bool threeButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kThreeButtonShift)) != 0; } - + bool fourButtonDown() const { return (_inputState & (kButtonStateBits << kFourButtonShift)) == (kButtonDown << kFourButtonShift); } bool fourButtonAutoDown() const { return (_inputState & (kButtonStateBits << kFourButtonShift)) == (kButtonAutoDown << kFourButtonShift); } bool fourButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kFourButtonShift)) != 0; } - + bool mod1ButtonDown() const { return (_inputState & (kButtonStateBits << kMod1ButtonShift)) == (kButtonDown << kMod1ButtonShift); } bool mod1ButtonAutoDown() const { return (_inputState & (kButtonStateBits << kMod1ButtonShift)) == (kButtonAutoDown << kMod1ButtonShift); } bool mod1ButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kMod1ButtonShift)) != 0; } - + bool mod2ButtonDown() const { return (_inputState & (kButtonStateBits << kMod2ButtonShift)) == (kButtonDown << kMod2ButtonShift); } bool mod2ButtonAutoDown() const { return (_inputState & (kButtonStateBits << kMod2ButtonShift)) == (kButtonAutoDown << kMod2ButtonShift); } bool mod2ButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kMod2ButtonShift)) != 0; } - + bool mod3ButtonDown() const { return (_inputState & (kButtonStateBits << kMod3ButtonShift)) == (kButtonDown << kMod3ButtonShift); } bool mod3ButtonAutoDown() const { return (_inputState & (kButtonStateBits << kMod3ButtonShift)) == (kButtonAutoDown << kMod3ButtonShift); } bool mod3ButtonAnyDown() const { return (_inputState & (kButtonAutoDown << kMod3ButtonShift)) != 0; } - + bool allAutoInput() const { return (_inputState & kAllAutoBits) != 0; } bool anyDirectionInput() const { return (_inputState & kDirectionBits) != 0; } bool anyButtonInput() const { return (_inputState & kButtonBits) != 0; } bool anyInput() const { return _inputState != 0; } - + void getInputLocation(Common::Point &where) const { where = _inputLocation; } - + bool anyInputBitSet(const InputBits bits) const { return (_inputState & bits) != 0; } bool isAltDown() const { return _altDown; } @@ -384,7 +384,7 @@ protected: void setInputLocation(const Common::Point &where) { _inputLocation = where; } void setConsoleRequested(bool consoleRequested) { _consoleRequested = consoleRequested; } void setAltDown(bool altDown) { _altDown = altDown; } - + InputBits _inputState; Common::Point _inputLocation; bool _consoleRequested; @@ -400,24 +400,24 @@ public: static void readInputDevice(Input&); static void invalHotspots() { _invalHotspots = true; } static InputBits getCurrentFilter() { return _lastFilter; } - + InputHandler(InputHandler*); virtual ~InputHandler(); - + virtual void setNextHandler(InputHandler *nextHandler) { _nextHandler = nextHandler; } virtual InputHandler *getNextHandler() { return _nextHandler; } - + virtual void handleInput(const Input &, const Hotspot *); virtual void clickInHotspot(const Input &, const Hotspot *); - + virtual void activateHotspots(); virtual void updateCursor(const Common::Point, const Hotspot *); virtual bool isClickInput(const Input &, const Hotspot *); virtual bool wantsCursor(); - + virtual bool releaseInputFocus() { return true; } virtual void grabInputFocus() {} - + // This returns bits set for what kinds of input to accept. virtual InputBits getInputFilter(); @@ -430,7 +430,7 @@ protected: static InputHandler *_inputHandler; static bool _invalHotspots; static InputBits _lastFilter; - + InputHandler *_nextHandler; bool _allowInput; }; @@ -489,7 +489,7 @@ public: // Hmmmmm.... static bool isEasterEggModifierInput(const Input &input) { return input.isAltDown(); } - + static bool isTogglePauseInput(const Input &input) { return input.mod3ButtonDown(); } }; diff --git a/engines/pegasus/interaction.h b/engines/pegasus/interaction.h index b1318563ac..293ee6be83 100644 --- a/engines/pegasus/interaction.h +++ b/engines/pegasus/interaction.h @@ -79,10 +79,10 @@ public: virtual long getNumHints() { return 0; } virtual Common::String getHintMovie(uint) { return ""; } virtual bool canSolve() { return false; } - + virtual void setSoundFXLevel(const uint16) {} virtual void setAmbienceLevel(const uint16) {} - + virtual void doSolve() {} protected: @@ -96,10 +96,10 @@ protected: virtual void initInteraction() {} virtual void closeInteraction() {} virtual void resetInteraction() {} - + InputHandler *_savedHandler; Neighborhood *_owner; - + private: // Private so that only StartInteraction and StopInteraction can touch it. bool _isInteracting; diff --git a/engines/pegasus/interface.cpp b/engines/pegasus/interface.cpp index 5e5188886e..d9d3865192 100644 --- a/engines/pegasus/interface.cpp +++ b/engines/pegasus/interface.cpp @@ -170,7 +170,7 @@ void Interface::throwAwayAIArea() { delete g_AIArea; } -void Interface::validateInventoryPanel() { +void Interface::validateInventoryPanel() { if (!_inventoryPanel.isSurfaceValid()) { _inventoryPanel.initInventoryImage(&_inventoryPush); _inventoryPanel.moveElementTo(kInventoryPushLeft, kInventoryPushTop); @@ -215,7 +215,7 @@ void Interface::throwAwayInventoryPanel() { _inventoryRaised = false; } -void Interface::validateBiochipPanel() { +void Interface::validateBiochipPanel() { if (!_biochipPanel.isSurfaceValid()) { _biochipPanel.initInventoryImage(&_biochipPush); _biochipPanel.moveElementTo(kBiochipPushLeft, kBiochipPushTop); @@ -243,7 +243,7 @@ void Interface::validateBiochipPanel() { } } -void Interface::throwAwayBiochipPanel() { +void Interface::throwAwayBiochipPanel() { _biochipPanel.stopDisplaying(); _biochipPanel.throwAwayInventoryImage(); _biochipPush.stopDisplaying(); @@ -251,11 +251,11 @@ void Interface::throwAwayBiochipPanel() { _biochipLid.closeFrameSequence(); _biochipPushCallBack.releaseCallBack(); _biochipLidCallBack.releaseCallBack(); - + Item *item = getCurrentBiochip(); if (item) item->deselect(); - + _biochipUp = false; _biochipRaised = false; } @@ -369,7 +369,7 @@ void Interface::receiveNotification(Notification *notification, const Notificati } } -void Interface::raiseInventoryDrawer(const bool doCallBacks) { +void Interface::raiseInventoryDrawer(const bool doCallBacks) { if (!_biochipUp) _previousHandler = InputHandler::getCurrentHandler(); @@ -431,7 +431,7 @@ bool Interface::isInventoryDown() { return !_inventoryUp; } -void Interface::lowerInventoryDrawer(const bool doCallBacks) { +void Interface::lowerInventoryDrawer(const bool doCallBacks) { if (_inventoryRaised) { _inventoryRaised = false; @@ -471,7 +471,7 @@ void Interface::inventoryLidClosed() { _inventoryUp = false; } -void Interface::raiseBiochipDrawer(const bool doCallBacks) { +void Interface::raiseBiochipDrawer(const bool doCallBacks) { if (!_inventoryUp) _previousHandler = InputHandler::getCurrentHandler(); @@ -508,7 +508,7 @@ void Interface::biochipDrawerUp() { _biochipRaised = true; } -void Interface::lowerBiochipDrawer(const bool doCallBacks) { +void Interface::lowerBiochipDrawer(const bool doCallBacks) { if (_biochipRaised) { _biochipRaised = false; _biochipPanel.deactivateInventoryPicture(); @@ -650,7 +650,7 @@ void Interface::lowerBiochipDrawerSync() { vm->refreshDisplay(); g_system->delayMillis(10); } - + vm->refreshDisplay(); biochipDrawerDown(false); diff --git a/engines/pegasus/items/autodragger.cpp b/engines/pegasus/items/autodragger.cpp index de03f8118f..40bad14a89 100644 --- a/engines/pegasus/items/autodragger.cpp +++ b/engines/pegasus/items/autodragger.cpp @@ -69,7 +69,7 @@ bool AutoDragger::isDragging() { return isIdling(); } -void AutoDragger::useIdleTime() { +void AutoDragger::useIdleTime() { TimeValue thisTime = getTime(); if (thisTime != _lastTime) { diff --git a/engines/pegasus/items/biochips/aichip.cpp b/engines/pegasus/items/biochips/aichip.cpp index 5e9fc9f8c3..cbcfc363e8 100644 --- a/engines/pegasus/items/biochips/aichip.cpp +++ b/engines/pegasus/items/biochips/aichip.cpp @@ -64,36 +64,36 @@ AIChip::AIChip(const ItemID id, const NeighborhoodID neighborhood, const RoomID _briefingSpot.setArea(Common::Rect(kAIMiddleAreaLeft + 10, kAIMiddleAreaTop + 27, kAIMiddleAreaLeft + 10 + 81, kAIMiddleAreaTop + 27 + 31)); _briefingSpot.setHotspotFlags(kAIBiochipSpotFlag); g_allHotspots.push_back(&_briefingSpot); - + _scanSpot.setArea(Common::Rect(kAIMiddleAreaLeft + 100, kAIMiddleAreaTop + 27, kAIMiddleAreaLeft + 100 + 81, kAIMiddleAreaTop + 27 + 31)); _scanSpot.setHotspotFlags(kAIBiochipSpotFlag); g_allHotspots.push_back(&_scanSpot); - + _hint1Spot.setArea(Common::Rect(kAIMiddleAreaLeft + 70, kAIMiddleAreaTop + 67, kAIMiddleAreaLeft + 70 + 21, kAIMiddleAreaTop + 67 + 21)); _hint1Spot.setHotspotFlags(kAIBiochipSpotFlag); g_allHotspots.push_back(&_hint1Spot); - + _hint2Spot.setArea(Common::Rect(kAIMiddleAreaLeft + 91, kAIMiddleAreaTop + 67, kAIMiddleAreaLeft + 91 + 20, kAIMiddleAreaTop + 67 + 21)); _hint2Spot.setHotspotFlags(kAIBiochipSpotFlag); g_allHotspots.push_back(&_hint2Spot); - + _hint3Spot.setArea(Common::Rect(kAIMiddleAreaLeft + 111, kAIMiddleAreaTop + 67, kAIMiddleAreaLeft + 111 + 20, kAIMiddleAreaTop + 67 + 21)); _hint3Spot.setHotspotFlags(kAIBiochipSpotFlag); g_allHotspots.push_back(&_hint3Spot); - + _solveSpot.setArea(Common::Rect(kAIMiddleAreaLeft + 131, kAIMiddleAreaTop + 67, kAIMiddleAreaLeft + 131 + 50, kAIMiddleAreaTop + 67 + 21)); _solveSpot.setHotspotFlags(kAIBiochipSpotFlag); g_allHotspots.push_back(&_solveSpot); - + _playingMovie = false; setItemState(kAI000); - + g_AIChip = this; } AIChip::~AIChip() { g_AIChip = NULL; - + g_allHotspots.removeOneHotspot(kAIBriefingSpotID); g_allHotspots.removeOneHotspot(kAIScanSpotID); g_allHotspots.removeOneHotspot(kAIHint1SpotID); @@ -111,7 +111,7 @@ void AIChip::takeSharedArea() { setUpAIChip(); } -void AIChip::setUpAIChip() { +void AIChip::setUpAIChip() { if (!_playingMovie) { PegasusEngine *vm = (PegasusEngine *)g_engine; @@ -130,7 +130,7 @@ void AIChip::setUpAIChip() { } // Only does something when there are hints or solves available. -void AIChip::setUpAIChipRude() { +void AIChip::setUpAIChipRude() { if (!_playingMovie) { PegasusEngine *vm = (PegasusEngine *)g_engine; diff --git a/engines/pegasus/items/biochips/biochipitem.h b/engines/pegasus/items/biochips/biochipitem.h index 24b9ae699a..2039e80c6f 100644 --- a/engines/pegasus/items/biochips/biochipitem.h +++ b/engines/pegasus/items/biochips/biochipitem.h @@ -34,12 +34,12 @@ class BiochipItem : public Item { public: BiochipItem(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant); virtual ~BiochipItem(); - + virtual ItemType getItemType(); - + TimeValue getPanelTime() const { return _biochipInfoPanelTime; } TimeValue getRightAreaTime() const; - + // Must affect images in right area. virtual void select(); virtual void deselect(); diff --git a/engines/pegasus/items/biochips/mapimage.cpp b/engines/pegasus/items/biochips/mapimage.cpp index bd7b8ff910..9f4170d063 100644 --- a/engines/pegasus/items/biochips/mapimage.cpp +++ b/engines/pegasus/items/biochips/mapimage.cpp @@ -265,7 +265,7 @@ void MapImage::readFromStream(Common::ReadStream *stream) { _mappedRooms.readFromStream(stream); } -void MapImage::loadGearRoomIfNecessary() { +void MapImage::loadGearRoomIfNecessary() { if (_whichArea != kMapGearRoom) { _mapImage.getImageFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kMapOfGearRoomPICTID); @@ -288,7 +288,7 @@ void MapImage::loadGearRoomIfNecessary() { } } -void MapImage::loadMazeIfNecessary() { +void MapImage::loadMazeIfNecessary() { if (_whichArea != kMapMaze) { _mapImage.getImageFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kMapOfMazePICTID); @@ -345,7 +345,7 @@ void MapImage::addFlagToMask(const int flag) { // This function can even be sensitive to open doors. // clone2727 notices that it's not, though -void MapImage::getRevealedRects(const uint32 flag, Common::Rect &r1) { +void MapImage::getRevealedRects(const uint32 flag, Common::Rect &r1) { CoordType gridX, gridY; switch (_whichArea) { diff --git a/engines/pegasus/items/biochips/mapimage.h b/engines/pegasus/items/biochips/mapimage.h index d596b585c4..49ad9945ee 100644 --- a/engines/pegasus/items/biochips/mapimage.h +++ b/engines/pegasus/items/biochips/mapimage.h @@ -50,9 +50,9 @@ public: void loadMazeIfNecessary(); void unloadImage(); void moveToMapLocation(const NeighborhoodID, const RoomID, const DirectionConstant); - + void draw(const Common::Rect &); - + bool anyFlagSet() { return _mappedRooms.anyFlagSet(); } static const uint32 kNumMappingRooms = (kMars39 - kMars35 + 1) + (kMars60 - kMars60 + 1) + diff --git a/engines/pegasus/items/biochips/opticalchip.h b/engines/pegasus/items/biochips/opticalchip.h index b1ea87bffc..2f66f73d3a 100644 --- a/engines/pegasus/items/biochips/opticalchip.h +++ b/engines/pegasus/items/biochips/opticalchip.h @@ -55,9 +55,9 @@ protected: kOpticalPoseidonExposed, kNumOpticalChipFlags }; - + void setUpOpticalChip(); - + FlagsArray<byte, kNumOpticalChipFlags> _opticalFlags; Hotspot _ariesHotspot; Hotspot _mercuryHotspot; diff --git a/engines/pegasus/items/biochips/pegasuschip.cpp b/engines/pegasus/items/biochips/pegasuschip.cpp index 8862271147..fa551fce30 100644 --- a/engines/pegasus/items/biochips/pegasuschip.cpp +++ b/engines/pegasus/items/biochips/pegasuschip.cpp @@ -188,7 +188,7 @@ void PegasusChip::clickInPegasusHotspot() { if (g_energyMonitor) g_energyMonitor->stopEnergyDraining(); - + if (GameState.getTSAState() == kPlayerWentToPrehistoric || GameState.allTimeZonesFinished()) vm->jumpToNewEnvironment(kFullTSAID, kTSA37, kNorth); else diff --git a/engines/pegasus/items/biochips/retscanchip.h b/engines/pegasus/items/biochips/retscanchip.h index e72eaeddaf..153e6cd071 100644 --- a/engines/pegasus/items/biochips/retscanchip.h +++ b/engines/pegasus/items/biochips/retscanchip.h @@ -34,7 +34,7 @@ class RetScanChip : public BiochipItem { public: RetScanChip(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant); virtual ~RetScanChip() {} - + void searchForLaser(); }; diff --git a/engines/pegasus/items/inventory.cpp b/engines/pegasus/items/inventory.cpp index 16cced3267..57923b105d 100644 --- a/engines/pegasus/items/inventory.cpp +++ b/engines/pegasus/items/inventory.cpp @@ -83,7 +83,7 @@ InventoryResult Inventory::removeItem(Item *item) { InventoryResult Inventory::removeItem(ItemID id) { Item *item = findItemByID(id); - + if (item) { _inventoryList.remove(item); item->setItemOwner(kNoActorID); diff --git a/engines/pegasus/items/inventory.h b/engines/pegasus/items/inventory.h index 099ba52ba7..796ec49556 100644 --- a/engines/pegasus/items/inventory.h +++ b/engines/pegasus/items/inventory.h @@ -43,11 +43,11 @@ class Inventory { public: Inventory(); virtual ~Inventory(); - + WeightType getWeightLimit(); void setWeightLimit(WeightType limit); WeightType getWeight(); - + virtual InventoryResult addItem(Item *item); virtual InventoryResult removeItem(Item *item); virtual InventoryResult removeItem(ItemID id); @@ -60,10 +60,10 @@ public: virtual int32 findIndexOf(ItemID id); int32 getNumItems(); virtual void removeAllItems(); - + void setOwnerID(const ActorID id); ActorID getOwnerID() const; - + uint32 getReferenceCount() { return _referenceCount; } protected: diff --git a/engines/pegasus/items/inventory/airmask.cpp b/engines/pegasus/items/inventory/airmask.cpp index 85d4449f9f..c65dd36102 100644 --- a/engines/pegasus/items/inventory/airmask.cpp +++ b/engines/pegasus/items/inventory/airmask.cpp @@ -62,7 +62,7 @@ void AirMask::writeToStream(Common::WriteStream *stream) { stream->writeUint32BE(_oxygenTimer.getTimeRemaining()); } -void AirMask::readFromStream(Common::ReadStream *stream) { +void AirMask::readFromStream(Common::ReadStream *stream) { _oxygenTimer.stopFuse(); InventoryItem::readFromStream(stream); _oxygenTimer.primeFuse(stream->readUint32BE()); @@ -98,7 +98,7 @@ void AirMask::putMaskOn() { setItemState(newState); } -void AirMask::takeMaskOff() { +void AirMask::takeMaskOff() { uint airLevel = getAirLeft(); ItemState newState = getItemState(); ItemState oldState = newState; diff --git a/engines/pegasus/items/inventory/gascanister.h b/engines/pegasus/items/inventory/gascanister.h index dae72c12cb..7d4d8193f5 100644 --- a/engines/pegasus/items/inventory/gascanister.h +++ b/engines/pegasus/items/inventory/gascanister.h @@ -34,7 +34,7 @@ class GasCanister : public InventoryItem { public: GasCanister(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant); virtual ~GasCanister() {} - + void select(); void takeSharedArea(); }; diff --git a/engines/pegasus/items/inventory/inventoryitem.h b/engines/pegasus/items/inventory/inventoryitem.h index b526463b18..9d78113014 100644 --- a/engines/pegasus/items/inventory/inventoryitem.h +++ b/engines/pegasus/items/inventory/inventoryitem.h @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ - + #ifndef PEGASUS_ITEMS_INVENTORY_INVENTORYITEM_H #define PEGASUS_ITEMS_INVENTORY_INVENTORYITEM_H @@ -41,17 +41,17 @@ class InventoryItem : public Item { public: InventoryItem(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant); virtual ~InventoryItem(); - + virtual ItemType getItemType(); - + void getPanelTimes(TimeValue &, TimeValue &) const; TimeValue getLeftAreaTime() const; - + void setAnimationTime(const TimeValue); TimeValue getAnimationTime() const; - + virtual void toggleItemState() {} - + // Must affect images in left area. virtual void select(); virtual void deselect(); diff --git a/engines/pegasus/items/inventory/keycard.h b/engines/pegasus/items/inventory/keycard.h index c30c789786..846f40e6e5 100644 --- a/engines/pegasus/items/inventory/keycard.h +++ b/engines/pegasus/items/inventory/keycard.h @@ -34,7 +34,7 @@ class KeyCard : public InventoryItem { public: KeyCard(const ItemID, const NeighborhoodID, const RoomID, const DirectionConstant); virtual ~KeyCard() {} - + virtual void toggleItemState(); virtual void setItemState(const ItemState); bool isFlashlightOn(); diff --git a/engines/pegasus/items/inventorypicture.cpp b/engines/pegasus/items/inventorypicture.cpp index 84999c0b22..fc812faae2 100644 --- a/engines/pegasus/items/inventorypicture.cpp +++ b/engines/pegasus/items/inventorypicture.cpp @@ -76,7 +76,7 @@ void InventoryPicture::getItemXY(uint32 index, CoordType &x, CoordType &y) { y = (index / _itemsPerRow) * _itemHeight + _itemY; } -void InventoryPicture::drawItemHighlight(const Common::Rect &r) { +void InventoryPicture::drawItemHighlight(const Common::Rect &r) { if (_highlightImage.isSurfaceValid()) { Common::Rect r2 = _highlightBounds; Common::Rect bounds; @@ -145,7 +145,7 @@ InventoryResult InventoryPicture::addInventoryItem(Item *item) { return result; } -InventoryResult InventoryPicture::removeInventoryItem(Item *item) { +InventoryResult InventoryPicture::removeInventoryItem(Item *item) { InventoryResult result = _inventory->removeItem(item); if (result == kInventoryOK) diff --git a/engines/pegasus/items/inventorypicture.h b/engines/pegasus/items/inventorypicture.h index 18e85ef988..88a4a4ba75 100644 --- a/engines/pegasus/items/inventorypicture.h +++ b/engines/pegasus/items/inventorypicture.h @@ -41,16 +41,16 @@ class InventoryPicture : public InputHandler, public Picture { public: InventoryPicture(const DisplayElementID, InputHandler *, Inventory *); virtual ~InventoryPicture() {} - + void initInventoryImage(Transition *); void throwAwayInventoryImage(); - + void panelUp(); void activateInventoryPicture(); void deactivateInventoryPicture(); void handleInput(const Input &, const Hotspot *); bool wantsCursor() { return false; } - + InventoryResult addInventoryItem(Item *); InventoryResult removeInventoryItem(Item *); void removeAllItems(); @@ -68,7 +68,7 @@ protected: virtual void highlightCurrentItem(); virtual void unhighlightCurrentItem() {} virtual TimeValue getItemPanelTime(Item *) = 0; - + Inventory *_inventory; uint32 _lastReferenceCount; Frame _highlightImage; @@ -114,7 +114,7 @@ class BiochipPicture : public InventoryPicture { public: BiochipPicture(const DisplayElementID, InputHandler *, Inventory *); virtual ~BiochipPicture() {} - + protected: virtual void unhighlightCurrentItem(); virtual TimeValue getItemPanelTime(Item *); diff --git a/engines/pegasus/items/item.cpp b/engines/pegasus/items/item.cpp index a49bb4a466..8089f2b93d 100644 --- a/engines/pegasus/items/item.cpp +++ b/engines/pegasus/items/item.cpp @@ -241,7 +241,7 @@ void Item::deselect() { } } -void Item::getItemStateEntry(ItemStateInfo info, uint32 index, ItemState &state, TimeValue &time) { +void Item::getItemStateEntry(ItemStateInfo info, uint32 index, ItemState &state, TimeValue &time) { if (index < info.numEntries) { state = info.entries[index].itemState; time = info.entries[index].itemTime; diff --git a/engines/pegasus/items/item.h b/engines/pegasus/items/item.h index efcf24100c..a1451b2a58 100644 --- a/engines/pegasus/items/item.h +++ b/engines/pegasus/items/item.h @@ -287,32 +287,32 @@ class Item : public IDObject { public: Item(const ItemID id, const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction); virtual ~Item(); - + // WriteToStream writes everything EXCEPT the item's ID. // It is assumed that the calling function will write and read the ID. virtual void writeToStream(Common::WriteStream *stream); virtual void readFromStream(Common::ReadStream *stream); - + virtual ActorID getItemOwner() const; virtual void setItemOwner(const ActorID owner); - + void getItemRoom(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction) const; void setItemRoom(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction); NeighborhoodID getItemNeighborhood() const; - + virtual WeightType getItemWeight(); - + virtual void setItemState(const ItemState state); virtual ItemState getItemState() const; virtual ItemType getItemType() = 0; - + TimeValue getInfoLeftTime() const; void getInfoRightTimes(TimeValue &, TimeValue &) const; TimeValue getSharedAreaTime() const; Sprite *getDragSprite(const DisplayElementID) const; - + /* select -- called when this item becomes current. Also called when the inventory panel holding this item is raised and this is the current item. @@ -324,7 +324,7 @@ public: virtual void select(); virtual void deselect(); virtual bool isSelected() { return _isSelected; } - + virtual void activate() { _isActive = true; } virtual bool isActive() { return _isActive; } virtual void pickedUp() {} @@ -336,7 +336,7 @@ public: // selected. virtual void giveUpSharedArea() {} virtual void takeSharedArea() {} - + void findItemExtra(const uint32 extraID, ItemExtraEntry &entry); protected: diff --git a/engines/pegasus/items/itemdragger.cpp b/engines/pegasus/items/itemdragger.cpp index 9e77ad5745..97fc5a97ac 100644 --- a/engines/pegasus/items/itemdragger.cpp +++ b/engines/pegasus/items/itemdragger.cpp @@ -89,14 +89,14 @@ void SpriteDragger::startTracking(const Input &input) { } } -void SpriteDragger::continueTracking(const Input &input) { +void SpriteDragger::continueTracking(const Input &input) { if (_draggingSprite) { Common::Point rawPoint; input.getInputLocation(rawPoint); if (!_slopRect.contains(rawPoint)) rawPoint = _startRawPoint; - + if (rawPoint != _lastRawPoint) { Common::Point newPoint = rawPoint; pinPointInRect(_limitRect, newPoint); @@ -127,14 +127,14 @@ void SpriteDragger::pinPointInRect(const Common::Rect &r, Common::Point &pt) { } ItemDragger::ItemDragger(PegasusEngine *owner) : _inventoryDropSpot(kInventoryDropSpotID), _biochipDropSpot(kBiochipDropSpotID), - _inventoryHighlight(kInventoryDropHighlightID), _biochipHighlight(kBiochipDropHighlightID) { + _inventoryHighlight(kInventoryDropHighlightID), _biochipHighlight(kBiochipDropHighlightID) { _owner = owner; Common::Rect r(kInventoryDropLeft, kInventoryDropTop, kInventoryDropRight, kInventoryDropBottom); _inventoryDropSpot.setArea(r); _inventoryDropSpot.setHotspotFlags(kDropItemSpotFlag); g_allHotspots.push_back(&_inventoryDropSpot); - + r = Common::Rect(kBiochipDropLeft, kBiochipDropTop, kBiochipDropRight, kBiochipDropBottom); _biochipDropSpot.setArea(r); _biochipDropSpot.setHotspotFlags(kDropBiochipSpotFlag); @@ -144,10 +144,10 @@ ItemDragger::ItemDragger(PegasusEngine *owner) : _inventoryDropSpot(kInventoryDr void ItemDragger::startTracking(const Input &input) { _inventoryHighlight.setDisplayOrder(kInventoryHiliteOrder); _inventoryHighlight.startDisplaying(); - + _biochipHighlight.setDisplayOrder(kBiochipHiliteOrder); _biochipHighlight.startDisplaying(); - + SpriteDragger::startTracking(input); } diff --git a/engines/pegasus/items/itemdragger.h b/engines/pegasus/items/itemdragger.h index 69612316f3..fce953d695 100644 --- a/engines/pegasus/items/itemdragger.h +++ b/engines/pegasus/items/itemdragger.h @@ -46,16 +46,16 @@ public: void setDragConstraints(const Common::Rect &, const Common::Rect &); void getDragConstraints(Common::Rect &, Common::Rect &) const; - + void startTracking(const Input &); void continueTracking(const Input&); - + Hotspot *getLastHotspot() const { return _lastHotspot; } protected: virtual void enterHotspot(Hotspot *) {} virtual void exitHotspot(Hotspot *) {} - + Sprite *_draggingSprite; Common::Point _startPoint, _lastPoint, _dragOffset; Common::Point _startRawPoint, _lastRawPoint; @@ -83,7 +83,7 @@ public: protected: virtual void enterHotspot(Hotspot *); virtual void exitHotspot(Hotspot *); - + PegasusEngine *_owner; DropHighlight _inventoryHighlight; Hotspot _inventoryDropSpot; diff --git a/engines/pegasus/items/itemlist.h b/engines/pegasus/items/itemlist.h index 173a54104d..9b59206ab3 100644 --- a/engines/pegasus/items/itemlist.h +++ b/engines/pegasus/items/itemlist.h @@ -43,10 +43,10 @@ class ItemList : public Common::List<Item *> { public: ItemList(); virtual ~ItemList(); - + virtual void writeToStream(Common::WriteStream *stream); virtual void readFromStream(Common::ReadStream *stream); - + Item *findItemByID(const ItemID id); }; diff --git a/engines/pegasus/menu.cpp b/engines/pegasus/menu.cpp index 5076abdaa6..deaa460188 100644 --- a/engines/pegasus/menu.cpp +++ b/engines/pegasus/menu.cpp @@ -242,7 +242,7 @@ void MainMenu::startMainMenuLoop() { void MainMenu::stopMainMenuLoop() { FaderMoveSpec spec; - + spec.makeTwoKnotFaderSpec(30, 0, 255, 30, 0); _menuFader.startFaderSync(spec); _menuLoop.stopSound(); @@ -409,7 +409,7 @@ enum { kCreditsMenuTalent, kCreditsMenuOtherTitles, kCreditsMenuMainMenu, - + kCreditsFirstSelection = kCreditsMenuCoreTeam, kCreditsLastSelection = kCreditsMenuMainMenu }; @@ -476,9 +476,9 @@ CreditsMenu::CreditsMenu() : GameMenu(kCreditsMenuID), _menuBackground(0), _cred _smallSelect.setDisplayOrder(2); _smallSelect.show(); _smallSelect.startDisplaying(); - + _menuSelection = -1; - + newMenuSelection(kCreditsMenuCoreTeam); } @@ -610,14 +610,14 @@ enum { kDeathScreenContinueDemo = 0, kDeathScreenMainMenuDemo, kDeathScreenQuitDemo, - + kFirstDeathSelectionDemo = kDeathScreenContinueDemo, kLastDeathSelectionDemo = kDeathScreenQuitDemo, kDeathScreenContinue = 0, kDeathScreenRestore, kDeathScreenMainMenu, - + kFirstDeathSelection = kDeathScreenContinue, kLastDeathSelection = kDeathScreenMainMenu }; @@ -922,7 +922,7 @@ enum { kPauseMenuAmbience, kPauseMenuWalkthru, kPauseMenuQuitToMainMenu, - + kFirstPauseSelection = kPauseMenuSave, kLastPauseSelection = kPauseMenuQuitToMainMenu }; diff --git a/engines/pegasus/menu.h b/engines/pegasus/menu.h index 8b0169adaa..288b846093 100644 --- a/engines/pegasus/menu.h +++ b/engines/pegasus/menu.h @@ -40,10 +40,10 @@ class GameMenu : public IDObject, public InputHandler { public: GameMenu(const uint32); virtual ~GameMenu() {} - + virtual void becomeCurrentHandler(); virtual void restorePreviousHandler(); - + GameMenuCommand getLastCommand() { return _lastCommand; } void clearLastCommand() { _lastCommand = kMenuCmdNoCommand; } @@ -98,13 +98,13 @@ class CreditsMenu : public GameMenu { public: CreditsMenu(); virtual ~CreditsMenu() {} - + virtual void handleInput(const Input &input, const Hotspot *); protected: void newMenuSelection(const int); void newMovieTime(const TimeValue); - + int _menuSelection; Picture _menuBackground; Movie _creditsMovie; diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp index 927f98f234..75c287c7a6 100644 --- a/engines/pegasus/movie.cpp +++ b/engines/pegasus/movie.cpp @@ -115,7 +115,7 @@ void Movie::redrawMovieWorld() { } } -void Movie::draw(const Common::Rect &r) { +void Movie::draw(const Common::Rect &r) { Common::Rect worldBounds = _movieBox; Common::Rect elementBounds; getBounds(elementBounds); diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.cpp b/engines/pegasus/neighborhood/caldoria/caldoria.cpp index 8d46300d9a..140e6e8093 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoria.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoria.cpp @@ -183,7 +183,7 @@ void Caldoria::init() { forceStridingStop(kCaldoria50, kNorth, kAltCaldoriaSinclairDown); } -void Caldoria::start() { +void Caldoria::start() { g_energyMonitor->stopEnergyDraining(); if (!GameState.getCaldoriaSeenPullback()) { @@ -320,12 +320,12 @@ void Caldoria::setUpAIRules() { locCondition->addLocation(MakeRoomView(kCaldoria01, kSouth)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Caldoria/X42WH1", false); AICondition *condition = makeLocationAndDoesntHaveItemCondition(kCaldoria44, kEast, kKeyCard); rule = new AIRule(condition, messageAction); g_AIArea->addAIRule(rule); - + AIActivateRuleAction *ruleAction = new AIActivateRuleAction(rule); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kCaldoria42, kEast)); @@ -340,7 +340,7 @@ uint16 Caldoria::getDateResID() const { } TimeValue Caldoria::getViewTime(const RoomID room, const DirectionConstant direction) { - ExtraTable::Entry extra; + ExtraTable::Entry extra; uint32 extraID = 0xffffffff; switch (room) { @@ -442,7 +442,7 @@ void Caldoria::startSpotOnceOnly(TimeValue startTime, TimeValue stopTime) { } } -void Caldoria::findSpotEntry(const RoomID room, const DirectionConstant direction, SpotFlags flags, SpotTable::Entry &entry) { +void Caldoria::findSpotEntry(const RoomID room, const DirectionConstant direction, SpotFlags flags, SpotTable::Entry &entry) { Neighborhood::findSpotEntry(room, direction, flags, entry); switch (room) { @@ -1093,7 +1093,7 @@ void Caldoria::setUpSinclairLoops() { _navMovie.start(); } -void Caldoria::zoomToSinclair() { +void Caldoria::zoomToSinclair() { _utilityFuse.stopFuse(); _privateFlags.setFlag(kCaldoriaPrivateReadyToShootFlag, true); setCurrentActivation(kActivateZoomedOnSinclair); @@ -1104,7 +1104,7 @@ void Caldoria::zoomToSinclair() { startExtraSequence(kCa53EastZoomToSinclair, kExtraCompletedFlag, kFilterAllInput); } -void Caldoria::receiveNotification(Notification *notification, const NotificationFlags flags) { +void Caldoria::receiveNotification(Notification *notification, const NotificationFlags flags) { Neighborhood::receiveNotification(notification, flags); if ((flags & kExtraCompletedFlag) != 0) { @@ -1554,7 +1554,7 @@ void Caldoria::newInteraction(const InteractionID interactionID) { // dropping it into the inventory). Hotspot *Caldoria::getItemScreenSpot(Item *item, DisplayElement *element) { HotSpotID destSpotID = kNoHotSpotID; - + switch (item->getObjectID()) { case kKeyCard: destSpotID = kCaldoriaKeyCardSpotID; @@ -1586,7 +1586,7 @@ void Caldoria::pickedUpItem(Item *item) { } } -void Caldoria::dropItemIntoRoom(Item *item, Hotspot *dropSpot) { +void Caldoria::dropItemIntoRoom(Item *item, Hotspot *dropSpot) { switch (item->getObjectID()) { case kKeyCard: Neighborhood::dropItemIntoRoom(item, dropSpot); @@ -1744,7 +1744,7 @@ void Caldoria::updateElevatorMovie() { _croppedMovie.setTime(time); _croppedMovie.redrawMovieWorld(); _croppedMovie.show(); - + // *** Why do I need this? // clone2727: "don't ask me!" _navMovie.redrawMovieWorld(); @@ -1850,7 +1850,7 @@ Common::String Caldoria::getBriefingMovie() { return movieName; } -Common::String Caldoria::getEnvScanMovie() { +Common::String Caldoria::getEnvScanMovie() { Common::String movieName = Neighborhood::getEnvScanMovie(); if (movieName.empty()) { @@ -1900,7 +1900,7 @@ uint Caldoria::getNumHints() { break; } } - + return numHints; } @@ -1922,7 +1922,7 @@ Common::String Caldoria::getHintMovie(uint hintNum) { // *** Doesn't work yet, need global movies. break; - } + } return "Images/AI/Globals/XGLOB1A"; case MakeRoomView(kCaldoria49, kEast): diff --git a/engines/pegasus/neighborhood/caldoria/caldoria.h b/engines/pegasus/neighborhood/caldoria/caldoria.h index c9243e0576..3d6a155170 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoria.h +++ b/engines/pegasus/neighborhood/caldoria/caldoria.h @@ -405,13 +405,13 @@ friend class SinclairCallBack; public: Caldoria(InputHandler *, PegasusEngine *); virtual ~Caldoria(); - + virtual uint16 getDateResID() const; - + void pickedUpItem(Item *); - + virtual GameInteraction *makeInteraction(const InteractionID); - + virtual Common::String getBriefingMovie(); virtual Common::String getEnvScanMovie(); virtual uint getNumHints(); @@ -442,10 +442,10 @@ protected: kCaldoriaPrivateSeen41WestCarFlag, kNumCaldoriaPrivateFlags }; - + void init(); void start(); - + void setUpRoofTop(); void setUpAIRules(); @@ -478,9 +478,9 @@ protected: void activateHotspots(); void clickInHotspot(const Input &, const Hotspot *); void newInteraction(const InteractionID); - + void clickOnDoorbell(const HotSpotID); - + Hotspot *getItemScreenSpot(Item *, DisplayElement *); void dropItemIntoRoom(Item *, Hotspot *); void takeElevator(uint, uint); @@ -495,16 +495,16 @@ protected: void zoomToSinclair(); void playEndMessage(); void checkInterruptSinclair(); - + CanOpenDoorReason canOpenDoor(DoorTable::Entry &); void doorOpened(); - + void updateCursor(const Common::Point, const Hotspot *); FlagsArray<uint16, kNumCaldoriaPrivateFlags> _privateFlags; const Hotspot *_zoomOutSpot; - + FuseFunction _utilityFuse; long _sinclairLoopCount; diff --git a/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp b/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp index 21ad7db955..0494753661 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.cpp @@ -120,7 +120,7 @@ void Caldoria4DSystem::openInteraction() { _4DSpritesMovie.setDisplayOrder(k4DSpritesOrder); _4DSpritesMovie.startDisplaying(); _4DSpritesMovie.show(); - + _4DSpritesScale = _4DSpritesMovie.getScale(); _neighborhoodNotification = _owner->getNeighborhoodNotification(); @@ -131,7 +131,7 @@ void Caldoria4DSystem::openInteraction() { void Caldoria4DSystem::loopExtra(const ExtraID extraID) { ExtraTable::Entry extraEntry; - + _owner->getExtraEntry(extraID, extraEntry); _loopStart = extraEntry.movieStart; _owner->loopExtraSequence(extraID); @@ -209,7 +209,7 @@ void Caldoria4DSystem::useIdleTime() { void Caldoria4DSystem::initInteraction() { setSpritesMovie(); - + _owner->loadLoopSound1("Sounds/Caldoria/Rock.aiff"); loopExtra(k4DIslandLoop); } diff --git a/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.h b/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.h index 63de7e1c4e..1c5fa44b90 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.h +++ b/engines/pegasus/neighborhood/caldoria/caldoria4dsystem.h @@ -46,7 +46,7 @@ protected: void openInteraction(); void initInteraction(); void closeInteraction(); - + void handleInput(const Input &, const Hotspot *); void activateHotspots(); void clickInHotspot(const Input &, const Hotspot *); @@ -59,10 +59,10 @@ protected: void makeDesertChoice(); void makeRhythmsChoice(); void makeAcousticChoice(); - + void useIdleTime(); void loopExtra(const ExtraID); - + Movie _4DSpritesMovie; TimeScale _4DSpritesScale; uint _whichMenu; diff --git a/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp b/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp index c9ee68aefb..abf34d3863 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoriabomb.cpp @@ -61,55 +61,55 @@ static const VertexType kBombLevelOne[] = { 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, - + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 9, // 9 edges in this level - + kEdgeOneFourth, 3, 1, 2, 3, 0, 0, - + kEdgeOneFourth, 5, 5, 6, 7, 8, 9, 0, 0, 0, 0, - + kEdgeOneFourth, 4, 10, 11, 12, 13, 0, 0, 0, - + kEdgeOneFourth, 5, 15, 16, 17, 18, 19, 0, 0, 0, 0, - + kEdgeOneFourth, 3, 21, 22, 23, 0, 0, - + kEdgeOneHalf, 3, 5, 10, 15, 0, 0, - + kEdgeOneHalf, 5, 1, 6, 11, 16, 21, 0, 0, 0, 0, - + kEdgeOneHalf, 5, 3, 8, 13, 18, 23, 0, 0, 0, 0, - + kEdgeOneHalf, 3, 9, 14, 19, @@ -122,85 +122,85 @@ static const VertexType kBombLevelTwo[] = { 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, - + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 15, - + kEdgeOneEighth, 2, 5, 1, 0, - + kEdgeOneEighth, 3, 17, 13, 9, 0, 0, - + kEdgeOneEighth, 2, 23, 19, 0, - + kEdgeThreeEighths, 2, 3, 9, 0, - + kEdgeThreeEighths, 3, 7, 13, 19, 0, 0, - + kEdgeThreeEighths, 2, 15, 21, 0, - + kEdgeOneFourth, 3, 1, 2, 3, 0, 0, - + kEdgeOneFourth, 4, 6, 7, 8, 9, 0, 0, 0, - + kEdgeOneFourth, 4, 16, 17, 18, 19, 0, 0, 0, - + kEdgeOneFourth, 3, 21, 22, 23, 0, 0, - + kEdgeOneHalf, 3, 5, 10, 15, 0, 0, - + kEdgeOneHalf, 2, 1, 6, 0, - + kEdgeOneHalf, 3, 7, 12, 17, 0, 0, - + kEdgeOneHalf, 3, 9, 14, 19, 0, 0, - + kEdgeOneHalf, 2, 16, 21, @@ -213,120 +213,120 @@ static const VertexType kBombLevelThree[] = { 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, - + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 22, - + kEdgeThreeSixteenths, 3, 15, 12, 9, 0, 0, - + kEdgeFiveSixteenths, 3, 5, 12, 19, 0, 0, - + kEdgeOneEighth, 2, 5, 1, 0, - + kEdgeOneEighth, 2, 7, 3, 0, - + kEdgeOneEighth, 2, 15, 11, 0, - + kEdgeOneEighth, 2, 21, 17, 0, - + kEdgeOneEighth, 2, 23, 19, 0, - + kEdgeThreeEighths, 2, 1, 7, 0, - + kEdgeThreeEighths, 2, 3, 9, 0, - + kEdgeThreeEighths, 2, 5, 11, 0, - + kEdgeThreeEighths, 2, 15, 21, 0, - + kEdgeThreeEighths, 2, 17, 23, 0, - + kEdgeOneFourth, 3, 1, 2, 3, 0, 0, - + kEdgeOneFourth, 2, 5, 6, 0, - + kEdgeOneFourth, 2, 8, 9, 0, - + kEdgeOneFourth, 2, 15, 16, 0, - + kEdgeOneFourth, 2, 18, 19, 0, - + kEdgeOneFourth, 3, 21, 22, 23, 0, 0, - + kEdgeOneHalf, 2, 1, 6, 0, - + kEdgeOneHalf, 2, 3, 8, 0, - + kEdgeOneHalf, 2, 16, 21, 0, - + kEdgeOneHalf, 2, 18, 23, @@ -339,105 +339,105 @@ static const VertexType kBombLevelFour[] = { 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, - + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 19, - + kEdgeOneEighth, 2, 5, 1, 0, - + kEdgeOneEighth, 3, 10, 6, 2, 0, 0, - + kEdgeOneEighth, 3, 16, 12, 8, 0, 0, - + kEdgeOneEighth, 3, 22, 18, 14, 0, 0, - + kEdgeOneEighth, 2, 23, 19, 0, - + kEdgeThreeEighths, 3, 2, 8, 14, 0, 0, - + kEdgeThreeEighths, 3, 10, 16, 22, 0, 0, - + kEdgeOneFourth, 4, 0, 1, 2, 3, 0, 0, 0, - + kEdgeOneFourth, 2, 5, 6, 0, - + kEdgeOneFourth, 2, 8, 9, 0, - + kEdgeOneFourth, 2, 15, 16, 0, - + kEdgeOneFourth, 2, 18, 19, 0, - + kEdgeOneFourth, 4, 21, 22, 23, 24, 0, 0, 0, - + kEdgeOneHalf, 4, 0, 5, 10, 15, 0, 0, 0, - + kEdgeOneHalf, 2, 1, 6, 0, - + kEdgeOneHalf, 2, 3, 8, 0, - + kEdgeOneHalf, 4, 9, 14, 19, 24, 0, 0, 0, - + kEdgeOneHalf, 2, 16, 21, 0, - + kEdgeOneHalf, 2, 18, 23, @@ -450,105 +450,105 @@ static const VertexType kBombLevelFive[] = { 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, - + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 19, - + kEdgeOneEighth, 2, 5, 1, 0, - + kEdgeOneEighth, 2, 7, 3, 0, - + kEdgeOneEighth, 2, 13, 9, 0, - + kEdgeOneEighth, 2, 15, 11, 0, - + kEdgeOneEighth, 2, 21, 17, 0, - + kEdgeOneEighth, 2, 23, 19, 0, - + kEdgeThreeEighths, 2, 1, 7, 0, - + kEdgeThreeEighths, 4, 5, 11, 17, 23, 0, 0, 0, - + kEdgeThreeEighths, 3, 6, 12, 18, 0, 0, - + kEdgeThreeEighths, 2, 13, 19, 0, - + kEdgeThreeEighths, 2, 15, 21, 0, - + kEdgeOneFourth, 5, 5, 6, 7, 8, 9, 0, 0, 0, 0, - + kEdgeOneFourth, 3, 15, 16, 17, 0, 0, - + kEdgeOneFourth, 2, 18, 19, 0, - + kEdgeOneFourth, 3, 21, 22, 23, 0, 0, - + kEdgeOneHalf, 3, 5, 10, 15, 0, 0, - + kEdgeOneHalf, 2, 1, 6, 0, - + kEdgeOneHalf, 3, 11, 16, 21, 0, 0, - + kEdgeOneHalf, 5, 3, 8, 13, 18, 23, @@ -561,135 +561,135 @@ static const VertexType kBombLevelSix[] = { 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, - + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - + 25, - + kEdgeOneSixteenth, 2, 10, 1, 0, - + kEdgeOneSixteenth, 2, 23, 14, 0, - + kEdgeSevenSixteenths, 2, 3, 14, 0, - + kEdgeSevenSixteenths, 2, 10, 21, 0, - + kEdgeOneEighth, 2, 5, 1, 0, - + kEdgeOneEighth, 3, 10, 6, 2, 0, 0, - + kEdgeOneEighth, 2, 7, 3, 0, - + kEdgeOneEighth, 2, 21, 17, 0, - + kEdgeOneEighth, 3, 22, 18, 14, 0, 0, - + kEdgeOneEighth, 2, 23, 19, 0, - + kEdgeThreeEighths, 2, 1, 7, 0, - + kEdgeThreeEighths, 3, 2, 8, 14, 0, 0, - + kEdgeThreeEighths, 2, 3, 9, 0, - + kEdgeThreeEighths, 3, 10, 16, 22, 0, 0, - + kEdgeThreeEighths, 2, 15, 21, 0, - + kEdgeThreeEighths, 2, 17, 23, 0, - + kEdgeOneFourth, 3, 1, 2, 3, 0, 0, - + kEdgeOneFourth, 3, 6, 7, 8, 0, 0, - + kEdgeOneFourth, 3, 16, 17, 18, 0, 0, - + kEdgeOneFourth, 3, 21, 22, 23, 0, 0, - + kEdgeOneHalf, 3, 5, 10, 15, 0, 0, - + kEdgeOneHalf, 3, 6, 11, 16, 0, 0, - + kEdgeOneHalf, 5, 2, 7, 12, 17, 22, 0, 0, 0, 0, - + kEdgeOneHalf, 3, 8, 13, 18, 0, 0, - + kEdgeOneHalf, 3, 9, 14, 19, @@ -780,7 +780,7 @@ VertexType *getUsedVertices(BombEdgeList edges) { // Useful for saving. Saving the state of the bomb game is as simple as writing // out the edge list. -int getEdgeListSize(BombEdgeList edges) { +int getEdgeListSize(BombEdgeList edges) { VertexType numEdges = getNumEdges(edges); VertexType *anEdge = getFirstEdge(edges); @@ -791,7 +791,7 @@ int getEdgeListSize(BombEdgeList edges) { } // Returns true if the given vertex lies on the given edge. -bool vertexOnEdge(VertexType *anEdge, VertexType whichVertex) { +bool vertexOnEdge(VertexType *anEdge, VertexType whichVertex) { VertexType numVerts = *++anEdge; while (numVerts--) @@ -805,7 +805,7 @@ bool vertexOnEdge(VertexType *anEdge, VertexType whichVertex) { // of all vertices that may be clicked on. // if fromVertex == -1, all vertices are eligible. // otherwise, only vertices on a line from fromVertex are eligible. -void makeHotVertexList(BombEdgeList edges, VertexType fromVertex, HotVerticesList &hotVertices) { +void makeHotVertexList(BombEdgeList edges, VertexType fromVertex, HotVerticesList &hotVertices) { hotVertices.numHotVerts = 0; if (fromVertex == -1) { @@ -835,7 +835,7 @@ void makeHotVertexList(BombEdgeList edges, VertexType fromVertex, HotVerticesLis // Set all edges in the edge list to the value passed in "edgeVal". // For drawing purposes, 0 can mean don't draw, and 1 and higher can // represent different colors. -void setAllEdgesUsed(BombEdgeList edges, VertexType used) { +void setAllEdgesUsed(BombEdgeList edges, VertexType used) { VertexType numEdges = getNumEdges(edges); VertexType *anEdge = getFirstEdge(edges); @@ -885,7 +885,7 @@ void setAllUsedEdgesUsed(BombEdgeList edges, VertexType used) { } // Replace all edges with value "value" with the new value "used". -void replaceUsedEdges(BombEdgeList edges, VertexType value, VertexType used) { +void replaceUsedEdges(BombEdgeList edges, VertexType value, VertexType used) { VertexType numEdges = getNumEdges(edges); VertexType *anEdge = getFirstEdge(edges); @@ -978,7 +978,7 @@ bool setEdgeUsed(BombEdgeList edges, VertexType fromVertex, VertexType toVertex) // Return true if all edges are used. Can be used to determine when the bomb // game is over. -bool allEdgesUsed(BombEdgeList edges) { +bool allEdgesUsed(BombEdgeList edges) { VertexType numEdges = getNumEdges(edges); VertexType *anEdge = getFirstEdge(edges); @@ -1018,7 +1018,7 @@ BombGrid::BombGrid(const DisplayElementID id) : Picture(id) { _yellowThreeEighths.initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kYellowBombPICTBaseID + 6, true); _yellowSevenSixteenths.initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kYellowBombPICTBaseID + 7, true); _yellowOneHalf.initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kYellowBombPICTBaseID + 8, true); - + _redDot.initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kRedBombPICTBaseID, true); _redOneSixteenth.initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kRedBombPICTBaseID + 1, true); _redOneEighth.initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kRedBombPICTBaseID + 2, true); @@ -1098,7 +1098,7 @@ void BombGrid::drawEdges(BombEdgeList edges) { gfx->setCurSurface(gfx->getWorkArea()); } -BombTimer::BombTimer(const DisplayElementID id) : IdlerAnimation(id) { +BombTimer::BombTimer(const DisplayElementID id) : IdlerAnimation(id) { _middle = -1; _leftImage.getImageFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kTimerLeftPICTID); _rightImage.getImageFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kTimerRightPICTID); @@ -1133,7 +1133,7 @@ void BombTimer::draw(const Common::Rect &updateRect) { } } -void BombTimer::timeChanged(const TimeValue newTime) { +void BombTimer::timeChanged(const TimeValue newTime) { Common::Rect bounds; getBounds(bounds); @@ -1167,7 +1167,7 @@ CaldoriaBomb::~CaldoriaBomb() { delete[] _bombLevel[i]; } -void CaldoriaBomb::openInteraction() { +void CaldoriaBomb::openInteraction() { _grid.moveElementTo(kCaldoriaBombGridLeft, kCaldoriaBombGridTop); _grid.setDisplayOrder(kCaldoriaBombGridOrder); _grid.startDisplaying(); @@ -1177,12 +1177,12 @@ void CaldoriaBomb::openInteraction() { _timer.startDisplaying(); _timer.setSegment(0, kTenMinutesPerFifteenTicks, kFifteenTicksPerSecond); _timer.setTime(0); - + _timerNotification.notifyMe(this, kBombTimerExpiredFlag, kBombTimerExpiredFlag); _timerCallBack.setNotification(&_timerNotification); _timerCallBack.initCallBack(&_timer, kCallBackAtExtremes); _timerCallBack.setCallBackFlag(kBombTimerExpiredFlag); - + Common::Rect r(0, 0, kVertextHotSpotWidth, kVertextHotSpotHeight); for (VertexType i = 0; i < 25; i++) { @@ -1193,7 +1193,7 @@ void CaldoriaBomb::openInteraction() { _vertexHotspot[i]->setHotspotFlags(kNeighborhoodSpotFlag | kClickSpotFlag); g_allHotspots.push_back(_vertexHotspot[i]); } - + _neighborhoodNotification = _owner->getNeighborhoodNotification(); _neighborhoodNotification->notifyMe(this, kExtraCompletedFlag, kExtraCompletedFlag); } @@ -1224,7 +1224,7 @@ void CaldoriaBomb::startBombAmbient(Common::String ambient) { _owner->loadLoopSound1(ambient); } -void CaldoriaBomb::receiveNotification(Notification *notification, const NotificationFlags) { +void CaldoriaBomb::receiveNotification(Notification *notification, const NotificationFlags) { if (notification == _neighborhoodNotification) { switch (_owner->getLastExtra()) { case kCaldoria56BombStage1: diff --git a/engines/pegasus/neighborhood/caldoria/caldoriabomb.h b/engines/pegasus/neighborhood/caldoria/caldoriabomb.h index 55d0409dec..5bb39b4122 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriabomb.h +++ b/engines/pegasus/neighborhood/caldoria/caldoriabomb.h @@ -34,12 +34,12 @@ namespace Pegasus { /* Edge list is arranged as follows: - + all values in the edge list are bytes. - + all vertices are numbers between 0 and 24. x coordinate of vertex is vertex % 5, and y coordinate is vertex / 5. - + an edge is a direction code a number of vertices in the edge @@ -48,13 +48,13 @@ namespace Pegasus { an array of bools (bytes) indicating that a portion of the edge is traversed (and should be drawn). the number of bools is one less than the number of vertices. - + an edge list is an array of 25 bools indicating which vertex is clickable. an array of 25 bools indicating which vertex is used (drawn). a number of edges an array of edges. - + a hot vertex list is a number of vertices an array of 25 vertices @@ -137,7 +137,7 @@ protected: void handleInput(const Input &, const Hotspot *); InputBits getInputFilter(); void startBombAmbient(Common::String); - + Notification *_neighborhoodNotification; BombGrid _grid; BombTimer _timer; diff --git a/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp b/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp index 5b9a823f7c..a3ce97d438 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp +++ b/engines/pegasus/neighborhood/caldoria/caldoriamessages.cpp @@ -54,7 +54,7 @@ void CaldoriaMessages::closeInteraction() { _neighborhoodNotification->cancelNotification(this); } -void CaldoriaMessages::receiveNotification(Notification *notification, const NotificationFlags) { +void CaldoriaMessages::receiveNotification(Notification *notification, const NotificationFlags) { if (notification == _neighborhoodNotification) { switch (GameInteraction::_owner->getLastExtra()) { case kCaBedroomVidPhone: @@ -91,7 +91,7 @@ void CaldoriaMessages::clickInHotspot(const Input &input, const Hotspot *spot) { } } -void CaldoriaMessages::play1Message(uint messageNumber) { +void CaldoriaMessages::play1Message(uint messageNumber) { if (messageNumber == 1) { _messageMovie.initFromMovieFile("Images/Caldoria/A12NVA.movie"); _messageNumber = 2; diff --git a/engines/pegasus/neighborhood/caldoria/caldoriamessages.h b/engines/pegasus/neighborhood/caldoria/caldoriamessages.h index 04079b52be..955fe10ce9 100644 --- a/engines/pegasus/neighborhood/caldoria/caldoriamessages.h +++ b/engines/pegasus/neighborhood/caldoria/caldoriamessages.h @@ -48,7 +48,7 @@ protected: void receiveNotification(Notification *, const NotificationFlags); void clickInHotspot(const Input &, const Hotspot *); void play1Message(uint); - + Movie _messageMovie; NotificationCallBack _messageCallBack; Notification *_neighborhoodNotification; diff --git a/engines/pegasus/neighborhood/mars/gravitoncannon.cpp b/engines/pegasus/neighborhood/mars/gravitoncannon.cpp index 13dc6dfc77..d04b3d08b2 100644 --- a/engines/pegasus/neighborhood/mars/gravitoncannon.cpp +++ b/engines/pegasus/neighborhood/mars/gravitoncannon.cpp @@ -65,7 +65,7 @@ void GravitonCannon::cleanUpShuttleWeapon() { ShuttleWeapon::cleanUpShuttleWeapon(); } -void GravitonCannon::draw(const Common::Rect &) { +void GravitonCannon::draw(const Common::Rect &) { // Left graviton... Point3D pt3D = _weaponLocation; pt3D.translate(-kGravitonWidth / 2, kGravitonHeight / 2, 0); @@ -74,21 +74,21 @@ void GravitonCannon::draw(const Common::Rect &) { Common::Rect gravitonRect; gravitonRect.left = pt2D.x; gravitonRect.top = pt2D.y; - + pt3D.translate(kGravitonWidth, -kGravitonHeight, 0); project3DTo2D(pt3D, pt2D); gravitonRect.right = pt2D.x; gravitonRect.bottom = pt2D.y; _gravitonImage.scaleTransparentCopy(_gravitonBounds, gravitonRect); - + // Right graviton... pt3D = _rightLocation; pt3D.translate(-kGravitonWidth / 2, kGravitonHeight / 2, 0); project3DTo2D(pt3D, pt2D); gravitonRect.left = pt2D.x; gravitonRect.top = pt2D.y; - + pt3D.translate(kGravitonWidth, -kGravitonHeight, 0); project3DTo2D(pt3D, pt2D); gravitonRect.right = pt2D.x; @@ -103,7 +103,7 @@ void GravitonCannon::updateWeaponPosition() { linearInterp(_rightOrigin, _weaponTarget, _weaponTime, _rightLocation); } -bool GravitonCannon::collisionWithJunk(Common::Point &impactPoint) { +bool GravitonCannon::collisionWithJunk(Common::Point &impactPoint) { if (getDisplayOrder() == kShuttleWeaponFrontOrder) { Point3D junkPosition; g_spaceJunk->getJunkPosition(junkPosition); diff --git a/engines/pegasus/neighborhood/mars/hermite.cpp b/engines/pegasus/neighborhood/mars/hermite.cpp index dc4a2c5fc2..7f631b369d 100644 --- a/engines/pegasus/neighborhood/mars/hermite.cpp +++ b/engines/pegasus/neighborhood/mars/hermite.cpp @@ -27,7 +27,7 @@ namespace Pegasus { -CoordType hermite(CoordType p1, CoordType p4, CoordType r1, CoordType r4, int32 time, int32 duration) { +CoordType hermite(CoordType p1, CoordType p4, CoordType r1, CoordType r4, int32 time, int32 duration) { float t = (float)time / duration; float tsq = t * t; float tcu = t * tsq; @@ -37,7 +37,7 @@ CoordType hermite(CoordType p1, CoordType p4, CoordType r1, CoordType r4, int32 return (CoordType)((tcu2 - tsq3 + 1) * p1 + (tsq3 - tcu2) * p4 + (tcu - tsq2 + t) * r1 + (tcu - tsq) * r4); } -CoordType dHermite(CoordType p1, CoordType p4, CoordType r1, CoordType r4, int32 time, int32 duration) { +CoordType dHermite(CoordType p1, CoordType p4, CoordType r1, CoordType r4, int32 time, int32 duration) { float t = (float)time / duration; float t2 = t + t; float t4 = t2 + t2; @@ -48,7 +48,7 @@ CoordType dHermite(CoordType p1, CoordType p4, CoordType r1, CoordType r4, int32 return (CoordType)((tsq6 - t6) * p1 + (t6 - tsq6) * p4 + (tsq3 - t4 + 1) * r1 + (tsq3 - t2) * r4); } -void hermite(Common::Point p1, Common::Point p4, Common::Point r1, Common::Point r4, int32 time, int32 duration, Common::Point &result) { +void hermite(Common::Point p1, Common::Point p4, Common::Point r1, Common::Point r4, int32 time, int32 duration, Common::Point &result) { float t = (float)time / duration; float tsq = t * t; float tcu = t * tsq; @@ -60,7 +60,7 @@ void hermite(Common::Point p1, Common::Point p4, Common::Point r1, Common::Point result.y = (int16)((tcu2 - tsq3 + 1) * p1.y + (tsq3 - tcu2) * p4.y + (tcu - tsq2 + t) * r1.y + (tcu - tsq) * r4.y); } -void dHermite(Common::Point p1, Common::Point p4, Common::Point r1, Common::Point r4, int32 time, int32 duration, Common::Point &result) { +void dHermite(Common::Point p1, Common::Point p4, Common::Point r1, Common::Point r4, int32 time, int32 duration, Common::Point &result) { float t = (float)time / duration; float t2 = t + t; float t4 = t2 + t2; diff --git a/engines/pegasus/neighborhood/mars/mars.cpp b/engines/pegasus/neighborhood/mars/mars.cpp index ec502d2fc9..8510abc92c 100644 --- a/engines/pegasus/neighborhood/mars/mars.cpp +++ b/engines/pegasus/neighborhood/mars/mars.cpp @@ -115,13 +115,13 @@ Mars::~Mars() { _vm->getAllHotspots().remove(&_shuttleTransportSpot); } -void Mars::init() { +void Mars::init() { Neighborhood::init(); - + Hotspot *attackSpot = _vm->getAllHotspots().findHotspotByID(kAttackRobotHotSpotID); attackSpot->setMaskedHotspotFlags(kDropItemSpotFlag, kDropItemSpotFlag); _attackingItem = NULL; - + forceStridingStop(kMars08, kNorth, kAltMarsNormal); _neighborhoodNotification.notifyMe(this, kMarsNotificationFlags, kMarsNotificationFlags); @@ -145,7 +145,7 @@ void Mars::start() { class AirMaskCondition : public AICondition { public: AirMaskCondition(const uint32); - + virtual bool fireCondition(); protected: @@ -166,7 +166,7 @@ bool AirMaskCondition::fireCondition() { return result; } -void Mars::setUpAIRules() { +void Mars::setUpAIRules() { Neighborhood::setUpAIRules(); // Don't add these rules if we're going to the robot's shuttle... @@ -905,7 +905,7 @@ void Mars::loadAmbientLoops() { } else if (room == kMarsRobotShuttle) { loadLoopSound1("Sounds/Mars/Robot Shuttle.22K.8.AIFF"); } - + if (!_noAirFuse.isFuseLit()) { switch (room) { case kMars02: @@ -1498,7 +1498,7 @@ void Mars::turnTo(const DirectionConstant direction) { case MakeRoomView(kMars35, kWest): if (!GameState.getMarsAirlockOpen()) setCurrentActivation(kActivateReadyToPressurizeAirlock); - + // Do this here because this will be called after spinning the airlock after // going through the gear room. if (GameState.getMarsThreadedMaze()) @@ -1920,7 +1920,7 @@ void Mars::pickedUpItem(Item *item) { case kOpticalBiochip: g_opticalChip->addAries(); GameState.setScoringGotMarsOpMemChip(); - + if (_privateFlags.getFlag(kMarsPrivateGotMapChipFlag) && _privateFlags.getFlag(kMarsPrivateGotShieldChipFlag) && _privateFlags.getFlag(kMarsPrivateGotOpticalChipFlag)) { @@ -2077,7 +2077,7 @@ void Mars::turnRight() { void Mars::receiveNotification(Notification *notification, const NotificationFlags flag) { InventoryItem *item; - + Neighborhood::receiveNotification(notification, flag); if ((flag & kExtraCompletedFlag) != 0) { @@ -2370,13 +2370,13 @@ void Mars::spotCompleted() { g_AIArea->playAIMovie(kRightAreaSignature, "Images/AI/Mars/XN59WD", false, kWarningInterruption); } -void Mars::doCanyonChase() { +void Mars::doCanyonChase() { GameState.setScoringEnteredShuttle(); setNextHandler(_vm); throwAwayInterface(); _vm->_cursor->hide(); - + // Open the spot sounds movie again... _spotSounds.initFromQuickTime(getSoundSpotsName()); _spotSounds.setVolume(_vm->getSoundFXLevel()); @@ -2427,38 +2427,38 @@ void Mars::doCanyonChase() { initOneMovie(&_leftShuttleMovie, "Images/Mars/Left Shuttle.movie", kShuttleMonitorOrder, kShuttleLeftLeft, kShuttleLeftTop, false); - + initOneMovie(&_rightShuttleMovie, "Images/Mars/Right Shuttle.movie", kShuttleMonitorOrder, kShuttleRightLeft, kShuttleRightTop, false); - + initOneMovie(&_lowerLeftShuttleMovie, "Images/Mars/Lower Left Shuttle.movie", kShuttleMonitorOrder, kShuttleLowerLeftLeft, kShuttleLowerLeftTop, false); - + initOneMovie(&_lowerRightShuttleMovie, "Images/Mars/Lower Right Shuttle.movie", kShuttleMonitorOrder, kShuttleLowerRightLeft, kShuttleLowerRightTop, false); - + initOneMovie(&_centerShuttleMovie, "Images/Mars/Center Shuttle.movie", kShuttleMonitorOrder, kShuttleCenterLeft, kShuttleCenterTop, false); - + initOneMovie(&_upperLeftShuttleMovie, "Images/Mars/Upper Left Shuttle.movie", kShuttleMonitorOrder, kShuttleUpperLeftLeft, kShuttleUpperLeftTop, false); - + initOneMovie(&_upperRightShuttleMovie, "Images/Mars/Upper Right Shuttle.movie", kShuttleMonitorOrder, kShuttleUpperRightLeft, kShuttleUpperRightTop, false); - + initOneMovie(&_leftDamageShuttleMovie, "Images/Mars/Left Damage Shuttle.movie", kShuttleStatusOrder, kShuttleLeftEnergyLeft, kShuttleLeftEnergyTop, false); - + initOneMovie(&_rightDamageShuttleMovie, "Images/Mars/Right Damage Shuttle.movie", kShuttleStatusOrder, kShuttleRightEnergyLeft, kShuttleRightEnergyTop, false); - + _centerShuttleMovie.show(); _centerShuttleMovie.setTime(kShuttleCenterBoardingTime); playSpotSoundSync(kShuttleCockpitIn, kShuttleCockpitOut); - + _centerShuttleMovie.setTime(kShuttleCenterCheckTime); playSpotSoundSync(kShuttleOnboardIn, kShuttleOnboardOut); - + _shuttleEnergyMeter.initShuttleEnergyMeter(); _shuttleEnergyMeter.powerUpMeter(); while (_shuttleEnergyMeter.isFading()) { @@ -2472,7 +2472,7 @@ void Mars::doCanyonChase() { _leftShuttleMovie.setTime(kShuttleLeftNormalTime); _leftShuttleMovie.redrawMovieWorld(); - + _leftDamageShuttleMovie.show(); playMovieSegment(&_leftDamageShuttleMovie); @@ -2480,7 +2480,7 @@ void Mars::doCanyonChase() { // so that subsequence drops will drop it down a tick. _leftDamageShuttleMovie.setTime(_leftDamageShuttleMovie.getTime() - 40); _leftDamageShuttleMovie.redrawMovieWorld(); - + _lowerRightShuttleMovie.show(); _lowerRightShuttleMovie.setTime(kShuttleLowerRightOffTime); _lowerRightShuttleMovie.redrawMovieWorld(); @@ -2542,31 +2542,31 @@ void Mars::startUpFromFinishedSpaceChase() { kShuttle3Top, true); initOnePicture(&_shuttleInterface4, "Images/Mars/MCmain4.pict", kShuttleBackgroundOrder, kShuttle4Left, kShuttle4Top, true); - + initOneMovie(&_leftShuttleMovie, "Images/Mars/Left Shuttle.movie", kShuttleMonitorOrder, kShuttleLeftLeft, kShuttleLeftTop, false); - + initOneMovie(&_rightShuttleMovie, "Images/Mars/Right Shuttle.movie", kShuttleMonitorOrder, kShuttleRightLeft, kShuttleRightTop, false); - + initOneMovie(&_lowerLeftShuttleMovie, "Images/Mars/Lower Left Shuttle.movie", kShuttleMonitorOrder, kShuttleLowerLeftLeft, kShuttleLowerLeftTop, false); - + initOneMovie(&_lowerRightShuttleMovie, "Images/Mars/Lower Right Shuttle.movie", kShuttleMonitorOrder, kShuttleLowerRightLeft, kShuttleLowerRightTop, false); - + initOneMovie(&_centerShuttleMovie, "Images/Mars/Center Shuttle.movie", kShuttleMonitorOrder, kShuttleCenterLeft, kShuttleCenterTop, false); - + initOneMovie(&_upperLeftShuttleMovie, "Images/Mars/Upper Left Shuttle.movie", kShuttleMonitorOrder, kShuttleUpperLeftLeft, kShuttleUpperLeftTop, false); - + initOneMovie(&_upperRightShuttleMovie, "Images/Mars/Upper Right Shuttle.movie", kShuttleMonitorOrder, kShuttleUpperRightLeft, kShuttleUpperRightTop, false); - + initOneMovie(&_leftDamageShuttleMovie, "Images/Mars/Left Damage Shuttle.movie", kShuttleStatusOrder, kShuttleLeftEnergyLeft, kShuttleLeftEnergyTop, false); - + initOneMovie(&_rightDamageShuttleMovie, "Images/Mars/Right Damage Shuttle.movie", kShuttleStatusOrder, kShuttleRightEnergyLeft, kShuttleRightEnergyTop, false); @@ -2612,7 +2612,7 @@ void Mars::startUpFromFinishedSpaceChase() { _lowerLeftShuttleMovie.setTime(kShuttleLowerLeftAutopilotTime); _lowerLeftShuttleMovie.redrawMovieWorld(); - + _shuttleTransportSpot.setArea(kShuttleTransportBounds); _shuttleTransportSpot.setHotspotFlags(kNeighborhoodSpotFlag | kClickSpotFlag); _vm->getAllHotspots().push_back(&_shuttleTransportSpot); @@ -2638,11 +2638,11 @@ void Mars::startUpFromFinishedSpaceChase() { void Mars::startUpFromSpaceChase() { setNextHandler(_vm); throwAwayInterface(); - + // Open the spot sounds movie again... _spotSounds.initFromQuickTime(getSoundSpotsName()); _spotSounds.setVolume(_vm->getSoundFXLevel());; - + initOnePicture(&_shuttleInterface1, "Images/Mars/MCmain1.pict", kShuttleBackgroundOrder, kShuttle1Left, kShuttle1Top, true); initOnePicture(&_shuttleInterface2, "Images/Mars/MCmain2.pict", kShuttleBackgroundOrder, kShuttle2Left, @@ -2651,31 +2651,31 @@ void Mars::startUpFromSpaceChase() { kShuttle3Top, true); initOnePicture(&_shuttleInterface4, "Images/Mars/MCmain4.pict", kShuttleBackgroundOrder, kShuttle4Left, kShuttle4Top, true); - + initOneMovie(&_leftShuttleMovie, "Images/Mars/Left Shuttle.movie", kShuttleMonitorOrder, kShuttleLeftLeft, kShuttleLeftTop, false); - + initOneMovie(&_rightShuttleMovie, "Images/Mars/Right Shuttle.movie", kShuttleMonitorOrder, kShuttleRightLeft, kShuttleRightTop, false); - + initOneMovie(&_lowerLeftShuttleMovie, "Images/Mars/Lower Left Shuttle.movie", kShuttleMonitorOrder, kShuttleLowerLeftLeft, kShuttleLowerLeftTop, false); - + initOneMovie(&_lowerRightShuttleMovie, "Images/Mars/Lower Right Shuttle.movie", kShuttleMonitorOrder, kShuttleLowerRightLeft, kShuttleLowerRightTop, false); - + initOneMovie(&_centerShuttleMovie, "Images/Mars/Center Shuttle.movie", kShuttleMonitorOrder, kShuttleCenterLeft, kShuttleCenterTop, false); - + initOneMovie(&_upperLeftShuttleMovie, "Images/Mars/Upper Left Shuttle.movie", kShuttleMonitorOrder, kShuttleUpperLeftLeft, kShuttleUpperLeftTop, false); - + initOneMovie(&_upperRightShuttleMovie, "Images/Mars/Upper Right Shuttle.movie", kShuttleMonitorOrder, kShuttleUpperRightLeft, kShuttleUpperRightTop, false); - + initOneMovie(&_leftDamageShuttleMovie, "Images/Mars/Left Damage Shuttle.movie", kShuttleStatusOrder, kShuttleLeftEnergyLeft, kShuttleLeftEnergyTop, false); - + initOneMovie(&_rightDamageShuttleMovie, "Images/Mars/Right Damage Shuttle.movie", kShuttleStatusOrder, kShuttleRightEnergyLeft, kShuttleRightEnergyTop, false); @@ -2687,7 +2687,7 @@ void Mars::startUpFromSpaceChase() { _leftShuttleMovie.show(); _leftShuttleMovie.setTime(kShuttleLeftNormalTime); _leftShuttleMovie.redrawMovieWorld(); - + _leftDamageShuttleMovie.show(); _leftDamageShuttleMovie.setTime(_leftDamageShuttleMovie.getDuration() - 40); _leftDamageShuttleMovie.redrawMovieWorld(); @@ -2697,14 +2697,14 @@ void Mars::startUpFromSpaceChase() { _lowerLeftShuttleMovie.show(); loadLoopSound1("Sounds/Mars/Space Ambient.22K.8.AIFF"); - + initOneMovie(&_planetMovie, "Images/Mars/Planet.movie", kShuttlePlanetOrder, kPlanetStartLeft, kPlanetStartTop, true); _planetMovie.setFlags(kLoopTimeBase); initOneMovie(&_junk, "Images/Mars/Junk.movie", kShuttleJunkOrder, kShuttleJunkLeft, kShuttleJunkTop, false); - + initOneMovie(&_explosions, "Images/Mars/Explosions.movie", kShuttleWeaponFrontOrder, 0, 0, false); _explosionCallBack.initCallBack(&_explosions, kCallBackAtExtremes); @@ -2850,7 +2850,7 @@ void Mars::marsTimerExpired(MarsTimerEvent &event) { playSpotSoundSync(kShuttleTractorDescIn, kShuttleTractorDescOut); _upperLeftShuttleMovie.setTime(kShuttleUpperLeftDimTime); _upperLeftShuttleMovie.redrawMovieWorld(); - + _centerShuttleMovie.setTime(kShuttleCenterTargetSightedTime); _centerShuttleMovie.redrawMovieWorld(); playSpotSoundSync(kShuttleTargetSightedIn, kShuttleTargetSightedOut); @@ -2904,7 +2904,7 @@ void Mars::marsTimerExpired(MarsTimerEvent &event) { startMarsTimer(kSpaceChaseTimeLimit, kOneTickPerSecond, kMarsSpaceChaseFinished); _vm->_cursor->hideUntilMoved(); - break; + break; case kMarsSpaceChaseFinished: // Player failed to stop the robot in time... _interruptionFilter = kFilterNoInput; @@ -2929,7 +2929,7 @@ void Mars::marsTimerExpired(MarsTimerEvent &event) { r = Common::Rect(kShuttleWindowMidH - x, kShuttleWindowMidV - y, kShuttleWindowMidH - x + 20, kShuttleWindowMidV - y + 20); showBigExplosion(r, kShuttleAlienShipOrder); - + while (_explosions.isRunning()) { _vm->checkCallBacks(); _vm->refreshDisplay(); @@ -2958,7 +2958,7 @@ void Mars::throwAwayMarsShuttle() { _shuttleInterface4.stopDisplaying(); _spotSounds.disposeSound(); - + _canyonChaseMovie.releaseMovie(); _canyonChaseMovie.stopDisplaying(); _leftShuttleMovie.releaseMovie(); @@ -3211,7 +3211,7 @@ void Mars::showBigExplosion(const Common::Rect &r, const DisplayOrder order) { r2.left -= dx; r2.right += dx; r2.top -= dy; - r2.bottom += dy; + r2.bottom += dy; _explosions.setBounds(r2); _explosions.show(); @@ -3223,7 +3223,7 @@ void Mars::showBigExplosion(const Common::Rect &r, const DisplayOrder order) { } } -void Mars::showLittleExplosion(const Common::Rect &r, const DisplayOrder order) { +void Mars::showLittleExplosion(const Common::Rect &r, const DisplayOrder order) { if (_explosions.isMovieValid()) { _explosions.setDisplayOrder(order); @@ -3245,7 +3245,7 @@ void Mars::showLittleExplosion(const Common::Rect &r, const DisplayOrder order) } } -void Mars::hitByJunk() { +void Mars::hitByJunk() { _leftDamageShuttleMovie.setTime(_leftDamageShuttleMovie.getTime() - 40); _leftDamageShuttleMovie.redrawMovieWorld(); @@ -3272,7 +3272,7 @@ void Mars::setUpNextDropTime() { _robotShip.setUpNextDropTime(); } -void Mars::decreaseRobotShuttleEnergy(const int delta, Common::Point impactPoint) { +void Mars::decreaseRobotShuttleEnergy(const int delta, Common::Point impactPoint) { _rightDamageShuttleMovie.setTime(_rightDamageShuttleMovie.getTime() - 40 * delta); _rightDamageShuttleMovie.redrawMovieWorld(); diff --git a/engines/pegasus/neighborhood/mars/mars.h b/engines/pegasus/neighborhood/mars/mars.h index 3ddbf39515..9ca53a8021 100644 --- a/engines/pegasus/neighborhood/mars/mars.h +++ b/engines/pegasus/neighborhood/mars/mars.h @@ -115,7 +115,7 @@ protected: kMarsPrivateGotShieldChipFlag, kNumMarsPrivateFlags }; - + void init(); void start(); void setUpAIRules(); @@ -126,7 +126,7 @@ protected: void activateOneHotspot(HotspotInfoTable::Entry &, Hotspot *); void clickInHotspot(const Input &, const Hotspot *); InputBits getInputFilter(); - + TimeValue getViewTime(const RoomID, const DirectionConstant); void getZoomEntry(const HotSpotID, ZoomTable::Entry &); void findSpotEntry(const RoomID, const DirectionConstant, SpotFlags, SpotTable::Entry &); @@ -143,7 +143,7 @@ protected: Hotspot *getItemScreenSpot(Item *, DisplayElement *); void lockThawed(); void robotTiredOfWaiting(); - + void setUpReactorLevel1(); void setUpNextReactorLevel(); void makeColorSequence(); @@ -184,7 +184,7 @@ protected: Common::String getSoundSpotsName(); Common::String getNavMovieName(); - + InventoryItem *_attackingItem; FuseFunction _bombFuse; FuseFunction _noAirFuse; diff --git a/engines/pegasus/neighborhood/mars/planetmover.cpp b/engines/pegasus/neighborhood/mars/planetmover.cpp index ef26a7b573..a340120c12 100644 --- a/engines/pegasus/neighborhood/mars/planetmover.cpp +++ b/engines/pegasus/neighborhood/mars/planetmover.cpp @@ -57,7 +57,7 @@ void PlanetMover::stopMoving() { stop(); } -void PlanetMover::dropPlanetOutOfSight() { +void PlanetMover::dropPlanetOutOfSight() { stop(); CoordType currentLoc = hermite(_p1, _p4, _r1, _r4, _lastTime, _duration); CoordType currentV = dHermite(_p1, _p4, _r1, _r4, _lastTime, _duration); diff --git a/engines/pegasus/neighborhood/mars/planetmover.h b/engines/pegasus/neighborhood/mars/planetmover.h index cc2c412548..2c195387e8 100644 --- a/engines/pegasus/neighborhood/mars/planetmover.h +++ b/engines/pegasus/neighborhood/mars/planetmover.h @@ -45,7 +45,7 @@ public: protected: void newDestination(); virtual void timeChanged(const TimeValue); - + Movie *_planetMovie; CoordType _p1, _p4, _r1, _r4; TimeValue _duration; diff --git a/engines/pegasus/neighborhood/mars/reactor.cpp b/engines/pegasus/neighborhood/mars/reactor.cpp index 478a01c155..334fb98879 100644 --- a/engines/pegasus/neighborhood/mars/reactor.cpp +++ b/engines/pegasus/neighborhood/mars/reactor.cpp @@ -66,7 +66,7 @@ void ReactorGuess::setGuess(int32 a, int32 b, int32 c) { triggerRedraw(); } -void ReactorGuess::draw(const Common::Rect &) { +void ReactorGuess::draw(const Common::Rect &) { if (_colors.isSurfaceValid()) { Common::Rect r1(0, 0, kOneGuessWidth, kOneGuessHeight); Common::Rect r2 = r1; @@ -115,7 +115,7 @@ void ReactorChoiceHighlight::disposeReactorChoiceHighlight() { _colors.deallocateSurface(); } -void ReactorChoiceHighlight::draw(const Common::Rect &) { +void ReactorChoiceHighlight::draw(const Common::Rect &) { if (_colors.isSurfaceValid()) { for (int i = 0; i < 5; ++i) { if (_choices.getFlag(i)) { @@ -232,7 +232,7 @@ void ReactorHistory::showAnswer() { triggerRedraw(); } -bool ReactorHistory::isSolved() { +bool ReactorHistory::isSolved() { for (int i = 0; i < _numGuesses; i++) if (_history[i][0] == _answer[0] && _history[i][1] == _answer[1] && _history[i][2] == _answer[2]) return true; @@ -284,7 +284,7 @@ void ReactorHistory::draw(const Common::Rect &) { } } -int32 ReactorHistory::getCurrentNumCorrect() { +int32 ReactorHistory::getCurrentNumCorrect() { int correct = 0; for (int i = 0; i < 3; i++) diff --git a/engines/pegasus/neighborhood/mars/robotship.cpp b/engines/pegasus/neighborhood/mars/robotship.cpp index 639f208fc8..1f4bbc1779 100644 --- a/engines/pegasus/neighborhood/mars/robotship.cpp +++ b/engines/pegasus/neighborhood/mars/robotship.cpp @@ -71,7 +71,7 @@ RobotShip::~RobotShip() { g_robotShip = 0; } -void RobotShip::initRobotShip() { +void RobotShip::initRobotShip() { _spritesMovie.initFromMovieFile("Images/Mars/Ship.movie", true); _spritesMovie.setDisplayOrder(kShuttleRobotShipOrder); _spritesMovie.moveElementTo(kPlanetStartLeft, kPlanetStartTop); @@ -124,7 +124,7 @@ void RobotShip::setUpNextDropTime() { } } -void RobotShip::timeToDropJunk() { +void RobotShip::timeToDropJunk() { if (g_spaceJunk) { CoordType x, y; _spritesMovie.getCenter(x, y); @@ -156,7 +156,7 @@ void RobotShip::newDestination() { _p4.y += kRovingHeight; } } - + makeVelocityVector(_p4.x, _p4.y, kShuttleWindowLeft + kShuttleWindowWidth / 2, kShuttleWindowTop + kShuttleWindowHeight / 2, _r4); stop(); @@ -222,7 +222,7 @@ void RobotShip::hitByGravitonCannon(Common::Point impactPoint) { ((Mars *)g_neighborhood)->decreaseRobotShuttleEnergy(6, impactPoint); } -void RobotShip::snareByTractorBeam() { +void RobotShip::snareByTractorBeam() { _dropJunkFuse.stopFuse(); stop(); @@ -255,7 +255,7 @@ void RobotShip::timeChanged(const TimeValue) { } } -void RobotShip::makeVelocityVector(CoordType x1, CoordType y1, CoordType x2, CoordType y2, Common::Point &vector) { +void RobotShip::makeVelocityVector(CoordType x1, CoordType y1, CoordType x2, CoordType y2, Common::Point &vector) { CoordType length = ((PegasusEngine *)g_engine)->getRandomNumber(kVelocityVectorSlop - 1) + kVelocityVectorLength; vector.x = x2 - x1; vector.y = y2 - y1; diff --git a/engines/pegasus/neighborhood/mars/shuttleenergymeter.cpp b/engines/pegasus/neighborhood/mars/shuttleenergymeter.cpp index 21bb1fb700..cd08dbae6a 100644 --- a/engines/pegasus/neighborhood/mars/shuttleenergymeter.cpp +++ b/engines/pegasus/neighborhood/mars/shuttleenergymeter.cpp @@ -83,7 +83,7 @@ void ShuttleEnergyMeter::setEnergyValue(const int32 value) { startFader(moveSpec); } -void ShuttleEnergyMeter::drainForTractorBeam() { +void ShuttleEnergyMeter::drainForTractorBeam() { stopFader(); TimeValue startTime = 0, stopTime; int32 startValue = getFaderValue(), stopValue; diff --git a/engines/pegasus/neighborhood/mars/shuttlehud.cpp b/engines/pegasus/neighborhood/mars/shuttlehud.cpp index 14f5b88319..11e826278b 100644 --- a/engines/pegasus/neighborhood/mars/shuttlehud.cpp +++ b/engines/pegasus/neighborhood/mars/shuttlehud.cpp @@ -128,7 +128,7 @@ void ShuttleHUD::hideTargetGrid() { unlockOnTarget(); } -void ShuttleHUD::useIdleTime() { +void ShuttleHUD::useIdleTime() { if (isVisible()) { Common::Rect r; g_robotShip->getShuttleBounds(r); diff --git a/engines/pegasus/neighborhood/mars/shuttleweapon.cpp b/engines/pegasus/neighborhood/mars/shuttleweapon.cpp index 0151a26f29..b4c360b280 100644 --- a/engines/pegasus/neighborhood/mars/shuttleweapon.cpp +++ b/engines/pegasus/neighborhood/mars/shuttleweapon.cpp @@ -53,7 +53,7 @@ bool ShuttleWeapon::canFireWeapon() { return !isRunning(); } -void ShuttleWeapon::fireWeapon(const CoordType hStop, const CoordType vStop) { +void ShuttleWeapon::fireWeapon(const CoordType hStop, const CoordType vStop) { if (!isRunning()) { stop(); setTime(0); diff --git a/engines/pegasus/neighborhood/mars/spacejunk.cpp b/engines/pegasus/neighborhood/mars/spacejunk.cpp index ac8b1a23cc..3912e659c2 100644 --- a/engines/pegasus/neighborhood/mars/spacejunk.cpp +++ b/engines/pegasus/neighborhood/mars/spacejunk.cpp @@ -49,7 +49,7 @@ SpaceJunk::~SpaceJunk() { g_spaceJunk = 0; } -void SpaceJunk::launchJunk(int16 whichJunk, CoordType xOrigin, CoordType yOrigin) { +void SpaceJunk::launchJunk(int16 whichJunk, CoordType xOrigin, CoordType yOrigin) { _bouncing = false; TimeValue startTime = whichJunk * 16 * 40; TimeValue stopTime = startTime + 16 * 40; @@ -93,7 +93,7 @@ void SpaceJunk::setScaleSize(const CoordType size) { setBounds(r); } -void SpaceJunk::useIdleTime() { +void SpaceJunk::useIdleTime() { if (_bouncing) { TimeValue time = _timer.getTime(); Common::Point pt; @@ -116,7 +116,7 @@ void SpaceJunk::useIdleTime() { Common::Point pt2D; project3DTo2D(_junkPosition, pt2D); setCenter(pt2D.x, pt2D.y); - setScaleSize((int)(convertSpaceYToScreenV(_junkPosition.y - kJunkSize / 2, _junkPosition.z) - + setScaleSize((int)(convertSpaceYToScreenV(_junkPosition.y - kJunkSize / 2, _junkPosition.z) - convertSpaceYToScreenV(_junkPosition.y + kJunkSize / 2, _junkPosition.z))); if (t == 1.0) { @@ -188,7 +188,7 @@ void SpaceJunk::hitByEnergyBeam(Common::Point) { setGlowing(false); } -void SpaceJunk::hitByGravitonCannon(Common::Point impactPoint) { +void SpaceJunk::hitByGravitonCannon(Common::Point impactPoint) { stop(); stopIdling(); hide(); diff --git a/engines/pegasus/neighborhood/mars/spacejunk.h b/engines/pegasus/neighborhood/mars/spacejunk.h index f2dbf9a838..2ec9192513 100644 --- a/engines/pegasus/neighborhood/mars/spacejunk.h +++ b/engines/pegasus/neighborhood/mars/spacejunk.h @@ -46,9 +46,9 @@ public: void setScaleSize(const CoordType); void useIdleTime(); - + void launchJunk(int16, CoordType, CoordType); - + void getJunkPosition(Point3D &); bool isJunkFlying(); diff --git a/engines/pegasus/neighborhood/mars/tractorbeam.cpp b/engines/pegasus/neighborhood/mars/tractorbeam.cpp index 81c96299cf..d3f9c94328 100644 --- a/engines/pegasus/neighborhood/mars/tractorbeam.cpp +++ b/engines/pegasus/neighborhood/mars/tractorbeam.cpp @@ -97,7 +97,7 @@ void TractorBeam::draw(const Common::Rect &) { byte *pTopRight = rowPtrTop + (kHalfWidth * 2 - 1) * screen->format.bytesPerPixel; byte *pBottomLeft = rowPtrBottom; byte *pBottomRight = rowPtrBottom + (kHalfWidth * 2 - 1) * screen->format.bytesPerPixel; - + for (int x = kHalfWidth; x > 0; x--) { byte r, g, b; uint32 color; @@ -106,12 +106,12 @@ void TractorBeam::draw(const Common::Rect &) { DO_BLEND(pTopRight); DO_BLEND(pBottomLeft); DO_BLEND(pBottomRight); - + pTopLeft += screen->format.bytesPerPixel; pBottomLeft += screen->format.bytesPerPixel; pTopRight -= screen->format.bytesPerPixel; pBottomRight -= screen->format.bytesPerPixel; - + while (dHoriz > kW3Div2Horiz) { blendHoriz++; dHoriz -= kW3Horiz; @@ -121,10 +121,10 @@ void TractorBeam::draw(const Common::Rect &) { d1Horiz += d2Horiz; d2Horiz += d3Horiz; } - + rowPtrTop += screen->pitch; rowPtrBottom -= screen->pitch; - + while (dVert > kW3Div2Vert) { blendVert++; dVert -= kW3Vert; diff --git a/engines/pegasus/neighborhood/neighborhood.cpp b/engines/pegasus/neighborhood/neighborhood.cpp index ae383a661b..07be62c957 100644 --- a/engines/pegasus/neighborhood/neighborhood.cpp +++ b/engines/pegasus/neighborhood/neighborhood.cpp @@ -309,7 +309,7 @@ void Neighborhood::getExtraEntry(const uint32 id, ExtraTable::Entry &extraEntry) CanMoveForwardReason Neighborhood::canMoveForward(ExitTable::Entry &entry) { DoorTable::Entry door; - + getExitEntry(GameState.getCurrentRoom(), GameState.getCurrentDirection(), entry); getDoorEntry(GameState.getCurrentRoom(), GameState.getCurrentDirection(), door); @@ -388,7 +388,7 @@ void Neighborhood::createNeighborhoodSpots() { delete hotspotList; } -void Neighborhood::popActionQueue() { +void Neighborhood::popActionQueue() { if (!_actionQueue.empty()) { QueueRequest topRequest = _actionQueue.pop(); @@ -445,7 +445,7 @@ void Neighborhood::requestAction(const QueueRequestType requestType, const Extra const InputBits interruptionFilter, const NotificationFlags flags) { QueueRequest request; - + request.requestType = requestType; request.extra = extra; request.start = in; @@ -600,7 +600,7 @@ int16 Neighborhood::getStaticCompassAngle(const RoomID, const DirectionConstant return compassAngles[dir]; } -void Neighborhood::getExitCompassMove(const ExitTable::Entry &exitEntry, FaderMoveSpec &compassMove) { +void Neighborhood::getExitCompassMove(const ExitTable::Entry &exitEntry, FaderMoveSpec &compassMove) { int32 startAngle = getStaticCompassAngle(exitEntry.room, exitEntry.direction); int32 stopAngle = getStaticCompassAngle(exitEntry.exitRoom, exitEntry.exitDirection); @@ -624,7 +624,7 @@ void Neighborhood::scheduleNavCallBack(NotificationFlags flags) { } } -void Neighborhood::scheduleStridingCallBack(const TimeValue strideStop, NotificationFlags flags) { +void Neighborhood::scheduleStridingCallBack(const TimeValue strideStop, NotificationFlags flags) { _stridingCallBack.cancelCallBack(); if (flags != 0) @@ -647,7 +647,7 @@ void Neighborhood::moveNavTo(const CoordType h, const CoordType v) { (*it)->moveSpot(offH, offV); } -void Neighborhood::activateHotspots() { +void Neighborhood::activateHotspots() { InputHandler::activateHotspots(); for (HotspotInfoTable::iterator it = _hotspotInfoTable.begin(); it != _hotspotInfoTable.end(); it++) { @@ -662,7 +662,7 @@ void Neighborhood::activateHotspots() { } } -void Neighborhood::clickInHotspot(const Input &input, const Hotspot *clickedSpot) { +void Neighborhood::clickInHotspot(const Input &input, const Hotspot *clickedSpot) { HotSpotFlags flags = clickedSpot->getHotspotFlags(); if ((flags & (kPickUpItemSpotFlag | kPickUpBiochipSpotFlag)) != 0) { @@ -730,11 +730,11 @@ void Neighborhood::turnTo(const DirectionConstant direction) { _vm->_gfx->setCurSurface(_navMovie.getSurface()); _pushIn.copyToCurrentPort(); _vm->_gfx->setCurSurface(_vm->_gfx->getWorkArea()); - + // Added 2/10/97. Shouldn't this be here? Shouldn't we set the current activation to // always when turning to a new view? _currentActivation = kActivateHotSpotAlways; - + _interruptionFilter = kFilterAllInput; if (direction != GameState.getCurrentDirection()) { @@ -764,7 +764,7 @@ void Neighborhood::spotCompleted() { showViewFrame(getViewTime(GameState.getCurrentRoom(), GameState.getCurrentDirection())); } -void Neighborhood::doorOpened() { +void Neighborhood::doorOpened() { _interruptionFilter = kFilterAllInput; // 2/23/97 @@ -805,7 +805,7 @@ void Neighborhood::moveForward() { } void Neighborhood::turn(const TurnDirection turnDirection) { - DirectionConstant nextDir; + DirectionConstant nextDir; CanTurnReason turnReason = canTurn(turnDirection, nextDir); if (turnReason == kCanTurn) @@ -831,7 +831,7 @@ void Neighborhood::turnDown() { } void Neighborhood::openDoor() { - DoorTable::Entry door; + DoorTable::Entry door; CanOpenDoorReason doorReason = canOpenDoor(door); if (doorReason == kCanOpenDoor) @@ -856,7 +856,7 @@ void Neighborhood::startSpotLoop(TimeValue startTime, TimeValue stopTime, Notifi startMovieSequence(startTime, stopTime, flags, true, kFilterAllInput); } -void Neighborhood::showViewFrame(TimeValue viewTime) { +void Neighborhood::showViewFrame(TimeValue viewTime) { if ((int32)viewTime >= 0) { _turnPush.hide(); _navMovie.stop(); @@ -889,7 +889,7 @@ bool Neighborhood::startExtraSequenceSync(const ExtraID extraID, const InputBits void Neighborhood::loopExtraSequence(const uint32 extraID, NotificationFlags flags) { ExtraTable::Entry entry; getExtraEntry(extraID, entry); - + if (entry.movieStart != 0xffffffff) { _lastExtra = extraID; startSpotLoop(entry.movieStart, entry.movieEnd, flags); @@ -996,7 +996,7 @@ void Neighborhood::showNav() { void Neighborhood::startExitMovie(const ExitTable::Entry &exitEntry) { FaderMoveSpec compassMove; - + if (g_compass) getExitCompassMove(exitEntry, compassMove); @@ -1014,7 +1014,7 @@ void Neighborhood::startExitMovie(const ExitTable::Entry &exitEntry) { void Neighborhood::startZoomMovie(const ZoomTable::Entry &zoomEntry) { FaderMoveSpec compassMove; - + if (g_compass) getZoomCompassMove(zoomEntry, compassMove); @@ -1193,7 +1193,7 @@ void Neighborhood::startMovieSequence(const TimeValue startTime, const TimeValue const InputBits interruptionInput, const TimeValue strideStop) { if (!loopSequence && g_AIArea) g_AIArea->lockAIOut(); - + _interruptionFilter = interruptionInput; // Stop the movie before doing anything else @@ -1272,7 +1272,7 @@ void Neighborhood::throwAwayInterface() { bool Neighborhood::prepareExtraSync(const ExtraID extraID) { ExtraTable::Entry extraEntry; FaderMoveSpec compassMove; - + if (g_compass) { getExtraEntry(extraID, extraEntry); getExtraCompassMove(extraEntry, compassMove); @@ -1338,7 +1338,7 @@ InputBits Neighborhood::getInputFilter() { return _interruptionFilter & InputHandler::getInputFilter(); } -void Neighborhood::getZoomCompassMove(const ZoomTable::Entry &zoomEntry, FaderMoveSpec &compassMove) { +void Neighborhood::getZoomCompassMove(const ZoomTable::Entry &zoomEntry, FaderMoveSpec &compassMove) { int32 startAngle = getStaticCompassAngle(GameState.getCurrentRoom(), GameState.getCurrentDirection()); int32 stopAngle = getStaticCompassAngle(zoomEntry.room, zoomEntry.direction); @@ -1453,7 +1453,7 @@ void Neighborhood::zoomUpOrBump() { void Neighborhood::loadLoopSound1(const Common::String &soundName, uint16 volume, TimeValue fadeOut, TimeValue fadeIn, TimeScale fadeScale) { FaderMoveSpec faderMove; - + if (!loop1Loaded(soundName)) { _loop1SoundString = soundName; @@ -1480,7 +1480,7 @@ void Neighborhood::loadLoopSound1(const Common::String &soundName, uint16 volume void Neighborhood::loadLoopSound2(const Common::String &soundName, uint16 volume, TimeValue fadeOut, TimeValue fadeIn, TimeScale fadeScale) { FaderMoveSpec faderMove; - + if (!loop2Loaded(soundName)) { _loop2SoundString = soundName; @@ -1575,7 +1575,7 @@ void Neighborhood::closeCroppedMovie() { _croppedMovie.releaseMovie(); } -void Neighborhood::playCroppedMovieOnce(const Common::String &movieName, CoordType left, CoordType top, const InputBits interruptionFilter) { +void Neighborhood::playCroppedMovieOnce(const Common::String &movieName, CoordType left, CoordType top, const InputBits interruptionFilter) { openCroppedMovie(movieName, left, top); _croppedMovie.redrawMovieWorld(); _croppedMovie.start(); @@ -1610,7 +1610,7 @@ void Neighborhood::playMovieSegment(Movie *movie, TimeValue startTime, TimeValue if (stopTime == 0xffffffff) stopTime = movie->getDuration(); - + movie->setSegment(startTime, stopTime); movie->setTime(startTime); movie->start(); diff --git a/engines/pegasus/neighborhood/neighborhood.h b/engines/pegasus/neighborhood/neighborhood.h index 1fef06657a..3c1c5eac92 100644 --- a/engines/pegasus/neighborhood/neighborhood.h +++ b/engines/pegasus/neighborhood/neighborhood.h @@ -147,7 +147,7 @@ public: virtual void zoomTo(const Hotspot *); virtual void updateViewFrame(); - + void requestExtraSequence(const ExtraID, const NotificationFlags, const InputBits interruptionFilter); void requestSpotSound(const TimeValue, const TimeValue, const InputBits interruptionFilter, const NotificationFlags); void playSpotSoundSync(const TimeValue in, const TimeValue out); @@ -165,35 +165,35 @@ public: virtual void loopExtraSequence(const uint32, NotificationFlags = 0); int32 getLastExtra() const { return _lastExtra; } virtual void scheduleNavCallBack(NotificationFlags); - + Movie *getNavMovie() { return &_navMovie; } bool navMoviePlaying(); - + void setCurrentAlternate(const AlternateID alt) { _currentAlternate = alt; } AlternateID getCurrentAlternate() const { return _currentAlternate; } - + void setCurrentActivation(const HotSpotActivationID a) { _currentActivation = a; } HotSpotActivationID getCurrentActivation() { return _currentActivation; } - + virtual void playDeathExtra(ExtraID, DeathReason); virtual void die(const DeathReason); virtual void setSoundFXLevel(const uint16); virtual void setAmbienceLevel(const uint16); - + void forceStridingStop(const RoomID, const DirectionConstant, const AlternateID); void restoreStriding(const RoomID, const DirectionConstant, const AlternateID); - + HotspotInfoTable::Entry *findHotspotEntry(const HotSpotID); - + Push *getTurnPush() { return &_turnPush; } Picture *getTurnPushPicture() { return &_pushIn; } - + void hideNav(); void showNav(); - + virtual void loadAmbientLoops() {} - + virtual void flushGameState() {} virtual Common::String getBriefingMovie(); @@ -235,7 +235,7 @@ public: virtual void showExtraView(uint32); virtual void startExtraLongSequence(const uint32, const uint32, NotificationFlags, const InputBits interruptionFilter); - + void openCroppedMovie(const Common::String &, CoordType, CoordType); void loopCroppedMovie(const Common::String &, CoordType, CoordType); void closeCroppedMovie(); @@ -245,14 +245,14 @@ public: virtual void recallToTSASuccess(); virtual void recallToTSAFailure(); - + virtual void pickedUpItem(Item *) {} virtual void handleInput(const Input &, const Hotspot *); protected: PegasusEngine *_vm; Common::String _resName; - + virtual Common::String getSoundSpotsName() = 0; virtual Common::String getNavMovieName() = 0; @@ -278,20 +278,20 @@ protected: virtual void startDoorOpenMovie(const TimeValue, const TimeValue); virtual void startTurnPush(const TurnDirection, const TimeValue, const DirectionConstant); virtual void playExtraMovie(const ExtraTable::Entry &, const NotificationFlags, const InputBits interruptionFilter); - + virtual void activateCurrentView(const RoomID, const DirectionConstant, SpotFlags); - + virtual void activateOneHotspot(HotspotInfoTable::Entry &, Hotspot *); - + virtual void startSpotOnceOnly(TimeValue, TimeValue); - + virtual void startMovieSequence(const TimeValue, const TimeValue, NotificationFlags, bool loopSequence, const InputBits interruptionFilter, const TimeValue strideStop = 0xffffffff); - + virtual void createNeighborhoodSpots(); - + void resetLastExtra() { _lastExtra = -1; } - + virtual void throwAwayInterface(); // Action queue stuff @@ -301,7 +301,7 @@ protected: virtual bool prepareExtraSync(const ExtraID); virtual bool waitMovieFinish(Movie *, const InputBits); - + virtual InputBits getInputFilter(); // Misc. @@ -351,7 +351,7 @@ protected: ZoomTable _zoomTable; AlternateID _currentAlternate; HotSpotActivationID _currentActivation; - + int32 _lastExtra; DeathReason _extraDeathReason; @@ -387,11 +387,11 @@ protected: GameInteraction *_currentInteraction; bool _doneWithInteraction; Movie _croppedMovie; - + Sound _soundLoop1; Common::String _loop1SoundString; SoundFader _loop1Fader; - + Sound _soundLoop2; Common::String _loop2SoundString; SoundFader _loop2Fader; diff --git a/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp b/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp index ff1f078b15..e2a0267231 100644 --- a/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp +++ b/engines/pegasus/neighborhood/norad/alpha/ecrmonitor.cpp @@ -72,7 +72,7 @@ void NoradAlphaECRMonitor::receiveNotification(Notification *, const Notificatio ecrSection2Finished(); } -int NoradAlphaECRMonitor::findCurrentInterestingTime() { +int NoradAlphaECRMonitor::findCurrentInterestingTime() { TimeValue time = _ecrMovie.getTime(); TimeScale scale = _ecrMovie.getScale(); @@ -155,7 +155,7 @@ void NoradAlphaECRMonitor::ecrSection1Finished() { _ecrPan.start(); } -void NoradAlphaECRMonitor::ecrPanFinished() { +void NoradAlphaECRMonitor::ecrPanFinished() { _ecrPan.stop(); _ecrPan.stopDisplaying(); _ecrMovieCallBack.setCallBackFlag(kECRSection2FinishedFlag); @@ -196,7 +196,7 @@ void NoradAlphaECRMonitor::openInteraction() { _ecrMovie.show(); _ecrMovie.redrawMovieWorld(); - TimeScale scale = _ecrMovie.getScale(); + TimeScale scale = _ecrMovie.getScale(); _ecrMovie.setSegment(kSection1Start * scale, kSection1Stop * scale + 1); _ecrMovie.start(); diff --git a/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp b/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp index 53f12ba55f..169f75f7d2 100644 --- a/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp +++ b/engines/pegasus/neighborhood/norad/alpha/fillingstation.cpp @@ -129,7 +129,7 @@ NoradAlphaFillingStation::NoradAlphaFillingStation(Neighborhood *owner) : GameIn _state = kNoState; } -void NoradAlphaFillingStation::openInteraction() { +void NoradAlphaFillingStation::openInteraction() { _rightSideMovie.initFromMovieFile("Images/Norad Alpha/N01W Right Side"); _rightSideMovie.moveElementTo(kNoradAlpha01RightSideLeft, kNoradAlpha01RightSideTop); _rightSideMovie.setDisplayOrder(kN01RightSideOrder); @@ -167,7 +167,7 @@ void NoradAlphaFillingStation::setStaticState(TimeValue time, int16 state) { allowInput(true); } -void NoradAlphaFillingStation::setSegmentState(TimeValue start, TimeValue stop, NotificationFlags flag, int16 state) { +void NoradAlphaFillingStation::setSegmentState(TimeValue start, TimeValue stop, NotificationFlags flag, int16 state) { _rightSideMovie.stop(); _rightSideMovie.setSegment(start, stop); _rightSideMovie.setTime(start); @@ -194,7 +194,7 @@ void NoradAlphaFillingStation::intakeWarningFinished() { setStaticState(kFSMainMenu, kMainMenu); } -void NoradAlphaFillingStation::showIntakeInProgress(uint16 numSeconds) { +void NoradAlphaFillingStation::showIntakeInProgress(uint16 numSeconds) { if (numSeconds == 0) { setSegmentState(kFSIntakeInProgressStart, kFSIntakeInProgressStop, kFSIntakeWarningFinishedFlag, kNoState); Item *item = ((NoradAlpha *)getOwner())->getFillingItem(); @@ -210,7 +210,7 @@ void NoradAlphaFillingStation::showIntakeInProgress(uint16 numSeconds) { } } -void NoradAlphaFillingStation::intakeHighlightFinished() { +void NoradAlphaFillingStation::intakeHighlightFinished() { _rightSideMovie.stop(); if (GameState.getNoradGassed()) { @@ -228,7 +228,7 @@ void NoradAlphaFillingStation::dispenseHighlightFinished() { setStaticState(kFSDispenseMenu, kDispenseMenu); } -void NoradAlphaFillingStation::dispenseGas() { +void NoradAlphaFillingStation::dispenseGas() { Item *item = ((NoradAlpha *)getOwner())->getFillingItem(); if (item) { diff --git a/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp b/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp index 793d8ffb59..e4a5e26473 100644 --- a/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp +++ b/engines/pegasus/neighborhood/norad/alpha/noradalpha.cpp @@ -99,32 +99,32 @@ NoradAlpha::NoradAlpha(InputHandler *nextHandler, PegasusEngine *owner) : Norad( void NoradAlpha::init() { Norad::init(); - + Hotspot *hotspot = _vm->getAllHotspots().findHotspotByID(kN01GasCanisterSpotID); hotspot->setMaskedHotspotFlags(kPickUpItemSpotFlag, kPickUpItemSpotFlag); HotspotInfoTable::Entry *hotspotEntry = findHotspotEntry(kN01GasCanisterSpotID); hotspotEntry->hotspotItem = kGasCanister; - + hotspot = _vm->getAllHotspots().findHotspotByID(kN01ArgonCanisterSpotID); hotspot->setMaskedHotspotFlags(kPickUpItemSpotFlag, kPickUpItemSpotFlag); hotspotEntry = findHotspotEntry(kN01ArgonCanisterSpotID); hotspotEntry->hotspotItem = kArgonCanister; - + hotspot = _vm->getAllHotspots().findHotspotByID(kN01NitrogenCanisterSpotID); hotspot->setMaskedHotspotFlags(kPickUpItemSpotFlag, kPickUpItemSpotFlag); hotspotEntry = findHotspotEntry(kN01NitrogenCanisterSpotID); hotspotEntry->hotspotItem = kNitrogenCanister; - + hotspot = _vm->getAllHotspots().findHotspotByID(kN01AirMaskSpotID); hotspot->setMaskedHotspotFlags(kPickUpItemSpotFlag, kPickUpItemSpotFlag); hotspotEntry = findHotspotEntry(kN01AirMaskSpotID); hotspotEntry->hotspotItem = kAirMask; - + hotspot = _vm->getAllHotspots().findHotspotByID(kN01GasOutletSpotID); hotspot->setMaskedHotspotFlags(kDropItemSpotFlag, kDropItemSpotFlag); } -void NoradAlpha::start() { +void NoradAlpha::start() { if (g_energyMonitor) { g_energyMonitor->stopEnergyDraining(); g_energyMonitor->restoreLastEnergyValue(); @@ -171,7 +171,7 @@ void NoradAlpha::start() { Norad::start(); } -void NoradAlpha::setUpAIRules() { +void NoradAlpha::setUpAIRules() { Neighborhood::setUpAIRules(); if (g_AIArea) { @@ -228,7 +228,7 @@ void NoradAlpha::loadAmbientLoops() { /* Logic: - + loop sound 1: if gassed, play warning loop of some sort @@ -285,7 +285,7 @@ void NoradAlpha::loadAmbientLoops() { loadLoopSound2(""); } } - + } void NoradAlpha::checkContinuePoint(const RoomID room, const DirectionConstant direction) { @@ -430,7 +430,7 @@ void NoradAlpha::getZoomEntry(const HotSpotID spotID, ZoomTable::Entry &entry) { TimeValue NoradAlpha::getViewTime(const RoomID room, const DirectionConstant direction) { ExtraTable::Entry entry; - + if (room == kNorad01 && direction == kSouth && !GameState.getNoradSeenTimeStream()) { getExtraEntry(kNoradArriveFromTSA, entry); return entry.movieStart; @@ -556,7 +556,7 @@ void NoradAlpha::activateHotspots() { } } -void NoradAlpha::clickInHotspot(const Input &input, const Hotspot *cursorSpot) { +void NoradAlpha::clickInHotspot(const Input &input, const Hotspot *cursorSpot) { Norad::clickInHotspot(input, cursorSpot); if (_vm->getDragType() == kDragInventoryUse) { diff --git a/engines/pegasus/neighborhood/norad/alpha/noradalpha.h b/engines/pegasus/neighborhood/norad/alpha/noradalpha.h index b88a6eb802..582d6c2bb3 100644 --- a/engines/pegasus/neighborhood/norad/alpha/noradalpha.h +++ b/engines/pegasus/neighborhood/norad/alpha/noradalpha.h @@ -88,12 +88,12 @@ protected: virtual void arriveAtNorad01West(); virtual void arriveAtNorad04(); virtual void arriveAtNorad22(); - + virtual void arriveAt(const RoomID, const DirectionConstant); - + virtual void getZoomEntry(const HotSpotID, ZoomTable::Entry &); virtual TimeValue getViewTime(const RoomID, const DirectionConstant); - + virtual void receiveNotification(Notification *, const NotificationFlags); virtual void activateHotspots(); diff --git a/engines/pegasus/neighborhood/norad/alpha/panorama.cpp b/engines/pegasus/neighborhood/norad/alpha/panorama.cpp index ecd428239b..5a717a84e7 100644 --- a/engines/pegasus/neighborhood/norad/alpha/panorama.cpp +++ b/engines/pegasus/neighborhood/norad/alpha/panorama.cpp @@ -86,7 +86,7 @@ void Panorama::setMask(Surface *mask) { // If the panorama is not open, do nothing and return. // Otherwise, set up the view bounds. -void Panorama::setViewBounds(const Common::Rect &newView) { +void Panorama::setViewBounds(const Common::Rect &newView) { if (!isPanoramaOpen()) return; @@ -159,7 +159,7 @@ void Panorama::drawPanorama(const Common::Rect &destRect) { // _panoramaHeight, _stripWidth is correct. // _panoramaMovie is allocated. void Panorama::makeNewSurface(const Common::Rect& view) { - CoordType stripLeft, stripRight; + CoordType stripLeft, stripRight; calcStripRange(view, stripLeft, stripRight); Common::Rect r(0, 0, (stripRight - stripLeft + 1) * _stripWidth, _panoramaHeight); @@ -179,7 +179,7 @@ void Panorama::calcStripRange(const Common::Rect &view, CoordType &stripLeft, Co // Assumptions: // Surface is allocated and is big enough for maximum range of // stripLeft and stripRight -void Panorama::loadStrips(CoordType stripLeft, CoordType stripRight) { +void Panorama::loadStrips(CoordType stripLeft, CoordType stripRight) { if (_stripLeft == -1) { // Surface has just been allocated. // Load in all strips. diff --git a/engines/pegasus/neighborhood/norad/alpha/panorama.h b/engines/pegasus/neighborhood/norad/alpha/panorama.h index 3ca2c1e305..87c7b3bd4e 100644 --- a/engines/pegasus/neighborhood/norad/alpha/panorama.h +++ b/engines/pegasus/neighborhood/norad/alpha/panorama.h @@ -34,24 +34,24 @@ namespace Pegasus { Panorama implements a wide image using a specially constructed movie file. The movie holds the image as a series of vertical strips, say 16 or 32 pixels wide. - + The panorama bounds defines the entire panorama. The view bounds represents the area on the panorama that is kept in memory. - + The panorama bounds is also stored in the movie file; it cannot be changed. The view bounds must always be a subset of the panorama bounds. - + In actuality, the area kept in memory is at least as wide as the view bounds (but may be wider to coincide with the width of the movies slices), and is as tall as the panorama bounds. The view bounds is used by the drawPanorama function to draw a piece of the panorama to the current screen. - + The panorama movie is built at a time scale of 1, with each strip lasting for one second, so that strip number corresponds exactly with the time value at which the strip is stored. - + TO USE: - + Call one initFromMovieFile to open the movie. Then set up a view rect by calling setViewBounds. Once these two functions have been called, drawPanorama will draw the panorama. @@ -82,7 +82,7 @@ protected: void calcStripRange(const Common::Rect &, CoordType &, CoordType &); void loadStrips(CoordType, CoordType); void loadOneStrip(CoordType, CoordType); - + Movie _panoramaMovie; Surface _panoramaWorld, *_mask; Common::Rect _viewBounds; diff --git a/engines/pegasus/neighborhood/norad/alpha/panoramascroll.cpp b/engines/pegasus/neighborhood/norad/alpha/panoramascroll.cpp index fcb49c52ee..7865bbb442 100644 --- a/engines/pegasus/neighborhood/norad/alpha/panoramascroll.cpp +++ b/engines/pegasus/neighborhood/norad/alpha/panoramascroll.cpp @@ -32,7 +32,7 @@ PanoramaScroll::PanoramaScroll(const DisplayElementID id) : IdlerAnimation(id) { _totalWidth = 0; } -void PanoramaScroll::initFromMovieFile(const Common::String &fileName) { +void PanoramaScroll::initFromMovieFile(const Common::String &fileName) { _panorama.initFromMovieFile(fileName); Common::Rect r; @@ -40,7 +40,7 @@ void PanoramaScroll::initFromMovieFile(const Common::String &fileName) { _totalWidth = r.width(); } -void PanoramaScroll::initMaskFromPICTFile(const Common::String &fileName) { +void PanoramaScroll::initMaskFromPICTFile(const Common::String &fileName) { if (!_panorama.isPanoramaOpen()) return; @@ -71,7 +71,7 @@ void PanoramaScroll::draw(const Common::Rect &) { _panorama.drawPanorama(_bounds); } -void PanoramaScroll::timeChanged(const TimeValue newTime) { +void PanoramaScroll::timeChanged(const TimeValue newTime) { CoordType leftPixel = (_totalWidth - _boundsWidth) * newTime / getDuration(); Common::Rect r; diff --git a/engines/pegasus/neighborhood/norad/delta/globegame.cpp b/engines/pegasus/neighborhood/norad/delta/globegame.cpp index 7d4c1c5f8f..06e40c2b3a 100644 --- a/engines/pegasus/neighborhood/norad/delta/globegame.cpp +++ b/engines/pegasus/neighborhood/norad/delta/globegame.cpp @@ -217,7 +217,7 @@ static const int kGlobeCountdownHeight = 12; static const int kGlobeCountdownOffset1 = 12; static const int kGlobeCountdownOffset2 = 20; -GlobeCountdown::GlobeCountdown(const DisplayElementID id) : IdlerAnimation(id) { +GlobeCountdown::GlobeCountdown(const DisplayElementID id) : IdlerAnimation(id) { _digits.getImageFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kGlobeCountdownDigitsID); Common::Rect r; @@ -271,11 +271,11 @@ void GlobeCountdown::draw(const Common::Rect &) { r2.moveTo(bounds.left, bounds.top); r1.moveTo(9 * _digitOffset, 0); _digits.copyToCurrentPort(r1, r2); - + r2.moveTo(bounds.left + kGlobeCountdownOffset1, bounds.top); r1.moveTo(5 * _digitOffset, 0); _digits.copyToCurrentPort(r1, r2); - + r2.moveTo(bounds.left + kGlobeCountdownOffset2, bounds.top); r1.moveTo(9 * _digitOffset, 0); _digits.copyToCurrentPort(r1, r2); @@ -283,12 +283,12 @@ void GlobeCountdown::draw(const Common::Rect &) { r2.moveTo(bounds.left, bounds.top); r1.moveTo((time / 60) * _digitOffset, 0); _digits.copyToCurrentPort(r1, r2); - + time %= 60; r2.moveTo(bounds.left + kGlobeCountdownOffset1, bounds.top); r1.moveTo((time / 10) * _digitOffset, 0); _digits.copyToCurrentPort(r1, r2); - + r2.moveTo(bounds.left + kGlobeCountdownOffset2, bounds.top); r1.moveTo((time % 10) * _digitOffset, 0); _digits.copyToCurrentPort(r1, r2); @@ -452,7 +452,7 @@ void GlobeGame::openInteraction() { _monitorMovie.startDisplaying(); _monitorMovie.setSegment(0, kSplash1End * _monitorMovie.getScale()); _monitorMovie.show(); - + _monitorCallBack.setNotification(&_globeNotification); _monitorCallBack.initCallBack(&_monitorMovie, kCallBackAtExtremes); _monitorCallBack.setCallBackFlag(kGlobeSplash1Finished); @@ -863,7 +863,7 @@ void GlobeGame::spinGlobe(const Input &input, const Hotspot *spot, GlobeTrackDir _globeTracker.startTracking(input); } -void GlobeGame::clickGlobe(const Input &input) { +void GlobeGame::clickGlobe(const Input &input) { int16 newSilo = findClickedSilo(input); if (newSilo != -1) { @@ -968,9 +968,9 @@ void GlobeGame::globeMovieFrameToOrigin(int16 frameNum, int16 &latOrigin, int16 } void GlobeGame::globePointToLatLong(const GlobeGame::Point3D &pt, int16 latOrigin, int16 longOrigin, - int16 &latitude, int16 &longitude) { + int16 &latitude, int16 &longitude) { Point3D scratch = pt; - + // Translate globe center to origin. scratch.x -= kGlobeCenter.x; scratch.y -= kGlobeCenter.y; @@ -984,7 +984,7 @@ void GlobeGame::globePointToLatLong(const GlobeGame::Point3D &pt, int16 latOrigi float y = scratch.y * c + scratch.x * s; scratch.x = x; scratch.y = y; - + // Calculate latitude latitude = (int16)radiansToDegrees(asin(scratch.y / kGlobeRadius)); @@ -996,7 +996,7 @@ void GlobeGame::globePointToLatLong(const GlobeGame::Point3D &pt, int16 latOrigi float z = scratch.z * c + scratch.x * s; scratch.x = x; scratch.z = z; - + // Calculate longitude longitude = (int16)radiansToDegrees(acos(scratch.x / sqrt(scratch.x * scratch.x + scratch.z * scratch.z))); @@ -1014,7 +1014,7 @@ void GlobeGame::screenPointTo3DPoint(int16 h, int16 v, GlobeGame::Point3D &pt) { // Fundamentals of Three-Dimensional Graphics, by Alan Watt // pp. 163-164 -bool GlobeGame::lineHitsGlobe(const GlobeGame::Line3D &line, GlobeGame::Point3D &pt) { +bool GlobeGame::lineHitsGlobe(const GlobeGame::Line3D &line, GlobeGame::Point3D &pt) { float i = line.pt2.x - line.pt1.x; float j = line.pt2.y - line.pt1.y; float k = line.pt2.z - line.pt1.z; diff --git a/engines/pegasus/neighborhood/norad/delta/globegame.h b/engines/pegasus/neighborhood/norad/delta/globegame.h index 9c31a931fc..73ed48866f 100644 --- a/engines/pegasus/neighborhood/norad/delta/globegame.h +++ b/engines/pegasus/neighborhood/norad/delta/globegame.h @@ -101,7 +101,7 @@ public: void handleInput(const Input &, const Hotspot *); void clickInHotspot(const Input &, const Hotspot *); void activateHotspots(); - + bool canSolve(); void doSolve(); diff --git a/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp b/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp index 01530023c8..f2ea53ff89 100644 --- a/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp +++ b/engines/pegasus/neighborhood/norad/delta/noraddelta.cpp @@ -62,8 +62,8 @@ const uint32 NoradDelta::_noradDeltaClawExtras[22] = { kN60ClawDCounterclockwise, kN60ClawDClockwise }; - -NoradDelta::NoradDelta(InputHandler *nextHandler, PegasusEngine *owner) : Norad(nextHandler, owner, "Norad Delta", kNoradDeltaID) { + +NoradDelta::NoradDelta(InputHandler *nextHandler, PegasusEngine *owner) : Norad(nextHandler, owner, "Norad Delta", kNoradDeltaID) { _elevatorUpRoomID = kNorad49South; _elevatorDownRoomID = kNorad48South; _elevatorUpSpotID = kNorad48ElevatorUpSpotID; @@ -98,41 +98,41 @@ NoradDelta::NoradDelta(InputHandler *nextHandler, PegasusEngine *owner) : Norad( _subControlRoom = kNorad60West; } -void NoradDelta::init() { +void NoradDelta::init() { Norad::init(); // Little fix for the retinal scan zoom in spot... Hotspot *hotspot = _vm->getAllHotspots().findHotspotByID(kNorad68WestSpotID); hotspot->setMaskedHotspotFlags(kZoomInSpotFlag, kZoomInSpotFlag | kZoomOutSpotFlag); - + hotspot = _vm->getAllHotspots().findHotspotByID(kNorad79WestSpotID); hotspot->setMaskedHotspotFlags(kZoomInSpotFlag, kZoomInSpotFlag | kZoomOutSpotFlag); - + hotspot = _vm->getAllHotspots().findHotspotByID(kDelta59RobotShieldBiochipSpotID); hotspot->setMaskedHotspotFlags(kPickUpBiochipSpotFlag, kPickUpBiochipSpotFlag); HotspotInfoTable::Entry *hotspotEntry = findHotspotEntry(kDelta59RobotShieldBiochipSpotID); hotspotEntry->hotspotItem = kShieldBiochip; - + hotspot = _vm->getAllHotspots().findHotspotByID(kDelta59RobotOpMemBiochipSpotID); hotspot->setMaskedHotspotFlags(kPickUpBiochipSpotFlag, kPickUpBiochipSpotFlag); hotspotEntry = findHotspotEntry(kDelta59RobotOpMemBiochipSpotID); hotspotEntry->hotspotItem = kOpticalBiochip; - + hotspot = _vm->getAllHotspots().findHotspotByID(kDelta59RobotRetinalBiochipSpotID); hotspot->setMaskedHotspotFlags(kPickUpBiochipSpotFlag, kPickUpBiochipSpotFlag); hotspotEntry = findHotspotEntry(kDelta59RobotRetinalBiochipSpotID); hotspotEntry->hotspotItem = kRetinalScanBiochip; - + hotspot = _vm->getAllHotspots().findHotspotByID(kDelta60RobotShieldBiochipSpotID); hotspot->setMaskedHotspotFlags(kPickUpBiochipSpotFlag, kPickUpBiochipSpotFlag); hotspotEntry = findHotspotEntry(kDelta60RobotShieldBiochipSpotID); hotspotEntry->hotspotItem = kShieldBiochip; - + hotspot = _vm->getAllHotspots().findHotspotByID(kDelta60RobotOpMemBiochipSpotID); hotspot->setMaskedHotspotFlags(kPickUpBiochipSpotFlag, kPickUpBiochipSpotFlag); hotspotEntry = findHotspotEntry(kDelta60RobotOpMemBiochipSpotID); hotspotEntry->hotspotItem = kOpticalBiochip; - + hotspot = _vm->getAllHotspots().findHotspotByID(kDelta60RobotRetinalBiochipSpotID); hotspot->setMaskedHotspotFlags(kPickUpBiochipSpotFlag, kPickUpBiochipSpotFlag); hotspotEntry = findHotspotEntry(kDelta60RobotRetinalBiochipSpotID); @@ -150,7 +150,7 @@ void NoradDelta::start() { Norad::start(); } -void NoradDelta::setUpAIRules() { +void NoradDelta::setUpAIRules() { Neighborhood::setUpAIRules(); if (g_AIArea) { @@ -228,10 +228,10 @@ void NoradDelta::getZoomEntry(const HotSpotID id, ZoomTable::Entry &zoomEntry) { } } -void NoradDelta::loadAmbientLoops() { +void NoradDelta::loadAmbientLoops() { /* Logic: - + loop sound 1: if room == kNorad79West if player globe game @@ -261,7 +261,7 @@ void NoradDelta::loadAmbientLoops() { else play nothing */ - + if (GameState.getNoradArrivedFromSub()) { RoomID room = GameState.getCurrentRoom(); @@ -391,7 +391,7 @@ void NoradDelta::arriveAtNorad68West() { } } -void NoradDelta::arriveAtNorad79West() { +void NoradDelta::arriveAtNorad79West() { if (!GameState.getNoradPlayedGlobeGame()) newInteraction(kNoradGlobeGameInteractionID); } @@ -464,7 +464,7 @@ void NoradDelta::playerBeatRobotWithClaw() { TimeValue NoradDelta::getViewTime(const RoomID room, const DirectionConstant direction) { ExtraTable::Entry entry; - + if (room == kNorad41 && direction == kSouth && !GameState.getNoradArrivedFromSub()) { getExtraEntry(kArriveFromSubChase, entry); return entry.movieStart; @@ -505,7 +505,7 @@ TimeValue NoradDelta::getViewTime(const RoomID room, const DirectionConstant dir return Norad::getViewTime(room, direction); } -void NoradDelta::openDoor() { +void NoradDelta::openDoor() { if (GameState.getCurrentRoom() == kNorad59 && GameState.getCurrentDirection() == kWest && GameState.getNoradPlayedGlobeGame()) { Input scratch; InputHandler::_inputHandler->clickInHotspot(scratch, _vm->getAllHotspots().findHotspotByID(kNorad59WestSpotID)); @@ -582,7 +582,7 @@ void NoradDelta::clickInHotspot(const Input &input, const Hotspot *clickedSpot) } } -void NoradDelta::receiveNotification(Notification *notification, const NotificationFlags flags) { +void NoradDelta::receiveNotification(Notification *notification, const NotificationFlags flags) { Norad::receiveNotification(notification, flags); if ((flags & kExtraCompletedFlag) != 0) { @@ -703,7 +703,7 @@ void NoradDelta::dropItemIntoRoom(Item *item, Hotspot *hotspot) { Hotspot *NoradDelta::getItemScreenSpot(Item *item, DisplayElement *element) { HotSpotID id = kNoHotSpotID; - + switch (item->getObjectID()) { case kShieldBiochip: if (GameState.getNoradBeatRobotWithDoor()) @@ -735,7 +735,7 @@ Common::String NoradDelta::getEnvScanMovie() { return "Images/AI/Norad/XNE2"; } -uint NoradDelta::getNumHints() { +uint NoradDelta::getNumHints() { uint numHints = Neighborhood::getNumHints(); if (numHints == 0) { diff --git a/engines/pegasus/neighborhood/norad/norad.cpp b/engines/pegasus/neighborhood/norad/norad.cpp index 9ee8205ec1..578f062dea 100644 --- a/engines/pegasus/neighborhood/norad/norad.cpp +++ b/engines/pegasus/neighborhood/norad/norad.cpp @@ -123,7 +123,7 @@ void Norad::start() { Neighborhood::start(); } -void Norad::activateHotspots() { +void Norad::activateHotspots() { Neighborhood::activateHotspots(); RoomID room = GameState.getCurrentRoom(); @@ -172,7 +172,7 @@ void Norad::arriveAtSubPlatformRoom() { newInteraction(kNoradSubPlatformInteractionID); } -void Norad::arriveAtSubControlRoom() { +void Norad::arriveAtSubControlRoom() { newInteraction(kNoradSubControlRoomInteractionID); } @@ -229,7 +229,7 @@ void Norad::upButton(const Input &input) { Neighborhood::upButton(input); } -void Norad::setUpAirMask() { +void Norad::setUpAirMask() { _airMaskCallBack.setNotification(&_neighborhoodNotification); _airMaskCallBack.initCallBack(&_airMaskTimer, kCallBackAtExtremes); _airMaskCallBack.setCallBackFlag(kAirTimerExpiredFlag); @@ -251,7 +251,7 @@ void Norad::checkAirMask() { loadAmbientLoops(); } -void Norad::receiveNotification(Notification *notification, const NotificationFlags flags) { +void Norad::receiveNotification(Notification *notification, const NotificationFlags flags) { if (notification == &_neighborhoodNotification && (flags & kAirTimerExpiredFlag) != 0) ((PegasusEngine *)g_engine)->die(kDeathGassedInNorad); diff --git a/engines/pegasus/neighborhood/norad/norad.h b/engines/pegasus/neighborhood/norad/norad.h index 4723410b4c..3cd77cc54b 100644 --- a/engines/pegasus/neighborhood/norad/norad.h +++ b/engines/pegasus/neighborhood/norad/norad.h @@ -100,18 +100,18 @@ protected: HotSpotID _upperPressureDoorUpSpotID; HotSpotID _upperPressureDoorDownSpotID; HotSpotID _upperPressureDoorAbortSpotID; - + HotSpotID _lowerPressureDoorUpSpotID; HotSpotID _lowerPressureDoorDownSpotID; HotSpotID _lowerPressureDoorAbortSpotID; - + TimeValue _pressureSoundIn; TimeValue _pressureSoundOut; TimeValue _equalizeSoundIn; TimeValue _equalizeSoundOut; TimeValue _accessDeniedIn; TimeValue _accessDeniedOut; - + RoomID _platformRoom; RoomID _subControlRoom; }; diff --git a/engines/pegasus/neighborhood/norad/noradelevator.cpp b/engines/pegasus/neighborhood/norad/noradelevator.cpp index 4279e236ae..1751f4dcb6 100644 --- a/engines/pegasus/neighborhood/norad/noradelevator.cpp +++ b/engines/pegasus/neighborhood/norad/noradelevator.cpp @@ -47,23 +47,23 @@ NoradElevator::NoradElevator(Neighborhood *handler, const RoomID upRoom, const R _downHotspot = downHotspot; } -void NoradElevator::openInteraction() { +void NoradElevator::openInteraction() { SpriteFrame *frame = new SpriteFrame(); frame->initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kElevatorLabelID, true); _elevatorControls.addFrame(frame, 0, 0); - + frame = new SpriteFrame(); frame->initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kElevatorButtonsID, true); _elevatorControls.addFrame(frame, 0, 0); - + frame = new SpriteFrame(); frame->initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kElevatorDownOnID, true); _elevatorControls.addFrame(frame, 0, 0); - + frame = new SpriteFrame(); frame->initFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kElevatorUpOnID, true); _elevatorControls.addFrame(frame, 0, 0); - + _elevatorControls.setCurrentFrameIndex(0); _elevatorControls.setDisplayOrder(kElevatorControlsOrder); @@ -76,7 +76,7 @@ void NoradElevator::openInteraction() { _elevatorControls.show(); } -void NoradElevator::initInteraction() { +void NoradElevator::initInteraction() { _elevatorTimer.setScale(2); _elevatorTimer.setSegment(0, 1); _elevatorCallBack.initCallBack(&_elevatorTimer, kCallBackAtExtremes); diff --git a/engines/pegasus/neighborhood/norad/noradelevator.h b/engines/pegasus/neighborhood/norad/noradelevator.h index a34c77b2e0..24aa488534 100644 --- a/engines/pegasus/neighborhood/norad/noradelevator.h +++ b/engines/pegasus/neighborhood/norad/noradelevator.h @@ -45,12 +45,12 @@ protected: virtual void initInteraction(); virtual void closeInteraction(); virtual void resetInteraction(); - + virtual void activateHotspots(); virtual void clickInHotspot(const Input &, const Hotspot *); - + virtual void receiveNotification(Notification *, const NotificationFlags); - + RoomID _upRoom; RoomID _downRoom; HotSpotID _upHotspot; diff --git a/engines/pegasus/neighborhood/norad/pressuredoor.cpp b/engines/pegasus/neighborhood/norad/pressuredoor.cpp index 520d568b5d..d1378567d3 100644 --- a/engines/pegasus/neighborhood/norad/pressuredoor.cpp +++ b/engines/pegasus/neighborhood/norad/pressuredoor.cpp @@ -138,7 +138,7 @@ void PressureDoor::openInteraction() { _levelsMovie.setTime(kLevelsSplashStart * _levelsScale); _levelsMovie.redrawMovieWorld(); _levelsMovie.show(); - + _pressureCallBack.setNotification(&_pressureNotification); _pressureCallBack.initCallBack(&_levelsMovie, kCallBackAtExtremes); _pressureCallBack.setCallBackFlag(kSplashFinished); @@ -226,11 +226,11 @@ void PressureDoor::openInteraction() { else _neighborhoodNotification->notifyMe(this, kDelayCompletedFlag | kSpotSoundCompletedFlag, kDelayCompletedFlag | kSpotSoundCompletedFlag); - + _gameState = kPlayingSplash; } -void PressureDoor::initInteraction() { +void PressureDoor::initInteraction() { _levelsMovie.start(); if (_playingAgainstRobot) { @@ -249,7 +249,7 @@ void PressureDoor::initInteraction() { _levelsMovie.redrawMovieWorld(); } -void PressureDoor::closeInteraction() { +void PressureDoor::closeInteraction() { _pressureNotification.cancelNotification(this); _pressureCallBack.releaseCallBack(); _utilityNotification.cancelNotification(this); @@ -526,7 +526,7 @@ bool PressureDoor::canSolve() { return GameState.getNoradSubRoomPressure() != kNormalSubRoomPressure; } -void PressureDoor::doSolve() { +void PressureDoor::doSolve() { if (_playingAgainstRobot) { GameState.setNoradSubRoomPressure(11); _levelsMovie.setTime((11 + kPressureBase) * _levelsScale); diff --git a/engines/pegasus/neighborhood/norad/pressuredoor.h b/engines/pegasus/neighborhood/norad/pressuredoor.h index 7ef1518c9f..b2018bfcf7 100644 --- a/engines/pegasus/neighborhood/norad/pressuredoor.h +++ b/engines/pegasus/neighborhood/norad/pressuredoor.h @@ -79,7 +79,7 @@ protected: TimeValue _equalizeSoundIn; TimeValue _equalizeSoundOut; bool _isUpperDoor; - + bool _playingAgainstRobot, _typePunched; int _robotState, _punchCount; TimeBase _utilityTimer; diff --git a/engines/pegasus/neighborhood/norad/pressuretracker.h b/engines/pegasus/neighborhood/norad/pressuretracker.h index 7d572593d0..6ca7252e22 100644 --- a/engines/pegasus/neighborhood/norad/pressuretracker.h +++ b/engines/pegasus/neighborhood/norad/pressuretracker.h @@ -47,7 +47,7 @@ class PressureTracker : public Tracker { public: PressureTracker(PressureDoor *); virtual ~PressureTracker() {} - + void setTrackParameters(const Hotspot *, Sprite *); void continueTracking(const Input &); void startTracking(const Input &); diff --git a/engines/pegasus/neighborhood/norad/subcontrolroom.cpp b/engines/pegasus/neighborhood/norad/subcontrolroom.cpp index 55d756211f..d48481e925 100644 --- a/engines/pegasus/neighborhood/norad/subcontrolroom.cpp +++ b/engines/pegasus/neighborhood/norad/subcontrolroom.cpp @@ -224,13 +224,13 @@ enum { /* _currentAction and _nextAction: - + At any time, _currentAction contains an action index (defined above). The current action index is what the claw is doing right now. If the player presses a button before the current action completes, _nextAction saves the new action and input is disabled. This has the effect of implementing a queue of commands for the claw that can save at most one extra command. - + The general strategy for using _currentAction and _nextAction are: -- If the player presses a claw button and _currentAction is kNoActionIndex, do the command immediately and set _currentAction accordingly. @@ -248,7 +248,7 @@ enum { Leave _nextAction alone. When the animation, completes, check to see if the claw is in its original position or not. If so, complete the player rising sequence by playing the rising animation. If not, repeat this whole step. - + Using this general strategy allows the use of a single function, DispatchClawAction, which can both cause the claw to perform a command and saving the next command in _nextAction. @@ -434,7 +434,7 @@ void SubControlRoom::playAgainstRobot() { _playingAgainstRobot = true; } -void SubControlRoom::openInteraction() { +void SubControlRoom::openInteraction() { _currentAction = kNoActionIndex; _nextAction = kNoActionIndex; @@ -526,7 +526,7 @@ void SubControlRoom::openInteraction() { _subControlMovie.show(); _clawMonitorMovie.show(); -} +} void SubControlRoom::initInteraction() { if (GameState.getNoradSubPrepState() == kSubDamaged) { @@ -541,7 +541,7 @@ void SubControlRoom::initInteraction() { _subControlMovie.redrawMovieWorld(); _clawMonitorMovie.redrawMovieWorld(); -} +} void SubControlRoom::closeInteraction() { _subControlNotification.cancelNotification(this); @@ -555,7 +555,7 @@ void SubControlRoom::setSoundFXLevel(const uint16 fxLevel) { _subControlMovie.setVolume(fxLevel); } -void SubControlRoom::receiveNotification(Notification *notification, const NotificationFlags flags) { +void SubControlRoom::receiveNotification(Notification *notification, const NotificationFlags flags) { Norad *owner = (Norad *)getOwner(); if (notification == &_subControlNotification) { @@ -703,7 +703,7 @@ void SubControlRoom::hideEverything() { _greenBall.hide(); } -void SubControlRoom::robotKillsPlayer(const uint32 extraID, Neighborhood *owner) { +void SubControlRoom::robotKillsPlayer(const uint32 extraID, Neighborhood *owner) { _robotState = kRobotWon; owner->startExtraSequence(extraID, kExtraCompletedFlag, kFilterAllInput); _greenBallTimer.stop(); @@ -713,7 +713,7 @@ void SubControlRoom::robotKillsPlayer(const uint32 extraID, Neighborhood *owner) _greenBallTimer.start(); } -void SubControlRoom::activateHotspots() { +void SubControlRoom::activateHotspots() { if (_robotState == kRobotWon || _robotState == kPlayerWon) return; @@ -744,7 +744,7 @@ void SubControlRoom::activateHotspots() { } } -void SubControlRoom::showButtons() { +void SubControlRoom::showButtons() { if (_playingAgainstRobot && _robotState == kRobotApproaching) { for (int i = 0; i < kNumClawButtons; i++) { _buttons[i]->show(); @@ -772,12 +772,12 @@ void SubControlRoom::showButtons() { } } -void SubControlRoom::hideButtons() { +void SubControlRoom::hideButtons() { for (int i = 0; i < kNumClawButtons; i++) _buttons[i]->hide(); } -int SubControlRoom::findActionIndex(HotSpotID id) { +int SubControlRoom::findActionIndex(HotSpotID id) { for (int i = 0; i < kNumClawButtons; i++) if (id == _clawButtonSpotIDs[i]) return i; @@ -935,7 +935,7 @@ void SubControlRoom::setControlMonitorToTime(const TimeValue newTime, const int } void SubControlRoom::playControlMonitorSection(const TimeValue in, const TimeValue out, const NotificationFlags flags, - const int newState, const bool shouldAllowInput) { + const int newState, const bool shouldAllowInput) { _subControlMovie.stop(); _subControlMovie.setSegment(in, out); _subControlMovie.setTime(in); @@ -975,7 +975,7 @@ void SubControlRoom::setClawMonitorToTime(const TimeValue newTime) { } void SubControlRoom::playClawMonitorSection(const TimeValue in, const TimeValue out, const NotificationFlags flags, - const int newState, const bool shouldAllowInput) { + const int newState, const bool shouldAllowInput) { _clawMonitorMovie.stop(); _clawMonitorMovie.setSegment(in, out); _clawMonitorMovie.setTime(in); diff --git a/engines/pegasus/neighborhood/norad/subcontrolroom.h b/engines/pegasus/neighborhood/norad/subcontrolroom.h index 3ee729b302..6ce599db42 100644 --- a/engines/pegasus/neighborhood/norad/subcontrolroom.h +++ b/engines/pegasus/neighborhood/norad/subcontrolroom.h @@ -52,7 +52,7 @@ public: bool canSolve(); void doSolve(); -protected: +protected: virtual void openInteraction(); virtual void initInteraction(); virtual void closeInteraction(); @@ -82,12 +82,12 @@ protected: void setControlMonitorToTime(const TimeValue, const int, const bool); void playControlMonitorSection(const TimeValue, const TimeValue, const NotificationFlags, const int, const bool); - + void updateClawMonitor(); void setClawMonitorToTime(const TimeValue); void playClawMonitorSection(const TimeValue, const TimeValue, const NotificationFlags, const int, const bool); - + Movie _subControlMovie; TimeScale _subControlScale; Notification _subControlNotification; diff --git a/engines/pegasus/neighborhood/norad/subplatform.cpp b/engines/pegasus/neighborhood/norad/subplatform.cpp index bfe93ea22c..97079a9f53 100644 --- a/engines/pegasus/neighborhood/norad/subplatform.cpp +++ b/engines/pegasus/neighborhood/norad/subplatform.cpp @@ -81,7 +81,7 @@ void SubPlatform::openInteraction() { _platformMovie.startDisplaying(); _platformCallBack.setNotification(&_platformNotification); _platformCallBack.initCallBack(&_platformMovie, kCallBackAtExtremes); - + _platformNotification.notifyMe(this, kPlatformNotificationFlags, kPlatformNotificationFlags); } @@ -135,12 +135,12 @@ void SubPlatform::receiveNotification(Notification *notification, const Notifica _platformMovie.stopDisplaying(); owner->getExtraEntry(kNorad19ExitToSub, entry); - + loop1Spec.makeTwoKnotFaderSpec(kNoradAlphaMovieScale, 0, kNoradWarningVolume, entry.movieEnd - entry.movieStart, 0); loop1Spec.insertFaderKnot(4560, kNoradWarningVolume); loop1Spec.insertFaderKnot(5080, 0); - + loop2Spec.makeTwoKnotFaderSpec(kNoradAlphaMovieScale, 0, kNoradSuckWindVolume, entry.movieEnd - entry.movieStart, 0); loop1Spec.insertFaderKnot(4560, kNoradSuckWindVolume); @@ -176,7 +176,7 @@ void SubPlatform::activateHotspots() { GameInteraction::activateHotspots(); } -void SubPlatform::clickInHotspot(const Input &input, const Hotspot *spot) { +void SubPlatform::clickInHotspot(const Input &input, const Hotspot *spot) { if (spot->getObjectID() == kNorad19ActivateMonitorSpotID) { if (GameState.getNoradSubPrepState() == kSubDamaged) { _platformMovie.setSegment(kDamagedStart * _platformScale, kDamagedStop * _platformScale); @@ -195,7 +195,7 @@ void SubPlatform::clickInHotspot(const Input &input, const Hotspot *spot) { _platformMovie.redrawMovieWorld(); _stateBits &= ~kWaitingForPlayerBit; - + allowInput(false); } else { GameInteraction::clickInHotspot(input, spot); diff --git a/engines/pegasus/neighborhood/norad/subplatform.h b/engines/pegasus/neighborhood/norad/subplatform.h index a83487db23..82e86ecae2 100644 --- a/engines/pegasus/neighborhood/norad/subplatform.h +++ b/engines/pegasus/neighborhood/norad/subplatform.h @@ -47,9 +47,9 @@ protected: virtual void activateHotspots(); virtual void clickInHotspot(const Input &, const Hotspot *); - + virtual void receiveNotification(Notification *, const NotificationFlags); - + Movie _platformMovie; TimeScale _platformScale; Notification _platformNotification; diff --git a/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp b/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp index 11e28f072d..814d7717de 100644 --- a/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp +++ b/engines/pegasus/neighborhood/prehistoric/prehistoric.cpp @@ -85,7 +85,7 @@ uint16 Prehistoric::getDateResID() const { void Prehistoric::init() { Neighborhood::init(); - + // Forces a stop so the flashlight can turn off... forceStridingStop(kPrehistoric12, kSouth, kNoAlternateID); } @@ -105,7 +105,7 @@ class FinishPrehistoricAction : public AIPlayMessageAction { public: FinishPrehistoricAction() : AIPlayMessageAction("Images/AI/Prehistoric/XP25W", false) {} ~FinishPrehistoricAction() {} - + void performAIAction(AIRule *); }; @@ -130,36 +130,36 @@ void Prehistoric::setUpAIRules() { locCondition->addLocation(MakeRoomView(kPrehistoric16, kNorth)); AIRule *rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP2SB", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kPrehistoric01, kSouth)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP2SB", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kPrehistoric08, kEast)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP2SB", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kPrehistoric25, kWest)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP16NB", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kPrehistoric23, kNorth)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP18NB", false); AITimerCondition *timerCondition = new AITimerCondition(kPrehistoricWarningTimeLimit, 1, true); rule = new AIRule(timerCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Prehistoric/XP25W", false); AIHasItemCondition *hasLogCondition = new AIHasItemCondition(kHistoricalLog); rule = new AIRule(hasLogCondition, messageAction); @@ -191,7 +191,7 @@ TimeValue Prehistoric::getViewTime(const RoomID room, const DirectionConstant di if (extraID == 0xffffffff) return Neighborhood::getViewTime(room, direction); - + getExtraEntry(extraID, extra); return extra.movieEnd - 1; } @@ -322,7 +322,7 @@ void Prehistoric::checkContinuePoint(const RoomID room, const DirectionConstant void Prehistoric::arriveAt(const RoomID room, const DirectionConstant direction) { Item *keyCard; - + if (MakeRoomView(room, direction) == MakeRoomView(kPrehistoric25, kEast) && _privateFlags.getFlag(kPrehistoricPrivateExtendedBridgeFlag)) { _navMovie.stop(); @@ -398,7 +398,7 @@ void Prehistoric::arriveAt(const RoomID room, const DirectionConstant direction) void Prehistoric::loadAmbientLoops() { RoomID room = GameState.getCurrentRoom(); - + switch (room) { case kPrehistoric02: // 1/4 volume. @@ -592,7 +592,7 @@ Common::String Prehistoric::getEnvScanMovie() { uint Prehistoric::getNumHints() { uint numHints = Neighborhood::getNumHints(); - + if (numHints == 0) { switch (GameState.getCurrentRoomAndView()) { case MakeRoomView(kPrehistoric18, kEast): diff --git a/engines/pegasus/neighborhood/prehistoric/prehistoric.h b/engines/pegasus/neighborhood/prehistoric/prehistoric.h index 2750fc0ee8..17f9993014 100644 --- a/engines/pegasus/neighborhood/prehistoric/prehistoric.h +++ b/engines/pegasus/neighborhood/prehistoric/prehistoric.h @@ -104,10 +104,10 @@ class Prehistoric : public Neighborhood { public: Prehistoric(InputHandler *, PegasusEngine *); virtual ~Prehistoric() {} - + virtual uint16 getDateResID() const; virtual void init(); - + virtual void arriveAt(const RoomID, const DirectionConstant); virtual void activateHotspots(); virtual void clickInHotspot(const Input &, const Hotspot *); @@ -146,7 +146,7 @@ protected: void findSpotEntry(const RoomID, const DirectionConstant, SpotFlags, SpotTable::Entry &); void loadAmbientLoops(); - + FlagsArray<byte, kNumPrehistoricPrivateFlags> _privateFlags; Common::String getNavMovieName(); diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.cpp b/engines/pegasus/neighborhood/tsa/fulltsa.cpp index 98c70aa09d..b598841b45 100644 --- a/engines/pegasus/neighborhood/tsa/fulltsa.cpp +++ b/engines/pegasus/neighborhood/tsa/fulltsa.cpp @@ -531,20 +531,20 @@ enum { kMonitorMarsComparison = 5, kMonitorCaldoriaComparison = 6, kMonitorWSCComparison = 7, - + kRawModeMask = 0x0F, kPlayingTBPMask = 0x10, kPlayingLeftComparisonMask = 0x20, kPlayingRightComparisonMask = 0x40, - + kPlayingAnyMask = kPlayingTBPMask | kPlayingLeftComparisonMask | kPlayingRightComparisonMask, - + kMonitorPlayingTheory = kMonitorTheory | kPlayingTBPMask, kMonitorPlayingProcedure = kMonitorProcedure | kPlayingTBPMask, kMonitorPlayingBackground = kMonitorBackground | kPlayingTBPMask, - + kMonitorPlayingLeftNoradComparison = kMonitorNoradComparison | kPlayingLeftComparisonMask, kMonitorPlayingRightNoradComparison = kMonitorNoradComparison | @@ -594,7 +594,7 @@ static const int kRedirectionNewTargetSprite = 1; void RipTimer::initImage() { _middle = -1; - + _timerImage.getImageFromPICTResource(((PegasusEngine *)g_engine)->_resFork, kLeftRipPICTID); Common::Rect r; @@ -643,7 +643,7 @@ FullTSA::FullTSA(InputHandler *nextHandler, PegasusEngine *owner) : Neighborhood setIsItemTaken(kMapBiochip); } -void FullTSA::init() { +void FullTSA::init() { Neighborhood::init(); _ripTimer.setDisplayOrder(kRipTimerOrder); _ripTimer.startDisplaying(); @@ -657,7 +657,7 @@ void FullTSA::init() { _sprite2.startDisplaying(); _sprite3.setDisplayOrder(kMonitorLayer); _sprite3.startDisplaying(); - + // Fix a mistake in the world builder tables. HotspotInfoTable::Entry *entry = findHotspotEntry(kTSA23WestChipsSpotID); entry->hotspotItem = kPegasusBiochip; @@ -690,7 +690,7 @@ void FullTSA::flushGameState() { GameState.setTSAFuseTimeLimit(_utilityFuse.getTimeRemaining()); } -Common::String FullTSA::getBriefingMovie() { +Common::String FullTSA::getBriefingMovie() { Common::String movieName = Neighborhood::getBriefingMovie(); if (movieName.empty()) { @@ -762,7 +762,7 @@ Common::String FullTSA::getEnvScanMovie() { if (GameState.getCurrentRoom() == kTSA37) { g_AIChip->showEnvScanClicked(); startExtraSequenceSync(kTSA37EnvironmentalScan, kHintInterruption); - + switch (getCurrentActivation()) { case kActivationJumpToPrehistoric: startExtraSequenceSync(kTSA37AI2ToPrehistoric, kFilterNoInput); @@ -819,7 +819,7 @@ Common::String FullTSA::getHintMovie(uint hintNum) { if (movieName.empty()) movieName = Common::String::format("Images/AI/TSA/XT20NH%d", hintNum); - + return movieName; } @@ -965,7 +965,7 @@ void FullTSA::getExitCompassMove(const ExitTable::Entry &exitEntry, FaderMoveSpe void FullTSA::getExtraCompassMove(const ExtraTable::Entry &extraEntry, FaderMoveSpec &compassMove) { int16 angle; - + switch (extraEntry.extra) { case kTSA0BEastTurnLeft: case kTSA0BNorthTurnLeft: @@ -1007,7 +1007,7 @@ uint16 FullTSA::getDateResID() const { TimeValue FullTSA::getViewTime(const RoomID room, const DirectionConstant direction) { ExtraID extraID = 0xffffffff; - + switch (MakeRoomView(room, direction)) { case MakeRoomView(kTSA0B, kEast): if (GameState.getTSA0BZoomedIn()) @@ -1102,7 +1102,7 @@ void FullTSA::getExtraEntry(const uint32 id, ExtraTable::Entry &extraEntry) { void FullTSA::pickedUpItem(Item *item) { BiochipItem *biochip; - + switch (item->getObjectID()) { case kJourneymanKey: GameState.setScoringGotJourneymanKey(true); @@ -1363,7 +1363,7 @@ void FullTSA::activateHotspots() { } } -void FullTSA::clickInHotspot(const Input &input, const Hotspot *clickedSpot) { +void FullTSA::clickInHotspot(const Input &input, const Hotspot *clickedSpot) { switch (clickedSpot->getObjectID()) { case kTSAGTOtherSpotID: showExtraView(kTSAGTOtherChoice); @@ -1417,7 +1417,7 @@ void FullTSA::clickInHotspot(const Input &input, const Hotspot *clickedSpot) { case kTSA0BEastRightPlaySpotID: playRightComparison(); break; - + // Command center case kTSA0BWestTheorySpotID: initializeTBPMonitor(kMonitorTheory, kTSA0BTBPTheoryHighlight); @@ -1555,7 +1555,7 @@ void FullTSA::clickInHotspot(const Input &input, const Hotspot *clickedSpot) { _sprite2.setCurrentFrameIndex(1); _vm->delayShell(1, 2); releaseSprites(); - break; + break; case kTSA37NorthJumpToNoradSpotID: GameState.setTSAState(kPlayerOnWayToNorad); requestExtraSequence(kTSA37JumpToNorad, 0, kFilterNoInput); @@ -1620,7 +1620,7 @@ void FullTSA::showMainJumpMenu() { void FullTSA::playTBPMonitor() { InputDevice.waitInput(kFilterAllButtons); - + if ((GameState.getT0BMonitorMode() & kPlayingTBPMask) == 0) { ExtraID extra; @@ -1706,7 +1706,7 @@ void FullTSA::startUpComparisonMonitor() { _sprite1.setCurrentFrameIndex(0); _sprite1.moveElementTo(kComparisonHiliteSpriteLeft, kComparisonHiliteSpriteTop); - + _sprite2.addPICTResourceFrame(kComparisonChancesNoradPICTID, false, kComparisonChancesNoradLeft - kComparisonChancesSpriteLeft, kComparisonChancesNoradTop - kComparisonChancesSpriteTop); @@ -1823,9 +1823,9 @@ void FullTSA::playLeftComparison() { } } -void FullTSA::playRightComparison() { +void FullTSA::playRightComparison() { InputDevice.waitInput(kFilterAllButtons); - + if ((GameState.getT0BMonitorMode() & kPlayingRightComparisonMask) == 0) { ExtraID extra; @@ -2348,7 +2348,7 @@ void FullTSA::closeDoorOffScreen(const RoomID room, const DirectionConstant) { } } -void FullTSA::receiveNotification(Notification *notification, const NotificationFlags flags) { +void FullTSA::receiveNotification(Notification *notification, const NotificationFlags flags) { ExtraID lastExtra = _lastExtra; if ((flags & kExtraCompletedFlag) != 0) { @@ -2417,7 +2417,7 @@ void FullTSA::receiveNotification(Notification *notification, const Notification case kTSA05WhiteZoomIn: GameState.setScoringSawBust6(true); break; - + // Command center // Historical comparison... case kTSA0BEastZoomIn: @@ -2468,7 +2468,7 @@ void FullTSA::receiveNotification(Notification *notification, const Notification case kTSA0BWSCUnaltered: initializeComparisonMonitor(kMonitorNeutral, 0); break; - + // Center monitor. case kTSA0BNorthZoomIn: GameState.setTSA0BZoomedIn(true); @@ -2528,7 +2528,7 @@ void FullTSA::receiveNotification(Notification *notification, const Notification _sprite2.setCurrentFrameIndex(kRedirectionSecuredSprite); _sprite2.show(); break; - + // TBP monitor. case kTSA0BWestZoomIn: GameState.setTSA0BZoomedIn(true); @@ -2562,7 +2562,7 @@ void FullTSA::receiveNotification(Notification *notification, const Notification case kTSA0BTBPProcedure: initializeTBPMonitor(kMonitorNeutral, 0); break; - + // Ready room case kTSA22RedEastZoomInSequence: _privateFlags.setFlag(kTSAPrivateKeyVaultOpenFlag, true); @@ -2846,7 +2846,7 @@ void FullTSA::dropItemIntoRoom(Item *item, Hotspot *dropSpot) { uint FullTSA::getHistoricalLogIndex() { uint index; - + if (GameState.getTSASeenNoradNormal() && GameState.getTSASeenNoradAltered()) index = 8; else diff --git a/engines/pegasus/neighborhood/tsa/fulltsa.h b/engines/pegasus/neighborhood/tsa/fulltsa.h index 7dd11a766c..a646d57e6c 100644 --- a/engines/pegasus/neighborhood/tsa/fulltsa.h +++ b/engines/pegasus/neighborhood/tsa/fulltsa.h @@ -42,7 +42,7 @@ public: protected: void timeChanged(const TimeValue); - + CoordType _middle; Surface _timerImage; }; diff --git a/engines/pegasus/neighborhood/tsa/tinytsa.cpp b/engines/pegasus/neighborhood/tsa/tinytsa.cpp index 2fa6c5377a..4f109620c1 100644 --- a/engines/pegasus/neighborhood/tsa/tinytsa.cpp +++ b/engines/pegasus/neighborhood/tsa/tinytsa.cpp @@ -282,7 +282,7 @@ void TinyTSA::arriveAt(const RoomID room, const DirectionConstant direction) { void TinyTSA::receiveNotification(Notification *notification, const NotificationFlags flags) { ExtraID lastExtra = _lastExtra; - + Neighborhood::receiveNotification(notification, flags); if ((flags & kExtraCompletedFlag) != 0) { diff --git a/engines/pegasus/neighborhood/tsa/tinytsa.h b/engines/pegasus/neighborhood/tsa/tinytsa.h index db74206d4f..2dc234675d 100644 --- a/engines/pegasus/neighborhood/tsa/tinytsa.h +++ b/engines/pegasus/neighborhood/tsa/tinytsa.h @@ -38,11 +38,11 @@ class TinyTSA : public Neighborhood { public: TinyTSA(InputHandler *, PegasusEngine *); virtual ~TinyTSA() {} - + virtual uint16 getDateResID() const; - + void start(); - + void checkContinuePoint(const RoomID, const DirectionConstant); protected: @@ -50,13 +50,13 @@ protected: Common::String getEnvScanMovie(); void loadAmbientLoops(); virtual void clickInHotspot(const Input &, const Hotspot *); - + virtual int16 getStaticCompassAngle(const RoomID, const DirectionConstant); - + void arriveFromNorad(); void arriveFromMars(); void arriveFromWSC(); - + InputBits getInputFilter(); void arriveAt(const RoomID, const DirectionConstant); void showMainJumpMenu(); diff --git a/engines/pegasus/neighborhood/wsc/wsc.cpp b/engines/pegasus/neighborhood/wsc/wsc.cpp index 8e5f2e2ca4..f3bf113333 100644 --- a/engines/pegasus/neighborhood/wsc/wsc.cpp +++ b/engines/pegasus/neighborhood/wsc/wsc.cpp @@ -481,7 +481,7 @@ WSC::WSC(InputHandler *nextHandler, PegasusEngine *owner) : Neighborhood(nextHan setIsItemTaken(kAntidote); setIsItemTaken(kMachineGun); setIsItemTaken(kStunGun); - + GameState.setTakenItemID(kArgonPickup, GameState.isTakenItemID(kArgonCanister) && GameState.isTakenItemID(kSinclairKey)); } @@ -492,10 +492,10 @@ uint16 WSC::getDateResID() const { void WSC::init() { Neighborhood::init(); - + _cachedZoomSpot = 0; _argonSprite = 0; - + // HACK: Fix the drag item for picking up the Sinclair Key Card HotspotInfoTable::Entry *entry = findHotspotEntry(kWSC02SouthTakeArgonSpotID); entry->hotspotItem = kArgonPickup; @@ -512,10 +512,10 @@ void WSC::start() { _vm->resetEnergyDeathReason(); g_energyMonitor->startEnergyDraining(); } - + if (!GameState.getWSCDidPlasmaDodge()) forceStridingStop(kWSC58, kSouth, kAltWSCNormal); - + Neighborhood::start(); } @@ -547,59 +547,59 @@ void WSC::setUpAIRules() { locCondition->addLocation(MakeRoomView(kWSC06, kNorth)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Globals/XGLOB5A", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC10, kWest)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Globals/XGLOB5A", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC28, kWest)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Globals/XGLOB5A", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC49, kWest)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Globals/XGLOB5A", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC65, kSouth)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Globals/XGLOB5A", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC73, kSouth)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Globals/XGLOB5A", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC79, kWest)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/WSC/XW59SD1", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC58, kSouth)); rule = new AIRule(locCondition, messageAction); g_AIArea->addAIRule(rule); - + PryDoorMessage *pryDoorMessage = new PryDoorMessage(); AIDoorOpenedCondition *doorCondition = new AIDoorOpenedCondition(MakeRoomView(kWSC58, kSouth)); rule = new AIRule(doorCondition, pryDoorMessage); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/WSC/XW61E", false); AIHasItemCondition *itemCondition = new AIHasItemCondition(kMachineGun); rule = new AIRule(itemCondition, messageAction); g_AIArea->addAIRule(rule); - + messageAction = new AIPlayMessageAction("Images/AI/Globals/XGLOB1E", false); locCondition = new AILocationCondition(1); locCondition->addLocation(MakeRoomView(kWSC95, kWest)); @@ -614,7 +614,7 @@ Common::String WSC::getBriefingMovie() { Common::String WSC::getEnvScanMovie() { RoomID room = GameState.getCurrentRoom(); - + if (room >= kWSC01 && room <= kWSC04) return "Images/AI/WSC/XWE1"; else if (room >= kWSC06 && room <= kWSC58) @@ -831,7 +831,7 @@ void WSC::cleanUpAfterAIHint(const Common::String &movieName) { resumeTimer(); } -bool WSC::okayToJump() { +bool WSC::okayToJump() { if (GameState.getWSCPoisoned()) { die(kDeathDidntStopPoison); return false; @@ -1427,7 +1427,7 @@ void WSC::checkContinuePoint(const RoomID room, const DirectionConstant directio } } -void WSC::arriveAt(const RoomID room, const DirectionConstant dir) { +void WSC::arriveAt(const RoomID room, const DirectionConstant dir) { switch (MakeRoomView(room, dir)) { case MakeRoomView(kWSC60, kNorth): case MakeRoomView(kWSC60, kSouth): @@ -1537,7 +1537,7 @@ void WSC::arriveAt(const RoomID room, const DirectionConstant dir) { if (!GameState.getWSCSeenSinclairLecture()) { GameState.setWSCSeenSinclairLecture(true); startExtraSequence(kW65SouthSinclairLecture, kExtraCompletedFlag, kFilterAllInput); - } + } break; case MakeRoomView(kWSC66, kWest): case MakeRoomView(kWSC67, kEast): @@ -1647,7 +1647,7 @@ void WSC::turnTo(const DirectionConstant direction) { void WSC::receiveNotification(Notification *notification, const NotificationFlags flags) { int32 currentEnergy; Item *item; - + if (flags & kExtraCompletedFlag) { _interruptionFilter = kFilterAllInput; @@ -2195,7 +2195,7 @@ void WSC::clickInHotspot(const Input &input, const Hotspot *clickedSpot) { } else { Neighborhood::clickInHotspot(input, clickedSpot); } - + GameState.setEasterEgg(false); } @@ -2295,7 +2295,7 @@ void WSC::takeItemFromRoom(Item *item) { Hotspot *WSC::getItemScreenSpot(Item *item, DisplayElement *element) { HotSpotID destSpotID; - + switch (item->getObjectID()) { case kNitrogenCanister: destSpotID = kWSC02SouthTakeNitrogenSpotID; @@ -2329,7 +2329,7 @@ Hotspot *WSC::getItemScreenSpot(Item *item, DisplayElement *element) { return _vm->getAllHotspots().findHotspotByID(destSpotID); } -void WSC::pickedUpItem(Item *item) { +void WSC::pickedUpItem(Item *item) { switch (item->getObjectID()) { case kAntidote: if (!GameState.getWSCPickedUpAntidote()) { diff --git a/engines/pegasus/neighborhood/wsc/wsc.h b/engines/pegasus/neighborhood/wsc/wsc.h index e2e931ecdc..d9634b3539 100644 --- a/engines/pegasus/neighborhood/wsc/wsc.h +++ b/engines/pegasus/neighborhood/wsc/wsc.h @@ -51,12 +51,12 @@ public: bool okayToJump(); void checkContinuePoint(const RoomID, const DirectionConstant); - + bool inSynthesizerGame(); - + bool canSolve(); void doSolve(); - + virtual void prepareForAIHint(const Common::String &); virtual void cleanUpAfterAIHint(const Common::String &); @@ -66,7 +66,7 @@ public: protected: enum { kWSCDraggingAntidoteFlag, - + kWSCPrivateLabMessagesOpenFlag, kWSCPrivateInterruptedMorphFlag, kWSCPrivateInMoleculeGameFlag, @@ -75,7 +75,7 @@ protected: kWSCPrivate58SouthOpenFlag, kWSCPrivateClickedCatwalkCableFlag, kWSCPrivateRobotHeadOpenFlag, - + kWSCPrivateSeenPeopleAt17WestFlag, kWSCPrivateSeenPeopleAt19NorthFlag, kWSCPrivateSeenPeopleAt21SouthFlag, @@ -86,7 +86,7 @@ protected: kWSCPrivateSeenPeopleAt46SouthFlag, kWSCPrivateSeenPeopleAt49NorthFlag, kWSCPrivateSeenPeopleAt73WestFlag, - + kWSCPrivateNeedPeopleAt17WestFlag, kWSCPrivateNeedPeopleAt21SouthFlag, kWSCPrivateNeedPeopleAt24SouthFlag, @@ -96,11 +96,11 @@ protected: kWSCPrivateNeedPeopleAt46SouthFlag, kWSCPrivateNeedPeopleAt49NorthFlag, kWSCPrivateNeedPeopleAt73WestFlag, - + kWSCPrivateGotRetScanChipFlag, kWSCPrivateGotMapChipFlag, kWSCPrivateGotOpticalChipFlag, - + kNumWSCPrivateFlags }; diff --git a/engines/pegasus/notification.cpp b/engines/pegasus/notification.cpp index 4179afa70d..2d57fcc5e7 100644 --- a/engines/pegasus/notification.cpp +++ b/engines/pegasus/notification.cpp @@ -78,7 +78,7 @@ void Notification::setNotificationFlags(NotificationFlags flags, NotificationFla _currentFlags = (_currentFlags & ~mask) | flags; } -void Notification::checkReceivers() { +void Notification::checkReceivers() { NotificationFlags currentFlags = _currentFlags; _currentFlags = kNoNotificationFlags; diff --git a/engines/pegasus/notification.h b/engines/pegasus/notification.h index e795a4b375..19b69829be 100644 --- a/engines/pegasus/notification.h +++ b/engines/pegasus/notification.h @@ -67,15 +67,15 @@ public: void notifyMe(NotificationReceiver*, NotificationFlags flags, NotificationFlags mask); void cancelNotification(NotificationReceiver *receiver); - + void setNotificationFlags(NotificationFlags flags, NotificationFlags mask); NotificationFlags getNotificationFlags() { return _currentFlags; } - + void clearNotificationFlags() { setNotificationFlags(0, ~(NotificationFlags)0); } protected: void checkReceivers(); - + NotificationManager *_owner; ReceiverList _receivers; NotificationFlags _currentFlags; @@ -87,11 +87,11 @@ friend class Notification; public: NotificationReceiver(); virtual ~NotificationReceiver(); - + protected: // receiveNotification is called automatically whenever a notification that this // receiver depends on has its flags set - + virtual void receiveNotification(Notification *, const NotificationFlags); virtual void newNotification(Notification *notification); @@ -107,14 +107,14 @@ friend class Notification; public: NotificationManager(); virtual ~NotificationManager(); - + void checkNotifications(); protected: void addNotification(Notification *notification); void removeNotification(Notification *notification); void detachNotifications(); - + NotificationList _notifications; }; diff --git a/engines/pegasus/pegasus.cpp b/engines/pegasus/pegasus.cpp index 29aa8a440b..81e8058628 100644 --- a/engines/pegasus/pegasus.cpp +++ b/engines/pegasus/pegasus.cpp @@ -121,7 +121,7 @@ Common::Error PegasusEngine::run() { _resFork = new Common::MacResManager(); _cursor = new Cursor(); _rnd = new Common::RandomSource("Pegasus"); - + if (!_resFork->open("JMP PP Resources") || !_resFork->hasResFork()) error("Could not load JMP PP Resources"); @@ -276,7 +276,7 @@ void PegasusEngine::createItem(ItemID itemID, NeighborhoodID neighborhoodID, Roo break; case kShieldBiochip: new ShieldChip(itemID, neighborhoodID, roomID, direction); - break; + break; case kAirMask: new AirMask(itemID, neighborhoodID, roomID, direction); break; @@ -1387,7 +1387,7 @@ void PegasusEngine::setGameMode(const GameMode newMode) { void PegasusEngine::switchGameMode(const GameMode newMode, const GameMode oldMode) { // Start raising panels before lowering panels, to give the activating panel time // to set itself up without cutting into the lowering panel's animation time. - + if (_switchModesSync) { if (newMode == kModeInventoryPick) raiseInventoryDrawerSync(); @@ -1395,7 +1395,7 @@ void PegasusEngine::switchGameMode(const GameMode newMode, const GameMode oldMod raiseBiochipDrawerSync(); else if (newMode == kModeInfoScreen) showInfoScreen(); - + if (oldMode == kModeInventoryPick) lowerInventoryDrawerSync(); else if (oldMode == kModeBiochipPick) @@ -1409,7 +1409,7 @@ void PegasusEngine::switchGameMode(const GameMode newMode, const GameMode oldMod raiseBiochipDrawer(); else if (newMode == kModeInfoScreen) showInfoScreen(); - + if (oldMode == kModeInventoryPick) lowerInventoryDrawer(); else if (oldMode == kModeBiochipPick) @@ -1431,7 +1431,7 @@ bool PegasusEngine::itemInLocation(const ItemID itemID, const NeighborhoodID nei NeighborhoodID itemNeighborhood; RoomID itemRoom; DirectionConstant itemDirection; - + Item *item = _allItems.findItemByID(itemID); item->getItemRoom(itemNeighborhood, itemRoom, itemDirection); @@ -1440,7 +1440,7 @@ bool PegasusEngine::itemInLocation(const ItemID itemID, const NeighborhoodID nei InventoryResult PegasusEngine::addItemToInventory(InventoryItem *item) { InventoryResult result; - + do { if (g_interface) result = g_interface->addInventoryItem(item); @@ -1504,12 +1504,12 @@ void PegasusEngine::performJump(NeighborhoodID neighborhoodID) { void PegasusEngine::startNeighborhood() { if (g_interface && _currentItemID != kNoItemID) g_interface->setCurrentInventoryItemID(_currentItemID); - + if (g_interface && _currentBiochipID != kNoItemID) g_interface->setCurrentBiochipID(_currentBiochipID); - + setGameMode(kModeNavigation); - + if (_neighborhood) _neighborhood->start(); } @@ -1566,9 +1566,9 @@ void PegasusEngine::startNewGame() { // Clear jump notification flags and just perform the jump... _shellNotification.setNotificationFlags(0, kNeedNewJumpFlag); - + performJump(GameState.getNextNeighborhood()); - + startNeighborhood(); } @@ -1610,7 +1610,7 @@ bool PegasusEngine::wantsCursor() { return _gameMenu == 0; } -void PegasusEngine::updateCursor(const Common::Point, const Hotspot *cursorSpot) { +void PegasusEngine::updateCursor(const Common::Point, const Hotspot *cursorSpot) { if (_itemDragger.isTracking()) { _cursor->setCurrentFrameIndex(5); } else { @@ -1658,14 +1658,14 @@ void PegasusEngine::toggleBiochipDisplay() { setGameMode(kModeBiochipPick); } -void PegasusEngine::showInfoScreen() { +void PegasusEngine::showInfoScreen() { if (g_neighborhood) { // Break the input handler chain... _savedHandler = InputHandler::getCurrentHandler(); InputHandler::setInputHandler(this); - + Picture *pushPicture = ((Neighborhood *)g_neighborhood)->getTurnPushPicture(); - + _bigInfoMovie.shareSurface(pushPicture); _smallInfoMovie.shareSurface(pushPicture); @@ -1805,7 +1805,7 @@ void PegasusEngine::dragTerminated(const Input &) { } -void PegasusEngine::dragItem(const Input &input, Item *item, DragType type) { +void PegasusEngine::dragItem(const Input &input, Item *item, DragType type) { _draggingItem = item; _dragType = type; @@ -1918,7 +1918,7 @@ void PegasusEngine::clickInHotspot(const Input &input, const Hotspot *clickedSpo InventoryResult PegasusEngine::removeItemFromInventory(InventoryItem *item) { InventoryResult result; - + if (g_interface) result = g_interface->removeInventoryItem(item); else @@ -2006,7 +2006,7 @@ void PegasusEngine::pauseMenu(bool menuUp) { } } -void PegasusEngine::autoDragItemIntoRoom(Item *item, Sprite *draggingSprite) { +void PegasusEngine::autoDragItemIntoRoom(Item *item, Sprite *draggingSprite) { if (g_AIArea) g_AIArea->lockAIOut(); @@ -2048,7 +2048,7 @@ void PegasusEngine::autoDragItemIntoRoom(Item *item, Sprite *draggingSprite) { g_AIArea->unlockAI(); } -void PegasusEngine::autoDragItemIntoInventory(Item *, Sprite *draggingSprite) { +void PegasusEngine::autoDragItemIntoInventory(Item *, Sprite *draggingSprite) { if (g_AIArea) g_AIArea->lockAIOut(); @@ -2108,7 +2108,7 @@ uint PegasusEngine::getRandomNumber(uint max) { return _rnd->getRandomNumber(max); } -void PegasusEngine::shuffleArray(int32 *arr, int32 count) { +void PegasusEngine::shuffleArray(int32 *arr, int32 count) { if (count > 1) { for (int32 i = 1; i < count; ++i) { int32 j = _rnd->getRandomNumber(i); @@ -2248,7 +2248,7 @@ void PegasusEngine::destroyInventoryItem(const ItemID itemID) { ItemID PegasusEngine::pickItemToDestroy() { /* Must pick an item to destroy - + Part I: Polite -- try to find an item that's been used Part II: Desperate -- return the first available item. */ diff --git a/engines/pegasus/pegasus.h b/engines/pegasus/pegasus.h index b43000a45e..2a8ba22470 100644 --- a/engines/pegasus/pegasus.h +++ b/engines/pegasus/pegasus.h @@ -119,7 +119,7 @@ public: int32 getSavedEnergyValue() { return _savedEnergyValue; } // Death - void setEnergyDeathReason(const DeathReason reason) { _deathReason = reason; } + void setEnergyDeathReason(const DeathReason reason) { _deathReason = reason; } DeathReason getEnergyDeathReason() { return _deathReason; } void resetEnergyDeathReason(); void die(const DeathReason); diff --git a/engines/pegasus/surface.cpp b/engines/pegasus/surface.cpp index 343bc415f3..e9e0958f9d 100644 --- a/engines/pegasus/surface.cpp +++ b/engines/pegasus/surface.cpp @@ -92,7 +92,7 @@ void Surface::getImageFromPICTResource(Common::MacResManager *resFork, uint16 id Common::SeekableReadStream *res = resFork->getResource(MKTAG('P', 'I', 'C', 'T'), id); if (!res) error("Could not open PICT resource %d from '%s'", id, resFork->getBaseFileName().c_str()); - + getImageFromPICTStream(res); delete res; } diff --git a/engines/pegasus/surface.h b/engines/pegasus/surface.h index 311fb50419..4588146fb4 100644 --- a/engines/pegasus/surface.h +++ b/engines/pegasus/surface.h @@ -52,7 +52,7 @@ class Surface { public: Surface(); virtual ~Surface(); - + virtual void allocateSurface(const Common::Rect &); virtual void deallocateSurface(); virtual void shareSurface(Surface *surface); @@ -99,7 +99,7 @@ public: protected: virtual void setTransparent(bool transparent) { _transparent = transparent; } - + bool _transparent; }; diff --git a/engines/pegasus/timers.cpp b/engines/pegasus/timers.cpp index d03ce917ed..3b875038cc 100644 --- a/engines/pegasus/timers.cpp +++ b/engines/pegasus/timers.cpp @@ -68,7 +68,7 @@ TimeBase::TimeBase(const TimeScale preferredScale) { _master = 0; _pausedRate = 0; _pauseStart = 0; - + ((PegasusEngine *)g_engine)->addTimeBase(this); } @@ -286,12 +286,12 @@ void TimeBase::addCallBack(TimeBaseCallBack *callBack) { _callBackList = callBack; } -void TimeBase::removeCallBack(TimeBaseCallBack *callBack) { +void TimeBase::removeCallBack(TimeBaseCallBack *callBack) { if (_callBackList == callBack) { _callBackList = callBack->_nextCallBack; } else { TimeBaseCallBack *runner, *prevRunner; - + for (runner = _callBackList->_nextCallBack, prevRunner = _callBackList; runner != callBack; prevRunner = runner, runner = runner->_nextCallBack) ; @@ -303,7 +303,7 @@ void TimeBase::removeCallBack(TimeBaseCallBack *callBack) { void TimeBase::disposeAllCallBacks() { TimeBaseCallBack *nextRunner; - + for (TimeBaseCallBack *runner = _callBackList; runner != 0; runner = nextRunner) { nextRunner = runner->_nextCallBack; runner->disposeCallBack(); @@ -361,7 +361,7 @@ IdlerTimeBase::IdlerTimeBase() { startIdling(); } -void IdlerTimeBase::useIdleTime() { +void IdlerTimeBase::useIdleTime() { uint32 currentTime = getTime(); if (currentTime != _lastTime) { _lastTime = currentTime; diff --git a/engines/pegasus/timers.h b/engines/pegasus/timers.h index 5a269c2830..bcdca6e860 100644 --- a/engines/pegasus/timers.h +++ b/engines/pegasus/timers.h @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ - + #ifndef PEGASUS_TIMERS_H #define PEGASUS_TIMERS_H @@ -42,11 +42,11 @@ friend class PegasusEngine; public: Idler(); virtual ~Idler(); - + virtual void startIdling(); virtual void stopIdling(); bool isIdling() const { return _isIdling; } - + protected: virtual void useIdleTime() {} @@ -67,40 +67,40 @@ friend class TimeBaseCallBack; public: TimeBase(const TimeScale = kDefaultTimeScale); virtual ~TimeBase(); - + virtual void setTime(const TimeValue, const TimeScale = 0); virtual TimeValue getTime(const TimeScale = 0); - + virtual void setScale(const TimeScale scale) { _preferredScale = scale; } virtual TimeScale getScale() const { return _preferredScale; } - + virtual void setRate(const Common::Rational); virtual Common::Rational getRate() const { return _rate; } - + virtual void start(); virtual void stop(); virtual bool isRunning(); - + virtual void pause(); virtual void resume(); bool isPaused() const { return _paused; } - + virtual void setFlags(const uint32 flags) { _flags = flags; } virtual uint32 getFlags() const { return _flags; } - + virtual void setStart(const TimeValue, const TimeScale = 0); virtual TimeValue getStart(const TimeScale = 0) const; - + virtual void setStop(const TimeValue, const TimeScale = 0); virtual TimeValue getStop(const TimeScale = 0) const; - + virtual void setSegment(const TimeValue, const TimeValue, const TimeScale = 0); virtual void getSegment(TimeValue&, TimeValue&, const TimeScale = 0) const; - + virtual TimeValue getDuration(const TimeScale = 0) const; virtual void setMasterTimeBase(TimeBase *timeBase); - + void disposeAllCallBacks(); // ScummVM's API additions (to replace the need for actual timers) @@ -166,7 +166,7 @@ protected: virtual void callBack() = 0; TimeBase *_timeBase; - + // Owned and operated by TimeBase; TimeBaseCallBack *_nextCallBack; @@ -190,7 +190,7 @@ public: protected: virtual void useIdleTime(); virtual void timeChanged(const TimeValue) {} - + TimeValue _lastTime; }; @@ -199,15 +199,15 @@ class NotificationCallBack : public TimeBaseCallBack { public: NotificationCallBack(); virtual ~NotificationCallBack() {} - + void setNotification(Notification *notifier) { _notifier = notifier; } void setCallBackFlag(const NotificationFlags flag) { _callBackFlag = flag; } NotificationFlags getCallBackFlag() const { return _callBackFlag; } - + protected: void callBack(); - + Notification *_notifier; NotificationFlags _callBackFlag; }; diff --git a/engines/pegasus/transition.cpp b/engines/pegasus/transition.cpp index 4bcc4f0a25..1ae212df85 100644 --- a/engines/pegasus/transition.cpp +++ b/engines/pegasus/transition.cpp @@ -139,7 +139,7 @@ void Transition::setInAndOutElements(DisplayElement *inElement, DisplayElement * void Slide::draw(const Common::Rect &r) { Common::Rect oldBounds, newBounds; - + adjustSlideRects(oldBounds, newBounds); drawElements(r, oldBounds, newBounds); } diff --git a/engines/pegasus/transition.h b/engines/pegasus/transition.h index a516d58e20..84241a2bd2 100644 --- a/engines/pegasus/transition.h +++ b/engines/pegasus/transition.h @@ -38,7 +38,7 @@ class ScreenFader : public Fader { public: ScreenFader(); virtual ~ScreenFader(); - + void doFadeOutSync(const TimeValue = kOneSecondPerThirtyTicks, const TimeScale = kThirtyTicksPerSecond, bool isBlack = true); void doFadeInSync(const TimeValue = kHalfSecondPerThirtyTicks, const TimeScale = kThirtyTicksPerSecond, bool isBlack = true); @@ -62,9 +62,9 @@ class Transition : public FaderAnimation { public: Transition(const DisplayElementID id); virtual ~Transition() {} - + virtual void setBounds(const Common::Rect &); - + virtual void setInAndOutElements(DisplayElement *, DisplayElement *); DisplayElement *getInElement() { return _inPicture; } DisplayElement *getOutElement() { return _outPicture; } diff --git a/engines/pegasus/types.h b/engines/pegasus/types.h index 73a4e98491..64ab4e5bb2 100644 --- a/engines/pegasus/types.h +++ b/engines/pegasus/types.h @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ - + #ifndef PEGASUS_TYPES_H #define PEGASUS_TYPES_H @@ -53,7 +53,7 @@ enum SlideDirection { kSlideRightMask = kSlideLeftMask << 1, kSlideUpMask = kSlideRightMask << 1 << 1, kSlideDownMask = kSlideUpMask << 1, - + kSlideHorizMask = kSlideLeftMask | kSlideRightMask, kSlideVertMask = kSlideUpMask | kSlideDownMask, diff --git a/engines/pegasus/util.h b/engines/pegasus/util.h index 16425343ca..97ba1c20c3 100644 --- a/engines/pegasus/util.h +++ b/engines/pegasus/util.h @@ -40,7 +40,7 @@ class IDObject { public: IDObject(const int32 id); ~IDObject(); - + int32 getObjectID() const; private: |