-
Notifications
You must be signed in to change notification settings - Fork 17
/
StdAfx.h
104 lines (74 loc) · 2.13 KB
/
StdAfx.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//---------------------------------------------------------------------------
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version. See also the license.txt file for
// additional informations.
//---------------------------------------------------------------------------
#ifndef STDAFX_H
#define STDAFX_H
#ifdef TARGET_PSP
#include <stdio.h>
#define DWORD unsigned int
#define byte unsigned char
#define _u8 unsigned char
#define Uint8 unsigned char
#define _u16 unsigned short
#define _u32 unsigned int
#define BOOL int
#define FALSE 0
#define TRUE (!0)
#define HWND void*
#else /* ifdef TARGET_PSP */
#ifdef TARGET_GP2X
//extern "C" void gp2x_memcpy(unsigned char *, unsigned char *, unsigned int);
#define memcpy gp2x_memcpy
#define memcmp gp2x_memcmp
//#define memset gp2x_memset
#define GENREGSPC_AS_REG //comment out to do it as a regular mem loc
#define GENREGSSR_AS_REG //comment out to do it as a regular mem loc
register unsigned char *my_pc asm ("r9");
register unsigned long opcode asm ("r6");
#ifdef GENREGSPC_AS_REG
register unsigned long gen_regsPC asm("r8");
#endif
#ifdef GENREGSSR_AS_REG
register unsigned long gen_regsSR asm("r7");
#endif
#endif
#include "StdAfx.h"
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
typedef unsigned int UINT32;
typedef unsigned int DWORD;
typedef void * HRESULT;
typedef unsigned char byte;
typedef unsigned char _u8;
typedef unsigned short _u16;
typedef unsigned int _u32;
#define MB_OK 1
typedef bool BOOL;
#define FALSE false
#define TRUE true
#ifndef _MAX_PATH
#define _MAX_PATH 150
#endif
#ifdef TARGET_WIN
#define DEBUG
#endif
#ifdef DEBUG
#define dbg_printf printf
#else
#define dbg_printf if(0) printf
#endif
#define dbg_print dbg_printf
void AfxMessageBox(char *a, int b, int c);
void AfxMessageBox(char *a, int b);
void AfxMessageBox(char *a);
#define HWND void*
#define BITMAP
#endif /* ifdef TARGET_PSP */
#endif //STDAFX_H