All ints, either assumed or explicitly denoted with INT, are 4-byte little endian. \0 indicates a byte with value 0. All strings, always denoted with STR, are int-length-prefixed and int-null-suffixed. The prefix does not account for the suffix. Thus, they take the following format: INT length { BYTE Data } INT null terminator ----------------------------------------------- ----------------------------------------------- Enigma file indicator ("EGMf") Version (5) STR Icon data Start Screen in Fullscreen Mode Scaling (-1 to 999, -1* = Keep Aspect Ratio, 0 = Full Scale, 1-999 = Fixed Scale) Interpolate colors Between Pixels Window Resizable Always on Top Don't draw Border Don't show Buttons in Window Mode Display Cursor Freeze game when out of Focus Set resolution { Color depth (0 no change) Resolution (0-6: No change, 320x240, 640x480, 800x600, 1024x768, 1280x1024, 1600x1200) Frequency (0 no change) } Enable VSync Escape ends the Game F1 Shows Game Informaion F4 Toggles Fullscreen F5 Saves, F6 Loads Process Priority (0-3) Game ID Number of Constants { STR name STR value } Script count { STR Name } Object count { INT Id STR Unique Name } Room count { INT Id STR Name } Path count { INT Id STR Name } Sprite count { INT Id STR Name } Background Count { INT Id STR Name } Font Count { INT Id STR Name } Sound Count { INT Id STR Name } System indicator ("sys" \0) STR Whitespace STR Game Init Code STR Game Term Code Script indictator ("scr" \0) { STR Code } Object indicator ("obj" \0) { Sprite Index Solid Visible Depth Persistent Parent object index (-1 for None) Mask sprite index (-1 for Same as Sprite) { STR Event name int Additional index STR Code } Null int terminator (for each object) } Room indicator ("rmm" \0) { STR Room Caption Width Height Speed Background Color (ARGB) STR Room Creation Code Enable the use of Views (always 8) { Visible when room starts View X View Y View W View H Port X Port Y Port W Port H Hbor Vbor Hsp Vsp Object following } Instance count { Id Object index X Y STR Instance Creation Code } Tile Count { ID Layer Background X Y Source X Source Y Width Height } } Path indicator ("pth" \0) { Smooth (0-Straight, 1-Smooth) Closed (0-Open, 1-Closed) Precision Point count { X Y Speed } } Sprite indicator ("spr" \0) { Width Height X Origin Y Origin Smooth Preload Precise Collision Checking Subimage count { Transparent (ARGB) Unpack size STR Image data (zlib raw rgb) } } Background indicator ("bkg" \0) { Width Height Smooth Preload Transparent (ARGB) Unpack Size STR Image Data (zlib raw rgb) Tileset { Tile width Tile height Horizontal Offset Vertical Offset Horizontal Separation Vertical Separation } } Font indicator ("fnt" \0) { STR Font Name Size (12) Bold (0) Italic (0) Character Range Begin (32) Character Range End (127) { X Y Width Height Advance Kerning } STR Raw Alpha Channel } Sound indicator ("snd" \0) { Kind (0-Normal, 1-Background, 2-3D, 3-multimedia) Effects (bitflags: Chorus=1, Echo=2, Flanger=4, Gargle=8, Reverb=16) DBL Volume (0 to 1, 1 default) DBL Pan (-1 to 1, 0 default) Preload (Does nothing yet) STR Sound data (uncompressed, MOD Wav MP3 Flac or Ogg) }