# _cht_bytes_from_list
function _cht_bytes_from_list(lst)Packs integer list entries into a byte buffer, truncating each value to the low eight bits.
| Parameter | Type | Default | Description |
|---|---|---|---|
lst | dynamic | — | Lst value supplied to `_cht_bytes_from_list`. |
src/m_cheat.mlMatches scrambled cheat-key sequences and captures optional numeric parameters from player input.
function _cht_bytes_from_list(lst)Packs integer list entries into a byte buffer, truncating each value to the low eight bits.
| Parameter | Type | Default | Description |
|---|---|---|---|
lst | dynamic | — | Lst value supplied to `_cht_bytes_from_list`. |
function _cht_ensure_table()Lazily builds the 256-entry scrambled-key lookup table once and reuses it for subsequent cheat checks.
inline function _cht_key_byte(key)Normalizes an input key to its low byte and converts uppercase ASCII letters to lowercase.
| Parameter | Type | Default | Description |
|---|---|---|---|
key | dynamic | — | Input key code to process. |
inline function _cht_scramble(a)Applies Doom's reversible cheat-key bit permutation to one byte.
| Parameter | Type | Default | Description |
|---|---|---|---|
a | dynamic | — | First input operand. |
inline function _cht_seq_get(seq, idx)Returns cht seq get information from utility state.
| Parameter | Type | Default | Description |
|---|---|---|---|
seq | dynamic | — | Seq value supplied to `_cht_seq_get`. |
idx | dynamic | — | Zero-based element or table index. |
inline function _cht_seq_len(seq)Locates the encoded terminator and returns the number of fixed cheat-sequence bytes before parameters begin.
| Parameter | Type | Default | Description |
|---|---|---|---|
seq | dynamic | — | Seq value supplied to `_cht_seq_len`. |
inline function _cht_seq_set(seq, idx, v)Replaces a cheat definition's encoded byte sequence and resets its matching and parameter cursors.
| Parameter | Type | Default | Description |
|---|---|---|---|
seq | dynamic | — | Seq value supplied to `_cht_seq_set`. |
idx | dynamic | — | Zero-based element or table index. |
v | dynamic | — | Value consumed by the operation. |
function _cht_write_buffer(buffer, outList)Copies a captured cheat parameter into either a byte buffer or legacy string-reference array and terminates it.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | Buffer that supplies or receives data. |
outList | dynamic | — | Out list value supplied to `_cht_write_buffer`. |
cheat_xlate_tableStores the cheat xlate table collection used by the m cheat subsystem.
cheatseq_t struct
function cht_CheckCheat(cht, key)Feeds one key through a scrambled cheat sequence, advances or resets its cursor, and reports a completed match.
| Parameter | Type | Default | Description |
|---|---|---|---|
cht | dynamic | — | Cht value supplied to `cht_CheckCheat`. |
key | dynamic | — | Input key code to process. |
function cht_GetParam(cht, buffer)Returns cht Get Param information from utility state.
| Parameter | Type | Default | Description |
|---|---|---|---|
cht | dynamic | — | Cht value supplied to `cht_GetParam`. |
buffer | dynamic | — | Buffer that supplies or receives data. |
firsttimeTracks the mutable firsttime value used by the m cheat subsystem.