-
Notifications
You must be signed in to change notification settings - Fork 0
/
NativeImports.cs
53 lines (35 loc) · 1.86 KB
/
NativeImports.cs
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
namespace SharpXcom;
internal class NativeImports
{
#region SDL_gfx
[DllImport("SDL_gfx")]
internal static extern int lineColor(nint dst, short x1, short y1, short x2, short y2, uint color);
[DllImport("SDL_gfx")]
internal static extern int lineRGBA(nint dst, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport("SDL_gfx")]
internal static extern int filledCircleColor(nint dst, short x, short y, short r, uint color);
[DllImport("SDL_gfx")]
internal static extern int characterRGBA(nint dst, short x, short y, sbyte c, byte r, byte g, byte b, byte a);
[DllImport("SDL_gfx")]
internal static extern int stringRGBA(nint dst, short x, short y, string s, byte r, byte g, byte b, byte a);
[DllImport("SDL_gfx")]
internal static extern int texturedPolygon(nint dst, short[] vx, short[] vy, int n, nint texture, int texture_dx, int texture_dy);
#endregion
#region SDL2
//[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
//internal static extern nint SDL_LoadBMP_RW(nint src, int freesrc);
//[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
//internal static extern void glDeleteProgram(uint program);
//[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
//internal static extern void glDeleteTextures(int n, ref uint textures);
//[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
//internal static extern uint glGetError();
//[DllImport("SDL2", CallingConvention = CallingConvention.Cdecl)]
//internal static extern void glReadPixels(int x, int y, int width, int height, uint format, uint type, nint pixels);
#endregion
#region SDL2_mixer
[DllImport("SDL2_mixer", CallingConvention = CallingConvention.Cdecl)]
internal static extern nint Mix_LoadMUS_RW(nint src);
#endregion
}