Opened 9 years ago

Closed 9 years ago

Last modified 13 months ago

#5615 closed defect (fixed)

SCI32: KQ7 coordinates bug

Reported by: SF/vakons Owned by: SF/mthreepwood
Priority: normal Component: Engine: SCI
Keywords: Cc:
Game: King's Quest 7

Description

Bug appeared in SVN revision 55744.
( http://scummvm.svn.sourceforge.net/viewvc/scummvm?view=revision&revision=55744 )

Logic was changed (in 5 places)
in engines\sci\graphics\frameout.cpp, view.cpp and compare.cpp.

If I got it right, check for SCI_VERSION_2 was removed
before checking "view->isSci2Hires()".

was:
2.0.hi UpscaledCoordinates
2.0 -
2.1.hi screen / script
2.1 screen / script
x.x.hi -
x.x -

now:
2.0.hi UpscaledCoordinates
2.0 -
2.1.hi UpscaledCoordinates
2.1 screen / script
x.x.hi UpscaledCoordinates
x.x -

In King's Quest VII (SCI v2.1) this causes incorrect coordinates handling (from SCI v2.0?),
because some of game objects returns view->isSci2Hires() == true.

(For example, "Corn Kernel" and "Ear of Corn", when they are being examined in 3D window,
or "Ripped Petticoat", when it's taken from cactus).

As a result, objects are placed with wrong coordinates, in addition their hotspots are somewhere outside.

By the way, that patch affects everything but 2.0 games, which Gabriel Knight 1 should be, according to http://wiki.scummvm.org/index.php/Sierra_Game_Versions#SCI_Games .
And it tries to handle v2.1 as v2.0.
So maybe Mac version is incorrectly detected as v2.1?

Sorry if I messed something up, I don't know much about SCI interpreters yet. :)

Ticket imported from: #3253208. Ticket imported from: bugs/5615.

Attachments (3)

KQ7_1.png (243.7 KB ) - added by SF/vakons 9 years ago.
Incorrectly placed object
KQ7_2.png (193.0 KB ) - added by SF/vakons 9 years ago.
3D window
KQ7_3.png (60.7 KB ) - added by SF/vakons 9 years ago.
Chapter one title screen

Download all attachments as: .zip

Change History (12)

comment:1 by SF/mthreepwood, 9 years ago

The problem is that KQ7 (which is SCI2.1) incorrectly reports that flag, or its meaning was changed at one point. What version of KQ7 do you have? (In the VERSION file). It might have had its meaning changed at one point.

The Mac version is SCI2.1, not SCI2. It's like that on purpose. That Sierra Game Versions page is mostly for DOS/Windows versions only.

comment:2 by SF/mthreepwood, 9 years ago

Owner: set to SF/mthreepwood

comment:3 by SF/vakons, 9 years ago

I put it incorrectly probably.
My KQ is not for Macintosh, it's for Windows, version 1.4, English, the one from 2 CD collection.

What I did is placed a warning message to frameout.cpp:

if (view->isSci2Hires()) {
  int16 dummyX = 0;
  _screen->adjustToUpscaledCoordinates(itemEntry->y, itemEntry->x);
  _screen->adjustToUpscaledCoordinates(itemEntry->z, dummyX);

warning("ver x.x, hires");

} else if (getSciVersion() == SCI_VERSION_2_1) {
  itemEntry->y = (itemEntry->y * _screen->getHeight()) / scriptsRunningHeight;
  itemEntry->x = (itemEntry->x * _screen->getWidth()) / scriptsRunningWidth;
  itemEntry->z = (itemEntry->z * _screen->getHeight()) / scriptsRunningHeight;
}

And compiled ScummVM for Windows (with text console turned on).

Message appears with some objects - corn or petticoat (as I mentioned above) and probably some others.
And those objects are shifted like this:

http://i54.tinypic.com/2vxf88w.jpg
http://i55.tinypic.com/kas51h.jpg

But it doesn't appear with other objects - stick, for example. And they are shown normally.

by SF/vakons, 9 years ago

Attachment: KQ7_1.png added

Incorrectly placed object

by SF/vakons, 9 years ago

Attachment: KQ7_2.png added

3D window

by SF/vakons, 9 years ago

Attachment: KQ7_3.png added

Chapter one title screen

comment:4 by SF/vakons, 9 years ago

The first place when message appears is the chapter title.
I have attached the screenshots.

comment:5 by SF/mthreepwood, 9 years ago

No, you put it correctly. All I needed was the VERSION file contents. The bitflag check is incorrect here and we should also check for screen size. I will fix later.

comment:6 by SF/vakons, 9 years ago

Thanks a lot. If any help needed, I'm at your service. :)

comment:7 by SF/mthreepwood, 9 years ago

Fixed in e1883a6

comment:8 by SF/mthreepwood, 9 years ago

Resolution: fixed
Status: newclosed

comment:9 by digitall, 13 months ago

Component: Engine: SCI
Game: King's Quest 7
Note: See TracTickets for help on using tickets.