GBDK 2020 Docs  4.5.0
API Documentation for GBDK 2020
bcd.h
Go to the documentation of this file.
1#ifndef __BCD_H_INCLUDE
2#define __BCD_H_INCLUDE
3
4#include <types.h>
5#include <stdint.h>
6
13// macro for creating BCD constants
14#define BCD_HEX(v) ((BCD)(v))
15
20#define MAKE_BCD(v) BCD_HEX(0x ## v)
21
22typedef uint32_t BCD;
23
28void uint2bcd(uint16_t i, BCD * value) OLDCALL;
29
34void bcd_add(BCD * sour, const BCD * value) OLDCALL;
35
40void bcd_sub(BCD * sour, const BCD * value) OLDCALL;
41
59uint8_t bcd2text(const BCD * bcd, uint8_t tile_offset, uint8_t * buffer) OLDCALL;
60
61#endif
#define OLDCALL
Definition: types.h:21
uint32_t BCD
Definition: bcd.h:22
uint8_t bcd2text(const BCD *bcd, uint8_t tile_offset, uint8_t *buffer) OLDCALL
void bcd_add(BCD *sour, const BCD *value) OLDCALL
void bcd_sub(BCD *sour, const BCD *value) OLDCALL
void uint2bcd(uint16_t i, BCD *value) OLDCALL
unsigned short int uint16_t
Definition: stdint.h:52
unsigned long int uint32_t
Definition: stdint.h:53
unsigned char uint8_t
Definition: stdint.h:51