Skip to content

API Reference

Markdown

SH4ZAM 0.9.1 exposes 794 public C symbols across 10 modules, plus a C++ API in namespace shz. Every symbol has its own page at /api/<module>/<name>/ with a Markdown twin at /api/<module>/<name>.md.

ModuleHeaderSymbolsDescription
Scalarsh4zam/shz_scalar.h56Scalar functions and utilities, including faster <math.h> replacements.
Trigonometrysh4zam/shz_trig.h51Trig functions and utilities built around the SH4 FSCA instruction.
Vectorsh4zam/shz_vector.h229API for vector math: 2D, 3D and 4D vector types and operations.
Quaternionsh4zam/shz_quat.h47Routines for quaternion math.
Matrixsh4zam/shz_matrix.h120In-memory matrix manipulation for 4x4 and smaller matrices.
XMTRXsh4zam/shz_xmtrx.h140API for managing the SH4's "active matrix", the 16 back-bank FP registers.
Complexsh4zam/shz_complex.h52API for representing and operating on complex numbers, plus an SH4-optimized FFT.
Memorysh4zam/shz_mem.h23Routines for copying memory, store queues, cache operations and prefetching.
Compiler Definitionssh4zam/shz_cdefs.h67Preprocessor definitions: back-end and target detection, TLS model, utilities and aliasing types.
Versionsh4zam/shz_version.h9Compile-time and link-time version checking of the SH4ZAM library.
  • C++ API: shz::vec3, shz::quat, shz::xmtrx and the free-function aliases, mapped back to the C functions.
  • Cheatsheet: the whole API on one page, signature plus one line each.
  • /api/index.json: machine-readable symbol index (schema). Per-module files live at /api/<module>.json.
  • Search (top of every page) indexes symbol names and descriptions.

C functions are shz_<module>_<verb>[_<qualifier>], types are shz_<name>_t, C++ lives in namespace shz with the shz_ prefix dropped. Suffixes such as _fsrra, _safe, _deg and _unaligned change behavior; see Naming and Suffixes.