aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2007-11-22 22:32:58 +0000
committerEugene Sandulenko2007-11-22 22:32:58 +0000
commit2f6343c9cd6214691a7bb1b2d182c5b7115941be (patch)
tree9dc0c8bbbe03d78d885771e0b6e03d6dea78da8b /engines/scumm
parent919c0a2833273d3ae92d0eb3635a479c34e1ced9 (diff)
downloadscummvm-rg350-2f6343c9cd6214691a7bb1b2d182c5b7115941be.tar.gz
scummvm-rg350-2f6343c9cd6214691a7bb1b2d182c5b7115941be.tar.bz2
scummvm-rg350-2f6343c9cd6214691a7bb1b2d182c5b7115941be.zip
Implement soccer logic opcode 1003
svn-id: r29616
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/logic_he.cpp19
-rw-r--r--engines/scumm/he/logic_he.h1
2 files changed, 20 insertions, 0 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index 82c062b47d..925a86675f 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -864,6 +864,25 @@ int LogicHEsoccer::op_1002(int32 *args) {
return _vm->VAR(2) * args[0];
}
+int LogicHEsoccer::op_1003(int32 *args) {
+ double data[6], out[3];
+ int i;
+
+ for (i = 0; i < 6; i++) {
+ data[i] = getFromArray(args[0], 0, i);
+ }
+
+ out[0] = data[1] * data[5] - data[4] * data[2];
+ out[1] = data[5] * data[0] - data[3] * data[2];
+ out[2] = data[4] * data[0] - data[3] * data[1];
+
+ for (i = 0; i < 3; i++) {
+ putInArray(args[0], 0, i, scumm_round(out[i]));
+ }
+
+ return 1;
+}
+
int LogicHEsoccer::op_1004(int32 *args) {
// Identical to LogicHEfootball::op_1004
double res, a2, a4, a5;
diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h
index 4f850e0f32..0fbe27b125 100644
--- a/engines/scumm/he/logic_he.h
+++ b/engines/scumm/he/logic_he.h
@@ -121,6 +121,7 @@ public:
private:
int op_1001(int32 *args);
int op_1002(int32 *args);
+ int op_1003(int32 *args);
int op_1004(int32 *args);
};