Initial commit
This commit is contained in:
49
engines/titanic/gfx/act_button.cpp
Normal file
49
engines/titanic/gfx/act_button.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/act_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CActButton, CSTButton)
|
||||
ON_MESSAGE(MouseButtonUpMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CActButton::CActButton() : CSTButton() {
|
||||
}
|
||||
|
||||
void CActButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CSTButton::save(file, indent);
|
||||
}
|
||||
|
||||
void CActButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CSTButton::load(file);
|
||||
}
|
||||
|
||||
bool CActButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
|
||||
CActMsg actMsg(_actionName);
|
||||
actMsg.execute(_actionTarget);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
49
engines/titanic/gfx/act_button.h
Normal file
49
engines/titanic/gfx/act_button.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ACT_BUTTON_H
|
||||
#define TITANIC_ACT_BUTTON_H
|
||||
|
||||
#include "titanic/gfx/st_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CActButton : public CSTButton {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
CActButton();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ACT_BUTTON_H */
|
||||
50
engines/titanic/gfx/changes_season_button.cpp
Normal file
50
engines/titanic/gfx/changes_season_button.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/changes_season_button.h"
|
||||
#include "titanic/core/project_item.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CChangesSeasonButton, CSTButton)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CChangesSeasonButton::CChangesSeasonButton() : CSTButton() {
|
||||
}
|
||||
|
||||
void CChangesSeasonButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CSTButton::save(file, indent);
|
||||
}
|
||||
|
||||
void CChangesSeasonButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CSTButton::load(file);
|
||||
}
|
||||
|
||||
bool CChangesSeasonButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CChangeSeasonMsg changeMsg(_actionName);
|
||||
changeMsg.execute(getRoot(), nullptr, MSGFLAG_SCAN);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
49
engines/titanic/gfx/changes_season_button.h
Normal file
49
engines/titanic/gfx/changes_season_button.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_CHANGES_SEASON_BUTTON_H
|
||||
#define TITANIC_CHANGES_SEASON_BUTTON_H
|
||||
|
||||
#include "titanic/gfx/st_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CChangesSeasonButton : public CSTButton {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
CChangesSeasonButton();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_CHANGES_SEASON_BUTTON_H */
|
||||
41
engines/titanic/gfx/chev_left_off.cpp
Normal file
41
engines/titanic/gfx/chev_left_off.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/chev_left_off.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CChevLeftOff, CToggleSwitch);
|
||||
|
||||
CChevLeftOff::CChevLeftOff() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CChevLeftOff::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CChevLeftOff::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/chev_left_off.h
Normal file
48
engines/titanic/gfx/chev_left_off.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_CHEV_LEFT_OFF_H
|
||||
#define TITANIC_CHEV_LEFT_OFF_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CChevLeftOff : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CChevLeftOff();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_CHEV_LEFT_OFF_H */
|
||||
41
engines/titanic/gfx/chev_left_on.cpp
Normal file
41
engines/titanic/gfx/chev_left_on.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/chev_left_on.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CChevLeftOn, CToggleSwitch);
|
||||
|
||||
CChevLeftOn::CChevLeftOn() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CChevLeftOn::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CChevLeftOn::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/chev_left_on.h
Normal file
48
engines/titanic/gfx/chev_left_on.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_CHEV_LEFT_ON_H
|
||||
#define TITANIC_CHEV_LEFT_ON_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CChevLeftOn : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CChevLeftOn();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_CHEV_LEFT_ON_H */
|
||||
41
engines/titanic/gfx/chev_right_off.cpp
Normal file
41
engines/titanic/gfx/chev_right_off.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/chev_right_off.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CChevRightOff, CToggleSwitch);
|
||||
|
||||
CChevRightOff::CChevRightOff() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CChevRightOff::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CChevRightOff::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/chev_right_off.h
Normal file
48
engines/titanic/gfx/chev_right_off.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_CHEV_RIGHT_OFF_H
|
||||
#define TITANIC_CHEV_RIGHT_OFF_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CChevRightOff : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CChevRightOff();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_CHEV_RIGHT_OFF_H */
|
||||
41
engines/titanic/gfx/chev_right_on.cpp
Normal file
41
engines/titanic/gfx/chev_right_on.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/chev_right_on.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CChevRightOn, CToggleSwitch);
|
||||
|
||||
CChevRightOn::CChevRightOn() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CChevRightOn::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CChevRightOn::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/chev_right_on.h
Normal file
48
engines/titanic/gfx/chev_right_on.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_CHEV_RIGHT_ON_H
|
||||
#define TITANIC_CHEV_RIGHT_ON_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CChevRightOn : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CChevRightOn();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_CHEV_RIGHT_ON_H */
|
||||
41
engines/titanic/gfx/chev_send_rec_switch.cpp
Normal file
41
engines/titanic/gfx/chev_send_rec_switch.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/chev_send_rec_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CChevSendRecSwitch, CToggleSwitch);
|
||||
|
||||
CChevSendRecSwitch::CChevSendRecSwitch() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CChevSendRecSwitch::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CChevSendRecSwitch::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/chev_send_rec_switch.h
Normal file
48
engines/titanic/gfx/chev_send_rec_switch.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_CHEV_SEND_REC_SWITCH_H
|
||||
#define TITANIC_CHEV_SEND_REC_SWITCH_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CChevSendRecSwitch : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CChevSendRecSwitch();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_CHEV_SEND_REC_SWITCH_H */
|
||||
234
engines/titanic/gfx/edit_control.cpp
Normal file
234
engines/titanic/gfx/edit_control.cpp
Normal file
@@ -0,0 +1,234 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/edit_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CEditControl, CGameObject)
|
||||
ON_MESSAGE(EditControlMsg)
|
||||
ON_MESSAGE(MouseWheelMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CEditControl::CEditControl() : CGameObject(), _showCursor(false), _fontNumber(0), _fieldD4(2),
|
||||
_textR(0), _textG(0), _textB(0), _fieldF0(0), _isPassword(false) {
|
||||
}
|
||||
|
||||
void CEditControl::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_showCursor, indent);
|
||||
file->writeNumberLine(_editLeft, indent);
|
||||
file->writeNumberLine(_editBottom, indent);
|
||||
file->writeNumberLine(_editHeight, indent);
|
||||
file->writeNumberLine(_maxTextChars, indent);
|
||||
file->writeNumberLine(_fontNumber, indent);
|
||||
file->writeNumberLine(_fieldD4, indent);
|
||||
file->writeNumberLine(_textR, indent);
|
||||
file->writeNumberLine(_textG, indent);
|
||||
file->writeNumberLine(_textB, indent);
|
||||
file->writeQuotedLine(_text, indent);
|
||||
file->writeNumberLine(_fieldF0, indent);
|
||||
file->writeNumberLine(_isPassword, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CEditControl::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_showCursor = file->readNumber();
|
||||
_editLeft = file->readNumber();
|
||||
_editBottom = file->readNumber();
|
||||
_editHeight = file->readNumber();
|
||||
_maxTextChars = file->readNumber();
|
||||
_fontNumber = file->readNumber();
|
||||
_fieldD4 = file->readNumber();
|
||||
_textR = file->readNumber();
|
||||
_textG = file->readNumber();
|
||||
_textB = file->readNumber();
|
||||
_text = file->readString();
|
||||
_fieldF0 = file->readNumber();
|
||||
_isPassword = file->readNumber();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CEditControl::EditControlMsg(CEditControlMsg *msg) {
|
||||
switch (msg->_mode) {
|
||||
case EDIT_INIT: {
|
||||
// WORKAROUND: Fix original bug where MissiveOMat username & password
|
||||
// text weren't initialised after the first time you use the MissiveOMat
|
||||
_editHeight = _bounds.height();
|
||||
_editBottom = _bounds.bottom;
|
||||
_editLeft = _bounds.left + _bounds.width() / 2;
|
||||
_maxTextChars = msg->_param;
|
||||
setTextFontNumber(_fontNumber);
|
||||
|
||||
CEditControlMsg ctlMsg;
|
||||
ctlMsg._mode = EDIT_BORDERS;
|
||||
ctlMsg._param = _fieldD4;
|
||||
ctlMsg.execute(this);
|
||||
|
||||
ctlMsg._mode = EDIT_SET_COLOR;
|
||||
ctlMsg._textR = _textR;
|
||||
ctlMsg._textG = _textG;
|
||||
ctlMsg._textB = _textB;
|
||||
ctlMsg.execute(this);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDIT_CLEAR: {
|
||||
_text = "";
|
||||
CEditControlMsg ctlMsg;
|
||||
ctlMsg._mode = EDIT_RENDER;
|
||||
ctlMsg.execute(this);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDIT_SET_TEXT: {
|
||||
_text = msg->_text;
|
||||
CEditControlMsg ctlMsg;
|
||||
ctlMsg._mode = EDIT_RENDER;
|
||||
ctlMsg.execute(this);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDIT_GET_TEXT:
|
||||
msg->_text = _text;
|
||||
break;
|
||||
|
||||
case EDIT_LENGTH:
|
||||
msg->_param = _text.size();
|
||||
break;
|
||||
|
||||
case EDIT_MAX_LENGTH:
|
||||
_maxTextChars = msg->_param;
|
||||
break;
|
||||
|
||||
case EDIT_KEYPRESS:
|
||||
if (msg->_param == 8 && !_text.empty()) {
|
||||
_text = _text.left(_text.size() - 1);
|
||||
CEditControlMsg ctlMsg;
|
||||
ctlMsg._mode = EDIT_RENDER;
|
||||
ctlMsg.execute(this);
|
||||
} else if (msg->_param == 13) {
|
||||
msg->_param = 1000;
|
||||
} else if (msg->_param >= 32 && msg->_param < 127
|
||||
&& _text.size() < _maxTextChars) {
|
||||
char c = (char)msg->_param;
|
||||
_text += c;
|
||||
|
||||
CEditControlMsg ctlMsg;
|
||||
ctlMsg._mode = EDIT_RENDER;
|
||||
ctlMsg.execute(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDIT_SET_FONT:
|
||||
setTextFontNumber(msg->_param);
|
||||
break;
|
||||
|
||||
case EDIT_SHOW_CURSOR:
|
||||
if (!_showCursor) {
|
||||
_showCursor = true;
|
||||
CEditControlMsg ctlMsg;
|
||||
ctlMsg._mode = EDIT_RENDER;
|
||||
ctlMsg.execute(this);
|
||||
}
|
||||
break;
|
||||
|
||||
case EDIT_HIDE_CURSOR:
|
||||
if (_showCursor) {
|
||||
_showCursor = false;
|
||||
getTextCursor()->hide();
|
||||
}
|
||||
break;
|
||||
|
||||
case EDIT_BORDERS: {
|
||||
setTextHasBorders((msg->_param & 1) != 0);
|
||||
if (msg->_param & 4)
|
||||
_fieldF0 = 1;
|
||||
else if (msg->_param & 8)
|
||||
_fieldF0 = 2;
|
||||
else
|
||||
_fieldF0 = 0;
|
||||
|
||||
_isPassword = (msg->_param & 0x10) != 0;
|
||||
CEditControlMsg ctlMsg;
|
||||
ctlMsg._mode = EDIT_RENDER;
|
||||
ctlMsg.execute(this);
|
||||
break;
|
||||
}
|
||||
|
||||
case EDIT_SET_COLOR:
|
||||
setTextColor(msg->_textR, msg->_textG, msg->_textB);
|
||||
break;
|
||||
|
||||
case EDIT_SHOW:
|
||||
setVisible(true);
|
||||
break;
|
||||
|
||||
case EDIT_HIDE:
|
||||
setVisible(false);
|
||||
break;
|
||||
|
||||
case EDIT_RENDER: {
|
||||
makeDirty();
|
||||
CString str = _isPassword ? CString('*', _text.size()) : _text;
|
||||
setText(str);
|
||||
|
||||
int textWidth = getTextWidth();
|
||||
if (_fieldF0 == 2) {
|
||||
_bounds.left = _editLeft - textWidth / 2;
|
||||
_bounds.setWidth(textWidth + 16);
|
||||
setTextBounds();
|
||||
makeDirty();
|
||||
}
|
||||
|
||||
if (_showCursor) {
|
||||
CTextCursor *textCursor = getTextCursor();
|
||||
textCursor->show();
|
||||
textCursor->setPos(Point(_bounds.left + textWidth + 1, _bounds.top + 3));
|
||||
textCursor->setSize(Point(2, _editHeight - 6));
|
||||
textCursor->setColor(0xff, 0xff, 0xff);
|
||||
textCursor->clearBounds();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CEditControl::MouseWheelMsg(CMouseWheelMsg *msg) {
|
||||
if (_name != "MissiveOMat Welcome")
|
||||
return false;
|
||||
|
||||
if (msg->_wheelUp)
|
||||
scrollTextUp();
|
||||
else
|
||||
scrollTextDown();
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
64
engines/titanic/gfx/edit_control.h
Normal file
64
engines/titanic/gfx/edit_control.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_EDIT_CONTROL_H
|
||||
#define TITANIC_EDIT_CONTROL_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CEditControl : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool EditControlMsg(CEditControlMsg *msg);
|
||||
bool MouseWheelMsg(CMouseWheelMsg *msg);
|
||||
protected:
|
||||
bool _showCursor;
|
||||
int _editLeft;
|
||||
int _editBottom;
|
||||
int _editHeight;
|
||||
uint _maxTextChars;
|
||||
int _fontNumber;
|
||||
int _fieldD4;
|
||||
byte _textR;
|
||||
byte _textG;
|
||||
byte _textB;
|
||||
CString _text;
|
||||
int _fieldF0;
|
||||
bool _isPassword;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CEditControl();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_EDIT_CONTROL_H */
|
||||
41
engines/titanic/gfx/elevator_button.cpp
Normal file
41
engines/titanic/gfx/elevator_button.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/elevator_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CElevatorButton, CSTButton);
|
||||
|
||||
CElevatorButton::CElevatorButton() : CSTButton() {
|
||||
}
|
||||
|
||||
void CElevatorButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CSTButton::save(file, indent);
|
||||
}
|
||||
|
||||
void CElevatorButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CSTButton::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/elevator_button.h
Normal file
48
engines/titanic/gfx/elevator_button.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ELEVATOR_BUTTON_H
|
||||
#define TITANIC_ELEVATOR_BUTTON_H
|
||||
|
||||
#include "titanic/gfx/st_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CElevatorButton : public CSTButton {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CElevatorButton();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ELEVATOR_BUTTON_H */
|
||||
41
engines/titanic/gfx/get_from_succ.cpp
Normal file
41
engines/titanic/gfx/get_from_succ.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/get_from_succ.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CGetFromSucc, CToggleSwitch);
|
||||
|
||||
CGetFromSucc::CGetFromSucc() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CGetFromSucc::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CGetFromSucc::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/get_from_succ.h
Normal file
48
engines/titanic/gfx/get_from_succ.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_GET_FROM_SUCC_H
|
||||
#define TITANIC_GET_FROM_SUCC_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CGetFromSucc : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CGetFromSucc();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_GET_FROM_SUCC_H */
|
||||
41
engines/titanic/gfx/helmet_on_off.cpp
Normal file
41
engines/titanic/gfx/helmet_on_off.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/helmet_on_off.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CHelmetOnOff, CToggleSwitch);
|
||||
|
||||
CHelmetOnOff::CHelmetOnOff() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CHelmetOnOff::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CHelmetOnOff::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/helmet_on_off.h
Normal file
48
engines/titanic/gfx/helmet_on_off.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_HELMET_ON_OFF_H
|
||||
#define TITANIC_HELMET_ON_OFF_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CHelmetOnOff : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CHelmetOnOff();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_HELMET_ON_OFF_H */
|
||||
41
engines/titanic/gfx/home_photo.cpp
Normal file
41
engines/titanic/gfx/home_photo.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/home_photo.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CHomePhoto, CToggleSwitch);
|
||||
|
||||
CHomePhoto::CHomePhoto() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CHomePhoto::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CHomePhoto::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/home_photo.h
Normal file
48
engines/titanic/gfx/home_photo.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_HOME_PHOTO_H
|
||||
#define TITANIC_HOME_PHOTO_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CHomePhoto : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CHomePhoto();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_HOME_PHOTO_H */
|
||||
41
engines/titanic/gfx/icon_nav_action.cpp
Normal file
41
engines/titanic/gfx/icon_nav_action.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_action.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavAction, CToggleSwitch);
|
||||
|
||||
CIconNavAction::CIconNavAction() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CIconNavAction::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavAction::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/icon_nav_action.h
Normal file
48
engines/titanic/gfx/icon_nav_action.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_ACTION_H
|
||||
#define TITANIC_ICON_NAV_ACTION_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavAction : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CIconNavAction();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_ACTION_H */
|
||||
38
engines/titanic/gfx/icon_nav_butt.cpp
Normal file
38
engines/titanic/gfx/icon_nav_butt.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_butt.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavButt, CPetGraphic);
|
||||
|
||||
void CIconNavButt::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavButt::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/icon_nav_butt.h
Normal file
47
engines/titanic/gfx/icon_nav_butt.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_BUTT_H
|
||||
#define TITANIC_ICON_NAV_BUTT_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavButt : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_BUTT_H */
|
||||
41
engines/titanic/gfx/icon_nav_down.cpp
Normal file
41
engines/titanic/gfx/icon_nav_down.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_down.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavDown, CToggleSwitch);
|
||||
|
||||
CIconNavDown::CIconNavDown() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CIconNavDown::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavDown::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/icon_nav_down.h
Normal file
48
engines/titanic/gfx/icon_nav_down.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_DOWN_H
|
||||
#define TITANIC_ICON_NAV_DOWN_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavDown : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CIconNavDown();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_DOWN_H */
|
||||
38
engines/titanic/gfx/icon_nav_image.cpp
Normal file
38
engines/titanic/gfx/icon_nav_image.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_image.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavImage, CPetGraphic);
|
||||
|
||||
void CIconNavImage::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavImage::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/icon_nav_image.h
Normal file
47
engines/titanic/gfx/icon_nav_image.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_IMAGE_H
|
||||
#define TITANIC_ICON_NAV_IMAGE_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavImage : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_IMAGE_H */
|
||||
41
engines/titanic/gfx/icon_nav_left.cpp
Normal file
41
engines/titanic/gfx/icon_nav_left.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_left.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavLeft, CToggleSwitch);
|
||||
|
||||
CIconNavLeft::CIconNavLeft() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CIconNavLeft::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavLeft::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/icon_nav_left.h
Normal file
48
engines/titanic/gfx/icon_nav_left.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_LEFT_H
|
||||
#define TITANIC_ICON_NAV_LEFT_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavLeft : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CIconNavLeft();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_LEFT_H */
|
||||
38
engines/titanic/gfx/icon_nav_receive.cpp
Normal file
38
engines/titanic/gfx/icon_nav_receive.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_receive.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavReceive, CPetGraphic);
|
||||
|
||||
void CIconNavReceive::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavReceive::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/icon_nav_receive.h
Normal file
47
engines/titanic/gfx/icon_nav_receive.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_RECEIVE_H
|
||||
#define TITANIC_ICON_NAV_RECEIVE_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavReceive : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_RECEIVE_H */
|
||||
41
engines/titanic/gfx/icon_nav_right.cpp
Normal file
41
engines/titanic/gfx/icon_nav_right.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_right.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavRight, CToggleSwitch);
|
||||
|
||||
CIconNavRight::CIconNavRight() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CIconNavRight::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavRight::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/icon_nav_right.h
Normal file
48
engines/titanic/gfx/icon_nav_right.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_RIGHT_H
|
||||
#define TITANIC_ICON_NAV_RIGHT_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavRight : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CIconNavRight();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_RIGHT_H */
|
||||
38
engines/titanic/gfx/icon_nav_send.cpp
Normal file
38
engines/titanic/gfx/icon_nav_send.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_send.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavSend, CPetGraphic);
|
||||
|
||||
void CIconNavSend::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavSend::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/icon_nav_send.h
Normal file
47
engines/titanic/gfx/icon_nav_send.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_SEND_H
|
||||
#define TITANIC_ICON_NAV_SEND_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavSend : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_SEND_H */
|
||||
41
engines/titanic/gfx/icon_nav_up.cpp
Normal file
41
engines/titanic/gfx/icon_nav_up.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/icon_nav_up.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CIconNavUp, CToggleSwitch);
|
||||
|
||||
CIconNavUp::CIconNavUp() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CIconNavUp::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CIconNavUp::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/icon_nav_up.h
Normal file
48
engines/titanic/gfx/icon_nav_up.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ICON_NAV_UP_H
|
||||
#define TITANIC_ICON_NAV_UP_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CIconNavUp : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CIconNavUp();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ICON_NAV_UP_H */
|
||||
41
engines/titanic/gfx/keybrd_butt.cpp
Normal file
41
engines/titanic/gfx/keybrd_butt.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/keybrd_butt.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CKeybrdButt, CToggleSwitch);
|
||||
|
||||
CKeybrdButt::CKeybrdButt() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CKeybrdButt::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CKeybrdButt::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/keybrd_butt.h
Normal file
48
engines/titanic/gfx/keybrd_butt.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_KEYBRD_BUTT_H
|
||||
#define TITANIC_KEYBRD_BUTT_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CKeybrdButt : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CKeybrdButt();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_KEYBRD_BUTT_H */
|
||||
60
engines/titanic/gfx/move_object_button.cpp
Normal file
60
engines/titanic/gfx/move_object_button.cpp
Normal file
@@ -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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/move_object_button.h"
|
||||
#include "titanic/core/project_item.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMoveObjectButton, CSTButton)
|
||||
ON_MESSAGE(MouseButtonUpMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CMoveObjectButton::CMoveObjectButton() : CSTButton(), _field11C(1) {
|
||||
}
|
||||
|
||||
void CMoveObjectButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writePoint(_pos1, indent);
|
||||
file->writeNumberLine(_field11C, indent);
|
||||
|
||||
CSTButton::save(file, indent);
|
||||
}
|
||||
|
||||
void CMoveObjectButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_pos1 = file->readPoint();
|
||||
_field11C = file->readNumber();
|
||||
|
||||
CSTButton::load(file);
|
||||
}
|
||||
|
||||
bool CMoveObjectButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
|
||||
CGameObject *obj = dynamic_cast<CGameObject *>(getRoot()->findByName(_actionTarget));
|
||||
if (obj) {
|
||||
obj->petAddToInventory();
|
||||
obj->setVisible(_field11C);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
52
engines/titanic/gfx/move_object_button.h
Normal file
52
engines/titanic/gfx/move_object_button.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MOVE_OBJECT_BUTTON_H
|
||||
#define TITANIC_MOVE_OBJECT_BUTTON_H
|
||||
|
||||
#include "titanic/gfx/st_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMoveObjectButton : public CSTButton {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
|
||||
private:
|
||||
Point _pos1;
|
||||
int _field11C;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CMoveObjectButton();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MOVE_OBJECT_BUTTON_H */
|
||||
67
engines/titanic/gfx/music_control.cpp
Normal file
67
engines/titanic/gfx/music_control.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMusicControl, CBackground)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(MouseDoubleClickMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CMusicControl::CMusicControl() : CBackground(),
|
||||
_controlArea(BELLS), _controlVal(0), _controlMax(1), _enabled(true) {
|
||||
}
|
||||
|
||||
void CMusicControl::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_controlArea, indent);
|
||||
file->writeNumberLine(_controlVal, indent);
|
||||
file->writeNumberLine(_controlMax, indent);
|
||||
file->writeNumberLine(_enabled, indent);
|
||||
|
||||
CBackground::save(file, indent);
|
||||
}
|
||||
|
||||
void CMusicControl::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_controlArea = (MusicInstrument)file->readNumber();
|
||||
_controlVal = file->readNumber();
|
||||
_controlMax = file->readNumber();
|
||||
_enabled = file->readNumber();
|
||||
|
||||
CBackground::load(file);
|
||||
}
|
||||
|
||||
bool CMusicControl::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CMusicSettingChangedMsg changedMsg;
|
||||
changedMsg.execute(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicControl::MouseDoubleClickMsg(CMouseDoubleClickMsg *msg) {
|
||||
CMusicSettingChangedMsg changedMsg;
|
||||
changedMsg.execute(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
56
engines/titanic/gfx/music_control.h
Normal file
56
engines/titanic/gfx/music_control.h
Normal file
@@ -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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_CONTROL_H
|
||||
#define TITANIC_MUSIC_CONTROL_H
|
||||
|
||||
#include "titanic/core/background.h"
|
||||
#include "titanic/sound/music_room.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicControl : public CBackground {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg);
|
||||
public:
|
||||
MusicInstrument _controlArea;
|
||||
int _controlVal;
|
||||
int _controlMax;
|
||||
bool _enabled;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CMusicControl();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_CONTROL_H */
|
||||
38
engines/titanic/gfx/music_slider.cpp
Normal file
38
engines/titanic/gfx/music_slider.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_slider.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CMusicSlider, CMusicControl);
|
||||
|
||||
void CMusicSlider::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMusicControl::save(file, indent);
|
||||
}
|
||||
|
||||
void CMusicSlider::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMusicControl::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/music_slider.h
Normal file
47
engines/titanic/gfx/music_slider.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_SLIDER_H
|
||||
#define TITANIC_MUSIC_SLIDER_H
|
||||
|
||||
#include "titanic/gfx/music_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicSlider : public CMusicControl {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_SLIDER_H */
|
||||
67
engines/titanic/gfx/music_slider_pitch.cpp
Normal file
67
engines/titanic/gfx/music_slider_pitch.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_slider_pitch.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMusicSliderPitch, CMusicSlider)
|
||||
ON_MESSAGE(MusicSettingChangedMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
ON_MESSAGE(QueryMusicControlSettingMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CMusicSliderPitch::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMusicSlider::save(file, indent);
|
||||
}
|
||||
|
||||
void CMusicSliderPitch::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMusicSlider::load(file);
|
||||
}
|
||||
|
||||
bool CMusicSliderPitch::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
|
||||
if (_enabled) {
|
||||
if (++_controlVal > _controlMax)
|
||||
_controlVal = 0;
|
||||
|
||||
loadFrame(3 - _controlVal);
|
||||
playSound(TRANSLATE("z#54.wav", "z#585.wav"), 50);
|
||||
} else {
|
||||
playSound(TRANSLATE("z#46.wav", "z#577.wav"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSliderPitch::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
loadFrame(3 - _controlVal);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSliderPitch::QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg) {
|
||||
msg->_value = _controlVal - 2;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
50
engines/titanic/gfx/music_slider_pitch.h
Normal file
50
engines/titanic/gfx/music_slider_pitch.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_SLIDER_PITCH_H
|
||||
#define TITANIC_MUSIC_SLIDER_PITCH_H
|
||||
|
||||
#include "titanic/gfx/music_slider.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicSliderPitch : public CMusicSlider {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MusicSettingChangedMsg(CMusicSettingChangedMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
bool QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_SLIDER_PITCH_H */
|
||||
67
engines/titanic/gfx/music_slider_speed.cpp
Normal file
67
engines/titanic/gfx/music_slider_speed.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_slider_speed.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMusicSliderSpeed, CMusicSlider)
|
||||
ON_MESSAGE(MusicSettingChangedMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
ON_MESSAGE(QueryMusicControlSettingMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CMusicSliderSpeed::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMusicSlider::save(file, indent);
|
||||
}
|
||||
|
||||
void CMusicSliderSpeed::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMusicSlider::load(file);
|
||||
}
|
||||
|
||||
bool CMusicSliderSpeed::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
|
||||
if (_enabled) {
|
||||
if (++_controlVal > _controlMax)
|
||||
_controlVal = 0;
|
||||
|
||||
loadFrame(3 - _controlVal);
|
||||
playSound(TRANSLATE("z#54.wav", "z#585.wav"), 50);
|
||||
} else {
|
||||
playSound(TRANSLATE("z#46.wav", "z#577.wav"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSliderSpeed::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
loadFrame(3 - _controlVal);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSliderSpeed::QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg) {
|
||||
msg->_value = _controlVal - 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
50
engines/titanic/gfx/music_slider_speed.h
Normal file
50
engines/titanic/gfx/music_slider_speed.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_SLIDER_SPEED_H
|
||||
#define TITANIC_MUSIC_SLIDER_SPEED_H
|
||||
|
||||
#include "titanic/gfx/music_slider.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicSliderSpeed : public CMusicSlider {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MusicSettingChangedMsg(CMusicSettingChangedMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
bool QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_SLIDER_SPEED_H */
|
||||
38
engines/titanic/gfx/music_switch.cpp
Normal file
38
engines/titanic/gfx/music_switch.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CMusicSwitch, CMusicControl);
|
||||
|
||||
void CMusicSwitch::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMusicControl::save(file, indent);
|
||||
}
|
||||
|
||||
void CMusicSwitch::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMusicControl::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/music_switch.h
Normal file
47
engines/titanic/gfx/music_switch.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_SWITCH_H
|
||||
#define TITANIC_MUSIC_SWITCH_H
|
||||
|
||||
#include "titanic/gfx/music_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicSwitch : public CMusicControl {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_SWITCH_H */
|
||||
67
engines/titanic/gfx/music_switch_inversion.cpp
Normal file
67
engines/titanic/gfx/music_switch_inversion.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_switch_inversion.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMusicSwitchInversion, CMusicSwitch)
|
||||
ON_MESSAGE(MusicSettingChangedMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
ON_MESSAGE(QueryMusicControlSettingMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CMusicSwitchInversion::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMusicSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CMusicSwitchInversion::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMusicSwitch::load(file);
|
||||
}
|
||||
|
||||
bool CMusicSwitchInversion::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
|
||||
if (_enabled) {
|
||||
if (++_controlVal > _controlMax)
|
||||
_controlVal = 0;
|
||||
|
||||
loadFrame(_controlVal);
|
||||
playSound(TRANSLATE("z#59.wav", "z#590.wav"), 50);
|
||||
} else {
|
||||
playSound(TRANSLATE("z#46.wav", "z#577.wav"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSwitchInversion::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
loadFrame(_controlVal);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSwitchInversion::QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg) {
|
||||
msg->_value = _controlVal;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
50
engines/titanic/gfx/music_switch_inversion.h
Normal file
50
engines/titanic/gfx/music_switch_inversion.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_SWITCH_INVERSION_H
|
||||
#define TITANIC_MUSIC_SWITCH_INVERSION_H
|
||||
|
||||
#include "titanic/gfx/music_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicSwitchInversion : public CMusicSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MusicSettingChangedMsg(CMusicSettingChangedMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
bool QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_SWITCH_INVERSION_H */
|
||||
67
engines/titanic/gfx/music_switch_reverse.cpp
Normal file
67
engines/titanic/gfx/music_switch_reverse.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_switch_reverse.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMusicSwitchReverse, CMusicSwitch)
|
||||
ON_MESSAGE(MusicSettingChangedMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
ON_MESSAGE(QueryMusicControlSettingMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
void CMusicSwitchReverse::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMusicSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CMusicSwitchReverse::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CMusicSwitch::load(file);
|
||||
}
|
||||
|
||||
bool CMusicSwitchReverse::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
|
||||
if (_enabled) {
|
||||
if (++_controlVal > _controlMax)
|
||||
_controlVal = 0;
|
||||
|
||||
loadFrame(_controlVal);
|
||||
playSound(TRANSLATE("z#59.wav", "z#590.wav"), 50);
|
||||
} else {
|
||||
playSound(TRANSLATE("z#46.wav", "z#577.wav"));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSwitchReverse::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
loadFrame(_controlVal);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicSwitchReverse::QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg) {
|
||||
msg->_value = _controlVal;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
50
engines/titanic/gfx/music_switch_reverse.h
Normal file
50
engines/titanic/gfx/music_switch_reverse.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_SWITCH_REVERSE_H
|
||||
#define TITANIC_MUSIC_SWITCH_REVERSE_H
|
||||
|
||||
#include "titanic/gfx/music_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicSwitchReverse : public CMusicSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MusicSettingChangedMsg(CMusicSettingChangedMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
bool QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_SWITCH_REVERSE_H */
|
||||
59
engines/titanic/gfx/music_voice_mute.cpp
Normal file
59
engines/titanic/gfx/music_voice_mute.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/music_voice_mute.h"
|
||||
#include "titanic/sound/music_room.h"
|
||||
#include "titanic/translation.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CMusicVoiceMute, CMusicControl)
|
||||
ON_MESSAGE(MusicSettingChangedMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
ON_MESSAGE(QueryMusicControlSettingMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
bool CMusicVoiceMute::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
|
||||
if (++_controlVal > _controlMax)
|
||||
_controlVal = 0;
|
||||
|
||||
CMusicRoom *musicRoom = getMusicRoom();
|
||||
musicRoom->setMuteControl(_controlArea, _controlVal == 1 ? 1 : 0);
|
||||
loadFrame(1 - _controlVal);
|
||||
playSound(TRANSLATE("z#55.wav", "z#586.wav"), 50);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicVoiceMute::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
loadFrame(1 - _controlVal);
|
||||
CMusicRoom *musicRoom = getMusicRoom();
|
||||
musicRoom->setMuteControl(_controlArea, _controlVal == 1 ? 1 : 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CMusicVoiceMute::QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg) {
|
||||
msg->_value = _controlVal;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
56
engines/titanic/gfx/music_voice_mute.h
Normal file
56
engines/titanic/gfx/music_voice_mute.h
Normal file
@@ -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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_MUSIC_VOICE_MUTE_H
|
||||
#define TITANIC_MUSIC_VOICE_MUTE_H
|
||||
|
||||
#include "titanic/gfx/music_control.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CMusicVoiceMute : public CMusicControl {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MusicSettingChangedMsg(CMusicSettingChangedMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
bool QueryMusicControlSettingMsg(CQueryMusicControlSettingMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override {
|
||||
file->writeNumberLine(1, indent);
|
||||
CMusicControl::save(file, indent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override {
|
||||
file->readNumber();
|
||||
CMusicControl::load(file);
|
||||
}
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_MUSIC_VOICE_MUTE_H */
|
||||
41
engines/titanic/gfx/send_to_succ.cpp
Normal file
41
engines/titanic/gfx/send_to_succ.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/send_to_succ.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CSendToSucc, CToggleSwitch);
|
||||
|
||||
CSendToSucc::CSendToSucc() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CSendToSucc::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CSendToSucc::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/send_to_succ.h
Normal file
48
engines/titanic/gfx/send_to_succ.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SEND_TO_SUCC_H
|
||||
#define TITANIC_SEND_TO_SUCC_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSendToSucc : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CSendToSucc();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SEND_TO_SUCC_H */
|
||||
38
engines/titanic/gfx/sgt_selector.cpp
Normal file
38
engines/titanic/gfx/sgt_selector.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/sgt_selector.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CSGTSelector, CPetGraphic);
|
||||
|
||||
void CSGTSelector::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CSGTSelector::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/sgt_selector.h
Normal file
47
engines/titanic/gfx/sgt_selector.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SGT_SELECTOR_H
|
||||
#define TITANIC_SGT_SELECTOR_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSGTSelector : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SGT_SELECTOR_H */
|
||||
93
engines/titanic/gfx/slider_button.cpp
Normal file
93
engines/titanic/gfx/slider_button.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/slider_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSliderButton, CSTButton)
|
||||
ON_MESSAGE(MouseButtonUpMsg)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(MouseDragMoveMsg)
|
||||
ON_MESSAGE(StatusChangeMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CSliderButton::CSliderButton() : CSTButton(), _field114(0),
|
||||
_field118(0), _field11C(0) {
|
||||
}
|
||||
|
||||
void CSliderButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_field114, indent);
|
||||
file->writeNumberLine(_field118, indent);
|
||||
file->writeNumberLine(_field11C, indent);
|
||||
file->writePoint(_pos1, indent);
|
||||
|
||||
CSTButton::save(file, indent);
|
||||
}
|
||||
|
||||
void CSliderButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_field114 = file->readNumber();
|
||||
_field118 = file->readNumber();
|
||||
_field11C = file->readNumber();
|
||||
_pos1 = file->readPoint();
|
||||
|
||||
CSTButton::load(file);
|
||||
}
|
||||
|
||||
bool CSliderButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
|
||||
_pos1 = msg->_mousePos;
|
||||
CStatusChangeMsg changeMsg;
|
||||
changeMsg.execute(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSliderButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
_pos1 = msg->_mousePos;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSliderButton::MouseDragMoveMsg(CMouseDragMoveMsg *msg) {
|
||||
_pos1 = msg->_mousePos;
|
||||
if (_field118) {
|
||||
CStatusChangeMsg changeMsg;
|
||||
changeMsg.execute(this);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSliderButton::StatusChangeMsg(CStatusChangeMsg *msg) {
|
||||
CStatusChangeMsg changeMsg;
|
||||
changeMsg._oldStatus = _currentStatus;
|
||||
_currentStatus = (_pos1.y - _bounds.top) / _field11C;
|
||||
changeMsg._newStatus = _currentStatus;
|
||||
changeMsg.execute(_actionTarget);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSliderButton::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
58
engines/titanic/gfx/slider_button.h
Normal file
58
engines/titanic/gfx/slider_button.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SLIDER_BUTTON_H
|
||||
#define TITANIC_SLIDER_BUTTON_H
|
||||
|
||||
#include "titanic/gfx/st_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSliderButton : public CSTButton {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool MouseDragMoveMsg(CMouseDragMoveMsg *msg);
|
||||
bool StatusChangeMsg(CStatusChangeMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
private:
|
||||
int _field114;
|
||||
int _field118;
|
||||
int _field11C;
|
||||
Point _pos1;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CSliderButton();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SLIDER_BUTTON_H */
|
||||
41
engines/titanic/gfx/small_chev_left_off.cpp
Normal file
41
engines/titanic/gfx/small_chev_left_off.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/small_chev_left_off.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CSmallChevLeftOff, CToggleSwitch);
|
||||
|
||||
CSmallChevLeftOff::CSmallChevLeftOff() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CSmallChevLeftOff::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CSmallChevLeftOff::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/small_chev_left_off.h
Normal file
48
engines/titanic/gfx/small_chev_left_off.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SMALL_CHEV_LEFT_OFF_H
|
||||
#define TITANIC_SMALL_CHEV_LEFT_OFF_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSmallChevLeftOff : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CSmallChevLeftOff();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SMALL_CHEV_LEFT_OFF_H */
|
||||
41
engines/titanic/gfx/small_chev_left_on.cpp
Normal file
41
engines/titanic/gfx/small_chev_left_on.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/small_chev_left_on.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CSmallChevLeftOn, CToggleSwitch);
|
||||
|
||||
CSmallChevLeftOn::CSmallChevLeftOn() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CSmallChevLeftOn::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CSmallChevLeftOn::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/small_chev_left_on.h
Normal file
48
engines/titanic/gfx/small_chev_left_on.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SMALL_CHEV_LEFT_ON_H
|
||||
#define TITANIC_SMALL_CHEV_LEFT_ON_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSmallChevLeftOn : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CSmallChevLeftOn();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SMALL_CHEV_LEFT_ON_H */
|
||||
41
engines/titanic/gfx/small_chev_right_off.cpp
Normal file
41
engines/titanic/gfx/small_chev_right_off.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/small_chev_right_off.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CSmallChevRightOff, CToggleSwitch);
|
||||
|
||||
CSmallChevRightOff::CSmallChevRightOff() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CSmallChevRightOff::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CSmallChevRightOff::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/small_chev_right_off.h
Normal file
48
engines/titanic/gfx/small_chev_right_off.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SMALL_CHEV_RIGHT_OFF_H
|
||||
#define TITANIC_SMALL_CHEV_RIGHT_OFF_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSmallChevRightOff : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CSmallChevRightOff();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SMALL_CHEV_RIGHT_OFF_H */
|
||||
41
engines/titanic/gfx/small_chev_right_on.cpp
Normal file
41
engines/titanic/gfx/small_chev_right_on.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/small_chev_right_on.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CSmallChevRightOn, CToggleSwitch);
|
||||
|
||||
CSmallChevRightOn::CSmallChevRightOn() : CToggleSwitch() {
|
||||
}
|
||||
|
||||
void CSmallChevRightOn::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CToggleSwitch::save(file, indent);
|
||||
}
|
||||
|
||||
void CSmallChevRightOn::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CToggleSwitch::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
48
engines/titanic/gfx/small_chev_right_on.h
Normal file
48
engines/titanic/gfx/small_chev_right_on.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SMALL_CHEV_RIGHT_ON_H
|
||||
#define TITANIC_SMALL_CHEV_RIGHT_ON_H
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSmallChevRightOn : public CToggleSwitch {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CSmallChevRightOn();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_SMALL_CHEV_RIGHT_ON_H */
|
||||
95
engines/titanic/gfx/st_button.cpp
Normal file
95
engines/titanic/gfx/st_button.cpp
Normal file
@@ -0,0 +1,95 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/st_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSTButton, CBackground)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
ON_MESSAGE(MouseButtonUpMsg)
|
||||
ON_MESSAGE(EnterViewMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CSTButton::CSTButton() : CBackground() {
|
||||
_statusInc = 0;
|
||||
_actionTarget = "NULL";
|
||||
_fieldF0 = 0;
|
||||
_currentStatus = 0;
|
||||
_actionName = "NULL";
|
||||
_soundName = "NULL";
|
||||
_buttonFrame = 0;
|
||||
}
|
||||
|
||||
void CSTButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_statusInc, indent);
|
||||
file->writeQuotedLine(_actionTarget, indent);
|
||||
file->writeNumberLine(_fieldF0, indent);
|
||||
file->writeNumberLine(_currentStatus, indent);
|
||||
file->writeQuotedLine(_actionName, indent);
|
||||
file->writeQuotedLine(_soundName, indent);
|
||||
file->writeNumberLine(_buttonFrame, indent);
|
||||
|
||||
CBackground::save(file, indent);
|
||||
}
|
||||
|
||||
void CSTButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_statusInc = file->readNumber();
|
||||
_actionTarget = file->readString();
|
||||
_fieldF0 = file->readNumber();
|
||||
_currentStatus = file->readNumber();
|
||||
_actionName = file->readString();
|
||||
_soundName = file->readString();
|
||||
_buttonFrame = file->readNumber() != 0;
|
||||
|
||||
CBackground::load(file);
|
||||
}
|
||||
|
||||
bool CSTButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
playMovie(0);
|
||||
playSound(_soundName);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSTButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
|
||||
int oldStatus = _currentStatus;
|
||||
int newStatus = _currentStatus + _statusInc;
|
||||
|
||||
CStatusChangeMsg statusMsg(oldStatus, newStatus, false);
|
||||
_currentStatus = newStatus;
|
||||
statusMsg.execute(_actionTarget);
|
||||
|
||||
if (!statusMsg._success) {
|
||||
_currentStatus -= _statusInc;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSTButton::EnterViewMsg(CEnterViewMsg *msg) {
|
||||
loadFrame(_buttonFrame);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
61
engines/titanic/gfx/st_button.h
Normal file
61
engines/titanic/gfx/st_button.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_ST_BUTTON_H
|
||||
#define TITANIC_ST_BUTTON_H
|
||||
|
||||
#include "titanic/core/background.h"
|
||||
#include "titanic/messages/mouse_messages.h"
|
||||
#include "titanic/messages/messages.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSTButton : public CBackground {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
protected:
|
||||
int _statusInc;
|
||||
CString _actionTarget;
|
||||
int _fieldF0;
|
||||
int _currentStatus;
|
||||
CString _actionName;
|
||||
CString _soundName;
|
||||
int _buttonFrame;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CSTButton();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_ST_BUTTON_H */
|
||||
50
engines/titanic/gfx/status_change_button.cpp
Normal file
50
engines/titanic/gfx/status_change_button.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/status_change_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CStatusChangeButton, CSTButton)
|
||||
ON_MESSAGE(MouseButtonDownMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CStatusChangeButton::CStatusChangeButton() : CSTButton() {
|
||||
}
|
||||
|
||||
void CStatusChangeButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CSTButton::save(file, indent);
|
||||
}
|
||||
|
||||
void CStatusChangeButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CSTButton::load(file);
|
||||
}
|
||||
|
||||
bool CStatusChangeButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
|
||||
CStatusChangeMsg changeMsg;
|
||||
changeMsg._newStatus = _statusInc;
|
||||
changeMsg.execute(_actionTarget);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
49
engines/titanic/gfx/status_change_button.h
Normal file
49
engines/titanic/gfx/status_change_button.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_STATUS_CHANGE_BUTTON_H
|
||||
#define TITANIC_STATUS_CHANGE_BUTTON_H
|
||||
|
||||
#include "titanic/gfx/st_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CStatusChangeButton : public CSTButton {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
|
||||
public:
|
||||
CLASSDEF;
|
||||
CStatusChangeButton();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_STATUS_CHANGE_BUTTON_H */
|
||||
491
engines/titanic/gfx/text_control.cpp
Normal file
491
engines/titanic/gfx/text_control.cpp
Normal file
@@ -0,0 +1,491 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/text_control.h"
|
||||
#include "titanic/support/strings.h"
|
||||
#include "titanic/titanic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
CTextControl::CTextControl(uint count) :
|
||||
_stringsMerged(false), _maxCharsPerLine(-1), _lineCount(0),
|
||||
_displayEndCharIndex(-1), _unused1(0), _unused2(0), _unused3(0),
|
||||
_backR(0xff), _backG(0xff), _backB(0xff),
|
||||
_textR(0), _textG(0), _textB(200),
|
||||
_fontNumber(0), _npcFlag(0), _npcId(0), _hasBorder(true),
|
||||
_scrollTop(0), _textCursor(nullptr) {
|
||||
setupArrays(count);
|
||||
}
|
||||
|
||||
void CTextControl::setupArrays(int count) {
|
||||
freeArrays();
|
||||
if (count < 10 || count > 60)
|
||||
count = 10;
|
||||
_array.resize(count);
|
||||
}
|
||||
|
||||
void CTextControl::freeArrays() {
|
||||
_array.clear();
|
||||
}
|
||||
|
||||
void CTextControl::setup() {
|
||||
for (int idx = 0; idx < (int)_array.size(); ++idx) {
|
||||
_array[idx]._line.clear();
|
||||
setLineColor(idx, _textR, _textG, _textB);
|
||||
_array[idx]._string3.clear();
|
||||
}
|
||||
|
||||
_lineCount = 0;
|
||||
_stringsMerged = false;
|
||||
}
|
||||
|
||||
void CTextControl::setLineColor(uint lineNum, uint col) {
|
||||
setLineColor(lineNum, col & 0xff, (col >> 8) & 0xff, (col >> 16) & 0xff);
|
||||
}
|
||||
|
||||
void CTextControl::setLineColor(uint lineNum, byte r, byte g, byte b) {
|
||||
_array[lineNum]._rgb = getColorText(r, g, b);
|
||||
_stringsMerged = false;
|
||||
}
|
||||
|
||||
CString CTextControl::getColorText(byte r, byte g, byte b) {
|
||||
char buffer[6];
|
||||
if (!r)
|
||||
r = 1;
|
||||
if (!g)
|
||||
g = 1;
|
||||
if (!b)
|
||||
b = 1;
|
||||
|
||||
buffer[0] = TEXTCMD_SET_COLOR;
|
||||
buffer[1] = r;
|
||||
buffer[2] = g;
|
||||
buffer[3] = b;
|
||||
buffer[4] = TEXTCMD_SET_COLOR;
|
||||
buffer[5] = '\0';
|
||||
|
||||
return CString(buffer);
|
||||
}
|
||||
|
||||
void CTextControl::load(SimpleFile *file, int param) {
|
||||
if (!param) {
|
||||
uint numLines = file->readNumber();
|
||||
int charsPerLine = file->readNumber();
|
||||
uint count = file->readNumber();
|
||||
_bounds = file->readRect();
|
||||
_unused1 = file->readNumber();
|
||||
_unused2 = file->readNumber();
|
||||
_unused3 = file->readNumber();
|
||||
_backR = file->readNumber();
|
||||
_backG = file->readNumber();
|
||||
_backB = file->readNumber();
|
||||
_textR = file->readNumber();
|
||||
_textG = file->readNumber();
|
||||
_textB = file->readNumber();
|
||||
_hasBorder = file->readNumber() != 0;
|
||||
_scrollTop = file->readNumber();
|
||||
|
||||
setMaxCharsPerLine(charsPerLine);
|
||||
resize(numLines);
|
||||
_lineCount = (count == 0) ? 0 : count - 1;
|
||||
|
||||
assert(_array.size() >= count);
|
||||
for (uint idx = 0; idx < count; ++idx) {
|
||||
_array[idx]._line = file->readString();
|
||||
_array[idx]._rgb = file->readString();
|
||||
_array[idx]._string3 = file->readString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CTextControl::save(SimpleFile *file, int indent) {
|
||||
int numLines = _lineCount + 1;
|
||||
|
||||
file->writeNumberLine(_array.size(), indent);
|
||||
file->writeNumberLine(_maxCharsPerLine, indent);
|
||||
file->writeNumberLine(numLines, indent);
|
||||
|
||||
file->writeRect(_bounds, indent);
|
||||
file->writeNumberLine(_unused1, indent);
|
||||
file->writeNumberLine(_unused2, indent);
|
||||
file->writeNumberLine(_unused3, indent);
|
||||
file->writeNumberLine(_backR, indent);
|
||||
file->writeNumberLine(_backG, indent);
|
||||
file->writeNumberLine(_backB, indent);
|
||||
file->writeNumberLine(_textR, indent);
|
||||
file->writeNumberLine(_textG, indent);
|
||||
file->writeNumberLine(_textB, indent);
|
||||
file->writeNumberLine(_hasBorder, indent);
|
||||
file->writeNumberLine(_scrollTop, indent);
|
||||
|
||||
for (int idx = 0; idx < numLines; ++idx) {
|
||||
file->writeQuotedLine(_array[idx]._line, indent);
|
||||
file->writeQuotedLine(_array[idx]._rgb, indent);
|
||||
file->writeQuotedLine(_array[idx]._string3, indent);
|
||||
}
|
||||
}
|
||||
|
||||
void CTextControl::draw(CScreenManager *screenManager) {
|
||||
Rect tempRect = _bounds;
|
||||
|
||||
if (_hasBorder) {
|
||||
// Create border effect
|
||||
// Top edge
|
||||
tempRect.bottom = tempRect.top + 1;
|
||||
screenManager->fillRect(SURFACE_BACKBUFFER, &tempRect, _backR, _backG, _backB);
|
||||
|
||||
// Bottom edge
|
||||
tempRect.top = _bounds.bottom - 1;
|
||||
tempRect.bottom = _bounds.bottom;
|
||||
screenManager->fillRect(SURFACE_BACKBUFFER, &tempRect, _backR, _backG, _backB);
|
||||
|
||||
// Left edge
|
||||
tempRect = _bounds;
|
||||
tempRect.right = tempRect.left + 1;
|
||||
screenManager->fillRect(SURFACE_BACKBUFFER, &tempRect, _backR, _backG, _backB);
|
||||
|
||||
// Right edge
|
||||
tempRect = _bounds;
|
||||
tempRect.left = tempRect.right - 1;
|
||||
screenManager->fillRect(SURFACE_BACKBUFFER, &tempRect, _backR, _backG, _backB);
|
||||
}
|
||||
|
||||
getTextHeight(screenManager);
|
||||
|
||||
tempRect = _bounds;
|
||||
tempRect.grow(-2);
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
|
||||
_displayEndCharIndex = screenManager->writeString(SURFACE_BACKBUFFER, tempRect, _scrollTop, _lines, _textCursor);
|
||||
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
}
|
||||
|
||||
void CTextControl::mergeStrings() {
|
||||
if (!_stringsMerged) {
|
||||
_lines.clear();
|
||||
|
||||
for (int idx = 0; idx <= _lineCount; ++idx) {
|
||||
CString line = _array[idx]._rgb + _array[idx]._string3 +
|
||||
_array[idx]._line + "\n";
|
||||
_lines += line;
|
||||
}
|
||||
|
||||
_stringsMerged = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CTextControl::resize(uint count) {
|
||||
if (!count || _array.size() == count)
|
||||
return;
|
||||
_array.clear();
|
||||
_array.resize(count);
|
||||
}
|
||||
|
||||
CString CTextControl::getText() const {
|
||||
CString result = "";
|
||||
for (int idx = 0; idx <= _lineCount; ++idx)
|
||||
result += _array[idx]._line;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void CTextControl::setText(const CString &str) {
|
||||
setup();
|
||||
appendText(str);
|
||||
}
|
||||
|
||||
void CTextControl::setText(StringId stringId) {
|
||||
setText(g_vm->_strings[stringId]);
|
||||
}
|
||||
|
||||
void CTextControl::appendText(const CString &str) {
|
||||
int lineSize = _array[_lineCount]._line.size();
|
||||
int strSize = str.size();
|
||||
|
||||
if (_maxCharsPerLine == -1) {
|
||||
// No limit on horizontal characters, so append string to current line
|
||||
_array[_lineCount]._line += str;
|
||||
} else if ((lineSize + strSize) <= _maxCharsPerLine) {
|
||||
// New string fits into line, so add it on
|
||||
_array[_lineCount]._line += str;
|
||||
} else {
|
||||
// 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;
|
||||
}
|
||||
|
||||
void CTextControl::setColor(uint col) {
|
||||
_textR = col & 0xff;
|
||||
_textG = (col >> 8) & 0xff;
|
||||
_textB = (col >> 16) & 0xff;
|
||||
}
|
||||
|
||||
void CTextControl::setColor(byte r, byte g, byte b) {
|
||||
_textR = r;
|
||||
_textG = g;
|
||||
_textB = b;
|
||||
}
|
||||
|
||||
void CTextControl::remapColors(uint count, uint *srcColors, uint *destColors) {
|
||||
for (int lineNum = 0; lineNum <= _lineCount; ++lineNum) {
|
||||
if (_array[lineNum]._rgb.empty())
|
||||
continue;
|
||||
|
||||
// Get the rgb values
|
||||
uint r = _array[lineNum]._rgb[1];
|
||||
uint g = _array[lineNum]._rgb[2];
|
||||
uint b = _array[lineNum]._rgb[3];
|
||||
uint color = r | (g << 8) | (b << 16);
|
||||
|
||||
for (uint index = 0; index < count; ++index) {
|
||||
if (color == srcColors[index]) {
|
||||
// Found a match, so replace the color
|
||||
setLineColor(lineNum, destColors[index]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_stringsMerged = false;
|
||||
}
|
||||
|
||||
void CTextControl::setMaxCharsPerLine(int maxChars) {
|
||||
if (maxChars >= -1 && maxChars < 257)
|
||||
_maxCharsPerLine = maxChars;
|
||||
}
|
||||
|
||||
void CTextControl::updateStr3(int lineNum) {
|
||||
if (_npcFlag > 0 && _npcId > 0) {
|
||||
char line[5];
|
||||
line[0] = line[3] = TEXTCMD_NPC;
|
||||
line[1] = _npcFlag;
|
||||
line[2] = _npcId;
|
||||
line[4] = '\0';
|
||||
_array[lineNum]._string3 = CString(line);
|
||||
|
||||
_stringsMerged = false;
|
||||
_npcFlag = _npcId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int CTextControl::getTextWidth(CScreenManager *screenManager) {
|
||||
mergeStrings();
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
int textWidth = screenManager->stringWidth(_lines);
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
|
||||
return textWidth;
|
||||
}
|
||||
|
||||
int CTextControl::getTextHeight(CScreenManager *screenManager) {
|
||||
mergeStrings();
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
int textHeight = screenManager->getTextBounds(_lines, _bounds.width() - 4);
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
|
||||
return textHeight;
|
||||
}
|
||||
|
||||
void CTextControl::deleteLastChar() {
|
||||
if (!_array[_lineCount]._line.empty()) {
|
||||
_array[_lineCount]._line.deleteLastChar();
|
||||
_stringsMerged = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CTextControl::setNPC(int npcFlag, int npcId) {
|
||||
_npcFlag = npcFlag;
|
||||
_npcId = npcId;
|
||||
}
|
||||
|
||||
void CTextControl::scrollUp(CScreenManager *screenManager) {
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
_scrollTop -= screenManager->getFontHeight();
|
||||
constrainScrollUp(screenManager);
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
}
|
||||
|
||||
void CTextControl::scrollDown(CScreenManager *screenManager) {
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
_scrollTop += screenManager->getFontHeight();
|
||||
constrainScrollDown(screenManager);
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
}
|
||||
|
||||
void CTextControl::scrollUpPage(CScreenManager *screenManager) {
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
_scrollTop -= getPageHeight(screenManager);
|
||||
constrainScrollUp(screenManager);
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
}
|
||||
|
||||
void CTextControl::scrollDownPage(CScreenManager *screenManager) {
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
_scrollTop += getPageHeight(screenManager);
|
||||
constrainScrollDown(screenManager);
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
}
|
||||
|
||||
void CTextControl::scrollToTop(CScreenManager *screenManager) {
|
||||
_scrollTop = 0;
|
||||
}
|
||||
|
||||
void CTextControl::scrollToBottom(CScreenManager *screenManager) {
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
_scrollTop = getTextHeight(screenManager);
|
||||
constrainScrollDown(screenManager);
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
}
|
||||
|
||||
void CTextControl::constrainScrollUp(CScreenManager *screenManager) {
|
||||
if (_scrollTop < 0)
|
||||
_scrollTop = 0;
|
||||
}
|
||||
|
||||
void CTextControl::constrainScrollDown(CScreenManager *screenManager) {
|
||||
// Figure out the maximum scroll amount allowed
|
||||
int maxScroll = getTextHeight(screenManager) - _bounds.height() - 4;
|
||||
if (maxScroll < 0)
|
||||
maxScroll = 0;
|
||||
|
||||
if (_scrollTop > maxScroll)
|
||||
_scrollTop = maxScroll;
|
||||
}
|
||||
|
||||
int CTextControl::getPageHeight(CScreenManager *screenManager) {
|
||||
int textHeight = _bounds.height();
|
||||
int oldFontNumber = screenManager->setFontNumber(_fontNumber);
|
||||
int fontHeight = screenManager->getFontHeight();
|
||||
screenManager->setFontNumber(oldFontNumber);
|
||||
|
||||
if (fontHeight) {
|
||||
int lines = textHeight / fontHeight;
|
||||
if (lines > 1)
|
||||
--lines;
|
||||
return lines * fontHeight;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void CTextControl::addLine(const CString &str) {
|
||||
addLine(str, _textR, _textG, _textB);
|
||||
}
|
||||
|
||||
void CTextControl::addLine(const CString &str, uint color) {
|
||||
addLine(str, color & 0xff, (color >> 8) & 0xff,
|
||||
(color >> 16) & 0xff);
|
||||
}
|
||||
|
||||
void CTextControl::addLine(const CString &str, byte r, byte g, byte b) {
|
||||
if (_lineCount == ((int)_array.size() - 1)) {
|
||||
// Lines array is full
|
||||
if (_array.size() > 1) {
|
||||
// Delete the oldest line, and add a new entry at the end
|
||||
_array.remove_at(0);
|
||||
_array.resize(_array.size() + 1);
|
||||
}
|
||||
|
||||
--_lineCount;
|
||||
}
|
||||
|
||||
setLineColor(_lineCount, r, g, b);
|
||||
appendText(str);
|
||||
++_lineCount;
|
||||
}
|
||||
|
||||
bool CTextControl::handleKey(char c) {
|
||||
switch (c) {
|
||||
case (char)Common::KEYCODE_BACKSPACE:
|
||||
deleteLastChar();
|
||||
break;
|
||||
|
||||
case (char)Common::KEYCODE_RETURN:
|
||||
return true;
|
||||
|
||||
default:
|
||||
if ((byte)c >= 32 && (byte)c <= 127)
|
||||
appendText(CString(c, 1));
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void CTextControl::showCursor(int mode) {
|
||||
CScreenManager *screenManager = CScreenManager::setCurrent();
|
||||
_textCursor = screenManager->_textCursor;
|
||||
if (_textCursor) {
|
||||
_textCursor->setPos(Point(0, 0));
|
||||
_textCursor->setSize(Point(2, 10));
|
||||
_textCursor->setColor(0, 0, 0);
|
||||
_textCursor->setBlinkRate(300);
|
||||
_textCursor->setMode(mode);
|
||||
_textCursor->setBounds(_bounds);
|
||||
_textCursor->show();
|
||||
}
|
||||
}
|
||||
|
||||
void CTextControl::hideCursor() {
|
||||
if (_textCursor) {
|
||||
_textCursor->setMode(-1);
|
||||
_textCursor->hide();
|
||||
_textCursor = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
int CTextControl::getNPCNum(uint ident, uint startIndex) {
|
||||
if (!_stringsMerged) {
|
||||
mergeStrings();
|
||||
if (!_stringsMerged)
|
||||
return -1;
|
||||
}
|
||||
|
||||
uint size = _lines.size();
|
||||
if (startIndex < 5 || startIndex >= size)
|
||||
return -1;
|
||||
|
||||
// Loop backwards from the starting index to find an NPC ident sequence
|
||||
for (const char *strP = _lines.c_str() + startIndex;
|
||||
strP >= (_lines.c_str() + 5); --strP) {
|
||||
if (*strP == 26) {
|
||||
byte id = *(strP - 2);
|
||||
if (id == ident)
|
||||
return *(strP - 1);
|
||||
strP -= 3;
|
||||
} else if (*strP == 27) {
|
||||
strP -= 4;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void CTextControl::setFontNumber(int fontNumber) {
|
||||
if (fontNumber >= 0 && fontNumber <= 2)
|
||||
_fontNumber = fontNumber;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
288
engines/titanic/gfx/text_control.h
Normal file
288
engines/titanic/gfx/text_control.h
Normal file
@@ -0,0 +1,288 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_TEXT_CONTROL_H
|
||||
#define TITANIC_TEXT_CONTROL_H
|
||||
|
||||
#include "common/keyboard.h"
|
||||
#include "titanic/support/screen_manager.h"
|
||||
#include "titanic/support/strings.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CScreenManager;
|
||||
class CTextCursor;
|
||||
class SimpleFile;
|
||||
|
||||
class CTextControl {
|
||||
struct ArrayEntry {
|
||||
CString _line;
|
||||
CString _rgb;
|
||||
CString _string3;
|
||||
};
|
||||
|
||||
private:
|
||||
Common::Array<ArrayEntry> _array;
|
||||
CString _lines;
|
||||
bool _stringsMerged;
|
||||
Rect _bounds;
|
||||
int _maxCharsPerLine;
|
||||
int _lineCount;
|
||||
int _displayEndCharIndex;
|
||||
int _unused1;
|
||||
int _unused2;
|
||||
int _unused3;
|
||||
int _backR;
|
||||
int _backG;
|
||||
int _backB;
|
||||
int _textR;
|
||||
int _textG;
|
||||
int _textB;
|
||||
int _fontNumber;
|
||||
int _npcFlag;
|
||||
int _npcId;
|
||||
bool _hasBorder;
|
||||
int _scrollTop;
|
||||
CTextCursor *_textCursor;
|
||||
private:
|
||||
void setupArrays(int count);
|
||||
|
||||
void freeArrays();
|
||||
|
||||
/**
|
||||
* Merges the strings in the strings array
|
||||
*/
|
||||
void mergeStrings();
|
||||
|
||||
/**
|
||||
* Append text to the current text line
|
||||
*/
|
||||
void appendText(const CString &str);
|
||||
|
||||
void updateStr3(int lineNum);
|
||||
|
||||
/**
|
||||
* Ensures the Y scrolling for the text is in the valid range
|
||||
*/
|
||||
void constrainScrollUp(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Ensures the Y scrolling for the text is in the valid range
|
||||
*/
|
||||
void constrainScrollDown(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Get the page height for paging up and down
|
||||
*/
|
||||
int getPageHeight(CScreenManager *screenManager);
|
||||
public:
|
||||
CTextControl(uint count = 10);
|
||||
|
||||
/**
|
||||
* Set up the control
|
||||
*/
|
||||
void setup();
|
||||
|
||||
/**
|
||||
* Load the data for the control
|
||||
*/
|
||||
void load(SimpleFile *file, int param);
|
||||
|
||||
/**
|
||||
* Save the data for the control
|
||||
*/
|
||||
void save(SimpleFile *file, int indent);
|
||||
|
||||
/**
|
||||
* Set the bounds for the control
|
||||
*/
|
||||
void setBounds(const Rect &bounds) { _bounds = bounds; }
|
||||
|
||||
/**
|
||||
* Sets the flag for whether to draw a frame border around the control
|
||||
*/
|
||||
void setHasBorder(bool val) { _hasBorder = val; }
|
||||
|
||||
/**
|
||||
* Draw the control
|
||||
*/
|
||||
void draw(CScreenManager *screenManager);
|
||||
|
||||
void resize(uint count);
|
||||
|
||||
/**
|
||||
* Returns the text from all the lines as a single string
|
||||
*/
|
||||
CString getText() const;
|
||||
|
||||
/**
|
||||
* Set the text
|
||||
*/
|
||||
void setText(const CString &str);
|
||||
|
||||
/**
|
||||
* Set the text
|
||||
*/
|
||||
void setText(StringId stringId);
|
||||
|
||||
/**
|
||||
* Set text color
|
||||
*/
|
||||
void setColor(uint col);
|
||||
|
||||
/**
|
||||
* Set text color
|
||||
*/
|
||||
void setColor(byte r, byte g, byte b);
|
||||
|
||||
/**
|
||||
* Set the color for a line
|
||||
*/
|
||||
void setLineColor(uint lineNum, byte r, byte g, byte b);
|
||||
|
||||
/**
|
||||
* Gets the text string representing a color encoding
|
||||
*/
|
||||
static CString getColorText(byte r, byte g, byte b);
|
||||
|
||||
/**
|
||||
* Set the color for a line
|
||||
*/
|
||||
void setLineColor(uint lineNum, uint col);
|
||||
|
||||
/**
|
||||
* Sets the maximum number of characters per line
|
||||
*/
|
||||
void setMaxCharsPerLine(int maxChars);
|
||||
|
||||
/**
|
||||
* Delete the last character from the last line
|
||||
*/
|
||||
void deleteLastChar();
|
||||
|
||||
/**
|
||||
* Sets the current NPC text is being added for
|
||||
*/
|
||||
void setNPC(int npcFlag, int npcId);
|
||||
|
||||
/**
|
||||
* Returns the character index into _lines of the last
|
||||
* character to be displayed on-screen
|
||||
*/
|
||||
int displayEndIndex() const { return _displayEndCharIndex; }
|
||||
|
||||
/**
|
||||
* Scroll the text up
|
||||
*/
|
||||
void scrollUp(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Scroll the text down
|
||||
*/
|
||||
void scrollDown(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Scroll the text up one page
|
||||
*/
|
||||
void scrollUpPage(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Scroll the text down one page
|
||||
*/
|
||||
void scrollDownPage(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Scroll to the top of the text
|
||||
*/
|
||||
void scrollToTop(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Scroll to the bottom of the text
|
||||
*/
|
||||
void scrollToBottom(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Add a line to the text
|
||||
*/
|
||||
void addLine(const CString &str);
|
||||
|
||||
/**
|
||||
* Add a line to the text
|
||||
*/
|
||||
void addLine(const CString &str, uint color);
|
||||
|
||||
/**
|
||||
* Add a line to the text
|
||||
*/
|
||||
void addLine(const CString &str, byte r, byte g, byte b);
|
||||
|
||||
/**
|
||||
* Handles character processing to add or remove characters to
|
||||
* the current text line
|
||||
* @returns True if the Enter key was pressed
|
||||
*/
|
||||
bool handleKey(char c);
|
||||
|
||||
/**
|
||||
* Attaches the current system cursor to the text control,
|
||||
* and give it suitable defaults
|
||||
*/
|
||||
void showCursor(int mode);
|
||||
|
||||
/**
|
||||
* Removes the cursor attached to the text
|
||||
*/
|
||||
void hideCursor();
|
||||
|
||||
/**
|
||||
* Get an NPC Number embedded within on-screen text.
|
||||
* Used by the PET log to encode which NPC spoke
|
||||
* @param ident Npc Type. Always passed as 1
|
||||
* @param startIndex Starting index to scan backwards
|
||||
* through the log text to find an NPC ident sequence
|
||||
*/
|
||||
int getNPCNum(uint ident, uint startIndex);
|
||||
|
||||
/**
|
||||
* Replaces any occurrences of line colors that appear in the
|
||||
* first list with the entry at the same index in the dest list
|
||||
*/
|
||||
void remapColors(uint count, uint *srcColors, uint *destColors);
|
||||
|
||||
/**
|
||||
* Set the font number to use
|
||||
*/
|
||||
void setFontNumber(int fontNumber);
|
||||
|
||||
/**
|
||||
* Get the width of the text
|
||||
*/
|
||||
int getTextWidth(CScreenManager *screenManager);
|
||||
|
||||
/**
|
||||
* Get the required height to draw the text
|
||||
*/
|
||||
int getTextHeight(CScreenManager *screenManager);
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_TEXT_CONTROL_H */
|
||||
38
engines/titanic/gfx/text_down.cpp
Normal file
38
engines/titanic/gfx/text_down.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/text_down.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CTextDown, CPetGraphic);
|
||||
|
||||
void CTextDown::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CTextDown::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/text_down.h
Normal file
47
engines/titanic/gfx/text_down.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_TEXT_DOWN_H
|
||||
#define TITANIC_TEXT_DOWN_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CTextDown : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_TEXT_DOWN_H */
|
||||
38
engines/titanic/gfx/text_skrew.cpp
Normal file
38
engines/titanic/gfx/text_skrew.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/text_skrew.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CTextSkrew, CPetGraphic);
|
||||
|
||||
void CTextSkrew::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CTextSkrew::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/text_skrew.h
Normal file
47
engines/titanic/gfx/text_skrew.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_TEXT_SKREW_H
|
||||
#define TITANIC_TEXT_SKREW_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CTextSkrew : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_TEXT_SKREW_H */
|
||||
38
engines/titanic/gfx/text_up.cpp
Normal file
38
engines/titanic/gfx/text_up.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/text_up.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CTextUp, CPetGraphic);
|
||||
|
||||
void CTextUp::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
CPetGraphic::save(file, indent);
|
||||
}
|
||||
|
||||
void CTextUp::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CPetGraphic::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
47
engines/titanic/gfx/text_up.h
Normal file
47
engines/titanic/gfx/text_up.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_TEXT_UP_H
|
||||
#define TITANIC_TEXT_UP_H
|
||||
|
||||
#include "titanic/pet_control/pet_graphic.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CTextUp : public CPetGraphic {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
public:
|
||||
CLASSDEF;
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_TEXT_UP_H */
|
||||
42
engines/titanic/gfx/toggle_button.cpp
Normal file
42
engines/titanic/gfx/toggle_button.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/toggle_button.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
EMPTY_MESSAGE_MAP(CToggleButton, CBackground);
|
||||
|
||||
void CToggleButton::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_fieldE0, indent);
|
||||
|
||||
CBackground::save(file, indent);
|
||||
}
|
||||
|
||||
void CToggleButton::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_fieldE0 = file->readNumber();
|
||||
|
||||
CBackground::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
50
engines/titanic/gfx/toggle_button.h
Normal file
50
engines/titanic/gfx/toggle_button.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_TOGGLE_BUTTON_H
|
||||
#define TITANIC_TOGGLE_BUTTON_H
|
||||
|
||||
#include "titanic/core/background.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CToggleButton : public CBackground {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
protected:
|
||||
int _fieldE0;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CToggleButton() : CBackground(), _fieldE0(1) {}
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_TOGGLE_BUTTON_H */
|
||||
71
engines/titanic/gfx/toggle_switch.cpp
Normal file
71
engines/titanic/gfx/toggle_switch.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/gfx/toggle_switch.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
BEGIN_MESSAGE_MAP(CToggleSwitch, CGameObject)
|
||||
ON_MESSAGE(MouseButtonUpMsg)
|
||||
ON_MESSAGE(ChildDragStartMsg)
|
||||
ON_MESSAGE(ChildDragMoveMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
CToggleSwitch::CToggleSwitch() : CGameObject(), _pressed(false) {
|
||||
}
|
||||
|
||||
void CToggleSwitch::save(SimpleFile *file, int indent) {
|
||||
file->writeNumberLine(1, indent);
|
||||
file->writeNumberLine(_pressed, indent);
|
||||
file->writePoint(_pos1, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CToggleSwitch::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_pressed = file->readNumber();
|
||||
_pos1 = file->readPoint();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
bool CToggleSwitch::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
|
||||
_pressed = !_pressed;
|
||||
if (_pressed)
|
||||
setToggleColor(0, 0, 0);
|
||||
else
|
||||
setToggleColor(0xff, 0xff, 0xff);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CToggleSwitch::ChildDragStartMsg(CChildDragStartMsg *msg) {
|
||||
_pos1.x = msg->_mousePos.x - _bounds.left;
|
||||
_pos1.y = msg->_mousePos.y - _bounds.top;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CToggleSwitch::ChildDragMoveMsg(CChildDragMoveMsg *msg) {
|
||||
setPosition(Point(msg->_mousePos.x - _pos1.x, msg->_mousePos.y - _pos1.y));
|
||||
return true;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
54
engines/titanic/gfx/toggle_switch.h
Normal file
54
engines/titanic/gfx/toggle_switch.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_TOGGLE_SWITCH_H
|
||||
#define TITANIC_TOGGLE_SWITCH_H
|
||||
|
||||
#include "titanic/core/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CToggleSwitch : public CGameObject {
|
||||
DECLARE_MESSAGE_MAP;
|
||||
bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
|
||||
bool ChildDragStartMsg(CChildDragStartMsg *msg);
|
||||
bool ChildDragMoveMsg(CChildDragMoveMsg *msg);
|
||||
protected:
|
||||
bool _pressed;
|
||||
Point _pos1;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CToggleSwitch();
|
||||
|
||||
/**
|
||||
* Save the data for the class to file
|
||||
*/
|
||||
void save(SimpleFile *file, int indent) override;
|
||||
|
||||
/**
|
||||
* Load the data for the class from file
|
||||
*/
|
||||
void load(SimpleFile *file) override;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
||||
#endif /* TITANIC_TOGGLE_SWITCH_H */
|
||||
Reference in New Issue
Block a user