Values read at absolute offsets of a GameMaker data file.
Every number is little-endian. A string field holds the offset of the string's first
byte inside the STRG chunk, with its length in the four bytes before it; 0 is no
string. A pointer list is a count followed by that many absolute offsets, one per
item; a simple list is a count followed by the items themselves.
Summary
Functions
A colour field as {r, g, b, a}: GameMaker stores the red byte first.
The 32-bit float at at.
A 32-bit float, read from its bits. Infinities and NaN, which Erlang has no float for,
are :infinity, :neg_infinity and :nan.
The signed 32-bit number at at.
The item offsets of the pointer list at at.
The string a string field holds, nil for 0.
The string whose field is at at.
The unsigned 32-bit number at at.
The count unsigned 32-bit numbers starting at at.
Functions
@spec colour(non_neg_integer()) :: {byte(), byte(), byte(), byte()}
A colour field as {r, g, b, a}: GameMaker stores the red byte first.
@spec f32(binary(), non_neg_integer()) :: float() | :infinity | :neg_infinity | :nan
The 32-bit float at at.
@spec float(<<_::32>>) :: float() | :infinity | :neg_infinity | :nan
A 32-bit float, read from its bits. Infinities and NaN, which Erlang has no float for,
are :infinity, :neg_infinity and :nan.
@spec i32(binary(), non_neg_integer()) :: integer()
The signed 32-bit number at at.
@spec pointers(binary(), non_neg_integer()) :: [non_neg_integer()]
The item offsets of the pointer list at at.
@spec string(binary(), non_neg_integer()) :: String.t() | nil
The string a string field holds, nil for 0.
@spec string_at(binary(), non_neg_integer()) :: String.t() | nil
The string whose field is at at.
@spec u32(binary(), non_neg_integer()) :: non_neg_integer()
The unsigned 32-bit number at at.
@spec u32s(binary(), non_neg_integer(), non_neg_integer()) :: [non_neg_integer()]
The count unsigned 32-bit numbers starting at at.