diff options
-rw-r--r-- | engines/titanic/core/saveable_object.cpp | 3 | ||||
-rw-r--r-- | engines/titanic/gfx/chev_switch.cpp | 78 | ||||
-rw-r--r-- | engines/titanic/gfx/chev_switch.h | 54 | ||||
-rw-r--r-- | engines/titanic/module.mk | 1 |
4 files changed, 0 insertions, 136 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index eee71cfc43..db3249c107 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -286,7 +286,6 @@ #include "titanic/gfx/chev_right_off.h" #include "titanic/gfx/chev_right_on.h" #include "titanic/gfx/chev_send_rec_switch.h" -#include "titanic/gfx/chev_switch.h" #include "titanic/gfx/edit_control.h" #include "titanic/gfx/elevator_button.h" #include "titanic/gfx/get_from_succ.h" @@ -705,7 +704,6 @@ DEFFN(CChevLeftOn); DEFFN(CChevRightOff); DEFFN(CChevRightOn); DEFFN(CChevSendRecSwitch); -DEFFN(CChevSwitch); DEFFN(CEditControl); DEFFN(CElevatorButton); DEFFN(CGetFromSucc); @@ -1289,7 +1287,6 @@ void CSaveableObject::initClassList() { ADDFN(CChevRightOff, CToggleSwitch); ADDFN(CChevRightOn, CToggleSwitch); ADDFN(CChevSendRecSwitch, CToggleSwitch); - ADDFN(CChevSwitch, CToggleSwitch); ADDFN(CEditControl, CGameObject); ADDFN(CElevatorButton, CSTButton); ADDFN(CGetFromSucc, CToggleSwitch); diff --git a/engines/titanic/gfx/chev_switch.cpp b/engines/titanic/gfx/chev_switch.cpp deleted file mode 100644 index eb6c318604..0000000000 --- a/engines/titanic/gfx/chev_switch.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#include "titanic/gfx/chev_switch.h" - -namespace Titanic { - -BEGIN_MESSAGE_MAP(CChevSwitch, CToggleSwitch) - ON_MESSAGE(MouseButtonUpMsg) - ON_MESSAGE(SetChevButtonImageMsg) - ON_MESSAGE(MouseButtonDownMsg) -END_MESSAGE_MAP() - -CChevSwitch::CChevSwitch() : CToggleSwitch(), _value(0) { -} - -void CChevSwitch::save(SimpleFile *file, int indent) { - file->writeNumberLine(1, indent); - CToggleSwitch::save(file, indent); -} - -void CChevSwitch::load(SimpleFile *file) { - file->readNumber(); - CToggleSwitch::load(file); -} - -bool CChevSwitch::MouseButtonUpMsg(CMouseButtonUpMsg *msg) { - return true; -} - -bool CChevSwitch::SetChevButtonImageMsg(CSetChevButtonImageMsg *msg) { - if (msg->_value2 && getParent()) { - error("TODO: Don't know parent type"); - } - - _pressed = msg->_value1; - if (_pressed) { - loadImage((_value & 1) ? "on_odd.tga" : "on_even.tga"); - } else { - loadImage((_value & 1) ? "off_odd.tga" : "off_even.tga"); - } - - return true; -} - -bool CChevSwitch::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { - _pressed ^= 1; - if (getParent()) { - CSetChevPanelBitMsg bitMsg(_value, _pressed); - bitMsg.execute(getParent()); - } - - CSetChevButtonImageMsg chevMsg(_pressed, 0); - chevMsg.execute(this); - - return true; -} - -} // End of namespace Titanic diff --git a/engines/titanic/gfx/chev_switch.h b/engines/titanic/gfx/chev_switch.h deleted file mode 100644 index 01da53c854..0000000000 --- a/engines/titanic/gfx/chev_switch.h +++ /dev/null @@ -1,54 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -#ifndef TITANIC_CHEV_SWITCH_H -#define TITANIC_CHEV_SWITCH_H - -#include "titanic/gfx/toggle_switch.h" - -namespace Titanic { - -class CChevSwitch : public CToggleSwitch { - DECLARE_MESSAGE_MAP; - bool MouseButtonUpMsg(CMouseButtonUpMsg *msg); - bool SetChevButtonImageMsg(CSetChevButtonImageMsg *msg); - bool MouseButtonDownMsg(CMouseButtonDownMsg *msg); -public: - int _value; -public: - CLASSDEF; - CChevSwitch(); - - /** - * Save the data for the class to file - */ - virtual void save(SimpleFile *file, int indent); - - /** - * Load the data for the class from file - */ - virtual void load(SimpleFile *file); -}; - -} // End of namespace Titanic - -#endif /* TITANIC_CHEV_SWITCH_H */ diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 90d010b57b..793427991d 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -277,7 +277,6 @@ MODULE_OBJS := \ gfx/chev_right_off.o \ gfx/chev_right_on.o \ gfx/chev_send_rec_switch.o \ - gfx/chev_switch.o \ gfx/edit_control.o \ gfx/elevator_button.o \ gfx/get_from_succ.o \ |