update build for OABI
[pcsx_rearmed.git] / plugins / gpu-gles / gpuPlugin.h
1 /***************************************************************************\r
2                             gpu.h  -  description\r
3                              -------------------\r
4     begin                : Sun Mar 08 2009\r
5     copyright            : (C) 1999-2009 by Pete Bernert\r
6     web                  : www.pbernert.com   \r
7  ***************************************************************************/\r
8 \r
9 /***************************************************************************\r
10  *                                                                         *\r
11  *   This program is free software; you can redistribute it and/or modify  *\r
12  *   it under the terms of the GNU General Public License as published by  *\r
13  *   the Free Software Foundation; either version 2 of the License, or     *\r
14  *   (at your option) any later version. See also the license.txt file for *\r
15  *   additional informations.                                              *\r
16  *                                                                         *\r
17  ***************************************************************************/\r
18 \r
19 //*************************************************************************// \r
20 // History of changes:\r
21 //\r
22 // 2009/03/08 - Pete  \r
23 // - generic cleanup for the Peops release\r
24 //\r
25 //*************************************************************************// \r
26 \r
27 #ifndef _GPU_PLUGIN_H\r
28 #define _GPU_PLUGIN_H\r
29 \r
30 /////////////////////////////////////////////////////////////////////////////\r
31 \r
32 #ifdef __cplusplus\r
33 extern "C" {\r
34 #endif \r
35 \r
36 #if !defined(_WINDOWS) && !defined(__NANOGL__)\r
37 #define glOrtho(x,y,z,xx,yy,zz) glOrthof(x,y,z,xx,yy,zz)\r
38 #endif\r
39 \r
40 #define PRED(x)   ((x << 3) & 0xF8)\r
41 #define PBLUE(x)  ((x >> 2) & 0xF8)\r
42 #define PGREEN(x) ((x >> 7) & 0xF8)\r
43 \r
44 #define RED(x) (x & 0xff)\r
45 #define BLUE(x) ((x>>16) & 0xff)\r
46 #define GREEN(x) ((x>>8) & 0xff)\r
47 #define COLOR(x) (x & 0xffffff)\r
48 \r
49 #ifdef _WINDOWS\r
50 #include "Externals.h"\r
51 #include "plugin.h"\r
52 #include <gl/gl.h>\r
53 #else\r
54 //#ifndef MAEMO_CHANGES\r
55 //      #include "psxCommon.h"\r
56 //#else\r
57 //      #include "../psxCommon.h"\r
58 //#endif\r
59 #include "gpuExternals.h"\r
60 #ifdef __NANOGL__\r
61 #include <gl/gl.h>\r
62 #else\r
63 #ifdef SOFT_LINKAGE\r
64 #pragma softfp_linkage\r
65 #endif\r
66 #ifndef MAEMO_CHANGES\r
67         #include <gles/gl.h> // for opengl es types \r
68         #include <gles/egltypes.h>\r
69 #else\r
70 #include "gpuStdafx.h"\r
71 #endif\r
72 #ifdef SOFT_LINKAGE\r
73 #pragma no_softfp_linkage\r
74 #endif\r
75 #endif\r
76 #endif\r
77 /////////////////////////////////////////////////////////////////////////////\r
78 \r
79 #define CALLBACK\r
80 \r
81 #define bool unsigned short\r
82 \r
83 typedef struct {\r
84         u32 ulFreezeVersion;\r
85         u32 ulStatus;\r
86         u32 ulControl[256];\r
87         u8 psxVRam[1024*1024*2];\r
88 } GPUFreeze_t;\r
89 \r
90 long CALLBACK GPUinit();\r
91 long CALLBACK GPUshutdown();\r
92 long CALLBACK GPUopen(int hwndGPU);\r
93 long CALLBACK GPUclose();\r
94 unsigned long CALLBACK GPUreadData(void);\r
95 void CALLBACK GPUreadDataMem(unsigned long * pMem, int iSize);\r
96 unsigned long CALLBACK GPUreadStatus(void);\r
97 void CALLBACK GPUwriteData(unsigned long gdata);\r
98 void CALLBACK GPUwriteDataMem(unsigned long * pMem, int iSize);\r
99 void CALLBACK GPUwriteStatus(unsigned long gdata);\r
100 long CALLBACK GPUdmaChain(unsigned long * baseAddrL, unsigned long addr);\r
101 void CALLBACK GPUupdateLace(void);\r
102 void CALLBACK GPUmakeSnapshot(void);\r
103 long CALLBACK GPUfreeze(unsigned long ulGetFreezeData,GPUFreeze_t * pF);\r
104 long CALLBACK GPUgetScreenPic(u8 * pMem);\r
105 long CALLBACK GPUshowScreenPic(u8 * pMem);\r
106 //void CALLBACK GPUkeypressed(int keycode);\r
107 //void CALLBACK GPUdisplayText(s8 * pText);\r
108 //void CALLBACK GPUclearDynarec(void (CALLBACK *callback)(void));\r
109 long CALLBACK GPUconfigure(void);\r
110 long CALLBACK GPUtest(void);\r
111 void CALLBACK GPUabout(void);\r
112 \r
113 \r
114 void           DoSnapShot(void);\r
115 void               GPUvSinc(void);\r
116 void           updateDisplay(void);\r
117 void           updateFrontDisplay(void);\r
118 void           SetAutoFrameCap(void);\r
119 void           SetAspectRatio(void);\r
120 void           CheckVRamRead(int x, int y, int dx, int dy, bool bFront);\r
121 void           CheckVRamReadEx(int x, int y, int dx, int dy);\r
122 void           SetFixes(void);\r
123 \r
124 void PaintPicDot(u8 * p,u8 c);\r
125 //void DrawNumBorPic(u8 *pMem, int lSelectedSlot);\r
126 void ResizeWindow();\r
127 \r
128 ////////////////////////////////////////////////////////////////////////////\r
129 #ifdef __cplusplus\r
130 }\r
131 #endif \r
132 \r
133 \r
134 #endif // _GPU_INTERNALS_H\r