Changeset 45

Show
Ignore:
Timestamp:
08/19/04 22:15:33 (4 years ago)
Author:
aldacron
Message:

*[DerelictSDL] added a redistributables and the binding for SDL_mixer, courtesy of Jaymz031602
*[DerelictSDL] updated the README and the makefile

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/DerelictSDL/Makefile

    r44 r45  
    6666    $(SDLIMG.OBJ.DIR)\image.obj 
    6767     
     68SDLMIX.SRC.DIR = $(SDL.SRC.DIR) 
     69SDLMIX.SRC = \ 
     70    $(SDLMIX.SRC.DIR)\mixer.d 
     71     
     72SDLMIX.OBJ.DIR = $(SDL.OBJ.DIR) 
     73SDLMIX.OBJ = \ 
     74    $(SDLMIX.OBJ.DIR)\mixer.obj 
     75     
     76SDL.OBJ.ALL = \ 
     77    $(SDL.OBJ) \ 
     78    $(SDLIMG.OBJ) \ 
     79    $(SDLMIX.OBJ) 
     80     
    6881SDL.LIB = $(LIB.DIR)\derelictSDL.lib 
    6982 
     
    93106    @dmd $(SDLIMG.SRC) -c $(DFLAGS) $(DINC) -od$(SDLIMG.OBJ.DIR) 
    94107     
    95 liball: 
     108sdlmix: 
     109    @md $(SDLMIX.OBJ.DIR) 
     110    @dmd $(SDLMIX.SRC) -c $(DFLAGS) $(DINC) -od$(SDLMIX.OBJ.DIR) 
     111     
     112libsdlimg: 
    96113    @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ) $(SDLIMG.OBJ) 
    97114     
    98 all: sdl sdlimg liball 
     115libsdlmix: 
     116    @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ) $(SDLMIX.OBJ) 
    99117     
     118liball: 
     119    @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ.ALL)   
     120     
     121sdl_sdlimg: sdl sdlimg libsdlimg 
     122 
     123sdl_sdlmix: sdl sdlmix libsdlmix 
     124     
     125all: sdl sdlimg sdlmix liball 
     126     
  • trunk/DerelictSDL/README

    r44 r45  
    5656 
    5757-------------------------------------------------------------------------------- 
    58 Using SDLImage 
     58USING SDL_image 
    5959--------------------------------------------------------------------------------  
    60 SDLImage is now incorporated into DerelictSDL. Because SDL_Image has a dependency 
    61 upon SDL, it cannot be used in isolation. To use SDL_Image with your SDL application, 
     60SDL_image is now incorporated into DerelictSDL. Because SDL_image has a dependency 
     61upon SDL, it cannot be used in isolation. To use SDL_image with your SDL application, 
    6262you first must import the derelict.sdl.image module. 
    6363 
     
    6868++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    6969 
    70 Before calling any SDL_Image functions, you need to make a call to  
     70Before calling any SDL_image functions, you need to make a call to  
    7171DerelictSDLImage_Load. This will load the shared library. 
    7272 
     
    8585++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
    8686 
    87 From that point you can call SDL_Image functions as normal. Don't forget to make 
    88 sure that SDL_Image.dll is on the path. 
     87From that point you can call SDL_image functions as normal. Don't forget to make 
     88sure that SDL_image.dll is on the path. 
     89 
     90-------------------------------------------------------------------------------- 
     91USING SDL_mixer 
     92--------------------------------------------------------------------------------  
     93SDL_mixer is now incorporated into DerelictSDL. Because SDL_mixer has a dependency 
     94upon SDL, it cannot be used in isolation. To use SDL_mixer with your SDL application, 
     95you first must import the derelict.sdl.mixer module. 
     96 
     97++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
     98 
     99import derelict.sdl.mixer;       
     100 
     101++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
     102 
     103Before calling any SDL_mixer functions, you need to make a call to  
     104DerelictSDLImage_Load. This will load the shared library. 
     105 
     106++++++++++++++++++++++++++   CODE  +++++++++++++++++++++++++++++++++++++++++++++ 
     107 
     108// load the shared library - the try...catch block is optional of course 
     109try 
     110
     111   DerelictSDLMixer_Load(); 
     112
     113catch(Exception e) 
     114
     115   ... 
     116
     117 
     118++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
     119 
     120From that point you can call SDL_mixer functions as normal. Don't forget to make 
     121sure that SDL_mixer.dll is on the path. 
     122 
     123NOTE: to play .ogg files with SDL_mixer you will need the libvorbis DLL from 
     124        http://www.vorbis.com/ 
     125 
     126NOTE: to play .mp3 files with SDL_mixer you will need the SMPEG DLL from 
     127        http://icculus.org/smpeg/ 
     128         
     129SPECIAL THANKS: to Jaymz031602 for putting the SDL_mixer binding together 
    89130 
    90131-------------------------------------------------------------------------------- 
     
    92133-------------------------------------------------------------------------------- 
    93134 
    94 To build DerelictSDL with SDL_Image support on Windows: 
     135-------------------------------------------------------------------------------- 
     136To build DerelictSDL with SDL_image and SDL_mixer on Windows: 
    95137 
    961381) ensure that both dmd\bin and dm\bin are on your path 
    971392) from a command prompt, cd to <derelict_dir>\DerelictSDL 
    98 3) type 'make' or 'make all' to build derelictSDL.lib with SDL_Image support     
     1403) type 'make' or 'make all' to build derelictSDL.lib with SDL_image and SDL_mixer   
    991414) optionally type 'make clean' to delete all object files OR 
    100142   optionally type 'make cleanall' to delete all object and lib files 
    101143 
    102 To build DerelictSDL without SDL_Image support on Windows: 
     144-------------------------------------------------------------------------------- 
     145To build DerelictSDL with SDL_image on Windows: 
    103146 
    1041471) ensure that both dmd\bin and dm\bin are on your path 
    1051482) from a command prompt, cd to <derelict_dir>\DerelictSDL 
    106 3) type 'make sdlonly' to build derelictSDL.lib without SDL_Image support     
     1493) type 'make sdl_sdlimg' to build derelictSDL.lib with SDL_image    
    1071504) optionally type 'make clean' to delete all object files OR 
    108151   optionally type 'make cleanall' to delete all object and lib files 
     152 
     153--------------------------------------------------------------------------------   
     154To build DerelictSDL with SDL_mixer on Windows: 
     155 
     1561) ensure that both dmd\bin and dm\bin are on your path 
     1572) from a command prompt, cd to <derelict_dir>\DerelictSDL 
     1583) type 'make sdl_sdlmix' to build derelictSDL.lib with SDL_mixer   
     1594) optionally type 'make clean' to delete all object files OR 
     160   optionally type 'make cleanall' to delete all object and lib files 
     161 
     162-------------------------------------------------------------------------------- 
     163To build DerelictSDL without SDL_image or SDL_mixer on Windows: 
     164 
     1651) ensure that both dmd\bin and dm\bin are on your path 
     1662) from a command prompt, cd to <derelict_dir>\DerelictSDL 
     1673) type 'make sdlonly' to build derelictSDL.lib without SDL_image or SDL_mixer   
     1684) optionally type 'make clean' to delete all object files OR 
     169   optionally type 'make cleanall' to delete all object and lib files