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...