diff options
Diffstat (limited to 'engines/titanic/pet_control')
31 files changed, 100 insertions, 100 deletions
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index 95438ce81e..4cdab24f6d 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -42,7 +42,7 @@ BEGIN_MESSAGE_MAP(CPetControl, CGameObject) ON_MESSAGE(TimerMsg) END_MESSAGE_MAP() -CPetControl::CPetControl() : CGameObject(), +CPetControl::CPetControl() : CGameObject(), _currentArea(PET_CONVERSATION), _inputLockCount(0), _areaLockCount(0), _areaChangeType(-1), _activeNPC(nullptr), _remoteTarget(nullptr), _hiddenRoom(nullptr), _drawBounds(20, 350, 620, 480) { @@ -68,12 +68,12 @@ void CPetControl::save(SimpleFile *file, int indent) { void CPetControl::load(SimpleFile *file) { int val = file->readNumber(); isValid(); - + if (!val) { _currentArea = (PetArea)file->readNumber(); _activeNPCName = file->readString(); _remoteTargetName = file->readString(); - + loadAreas(file, 0); } @@ -93,7 +93,7 @@ void CPetControl::setup() { bool CPetControl::isValid() { return _conversations.isValid(this) && - _rooms.isValid(this) && + _rooms.isValid(this) && _remote.isValid(this) && _inventory.isValid(this) && _starfield.isValid(this) && @@ -427,7 +427,7 @@ void CPetControl::addToInventory(CGameObject *item) { setArea(PET_INVENTORY); if (_currentArea == PET_INVENTORY) _inventory.highlightItem(item); - + makeDirty(); CPETGainedObjectMsg msg; msg.execute(item); @@ -471,7 +471,7 @@ bool CPetControl::checkNode(const CString &name) { return true; if (name == "NULL") return false; - + CViewItem *view = gameManager->getView(); if (!view) return true; @@ -558,7 +558,7 @@ bool CPetControl::isBotInView(const CString &name) const { CViewItem *view = gameManager->getView(); if (!view) return false; - + // Iterate to find NPC for (CTreeItem *child = view->getFirstChild(); child; child = child->scan(view)) { CGameObject *gameObject = dynamic_cast<CGameObject *>(child); diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index 454fc0991b..d42dff598c 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -340,12 +340,12 @@ public: * Returns true if all input is currently locked (disabled) */ bool isInputLocked() const { return _inputLockCount > 0; } - + /** * Increments the input locked count */ void incInputLocks() { ++_inputLockCount; } - + /** * Decremenst the input locked count */ @@ -364,7 +364,7 @@ public: /** * Decrement the number of PET area (tab) locks */ - void decAreaLocks() { + void decAreaLocks() { _areaLockCount = MAX(_areaLockCount - 1, 0); } diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp index 173c586fc1..58dcd57384 100644 --- a/engines/titanic/pet_control/pet_conversations.cpp +++ b/engines/titanic/pet_control/pet_conversations.cpp @@ -60,7 +60,7 @@ bool CPetConversations::reset() { _dials[0].setup(MODE_UNSELECTED, "3PetDial1", _petControl); _dials[1].setup(MODE_UNSELECTED, "3PetDial2", _petControl); _dials[2].setup(MODE_UNSELECTED, "3PetDial3", _petControl); - + _dialBackground.reset("PetDialBack", _petControl); _scrollUp.reset("PetScrollUp", _petControl); _scrollDown.reset("PetScrollDown", _petControl); @@ -334,7 +334,7 @@ bool CPetConversations::setupControl(CPetControl *petControl) { _dialBackground.setBounds(Rect(0, 0, 21, 130)); _dialBackground.translate(20, 350); - + const Rect rect1(0, 0, 22, 36); _dials[0].setBounds(rect1); _dials[0].translate(20, 359); diff --git a/engines/titanic/pet_control/pet_conversations.h b/engines/titanic/pet_control/pet_conversations.h index 3333bdc523..efb7db4277 100644 --- a/engines/titanic/pet_control/pet_conversations.h +++ b/engines/titanic/pet_control/pet_conversations.h @@ -136,7 +136,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -146,12 +146,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const; - + /** * Returns true if the object is in a valid state */ @@ -190,7 +190,7 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea); - + /** * Called when a section is being left, to switch to another area */ @@ -220,7 +220,7 @@ public: * Show the text cursor */ virtual void showCursor(); - + /** * Hide the text cursor */ diff --git a/engines/titanic/pet_control/pet_frame.cpp b/engines/titanic/pet_control/pet_frame.cpp index 7375c69436..e8244cf2d7 100644 --- a/engines/titanic/pet_control/pet_frame.cpp +++ b/engines/titanic/pet_control/pet_frame.cpp @@ -97,7 +97,7 @@ bool CPetFrame::setPetControl(CPetControl *petControl) { // Set the bounds of the individual elements _background.setBounds(Rect(20, 350, 620, 480)); _modeBackground.setBounds(Rect(590, 365, 611, 467)); - + // Squares used for holding glyphs in various tabs Rect r(35, 373, 91, 429); for (int idx = 0, xp = 0; idx < TOTAL_GLYPHS; ++idx, xp += 70) { @@ -113,7 +113,7 @@ bool CPetFrame::setPetControl(CPetControl *petControl) { _modeButtons[idx].translate(4, YLIST[idx]); } _modeButtons[PET_AREAS[0]].setMode(MODE_SELECTED); - + const int XLIST[] = { 73, 54, 85, 109, 38, 71 }; for (int idx = 0; idx < 6; ++idx) { _titles[idx].setBounds(Rect(0, 0, 110, 11)); diff --git a/engines/titanic/pet_control/pet_frame.h b/engines/titanic/pet_control/pet_frame.h index d8924e83d3..720112c1c0 100644 --- a/engines/titanic/pet_control/pet_frame.h +++ b/engines/titanic/pet_control/pet_frame.h @@ -53,12 +53,12 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Sets up the section */ virtual bool reset(); - + /** * Handles mouse down messages */ diff --git a/engines/titanic/pet_control/pet_gfx_element.cpp b/engines/titanic/pet_control/pet_gfx_element.cpp index 6022885770..e43c847bb1 100644 --- a/engines/titanic/pet_control/pet_gfx_element.cpp +++ b/engines/titanic/pet_control/pet_gfx_element.cpp @@ -48,7 +48,7 @@ void CPetGfxElement::reset(const CString &name, CPetControl *petControl, PetElem if (!petControl) return; - CString numString(3); + CString numString(3); int classNum = petControl->getPassengerClass(); if (classNum >= 1 && classNum <= 3) { diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h index c07cc5ed9a..79e032162c 100644 --- a/engines/titanic/pet_control/pet_glyphs.h +++ b/engines/titanic/pet_control/pet_glyphs.h @@ -77,7 +77,7 @@ public: * Called when the PET area is entered */ virtual void enter() {} - + /** * Called when the PET area is left */ @@ -137,7 +137,7 @@ public: * Handles keypresses */ virtual bool KeyCharMsg(int key) { return false; } - + /** * Handles keypresses */ @@ -162,7 +162,7 @@ public: * Selects a glyph */ virtual void selectGlyph(const Point &topLeft, const Point &pt) {} - + /** * Called when a glyph drag starts */ @@ -195,7 +195,7 @@ public: * Called on a highlighted item when PET area is entered */ virtual bool enterHighlighted() { return false; } - + /** * Called on a highlighted item when PET area is left */ @@ -241,7 +241,7 @@ public: */ bool isHighlighted() const; }; - + class CPetGlyphs : public List<CPetGlyph> { private: /** diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp index 88310459c6..be01146398 100644 --- a/engines/titanic/pet_control/pet_inventory.cpp +++ b/engines/titanic/pet_control/pet_inventory.cpp @@ -53,7 +53,7 @@ void CPetInventory::draw(CScreenManager *screenManager) { _text.draw(screenManager); } -Rect CPetInventory::getBounds() const { +Rect CPetInventory::getBounds() const { return _movie ? _movie->getBounds() : Rect(); } @@ -231,7 +231,7 @@ CGameObject *CPetInventory::getImage(int index) { return _itemGlyphs[index]; } } - + return nullptr; } diff --git a/engines/titanic/pet_control/pet_inventory.h b/engines/titanic/pet_control/pet_inventory.h index 184bb20385..5433feae95 100644 --- a/engines/titanic/pet_control/pet_inventory.h +++ b/engines/titanic/pet_control/pet_inventory.h @@ -64,7 +64,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Sets up the section */ @@ -74,12 +74,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const; - + /** * Called when a general change occurs */ @@ -141,7 +141,7 @@ public: virtual CGameObject *getBackground(int index) const; /** - * + * */ void change(CGameObject *item); diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.h b/engines/titanic/pet_control/pet_inventory_glyphs.h index 0d167c4c98..508db67f2d 100644 --- a/engines/titanic/pet_control/pet_inventory_glyphs.h +++ b/engines/titanic/pet_control/pet_inventory_glyphs.h @@ -63,7 +63,7 @@ public: CGameObject *_background; CGameObject *_image; public: - CPetInventoryGlyph() : _item(nullptr), _field34(1), + CPetInventoryGlyph() : _item(nullptr), _field34(1), _background(nullptr), _image(nullptr) {} CPetInventoryGlyph(CCarry *item, int val) : _item(item), _field34(val), _background(nullptr), _image(nullptr) {} @@ -72,7 +72,7 @@ public: * Called when the PET area is entered */ virtual void enter(); - + /** * Called when the PET area is left */ @@ -97,7 +97,7 @@ public: * Glyph has been shifted to be first visible one */ virtual void glyphFocused(const Point &topLeft, bool flag); - + /** * Called when a glyph drag starts */ @@ -133,7 +133,7 @@ class CInventoryGlyphAction : public CGlyphAction { public: CGameObject *_item; public: - CInventoryGlyphAction(CGameObject *item, GlyphActionMode mode) : + CInventoryGlyphAction(CGameObject *item, GlyphActionMode mode) : CGlyphAction(mode), _item(item) {} }; diff --git a/engines/titanic/pet_control/pet_load.cpp b/engines/titanic/pet_control/pet_load.cpp index 8e2afc727f..3d67cf6d71 100644 --- a/engines/titanic/pet_control/pet_load.cpp +++ b/engines/titanic/pet_control/pet_load.cpp @@ -30,7 +30,7 @@ namespace Titanic { bool CPetLoad::reset() { CPetLoadSave::reset(); - + CPetControl *pet = getPetControl(); if (pet) { setName("PetLoad", pet); diff --git a/engines/titanic/pet_control/pet_load.h b/engines/titanic/pet_control/pet_load.h index 421531974d..5669991b59 100644 --- a/engines/titanic/pet_control/pet_load.h +++ b/engines/titanic/pet_control/pet_load.h @@ -33,7 +33,7 @@ public: * Reset the glyph */ virtual bool reset(); - + /** * Handles mouse button up messages */ diff --git a/engines/titanic/pet_control/pet_load_save.cpp b/engines/titanic/pet_control/pet_load_save.cpp index aebe43551e..136953cab7 100644 --- a/engines/titanic/pet_control/pet_load_save.cpp +++ b/engines/titanic/pet_control/pet_load_save.cpp @@ -76,7 +76,7 @@ void CPetLoadSave::draw2(CScreenManager *screenManager) { bool CPetLoadSave::MouseButtonDownMsg(const Point &pt) { if (_btnLoadSave.MouseButtonDownMsg(pt)) return true; - + checkSlotsHighlight(pt); return false; } @@ -95,7 +95,7 @@ bool CPetLoadSave::KeyCharMsg(int key) { case Common::KEYCODE_UP: case Common::KEYCODE_KP8: if (_savegameSlotNum != -1) { - int slotNum = --_savegameSlotNum; + int slotNum = --_savegameSlotNum; highlightSlot((slotNum == -1) ? SAVEGAME_SLOTS_COUNT - 1 : slotNum); getPetControl()->makeDirty(); } diff --git a/engines/titanic/pet_control/pet_quit.cpp b/engines/titanic/pet_control/pet_quit.cpp index 218ed89812..a6fb22d7e1 100644 --- a/engines/titanic/pet_control/pet_quit.cpp +++ b/engines/titanic/pet_control/pet_quit.cpp @@ -41,7 +41,7 @@ bool CPetQuit::setup(CPetControl *petControl, CPetGlyphs *owner) { Rect btnRect(0, 0, 68, 52); btnRect.moveTo(496, 388); _btnYes.setBounds(btnRect); - + return true; } @@ -52,7 +52,7 @@ bool CPetQuit::reset() { setName("PetExit", pet); - uint col = getPetSection()->getColor(0); + uint col = getPetSection()->getColor(0); _text.setText("Are you sure you want to quit?"); _text.setLineColor(0, col); diff --git a/engines/titanic/pet_control/pet_quit.h b/engines/titanic/pet_control/pet_quit.h index 87d8aefbbf..b775000933 100644 --- a/engines/titanic/pet_control/pet_quit.h +++ b/engines/titanic/pet_control/pet_quit.h @@ -58,7 +58,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ diff --git a/engines/titanic/pet_control/pet_real_life.h b/engines/titanic/pet_control/pet_real_life.h index 40bc87d9b5..b359d285c8 100644 --- a/engines/titanic/pet_control/pet_real_life.h +++ b/engines/titanic/pet_control/pet_real_life.h @@ -53,7 +53,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -63,12 +63,12 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Get the bounds for the section */ virtual Rect getBounds() const { return Rect(); } - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -85,7 +85,7 @@ public: * Returns item a drag-drop operation has dropped on, if any */ virtual CGameObject *dragEnd(const Point &pt) const { return nullptr; } - + /** * Display a message */ @@ -115,7 +115,7 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea); - + /** * Called when a section is being left, to switch to another area */ diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp index 9b43b8dab9..7e98308114 100644 --- a/engines/titanic/pet_control/pet_remote.cpp +++ b/engines/titanic/pet_control/pet_remote.cpp @@ -30,7 +30,7 @@ namespace Titanic { static const byte REMOTE_DATA[] = { - 0x00, 0x02, + 0x00, 0x02, GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY, 0x01, 0x02, GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY, @@ -83,7 +83,7 @@ static const byte REMOTE_DATA[] = { GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY, 0x1E, 0x0C, GLYPH_DEPLOY_FLORAL, GLYPH_DEPLOY_FULLY_RELAXATION, GLYPH_DEPLOY_COMFORT, - GLYPH_DEPLOY_MINOR_STORAGE, GLYPH_ENTERTAINMENT_DEVICE, + GLYPH_DEPLOY_MINOR_STORAGE, GLYPH_ENTERTAINMENT_DEVICE, GLYPH_DEPLOY_MAJOR_RELAXATION, GLYPH_INFLATE_RELAXATION, GLYPH_DEPLOY_MAINTENANCE, GLYPH_DEPLOY_WORK_SURFACE, GLYPH_DEPLOY_MINOR_RELAXATION, GLYPH_DEPLOY_SINK, diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp index 953428ff0c..aa756bc941 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.cpp +++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp @@ -68,7 +68,7 @@ void CBasicRemoteGlyph::draw2(CScreenManager *screenManager) { } bool CBasicRemoteGlyph::MouseButtonDownMsg(const Point &pt) { - return _gfxElement && _gfxElement->MouseButtonDownMsg(pt); + return _gfxElement && _gfxElement->MouseButtonDownMsg(pt); } bool CBasicRemoteGlyph::MouseButtonUpMsg(const Point &pt) { @@ -173,7 +173,7 @@ bool CTelevisionControlGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) _down = getElement(2); _onOff = getElement(4); } - + return true; } diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h index d3541d6a94..6114c81a9f 100644 --- a/engines/titanic/pet_control/pet_remote_glyphs.h +++ b/engines/titanic/pet_control/pet_remote_glyphs.h @@ -90,7 +90,7 @@ private: CString _gfxName, _tooltip, _msgString; public: CBasicRemoteGlyph(const CString &gfxName, const CString &tooltip, - const CString &msgString) : CPetRemoteGlyph(), + const CString &msgString) : CPetRemoteGlyph(), _gfxName(gfxName), _tooltip(tooltip), _msgString(msgString) {} /** @@ -112,7 +112,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -144,7 +144,7 @@ public: /** * Called for mouse button up messages to the default element */ - bool elementMouseButtonUpMsg(const Point &pt, int petNum); + bool elementMouseButtonUpMsg(const Point &pt, int petNum); }; class CRemoteGotoGlyph : public CPetRemoteGlyph { @@ -154,7 +154,7 @@ protected: CString _gfxName, _tooltip; public: CRemoteGotoGlyph() : CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21) {} - CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip) : + CRemoteGotoGlyph(const CString &gfxName, const CString &tooltip) : CPetRemoteGlyph(), _gfxElement(nullptr), _roomIndex(21), _gfxName(gfxName), _tooltip(tooltip) {} @@ -177,7 +177,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -223,7 +223,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -257,7 +257,7 @@ public: * Handles mouse button up messages */ virtual bool MouseButtonUpMsg(const Point &pt); - + /** * Returns the tooltip text for when the glyph is selected */ @@ -318,7 +318,7 @@ public: virtual bool MouseButtonUpMsg(const Point &pt) { return elementMouseButtonUpMsg(pt, 0); } - + /** * Returns the tooltip text for when the glyph is selected */ diff --git a/engines/titanic/pet_control/pet_rooms.h b/engines/titanic/pet_control/pet_rooms.h index af1ea2ae4f..28d6553a33 100644 --- a/engines/titanic/pet_control/pet_rooms.h +++ b/engines/titanic/pet_control/pet_rooms.h @@ -76,7 +76,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -86,7 +86,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -101,7 +101,7 @@ public: * Check whether a drag drop can occur */ virtual bool checkDragEnd(CGameObject *item); - + /** * Display a message */ diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h index 5d0fec84f8..11de6c4a8e 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.h +++ b/engines/titanic/pet_control/pet_rooms_glyphs.h @@ -94,7 +94,7 @@ public: * Saves the data for the glyph */ virtual void saveGlyph(SimpleFile *file, int indent); - + virtual bool proc33(CPetGlyph *glyph); /** @@ -125,12 +125,12 @@ public: * Returns true if the room is either currently or previously assigned */ bool isAssigned() const { return _mode != RGM_UNASSIGNED; } - + /** * Returns true if the room is the one currently assigned to the player */ bool isCurrentlyAssigned() const { return _mode == RGM_ASSIGNED_ROOM; } - + /** * Returns true if the room was previously assigned to the player */ diff --git a/engines/titanic/pet_control/pet_save.cpp b/engines/titanic/pet_control/pet_save.cpp index 6d0733f534..d344c8cd14 100644 --- a/engines/titanic/pet_control/pet_save.cpp +++ b/engines/titanic/pet_control/pet_save.cpp @@ -28,7 +28,7 @@ namespace Titanic { bool CPetSave::reset() { CPetLoadSave::reset(); - + CPetControl *pet = getPetControl(); if (pet) { setName("PetSave", pet); diff --git a/engines/titanic/pet_control/pet_save.h b/engines/titanic/pet_control/pet_save.h index 54e91e4c76..e5e956403f 100644 --- a/engines/titanic/pet_control/pet_save.h +++ b/engines/titanic/pet_control/pet_save.h @@ -57,11 +57,11 @@ public: /** * Called on a highlighted item when PET area is entered */ - virtual bool enterHighlighted() { + virtual bool enterHighlighted() { highlightSave(_savegameSlotNum); return true; } - + /** * Called on a highlighted item when PET area is left */ diff --git a/engines/titanic/pet_control/pet_section.h b/engines/titanic/pet_control/pet_section.h index dc2f70b76f..9e9afe6c21 100644 --- a/engines/titanic/pet_control/pet_section.h +++ b/engines/titanic/pet_control/pet_section.h @@ -75,7 +75,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl) { return false; } - + /** * Reset the section */ @@ -85,17 +85,17 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager) {} - + /** * Get the bounds for the section */ virtual Rect getBounds() const { return Rect(); } - + /** * Called when a general change occurs */ virtual void changed(int changeType) {} - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area @@ -113,12 +113,12 @@ public: * Check whether a drag drop can occur */ virtual bool checkDragEnd(CGameObject *item) { return false; } - + /** * Returns item a drag-drop operation has dropped on, if any */ virtual CGameObject *dragEnd(const Point &pt) const { return nullptr; } - + /** * Display a message */ @@ -148,12 +148,12 @@ public: * Called when a section is switched to */ virtual void enter(PetArea oldArea) {} - + /** * Called when a section is being left, to switch to another area */ virtual void leave() {} - + virtual void proc23() {} /** @@ -175,7 +175,7 @@ public: * Removes text after a given duration */ virtual void removeText(int duration); - + /** * Removes text after a given duration */ @@ -217,7 +217,7 @@ public: * Show the text cursor */ virtual void showCursor() {} - + /** * Hide the text cursor */ @@ -237,7 +237,7 @@ public: * Get a specified color in the currently active UI color table */ uint getColor(uint index); - + /** * Get one of the game's three UI color tables. If the default * tableNum of -1 is used, the table is taken from the game state diff --git a/engines/titanic/pet_control/pet_slider.h b/engines/titanic/pet_control/pet_slider.h index 0bc9e825cd..be8c846a20 100644 --- a/engines/titanic/pet_control/pet_slider.h +++ b/engines/titanic/pet_control/pet_slider.h @@ -106,7 +106,7 @@ public: * Reset the slider */ virtual void reset(const CString &name) {} - + /** * Draw the slider */ @@ -116,7 +116,7 @@ public: * Reset the dirty area */ virtual Rect clearDirtyArea(); - + /** * Checks whether the slider is highlighted */ @@ -131,7 +131,7 @@ public: * Handles dragging the slider */ virtual bool MouseDragMoveMsg(const Point &pt); - + /** * Called when a slider drag ends */ @@ -144,8 +144,8 @@ public: virtual bool proc13() { return false; } virtual bool proc14() { return false; } - - + + virtual bool contains(const Point &pt) const; /** diff --git a/engines/titanic/pet_control/pet_sound.cpp b/engines/titanic/pet_control/pet_sound.cpp index 7bfeb25722..e9958c67be 100644 --- a/engines/titanic/pet_control/pet_sound.cpp +++ b/engines/titanic/pet_control/pet_sound.cpp @@ -111,7 +111,7 @@ bool CPetSound::reset() { void CPetSound::draw2(CScreenManager *screenManager) { _element.draw(screenManager); - + _musicVolume.draw(screenManager); _masterVolume.draw(screenManager); _parrotVolume.draw(screenManager); @@ -173,7 +173,7 @@ void CPetSound::sliderChanged(double offset, int sliderNum) { CPetControl *pet = getPetControl(); if (!pet) return; - + CGameManager *gameManager = pet->getGameManager(); if (!gameManager) return; diff --git a/engines/titanic/pet_control/pet_starfield.cpp b/engines/titanic/pet_control/pet_starfield.cpp index 3287f98817..dd953b592d 100644 --- a/engines/titanic/pet_control/pet_starfield.cpp +++ b/engines/titanic/pet_control/pet_starfield.cpp @@ -45,7 +45,7 @@ bool CPetStarfield::reset() { _btnSetDest.setup(MODE_UNSELECTED, "3PetSetDestin", _petControl); _btnSetDest.setup(MODE_SELECTED, "3PetSetDestin1", _petControl); _imgStarCtrl.setup(MODE_UNSELECTED, "3PetStarCtrl", _petControl); - + _leds[0].setup(MODE_UNSELECTED, "LEDOff1", _petControl); _leds[1].setup(MODE_UNSELECTED, "LEDOn1", _petControl); _leds[2].setup(MODE_UNSELECTED, "LEDOff2", _petControl); @@ -106,7 +106,7 @@ bool CPetStarfield::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { if (_petControl) { CStarControl *starControl = _petControl->getStarControl(); - + if (starControl && starControl->canSetStarDestination()) { CPETSetStarDestinationMsg starfieldMsg; starfieldMsg.execute(_petControl->_remoteTarget); diff --git a/engines/titanic/pet_control/pet_starfield.h b/engines/titanic/pet_control/pet_starfield.h index 9550e0acf9..6c47f47d67 100644 --- a/engines/titanic/pet_control/pet_starfield.h +++ b/engines/titanic/pet_control/pet_starfield.h @@ -66,7 +66,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -76,7 +76,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp index 2c20396cd9..1aa9b804ff 100644 --- a/engines/titanic/pet_control/pet_text.cpp +++ b/engines/titanic/pet_control/pet_text.cpp @@ -27,7 +27,7 @@ namespace Titanic { CPetText::CPetText(uint count) : _stringsMerged(false), _maxCharsPerLine(-1), _lineCount(0), _linesStart(-1), _unused1(0), _unused2(0), _unused3(0), - _backR(0xff), _backG(0xff), _backB(0xff), + _backR(0xff), _backG(0xff), _backB(0xff), _textR(0), _textG(0), _textB(200), _fontNumber(0), _npcFlag(0), _npcId(0), _hasBorder(true), _scrollTop(0), _textCursor(nullptr) { @@ -110,7 +110,7 @@ void CPetText::load(SimpleFile *file, int param) { _array[idx]._line = file->readString(); _array[idx]._rgb = file->readString(); _array[idx]._string3 = file->readString(); - } + } } } @@ -225,7 +225,7 @@ void CPetText::appendText(const CString &str) { // Only add part of the str up to the maximum allowed limit for line _array[_lineCount]._line += str.left(_maxCharsPerLine - lineSize); } - + updateStr3(_lineCount); _stringsMerged = false; } @@ -260,7 +260,7 @@ void CPetText::remapColors(uint count, uint *srcColors, uint *destColors) { } } } - + _stringsMerged = false; } @@ -277,7 +277,7 @@ void CPetText::updateStr3(int lineNum) { line[2] = _npcId; line[4] = '\0'; _array[lineNum]._string3 = CString(line); - + _stringsMerged = false; _npcFlag = _npcId = 0; } @@ -470,7 +470,7 @@ int CPetText::getNPCNum(uint npcId, uint startIndex) { strP += 4; } } - + return - 1; } diff --git a/engines/titanic/pet_control/pet_translation.h b/engines/titanic/pet_control/pet_translation.h index 2fcc758b44..26070d6e59 100644 --- a/engines/titanic/pet_control/pet_translation.h +++ b/engines/titanic/pet_control/pet_translation.h @@ -44,7 +44,7 @@ public: * Sets up the section */ virtual bool setup(CPetControl *petControl); - + /** * Reset the section */ @@ -54,7 +54,7 @@ public: * Draw the section */ virtual void draw(CScreenManager *screenManager); - + /** * Following are handlers for the various messages that the PET can * pass onto the currently active section/area |