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

Jump to navigation Jump to search
Correct and clarify entries on AARY
(Add class data to DOBJ)
(Correct and clarify entries on AARY)
(6 intermediate revisions by the same user not shown)
Line 47: Line 47:


{| border="1" cellspacing="0" cellpadding="4"
{| border="1" cellspacing="0" cellpadding="4"
|RM Room Names
|In V3/4
|-
|0R Directory Of Rooms
|In V3/4
|-
|0S Directory Of Scripts
|In V3/4
|-
|0N Directory Of Sounds
|In V3/4
|-
|0C Directory Of Costumes
|In V3/4
|-
|0O Directory Of Objects
|In V3/4
|-
|RNAM Room Names
|RNAM Room Names
|In V5+
|In V5+
Line 55: Line 73:
|DROO Directory of Rooms
|DROO Directory of Rooms
|In V5+
|In V5+
|-
|DRSC Direcory of Room Scripts
|In V8
|-
|-
|DSCR Directory of Scripts
|DSCR Directory of Scripts
Line 80: Line 95:
|In V7
|In V7
|-
|-
|RM Room Names
|DRSC Direcory of Room Scripts
|In V3/4
|In V8
|-
|0R Directory Of Rooms
|In V3/4
|-
|0S Directory Of Scripts?
|In V3/4
|-
|0N Directory Of Sounds?
|In V3/4
|-
|0C Directory Of Costumes?
|In V3/4
|-
|0O Directory Of Objects?
|In V3/4
|}
|}


= Scumm 3/4 =
= Scumm 3/4 =
Line 169: Line 168:
  Block Name        (2 bytes)
  Block Name        (2 bytes)
  No of items        (2 bytes)
  No of items        (2 bytes)
  Class data      (3 bytes)
   Owner+state      (1 byte)
   Owner+state      (1 byte)
The class data is LE. Class data can be as follows:
No Class = 0
kObjectClassYFlip = 18
kObjectClassXFlip = 19
kObjectClassNeverClip = 20
kObjectClassAlwaysClip = 21
kObjectClassIgnoreBoxes = 22
kObjectClassPlayer = 23 // Actor is controlled by the player
kObjectClassUntouchable = 24


The Object owner and state are encoded in one byte. Example:
The Object owner and state are encoded in one byte. Example:
Line 281: Line 292:
   *Class data    (4 bytes)
   *Class data    (4 bytes)


Information about objects. See remarks in V3/4 section how the owner+state value should be interpreted. Note that the index files stores ALL owner+state values, followed by ALL class data values. (Also, it may be that only Big Endian SCUMM games store the class data?)
Information about objects. See remarks in V3/4 section how the owner+state value should be interpreted. Note that the index files stores ALL owner+state values, followed by ALL class data values.
 
Class data has change since V3/4:
No class = 0
kObjectClassNeverClip = 20
kObjectClassAlwaysClip = 21
kObjectClassIgnoreBoxes = 22
kObjectClassYFlip = 29
kObjectClassXFlip = 30
kObjectClassPlayer = 31 // Actor is controlled by the player
kObjectClassUntouchable = 32


= Scumm 6 =
= Scumm 6 =
Line 325: Line 346:
  Block Name (4 bytes)
  Block Name (4 bytes)
  Block Size (4 bytes BE)
  Block Size (4 bytes BE)
   #Stop (2 bytes) Stops if 0x0000
   #num (2 bytes) Stops if 0x0000
   #A (2 bytes)
   #a (2 bytes)
   #B (2 bytes)
   #b (2 bytes)
   #C   (2 bytes)
   #c   (2 bytes)
   
   
  num=AARY no (itinerate through in loop)
  read num
if c=1 then
if num != 0:
  AARY=(num, 1, a, b)
  read a, b, c
else
  if c == 1:
  AARY=(num, 1, a, b)
    defineArray(num, kBitArray, a, b)
  else:
    defineArray(num, kIntArray, a, b)


If stop=0 you dont seek past the 6 bytes of A,B,C you just start the loop again.
If num is 0, that marks the end of the AARY block, and there are no "a", "b", or "c" parameters afterwards.




Line 368: Line 391:
  Costumes   (2 bytes)
  Costumes   (2 bytes)


== AARY ==
Mostly as in V6, except "Int" arrays are now "DWords".


== DROO,DSCR,DSOU,DCOS,DCHR,DOBJ,AARY ==
== DROO,DSCR,DSOU,DCOS,DCHR,DOBJ ==


All as in V5
All as in V6




Line 468: Line 494:




== DOBJ,AARY ==
== AARY ==
 
Mostly as in V7. AARY only has "a" and "b" parameters. "b" determines the order of the parameters when creating the array.
 
Block Name (4 bytes)
Block Size (4 bytes BE)
  #num (4 bytes) Stops if 0x00000000
  #a (4 bytes)
  #b (4 bytes)
 
while num != 0:
  read a and b
  if b != 0:
    defineArray(num, kIntArray, b, a)
  else:
    defineArray(num, kIntArray, a, b)
 
 
== DOBJ ==  


As in V7
As in V7.




[[Category: SCUMM Technical Reference]]
[[Category: SCUMM Technical Reference]]
125

edits

Navigation menu