Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power." SDL supports Linux, Windows, Windows CE, BeOS, MacOS, Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. The code contains support for AmigaOS, Dreamcast, Atari, AIX, OSF/Tru64, RISC OS, SymbianOS, Gamecube, Wii, and OS/2, but these are not officially supported. SDL is written in C, but works with C++ natively. SDL is distributed under GNU LGPL version 2. This license allows you to use SDL freely in commercial programs as long as you link with the dynamic library.
- Copy all of the header files $DEVKITPRO/libogc/include/SDL/
- Copy all of the *.a files to $DEVKITPRO/libogc/lib/wii/
Remember to link the libraries in the right order:
LIBS := -lSDL_ttf -lSDL_gfx -lSDL_mixer -lSDL_image -lfreetype -ljpeg -lpng -lz -lSDL -lfat -lwiiuse -lbte -logc -lm
Use your friend google to learn how to use SDL.
Uses of SDL
SDL has graphics, sound, and input all in one. SDL is a very popular library used in many open source programs. It is most commonly used in games, but it is also used in emulators and media players. SDL is very easy to use and it is very easy to port apps that use it.
- SDL_gfx eats up memory and can cause code dumps. If you get code dumps then try removing SDL_gfx.
- There are no other known bugs besides the ones from the original SDL.
The original source is from libSDL. A gamecube version was found in the devkitPro CVS repository. Mindcry made the port compatible with the Wii and added on sound, SDL_mixer and SDL_image.
Devildante recompiled a version of SDL_image with libjpeg support, and added SDL_gfx and SDL_ttf with freetype.