aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-15 09:29:04 -0500
committerPaul Gilbert2017-01-15 09:29:04 -0500
commit9d6af45877da86a55d9398f8233213f4d48191fe (patch)
tree73eb5e474c095abc3b0710ff66e723b6d04b6a57
parent8a061ee82dea18a351a8905f8f4d2322d4bb8828 (diff)
downloadscummvm-rg350-9d6af45877da86a55d9398f8233213f4d48191fe.tar.gz
scummvm-rg350-9d6af45877da86a55d9398f8233213f4d48191fe.tar.bz2
scummvm-rg350-9d6af45877da86a55d9398f8233213f4d48191fe.zip
TITANIC: Removal of un-used fields to reduce Buildbot warnings
Note there's a lot of preliminary code in the star_control/ folder for code that still needs to be fully disassembled & implemented. So for now I've made liberal use of #if 0 blocks to disable fields that will likely be needed again in the future
-rw-r--r--engines/titanic/game/chicken_dispensor.cpp31
-rw-r--r--engines/titanic/game/chicken_dispensor.h2
-rw-r--r--engines/titanic/sound/music_room_handler.cpp7
-rw-r--r--engines/titanic/sound/music_room_handler.h3
-rw-r--r--engines/titanic/sound/music_wave.cpp2
-rw-r--r--engines/titanic/sound/music_wave.h1
-rw-r--r--engines/titanic/star_control/star_control.cpp2
-rw-r--r--engines/titanic/star_control/star_control.h2
-rw-r--r--engines/titanic/star_control/star_control_sub21.cpp5
-rw-r--r--engines/titanic/star_control/star_control_sub21.h2
-rw-r--r--engines/titanic/star_control/star_control_sub22.cpp5
-rw-r--r--engines/titanic/star_control/star_control_sub22.h2
-rw-r--r--engines/titanic/star_control/star_control_sub5.cpp2
-rw-r--r--engines/titanic/star_control/star_control_sub5.h4
-rw-r--r--engines/titanic/star_control/star_control_sub8.cpp6
-rw-r--r--engines/titanic/star_control/star_control_sub8.h2
-rw-r--r--engines/titanic/star_control/star_view.cpp2
-rw-r--r--engines/titanic/star_control/star_view.h4
-rw-r--r--engines/titanic/support/mouse_cursor.h1
-rw-r--r--engines/titanic/true_talk/script_handler.cpp3
-rw-r--r--engines/titanic/true_talk/script_handler.h1
-rw-r--r--engines/titanic/true_talk/true_talk_manager.cpp2
-rw-r--r--engines/titanic/true_talk/tt_scripts.cpp3
-rw-r--r--engines/titanic/true_talk/tt_scripts.h5
24 files changed, 61 insertions, 38 deletions
diff --git a/engines/titanic/game/chicken_dispensor.cpp b/engines/titanic/game/chicken_dispensor.cpp
index df1f1eb22a..a7d69c7349 100644
--- a/engines/titanic/game/chicken_dispensor.cpp
+++ b/engines/titanic/game/chicken_dispensor.cpp
@@ -37,14 +37,14 @@ BEGIN_MESSAGE_MAP(CChickenDispensor, CBackground)
END_MESSAGE_MAP()
CChickenDispensor::CChickenDispensor() : CBackground(),
- _fieldE0(0), _fieldE4(0), _fieldE8(0) {
+ _fieldE0(0), _fieldE4(0), _dragging(false) {
}
void CChickenDispensor::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldE0, indent);
file->writeNumberLine(_fieldE4, indent);
- file->writeNumberLine(_fieldE8, indent);
+ file->writeNumberLine(_dragging, indent);
CBackground::save(file, indent);
}
@@ -52,14 +52,14 @@ void CChickenDispensor::load(SimpleFile *file) {
file->readNumber();
_fieldE0 = file->readNumber();
_fieldE4 = file->readNumber();
- _fieldE8 = file->readNumber();
+ _dragging = file->readNumber();
CBackground::load(file);
}
bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) {
msg->execute("SGTRestLeverAnimation");
- int v1 = _fieldE8 ? 0 : _fieldE4;
+ int v1 = _dragging ? 0 : _fieldE4;
CPetControl *pet = getPetControl();
CGameObject *obj;
@@ -78,7 +78,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) {
}
if (v1 == 1 || v1 == 2)
- _fieldE8 = 1;
+ _dragging = true;
switch (v1) {
case 0:
@@ -92,7 +92,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) {
_fieldE4 = 0;
} else {
playMovie(12, 16, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- _fieldE8 = 1;
+ _dragging = true;
_fieldE4 = 0;
}
break;
@@ -104,7 +104,7 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) {
playSound("z#400.wav");
} else {
playMovie(12, 16, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- _fieldE8 = 1;
+ _dragging = true;
}
break;
@@ -116,17 +116,22 @@ bool CChickenDispensor::StatusChangeMsg(CStatusChangeMsg *msg) {
}
bool CChickenDispensor::MovieEndMsg(CMovieEndMsg *msg) {
- if (getMovieFrame() == 16) {
+ int movieFrame = getMovieFrame();
+
+ if (movieFrame == 16) {
+ // Dispensed a chicken
+ _cursorId = CURSOR_HAND;
playSound("b#50.wav", 50);
CActMsg actMsg("Dispense Chicken");
actMsg.execute("Chicken");
- } else if (_fieldE8) {
+ } else if (_dragging) {
_cursorId = CURSOR_ARROW;
loadFrame(0);
setVisible(false);
if (_fieldE4 == 2)
- _fieldE8 = 0;
+ _dragging = false;
} else {
+ // Doors closing as the view is being left
loadFrame(0);
setVisible(false);
changeView("SgtLobby.Node 1.N");
@@ -154,7 +159,7 @@ bool CChickenDispensor::LeaveViewMsg(CLeaveViewMsg *msg) {
bool CChickenDispensor::EnterViewMsg(CEnterViewMsg *msg) {
playSound("b#51.wav");
- _fieldE8 = 0;
+ _dragging = 0;
_cursorId = CURSOR_ARROW;
return true;
}
@@ -164,7 +169,7 @@ bool CChickenDispensor::MouseDragStartMsg(CMouseDragStartMsg *msg) {
setVisible(false);
loadFrame(0);
_cursorId = CURSOR_ARROW;
- _fieldE8 = 1;
+ _dragging = 1;
CVisibleMsg visibleMsg;
visibleMsg.execute("Chicken");
@@ -181,7 +186,7 @@ bool CChickenDispensor::TurnOff(CTurnOff *msg) {
if (getMovieFrame() != 16)
setVisible(false);
playMovie(16, 12, MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE);
- _fieldE8 = 0;
+ _dragging = false;
return true;
}
diff --git a/engines/titanic/game/chicken_dispensor.h b/engines/titanic/game/chicken_dispensor.h
index 5e3ba47ee8..61123c4ce5 100644
--- a/engines/titanic/game/chicken_dispensor.h
+++ b/engines/titanic/game/chicken_dispensor.h
@@ -39,7 +39,7 @@ class CChickenDispensor : public CBackground {
public:
int _fieldE0;
int _fieldE4;
- int _fieldE8;
+ bool _dragging;
public:
CLASSDEF;
CChickenDispensor();
diff --git a/engines/titanic/sound/music_room_handler.cpp b/engines/titanic/sound/music_room_handler.cpp
index ca37485eab..a9f4116691 100644
--- a/engines/titanic/sound/music_room_handler.cpp
+++ b/engines/titanic/sound/music_room_handler.cpp
@@ -28,7 +28,7 @@ namespace Titanic {
CMusicRoomHandler::CMusicRoomHandler(CProjectItem *project, CSoundManager *soundManager) :
_project(project), _soundManager(soundManager), _stopWaves(false),
- _soundHandle(-1), _waveFile(nullptr), _soundVolume(100), _ticks(0),
+ _soundHandle(-1), _waveFile(nullptr), _soundVolume(100),
_field108(0) {
Common::fill(&_musicWaves[0], &_musicWaves[4], (CMusicWave *)nullptr);
}
@@ -135,4 +135,9 @@ void CMusicRoomHandler::setMuteControl(MusicControlArea area, int value) {
_array1[area]._muteControl = value;
}
+bool CMusicRoomHandler::isBusy() {
+ // TODO: stuff
+ return _field108 > 0;
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/sound/music_room_handler.h b/engines/titanic/sound/music_room_handler.h
index 61b332dc7a..a15ef2d1bc 100644
--- a/engines/titanic/sound/music_room_handler.h
+++ b/engines/titanic/sound/music_room_handler.h
@@ -59,7 +59,6 @@ private:
CWaveFile *_waveFile;
int _soundHandle;
int _soundVolume;
- uint _ticks;
int _field108;
public:
CMusicRoomHandler(CProjectItem *project, CSoundManager *soundManager);
@@ -80,6 +79,8 @@ public:
*/
bool poll();
+ bool isBusy();
+
/**
* Flags whether the loaded music waves will be stopped when the
* music handler is stopped
diff --git a/engines/titanic/sound/music_wave.cpp b/engines/titanic/sound/music_wave.cpp
index 6b5b187805..560fdd7513 100644
--- a/engines/titanic/sound/music_wave.cpp
+++ b/engines/titanic/sound/music_wave.cpp
@@ -27,7 +27,7 @@
namespace Titanic {
CMusicWave::CMusicWave(CProjectItem *project, CSoundManager *soundManager, int index) :
- _project(project), _soundManager(soundManager) {
+ _soundManager(soundManager) {
}
void CMusicWave::setSize(uint count) {
diff --git a/engines/titanic/sound/music_wave.h b/engines/titanic/sound/music_wave.h
index b240f4a856..4082a926cf 100644
--- a/engines/titanic/sound/music_wave.h
+++ b/engines/titanic/sound/music_wave.h
@@ -39,7 +39,6 @@ class CMusicWave {
CMusicWaveFile() : _waveFile(nullptr), _value(0) {}
};
private:
- CProjectItem *_project;
CSoundManager *_soundManager;
Common::Array<CMusicWaveFile> _items;
private:
diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp
index 01318db774..dcb004231a 100644
--- a/engines/titanic/star_control/star_control.cpp
+++ b/engines/titanic/star_control/star_control.cpp
@@ -36,7 +36,7 @@ BEGIN_MESSAGE_MAP(CStarControl, CGameObject)
ON_MESSAGE(FrameMsg)
END_MESSAGE_MAP()
-CStarControl::CStarControl() : _fieldBC(0), _field80B0(0),
+CStarControl::CStarControl() : _fieldBC(0),
_starRect(20, 10, 620, 350) {
CStarControlSub6::init();
CStarControlSub12::init();
diff --git a/engines/titanic/star_control/star_control.h b/engines/titanic/star_control/star_control.h
index c0561ce908..bf964b7cfa 100644
--- a/engines/titanic/star_control/star_control.h
+++ b/engines/titanic/star_control/star_control.h
@@ -40,7 +40,9 @@ private:
CStarField _starField;
CStarView _view;
Rect _starRect;
+#if 0
int _field80B0;
+#endif
private:
/**
* Called for ever new game frame
diff --git a/engines/titanic/star_control/star_control_sub21.cpp b/engines/titanic/star_control/star_control_sub21.cpp
index 1730244184..41d24d55c0 100644
--- a/engines/titanic/star_control/star_control_sub21.cpp
+++ b/engines/titanic/star_control/star_control_sub21.cpp
@@ -26,7 +26,10 @@
namespace Titanic {
CStarControlSub21::CStarControlSub21(const CStar20Data *src) :
- CStarControlSub20(src), _sub24() {
+ CStarControlSub20(src) {
+#if 0
+ _sub24()
+#endif
}
} // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_control_sub21.h b/engines/titanic/star_control/star_control_sub21.h
index 5febda0ebb..3f47a1a3e1 100644
--- a/engines/titanic/star_control/star_control_sub21.h
+++ b/engines/titanic/star_control/star_control_sub21.h
@@ -30,7 +30,9 @@ namespace Titanic {
class CStarControlSub21 : public CStarControlSub20 {
private:
+#if 0
CStarControlSub24 _sub24;
+#endif
public:
CStarControlSub21(const CStar20Data *src);
};
diff --git a/engines/titanic/star_control/star_control_sub22.cpp b/engines/titanic/star_control/star_control_sub22.cpp
index b06731b6d2..05a1cec87d 100644
--- a/engines/titanic/star_control/star_control_sub22.cpp
+++ b/engines/titanic/star_control/star_control_sub22.cpp
@@ -26,7 +26,10 @@
namespace Titanic {
CStarControlSub22::CStarControlSub22(const CStar20Data *src) :
- CStarControlSub20(src), _sub27() {
+ CStarControlSub20(src) {
+#if 0
+ _sub27()
+#endif
}
} // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_control_sub22.h b/engines/titanic/star_control/star_control_sub22.h
index 88a114f8c3..4d353aa074 100644
--- a/engines/titanic/star_control/star_control_sub22.h
+++ b/engines/titanic/star_control/star_control_sub22.h
@@ -30,7 +30,9 @@ namespace Titanic {
class CStarControlSub22 : public CStarControlSub20 {
private:
+#if 0
CStarControlSub27 _sub27;
+#endif
public:
CStarControlSub22(const CStar20Data *src);
};
diff --git a/engines/titanic/star_control/star_control_sub5.cpp b/engines/titanic/star_control/star_control_sub5.cpp
index e2899220c8..0503806e65 100644
--- a/engines/titanic/star_control/star_control_sub5.cpp
+++ b/engines/titanic/star_control/star_control_sub5.cpp
@@ -25,7 +25,7 @@
namespace Titanic {
CStarControlSub5::CStarControlSub5() :
- _field4(1), _field78AC(0), _field78B0(0) {
+ _field4(1) {
}
bool CStarControlSub5::setup() {
diff --git a/engines/titanic/star_control/star_control_sub5.h b/engines/titanic/star_control/star_control_sub5.h
index ce92ef1135..d90408e090 100644
--- a/engines/titanic/star_control/star_control_sub5.h
+++ b/engines/titanic/star_control/star_control_sub5.h
@@ -37,11 +37,13 @@ class CStarControlSub5 {
};
private:
int _field4;
- SubEntry _array[5];
CStarControlSub6 _sub1, _sub2;
+#if 0
+ SubEntry _array[5];
int _field7914;
int _field78AC;
int _field78B0;
+#endif
public:
CStarControlSub5();
virtual ~CStarControlSub5() {}
diff --git a/engines/titanic/star_control/star_control_sub8.cpp b/engines/titanic/star_control/star_control_sub8.cpp
index cdb249b663..78fdfa7f84 100644
--- a/engines/titanic/star_control/star_control_sub8.cpp
+++ b/engines/titanic/star_control/star_control_sub8.cpp
@@ -24,8 +24,10 @@
namespace Titanic {
-CStarControlSub8::CStarControlSub8() :
- _field0(0), _field4(0), _field8(-1), _fieldC(-1) {
+CStarControlSub8::CStarControlSub8() : _field8(-1) {
+#if 0
+ _field0(0), _field4(0), _field8(-1), _fieldC(-1)
+#endif
}
} // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_control_sub8.h b/engines/titanic/star_control/star_control_sub8.h
index 6d8d1f0c7d..71aa8fb472 100644
--- a/engines/titanic/star_control/star_control_sub8.h
+++ b/engines/titanic/star_control/star_control_sub8.h
@@ -35,10 +35,12 @@ class CStarControlSub8 {
int _fieldC;
};
private:
+#if 0
int _field0;
int _field4;
int _fieldC;
StructEntry _array[3];
+#endif
public:
int _field8;
public:
diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp
index 437c0f0e52..c82f89335d 100644
--- a/engines/titanic/star_control/star_view.cpp
+++ b/engines/titanic/star_control/star_view.cpp
@@ -30,7 +30,7 @@ namespace Titanic {
CStarView::CStarView() : _sub12(nullptr, nullptr), _sub13((void *)nullptr),
_owner(nullptr), _starField(nullptr), _videoSurface(nullptr), _field118(0),
- _videoSurface2(nullptr), _field210(0), _homePhotoMask(nullptr),
+ _videoSurface2(nullptr), _homePhotoMask(nullptr),
_field218(0), _field21C(0) {
CStar20Data data = { 0, 0, 0x47C35000, 0, 0x41A00000,
0x3F800000, 0x3F800000, 0x3F800000 };
diff --git a/engines/titanic/star_control/star_view.h b/engines/titanic/star_control/star_view.h
index bcba5ac436..7ebbcb218b 100644
--- a/engines/titanic/star_control/star_view.h
+++ b/engines/titanic/star_control/star_view.h
@@ -45,10 +45,12 @@ private:
CStarControlSub13 _sub13;
CSurfaceFader _fader;
CVideoSurface *_videoSurface2;
- int _field210;
CGameObject *_homePhotoMask;
int _field218;
int _field21C;
+#if 0
+ int _field210;
+#endif
private:
void fn1();
public:
diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h
index d61e5fe0bc..cd5e49fb90 100644
--- a/engines/titanic/support/mouse_cursor.h
+++ b/engines/titanic/support/mouse_cursor.h
@@ -70,7 +70,6 @@ private:
int _hiddenCount;
bool _cursorSuppressed;
int _fieldE8;
- uint32 _priorMoveTime;
Common::Point _moveStartPos;
Common::Point _moveDestPos;
uint _moveStartTime, _moveEndTime;
diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp
index 802e2b4ba6..be0b89bc65 100644
--- a/engines/titanic/true_talk/script_handler.cpp
+++ b/engines/titanic/true_talk/script_handler.cpp
@@ -32,8 +32,7 @@ namespace Titanic {
/*------------------------------------------------------------------------*/
CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) :
- _owner(owner), _script(owner->_script), _resources(g_vm->_exeResources),
- _parser(this), _inputCtr(0), _concept1P(nullptr),
+ _owner(owner), _script(owner->_script), _parser(this), _inputCtr(0), _concept1P(nullptr),
_concept2P(nullptr), _concept3P(nullptr), _concept4P(nullptr) {
g_vm->_scriptHandler = this;
g_vm->_script = _script;
diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h
index e28eeed1ac..85d5e2e437 100644
--- a/engines/titanic/true_talk/script_handler.h
+++ b/engines/titanic/true_talk/script_handler.h
@@ -38,7 +38,6 @@ class CScriptHandler;
class CScriptHandler {
private:
CTitleEngine *_owner;
- CExeResources &_resources;
int _inputCtr;
private:
void handleWord1(const TTstring *str);
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index 446a32eaae..f8efe91466 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -46,7 +46,7 @@ CTrueTalkNPC *CTrueTalkManager::_currentNPC;
/*------------------------------------------------------------------------*/
CTrueTalkManager::CTrueTalkManager(CGameManager *owner) :
- _gameManager(owner), _scripts(&_titleEngine), _currentCharId(0),
+ _gameManager(owner), _scripts(), _currentCharId(0),
_dialogueFile(nullptr), _dialogueId(0) {
_titleEngine.setup(3, 3);
_quotes.load();
diff --git a/engines/titanic/true_talk/tt_scripts.cpp b/engines/titanic/true_talk/tt_scripts.cpp
index 4c01fd1ead..b1f18771fe 100644
--- a/engines/titanic/true_talk/tt_scripts.cpp
+++ b/engines/titanic/true_talk/tt_scripts.cpp
@@ -57,8 +57,7 @@ TTroomScript *TTroomScriptList::findById(uint scriptId) const {
/*------------------------------------------------------------------------*/
-TTscripts::TTscripts(CTitleEngine *titleEngine) :
- _titleEngine(titleEngine), _field24(0), _field28(0) {
+TTscripts::TTscripts() {
// Load room scripts
for (int scriptNum = 100; scriptNum < 133; ++scriptNum)
addScript(new TTroomScript(scriptNum));
diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h
index 734d86256f..dfc8d4a9d5 100644
--- a/engines/titanic/true_talk/tt_scripts.h
+++ b/engines/titanic/true_talk/tt_scripts.h
@@ -58,9 +58,6 @@ class TTscripts {
private:
TTnpcScriptList _npcScripts;
TTroomScriptList _roomScripts;
- CTitleEngine *_titleEngine;
- int _field24;
- int _field28;
private:
/**
* Add a named script to the named scripts list
@@ -72,7 +69,7 @@ private:
*/
void addScript(TTroomScript *script);
public:
- TTscripts(CTitleEngine *titleEngine);
+ TTscripts();
/**
* Return a pointer to the specified room script