GBDK 2020 Docs  4.4.0
API Documentation for GBDK 2020
rand.h
Go to the documentation of this file.
1 
6 #ifndef RAND_INCLUDE
7 #define RAND_INCLUDE
8 
9 #include <types.h>
10 #include <stdint.h>
11 
27 #if defined(__PORT_sm83) || defined(__PORT_mos6502)
29 #elif defined(__PORT_z80)
31 #endif
32 
33 #define RAND_MAX 255
34 #define RANDW_MAX 65535
35 
47 extern uint16_t __rand_seed;
48 
53 #if defined(__PORT_sm83)
55 #elif defined(__PORT_z80)
57 #elif defined(__PORT_mos6502)
58 uint8_t rand(void);
59 #endif
60 
65 #if defined(__PORT_sm83)
67 #elif defined(__PORT_z80)
69 #elif defined(__PORT_mos6502)
70 uint16_t randw(void);
71 #endif
72 
82 #if defined(__PORT_sm83) || defined(__PORT_mos6502)
84 #elif defined(__PORT_z80)
86 #endif
87 
92 #if defined(__PORT_sm83)
94 #elif defined(__PORT_z80)
96 #elif defined(__PORT_mos6502)
97 uint8_t arand(void);
98 #endif
99 
100 #endif
#define OLDCALL
Definition: types.h:21
#define PRESERVES_REGS(...)
Definition: types.h:32
#define Z88DK_FASTCALL
Definition: types.h:47
void b
Definition: gb.h:748
static uint8_t iyl
Definition: metasprites.h:49
void iyh
Definition: msx.h:102
uint16_t randw(void) OLDCALL PRESERVES_REGS(b
uint8_t c
Definition: rand.h:54
void initarand(uint16_t seed) OLDCALL
uint8_t arand(void) OLDCALL PRESERVES_REGS(b
uint16_t __rand_seed
void initrand(uint16_t seed) OLDCALL
uint8_t rand(void) OLDCALL PRESERVES_REGS(b
unsigned char uint8_t
Definition: stdint.h:51
unsigned short int uint16_t
Definition: stdint.h:52