Open main menu

Difference between revisions of "AGI/Specifications/Resources"

→‎Logic resource format: -- Table wikification
(→‎Logic resource format: -- Table wikification)
Line 2,267: Line 2,267:
discussed at a later stage.
discussed at a later stage.


  <informaltable>
{| border="1"
    <tgroup cols="2">
|-
      <thead>
! Offset
        <row/ <entry/Offset/ <entry/Command/ /
! Command
      </thead>
|-
      <tbody>
| 0-1
        <row/ <entry/0-1/ <entry/Signature (0x12--0x34)//
| Signature (0x12--0x34)
        <row/ <entry/ 2 / <entry/Vol number that the resource is contained in//
|-
        <row/ <entry/3-4/ <entry/Length of the resource without the header//
2  
        <row/ <entry/5-6/ <entry/Offset of logic code message section//
| Vol number that the resource is contained in
      </tbody>
|-
    </tgroup>
| 3-4
  </informaltable>
| Length of the resource without the header
|-
| 5-6
| Offset of logic code message section
|}


All text that can be printed to the screen from within a logic script
All text that can be printed to the screen from within a logic script
Line 2,298: Line 2,302:
The first set of codes is the AGI commands themselves listed in
The first set of codes is the AGI commands themselves listed in
<xref linkend="tab-action-commands">, and they have the range 0x00--0xB6.
<xref linkend="tab-action-commands">, and they have the range 0x00--0xB6.
The second set of codes is as follows:
The second set of codes is as follows:
  <informaltable>
 
    <tgroup cols="2">
{| border="1"
      <thead>
|-
        <row/ <entry/Code/ <entry/Command/ /
! Code
      </thead>
! Command
      <tbody>
|-
        <row/ <entry/FF/ <entry/'''if'''/ /
| FF
        <row/ <entry/FE/ <entry/'''else''' or '''goto'''/ /
| '''if'''
        <row/ <entry/FD/ <entry/'''not'''/ /
|-
        <row/ <entry/FC/ <entry/'''or'''/ /
| FE
      </tbody>
| '''else''' or '''goto'''
    </tgroup>
|-
  </informaltable>
| FD
| '''not'''
|-
| FC
| '''or'''
|}


At present these are the only high value codes encountered. The
At present these are the only high value codes encountered. The
Line 2,436: Line 2,446:
follows:
follows:


  <informaltable>
{| border="1"
    <tgroup cols="2">
|-
      <thead>
! Offset
        <row/ <entry/Offset/ <entry/Description/ /
! Description
      </thead>
|-
      <tbody>
| 0-1
        <row/ <entry/0-1/ <entry/Pointer to implementation code/ /
| Pointer to implementation code
        <row/ <entry/ 2 / <entry/Number of arguments/ /
|-
        <row/ <entry/ 3 / <entry/Type of arguments/ /
2  
      </tbody>
| Number of arguments
    </tgroup>
|-
  </informaltable>
3  
| Type of arguments
|}


The type of arguments value is interpreted as follows:
The type of arguments value is interpreted as follows:
Line 2,485: Line 2,497:
The format of the message section is as follows:
The format of the message section is as follows:


  <informaltable>
{| border="1"
    <tgroup cols="2">
|-
      <thead>
! Offset
        <row/ <entry/Offset/ <entry/Description/ /
! Description
      </thead>
|-
      <tbody>
|  0
        <row/ <entry/ 0 / <entry/Number of messages//
| Number of messages
        <row/ <entry/1-2/ <entry/Pointer to the end of the messages//
|-
        <row/ <entry/3-4/ <entry/Array of message pointers//
| 1-2
        <row/ <entry/.../ <entry/Array of message pointers//
| Pointer to the end of the messages
        <row/ <entry/ ? / <entry/Start of the text data. From this point
|-
              the messages are encrypted with Avis Durgan (in their
| 3-4
              unencrypted form, each message is separated by a 0x00 value)//
| Array of message pointers
      </tbody>
|-
    </tgroup>
| ...
  </informaltable>
| Array of message pointers
|-
?  
| Start of the text data. From this point the messages are encrypted with Avis Durgan (in their unencrypted form, each message is separated by a 0x00 value)
|}


===Implementation===
===Implementation===