SH4ZAM! 0.7.0
Fast math library for the Sega Dreamcast's SH4 CPU
Loading...
Searching...
No Matches
shz_version.h File Reference
#include <stdint.h>
Include dependency graph for shz_version.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

Compile-Time Utilities

Constants and methods for checking the compile-time SH4ZAM version.

#define SHZ_VERSION_MAJOR
 
#define SHZ_VERSION_MINOR
 
#define SHZ_VERSION_PATCH
 
#define SHZ_VERSION
 
#define SHZ_VERSION_INIT(major, minor, patch)
 

Link-Time Utilities

Methods for checking the link-time SH4ZAM version.

typedef uint32_t shz_version_t
 
typedef shz_version_t shz_version
 
shz_version_t shz_version_linked (void)
 
void shz_version_fields (shz_version_t version, uint8_t *major, uint16_t *minor, uint8_t *patch)
 

Detailed Description

Compile-Time API Versioning.

This file provides the utility macros and constants needed for implementing compile/link-time version checking of the SH4ZAM library.

Author
2026 Falco Girgis

Definition in file shz_version.h.

Macro Definition Documentation

◆ SHZ_VERSION_MAJOR

#define SHZ_VERSION_MAJOR

Compile-time SH4ZAM major version.

Definition at line 25 of file shz_version.h.

◆ SHZ_VERSION_MINOR

#define SHZ_VERSION_MINOR

Compile-time SH4ZAM minor version.

Definition at line 26 of file shz_version.h.

◆ SHZ_VERSION_PATCH

#define SHZ_VERSION_PATCH

Compile-time Sh4ZAM patch version.

Definition at line 27 of file shz_version.h.

◆ SHZ_VERSION

#define SHZ_VERSION

Current SH4ZAM full compile-time version identifier, integer-compatible.

Definition at line 30 of file shz_version.h.

30#define SHZ_VERSION \
31 SHZ_VERSION_INIT(SHZ_VERSION_MAJOR, SHZ_VERSION_MINOR, SHZ_VERSION_PATCH)

◆ SHZ_VERSION_INIT

#define SHZ_VERSION_INIT ( major,
minor,
patch )

Packs values of individual version components into a SH4ZAM full version value.

Combines values from individual version components into a single unsigned 32-bit integer which can be compared to other version values for equality or inequality.

Parameters
majorUnsigned 8-bit field representing major version value.
minorUnsigned 16-bit field representing minor version value.
patchUnsigned 8-bit field representing patch version value.
Returns
Unsigned 32-bit value representing the full version value.

Definition at line 44 of file shz_version.h.

44#define SHZ_VERSION_INIT(major, minor, patch) \
45 ((((major) & 0xff) << 24) | (((minor) & 0xffff) << 8) | (((patch) & 0xff)))

Typedef Documentation

◆ shz_version_t

typedef uint32_t shz_version_t

Integer-compatible value type containing a full SH4ZAM version.

Definition at line 55 of file shz_version.h.

◆ shz_version

Version typedef for those who hate POSIX-style.

Definition at line 58 of file shz_version.h.

Function Documentation

◆ shz_version_linked()

shz_version_t shz_version_linked ( void )

Returns the full version of SH4ZAM that was linked against.

◆ shz_version_fields()

void shz_version_fields ( shz_version_t version,
uint8_t * major,
uint16_t * minor,
uint8_t * patch )

Extracts the individual version component values from a full version.