AGSC (File Format): Difference between revisions

imported>Antidote
imported>Jackoalan
Line 103: Line 103:
==== ObjectID ====
==== ObjectID ====


After this are four tables of objects. Each object is identified with a 16-bit '''ObjectID''':
After this are four tables of objects. Each object is identified with a 16-bit '''ObjectID'''.


{| class="wikitable"
Factor5 designed ObjectIDs to used in a polymorphic manner. The top 2 bits of the ID are used
! Offset
to differentiate between SoundMacros, Keymaps, and Layers. If the ID passes a mask of 0x4000,
! Size
the object is a ''Keymap''. If the ID passes a mask of 0x8000, the object is a ''Layer''.
! Description
Otherwise, the object is assumed to be a ''SoundMacro''. ''Tables'' don't require this type of
|-
polymorphism due to the context in which they are accessed.
| 0x0
| 1
| '''Sound object type''' <ol start="0"><li>SoundMacro</li><li>Table</li><li value=4>Keymap</li><li value=8>Layer</li></ol>
|-
| 0x1
| 1
| '''Unique ID''' (per type namespacing)
|-
| 0x2
| colspan=2 {{unknown|End of ObjectID}}
|}
 
'''Note:''' This is the ID structure produced by MusyX data export tool used for ''Metroid Prime''
(which allocates all group ObjectIDs on export). The ObjectID structure is actually an arbitrary 16-bits in MusyX
(limited to 14-bit uniqueness). Based on findings from other games, this upper-byte type source is not 100% reliable,
since Factor5 updated the tool during the console's lifetime.


==== SoundMacros ====
==== SoundMacros ====
Anonymous user