Author Topic: SQ6 pic mystery  (Read 11929 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

SQ6 pic mystery
« on: October 27, 2015, 01:37:52 PM »
I'm trying to just get some basic support for SCI2 pics (viewing, not editing) in SCI Companion, and I've been running into some curious issues.

640x480 pics are composed of a bunch of image layers. I've attached an example (there are more than just 4 layers in this one, but I got lazy).

The thing that's troubling is the coordinate system. The cels that comprise the layers come with a placement value (just like view cels), and so my first attempt was to just draw them at that location. It was clear though, that the x coordinate needed to be doubled (first strange thing). i.e. if the cel was at (101, y), then I needed to draw it at (202, y).

The y coordinates were also wrong, and it took me a long time to figure out how to fix it. I scoured the ScummVM code, but didn't see any adjustments made to the coordinates (including double the x). So I dunno if I just missed it, or the SCI32 support is just not far along enough to support 640x480. Anyway, through much trial and error, I discovered the y coordinates need to be doubled, and then multiplied by 1.2. At least, that seems to work so far.

I'm guessing the 1.2 is some kind of aspect ratio thing, but for the life of me I can't imagine why there would be these limitations on 640x480 pics. Any guesses? It's kind of annoying, since it limits where you can place image layers. They would have to be on even x boundaries, and "multiples of 2.4" y boundaries. Actually come to think of it, I guess (*if* there were an SCI2 pic editor), you could just add an addition line or 2 of transparent pixels to get things where you want.

The author of SV.exe clearly new about this, since the pics come out ok there. But... no source code...


Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SQ6 pic mystery
« Reply #1 on: October 27, 2015, 01:49:11 PM »
OOPS: OH crap, I just edited your post instead of replying! ooops... is there a way to undo that? - troflip
*Kawa reopens old tab*

I'm trying to just get some basic support for SCI2 pics (viewing, not editing) in SCI Companion, and I've been running into some curious issues.
yaaaay!
Quote
So I dunno if I just missed it, or the SCI32 support is just not far along enough to support 640x480.
Considering I just watched the first few seconds of the SQ6 intro cutscene -- up to the point where Rog is beamed through the ground -- in glorious 640x480...

I'll take a look at it myself, see if I can confirm anything.

Edit: Apparently there's something about script resolution vs display resolution?

Code: [Select]
void GfxCoordAdjuster32::setScriptsResolution(uint16 width, uint16 height) {
_scriptsRunningWidth = width;
_scriptsRunningHeight = height;
}

void GfxCoordAdjuster32::fromDisplayToScript(int16 &y, int16 &x) {
y = ((y * _scriptsRunningHeight) / g_sci->_gfxScreen->getHeight());
x = ((x * _scriptsRunningWidth) / g_sci->_gfxScreen->getWidth());
}

void GfxCoordAdjuster32::fromScriptToDisplay(int16 &y, int16 &x) {
y = ((y * g_sci->_gfxScreen->getHeight()) / _scriptsRunningHeight);
x = ((x * g_sci->_gfxScreen->getWidth()) / _scriptsRunningWidth);
}


(Troflip's post:)

Hmm... interesting. So maybe 640x480 resolution games still operate as 300x200 in script? That would account for the (2, 2.4) multipliers, and would also make sense for games like LSL6 which (I believe) had both low-res and high-res versions.
« Last Edit: October 27, 2015, 04:10:57 PM by Kawa »

Offline MusicallyInspired

Re: SQ6 pic mystery
« Reply #2 on: October 27, 2015, 03:48:25 PM »
If it means anything, hi-res AGS games also only use a 320x200 coordinate system, IIRC.  SCI Studio VGA could open some hi-res pics, couldn't it? Check the source for that?
Brass Lantern Prop Competition

Offline troflip

Re: SQ6 pic mystery
« Reply #3 on: October 27, 2015, 04:12:54 PM »
If it means anything, hi-res AGS games also only use a 320x200 coordinate system, IIRC.  SCI Studio VGA could open some hi-res pics, couldn't it? Check the source for that?

Interesting about AGS...

SCI Studio VGA can't seem to open hi-res SCI games, unfortunately. I tried SQ6 and KQ7 and it claims they are corrupt.

From looking at ScummVM, it looks like there is a kernel function that lets the scripts set the "resolution".
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SQ6 pic mystery
« Reply #4 on: October 27, 2015, 04:14:47 PM »
If it means anything, hi-res AGS games also only use a 320x200 coordinate system, IIRC.  SCI Studio VGA could open some hi-res pics, couldn't it? Check the source for that?
I just tried and failed to open SQ6 in SCI Studio 4/3.+(+). But let's look there for more confirmation anyway.

Edit: yeah that's a shit lead. But Mu's right about AGS, which would be an interesting little bit of convergent evolution in action right there.
« Last Edit: October 27, 2015, 04:17:19 PM by Kawa »

Offline troflip

Re: SQ6 pic mystery
« Reply #5 on: October 28, 2015, 01:25:11 AM »
Edit: yeah that's a shit lead. But Mu's right about AGS, which would be an interesting little bit of convergent evolution in action right there.

Well, yeah, I think the mystery's solved. It let Sierra write a single set of scripts for games that were offered in dual resolutions (although other than LSL6, which games are in both lo-res and hi-res?)

« Last Edit: October 28, 2015, 01:30:54 AM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: SQ6 pic mystery
« Reply #6 on: October 28, 2015, 02:09:39 AM »
although other than LSL6, which games are in both lo-res and hi-res?

Not many. GK1 and possibly PQ4 (at least PQ4 included both a VESA.DRV and VGA.DRV drivers). LSL6 packaged two separate games on the CD in separate folders, "HIRES" and "LORES". GK1 had a "RESOURCE.ALT" and "ALT.MAP" for the hi-res. These graphics were just the GUI and a few Views while the same Pics were scaled, depending on which driver is used.

Outside of these and QfG4 most of the SCI2+ games are hi-res/VESA only.
KQII Remake Pic

Offline ignatus

Re: SQ6 pic mystery
« Reply #7 on: October 28, 2015, 11:34:34 AM »
The Windows version of KQ6 CD is a mixture too, the backgrounds and characters are scaled but the GUI, objects and portraits are in hi res, even the intro and sierra tittle are .avi files. It's a late SCI 1.1 game, but maybe an interesting case.

Offline Collector

Re: SQ6 pic mystery
« Reply #8 on: October 28, 2015, 04:42:00 PM »
The dialog portraits from KQ6 Win and cursors are about the only graphical difference between the DOS and Win versions. Those dialog portraits are not available for the DOS interpreter as there is no VESA driver. Otherwise the game's graphics are merely scaled to 640x480 from 320x200.
KQII Remake Pic

Offline Kawa

Re: SQ6 pic mystery
« Reply #9 on: October 28, 2015, 04:56:19 PM »
The dialog portraits from KQ6 Win and cursors are about the only graphical difference between the DOS and Win versions. Those dialog portraits are not available for the DOS interpreter as there is no VESA driver. Otherwise the game's graphics are merely scaled to 640x480 from 320x200.
Also the icon bar. How could you forget the icon bar?
« Last Edit: October 28, 2015, 05:03:16 PM by Kawa »

Offline ignatus

Re: SQ6 pic mystery
« Reply #10 on: October 28, 2015, 08:41:55 PM »
And don't forget the inventory:


Offline Kawa

Re: SQ6 pic mystery
« Reply #11 on: October 28, 2015, 08:51:57 PM »
Still, that's enough of that side-track.

Offline MusicallyInspired

Re: SQ6 pic mystery
« Reply #12 on: October 28, 2015, 11:09:18 PM »
Here's a plot twist for you, all SCI games in Windows were hi-res because they were all upscaled to 640x400.
Brass Lantern Prop Competition

Offline Collector

Re: SQ6 pic mystery
« Reply #13 on: October 29, 2015, 12:37:19 AM »
Except you are pointing out the differences between the diskette version (int. 1.001.054) and CD (int 1.001.069), not DOS vs Win of the same release. The DOS CD version has the same icon bar and inventory as the Win. The question is what games included both lo and hi-res in the same release.
KQII Remake Pic

Offline Collector

Re: SQ6 pic mystery
« Reply #14 on: October 29, 2015, 12:42:12 AM »
Here's a plot twist for you, all SCI games in Windows were hi-res because they were all upscaled to 640x400.

Noted that the Windows games were hi-res, but not all needed to be upscaled, only the 320x200 DOS games. The VESA games like Torin did not need to be upscaled.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.074 seconds with 23 queries.