summary refs log tree commit diff
path: root/src/Support.h
blob: 901b9b4d0e5eb1222ee9248440a5f022c76d3a27 (plain) (blame)
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
#ifndef SUPPORT_H
#define SUPPORT_H

#include <stdio.h>
#include <unistd.h>

#include <AL/al.h>

#define fsFromStart SEEK_SET

typedef char* Str255;
typedef int OSErr;
typedef short int SInt16;

typedef bool Boolean;
#define TRUE true
#define FALSE false

typedef struct UnsignedWide
{
	unsigned int lo;
	unsigned int hi;
} UnsignedWide;

typedef struct Point
{
	int h;
	int v;
} Point;

#define SetFPos(fildes, whence, offset) lseek(fildes, offset, whence)
#define FSClose(fildes) close(fildes)

int Random();
void GetMouse(Point *p);
void GetMouseRel(Point *p);
int Button(void);
bool IsKeyDown(int key);

void loadOgg(char* filename, ALuint buffer, ALuint source);

FILE *cfh_fopen(const char *filename, const char *mode);

#endif