QuakeServer.Messages (quake_server v0.1.0)

Copy Markdown View Source

The bytes a QuakeC program writes with WriteByte and the rest, read back into events for the client.

QuakeServer.Messages.decode(bytes)
#=> [{:temp, :explosion, %{origin: {...}}}, :intermission, ...]

Coordinates are written as eighths of a unit in 16 bits and angles as 256ths of a turn in a byte, as Quake writes them. Reading stops at a message it does not know.

Summary

Functions

The events in bytes, in order.

Functions

decode(bytes)

@spec decode(binary()) :: [term()]

The events in bytes, in order.