81 |
} |
} |
82 |
if (img) { |
if (img) { |
83 |
SDL_FreeSurface(s); |
SDL_FreeSurface(s); |
84 |
return new Surface(img); |
return Surface::make_surface(img); |
85 |
} |
} |
86 |
return new Surface(s); |
return Surface::make_surface(s); |
87 |
} |
} |
88 |
return 0; |
return 0; |
89 |
} |
} |
286 |
Surface *sfc = Duplicate(surface_cache.get(images[0])); |
Surface *sfc = Duplicate(surface_cache.get(images[0])); |
287 |
if (sfc) // Surface *sfc = enigma::LoadImage(images[0])) |
if (sfc) // Surface *sfc = enigma::LoadImage(images[0])) |
288 |
{ |
{ |
289 |
|
GC gc(sfc); |
290 |
for (int i=1; i<n; i++) |
for (int i=1; i<n; i++) |
291 |
sfc->blit(0,0, surface_cache_alpha.get(images[i])); |
blit (gc, 0,0, surface_cache_alpha.get(images[i])); |
292 |
DefineModel(name, new ImageModel(sfc, 0,0)); |
DefineModel(name, new ImageModel(sfc, 0,0)); |
293 |
image_pile.push_back(sfc); // make sure it gets destructed |
image_pile.push_back(sfc); // make sure it gets destructed |
294 |
} |
} |