Changeset 45
- Timestamp:
- 08/19/04 22:15:33 (4 years ago)
- Files:
-
- trunk/DerelictSDL/Makefile (modified) (2 diffs)
- trunk/DerelictSDL/README (modified) (4 diffs)
- trunk/DerelictSDL/derelict/sdl/mixer.d (added)
- trunk/DerelictSDL/sdl_mixer_dist (added)
- trunk/DerelictSDL/sdl_mixer_dist/README.txt (added)
- trunk/DerelictSDL/sdl_mixer_dist/SDL_mixer.dll (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/DerelictSDL/Makefile
r44 r45 66 66 $(SDLIMG.OBJ.DIR)\image.obj 67 67 68 SDLMIX.SRC.DIR = $(SDL.SRC.DIR) 69 SDLMIX.SRC = \ 70 $(SDLMIX.SRC.DIR)\mixer.d 71 72 SDLMIX.OBJ.DIR = $(SDL.OBJ.DIR) 73 SDLMIX.OBJ = \ 74 $(SDLMIX.OBJ.DIR)\mixer.obj 75 76 SDL.OBJ.ALL = \ 77 $(SDL.OBJ) \ 78 $(SDLIMG.OBJ) \ 79 $(SDLMIX.OBJ) 80 68 81 SDL.LIB = $(LIB.DIR)\derelictSDL.lib 69 82 … … 93 106 @dmd $(SDLIMG.SRC) -c $(DFLAGS) $(DINC) -od$(SDLIMG.OBJ.DIR) 94 107 95 liball: 108 sdlmix: 109 @md $(SDLMIX.OBJ.DIR) 110 @dmd $(SDLMIX.SRC) -c $(DFLAGS) $(DINC) -od$(SDLMIX.OBJ.DIR) 111 112 libsdlimg: 96 113 @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ) $(SDLIMG.OBJ) 97 114 98 all: sdl sdlimg liball 115 libsdlmix: 116 @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ) $(SDLMIX.OBJ) 99 117 118 liball: 119 @lib $(LIBFLAGS) $(SDL.LIB) $(SDL.OBJ.ALL) 120 121 sdl_sdlimg: sdl sdlimg libsdlimg 122 123 sdl_sdlmix: sdl sdlmix libsdlmix 124 125 all: sdl sdlimg sdlmix liball 126 trunk/DerelictSDL/README
r44 r45 56 56 57 57 -------------------------------------------------------------------------------- 58 U sing SDLImage58 USING SDL_image 59 59 -------------------------------------------------------------------------------- 60 SDL Image is now incorporated into DerelictSDL. Because SDL_Image has a dependency61 upon SDL, it cannot be used in isolation. To use SDL_ Image with your SDL application,60 SDL_image 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, 62 62 you first must import the derelict.sdl.image module. 63 63 … … 68 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 69 69 70 Before calling any SDL_ Image functions, you need to make a call to70 Before calling any SDL_image functions, you need to make a call to 71 71 DerelictSDLImage_Load. This will load the shared library. 72 72 … … 85 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 86 86 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. 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. 89 90 -------------------------------------------------------------------------------- 91 USING SDL_mixer 92 -------------------------------------------------------------------------------- 93 SDL_mixer is now incorporated into DerelictSDL. Because SDL_mixer has a dependency 94 upon SDL, it cannot be used in isolation. To use SDL_mixer with your SDL application, 95 you first must import the derelict.sdl.mixer module. 96 97 ++++++++++++++++++++++++++ CODE +++++++++++++++++++++++++++++++++++++++++++++ 98 99 import derelict.sdl.mixer; 100 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 102 103 Before calling any SDL_mixer functions, you need to make a call to 104 DerelictSDLImage_Load. This will load the shared library. 105 106 ++++++++++++++++++++++++++ CODE +++++++++++++++++++++++++++++++++++++++++++++ 107 108 // load the shared library - the try...catch block is optional of course 109 try 110 { 111 DerelictSDLMixer_Load(); 112 } 113 catch(Exception e) 114 { 115 ... 116 } 117 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 119 120 From that point you can call SDL_mixer functions as normal. Don't forget to make 121 sure that SDL_mixer.dll is on the path. 122 123 NOTE: to play .ogg files with SDL_mixer you will need the libvorbis DLL from 124 http://www.vorbis.com/ 125 126 NOTE: to play .mp3 files with SDL_mixer you will need the SMPEG DLL from 127 http://icculus.org/smpeg/ 128 129 SPECIAL THANKS: to Jaymz031602 for putting the SDL_mixer binding together 89 130 90 131 -------------------------------------------------------------------------------- … … 92 133 -------------------------------------------------------------------------------- 93 134 94 To build DerelictSDL with SDL_Image support on Windows: 135 -------------------------------------------------------------------------------- 136 To build DerelictSDL with SDL_image and SDL_mixer on Windows: 95 137 96 138 1) ensure that both dmd\bin and dm\bin are on your path 97 139 2) from a command prompt, cd to <derelict_dir>\DerelictSDL 98 3) type 'make' or 'make all' to build derelictSDL.lib with SDL_ Image support140 3) type 'make' or 'make all' to build derelictSDL.lib with SDL_image and SDL_mixer 99 141 4) optionally type 'make clean' to delete all object files OR 100 142 optionally type 'make cleanall' to delete all object and lib files 101 143 102 To build DerelictSDL without SDL_Image support on Windows: 144 -------------------------------------------------------------------------------- 145 To build DerelictSDL with SDL_image on Windows: 103 146 104 147 1) ensure that both dmd\bin and dm\bin are on your path 105 148 2) from a command prompt, cd to <derelict_dir>\DerelictSDL 106 3) type 'make sdl only' to build derelictSDL.lib without SDL_Image support149 3) type 'make sdl_sdlimg' to build derelictSDL.lib with SDL_image 107 150 4) optionally type 'make clean' to delete all object files OR 108 151 optionally type 'make cleanall' to delete all object and lib files 152 153 -------------------------------------------------------------------------------- 154 To build DerelictSDL with SDL_mixer on Windows: 155 156 1) ensure that both dmd\bin and dm\bin are on your path 157 2) from a command prompt, cd to <derelict_dir>\DerelictSDL 158 3) type 'make sdl_sdlmix' to build derelictSDL.lib with SDL_mixer 159 4) optionally type 'make clean' to delete all object files OR 160 optionally type 'make cleanall' to delete all object and lib files 161 162 -------------------------------------------------------------------------------- 163 To build DerelictSDL without SDL_image or SDL_mixer on Windows: 164 165 1) ensure that both dmd\bin and dm\bin are on your path 166 2) from a command prompt, cd to <derelict_dir>\DerelictSDL 167 3) type 'make sdlonly' to build derelictSDL.lib without SDL_image or SDL_mixer 168 4) optionally type 'make clean' to delete all object files OR 169 optionally type 'make cleanall' to delete all object and lib files
