Options
All
  • Public
  • Public/Protected
  • All
Menu

elmajs

Index

Type aliases

BufferInput

BufferInput: Uint8Array | Buffer | ArrayBuffer

Types that can be converted to a Buffer object

Variables

Const EOD_MARKER

EOD_MARKER: 6754362 = 6754362

Const EOF_MARKER

EOF_MARKER: 8674642 = 8674642

Const EOR_MARKER

EOR_MARKER: 4796277 = 4796277

Const HEAD_DIAMETER

HEAD_DIAMETER: 0.476 = 0.476

Const HEAD_RADIUS

HEAD_RADIUS: 0.238 = 0.238

Const LEVEL_NAME_SIZE

LEVEL_NAME_SIZE: 20 = 20

Const LGREOF

LGREOF: 187565543 = 187565543

Const LGRStart

LGRStart: 1002 = 1002

Const NUM_INTERNALS

NUM_INTERNALS: 54 = 54

Const NUM_LEVELS

NUM_LEVELS: 90 = 90

Const NUM_PLAYERS

NUM_PLAYERS: 50 = 50

Const OBJECT_DIAMETER

OBJECT_DIAMETER: 0.8 = 0.8

Const OBJECT_RADIUS

OBJECT_RADIUS: 0.4 = 0.4

Const PLAYERENTRY_NAME_SIZE

PLAYERENTRY_NAME_SIZE: 16 = 16

Const PLAYERENTRY_PADDING

PLAYERENTRY_PADDING: 38 = 38

Const PLAYER_NAME_SIZE

PLAYER_NAME_SIZE: 15 = 15

Const PLAYER_STRUCT_SIZE

PLAYER_STRUCT_SIZE: 116 = 116

Const STATE_END

STATE_END: 123432221 = 123432221

Const STATE_END_ALT

STATE_END_ALT: 123432112 = 123432112

Const STATE_SIZE

STATE_SIZE: 67910 = 67910

Const STATE_START

STATE_START: 200 = 200

Functions

bufferToTop10

bufferToTop10Part

  • Converts buffer to Top10 part. I.e. single-player or multi-player top10 times separately

    Parameters

    Returns TimeEntry[]

formatTime

  • formatTime(time: number): string
  • Formats time to string. Defaults to: '01:18,03' (mins:secs,hundredths) If time is longer than 1hr will add hours in front: '23:51:00,99'.

    Parameters

    • time: number

    Returns string

nullpadString

  • nullpadString(str: string, length: number): string
  • Pads a string with null-bytes, or returns a slice, with desired length.

    Parameters

    • str: string

      String to pad

    • length: number

      Desired string length

    Returns string

top10ToBuffer

  • top10ToBuffer(top10: Top10): Buffer
  • Convert a Top10 best times list into a unencrypted buffer representation

    Parameters

    Returns Buffer

trimString

  • Trims null-bytes and any following bytes from buffer and returns a string representation.

    Parameters

    Returns string

Generated using TypeDoc