… | |
… | |
217 | SDL_RWops *rw = ix |
217 | SDL_RWops *rw = ix |
218 | ? SDL_RWFromFile (image, "r") |
218 | ? SDL_RWFromFile (image, "r") |
219 | : SDL_RWFromConstMem (image, image_len); |
219 | : SDL_RWFromConstMem (image, image_len); |
220 | |
220 | |
221 | if (!rw) |
221 | if (!rw) |
222 | croak ("load_image: unable to open file"); |
222 | croak ("load_image: %s", SDL_GetError ()); |
223 | |
223 | |
224 | surface = IMG_Load_RW (rw, 1); |
224 | surface = IMG_Load_RW (rw, 1); |
225 | if (!surface) |
225 | if (!surface) |
226 | croak ("load_image: unable to read file"); |
226 | croak ("load_image: %s", SDL_GetError ()); |
227 | |
227 | |
228 | fmt.palette = NULL; |
228 | fmt.palette = NULL; |
229 | fmt.BitsPerPixel = 32; |
229 | fmt.BitsPerPixel = 32; |
230 | fmt.BytesPerPixel = 4; |
230 | fmt.BytesPerPixel = 4; |
231 | fmt.Rmask = 0x000000ff; |
231 | fmt.Rmask = 0x000000ff; |