Difference between revisions of "III/VC SCM"

From GTAMods Wiki
Jump to navigation Jump to search
m (stub template)
m
 
(25 intermediate revisions by 9 users not shown)
Line 1: Line 1:
  (02 00 01)h + 32 bit int    Jump to second segment
+
  (02 00 01)h + 32-bit offset    '''GOTO''' next header chunk
  byte                         Padding
+
  byte                           Target game ('l' - Liberty for III, 'm' - Miami for VC, unused at runtime)
   (Global vars)             Space for variable saving
+
  32-bit int                  Number of cutscene starts (VC Mobile only, unused at runtime)
  (02 00 01)h + 32 bit int    Jump to third segment
+
  (Cutscene start array)      32-bit offset of '''START_CUTSCENE''' command * 300 (VC Mobile only, unused at runtime)
  byte                         Segment id
+
   (Global variable space)     Space for global variable storage (first global offset is 8, 1212 in VC Mobile)
   32 bit int                 Number of models
+
  (02 00 01)h + 32-bit offset    '''GOTO''' next header chunk
   (model names)             24 byte model names * number of models(model 0 not used)
+
  byte                           Alignment (always 0, ignored)
  (02 00 01)h + 32 bit int    Jump to fourth segment
+
   32-bit int                   Number of used objects (always 1 in VC Mobile{{ref|*}})
  byte                         Segment id
+
   (Used object array)         24-byte object name * number of used objects (first object name is empty and therefore unused)
Some data
+
  (02 00 01)h + 32-bit offset    '''GOTO''' main script space (third header chunk is compiled only in script multifile)
   (mission addresses)       32 bit addresses * number of missions
+
  byte                           Alignment (always 0, ignored)
  (MAIN code)                 MAIN section, equal to size defined earlier
+
  32-bit int                  Main script size
  (mission code)               The mission data, missions stored at offsets defined earlier
+
   32-bit int                  Largest mission script size
 +
  16-bit int                  Number of mission scripts (120 in total)
 +
  16-bit int                  Number of exclusive mission scripts (possibly 1 in III, 2 in VC)
 +
  (Multi script array)         32-bit offset * number of mission scripts
 +
  (Main script space)           Space of main script (equal to size defined earlier)
 +
  (Mission scripts space)       Space of mission scripts (each one is stored at file offsets defined earlier)
  
{{Script-stub}}
+
{{note|*}} Compiler-wise, the model names of level objects are picked directly from [[OBJS]] and [[TOBJ]] sections of the [[IDE]] files whose <code>IDE Filename</code> begins with <code>DATA\</code> in [[Gta.dat|gta_vc.dat]].
  
[[Category:Mission Script]]
+
{{N|VC|III}}
 +
[[Category:Mission Script]] [[Category:File Formats]]

Latest revision as of 23:25, 12 January 2021

(02 00 01)h + 32-bit offset    GOTO next header chunk
byte                           Target game ('l' - Liberty for III, 'm' - Miami for VC, unused at runtime)
  32-bit int                   Number of cutscene starts (VC Mobile only, unused at runtime)
  (Cutscene start array)       32-bit offset of START_CUTSCENE command * 300 (VC Mobile only, unused at runtime)
  (Global variable space)      Space for global variable storage (first global offset is 8, 1212 in VC Mobile)
(02 00 01)h + 32-bit offset    GOTO next header chunk
byte                           Alignment (always 0, ignored)
  32-bit int                   Number of used objects (always 1 in VC Mobile[*])
  (Used object array)          24-byte object name * number of used objects (first object name is empty and therefore unused)
(02 00 01)h + 32-bit offset    GOTO main script space (third header chunk is compiled only in script multifile)
byte                           Alignment (always 0, ignored)
  32-bit int                   Main script size
  32-bit int                   Largest mission script size
  16-bit int                   Number of mission scripts (120 in total)
  16-bit int                   Number of exclusive mission scripts (possibly 1 in III, 2 in VC)
  (Multi script array)         32-bit offset * number of mission scripts
(Main script space)            Space of main script (equal to size defined earlier)
(Mission scripts space)        Space of mission scripts (each one is stored at file offsets defined earlier)

^ Compiler-wise, the model names of level objects are picked directly from OBJS and TOBJ sections of the IDE files whose IDE Filename begins with DATA\ in gta_vc.dat.