#include <CSBitmap.h>
Inheritance diagram for CSBitmapDirectLoader:
Static Public Attributes | |
CSBitmapDirectLoader | INSTANCE |
Protected Member Functions | |
virtual CSBitmap * | create (const std::string &filename) |
|
Reimplemented from CSBitmapLoader. Definition at line 86 of file CSBitmap.cpp. References CSBitmap::b, CSBitmap::g, LOG_EXIT, CSBitmap::picture, CSBitmap::r, and SDLMain::shutdown().
00087 { 00088 SDL_Surface *image = 0; 00089 00090 /* Load the BMP file into a surface */ 00091 image = SDL_LoadBMP(filename.c_str()); 00092 00093 if (image == 0) 00094 { 00095 LOG_EXIT 00096 SDLMain::shutdown((std::string)"Couldn't load \"" + filename + "\": " + SDL_GetError(), 1); 00097 } 00098 00099 // free loaded parse entities! 00100 CSBitmap *bitmap = new CSBitmap(); 00101 bitmap->r = 255; 00102 bitmap->g = 0; 00103 bitmap->b = 255; 00104 bitmap->picture = image; 00105 return bitmap; 00106 } |
Here is the call graph for this function:
|
Reimplemented from CSBitmapLoader. Definition at line 11 of file CSBitmap.cpp. |