Open main menu

Difference between revisions of "SCUMM/Technical Reference/Index File"

More information about V3/4 Index with examples
(More information about V3/4 Index with examples)
Line 92: Line 92:
* Block Size does not include the 6 bytes used up by Block Name and Block Size, it's the size of the data that follows.
* Block Size does not include the 6 bytes used up by Block Name and Block Size, it's the size of the data that follows.


To read in the data, the following pseudo-code can be used:


==RN==
Read Number of Items
FROM 1 to "Number of Items" DO
  Read subvalue 1
  Read subvalue 2
END
 
 
==RN - Room names ==


  Block Size        (4 bytes)
  Block Size        (4 bytes)
Line 107: Line 115:
  Block Name        (2 bytes)
  Block Name        (2 bytes)
  No of items        (2 bytes)
  No of items        (2 bytes)
   *File Number     (1 byte)
   File Number     (1 byte)
   *Offset         (4 bytes)
   Offset           (4 bytes)


''File Number'' is interesting if a game is splitted on multiple disks. 0 means ''not used''.  
''File Number'' is interesting if a game is splitted on multiple disks. 0 means ''not used''.  
Line 119: Line 127:
  Block Name        (2 bytes)
  Block Name        (2 bytes)
  No of items        (2 bytes)
  No of items        (2 bytes)
   *Room Number     (1 byte)
   Room Number     (1 byte)
   *Offset         (4 bytes)
   Offset           (4 bytes)


The global scripts are stored in this directory.
The global scripts are stored in this directory. The offsets are relative to the room.


==0N==
==0N - Directory of Sounds ==


  Block Size        (4 bytes)
  Block Size        (4 bytes)
  Block Name        (2 bytes)
  Block Name        (2 bytes)
  No of items        (2 bytes)
  No of items        (2 bytes)
   *Room Number     (1 byte)
   Room Number     (1 byte)
   *Offset         (4 bytes)
   Offset           (4 bytes)
 
Similar to scripts but holds indexes for sounds.


==0C==
==0C - Directory of Costumes ==


  Block Size        (4 bytes)
  Block Size        (4 bytes)
  Block Name        (2 bytes)
  Block Name        (2 bytes)
  No of items        (2 bytes)
  No of items        (2 bytes)
   *Room Number     (1 byte)
   Room Number     (1 byte)
   *Offset         (4 bytes)
   Offset           (4 bytes)
 
Similar to scripts but holds indexes of customes.


==0O==
==0O - Directory of Objects==


  Block Size        (4 bytes)
  Block Size        (4 bytes)
  Block Name        (2 bytes)
  Block Name        (2 bytes)
  No of items        (2 bytes)
  No of items        (2 bytes)
   *Owner of Object (1 byte)
   Owner+state      (1 byte)
 
The Object owner and state are encoded in one byte. Example:
 
0xA2      → Owner = 0xA, State = 0x2
 
The pseudo decode code would be:
 
Owner  = ( (Owner+state Byte) AND 0xF0) >> 4
State  =  (Owner+state Byte) AND 0x0F


= Scumm 5 =
= Scumm 5 =
24

edits