ASYLUM: fix inventory ring drawing

This commit is contained in:
alxpnv 2021-04-12 10:44:24 +03:00 committed by Eugene Sandulenko
parent bc3ebf36db
commit 74f1691ca1
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
2 changed files with 3 additions and 3 deletions

View File

@ -520,7 +520,7 @@ void AsylumEngine::initSinCosTables(double a2, int32 a3, int32 a4) {
double angle = (double)(baseAngle % 360) * 3.141592653589 * 0.005555555555555556;
*val = (int16)(cos(angle) * a2 - (a3 / 2.0));
*(val + 1) = (int16)(sin(angle) * a2 - (a4 / 2.0));
*(val + 1) = (int16)(sin(angle) * a2 + (a4 / 2.0));
baseAngle += 360 / baseStep;
val += 2;
@ -552,7 +552,7 @@ Common::Point AsylumEngine::getSinCosValues(int32 index1, int32 index2) {
if (_scene->worldstats()->chapter == kChapter11) {
int32 offset = computeSinCosOffset(8) + index2 + 3;
values.x = _sinCosTables[2 * offset];
values.y = _sinCosTables[1];
values.y = _sinCosTables[2 * offset + 1];
} else {
int32 offset = computeSinCosOffset(index1) + index2;
values.x = _sinCosTables[2 * offset];

View File

@ -2001,7 +2001,7 @@ void Actor::updateAndDraw() {
adjustCoordinates(&coords);
Common::Point sinCos = _vm->getSinCosValues(count, i);
Common::Point point = coords + Common::Point(player->getPoint2()->x + sinCos.x, player->getPoint2()->y / 2 - sinCos.y - 20);
Common::Point point = coords + Common::Point(player->getPoint2()->x + sinCos.x, player->getPoint2()->y / 2 - sinCos.y);
if (mouse.x < point.x || mouse.x > (point.x + 40) || mouse.y < point.y || mouse.y > (point.y + 40)) {
getScreen()->addGraphicToQueue(getWorld()->cursorResourcesAlternate[_reaction[i] + 15],