Image *HGEImageLoader::load(const std::string &filename, bool convertToDisplayFormat) { HTEXTURE texture = mHGE->Texture_Load(filename.c_str()); if (texture == NULL) { throw GCN_EXCEPTION(std::string("Unable to load: ") + filename); } HGEImage *image = new HGEImage(texture, true); if (convertToDisplayFormat) { image->convertToDisplayFormat(); } return image; }
Image *HGEImageLoader::load(hgeResourceManager* manager, char* name, int resgroup, bool convertToDisplayFormat) { HTEXTURE texture = manager->GetTexture(name, resgroup); if (texture == NULL) { throw FCN_EXCEPTION(std::string("Unable to load: ") + name); } HGEImage *image = new HGEImage(texture, true); if (convertToDisplayFormat) { image->convertToDisplayFormat(); } return image; }