#if defined(TARGET_SDL)
pixel = SDL_MapRGB(bitmap->surface->format, color_r, color_g, color_b);
+#elif defined(TARGET_ALLEGRO)
+ pixel = AllegroAllocColorCell(color_r << 8, color_g << 8, color_b << 8);
#elif defined(TARGET_X11_NATIVE)
XColor xcolor;
Bitmap *LoadImage(char *basename)
{
Bitmap *new_bitmap;
- char filename[256];
-
- sprintf(filename, "%s/%s/%s",
- options.ro_base_directory, GRAPHICS_DIRECTORY, basename);
+ char *filename = getPath3(options.ro_base_directory, GRAPHICS_DIRECTORY,
+ basename);
#if defined(TARGET_SDL)
new_bitmap = SDLLoadImage(filename);
new_bitmap = X11LoadImage(filename);
#endif
+ free(filename);
+
return new_bitmap;
}