mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
Implement soccer logic opcode 1003
svn-id: r29616
This commit is contained in:
parent
919c0a2833
commit
2f6343c9cd
@ -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;
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user