GME Script table - entropia/tip-toi-reveng GitHub Wiki

At the position referenced at 0x0000 (commonly 0x0200), is the script table. It consists of

  • 32 bit: last used OID code
  • 32 bit: first used OID code
  • Then, 32bit offsets that point to play scripts. These correspond linearly to the OID codes. E.g. WWW_Bauernhof: The first piglet on page 6 has OID code 1499, the corresponding play script is located at 0x766A. The 100th 32bit word in the script table contains that offset. So 4×(OID - 1401) = script table index + 8. The value 1401 in this example is the first used OID code in the product (second 32bit word in the script table).
  • Some of these offsets are 0xFFFFFFFF. This indicates that the corresponding OID code is not used within the product.
  • The end of the offsets can be found at (script table + 8 + 4×(last used OID code - first used OID code).