-
Notifications
You must be signed in to change notification settings - Fork 0
/
mamedef.h
64 lines (52 loc) · 1.42 KB
/
mamedef.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef __MAMEDEF_H__
#define __MAMEDEF_H__
// typedefs to use MAME's (U)INTxx types (copied from MAME\src\ods\odscomm.h)
/* 8-bit values */
typedef unsigned char UINT8;
typedef signed char INT8;
/* 16-bit values */
typedef unsigned short UINT16;
typedef signed short INT16;
/* 32-bit values */
#ifndef _WINDOWS_H
typedef unsigned int UINT32;
typedef signed int INT32;
#endif
/* 64-bit values */
#ifndef _WINDOWS_H
#ifdef _MSC_VER
typedef signed __int64 INT64;
typedef unsigned __int64 UINT64;
#else
__extension__ typedef unsigned long long UINT64;
__extension__ typedef signed long long INT64;
#endif
#endif
/* offsets and addresses are 32-bit (for now...) */
typedef UINT32 offs_t;
/* stream_sample_t is used to represent a single sample in a sound stream */
typedef INT32 stream_sample_t;
#if defined(VGM_BIG_ENDIAN)
#define BYTE_XOR_BE(x) (x)
#elif defined(VGM_LITTLE_ENDIAN)
#define BYTE_XOR_BE(x) ((x) ^ 0x01)
#else
// don't define BYTE_XOR_BE so that it throws an error when compiling
#endif
#if defined(_MSC_VER)
//#define INLINE static __forceinline
#define INLINE static __inline
#elif defined(__GNUC__)
#define INLINE static __inline__
#else
#define INLINE static inline
#endif
#define M_PI 3.14159265358979323846
#ifdef _DEBUG
#define logerror printf
#else
#define logerror
#endif
extern stream_sample_t* DUMMYBUF[];
typedef void (*SRATE_CALLBACK)(void*, UINT32);
#endif // __MAMEDEF_H__