aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/game')
-rw-r--r--engines/titanic/game/hammer_dispensor_button.cpp56
-rw-r--r--engines/titanic/game/hammer_dispensor_button.h60
-rw-r--r--engines/titanic/game/service_elevator_door.h2
-rw-r--r--engines/titanic/game/start_action.cpp (renamed from engines/titanic/game/door_auto_sound_event.cpp)25
-rw-r--r--engines/titanic/game/start_action.h (renamed from engines/titanic/game/door_auto_sound_event.h)20
5 files changed, 136 insertions, 27 deletions
diff --git a/engines/titanic/game/hammer_dispensor_button.cpp b/engines/titanic/game/hammer_dispensor_button.cpp
new file mode 100644
index 0000000000..eb9fa3845b
--- /dev/null
+++ b/engines/titanic/game/hammer_dispensor_button.cpp
@@ -0,0 +1,56 @@
+/* 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/game/hammer_dispensor_button.h"
+
+namespace Titanic {
+
+CHammerDispensorButton::CHammerDispensorButton() : CStartAction(),
+ _fieldF8(0), _fieldFC(0), _field100(0), _field104(56),
+ _field108(6), _field10C(0), _field110(0) {
+}
+
+void CHammerDispensorButton::save(SimpleFile *file, int indent) const {
+ file->writeNumberLine(1, indent);
+ file->writeNumberLine(_fieldF8, indent);
+ file->writeNumberLine(_fieldFC, indent);
+ file->writeNumberLine(_field100, indent);
+ file->writeNumberLine(_field104, indent);
+ file->writeNumberLine(_field108, indent);
+ file->writeNumberLine(_field110, indent);
+
+ CStartAction::save(file, indent);
+}
+
+void CHammerDispensorButton::load(SimpleFile *file) {
+ file->readNumber();
+ _fieldF8 = file->readNumber();
+ _fieldFC = file->readNumber();
+ _field100 = file->readNumber();
+ _field104 = file->readNumber();
+ _field108 = file->readNumber();
+ _field110 = file->readNumber();
+
+ CStartAction::load(file);
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/game/hammer_dispensor_button.h b/engines/titanic/game/hammer_dispensor_button.h
new file mode 100644
index 0000000000..e4b5fc13b1
--- /dev/null
+++ b/engines/titanic/game/hammer_dispensor_button.h
@@ -0,0 +1,60 @@
+/* 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_HAMMER_DISPENSOR_H
+#define TITANIC_HAMMER_DISPENSOR_H
+
+#include "titanic/game/start_action.h"
+
+namespace Titanic {
+
+class CHammerDispensorButton : public CStartAction {
+private:
+ int _fieldF8;
+ int _fieldFC;
+ int _field100;
+ int _field104;
+ int _field108;
+ int _field10C;
+ int _field110;
+public:
+ CHammerDispensorButton();
+
+ /**
+ * Return the class name
+ */
+ virtual const char *getClassName() const { return "CHammerDispensorButton"; }
+
+ /**
+ * Save the data for the class to file
+ */
+ virtual void save(SimpleFile *file, int indent) const;
+
+ /**
+ * Load the data for the class from file
+ */
+ virtual void load(SimpleFile *file);
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_HAMMER_DISPENSOR_H */
diff --git a/engines/titanic/game/service_elevator_door.h b/engines/titanic/game/service_elevator_door.h
index 3ad897c089..a3a8388405 100644
--- a/engines/titanic/game/service_elevator_door.h
+++ b/engines/titanic/game/service_elevator_door.h
@@ -23,7 +23,7 @@
#ifndef TITANIC_SERVICE_ELEVATOR_DOOR_H
#define TITANIC_SERVICE_ELEVATOR_DOOR_H
-#include "titanic/game/door_auto_sound_event.h"
+#include "titanic/messages/door_auto_sound_event.h"
namespace Titanic {
diff --git a/engines/titanic/game/door_auto_sound_event.cpp b/engines/titanic/game/start_action.cpp
index 158c147296..9bafd01282 100644
--- a/engines/titanic/game/door_auto_sound_event.cpp
+++ b/engines/titanic/game/start_action.cpp
@@ -20,32 +20,27 @@
*
*/
-#include "titanic/game/door_auto_sound_event.h"
+#include "titanic/game/start_action.h"
namespace Titanic {
-CDoorAutoSoundEvent::CDoorAutoSoundEvent() : CAutoSoundEvent(),
- _string1("z#44.wav"), _string2("z#43.wav"), _fieldDC(25), _fieldE0(25) {
+CStartAction::CStartAction() : CBackground() {
}
-void CDoorAutoSoundEvent::save(SimpleFile *file, int indent) const {
+void CStartAction::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
- file->writeQuotedLine(_string1, indent);
- file->writeQuotedLine(_string2, indent);
- file->writeNumberLine(_fieldDC, indent);
- file->writeNumberLine(_fieldE0, indent);
+ file->writeQuotedLine(_string3, indent);
+ file->writeQuotedLine(_string4, indent);
- CAutoSoundEvent::save(file, indent);
+ CBackground::save(file, indent);
}
-void CDoorAutoSoundEvent::load(SimpleFile *file) {
+void CStartAction::load(SimpleFile *file) {
file->readNumber();
- _string1 = file->readString();
- _string2 = file->readString();
- _fieldDC = file->readNumber();
- _fieldE0 = file->readNumber();
+ _string3 = file->readString();
+ _string4 = file->readString();
- CAutoSoundEvent::load(file);
+ CBackground::load(file);
}
} // End of namespace Titanic
diff --git a/engines/titanic/game/door_auto_sound_event.h b/engines/titanic/game/start_action.h
index 9bba304daa..3725dbc4a0 100644
--- a/engines/titanic/game/door_auto_sound_event.h
+++ b/engines/titanic/game/start_action.h
@@ -20,26 +20,24 @@
*
*/
-#ifndef TITANIC_DOOR_AUTO_SOUND_EVENT_H
-#define TITANIC_DOOR_AUTO_SOUND_EVENT_H
+#ifndef TITANIC_START_ACTION_H
+#define TITANIC_START_ACTION_H
-#include "titanic/messages/auto_sound_event.h"
+#include "titanic/core/background.h"
namespace Titanic {
-class CDoorAutoSoundEvent : public CAutoSoundEvent {
+class CStartAction : public CBackground {
protected:
- CString _string1;
- CString _string2;
- int _fieldDC;
- int _fieldE0;
+ CString _string3;
+ CString _string4;
public:
- CDoorAutoSoundEvent();
+ CStartAction();
/**
* Return the class name
*/
- virtual const char *getClassName() const { return "CDoorAutoSoundEvent"; }
+ virtual const char *getClassName() const { return "CStartAction"; }
/**
* Save the data for the class to file
@@ -54,4 +52,4 @@ public:
} // End of namespace Titanic
-#endif /* TITANIC_DOOR_AUTO_SOUND_EVENT_H */
+#endif /* TITANIC_START_ACTION_H */