All pastes #336941 Raw Edit

Something

public text v1 · immutable
·published 2007-02-02 11:51 UTC
rendered paste body
 protected void load(char[] filename)
        {
                // Attempt to load image
                source = Resource.resolvePath(filename);
                Log.write("Loading image '" ~ source ~ "'.");
                SDL_Surface *sdl_image;
                if ((sdl_image = IMG_Load(toStringz(source))) is null){
                        throw new Exception("Could not open image file '" ~ source ~ "'.");
                }
                width = sdl_image.w;
                height= sdl_image.h;