Debian Codegraph @

BambooTracker/chip/mame/mamedefs.h

raw
1 #ifndef __MAMEDEFS_H__
2 #define __MAMEDEFS_H__
3
4 #include <stddef.h> // for NULL
5 #include <stdint.h>
6 #include "../chip_defs.h"
7
8 /*
9 * Copied from mame/src/osd/osdcomm.h
10 * license:BSD-3-Clause
11 * copyright-holders:Aaron Giles
12 */
13 /* 8-bit values */
14 typedef unsigned char UINT8;
15 typedef signed char INT8;
16
17 /* 16-bit values */
18 typedef unsigned short UINT16;
19 typedef signed short INT16;
20
21 /* 32-bit values */
22 #ifndef _WINDOWS_H
23 typedef unsigned int UINT32;
24 typedef signed int INT32;
25 #endif
26
27 /* 64-bit values */
28 #ifndef _WINDOWS_H
29 #ifdef _MSC_VER
30 typedef signed __int64 INT64;
31 typedef unsigned __int64 UINT64;
32 #else
33 __extension__ typedef unsigned long long UINT64;
34 __extension__ typedef signed long long INT64;
35 #endif
36 #endif
37
38 /*
39 * Copied from mame/src/emu/memory.h
40 * license:BSD-3-Clause
41 * copyright-holders:Aaron Giles
42 */
43 /* offsets and addresses are 32-bit (for now...) */
44 typedef UINT32 offs_t;
45
46 /*
47 * Copied from mame/src/emu/emucore.h
48 * license:BSD-3-Clause
49 * copyright-holders:Aaron Giles
50 */
51 /* stream_sample_t is used to represent a single sample in a sound stream */
52 /*typedef INT32 stream_sample_t;*/
53 typedef sample stream_sample_t;
54
55 // M_PI is not part of the C/C++ standards and is not present on
56 // strict ANSI compilers or when compiling under GCC with -ansi
57 #ifndef M_PI
58 #define M_PI 3.14159265358979323846
59 #endif
60
61 /*************************************************/
62
63 typedef void (*DEVCB_SRATE_CHG)(void* info, UINT32 newSRate);
64
65 #ifndef INLINE
66 #if defined(_MSC_VER)
67 #define INLINE static __inline
68 #elif defined(__GNUC__)
69 #define INLINE static __inline__
70 #else
71 #define INLINE static inline
72 #endif
73 #endif
74
75 #endif /* __MAMEDEFS_H__ */