Skip to content

v3.3.0

Choose a tag to compare

@NullSablex NullSablex released this 04 Jul 12:11
· 49 commits to master since this release
c2e1c9b

Added

  • Amx::pri() / Amx::alt() — safe reads of the VM's primary and
    alternate accumulator registers, completing the register set alongside the
    existing cip/frame/stack/heap/stp. Read directly from the
    #[repr(C, packed)] AMX struct with read_unaligned (taking a reference
    to a packed field is UB), returning None when the VM pointer is null.
  • Amx::read_code(offset) — bounds-checked read of a 32-bit cell from the
    code segment, the instruction-side counterpart of read_cell. Resolves
    base + header.cod + offset and validates offset against the code segment
    [0, header.dat - header.cod), reading byte-wise (the header is packed). The
    SDK exposes the raw bytes only; decoding the instruction is up to the consumer.
  • Amx::opcode_table(count) — returns the VM's amx_opcodelist (the opcode
    → handler-address dispatch table) as count raw addresses, fetched the way the
    loader does it (set the BROWSE flag, call amx_Exec with index 0, restore the
    flags). On computed-goto builds (GCC/Clang — SA-MP and open.mp) the loader
    rewrites code-segment opcodes to these addresses, so a consumer can invert the
    table to recover the real opcode behind a read_code value. Returns None for
    a non-relocated image (AMX_FLAG_RELOC unset), where opcodes are stored raw.

Crate versions

  • rust-samp-sdk (lib samp_sdk): 3.1.0 → 3.2.0 (additive public API)
  • rust-samp (lib samp): 3.2.0 — unchanged
  • rust-samp-codegen (lib samp_codegen): 1.3.0 — unchanged

Full Changelog: v3.2.0...v3.3.0