diff options
author | Eugene Sandulenko | 2007-11-24 21:56:36 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-11-24 21:56:36 +0000 |
commit | e10aa928c16fc5b71f05c34df230f4c23ddb0036 (patch) | |
tree | 661f881cd271dba5472914ac052a2f94e5e4b810 /engines/scumm | |
parent | 1d5392d56f61165b2730e43548e972bf519c00c3 (diff) | |
download | scummvm-rg350-e10aa928c16fc5b71f05c34df230f4c23ddb0036.tar.gz scummvm-rg350-e10aa928c16fc5b71f05c34df230f4c23ddb0036.tar.bz2 scummvm-rg350-e10aa928c16fc5b71f05c34df230f4c23ddb0036.zip |
Implement soccer opcode 1006. Nothing is tested and is pure processing
of bb86 utility.
svn-id: r29630
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/he/logic_he.cpp | 22 | ||||
-rw-r--r-- | engines/scumm/he/logic_he.h | 6 |
2 files changed, 27 insertions, 1 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index 925a86675f..7620cf61cb 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -827,6 +827,11 @@ int LogicHEsoccer::versionID() { return 1; } +LogicHEsoccer::LogicHEsoccer(ScummEngine_v90he *vm) : LogicHE(vm) { + // Originally it used 0x1b0d bytes + _userDataD = (double *)calloc(1732, sizeof(double)); +} + int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) { int res = 0; @@ -901,4 +906,21 @@ int LogicHEsoccer::op_1004(int32 *args) { return 1; } +int LogicHEsoccer::op_1006(int32 *args) { + double a1 = args[1] * 0.01; + double a2 = args[2] * 0.01; + double a3 = args[3] * 0.01; + double var108, var109; + + _userDataD[529] = args[4]; + + var108 = atan2(a1, a3) * _userDataD[523] - args[4]; + var109 = _userDataD[526] - _userDataD[528] + (_userDataD[521] - atan2(_userDataD[524] - a2, a3)) * _userDataD[522]; + + writeScummVar(108, (int32)var108); + writeScummVar(109, (int32)var109); + + return 1; +} + } // End of namespace Scumm diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h index 0fbe27b125..f9e59f7db6 100644 --- a/engines/scumm/he/logic_he.h +++ b/engines/scumm/he/logic_he.h @@ -112,8 +112,11 @@ private: }; class LogicHEsoccer : public LogicHE { +private: + double *_userDataD; + public: - LogicHEsoccer(ScummEngine_v90he *vm) : LogicHE(vm) {} + LogicHEsoccer(ScummEngine_v90he *vm); int versionID(); int32 dispatch(int op, int numArgs, int32 *args); @@ -123,6 +126,7 @@ private: int op_1002(int32 *args); int op_1003(int32 *args); int op_1004(int32 *args); + int op_1006(int32 *args); }; } // End of namespace Scumm |