aboutsummaryrefslogtreecommitdiff
path: root/backends/PalmOS/Src/arm/ArmNative.h
blob: 502752648b2ab783660ef30d3600ba60ce0ac525 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef _ARMNATIVE_H_
#define _ARMNATIVE_H_

#include "PNOLoader.h"

#ifdef WIN32
	#include "testing/SimNative.h"
	#include "testing/oscalls.h"
#endif

//#define DISABLE_ARM
//#define DEBUG_ARM

// rsrc
enum {
	ARM_PA1SND		= 1,
	ARM_STREAMSND,
	ARM_OWIDELS,
	ARM_OWIDEPT,
	ARM_OCOPYRECT
};

#define TRUE	1
#define FALSE	0

// types
typedef struct {
	void *srcP;
	void *dstP;
	UInt32 length;
} ARMPa1SndType, *ARMPa1SndPtr;

typedef struct {
	void *proc;
	void *param;

	void	*handle;	// sound handle
	UInt32	size;		// buffer size
	UInt32	slot;
	UInt32 	active,		// is the sound handler active
			set,		// is the buffer filled
			wait;		// do we need to wait for sound completion
	void	*dataP,		// main buffer
			*tmpP;		// tmp buffer (convertion)
} SoundDataType;

typedef struct {
	void *dst;
	void *src;
} OSysWideType , *OSysWidePtr;

typedef struct {
	void *dst;
	const void *buf;
	UInt32 pitch, _offScreenPitch;
	UInt32 w, h;
} OSysCopyType, *OSysCopyPtr;

// calls
MemPtr	_PceInit(DmResID resID);
UInt32	_PceCall(void *armP, void *userDataP);
void	_PceFree(void *armP);

MemPtr	_PnoInit(DmResID resID, PnoDescriptor *pnoP);
UInt32	_PnoCall(PnoDescriptor *pnoP, void *userDataP);
void	_PnoFree(PnoDescriptor *pnoP, MemPtr armP);

#endif