diff options
author | Eugene Sandulenko | 2007-11-22 21:24:50 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-11-22 21:24:50 +0000 |
commit | f4946e64008ebebcbba340c7b0d51ad466219e85 (patch) | |
tree | a4482e426a947f7c52b498d659897fe3dd588f86 /engines | |
parent | d8e8050015086f4139fb327a2a25a6859b858d8f (diff) | |
download | scummvm-rg350-f4946e64008ebebcbba340c7b0d51ad466219e85.tar.gz scummvm-rg350-f4946e64008ebebcbba340c7b0d51ad466219e85.tar.bz2 scummvm-rg350-f4946e64008ebebcbba340c7b0d51ad466219e85.zip |
Fix bug with rotating shapes in funshop games
svn-id: r29614
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/he/logic_he.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index 49acde9465..82c062b47d 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -468,19 +468,19 @@ void LogicHEfunshop::op_1004(int32 *args) { data[i + 1] = sin(at + a1) * sq; } - int minx = 2; - int miny = 3; + double minx = data[0]; + double miny = data[1]; for (i = 0; i <= 6; i += 2) { - if (data[i] < data[minx]) - minx = i; - if (data[i + 1] < data[miny]) - miny = i + 1; + if (data[i] < minx) + minx = data[i]; + if (data[i + 1] < miny) + miny = data[i + 1]; } for (i = 0; i <= 6; i += 2) { - data[i] -= data[minx]; - data[i + 1] -= data[miny]; + data[i] -= minx; + data[i + 1] -= miny; putInArray(args[0], 0, 519 + i, scumm_round(data[i])); putInArray(args[0], 0, 519 + i + 1, scumm_round(data[i + 1])); @@ -496,8 +496,8 @@ void LogicHEfunshop::op_1005(int32 *args) { data[i - 520 + 1] = getFromArray(args[0], 0, i); } - args1 = args[1] / 100.0 + 1; - args2 = args[2] / 100.0 + 1; + args1 = (double)args[1] * 0.01 + 1; + args2 = (double)args[2] * 0.01 + 1; for (i = 0; i < 4; i++) { data[2 * i] *= args1; |