[Scummvm-git-logs] scummvm master -> 18c925c6c548d0dab0f0f2192884e232b39f715e

dreammaster dreammaster at scummvm.org
Tue Aug 30 02:34:14 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
18c925c6c5 TITANIC: Remove unused CChevSwitch class


Commit: 18c925c6c548d0dab0f0f2192884e232b39f715e
    https://github.com/scummvm/scummvm/commit/18c925c6c548d0dab0f0f2192884e232b39f715e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-08-29T20:34:07-04:00

Commit Message:
TITANIC: Remove unused CChevSwitch class

Changed paths:
  R engines/titanic/gfx/chev_switch.cpp
  R engines/titanic/gfx/chev_switch.h
    engines/titanic/core/saveable_object.cpp
    engines/titanic/module.mk



diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index eee71cf..db3249c 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 eb6c318..0000000
--- 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 01da53c..0000000
--- 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 90d010b..7934279 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 \





More information about the Scummvm-git-logs mailing list