aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control/star_control_sub2.cpp
diff options
context:
space:
mode:
authorPeter Kohaut2017-03-20 00:30:41 +0100
committerPeter Kohaut2017-03-20 00:30:41 +0100
commit02185fbcf52a406fb6a381ccfdfdd46077c24127 (patch)
treec29431a4344664c27862d43967d1c9e9f3627ea6 /engines/titanic/star_control/star_control_sub2.cpp
parent25e5143f99dab91d53eb52de703ef1b4c9ee2656 (diff)
parent89d5eeaa5819c10266160fd1bf12f88f6e073a12 (diff)
downloadscummvm-rg350-02185fbcf52a406fb6a381ccfdfdd46077c24127.tar.gz
scummvm-rg350-02185fbcf52a406fb6a381ccfdfdd46077c24127.tar.bz2
scummvm-rg350-02185fbcf52a406fb6a381ccfdfdd46077c24127.zip
Merge branch 'master' of https://github.com/scummvm/scummvm
Diffstat (limited to 'engines/titanic/star_control/star_control_sub2.cpp')
-rw-r--r--engines/titanic/star_control/star_control_sub2.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/engines/titanic/star_control/star_control_sub2.cpp b/engines/titanic/star_control/star_control_sub2.cpp
index cf7190fb34..ebeb9bf239 100644
--- a/engines/titanic/star_control/star_control_sub2.cpp
+++ b/engines/titanic/star_control/star_control_sub2.cpp
@@ -21,9 +21,15 @@
*/
#include "titanic/star_control/star_control_sub2.h"
+#include "titanic/star_control/star_control_sub12.h"
namespace Titanic {
+bool CStarControlSub2::setup() {
+ loadData("STARFIELD/132");
+ return true;
+}
+
bool CStarControlSub2::loadYale(int v1) {
clear();
error("Original loadYale not supported");
@@ -31,19 +37,20 @@ bool CStarControlSub2::loadYale(int v1) {
}
bool CStarControlSub2::selectStar(CSurfaceArea *surfaceArea,
- CStarControlSub12 *sub12, int flags, const Common::Point &pt) {
- // TODO
- return true;
+ CStarControlSub12 *sub12, const Common::Point &pt, void *handler) {
+ int index = baseFn1(surfaceArea, sub12, pt);
+ if (index == -1) {
+ return false;
+ } else if (!handler) {
+ sub12->proc14(_data[index]._position);
+ return true;
+ } else {
+ error("no handler ever passed in original");
+ }
}
bool CStarControlSub2::loadStar() {
- // TODO
- return true;
-}
-
-bool CStarControlSub2::setup() {
- // TODO
- return true;
+ error("loadStar not supported");
}
} // End of namespace Titanic