1 | // Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
|
---|
2 | // http://chaosforge.org/
|
---|
3 | //
|
---|
4 | // This file is part of NV Libraries.
|
---|
5 | // For conditions of distribution and use, see copyright notice in nv.hh
|
---|
6 |
|
---|
7 | #include "nv/lib/sdl12.hh"
|
---|
8 |
|
---|
9 | #if defined( NV_SDL_DYNAMIC )
|
---|
10 |
|
---|
11 | #include "nv/library.hh"
|
---|
12 |
|
---|
13 | /* SDL.h functions */
|
---|
14 | int (NV_SDL_APIENTRY *SDL_Init) (Uint32 flags) = nullptr;
|
---|
15 | int (NV_SDL_APIENTRY *SDL_InitSubSystem) (Uint32 flags) = nullptr;
|
---|
16 | void (NV_SDL_APIENTRY *SDL_QuitSubSystem) (Uint32 flags) = nullptr;
|
---|
17 | Uint32 (NV_SDL_APIENTRY *SDL_WasInit) (Uint32 flags) = nullptr;
|
---|
18 | void (NV_SDL_APIENTRY *SDL_Quit) (void) = nullptr;
|
---|
19 |
|
---|
20 | /* SDL_rwops.h functions */
|
---|
21 | SDL_RWops * (NV_SDL_APIENTRY *SDL_RWFromFile) (const char *file, const char *mode) = nullptr;
|
---|
22 | SDL_RWops * (NV_SDL_APIENTRY *SDL_RWFromFP) (FILE *fp, int autoclose) = nullptr;
|
---|
23 | SDL_RWops * (NV_SDL_APIENTRY *SDL_RWFromMem) (void *mem, int size) = nullptr;
|
---|
24 | SDL_RWops * (NV_SDL_APIENTRY *SDL_RWFromConstMem) (const void *mem, int size) = nullptr;
|
---|
25 | SDL_RWops * (NV_SDL_APIENTRY *SDL_AllocRW) (void) = nullptr;
|
---|
26 | void (NV_SDL_APIENTRY *SDL_FreeRW) (SDL_RWops *area) = nullptr;
|
---|
27 | Uint16 (NV_SDL_APIENTRY *SDL_ReadLE16) (SDL_RWops *src) = nullptr;
|
---|
28 | Uint16 (NV_SDL_APIENTRY *SDL_ReadBE16) (SDL_RWops *src) = nullptr;
|
---|
29 | Uint32 (NV_SDL_APIENTRY *SDL_ReadLE32) (SDL_RWops *src) = nullptr;
|
---|
30 | Uint32 (NV_SDL_APIENTRY *SDL_ReadBE32) (SDL_RWops *src) = nullptr;
|
---|
31 | Uint64 (NV_SDL_APIENTRY *SDL_ReadLE64) (SDL_RWops *src) = nullptr;
|
---|
32 | Uint64 (NV_SDL_APIENTRY *SDL_ReadBE64) (SDL_RWops *src) = nullptr;
|
---|
33 | int (NV_SDL_APIENTRY *SDL_WriteLE16) (SDL_RWops *dst, Uint16 value) = nullptr;
|
---|
34 | int (NV_SDL_APIENTRY *SDL_WriteBE16) (SDL_RWops *dst, Uint16 value) = nullptr;
|
---|
35 | int (NV_SDL_APIENTRY *SDL_WriteLE32) (SDL_RWops *dst, Uint32 value) = nullptr;
|
---|
36 | int (NV_SDL_APIENTRY *SDL_WriteBE32) (SDL_RWops *dst, Uint32 value) = nullptr;
|
---|
37 | int (NV_SDL_APIENTRY *SDL_WriteLE64) (SDL_RWops *dst, Uint64 value) = nullptr;
|
---|
38 | int (NV_SDL_APIENTRY *SDL_WriteBE64) (SDL_RWops *dst, Uint64 value) = nullptr;
|
---|
39 |
|
---|
40 | /* SDL_video.h defines */
|
---|
41 | int (NV_SDL_APIENTRY *SDL_VideoInit) (const char *driver_name, Uint32 flags) = nullptr;
|
---|
42 | void (NV_SDL_APIENTRY *SDL_VideoQuit) (void) = nullptr;
|
---|
43 | char * (NV_SDL_APIENTRY *SDL_VideoDriverName) (char *namebuf, int maxlen) = nullptr;
|
---|
44 | SDL_Surface * (NV_SDL_APIENTRY *SDL_GetVideoSurface) (void) = nullptr;
|
---|
45 | const SDL_VideoInfo * (NV_SDL_APIENTRY *SDL_GetVideoInfo) (void) = nullptr;
|
---|
46 | int (NV_SDL_APIENTRY *SDL_VideoModeOK) (int width, int height, int bpp, Uint32 flags) = nullptr;
|
---|
47 | SDL_Rect ** (NV_SDL_APIENTRY *SDL_ListModes) (SDL_PixelFormat *format, Uint32 flags) = nullptr;
|
---|
48 | SDL_Surface * (NV_SDL_APIENTRY *SDL_SetVideoMode) (int width, int height, int bpp, Uint32 flags) = nullptr;
|
---|
49 | void (NV_SDL_APIENTRY *SDL_UpdateRects) (SDL_Surface *screen, int numrects, SDL_Rect *rects) = nullptr;
|
---|
50 | void (NV_SDL_APIENTRY *SDL_UpdateRect) (SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h) = nullptr;
|
---|
51 | int (NV_SDL_APIENTRY *SDL_Flip) (SDL_Surface *screen) = nullptr;
|
---|
52 | int (NV_SDL_APIENTRY *SDL_SetGamma) (float red, float green, float blue) = nullptr;
|
---|
53 | int (NV_SDL_APIENTRY *SDL_SetGammaRamp) (const Uint16 *red, const Uint16 *green, const Uint16 *blue) = nullptr;
|
---|
54 | int (NV_SDL_APIENTRY *SDL_GetGammaRamp) (Uint16 *red, Uint16 *green, Uint16 *blue) = nullptr;
|
---|
55 | int (NV_SDL_APIENTRY *SDL_SetColors) (SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors) = nullptr;
|
---|
56 | int (NV_SDL_APIENTRY *SDL_SetPalette) (SDL_Surface *surface, int flags, SDL_Color *colors, int firstcolor, int ncolors) = nullptr;
|
---|
57 | Uint32 (NV_SDL_APIENTRY *SDL_MapRGB) (const SDL_PixelFormat * const format, const Uint8 r, const Uint8 g, const Uint8 b) = nullptr;
|
---|
58 | Uint32 (NV_SDL_APIENTRY *SDL_MapRGBA) (const SDL_PixelFormat * const format, const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a) = nullptr;
|
---|
59 | void (NV_SDL_APIENTRY *SDL_GetRGB) (Uint32 pixel, const SDL_PixelFormat * const fmt, Uint8 *r, Uint8 *g, Uint8 *b) = nullptr;
|
---|
60 | void (NV_SDL_APIENTRY *SDL_GetRGBA) (Uint32 pixel, const SDL_PixelFormat * const fmt, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a) = nullptr;
|
---|
61 | SDL_Surface * (NV_SDL_APIENTRY *SDL_CreateRGBSurface) (Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) = nullptr;
|
---|
62 | SDL_Surface * (NV_SDL_APIENTRY *SDL_CreateRGBSurfaceFrom) (void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) = nullptr;
|
---|
63 | void (NV_SDL_APIENTRY *SDL_FreeSurface) (SDL_Surface *surface) = nullptr;
|
---|
64 | int (NV_SDL_APIENTRY *SDL_LockSurface) (SDL_Surface *surface) = nullptr;
|
---|
65 | void (NV_SDL_APIENTRY *SDL_UnlockSurface) (SDL_Surface *surface) = nullptr;
|
---|
66 | SDL_Surface * (NV_SDL_APIENTRY *SDL_LoadBMP_RW) (SDL_RWops *src, int freesrc) = nullptr;
|
---|
67 | int (NV_SDL_APIENTRY *SDL_SaveBMP_RW) (SDL_Surface *surface, SDL_RWops *dst, int freedst) = nullptr;
|
---|
68 | int (NV_SDL_APIENTRY *SDL_SetColorKey) (SDL_Surface *surface, Uint32 flag, Uint32 key) = nullptr;
|
---|
69 | int (NV_SDL_APIENTRY *SDL_SetAlpha) (SDL_Surface *surface, Uint32 flag, Uint8 alpha) = nullptr;
|
---|
70 | SDL_bool (NV_SDL_APIENTRY *SDL_SetClipRect) (SDL_Surface *surface, const SDL_Rect *rect) = nullptr;
|
---|
71 | void (NV_SDL_APIENTRY *SDL_GetClipRect) (SDL_Surface *surface, SDL_Rect *rect) = nullptr;
|
---|
72 | SDL_Surface * (NV_SDL_APIENTRY *SDL_ConvertSurface) (SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags) = nullptr;
|
---|
73 | int (NV_SDL_APIENTRY *SDL_UpperBlit) (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect) = nullptr;
|
---|
74 | int (NV_SDL_APIENTRY *SDL_LowerBlit) (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect) = nullptr;
|
---|
75 | int (NV_SDL_APIENTRY *SDL_FillRect) (SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color) = nullptr;
|
---|
76 | SDL_Surface * (NV_SDL_APIENTRY *SDL_DisplayFormat) (SDL_Surface *surface) = nullptr;
|
---|
77 | SDL_Surface * (NV_SDL_APIENTRY *SDL_DisplayFormatAlpha) (SDL_Surface *surface) = nullptr;
|
---|
78 | SDL_Overlay * (NV_SDL_APIENTRY *SDL_CreateYUVOverlay) (int width, int height, Uint32 format, SDL_Surface *display) = nullptr;
|
---|
79 | int (NV_SDL_APIENTRY *SDL_LockYUVOverlay) (SDL_Overlay *overlay) = nullptr;
|
---|
80 | void (NV_SDL_APIENTRY *SDL_UnlockYUVOverlay) (SDL_Overlay *overlay) = nullptr;
|
---|
81 | int (NV_SDL_APIENTRY *SDL_DisplayYUVOverlay) (SDL_Overlay *overlay, SDL_Rect *dstrect) = nullptr;
|
---|
82 | void (NV_SDL_APIENTRY *SDL_FreeYUVOverlay) (SDL_Overlay *overlay) = nullptr;
|
---|
83 | int (NV_SDL_APIENTRY *SDL_GL_LoadLibrary) (const char *path) = nullptr;
|
---|
84 | void * (NV_SDL_APIENTRY *SDL_GL_GetProcAddress) (const char* proc) = nullptr;
|
---|
85 | int (NV_SDL_APIENTRY *SDL_GL_SetAttribute) (SDL_GLattr attr, int value) = nullptr;
|
---|
86 | int (NV_SDL_APIENTRY *SDL_GL_GetAttribute) (SDL_GLattr attr, int* value) = nullptr;
|
---|
87 | void (NV_SDL_APIENTRY *SDL_GL_SwapBuffers) (void) = nullptr;
|
---|
88 | void (NV_SDL_APIENTRY *SDL_GL_UpdateRects) (int numrects, SDL_Rect* rects) = nullptr;
|
---|
89 | void (NV_SDL_APIENTRY *SDL_GL_Lock) (void) = nullptr;
|
---|
90 | void (NV_SDL_APIENTRY *SDL_GL_Unlock) (void) = nullptr;
|
---|
91 | void (NV_SDL_APIENTRY *SDL_WM_SetCaption) (const char *title, const char *icon) = nullptr;
|
---|
92 | void (NV_SDL_APIENTRY *SDL_WM_GetCaption) (char **title, char **icon) = nullptr;
|
---|
93 | void (NV_SDL_APIENTRY *SDL_WM_SetIcon) (SDL_Surface *icon, Uint8 *mask) = nullptr;
|
---|
94 | int (NV_SDL_APIENTRY *SDL_WM_IconifyWindow) (void) = nullptr;
|
---|
95 | int (NV_SDL_APIENTRY *SDL_WM_ToggleFullScreen) (SDL_Surface *surface) = nullptr;
|
---|
96 | SDL_GrabMode (NV_SDL_APIENTRY *SDL_WM_GrabInput) (SDL_GrabMode mode) = nullptr;
|
---|
97 |
|
---|
98 | /* SDL_audio.h functions */
|
---|
99 | int (NV_SDL_APIENTRY *SDL_AudioInit) (const char *driver_name) = nullptr;
|
---|
100 | void (NV_SDL_APIENTRY *SDL_AudioQuit) (void) = nullptr;
|
---|
101 | char * (NV_SDL_APIENTRY *SDL_AudioDriverName) (char *namebuf, int maxlen) = nullptr;
|
---|
102 | int (NV_SDL_APIENTRY *SDL_OpenAudio) (SDL_AudioSpec *desired, SDL_AudioSpec *obtained) = nullptr;
|
---|
103 | SDL_audiostatus (NV_SDL_APIENTRY *SDL_GetAudioStatus) (void) = nullptr;
|
---|
104 | void (NV_SDL_APIENTRY *SDL_PauseAudio) (int pause_on) = nullptr;
|
---|
105 | SDL_AudioSpec * (NV_SDL_APIENTRY *SDL_LoadWAV_RW) (SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len) = nullptr;
|
---|
106 | void (NV_SDL_APIENTRY *SDL_FreeWAV) (Uint8 *audio_buf) = nullptr;
|
---|
107 | int (NV_SDL_APIENTRY *SDL_BuildAudioCVT) (SDL_AudioCVT *cvt, Uint16 src_format, Uint8 src_channels, int src_rate, Uint16 dst_format, Uint8 dst_channels, int dst_rate) = nullptr;
|
---|
108 | int (NV_SDL_APIENTRY *SDL_ConvertAudio) (SDL_AudioCVT *cvt) = nullptr;
|
---|
109 | void (NV_SDL_APIENTRY *SDL_MixAudio) (Uint8 *dst, const Uint8 *src, Uint32 len, int volume) = nullptr;
|
---|
110 | void (NV_SDL_APIENTRY *SDL_LockAudio) (void) = nullptr;
|
---|
111 | void (NV_SDL_APIENTRY *SDL_UnlockAudio) (void) = nullptr;
|
---|
112 | void (NV_SDL_APIENTRY *SDL_CloseAudio) (void) = nullptr;
|
---|
113 |
|
---|
114 | /* SDL_cpuinfo.h functions */
|
---|
115 | SDL_bool (NV_SDL_APIENTRY *SDL_HasRDTSC) (void) = nullptr;
|
---|
116 | SDL_bool (NV_SDL_APIENTRY *SDL_HasMMX) (void) = nullptr;
|
---|
117 | SDL_bool (NV_SDL_APIENTRY *SDL_HasMMXExt) (void) = nullptr;
|
---|
118 | SDL_bool (NV_SDL_APIENTRY *SDL_Has3DNow) (void) = nullptr;
|
---|
119 | SDL_bool (NV_SDL_APIENTRY *SDL_Has3DNowExt) (void) = nullptr;
|
---|
120 | SDL_bool (NV_SDL_APIENTRY *SDL_HasSSE) (void) = nullptr;
|
---|
121 | SDL_bool (NV_SDL_APIENTRY *SDL_HasSSE2) (void) = nullptr;
|
---|
122 | SDL_bool (NV_SDL_APIENTRY *SDL_HasAltiVec) (void) = nullptr;
|
---|
123 |
|
---|
124 | /* SDL_error.h functions */
|
---|
125 | void (NV_SDL_APIENTRY *SDL_SetError) (const char *fmt, ...) = nullptr;
|
---|
126 | char * (NV_SDL_APIENTRY *SDL_GetError) (void) = nullptr;
|
---|
127 | void (NV_SDL_APIENTRY *SDL_ClearError) (void) = nullptr;
|
---|
128 | void (NV_SDL_APIENTRY *SDL_Error) (SDL_errorcode code) = nullptr;
|
---|
129 |
|
---|
130 | /* SDL_active.h functions */
|
---|
131 | Uint8 (NV_SDL_APIENTRY *SDL_GetAppState) (void) = nullptr;
|
---|
132 |
|
---|
133 | /* SDL_keyboard.h functions */
|
---|
134 | int (NV_SDL_APIENTRY *SDL_EnableUNICODE) (int enable) = nullptr;
|
---|
135 | int (NV_SDL_APIENTRY *SDL_EnableKeyRepeat) (int delay, int interval) = nullptr;
|
---|
136 | void (NV_SDL_APIENTRY *SDL_GetKeyRepeat) (int *delay, int *interval) = nullptr;
|
---|
137 | Uint8 * (NV_SDL_APIENTRY *SDL_GetKeyState) (int *numkeys) = nullptr;
|
---|
138 | SDLMod (NV_SDL_APIENTRY *SDL_GetModState) (void) = nullptr;
|
---|
139 | void (NV_SDL_APIENTRY *SDL_SetModState) (SDLMod modstate) = nullptr;
|
---|
140 | char * (NV_SDL_APIENTRY *SDL_GetKeyName) (SDLKey key) = nullptr;
|
---|
141 |
|
---|
142 | /* SDL_mouse.h functions */
|
---|
143 | Uint8 (NV_SDL_APIENTRY *SDL_GetMouseState) (int *x, int *y) = nullptr;
|
---|
144 | Uint8 (NV_SDL_APIENTRY *SDL_GetRelativeMouseState) (int *x, int *y) = nullptr;
|
---|
145 | void (NV_SDL_APIENTRY *SDL_WarpMouse) (Uint16 x, Uint16 y) = nullptr;
|
---|
146 | SDL_Cursor * (NV_SDL_APIENTRY *SDL_CreateCursor) (Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y) = nullptr;
|
---|
147 | void (NV_SDL_APIENTRY *SDL_SetCursor) (SDL_Cursor *cursor) = nullptr;
|
---|
148 | SDL_Cursor * (NV_SDL_APIENTRY *SDL_GetCursor) (void) = nullptr;
|
---|
149 | void (NV_SDL_APIENTRY *SDL_FreeCursor) (SDL_Cursor *cursor) = nullptr;
|
---|
150 | int (NV_SDL_APIENTRY *SDL_ShowCursor) (int toggle) = nullptr;
|
---|
151 |
|
---|
152 | /* SDL_joystick.h functions */
|
---|
153 | int (NV_SDL_APIENTRY *SDL_NumJoysticks) (void) = nullptr;
|
---|
154 | const char * (NV_SDL_APIENTRY *SDL_JoystickName) (int device_index) = nullptr;
|
---|
155 | SDL_Joystick * (NV_SDL_APIENTRY *SDL_JoystickOpen) (int device_index) = nullptr;
|
---|
156 | int (NV_SDL_APIENTRY *SDL_JoystickOpened) (int device_index) = nullptr;
|
---|
157 | int (NV_SDL_APIENTRY *SDL_JoystickIndex) (SDL_Joystick *joystick) = nullptr;
|
---|
158 | int (NV_SDL_APIENTRY *SDL_JoystickNumAxes) (SDL_Joystick *joystick) = nullptr;
|
---|
159 | int (NV_SDL_APIENTRY *SDL_JoystickNumBalls) (SDL_Joystick *joystick) = nullptr;
|
---|
160 | int (NV_SDL_APIENTRY *SDL_JoystickNumHats) (SDL_Joystick *joystick) = nullptr;
|
---|
161 | int (NV_SDL_APIENTRY *SDL_JoystickNumButtons) (SDL_Joystick *joystick) = nullptr;
|
---|
162 | void (NV_SDL_APIENTRY *SDL_JoystickUpdate) (void) = nullptr;
|
---|
163 | int (NV_SDL_APIENTRY *SDL_JoystickEventState) (int state) = nullptr;
|
---|
164 | Sint16 (NV_SDL_APIENTRY *SDL_JoystickGetAxis) (SDL_Joystick *joystick, int axis) = nullptr;
|
---|
165 | Uint8 (NV_SDL_APIENTRY *SDL_JoystickGetHat) (SDL_Joystick *joystick, int hat) = nullptr;
|
---|
166 | int (NV_SDL_APIENTRY *SDL_JoystickGetBall) (SDL_Joystick *joystick, int ball, int *dx, int *dy) = nullptr;
|
---|
167 | Uint8 (NV_SDL_APIENTRY *SDL_JoystickGetButton) (SDL_Joystick *joystick, int button) = nullptr;
|
---|
168 | void (NV_SDL_APIENTRY *SDL_JoystickClose) (SDL_Joystick *joystick) = nullptr;
|
---|
169 |
|
---|
170 | /* SDL_event.h functions */
|
---|
171 | void (NV_SDL_APIENTRY *SDL_PumpEvents) (void) = nullptr;
|
---|
172 | int (NV_SDL_APIENTRY *SDL_PeepEvents) (SDL_Event *events, int numevents, SDL_eventaction action, Uint32 mask) = nullptr;
|
---|
173 | int (NV_SDL_APIENTRY *SDL_PollEvent) (SDL_Event *event) = nullptr;
|
---|
174 | int (NV_SDL_APIENTRY *SDL_WaitEvent) (SDL_Event *event) = nullptr;
|
---|
175 | int (NV_SDL_APIENTRY *SDL_PushEvent) (SDL_Event *event) = nullptr;
|
---|
176 | void (NV_SDL_APIENTRY *SDL_SetEventFilter) (SDL_EventFilter filter) = nullptr;
|
---|
177 | SDL_EventFilter (NV_SDL_APIENTRY *SDL_GetEventFilter) (void) = nullptr;
|
---|
178 | Uint8 (NV_SDL_APIENTRY *SDL_EventState) (Uint8 type, int state) = nullptr;
|
---|
179 |
|
---|
180 | /* SDL_timer.h functions */
|
---|
181 | Uint32 (NV_SDL_APIENTRY *SDL_GetTicks) (void) = nullptr;
|
---|
182 | void (NV_SDL_APIENTRY *SDL_Delay) (Uint32 ms) = nullptr;
|
---|
183 | int (NV_SDL_APIENTRY *SDL_SetTimer) (Uint32 interval, SDL_TimerCallback callback) = nullptr;
|
---|
184 | SDL_TimerID (NV_SDL_APIENTRY *SDL_AddTimer) (Uint32 interval, SDL_NewTimerCallback callback, void *param) = nullptr;
|
---|
185 | SDL_bool (NV_SDL_APIENTRY *SDL_RemoveTimer) (SDL_TimerID t) = nullptr;
|
---|
186 |
|
---|
187 | /* SDL_version.h functions */
|
---|
188 | const SDL_version * (NV_SDL_APIENTRY *SDL_Linked_Version) (void) = nullptr;
|
---|
189 |
|
---|
190 | bool nv::load_sdl_library( const char* path )
|
---|
191 | {
|
---|
192 | # define NV_SDL_LOAD( symbol ) *(void **) (&symbol) = sdl_library.get(#symbol);
|
---|
193 | static nv::library sdl_library( path );
|
---|
194 |
|
---|
195 | /* SDL.h functions */
|
---|
196 | NV_SDL_LOAD( SDL_Init );
|
---|
197 | NV_SDL_LOAD( SDL_InitSubSystem );
|
---|
198 | NV_SDL_LOAD( SDL_QuitSubSystem );
|
---|
199 | NV_SDL_LOAD( SDL_WasInit );
|
---|
200 | NV_SDL_LOAD( SDL_Quit );
|
---|
201 |
|
---|
202 | /* SDL_rwops.h functions */
|
---|
203 | NV_SDL_LOAD( SDL_RWFromFile );
|
---|
204 | NV_SDL_LOAD( SDL_RWFromFP );
|
---|
205 | NV_SDL_LOAD( SDL_RWFromMem );
|
---|
206 | NV_SDL_LOAD( SDL_RWFromConstMem );
|
---|
207 | NV_SDL_LOAD( SDL_AllocRW );
|
---|
208 | NV_SDL_LOAD( SDL_FreeRW );
|
---|
209 | NV_SDL_LOAD( SDL_ReadLE16 );
|
---|
210 | NV_SDL_LOAD( SDL_ReadBE16 );
|
---|
211 | NV_SDL_LOAD( SDL_ReadLE32 );
|
---|
212 | NV_SDL_LOAD( SDL_ReadBE32 );
|
---|
213 | NV_SDL_LOAD( SDL_ReadLE64 );
|
---|
214 | NV_SDL_LOAD( SDL_ReadBE64 );
|
---|
215 | NV_SDL_LOAD( SDL_WriteLE16 );
|
---|
216 | NV_SDL_LOAD( SDL_WriteBE16 );
|
---|
217 | NV_SDL_LOAD( SDL_WriteLE32 );
|
---|
218 | NV_SDL_LOAD( SDL_WriteBE32 );
|
---|
219 | NV_SDL_LOAD( SDL_WriteLE64 );
|
---|
220 | NV_SDL_LOAD( SDL_WriteBE64 );
|
---|
221 |
|
---|
222 | /* SDL_video.h defines */
|
---|
223 | NV_SDL_LOAD( SDL_VideoInit );
|
---|
224 | NV_SDL_LOAD( SDL_VideoQuit );
|
---|
225 | NV_SDL_LOAD( SDL_VideoDriverName );
|
---|
226 | NV_SDL_LOAD( SDL_GetVideoSurface );
|
---|
227 | NV_SDL_LOAD( SDL_GetVideoInfo );
|
---|
228 | NV_SDL_LOAD( SDL_VideoModeOK );
|
---|
229 | NV_SDL_LOAD( SDL_ListModes );
|
---|
230 | NV_SDL_LOAD( SDL_SetVideoMode );
|
---|
231 | NV_SDL_LOAD( SDL_UpdateRects );
|
---|
232 | NV_SDL_LOAD( SDL_UpdateRect );
|
---|
233 | NV_SDL_LOAD( SDL_Flip );
|
---|
234 | NV_SDL_LOAD( SDL_SetGamma );
|
---|
235 | NV_SDL_LOAD( SDL_SetGammaRamp );
|
---|
236 | NV_SDL_LOAD( SDL_GetGammaRamp );
|
---|
237 | NV_SDL_LOAD( SDL_SetColors );
|
---|
238 | NV_SDL_LOAD( SDL_SetPalette );
|
---|
239 | NV_SDL_LOAD( SDL_MapRGB );
|
---|
240 | NV_SDL_LOAD( SDL_MapRGBA );
|
---|
241 | NV_SDL_LOAD( SDL_GetRGB );
|
---|
242 | NV_SDL_LOAD( SDL_GetRGBA );
|
---|
243 | NV_SDL_LOAD( SDL_CreateRGBSurface );
|
---|
244 | NV_SDL_LOAD( SDL_CreateRGBSurfaceFrom );
|
---|
245 | NV_SDL_LOAD( SDL_FreeSurface );
|
---|
246 | NV_SDL_LOAD( SDL_LockSurface );
|
---|
247 | NV_SDL_LOAD( SDL_UnlockSurface );
|
---|
248 | NV_SDL_LOAD( SDL_LoadBMP_RW );
|
---|
249 | NV_SDL_LOAD( SDL_SaveBMP_RW );
|
---|
250 | NV_SDL_LOAD( SDL_SetColorKey );
|
---|
251 | NV_SDL_LOAD( SDL_SetAlpha );
|
---|
252 | NV_SDL_LOAD( SDL_SetClipRect );
|
---|
253 | NV_SDL_LOAD( SDL_GetClipRect );
|
---|
254 | NV_SDL_LOAD( SDL_ConvertSurface );
|
---|
255 | NV_SDL_LOAD( SDL_UpperBlit );
|
---|
256 | NV_SDL_LOAD( SDL_LowerBlit );
|
---|
257 | NV_SDL_LOAD( SDL_FillRect );
|
---|
258 | NV_SDL_LOAD( SDL_DisplayFormat );
|
---|
259 | NV_SDL_LOAD( SDL_DisplayFormatAlpha );
|
---|
260 | NV_SDL_LOAD( SDL_CreateYUVOverlay );
|
---|
261 | NV_SDL_LOAD( SDL_LockYUVOverlay );
|
---|
262 | NV_SDL_LOAD( SDL_UnlockYUVOverlay );
|
---|
263 | NV_SDL_LOAD( SDL_DisplayYUVOverlay );
|
---|
264 | NV_SDL_LOAD( SDL_FreeYUVOverlay );
|
---|
265 | NV_SDL_LOAD( SDL_GL_LoadLibrary );
|
---|
266 | NV_SDL_LOAD( SDL_GL_GetProcAddress );
|
---|
267 | NV_SDL_LOAD( SDL_GL_SetAttribute );
|
---|
268 | NV_SDL_LOAD( SDL_GL_GetAttribute );
|
---|
269 | NV_SDL_LOAD( SDL_GL_SwapBuffers );
|
---|
270 | NV_SDL_LOAD( SDL_GL_UpdateRects );
|
---|
271 | NV_SDL_LOAD( SDL_GL_Lock );
|
---|
272 | NV_SDL_LOAD( SDL_GL_Unlock );
|
---|
273 | NV_SDL_LOAD( SDL_WM_SetCaption );
|
---|
274 | NV_SDL_LOAD( SDL_WM_GetCaption );
|
---|
275 | NV_SDL_LOAD( SDL_WM_SetIcon );
|
---|
276 | NV_SDL_LOAD( SDL_WM_IconifyWindow );
|
---|
277 | NV_SDL_LOAD( SDL_WM_ToggleFullScreen );
|
---|
278 | NV_SDL_LOAD( SDL_WM_GrabInput );
|
---|
279 |
|
---|
280 | /* SDL_audio.h functions */
|
---|
281 | NV_SDL_LOAD( SDL_AudioInit );
|
---|
282 | NV_SDL_LOAD( SDL_AudioQuit );
|
---|
283 | NV_SDL_LOAD( SDL_AudioDriverName );
|
---|
284 | NV_SDL_LOAD( SDL_OpenAudio );
|
---|
285 | NV_SDL_LOAD( SDL_GetAudioStatus );
|
---|
286 | NV_SDL_LOAD( SDL_PauseAudio );
|
---|
287 | NV_SDL_LOAD( SDL_LoadWAV_RW );
|
---|
288 | NV_SDL_LOAD( SDL_FreeWAV );
|
---|
289 | NV_SDL_LOAD( SDL_BuildAudioCVT );
|
---|
290 | NV_SDL_LOAD( SDL_ConvertAudio );
|
---|
291 | NV_SDL_LOAD( SDL_MixAudio );
|
---|
292 | NV_SDL_LOAD( SDL_LockAudio );
|
---|
293 | NV_SDL_LOAD( SDL_UnlockAudio );
|
---|
294 | NV_SDL_LOAD( SDL_CloseAudio );
|
---|
295 |
|
---|
296 | /* SDL_cpuinfo.h functions */
|
---|
297 | NV_SDL_LOAD( SDL_HasRDTSC );
|
---|
298 | NV_SDL_LOAD( SDL_HasMMX );
|
---|
299 | NV_SDL_LOAD( SDL_HasMMXExt );
|
---|
300 | NV_SDL_LOAD( SDL_Has3DNow );
|
---|
301 | NV_SDL_LOAD( SDL_Has3DNowExt );
|
---|
302 | NV_SDL_LOAD( SDL_HasSSE );
|
---|
303 | NV_SDL_LOAD( SDL_HasSSE2 );
|
---|
304 | NV_SDL_LOAD( SDL_HasAltiVec );
|
---|
305 |
|
---|
306 | /* SDL_error.h functions */
|
---|
307 | NV_SDL_LOAD( SDL_SetError );
|
---|
308 | NV_SDL_LOAD( SDL_GetError );
|
---|
309 | NV_SDL_LOAD( SDL_ClearError );
|
---|
310 | NV_SDL_LOAD( SDL_Error );
|
---|
311 |
|
---|
312 | /* SDL_active.h functions */
|
---|
313 | NV_SDL_LOAD( SDL_GetAppState );
|
---|
314 |
|
---|
315 | /* SDL_keyboard.h functions */
|
---|
316 | NV_SDL_LOAD( SDL_EnableUNICODE );
|
---|
317 | NV_SDL_LOAD( SDL_EnableKeyRepeat );
|
---|
318 | NV_SDL_LOAD( SDL_GetKeyRepeat );
|
---|
319 | NV_SDL_LOAD( SDL_GetKeyState );
|
---|
320 | NV_SDL_LOAD( SDL_GetModState );
|
---|
321 | NV_SDL_LOAD( SDL_SetModState );
|
---|
322 | NV_SDL_LOAD( SDL_GetKeyName );
|
---|
323 |
|
---|
324 | /* SDL_mouse.h functions */
|
---|
325 | NV_SDL_LOAD( SDL_GetMouseState );
|
---|
326 | NV_SDL_LOAD( SDL_GetRelativeMouseState );
|
---|
327 | NV_SDL_LOAD( SDL_WarpMouse );
|
---|
328 | NV_SDL_LOAD( SDL_CreateCursor );
|
---|
329 | NV_SDL_LOAD( SDL_SetCursor );
|
---|
330 | NV_SDL_LOAD( SDL_GetCursor );
|
---|
331 | NV_SDL_LOAD( SDL_FreeCursor );
|
---|
332 | NV_SDL_LOAD( SDL_ShowCursor );
|
---|
333 |
|
---|
334 | /* SDL_joystick.h functions */
|
---|
335 | NV_SDL_LOAD( SDL_NumJoysticks );
|
---|
336 | NV_SDL_LOAD( SDL_JoystickName );
|
---|
337 | NV_SDL_LOAD( SDL_JoystickOpen );
|
---|
338 | NV_SDL_LOAD( SDL_JoystickOpened );
|
---|
339 | NV_SDL_LOAD( SDL_JoystickIndex );
|
---|
340 | NV_SDL_LOAD( SDL_JoystickNumAxes );
|
---|
341 | NV_SDL_LOAD( SDL_JoystickNumBalls );
|
---|
342 | NV_SDL_LOAD( SDL_JoystickNumHats );
|
---|
343 | NV_SDL_LOAD( SDL_JoystickNumButtons );
|
---|
344 | NV_SDL_LOAD( SDL_JoystickUpdate );
|
---|
345 | NV_SDL_LOAD( SDL_JoystickEventState );
|
---|
346 | NV_SDL_LOAD( SDL_JoystickGetAxis );
|
---|
347 | NV_SDL_LOAD( SDL_JoystickGetHat );
|
---|
348 | NV_SDL_LOAD( SDL_JoystickGetBall );
|
---|
349 | NV_SDL_LOAD( SDL_JoystickGetButton );
|
---|
350 | NV_SDL_LOAD( SDL_JoystickClose );
|
---|
351 |
|
---|
352 | /* SDL_timer.h functions */
|
---|
353 | NV_SDL_LOAD( SDL_GetTicks );
|
---|
354 | NV_SDL_LOAD( SDL_Delay );
|
---|
355 | NV_SDL_LOAD( SDL_SetTimer );
|
---|
356 | NV_SDL_LOAD( SDL_AddTimer );
|
---|
357 | NV_SDL_LOAD( SDL_RemoveTimer );
|
---|
358 |
|
---|
359 | /* SDL_version.h functions */
|
---|
360 | NV_SDL_LOAD( SDL_Linked_Version );
|
---|
361 |
|
---|
362 | /* SDL_event.h functions */
|
---|
363 | NV_SDL_LOAD( SDL_PumpEvents );
|
---|
364 | NV_SDL_LOAD( SDL_PeepEvents );
|
---|
365 | NV_SDL_LOAD( SDL_PollEvent );
|
---|
366 | NV_SDL_LOAD( SDL_WaitEvent );
|
---|
367 | NV_SDL_LOAD( SDL_PushEvent );
|
---|
368 | NV_SDL_LOAD( SDL_SetEventFilter );
|
---|
369 | NV_SDL_LOAD( SDL_GetEventFilter );
|
---|
370 | NV_SDL_LOAD( SDL_EventState );
|
---|
371 |
|
---|
372 | # undef NV_SDL_LOAD
|
---|
373 | return true;
|
---|
374 | }
|
---|
375 | #endif
|
---|