[Scummvm-devel] Skim, V6 and arrays

David Given dg at cowlark.com
Wed Apr 21 02:59:32 CEST 2004


On Wednesday 21 April 2004 08:29, M. Uli Kusterer wrote:
[...]
>   I've been reading the Scumm docs on the Skim page. Now, there are a
> few more questions that aren't answered there, and since you guys now
> the engine inside out, I thought you might be able to give me a quick
> answer without any of us having to dig through tons of source code.

Remember that the stuff on the Skim page is incomplete, unfinished, and likely 
extremely inaccurate!

>   When an array is loaded/created using opcodes like dim or dim2, this
> is like malloc()-ing an array in C, right? You get a new pointer to
> that array, and you're responsible for getting rid of it, right?

Is this V5 or V6?

V5 supports 32 arrays; when you initialise the array, you tell it which one 
you want.

V6 arrays are much more like how you describe; dim and dim2 create a new array 
and return you the handle of it. I believe you can also predefine arrays in 
the AARY chunk. But my recollection of this is very hazy; I'd suggest you 
look at the source code.

>   And local variables can only contain integers, right?

16 words, yes.

>   So, how does ScummVM handle strings? Do I create an array and stuff
> my characters in the bytes there?

Unsure.

-- 
+- David Given --McQ-+ "Gaping from its single obling socket was
|  dg at cowlark.com    | scintillating, many fauceted scarlet emerald..."
| (dg at tao-group.com) | --- Jim Theis, _The Eye of Argon_ (spelling
+- www.cowlark.com --+ original)




More information about the Scummvm-devel mailing list