Changeset 146

Show
Ignore:
Timestamp:
05/18/06 10:28:02 (2 years ago)
Author:
aldacron
Message:

[DerelictUtil?]
* added function to loader.d that accepts an array of library names for cases where shared libraries might have more than one possible name
[DerelictSDL]
* updated to the latest interface (libSDL 1.2.10)
* now attempts to load multiple library names on Linux
[DerelictSDLImage]
* added version information data and functions
* now attempts to load multiple library names on Linux
[DerelictSDLMixer]
* updated to the latest interface (libSDL_mixer 1.2.7)
* added version data and functions
* now attempts to load multiple library names on Linux
[DerelictSDLNet]
* added version data and functions
* now attempts to load multiple library names on Linux
[DerelictSDLttf]
* now attempts to load multiple library names on Linux
[Docs]
* added Anders F Björklund and James Pelcis to credit.html
* updated util.html with the info on the new function
* updated sdl.html and sdlmix.html with new minimum supported version info

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DerelictSDL/derelict/sdl/endian.d

    r132 r146  
    140140// FUNCTIONS 
    141141//============================================================================== 
    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  
    7777    SDL_KEYDOWNMASK             = (1<<SDL_KEYDOWN), 
    7878    SDL_KEYUPMASK               = (1<<SDL_KEYUP), 
     79    SDL_KEYEVENTMASK            = SDL_KEYDOWNMASK | SDL_KEYUPMASK, 
    7980    SDL_MOUSEMOTIONMASK         = (1<<SDL_MOUSEMOTION), 
    8081    SDL_MOUSEBUTTONDOWNMASK     = (1<<SDL_MOUSEBUTTONDOWN), 
  • trunk/DerelictSDL/derelict/sdl/keyboard.d

    r132 r146  
    5757typedef int function(int) pfSDL_EnableUNICODE; 
    5858typedef int function(int,int) pfSDL_EnableKeyRepeat; 
     59typedef void function(int*,int*) pfSDL_GetKeyRepeat; 
    5960typedef Uint8* function(int*) pfSDL_GetKeyState; 
    6061typedef SDLMod function() pfSDL_GetModState; 
     
    6364pfSDL_EnableUNICODE         SDL_EnableUNICODE; 
    6465pfSDL_EnableKeyRepeat       SDL_EnableKeyRepeat; 
     66pfSDL_GetKeyRepeat          SDL_GetKeyRepeat; 
    6567pfSDL_GetKeyState           SDL_GetKeyState; 
    6668pfSDL_GetModState           SDL_GetModState; 
  • trunk/DerelictSDL/derelict/sdl/mouse.d

    r132 r146  
    5555const Uint8 SDL_BUTTON_WHEELUP      = 4; 
    5656const 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); 
     57const Uint8 SDL_BUTTON_LMASK        = 1 << (SDL_BUTTON_LEFT-1); 
     58const Uint8 SDL_BUTTON_MMASK        = 1 << (SDL_BUTTON_MIDDLE-1); 
     59const Uint8 SDL_BUTTON_RMASK        = 1 << (SDL_BUTTON_RIGHT-1); 
    6060 
    6161//============================================================================== 
  • trunk/DerelictSDL/derelict/sdl/rwops.d

    r132 r146  
    3838// TYPES 
    3939//============================================================================== 
     40const int RW_SEEK_SET       = 0; 
     41const int RW_SEEK_CUR       = 1; 
     42const int RW_SEEK_END       = 2; 
     43 
    4044struct SDL_RWops 
    4145{ 
     
    4751    union hidden 
    4852    { 
     53        version(Windows) 
     54        { 
     55            struct win32io 
     56            { 
     57                int append; 
     58                void *h; 
     59            } 
     60        } 
    4961        struct stdio 
    5062        { 
     
    7587int SDL_RWtell(SDL_RWops *context) 
    7688{ 
    77     return context.seek(context, 0, SEEK_CUR); 
     89    return context.seek(context, 0, RW_SEEK_CUR); 
    7890} 
    7991 
     
    110122pfSDL_AllocRW               SDL_AllocRW; 
    111123pfSDL_FreeRW                SDL_FreeRW; 
     124 
     125typedef Uint16 function(SDL_RWops*) pfSDL_ReadLE16; 
     126typedef Uint16 function(SDL_RWops*) pfSDL_ReadBE16; 
     127typedef Uint32 function(SDL_RWops*) pfSDL_ReadLE32; 
     128typedef Uint32 function(SDL_RWops*) pfSDL_ReadBE32; 
     129typedef Uint64 function(SDL_RWops*) pfSDL_ReadLE64; 
     130typedef Uint64 function(SDL_RWops*) pfSDL_ReadBE64; 
     131typedef Uint16 function(SDL_RWops*,Uint16) pfSDL_WriteLE16; 
     132typedef Uint16 function(SDL_RWops*,Uint16) pfSDL_WriteBE16; 
     133typedef Uint32 function(SDL_RWops*,Uint32) pfSDL_WriteLE32; 
     134typedef Uint32 function(SDL_RWops*,Uint32) pfSDL_WriteBE32; 
     135typedef Uint64 function(SDL_RWops*,Uint64) pfSDL_WriteLE64; 
     136typedef Uint64 function(SDL_RWops*,Uint64) pfSDL_WriteBE64; 
     137pfSDL_ReadLE16          SDL_ReadLE16; 
     138pfSDL_ReadBE16          SDL_ReadBE16; 
     139pfSDL_ReadLE32          SDL_ReadLE32; 
     140pfSDL_ReadBE32          SDL_ReadBE32; 
     141pfSDL_ReadLE64          SDL_ReadLE64; 
     142pfSDL_ReadBE64          SDL_ReadBE64; 
     143pfSDL_WriteLE16         SDL_WriteLE16; 
     144pfSDL_WriteBE16         SDL_WriteBE16; 
     145pfSDL_WriteLE32         SDL_WriteLE32; 
     146pfSDL_WriteBE32         SDL_WriteBE32; 
     147pfSDL_WriteLE64         SDL_WriteLE64; 
     148pfSDL_WriteBE64         SDL_WriteBE64; 
  • trunk/DerelictSDL/derelict/sdl/sdl.d

    r132 r146  
    137137    SDL_HasSSE2 = cast(pfSDL_HasSSE2)getProc("SDL_HasSSE2"); 
    138138    SDL_HasAltiVec = cast(pfSDL_HasAltiVec)getProc("SDL_HasAltiVec"); 
    139     // endian.d 
    140     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"); 
    152139    // error.d 
    153140    SDL_SetError = cast(pfSDL_SetError)getProc("SDL_SetError"); 
     
    183170    SDL_EnableUNICODE = cast(pfSDL_EnableUNICODE)getProc("SDL_EnableUNICODE"); 
    184171    SDL_EnableKeyRepeat = cast(pfSDL_EnableKeyRepeat)getProc("SDL_EnableKeyRepeat"); 
     172    SDL_GetKeyRepeat = cast(pfSDL_GetKeyRepeat)getProc("SDL_GetKeyRepeat"); 
    185173    SDL_GetKeyState = cast(pfSDL_GetKeyState)getProc("SDL_GetKeyState"); 
    186174    SDL_GetModState = cast(pfSDL_GetModState)getProc("SDL_GetModState"); 
     
    225213    SDL_AllocRW = cast(pfSDL_AllocRW)getProc("SDL_AllocRW"); 
    226214    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"); 
    227227    // sdlversion.d 
    228228    SDL_Linked_Version = cast(pfSDL_Linked_Version)getProc("SDL_Linked_Version"); 
     
    324324        DerelictSDL_Load("sdl.dll"); 
    325325    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    } 
    327334} 
    328335 
  • trunk/DerelictSDL/derelict/sdl/sdlversion.d

    r132 r146  
    3939const Uint8 SDL_MAJOR_VERSION   = 1; 
    4040const Uint8 SDL_MINOR_VERSION   = 2; 
    41 const Uint8 SDL_PATCHLEVEL      = 7
     41const Uint8 SDL_PATCHLEVEL      = 10
    4242 
    4343struct SDL_version 
  • trunk/DerelictSDL/derelict/sdl/syswm.d

    r132 r146  
    6868} 
    6969 
     70version(Unix) 
     71{ 
     72    struct SDL_SysWMmsg; 
     73    struct SDL_SysWMinfo; 
     74} 
     75 
    7076//============================================================================== 
    7177// FUNCTIONS 
     
    7379extern(C): 
    7480 
    75 version(Windows) 
    76 { 
    77  
    7881typedef int function(SDL_SysWMinfo*) pfSDL_GetWMInfo; 
    7982pfSDL_GetWMInfo         SDL_GetWMInfo; 
    80  
    81 } 
  • trunk/DerelictSDL/derelict/sdl/video.d

    r132 r146  
    124124    Uint32 video_mem; 
    125125    SDL_PixelFormat *vfmt; 
     126    int current_w; 
     127    int current_h; 
    126128} 
    127129 
  • trunk/DerelictSDLImage/derelict/sdl/image.d

    r132 r146  
    4444alias SDL_GetError          IMG_GetError; 
    4545 
     46const Uint8 SDL_IMAGE_MAJOR_VERSION     = 1; 
     47const Uint8 SDL_IMAGE_MINOR_VERSION     = 2; 
     48const Uint8 SDL_IMAGE_PATCHLEVEL        = 3; 
     49 
    4650//============================================================================== 
    4751// Functions 
     
    4953extern(C) 
    5054{ 
     55typedef SDL_version* function() pfIMG_Linked_Version; 
     56pfIMG_Linked_Version            IMG_Linked_Version; 
    5157 
    5258typedef SDL_Surface* function(SDL_RWops*, int, char*) pfIMG_LoadTyped_RW; 
     
    9096 
    9197//============================================================================== 
     98// Macros 
     99//============================================================================== 
     100void 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//============================================================================== 
    92108// Loader 
    93109//============================================================================== 
     
    102118private void load() 
    103119{ 
     120    IMG_Linked_Version = cast(pfIMG_Linked_Version)getProc("IMG_Linked_Version"); 
    104121    IMG_LoadTyped_RW = cast(pfIMG_LoadTyped_RW)getProc("IMG_LoadTyped_RW"); 
    105122    IMG_Load = cast(pfIMG_Load)getProc("IMG_Load"); 
     
    142159    version(Windows) 
    143160        DerelictSDLImage_Load("SDL_image.dll"); 
     161         
    144162    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    } 
    146171} 
    147172 
  • trunk/DerelictSDLMixer/derelict/sdl/mixer.d

    r132 r146  
    4646// Types 
    4747//============================================================================== 
     48const Uint8 SDL_MIXER_MAJOR_VERSION     = 1; 
     49const Uint8 SDL_MIXER_MINOR_VERSION     = 2; 
     50const Uint8 SDL_MIXER_PATCHLEVEL        = 7; 
     51alias SDL_MIXER_MAJOR_VERSION MIX_MAJOR_VERSION; 
     52alias SDL_MIXER_MINOR_VERSION MIX_MINOR_VERSION; 
     53alias SDL_MIXER_PATCHLEVEL MIX_PATCH_LEVEL; 
     54 
    4855alias SDL_SetError   Mix_SetError; 
    4956alias SDL_GetError   Mix_GetError; 
     
    7582typedef _Mix_Music Mix_Music; 
    7683 
    77  
    78 const int MIX_MAJOR_VERSION         = 1; 
    79 const int MIX_MINOR_VERSION         = 2; 
    80 const int MIX_PATCHLEVEL            = 5; 
    81  
    8284const int MIX_CHANNELS              = 8; 
    8385 
     
    99101extern(C) 
    100102{ 
    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; 
     103typedef void function(int chan, void* stream, int len, void* udata) Mix_EffectFunc_t; 
     104typedef void function(int chan, void* udata) Mix_EffectDone_t; 
    103105} 
    104106 
     
    106108// Macros 
    107109//============================================================================== 
    108 alias SDL_VERSION MIX_VERSION; 
     110void 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
     116alias SDL_MIXER_VERSION MIX_VERSION; 
     117 
    109118 
    110119// FIXME:  Need to append \0 to file? 
    111 Mix_Chunk *Mix_LoadWAV(char[] file) 
     120Mix_Chunk* Mix_LoadWAV(char[] file) 
    112121{ 
    113122    return Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1); 
    114123} 
    115124 
    116 int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops) 
     125int Mix_PlayChannel(int channel, Mix_Chunk* chunk, int loops) 
    117126{ 
    118127    return Mix_PlayChannelTimed(channel, chunk, loops, -1); 
    119128} 
    120129 
    121 int Mix_FadeInChannel(int channel, Mix_Chunk *chunk, int loops, int ms) 
     130int Mix_FadeInChannel(int channel, Mix_Chunk* chunk, int loops, int ms) 
    122131{ 
    123132    return Mix_FadeInChannelTimed(channel, chunk, loops, ms, -1); 
     
    130139extern (C) 
    131140{ 
    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; 
     141typedef SDL_version* function() pfMix_Linked_Version; 
     142typedef int function (int frequency, Uint16 format, int channels, int chunksize) pfMix_OpenAudio; 
     143typedef int function(int numchans) pfMix_AllocateChannels; 
     144typedef int function(int* frequency, Uint16* format, int* channels) pfMix_QuerySpec; 
     145typedef Mix_Chunk* function(SDL_RWops* src, int freesrc) pfMix_LoadWAV_RW; 
     146typedef Mix_Music* function(char* file) pfMix_LoadMUS; 
     147typedef Mix_Music* function(SDL_RWops* rw) pfMix_LoadMUS_RW; 
     148typedef Mix_Chunk* function(Uint8* mem) pfMix_QuickLoad_WAV; 
     149typedef Mix_Chunk* function(Uint8* mem, Uint32 len) pfMix_QuickLoad_RAW; 
     150typedef void function(Mix_Chunk* chunk) pfMix_FreeChunk; 
     151typedef void function(Mix_Music* music) pfMix_FreeMusic; 
     152typedef Mix_MusicType function(Mix_Music* music) pfMix_GetMusicType; 
     153typedef void function(void (*mix_func)(void* udata, Uint8* stream, int len), void* arg) pfMix_SetPostMix; 
     154typedef void function(void (*mix_func)(void* udata, Uint8* stream, int len), void* arg) pfMix_HookMusic; 
    145155typedef void function(void (*music_finished)()) pfMix_HookMusicFinished; 
    146 typedef void *  function() pfMix_GetMusicHookData; 
     156typedef void*  function() pfMix_GetMusicHookData; 
    147157typedef 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  
     158typedef int function(int chan, Mix_EffectFunc_t f, Mix_EffectDone_t d, void* arg) pfMix_RegisterEffect; 
     159typedef int function(int channel, Mix_EffectFunc_t f) pfMix_UnregisterEffect; 
     160typedef int function(int channel) pfMix_UnregisterAllEffects; 
     161typedef int function(int channel, Uint8 left, Uint8 right) pfMix_SetPanning; 
     162typedef int function(int channel, Sint16 angle, Uint8 distance) pfMix_SetPosition; 
     163typedef int function(int channel, Uint8 distance) pfMix_SetDistance; 
     164typedef int function(int channel, int flip) pfMix_SetReverseStereo; 
     165typedef int function(int num) pfMix_ReserveChannels; 
     166typedef int function(int which, int tag) pfMix_GroupChannel; 
     167typedef int function(int from, int to, int tag) pfMix_GroupChannels; 
     168typedef int function(int tag) pfMix_GroupAvailable; 
     169typedef int function(int tag) pfMix_GroupCount; 
     170typedef int function(int tag) pfMix_GroupOldest; 
     171typedef int function(int tag) pfMix_GroupNewer; 
     172typedef int function(int channel, Mix_Chunk* chunk, int loops, int ticks) pfMix_PlayChannelTimed; 
     173typedef int function(Mix_Music* music, int loops) pfMix_PlayMusic; 
     174typedef int function(Mix_Music* music, int loops, int ms) pfMix_FadeInMusic; 
     175typedef int function(Mix_Music* music, int loops, int ms, double position) pfMix_FadeInMusicPos; 
     176typedef int function(int channel, Mix_Chunk* chunk, int loops, int ms, int ticks) pfMix_FadeInChannelTimed; 
     177typedef int function(int channel, int volume) pfMix_Volume; 
     178typedef int function(Mix_Chunk* chunk, int volume) pfMix_VolumeChunk; 
     179typedef int function(int volume) pfMix_VolumeMusic; 
     180typedef int function(int channel) pfMix_HaltChannel; 
     181typedef int function(int tag) pfMix_HaltGroup; 
     182typedef int function() pfMix_HaltMusic; 
     183typedef int function(int channel, int ticks) pfMix_ExpireChannel; 
     184typedef int function(int which, int ms) pfMix_FadeOutChannel; 
     185typedef int function(int tag, int ms) pfMix_FadeOutGroup; 
     186typedef int function(int ms) pfMix_FadeOutMusic; 
     187typedef Mix_Fading function() pfMix_FadingMusic; 
     188typedef Mix_Fading function(int which) pfMix_FadingChannel; 
     189typedef void function(int channel) pfMix_Pause; 
     190typedef void function(int channel) pfMix_Resume; 
     191typedef int function(int channel) pfMix_Paused; 
     192typedef void function() pfMix_PauseMusic; 
     193typedef void function() pfMix_ResumeMusic; 
     194typedef void function() pfMix_RewindMusic; 
     195typedef int function() pfMix_PausedMusic; 
     196typedef int function(double position) pfMix_SetMusicPosition; 
     197typedef int function(int channel) pfMix_Playing; 
     198typedef int function() pfMix_PlayingMusic; 
     199typedef int function(char* command) pfMix_SetMusicCMD; 
     200typedef int function(int value) pfMix_SetSynchroValue; 
     201typedef int function() pfMix_GetSynchroValue; 
     202typedef Mix_Chunk*  function(int channel) pfMix_GetChunk; 
     203typedef void function() pfMix_CloseAudio; 
     204 
     205pfMix_Linked_Version            Mix_Linked_Version; 
    195206pfMix_OpenAudio                 Mix_OpenAudio; 
    196207pfMix_AllocateChannels          Mix_AllocateChannels; 
     
    198209pfMix_LoadWAV_RW                Mix_LoadWAV_RW; 
    199210pfMix_LoadMUS                   Mix_LoadMUS; 
     211pfMix_LoadMUS_RW                Mix_LoadMUS_RW; 
    200212pfMix_QuickLoad_WAV             Mix_QuickLoad_WAV; 
    201213pfMix_QuickLoad_RAW             Mix_QuickLoad_RAW; 
     
    269281private void load() 
    270282{ 
     283    Mix_Linked_Version = cast(pfMix_Linked_Version)getProc("Mix_Linked_Version"); 
    271284    Mix_OpenAudio = cast(pfMix_OpenAudio)getProc("Mix_OpenAudio"); 
    272285    Mix_AllocateChannels = cast(pfMix_AllocateChannels)getProc("Mix_AllocateChannels"); 
     
    274287    Mix_LoadWAV_RW = cast(pfMix_LoadWAV_RW)getProc("Mix_LoadWAV_RW"); 
    275288    Mix_LoadMUS = cast(pfMix_LoadMUS)getProc("Mix_LoadMUS"); 
     289    Mix_LoadMUS_RW = cast(pfMix_LoadMUS_RW)getProc("Mix_LoadMUS_RW"); 
    276290    Mix_QuickLoad_WAV = cast(pfMix_QuickLoad_WAV)getProc("Mix_QuickLoad_WAV"); 
    277291    Mix_QuickLoad_RAW = cast(pfMix_QuickLoad_RAW)getProc("Mix_QuickLoad_RAW"); 
     
    345359    version(Windows) 
    346360        DerelictSDLMixer_Load("SDL_mixer.dll"); 
     361         
    347362    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    } 
    349371} 
    350372 
  • trunk/DerelictSDLNet/derelict/sdl/net.d

    r132 r146  
    4141// TYPES 
    4242//============================================================================== 
     43const Uint8 SDL_NET_MAJOR_VERSION           = 1; 
     44const Uint8 SDL_NET_MINOR_VERSION           = 2; 
     45const Uint8 SDL_NET_PATCHLEVEL              = 5; 
     46 
    4347struct IPaddress 
    4448{ 
     
    8286// MACROS 
    8387//============================================================================== 
     88void 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 
    8495int SDLNet_TCP_AddSocket(SDLNet_SocketSet set, TCPsocket sock) 
    8596{ 
     
    141152extern(C) 
    142153{ 
     154typedef SDL_version* function() pfSDLNet_Linked_Version; 
     155pfSDLNet_Linked_Version SDLNet_Linked_Version; 
     156 
    143157typedef int function() pfSDLNet_Init; 
    144158typedef void function() pfSDLNet_Quit; 
     
    205219pfSDLNet_FreeSocketSet      SDLNet_FreeSocketSet; 
    206220 
    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 */ 
    217221 
    218222} // extern(C) 
     
    230234private void load() 
    231235{ 
     236    SDLNet_Linked_Version = cast(pfSDLNet_Linked_Version)getProc("SDLNet_Linked_Version"); 
    232237    SDLNet_Init = cast(pfSDLNet_Init)getProc("SDLNet_Init"); 
    233238    SDLNet_Quit = cast(pfSDLNet_Quit)getProc("SDLNet_Quit"); 
     
    258263    SDLNet_DelSocket = cast(pfSDLNet_DelSocket)getProc("SDLNet_DelSocket"); 
    259264    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");     
    261266} 
    262267 
     
    275280        DerelictSDLNet_Load("SDL_net.dll"); 
    276281    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    } 
    278290} 
    279291 
  • trunk/DerelictSDLttf/derelict/sdl/ttf.d

    r132 r146  
    231231        DerelictSDLttf_Load("SDL_ttf.dll"); 
    232232    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    } 
    234241} 
    235242 
  • trunk/DerelictUtil/derelict/util/loader.d

    r145 r146  
    6464    return Platform_LoadSharedLib(libName); 
    6565} 
     66 
     67//============================================================================== 
     68SharedLib Derelict_LoadSharedLib(char[][] libNames) 
     69in 
     70{ 
     71    assert(libNames !is null);   
     72} 
     73body 
     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 
    6695//============================================================================== 
    6796void Derelict_UnloadSharedLib(SharedLib lib) 
  • trunk/docs/credit.html

    r143 r146  
    6161</ul> 
    6262</p><p> 
     63<b>Other Contributors</b> - people who contributed enhancements/improvements that 
     64weren'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,  
     68DerelictSDLNet, and DerelictSDLttf.  
     69</ul> 
     70</p><p> 
    6371<b>Derelict's Little Helpers</b> - people (other than the maintainers) who have 
    6472been extremely helpful to new Derelict users on the forums and the D NGs<br> 
     
    8694</p><p> 
    8795If 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 D 
     96want to leave anyone out. Credit should also go to the regulars on the D 
    8997newsgroups whose advice, projects, ideas, and troubleshooting have helped many 
    9098D coders along the way. Cheers to you all! 
  • trunk/docs/sdl.html

    r139 r146  
    1515 
    1616<p> 
    17 <b>Note:</b> the current version of DerelictSDL requires SDL 1.2.7 or later. 
     17<b>Note:</b> the current version of DerelictSDL requires SDL 1.2.10 or later. 
    1818</p> 
    1919<font color='red'><i><b>Important:</b> SDL_VideoInfo is defined differently 
  • trunk/docs/sdlmix.html

    r139 r146  
    1313<a href="http://www.libsdl.org/">SDL</a>. 
    1414<p> 
    15 <b>Note:</b> This version of DerelictSDLMixer requires SDL_mixer 1.2.5 or later. 
     15<b>Note:</b> This version of DerelictSDLMixer requires SDL_mixer 1.2.7 or later. 
    1616</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> 
    2017 
    2118<h3>Using</h3> 
  • trunk/docs/util.html

    r112 r146  
    7272a <tt>SharedLibLoadException</tt> is thrown.</p> 
    7373 
     74<p><tt><b>SharedLib Derelict_LoadSharedLib(char[][] libNames)</b></tt><br> 
     75Given an array of shared library names, returns a handle to the first shared 
     76library successfully loaded. This is intended for use on platforms where a single 
     77library may have multiple possible names, such as Linux. The function iterates 
     78the array until a successful load. If none of the names result in a successful 
     79load, an exception is thrown for the last library name.</p> 
     80 
    7481<p><tt><b>void* Derelict_GetProc(SharedLib lib, char[] procName)</b></tt><br> 
    7582Given a handle to a shared library and the name of a symbol, this function loads