summaryrefslogtreecommitdiffstats
path: root/mufhd0/datatype.h
blob: 0c3234b0834db51afc2f1b0cc749198a1474e071 (plain)
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
#ifndef DATATYPE

#define DATATYPE

#include <stdlib.h>

/*
  Miscellaneous stuff I use in DJGPP...
  author:  Scott Scriven (scriven@vis.colostate.edu)
*/


#ifdef __cplusplus
extern "C" {
#endif

#define byte	unsigned char
#define sbyte	signed char
#define word    unsigned short
#define sword   signed short
#define dword	unsigned long
#define sdword	signed long
#define qword   unsigned long long int
#define sqword  signed long long int

#define bLO(n)  (n     & 0x0F)
#define bHI(n) ((n>>4) & 0x0F)
#define wLO(n)  (n     & 0x00Ff)
#define wHI(n) ((n>>8) & 0x00Ff)
#define lLO(n)  (n      & 0x0000FFff)
#define lHI(n) ((n>>16) & 0x0000FFff)
#define qLO(n)  (n      & 0x00000000FFFFffff)
#define qHI(n) ((n>>32) & 0x00000000FFFFffff)


#define randomize(); srand(time(NULL));


#ifdef __cplusplus
}
#endif

#endif