mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
Implement soccer opcode 1006. Nothing is tested and is pure processing
of bb86 utility. svn-id: r29630
This commit is contained in:
parent
1d5392d56f
commit
e10aa928c1
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user