Bin Dialog File Format

From Staredit Network Wiki
Revision as of 13:23, 1 June 2023 by FaRTy1billion (Talk | contribs) (Added File Formats category)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • Byte = 8 bits
  • Word = 2 bytes (Short)
  • Long = 4 bytes
  • All values are unsigned.

Character String = number of characters + the NULL (0 value) string terminator (e.g. "test string" is 12 bytes)

Bin File Layout

  • Dialog Structs
  • SMK Structs
  • Character Strings

Note that the file does not necessarily have to be in this order as long as all pointers are correct.

Dialog Struct

Struct Size: 86 bytes

The first entry in all .bin files is setting up the dialog area. The format of it is slightly different, such as the SMK offset becomes the offset to the first control.

  • 00 - long - Next Entry Offset
  • 04 - word - Left Position
  • 06 - word - Top Position
  • 08 - word - Right Position
  • 0A - word - Bottom Position
  • 0C - word - Width
  • 0E - word - Height
  • 10 - long - Unknown/Unused
  • 14 - long - String Offset (String use depends on object type)
  • 18 - long - Flags (See Dialog Flags)
  • 1C - long - Unknown/Unused
  • 20 - word - Control Identifier (A unique number used within SC to identify the control and how it is used. Those familiar with .res files should understand this.)
  • 22 - long - Control Type (See Control Types)
  • 26 - long - Unknown/Unused
  • 2A - long - Unknown/Unused
  • 2E - long - Unknown/Unused
  • 32 - long - Unknown/Unused
  • 36 - word - Response Area Left/Area Width
  • 38 - word - Response Area Top /Area height
  • 3A - word - Response Area Right
  • 3C - word - Response Area Bottom
  • 3E - long - Unknown/Unused
  • 42 - long - SMK Offset
  • 46 - word - Text Offset X
  • 48 - word - Text Offset Y
  • 4A - word - Response Area Width
  • 4C - word - Response Area Height
  • 4E - long - Unknown/Unused
  • 52 - long - Unknown/Unused

SMK Struct

Struct Size: 30 bytes

  • 00 - long - SMK Overlay Offset
  • 04 - word - Flags (See SMK Flags)
  • 06 - long - Unknown/Unused
  • 0A - long - SMK Filename (String Offset)
  • 0E - long - Unknown/Unused
  • 12 - word - SMK Overlay X Position
  • 14 - word - SMK Overlay Y Position
  • 16 - long - Unknown/Unused
  • 1A - long - Unknown/Unused

Reference Lists

Flags

  • 0x00000001 - Unknown 0
  • 0x00000002 - Disabled
  • 0x00000004 - Unknown 2
  • 0x00000008 - Visible
  • 0x00000010 - Responds to Events
  • 0x00000020 - Unknown 5
  • 0x00000040 - Cancel Button
  • 0x00000080 - No Hover Sound
  • 0x00000100 - Special Hotkey (Virtual Key)
  • 0x00000200 - Has Hotkey
  • 0x00000400 - Smallest Font (Size 10)
  • 0x00000800 - Larger Font (Size 16)
  • 0x00001000 - Unknown 12
  • 0x00002000 - Transparent (Hide Color 0)
  • 0x00004000 - Largest Font (Size 16x)
  • 0x00008000 - Unknown 15
  • 0x00010000 - Smaller Font (Size 14)
  • 0x00020000 - Unknown 17
  • 0x00040000 - Apply Translucency
  • 0x00080000 - Default Button
  • 0x00100000 - Bring to Front
  • 0x00200000 - Center Text
  • 0x00400000 - Align Right Text
  • 0x00800000 - Center Text
  • 0x01000000 - Align Top
  • 0x02000000 - Align Middle
  • 0x04000000 - Align Bottom
  • 0x08000000 - Unknown 27
  • 0x10000000 - Unknown 28
  • 0x20000000 - Unknown 29
  • 0x40000000 - No Click Sound
  • 0x80000000 - Unknown 31

SMK Flags

  • 0x0001 - Fade In
  • 0x0002 - Dark
  • 0x0004 - Repeat Forever
  • 0x0008 - Show If Over
  • 0x0010 - Unknown 4
  • (rest unknown/unused)

Control Types

  • 0x00000000 - Dialog Box
  • 0x00000001 - Default Button
  • 0x00000002 - Button
  • 0x00000003 - Option Button
  • 0x00000004 - Check box
  • 0x00000005 - Image
  • 0x00000006 - Slider bar
  • 0x00000007 - Unknown/Unused
  • 0x00000008 - Text box
  • 0x00000009 - Label (Left align)
  • 0x0000000A - Label (Right align)
  • 0x0000000B - Label (Center align)
  • 0x0000000C - List box
  • 0x0000000D - Combo box
  • 0x0000000E - Button w/ Light-Up