added simple math constant folding, but commented it out for now
[gaemu.git] / dox / savformat3.txt
blobfaa304f4bdc1cc693333146ba11174a55649d198
1 Unless otherwise stated, values are stored as 4 byte Little-Endian Integers
2 When you see a { } it means that the number of bytes of the value inside is determined by the value of the outside.
3 Unless otherwise stated, numbers are in *Decimal* format.
4 ? Represents a 4-byte longint with an unknown value.
5 A number (such as 540 or 440) appear as-is in the file (as a longint).
6 The purpose of these bytes are essentially unknown.
7 k8: this is shitmaker version which introduced data structure with this format.
8 Most words (like game_id and hspeed) will be actual variables stored,
9 unless they begin with a capitol letter, like X or Hspeed, in which case
10 GM keeps track of the value without a variable.
13 540
14 game_id
15 room (the current room)
17 score (0 default)
18 lives (-1 default)
19 (double) health
20 cursor_sprite (deprecated, default of -1)
21 Steps since Game Start
23 440
24 Number of variables
26  Memory address
27  Type (0 = real, 1 = string)
28  (double) Real Value
29  How long String Value is { String Value }
30  Number of Rows (0 if this is only element)
31  {
32   Number of Columns
33   0 (x4 - these 4 0's only appear on the first run)
34   (Columns - 1 on first run, Columns thereafter) {
35    Type (0 = real, 1 = string)
36    (double) Real Value
37    How long String Value is { String Value }
38   }
39  }
41 How many room ID's there are
43  Remember this room?
44  {
45   540
46   How long room_caption is { room_caption }
47   room_width
48   room_height
49   room_speed
50   room_persistent
51   background_color
52   background_showcolor
53   How long "Creation code" is { "Creation code" }
54   How many Backgrounds there are (always 8)
55   {
56    background_visible
57    background_foreground
58    background_index (-1 for none)
59    (double) background_x
60    (double) background_y
61    background_htiled
62    background_vtiled
63    (double) background_xscale
64    (double) background_yscale
65    (double) background_hspeed
66    (double) background_vspeed
67    background_blend
68    (double) background_alpha
69   }
70   ?
71   How many Views there are (always 8)
72   {
73    view_visible
74    view_xview
75    view_yview
76    view_wview
77    view_hview
78    view_xport
79    view_yport
80    view_wport
81    view_hport
82    (double) view_angle
83    view_hborder
84    view_vborder
85    view_hspeed
86    view_vspeed
87    view_object (-1 for none)
88   }
89   instance_count
90   {
91    id
92    sprite_index
93    (double) image_index
94    (double) image_speed
95    (double) image_xscale
96    (double) image_yscale
97    (double) image_angle
98    (double) image_alpha
99    image_blend
100    mask_index
101    (double) depth
102    Has Sprite (as opposed to a circle with a questionmark)
103    (double) x
104    (double) y
105    (double) xstart
106    (double) ystart
107    (double) xprevious
108    (double) yprevious
109    (double) direction
110    (double) speed
111    (double) friction
112    (double) gravity_direction
113    (double) gravity
114    (double) hspeed
115    (double) vspeed
116    bbox_left
117    bbox_right
118    bbox_top
119    bbox_bottom
120    visible
121    solid
122    persistent
123    object_index
124    (12) {
125     alarm
126    }
127    0
128    0
129    path_index
130    (double) path_position
131    (double) path_positionprevious
132    (double) path_speed
133    (double) path_scale
134    (double) path_orientation
135    path_endaction
136    (double) Path x (eg if relative, set to (x,y), if absolute, set to (0,0))
137    (double) Path y
138    timeline_index
139    (double) timeline_position
140    (double) timeline_speed
141    How long "Instance Creation Code" is { "Instance Creation Code" }
142    440
143    Number of variables
144    {
145     Memory address
146     Type (0 = real, 1 = string)
147     (double) Real Value
148     How long String Value is { String Value }
149     Number of Rows (0 if this is only element)
150     {
151      Number of Columns
152      0 (x4 - these 4 0's only appear on the first run)
153      (Columns - 1 on first run, Columns thereafter) {
154       Type (0 = real, 1 = string)
155       (double) Real Value
156       How long String Value is { String Value }
157      }
158     }
159    }
160   }
161   0 (seems to be alternative instanses - looking into it)
162   Number of Tiles
163   {
164    (double) X
165    (double) Y
166    Background
167    Left
168    Top
169    Width
170    Height
171    (double) Depth
172    (double) ID
173    (double) Xscale
174    (double) Yscale
175    Blend
176    (double) Alpha
177    Visible
178   }
181 Last placed Instance ID (100000 = none, 100001 = first)
182 Last placed Tile ID (10000000 = none, 10000001 = first)