Banjo API 1.0.0-rc.2
Low-level C99 game development API
Loading...
Searching...
No Matches
version.h
Go to the documentation of this file.
1
25#ifndef BJ_VERSION_H
26#define BJ_VERSION_H
27
28#include <banjo/api.h>
29
49#define BJ_VERSION_ALPHA 0x00
50#define BJ_VERSION_BETA 0x40
51#define BJ_VERSION_PREVIEW 0x80
52#define BJ_VERSION_RC 0xC0
53#define BJ_VERSION_STABLE 0xFF
55
56
64#define BJ_VERSION_MAJOR(version) ((uint8_t)(((version) >> 24U) & 0xFFU))
65
73#define BJ_VERSION_MINOR(version) (((version) >> 16U) & 0xFFU)
74
82#define BJ_VERSION_PATCH(version) (((version) >> 8U) & 0xFFU)
83
92#define BJ_VERSION_STAGE(version) ((version) & 0xFFU)
93
106#define BJ_MAKE_VERSION(major, minor, patch, stage) \
107 ((((uint32_t)(major)) << 24U) | (((uint32_t)(minor)) << 16U) | \
108 (((uint32_t)(patch)) << 8U) | ((uint32_t)(stage)))
109
116#define BJ_NAME "Banjo"
117
125#define BJ_NAME_VARIANT ""
126
127#define BJ_VERSION_MAJOR_NUMBER 1
128#define BJ_VERSION_MINOR_NUMBER 0
129#define BJ_VERSION_PATCH_NUMBER 0
130#define BJ_VERSION_STAGE_NUMBER (BJ_VERSION_RC | 0x02)
131
135#define BJ_VERSION BJ_MAKE_VERSION(BJ_VERSION_MAJOR_NUMBER, BJ_VERSION_MINOR_NUMBER, BJ_VERSION_PATCH_NUMBER, BJ_VERSION_STAGE_NUMBER)
136
165 char* buffer,
166 size_t bufsize,
167 uint32_t version
168);
169
170#endif
General-purpose definitions for Banjo API.
#define BANJO_EXPORT
Definition api.h:163
size_t bj_format_version(char *buffer, size_t bufsize, uint32_t version)
Format a packed version number as a SemVer-compatible string.