Community
SCI Programming => SCI Development Tools => Topic started by: fsociety on January 04, 2016, 06:06:05 AM
-
So I was trying to import the main character from PQ4 into a view and I noticed after about the third loop when I save the whole view just goes grey and all the images are lost. Is there a size limit to a view?
-
Right now, most of my views seem to be hovering at about 25kb without any issues. So while yes there is a size limit, it is a total memory usage per room limit, not really a view particular limit.
-
A bug in SCICompanion perhaps.
-
Yep, probably a bug. What exactly were your repro steps? How were you "importing" it?
-
I loaded up PQ4 in SCICompanion and extracted the main walking cycle of the main character to seperate animated gifs.
I then loaded up the SCI 1.1 template, created a new view and imported the gifs as is. After about the 3rd or 4th loop I saved the view, reloaded up the project file and that view was grey. Even tried doing the rebuild function but no luck.
Quite a simple process to recreate.
-
I exported 4 loops from the PQ4 main character as animated gifs.
Then I created a new SCI1.1 template game, and created a new view.
I added 4 loops.
For each loop, I did Import image sequence, and selected "use imported palette".
Then I saved the view, closed and re-opened the game.
Result: No repro, everything was fine.
-
Odd. The only thing I did differently was I didn't use the imported palette - I let SCICompanion create a preferred palette. I wonder why it isn't working for me?
-
How large is the corrupt view? Did it shrink to 0KB? If not, can you export it as a patch file and attach it to a post?
-
I tried it again on another machine, was first the first save. Quit and reloaded SCICompanion and it turned grey. Here is the exported view
-
Also I tried exporting the patch file and importing it. It went from 200k to 20k with a grey box. Here is the original export of the patch and the imported result.
-
Ok, it looks like it is related to the size limit. I'm not sure exactly what's going on yet, but I can repro it if I try to save a view over 64KB. 64KB is the resource size limit for SCI 1.1 (the resource header format only uses 16 bits to specify resource size (audio files use a separate format so they can be larger)). Companion should throw up a warning instead of saving a corrupt resource, so something is wrong with my validation code. Thanks for reporting this!
You'll note that the PQ4 main character is 182KB (which is possible, since this is SCI 2.0).
-
Glad I could help. So if I wanted to use that resource I would essentially either make the sprite smaller or cut out frames.
-
Yup.
You can scale a loop by shift-dragging the border while having "Affect all cels in loop" checked. However, depending on the original sizes, this might affect the positioning of the cels slightly, so there might also need to be per-frame adjustments of the "Offset" of the cel.
Or you could delete every other frame, like you said.
Or possibly you could reduce the number of colors used in the view and that might cause the RLE compression to work better.
You could also split the view into two views with 4 loops each. But then you'd need to adjust a bunch of the code that expects a walking Actor to have 8 loops.