[Scummvm-cvs-logs] CVS: web/docs/specs aary.php,1.5,1.6

Max Horn fingolfin at users.sourceforge.net
Sat Aug 28 06:11:13 CEST 2004


Update of /cvsroot/scummvm/web/docs/specs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1374

Modified Files:
	aary.php 
Log Message:
Slighly improved AARY docs. Maybe we should start a SCUMM wiki?

Index: aary.php
===================================================================
RCS file: /cvsroot/scummvm/web/docs/specs/aary.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- aary.php	14 Oct 2003 13:08:38 -0000	1.5
+++ aary.php	28 Aug 2004 13:09:56 -0000	1.6
@@ -24,19 +24,19 @@
 however, the contents of an array is not stored in the data file and can only
 be set at run time. Arrays can be dynamically allocated and freed as desired,
 but only a limited number are available. See the section on Arrays in the <a
-href="scrp.php">Scripts</A> chapter for more information.
+href="scrp.php">Scripts</A> chapter for more information.</p>
 
-<p>The way Arrays work was redesigned completely between V5 and V6.
+<p>The way Arrays work was redesigned completely between V5 and V6.</p>
 
 <H2>V5 chunk format</H2>
 
 <p>V5 Arrays are not stored in the data file. 32 Arrays are available for
 access using the <tt>arrayOps</tt> opcode. V5 Arrays (sometimes also referred
-to as Strings) are one-dimensional.
+to as Strings) are one-dimensional.</p>
 
 <H2>V6 chunk format</H2>
 
-<p><pre class=box>
+<pre class=box>
  <u>Size</u>    <u>Type</u>             <u>Description</u>
  8       chunk tag        AARY chunk tag
 for each array {
@@ -49,15 +49,36 @@
 </pre>
 
 <p>The X and Y size fields are set to one less than the actual size;
-an entry of 0 means a size of 1. Arrays are always two-dimensional.
+an entry of 0 means a size of 1. Arrays are always two-dimensional.</p>
 
-<p>The type field can be one of:
+<p>The type field can be one of:</p>
 
-<p><table class=list align=center>
+<table class=list align=center>
 <tr><th>Value</th>	<th>Meaning</th></tr>
-<tr><td>0</td>		<td>Array of words</td></tr>
-<tr><td>1</td>		<td>Array of bytes</td></tr>
+<tr><td>1</td>		<td>Array of bits</td></tr>
+<tr><td>2</td>		<td>Array of nibbles (half bytes)</td></tr>
+<tr><td>3</td>		<td>Array of bytes</td></tr>
+<tr><td>4</td>		<td>Array of chars (= a string)</td></tr>
+<tr><td>5</td>		<td>Array of integers</td></tr>
 </table>
+
+<H2>V8 chunk format</H2>
+
+<pre class=box>
+ <u>Size</u>    <u>Type</u>             <u>Description</u>
+ 8       chunk tag        AARY chunk tag
+for each array {
+ 4       dword LE          array resource number
+ 4       dword LE          X size minus one
+ 4       dword LE          Y size minus one
+}
+ 4       dword LE          zero
+</pre>
+
+<p>The X and Y size fields are set to one less than the actual size;
+an entry of 0 means a size of 1. One dimensional arrays are simply a
+special case, where one dimension has size 1.</p>
+
 <HR><P STYLE="font-size: smaller; text-align: center">
 All material © 2000-2002 David Given, unless where stated otherwise.
 </P>





More information about the Scummvm-git-logs mailing list