Changeset 146
- Timestamp:
- 05/18/06 10:28:02 (2 years ago)
- Files:
-
- trunk/DerelictSDL/derelict/sdl/endian.d (modified) (1 diff)
- trunk/DerelictSDL/derelict/sdl/events.d (modified) (1 diff)
- trunk/DerelictSDL/derelict/sdl/keyboard.d (modified) (2 diffs)
- trunk/DerelictSDL/derelict/sdl/mouse.d (modified) (1 diff)
- trunk/DerelictSDL/derelict/sdl/rwops.d (modified) (4 diffs)
- trunk/DerelictSDL/derelict/sdl/sdl.d (modified) (4 diffs)
- trunk/DerelictSDL/derelict/sdl/sdlversion.d (modified) (1 diff)
- trunk/DerelictSDL/derelict/sdl/syswm.d (modified) (2 diffs)
- trunk/DerelictSDL/derelict/sdl/video.d (modified) (1 diff)
- trunk/DerelictSDLImage/derelict/sdl/image.d (modified) (5 diffs)
- trunk/DerelictSDLMixer/derelict/sdl/mixer.d (modified) (9 diffs)
- trunk/DerelictSDLNet/derelict/sdl/net.d (modified) (7 diffs)
- trunk/DerelictSDLttf/derelict/sdl/ttf.d (modified) (1 diff)
- trunk/DerelictUtil/derelict/util/loader.d (modified) (1 diff)
- trunk/docs/credit.html (modified) (2 diffs)
- trunk/docs/sdl.html (modified) (1 diff)
- trunk/docs/sdlmix.html (modified) (1 diff)
- trunk/docs/util.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/DerelictSDL/derelict/sdl/endian.d
r132 r146 140 140 // FUNCTIONS 141 141 //============================================================================== 142 extern(C):143 144 typedef Uint16 function(SDL_RWops*) pfSDL_ReadLE16;145 typedef Uint16 function(SDL_RWops*) pfSDL_ReadBE16;146 typedef Uint32 function(SDL_RWops*) pfSDL_ReadLE32;147 typedef Uint32 function(SDL_RWops*) pfSDL_ReadBE32;148 typedef Uint64 function(SDL_RWops*) pfSDL_ReadLE64;149 typedef Uint64 function(SDL_RWops*) pfSDL_ReadBE64;150 typedef Uint16 function(SDL_RWops*,Uint16) pfSDL_WriteLE16;151 typedef Uint16 function(SDL_RWops*,Uint16) pfSDL_WriteBE16;152 typedef Uint32 function(SDL_RWops*,Uint32) pfSDL_WriteLE32;153 typedef Uint32 function(SDL_RWops*,Uint32) pfSDL_WriteBE32;154 typedef Uint64 function(SDL_RWops*,Uint64) pfSDL_WriteLE64;155 typedef Uint64 function(SDL_RWops*,Uint64) pfSDL_WriteBE64;156 pfSDL_ReadLE16 SDL_ReadLE16;157 pfSDL_ReadBE16 SDL_ReadBE16;158 pfSDL_ReadLE32 SDL_ReadLE32;159 pfSDL_ReadBE32 SDL_ReadBE32;160 pfSDL_ReadLE64 SDL_ReadLE64;161 pfSDL_ReadBE64 SDL_ReadBE64;162 pfSDL_WriteLE16 SDL_WriteLE16;163 pfSDL_WriteBE16 SDL_WriteBE16;164 pfSDL_WriteLE32 SDL_WriteLE32;165 pfSDL_WriteBE32 SDL_WriteBE32;166 pfSDL_WriteLE64 SDL_WriteLE64;167 pfSDL_WriteBE64 SDL_WriteBE64;trunk/DerelictSDL/derelict/sdl/events.d
r132 r146 77 77 SDL_KEYDOWNMASK = (1<<SDL_KEYDOWN), 78 78 SDL_KEYUPMASK = (1<<SDL_KEYUP), 79 SDL_KEYEVENTMASK = SDL_KEYDOWNMASK | SDL_KEYUPMASK, 79 80 SDL_MOUSEMOTIONMASK = (1<<SDL_MOUSEMOTION), 80 81 SDL_MOUSEBUTTONDOWNMASK = (1<<SDL_MOUSEBUTTONDOWN), trunk/DerelictSDL/derelict/sdl/keyboard.d
r132 r146 57 57 typedef int function(int) pfSDL_EnableUNICODE; 58 58 typedef int function(int,int) pfSDL_EnableKeyRepeat; 59 typedef void function(int*,int*) pfSDL_GetKeyRepeat; 59 60 typedef Uint8* function(int*) pfSDL_GetKeyState; 60 61 typedef SDLMod function() pfSDL_GetModState; … … 63 64 pfSDL_EnableUNICODE SDL_EnableUNICODE; 64 65 pfSDL_EnableKeyRepeat SDL_EnableKeyRepeat; 66 pfSDL_GetKeyRepeat SDL_GetKeyRepeat; 65 67 pfSDL_GetKeyState SDL_GetKeyState; 66 68 pfSDL_GetModState SDL_GetModState; trunk/DerelictSDL/derelict/sdl/mouse.d
r132 r146 55 55 const Uint8 SDL_BUTTON_WHEELUP = 4; 56 56 const Uint8 SDL_BUTTON_WHEELDOWN = 5; 57 const Uint8 SDL_BUTTON_LMASK = SDL_PRESSED<< (SDL_BUTTON_LEFT-1);58 const Uint8 SDL_BUTTON_MMASK = SDL_PRESSED<< (SDL_BUTTON_MIDDLE-1);59 const Uint8 SDL_BUTTON_RMASK = SDL_PRESSED<< (SDL_BUTTON_RIGHT-1);57 const Uint8 SDL_BUTTON_LMASK = 1 << (SDL_BUTTON_LEFT-1); 58 const Uint8 SDL_BUTTON_MMASK = 1 << (SDL_BUTTON_MIDDLE-1); 59 const Uint8 SDL_BUTTON_RMASK = 1 << (SDL_BUTTON_RIGHT-1); 60 60 61 61 //============================================================================== trunk/DerelictSDL/derelict/sdl/rwops.d
r132 r146 38 38 // TYPES 39 39 //============================================================================== 40 const int RW_SEEK_SET = 0; 41 const int RW_SEEK_CUR = 1; 42 const int RW_SEEK_END = 2; 43 40 44 struct SDL_RWops 41 45 { … … 47 51 union hidden 48 52 { 53 version(Windows) 54 { 55 struct win32io 56 { 57 int append; 58 void *h; 59 } 60 } 49 61 struct stdio 50 62 { … … 75 87 int SDL_RWtell(SDL_RWops *context) 76 88 { 77 return context.seek(context, 0, SEEK_CUR);89 return context.seek(context, 0, RW_SEEK_CUR); 78 90 } 79 91 … … 110 122 pfSDL_AllocRW SDL_AllocRW; 111 123 pfSDL_FreeRW SDL_FreeRW; 124 125 typedef Uint16 function(SDL_RWops*) pfSDL_ReadLE16; 126 typedef Uint16 function(SDL_RWops*) pfSDL_ReadBE16; 127 typedef Uint32 function(SDL_RWops*) pfSDL_ReadLE32; 128 typedef Uint32 function(SDL_RWops*) pfSDL_ReadBE32; 129 typedef Uint64 function(SDL_RWops*) pfSDL_ReadLE64; 130 typedef Uint64 function(SDL_RWops*) pfSDL_ReadBE64; 131 typedef Uint16 function(SDL_RWops*,Uint16) pfSDL_WriteLE16; 132 typedef Uint16 function(SDL_RWops*,Uint16) pfSDL_WriteBE16; 133 typedef Uint32 function(SDL_RWops*,Uint32) pfSDL_WriteLE32; 134 typedef Uint32 function(SDL_RWops*,Uint32) pfSDL_WriteBE32; 135 typedef Uint64 function(SDL_RWops*,Uint64) pfSDL_WriteLE64; 136 typedef Uint64 function(SDL_RWops*,Uint64) pfSDL_WriteBE64; 137 pfSDL_ReadLE16 SDL_ReadLE16; 138 pfSDL_ReadBE16 SDL_ReadBE16; 139 pfSDL_ReadLE32 SDL_ReadLE32; 140 pfSDL_ReadBE32 SDL_ReadBE32; 141 pfSDL_ReadLE64 SDL_ReadLE64; 142 pfSDL_ReadBE64 SDL_ReadBE64; 143 pfSDL_WriteLE16 SDL_WriteLE16; 144 pfSDL_WriteBE16 SDL_WriteBE16; 145 pfSDL_WriteLE32 SDL_WriteLE32; 146 pfSDL_WriteBE32 SDL_WriteBE32; 147 pfSDL_WriteLE64 SDL_WriteLE64; 148 pfSDL_WriteBE64 SDL_WriteBE64; trunk/DerelictSDL/derelict/sdl/sdl.d
r132 r146 137 137 SDL_HasSSE2 = cast(pfSDL_HasSSE2)getProc("SDL_HasSSE2"); 138 138 SDL_HasAltiVec = cast(pfSDL_HasAltiVec)getProc("SDL_HasAltiVec"); 139 // endian.d140 SDL_ReadLE16 = cast(pfSDL_ReadLE16)getProc("SDL_ReadLE16");141 SDL_ReadBE16 = cast(pfSDL_ReadBE16)getProc("SDL_ReadBE16");142 SDL_ReadLE32 = cast(pfSDL_ReadLE32)getProc("SDL_ReadLE32");143 SDL_ReadBE32 = cast(pfSDL_ReadBE32)getProc("SDL_ReadBE32");144 SDL_ReadLE64 = cast(pfSDL_ReadLE64)getProc("SDL_ReadLE64");145 SDL_ReadBE64 = cast(pfSDL_ReadBE64)getProc("SDL_ReadBE64");146 SDL_WriteLE16 = cast(pfSDL_WriteLE16)getProc("SDL_WriteLE16");147 SDL_WriteBE16 = cast(pfSDL_WriteBE16)getProc("SDL_WriteBE16");148 SDL_WriteLE32 = cast(pfSDL_WriteLE32)getProc("SDL_WriteLE32");149 SDL_WriteBE32 = cast(pfSDL_WriteBE32)getProc("SDL_WriteBE32");150 SDL_WriteLE64 = cast(pfSDL_WriteLE64)getProc("SDL_WriteLE64");151 SDL_WriteBE64 = cast(pfSDL_WriteBE64)getProc("SDL_WriteBE64");152 139 // error.d 153 140 SDL_SetError = cast(pfSDL_SetError)getProc("SDL_SetError"); … … 183 170 SDL_EnableUNICODE = cast(pfSDL_EnableUNICODE)getProc("SDL_EnableUNICODE"); 184 171 SDL_EnableKeyRepeat = cast(pfSDL_EnableKeyRepeat)getProc("SDL_EnableKeyRepeat"); 172 SDL_GetKeyRepeat = cast(pfSDL_GetKeyRepeat)getProc("SDL_GetKeyRepeat"); 185 173 SDL_GetKeyState = cast(pfSDL_GetKeyState)getProc("SDL_GetKeyState"); 186 174 SDL_GetModState = cast(pfSDL_GetModState)getProc("SDL_GetModState"); … … 225 213 SDL_AllocRW = cast(pfSDL_AllocRW)getProc("SDL_AllocRW"); 226 214 SDL_FreeRW = cast(pfSDL_FreeRW)getProc("SDL_FreeRW"); 215 SDL_ReadLE16 = cast(pfSDL_ReadLE16)getProc("SDL_ReadLE16"); 216 SDL_ReadBE16 = cast(pfSDL_ReadBE16)getProc("SDL_ReadBE16"); 217 SDL_ReadLE32 = cast(pfSDL_ReadLE32)getProc("SDL_ReadLE32"); 218 SDL_ReadBE32 = cast(pfSDL_ReadBE32)getProc("SDL_ReadBE32"); 219 SDL_ReadLE64 = cast(pfSDL_ReadLE64)getProc("SDL_ReadLE64"); 220 SDL_ReadBE64 = cast(pfSDL_ReadBE64)getProc("SDL_ReadBE64"); 221 SDL_WriteLE16 = cast(pfSDL_WriteLE16)getProc("SDL_WriteLE16"); 222 SDL_WriteBE16 = cast(pfSDL_WriteBE16)getProc("SDL_WriteBE16"); 223 SDL_WriteLE32 = cast(pfSDL_WriteLE32)getProc("SDL_WriteLE32"); 224 SDL_WriteBE32 = cast(pfSDL_WriteBE32)getProc("SDL_WriteBE32"); 225 SDL_WriteLE64 = cast(pfSDL_WriteLE64)getProc("SDL_WriteLE64"); 226 SDL_WriteBE64 = cast(pfSDL_WriteBE64)getProc("SDL_WriteBE64"); 227 227 // sdlversion.d 228 228 SDL_Linked_Version = cast(pfSDL_Linked_Version)getProc("SDL_Linked_Version"); … … 324 324 DerelictSDL_Load("sdl.dll"); 325 325 version(linux) 326 DerelictSDL_Load("libSDL.so"); 326 { 327 static char[][] libNames = [ 328 "libSDL.so", "libSDL.so.0", "libSDL.1.2.so", "libSDL.1.2.so.0" 329 ]; 330 331 Derelict_LoadSharedLib(libNames); 332 load(); 333 } 327 334 } 328 335 trunk/DerelictSDL/derelict/sdl/sdlversion.d
r132 r146 39 39 const Uint8 SDL_MAJOR_VERSION = 1; 40 40 const Uint8 SDL_MINOR_VERSION = 2; 41 const Uint8 SDL_PATCHLEVEL = 7;41 const Uint8 SDL_PATCHLEVEL = 10; 42 42 43 43 struct SDL_version trunk/DerelictSDL/derelict/sdl/syswm.d
r132 r146 68 68 } 69 69 70 version(Unix) 71 { 72 struct SDL_SysWMmsg; 73 struct SDL_SysWMinfo; 74 } 75 70 76 //============================================================================== 71 77 // FUNCTIONS … … 73 79 extern(C): 74 80 75 version(Windows)76 {77 78 81 typedef int function(SDL_SysWMinfo*) pfSDL_GetWMInfo; 79 82 pfSDL_GetWMInfo SDL_GetWMInfo; 80 81 }trunk/DerelictSDL/derelict/sdl/video.d
r132 r146 124 124 Uint32 video_mem; 125 125 SDL_PixelFormat *vfmt; 126 int current_w; 127 int current_h; 126 128 } 127 129 trunk/DerelictSDLImage/derelict/sdl/image.d
r132 r146 44 44 alias SDL_GetError IMG_GetError; 45 45 46 const Uint8 SDL_IMAGE_MAJOR_VERSION = 1; 47 const Uint8 SDL_IMAGE_MINOR_VERSION = 2; 48 const Uint8 SDL_IMAGE_PATCHLEVEL = 3; 49 46 50 //============================================================================== 47 51 // Functions … … 49 53 extern(C) 50 54 { 55 typedef SDL_version* function() pfIMG_Linked_Version; 56 pfIMG_Linked_Version IMG_Linked_Version; 51 57 52 58 typedef SDL_Surface* function(SDL_RWops*, int, char*) pfIMG_LoadTyped_RW; … … 90 96 91 97 //============================================================================== 98 // Macros 99 //============================================================================== 100 void SDL_IMAGE_VERSION(SDL_version* X) 101 { 102 X.major = SDL_IMAGE_MAJOR_VERSION; 103 X.minor = SDL_IMAGE_MINOR_VERSION; 104 X.patch = SDL_IMAGE_PATCHLEVEL; 105 } 106 107 //============================================================================== 92 108 // Loader 93 109 //============================================================================== … … 102 118 private void load() 103 119 { 120 IMG_Linked_Version = cast(pfIMG_Linked_Version)getProc("IMG_Linked_Version"); 104 121 IMG_LoadTyped_RW = cast(pfIMG_LoadTyped_RW)getProc("IMG_LoadTyped_RW"); 105 122 IMG_Load = cast(pfIMG_Load)getProc("IMG_Load"); … … 142 159 version(Windows) 143 160 DerelictSDLImage_Load("SDL_image.dll"); 161 144 162 version(linux) 145 DerelictSDLImage_Load("libSDL_image.so"); 163 { 164 static char[][] libNames = [ 165 "libSDL_image.so", "libSDL_image.1.2.so", "libSDL_image.1.2.so.0" 166 ]; 167 168 Derelict_LoadSharedLib(libNames); 169 load(); 170 } 146 171 } 147 172 trunk/DerelictSDLMixer/derelict/sdl/mixer.d
r132 r146 46 46 // Types 47 47 //============================================================================== 48 const Uint8 SDL_MIXER_MAJOR_VERSION = 1; 49 const Uint8 SDL_MIXER_MINOR_VERSION = 2; 50 const Uint8 SDL_MIXER_PATCHLEVEL = 7; 51 alias SDL_MIXER_MAJOR_VERSION MIX_MAJOR_VERSION; 52 alias SDL_MIXER_MINOR_VERSION MIX_MINOR_VERSION; 53 alias SDL_MIXER_PATCHLEVEL MIX_PATCH_LEVEL; 54 48 55 alias SDL_SetError Mix_SetError; 49 56 alias SDL_GetError Mix_GetError; … … 75 82 typedef _Mix_Music Mix_Music; 76 83 77 78 const int MIX_MAJOR_VERSION = 1;79 const int MIX_MINOR_VERSION = 2;80 const int MIX_PATCHLEVEL = 5;81 82 84 const int MIX_CHANNELS = 8; 83 85 … … 99 101 extern(C) 100 102 { 101 typedef void function(int chan, void *stream, int len, void *udata) Mix_EffectFunc_t;102 typedef void function(int chan, void *udata) Mix_EffectDone_t;103 typedef void function(int chan, void* stream, int len, void* udata) Mix_EffectFunc_t; 104 typedef void function(int chan, void* udata) Mix_EffectDone_t; 103 105 } 104 106 … … 106 108 // Macros 107 109 //============================================================================== 108 alias SDL_VERSION MIX_VERSION; 110 void SDL_MIXER_VERSION(SDL_version* X) 111 { 112 X.major = SDL_MIXER_MAJOR_VERSION; 113 X.minor = SDL_MIXER_MINOR_VERSION; 114 X.patch = SDL_MIXER_PATCHLEVEL; 115 } 116 alias SDL_MIXER_VERSION MIX_VERSION; 117 109 118 110 119 // FIXME: Need to append \0 to file? 111 Mix_Chunk *Mix_LoadWAV(char[] file)120 Mix_Chunk* Mix_LoadWAV(char[] file) 112 121 { 113 122 return Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1); 114 123 } 115 124 116 int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops)125 int Mix_PlayChannel(int channel, Mix_Chunk* chunk, int loops) 117 126 { 118 127 return Mix_PlayChannelTimed(channel, chunk, loops, -1); 119 128 } 120 129 121 int Mix_FadeInChannel(int channel, Mix_Chunk *chunk, int loops, int ms)130 int Mix_FadeInChannel(int channel, Mix_Chunk* chunk, int loops, int ms) 122 131 { 123 132 return Mix_FadeInChannelTimed(channel, chunk, loops, ms, -1); … … 130 139 extern (C) 131 140 { 132 typedef SDL_version * function() pfMix_Linked_Version; 133 typedef int function (int frequency, Uint16 format, int channels, int chunksize) pfMix_OpenAudio; 134 typedef int function(int numchans) pfMix_AllocateChannels; 135 typedef int function(int *frequency, Uint16 *format, int *channels) pfMix_QuerySpec; 136 typedef Mix_Chunk * function(SDL_RWops *src, int freesrc) pfMix_LoadWAV_RW; 137 typedef Mix_Music * function(char* file) pfMix_LoadMUS; 138 typedef Mix_Chunk * function(Uint8 *mem) pfMix_QuickLoad_WAV; 139 typedef Mix_Chunk * function(Uint8 *mem, Uint32 len) pfMix_QuickLoad_RAW; 140 typedef void function(Mix_Chunk *chunk) pfMix_FreeChunk; 141 typedef void function(Mix_Music *music) pfMix_FreeMusic; 142 typedef Mix_MusicType function(Mix_Music *music) pfMix_GetMusicType; 143 typedef void function(void (*mix_func)(void *udata, Uint8 *stream, int len), void *arg) pfMix_SetPostMix; 144 typedef void function(void (*mix_func)(void *udata, Uint8 *stream, int len), void *arg) pfMix_HookMusic; 141 typedef SDL_version* function() pfMix_Linked_Version; 142 typedef int function (int frequency, Uint16 format, int channels, int chunksize) pfMix_OpenAudio; 143 typedef int function(int numchans) pfMix_AllocateChannels; 144 typedef int function(int* frequency, Uint16* format, int* channels) pfMix_QuerySpec; 145 typedef Mix_Chunk* function(SDL_RWops* src, int freesrc) pfMix_LoadWAV_RW; 146 typedef Mix_Music* function(char* file) pfMix_LoadMUS; 147 typedef Mix_Music* function(SDL_RWops* rw) pfMix_LoadMUS_RW; 148 typedef Mix_Chunk* function(Uint8* mem) pfMix_QuickLoad_WAV; 149 typedef Mix_Chunk* function(Uint8* mem, Uint32 len) pfMix_QuickLoad_RAW; 150 typedef void function(Mix_Chunk* chunk) pfMix_FreeChunk; 151 typedef void function(Mix_Music* music) pfMix_FreeMusic; 152 typedef Mix_MusicType function(Mix_Music* music) pfMix_GetMusicType; 153 typedef void function(void (*mix_func)(void* udata, Uint8* stream, int len), void* arg) pfMix_SetPostMix; 154 typedef void function(void (*mix_func)(void* udata, Uint8* stream, int len), void* arg) pfMix_HookMusic; 145 155 typedef void function(void (*music_finished)()) pfMix_HookMusicFinished; 146 typedef void * function() pfMix_GetMusicHookData;156 typedef void* function() pfMix_GetMusicHookData; 147 157 typedef void function(void (*channel_finished)(int channel)) pfMix_ChannelFinished; 148 typedef int function(int chan, Mix_EffectFunc_t f, Mix_EffectDone_t d, void *arg) pfMix_RegisterEffect; 149 typedef int function(int channel, Mix_EffectFunc_t f) pfMix_UnregisterEffect; 150 typedef int function(int channel) pfMix_UnregisterAllEffects; 151 typedef int function(int channel, Uint8 left, Uint8 right) pfMix_SetPanning; 152 typedef int function(int channel, Sint16 angle, Uint8 distance) pfMix_SetPosition; 153 typedef int function(int channel, Uint8 distance) pfMix_SetDistance; 154 typedef int function(int channel, int flip) pfMix_SetReverseStereo; 155 typedef int function(int num) pfMix_ReserveChannels; 156 typedef int function(int which, int tag) pfMix_GroupChannel; 157 typedef int function(int from, int to, int tag) pfMix_GroupChannels; 158 typedef int function(int tag) pfMix_GroupAvailable; 159 typedef int function(int tag) pfMix_GroupCount; 160 typedef int function(int tag) pfMix_GroupOldest; 161 typedef int function(int tag) pfMix_GroupNewer; 162 typedef int function(int channel, Mix_Chunk *chunk, int loops, int ticks) pfMix_PlayChannelTimed; 163 typedef int function(Mix_Music *music, int loops) pfMix_PlayMusic; 164 typedef int function(Mix_Music *music, int loops, int ms) pfMix_FadeInMusic; 165 typedef int function(Mix_Music *music, int loops, int ms, double position) pfMix_FadeInMusicPos; 166 typedef int function(int channel, Mix_Chunk *chunk, int loops, int ms, int ticks) pfMix_FadeInChannelTimed; 167 typedef int function(int channel, int volume) pfMix_Volume; 168 typedef int function(Mix_Chunk *chunk, int volume) pfMix_VolumeChunk; 169 typedef int function(int volume) pfMix_VolumeMusic; 170 typedef int function(int channel) pfMix_HaltChannel; 171 typedef int function(int tag) pfMix_HaltGroup; 172 typedef int function() pfMix_HaltMusic; 173 typedef int function(int channel, int ticks) pfMix_ExpireChannel; 174 typedef int function(int which, int ms) pfMix_FadeOutChannel; 175 typedef int function(int tag, int ms) pfMix_FadeOutGroup; 176 typedef int function(int ms) pfMix_FadeOutMusic; 177 typedef Mix_Fading function() pfMix_FadingMusic; 178 typedef Mix_Fading function(int which) pfMix_FadingChannel; 179 typedef void function(int channel) pfMix_Pause; 180 typedef void function(int channel) pfMix_Resume; 181 typedef int function(int channel) pfMix_Paused; 182 typedef void function() pfMix_PauseMusic; 183 typedef void function() pfMix_ResumeMusic; 184 typedef void function() pfMix_RewindMusic; 185 typedef int function() pfMix_PausedMusic; 186 typedef int function(double position) pfMix_SetMusicPosition; 187 typedef int function(int channel) pfMix_Playing; 188 typedef int function() pfMix_PlayingMusic; 189 typedef int function(char* command) pfMix_SetMusicCMD; 190 typedef int function(int value) pfMix_SetSynchroValue; 191 typedef int function() pfMix_GetSynchroValue; 192 typedef Mix_Chunk * function(int channel) pfMix_GetChunk; 193 typedef void function() pfMix_CloseAudio; 194 158 typedef int function(int chan, Mix_EffectFunc_t f, Mix_EffectDone_t d, void* arg) pfMix_RegisterEffect; 159 typedef int function(int channel, Mix_EffectFunc_t f) pfMix_UnregisterEffect; 160 typedef int function(int channel) pfMix_UnregisterAllEffects; 161 typedef int function(int channel, Uint8 left, Uint8 right) pfMix_SetPanning; 162 typedef int function(int channel, Sint16 angle, Uint8 distance) pfMix_SetPosition; 163 typedef int function(int channel, Uint8 distance) pfMix_SetDistance; 164 typedef int function(int channel, int flip) pfMix_SetReverseStereo; 165 typedef int function(int num) pfMix_ReserveChannels; 166 typedef int function(int which, int tag) pfMix_GroupChannel; 167 typedef int function(int from, int to, int tag) pfMix_GroupChannels; 168 typedef int function(int tag) pfMix_GroupAvailable; 169 typedef int function(int tag) pfMix_GroupCount; 170 typedef int function(int tag) pfMix_GroupOldest; 171 typedef int function(int tag) pfMix_GroupNewer; 172 typedef int function(int channel, Mix_Chunk* chunk, int loops, int ticks) pfMix_PlayChannelTimed; 173 typedef int function(Mix_Music* music, int loops) pfMix_PlayMusic; 174 typedef int function(Mix_Music* music, int loops, int ms) pfMix_FadeInMusic; 175 typedef int function(Mix_Music* music, int loops, int ms, double position) pfMix_FadeInMusicPos; 176 typedef int function(int channel, Mix_Chunk* chunk, int loops, int ms, int ticks) pfMix_FadeInChannelTimed; 177 typedef int function(int channel, int volume) pfMix_Volume; 178 typedef int function(Mix_Chunk* chunk, int volume) pfMix_VolumeChunk; 179 typedef int function(int volume) pfMix_VolumeMusic; 180 typedef int function(int channel) pfMix_HaltChannel; 181 typedef int function(int tag) pfMix_HaltGroup; 182 typedef int function() pfMix_HaltMusic; 183 typedef int function(int channel, int ticks) pfMix_ExpireChannel; 184 typedef int function(int which, int ms) pfMix_FadeOutChannel; 185 typedef int function(int tag, int ms) pfMix_FadeOutGroup; 186 typedef int function(int ms) pfMix_FadeOutMusic; 187 typedef Mix_Fading function() pfMix_FadingMusic; 188 typedef Mix_Fading function(int which) pfMix_FadingChannel; 189 typedef void function(int channel) pfMix_Pause; 190 typedef void function(int channel) pfMix_Resume; 191 typedef int function(int channel) pfMix_Paused; 192 typedef void function() pfMix_PauseMusic; 193 typedef void function() pfMix_ResumeMusic; 194 typedef void function() pfMix_RewindMusic; 195 typedef int function() pfMix_PausedMusic; 196 typedef int function(double position) pfMix_SetMusicPosition; 197 typedef int function(int channel) pfMix_Playing; 198 typedef int function() pfMix_PlayingMusic; 199 typedef int function(char* command) pfMix_SetMusicCMD; 200 typedef int function(int value) pfMix_SetSynchroValue; 201 typedef int function() pfMix_GetSynchroValue; 202 typedef Mix_Chunk* function(int channel) pfMix_GetChunk; 203 typedef void function() pfMix_CloseAudio; 204 205 pfMix_Linked_Version Mix_Linked_Version; 195 206 pfMix_OpenAudio Mix_OpenAudio; 196 207 pfMix_AllocateChannels Mix_AllocateChannels; … … 198 209 pfMix_LoadWAV_RW Mix_LoadWAV_RW; 199 210 pfMix_LoadMUS Mix_LoadMUS; 211 pfMix_LoadMUS_RW Mix_LoadMUS_RW; 200 212 pfMix_QuickLoad_WAV Mix_QuickLoad_WAV; 201 213 pfMix_QuickLoad_RAW Mix_QuickLoad_RAW; … … 269 281 private void load() 270 282 { 283 Mix_Linked_Version = cast(pfMix_Linked_Version)getProc("Mix_Linked_Version"); 271 284 Mix_OpenAudio = cast(pfMix_OpenAudio)getProc("Mix_OpenAudio"); 272 285 Mix_AllocateChannels = cast(pfMix_AllocateChannels)getProc("Mix_AllocateChannels"); … … 274 287 Mix_LoadWAV_RW = cast(pfMix_LoadWAV_RW)getProc("Mix_LoadWAV_RW"); 275 288 Mix_LoadMUS = cast(pfMix_LoadMUS)getProc("Mix_LoadMUS"); 289 Mix_LoadMUS_RW = cast(pfMix_LoadMUS_RW)getProc("Mix_LoadMUS_RW"); 276 290 Mix_QuickLoad_WAV = cast(pfMix_QuickLoad_WAV)getProc("Mix_QuickLoad_WAV"); 277 291 Mix_QuickLoad_RAW = cast(pfMix_QuickLoad_RAW)getProc("Mix_QuickLoad_RAW"); … … 345 359 version(Windows) 346 360 DerelictSDLMixer_Load("SDL_mixer.dll"); 361 347 362 version(linux) 348 DerelictSDLMixer_Load("libSDL_mixer.so"); 363 { 364 static char[][] libNames = [ 365 "libSDL_mixer.so", "libSDL_mixer.1.2.so", "libSDL_mixer.1.2.so.0" 366 ]; 367 368 Derelict_LoadSharedLib(libNames); 369 load(); 370 } 349 371 } 350 372 trunk/DerelictSDLNet/derelict/sdl/net.d
r132 r146 41 41 // TYPES 42 42 //============================================================================== 43 const Uint8 SDL_NET_MAJOR_VERSION = 1; 44 const Uint8 SDL_NET_MINOR_VERSION = 2; 45 const Uint8 SDL_NET_PATCHLEVEL = 5; 46 43 47 struct IPaddress 44 48 { … … 82 86 // MACROS 83 87 //============================================================================== 88 void SDL_NET_VERSION(SDL_version* X) 89 { 90 X.major = SDL_NET_MAJOR_VERSION; 91 X.minor = SDL_NET_MINOR_VERSION; 92 X.patch = SDL_NET_PATCHLEVEL; 93 } 94 84 95 int SDLNet_TCP_AddSocket(SDLNet_SocketSet set, TCPsocket sock) 85 96 { … … 141 152 extern(C) 142 153 { 154 typedef SDL_version* function() pfSDLNet_Linked_Version; 155 pfSDLNet_Linked_Version SDLNet_Linked_Version; 156 143 157 typedef int function() pfSDLNet_Init; 144 158 typedef void function() pfSDLNet_Quit; … … 205 219 pfSDLNet_FreeSocketSet SDLNet_FreeSocketSet; 206 220 207 /*208 typedef void function(Uint16,void*) pfSDLNet_Write16;209 typedef void function(Uint32,void*) pfSDLNet_Write32;210 typedef Uint16 function(void*) pfSDLNet_Read16;211 typedef Uint32 function(void*) pfSDLNet_Read32;212 pfSDLNet_Write16 SDLNet_Write16;213 pfSDLNet_Write32 SDLNet_Write32;214 pfSDLNet_Read16 SDLNet_Read16;215 pfSDLNet_Read32 SDLNet_Read32;216 */217 221 218 222 } // extern(C) … … 230 234 private void load() 231 235 { 236 SDLNet_Linked_Version = cast(pfSDLNet_Linked_Version)getProc("SDLNet_Linked_Version"); 232 237 SDLNet_Init = cast(pfSDLNet_Init)getProc("SDLNet_Init"); 233 238 SDLNet_Quit = cast(pfSDLNet_Quit)getProc("SDLNet_Quit"); … … 258 263 SDLNet_DelSocket = cast(pfSDLNet_DelSocket)getProc("SDLNet_DelSocket"); 259 264 SDLNet_CheckSockets = cast(pfSDLNet_CheckSockets)getProc("SDLNet_CheckSockets"); 260 SDLNet_FreeSocketSet = cast(pfSDLNet_FreeSocketSet)getProc("SDLNet_FreeSocketSet"); 265 SDLNet_FreeSocketSet = cast(pfSDLNet_FreeSocketSet)getProc("SDLNet_FreeSocketSet"); 261 266 } 262 267 … … 275 280 DerelictSDLNet_Load("SDL_net.dll"); 276 281 version(linux) 277 DerelictSDLNet_Load("libSDL_net.so"); 282 { 283 static char[][] libNames = [ 284 "libSDL_net.so", "libSDL_net.1.2.so", "libSDL_net.1.2.so.0" 285 ]; 286 287 Derelict_LoadSharedLib(libNames); 288 load(); 289 } 278 290 } 279 291 trunk/DerelictSDLttf/derelict/sdl/ttf.d
r132 r146 231 231 DerelictSDLttf_Load("SDL_ttf.dll"); 232 232 version(linux) 233 DerelictSDLttf_Load("libSDL_ttf.so"); 233 { 234 static char[][] libNames = [ 235 "libSDL_ttf.so", "libSDL_ttf.2.0.so", "libSDL_ttf.2.0.so.0" 236 ]; 237 238 Derelict_LoadSharedLib(libNames); 239 load(); 240 } 234 241 } 235 242 trunk/DerelictUtil/derelict/util/loader.d
r145 r146 64 64 return Platform_LoadSharedLib(libName); 65 65 } 66 67 //============================================================================== 68 SharedLib Derelict_LoadSharedLib(char[][] libNames) 69 in 70 { 71 assert(libNames !is null); 72 } 73 body 74 { 75 SharedLibLoadException exception = null; 76 SharedLib lib = null; 77 78 foreach(char[] libName; libNames) 79 { 80 try 81 { 82 lib = Derelict_LoadSharedLib(libName); 83 } 84 catch(SharedLibLoadException slle) 85 { 86 exception = slle; 87 } 88 } 89 if(lib is null) 90 throw exception; 91 92 return lib; 93 } 94 66 95 //============================================================================== 67 96 void Derelict_UnloadSharedLib(SharedLib lib) trunk/docs/credit.html
r143 r146 61 61 </ul> 62 62 </p><p> 63 <b>Other Contributors</b> - people who contributed enhancements/improvements that 64 weren't bug fixes. 65 <ul> 66 <li>Anders F Björklund (afb) - submitted a patch to derelict.util.loader to make it work with GDC.</li> 67 <li>James Pelcis (jpelcis) - submitted up to date versions of DerelictSDLImage, DerelictSDLMixer, 68 DerelictSDLNet, and DerelictSDLttf. 69 </ul> 70 </p><p> 63 71 <b>Derelict's Little Helpers</b> - people (other than the maintainers) who have 64 72 been extremely helpful to new Derelict users on the forums and the D NGs<br> … … 86 94 </p><p> 87 95 If I missed anyone who directly contributed to Derelict, please let me know! I don't 88 want to leave anyone out. Also, credit should also go to the regulars on the D96 want to leave anyone out. Credit should also go to the regulars on the D 89 97 newsgroups whose advice, projects, ideas, and troubleshooting have helped many 90 98 D coders along the way. Cheers to you all! trunk/docs/sdl.html
r139 r146 15 15 16 16 <p> 17 <b>Note:</b> the current version of DerelictSDL requires SDL 1.2. 7or later.17 <b>Note:</b> the current version of DerelictSDL requires SDL 1.2.10 or later. 18 18 </p> 19 19 <font color='red'><i><b>Important:</b> SDL_VideoInfo is defined differently trunk/docs/sdlmix.html
r139 r146 13 13 <a href="http://www.libsdl.org/">SDL</a>. 14 14 <p> 15 <b>Note:</b> This version of DerelictSDLMixer requires SDL_mixer 1.2. 5or later.15 <b>Note:</b> This version of DerelictSDLMixer requires SDL_mixer 1.2.7 or later. 16 16 </p><p> 17 <b>SPECIAL THANKS</b> to James Dunne (Jaymz031602 on the dsource.org forums)18 for putting the SDL_mixer binding together.19 </p>20 17 21 18 <h3>Using</h3> trunk/docs/util.html
r112 r146 72 72 a <tt>SharedLibLoadException</tt> is thrown.</p> 73 73 74 <p><tt><b>SharedLib Derelict_LoadSharedLib(char[][] libNames)</b></tt><br> 75 Given an array of shared library names, returns a handle to the first shared 76 library successfully loaded. This is intended for use on platforms where a single 77 library may have multiple possible names, such as Linux. The function iterates 78 the array until a successful load. If none of the names result in a successful 79 load, an exception is thrown for the last library name.</p> 80 74 81 <p><tt><b>void* Derelict_GetProc(SharedLib lib, char[] procName)</b></tt><br> 75 82 Given a handle to a shared library and the name of a symbol, this function loads
