narrowed down the massive starter bug to load_starter, maybe involving SDL_CreateRGBSurface or SDL_SetAlpha
This commit is contained in:
parent
3f1d49626e
commit
66e12a837e
1 changed files with 6 additions and 2 deletions
|
|
@ -9483,6 +9483,7 @@ static void load_starter(char * img_id)
|
||||||
SDL_FreeSurface(tmp_surf);
|
SDL_FreeSurface(tmp_surf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (img_starter != NULL &&
|
if (img_starter != NULL &&
|
||||||
(img_starter->w != canvas->w || img_starter->h != canvas->h))
|
(img_starter->w != canvas->w || img_starter->h != canvas->h))
|
||||||
{
|
{
|
||||||
|
|
@ -9496,10 +9497,12 @@ static void load_starter(char * img_id)
|
||||||
tmp_surf->format->Bmask,
|
tmp_surf->format->Bmask,
|
||||||
tmp_surf->format->Amask);
|
tmp_surf->format->Amask);
|
||||||
|
|
||||||
SDL_SetAlpha(tmp_surf, 0, 0);
|
// 3rd arg ignored for RGBA surfaces
|
||||||
|
SDL_SetAlpha(tmp_surf, SDL_RLEACCEL, SDL_ALPHA_OPAQUE);
|
||||||
autoscale_copy_smear_free(tmp_surf,img_starter);
|
autoscale_copy_smear_free(tmp_surf,img_starter);
|
||||||
|
SDL_SetAlpha(img_starter, SDL_RLEACCEL|SDL_SRCALPHA, SDL_ALPHA_OPAQUE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Try to load the a background image: */
|
/* Try to load the a background image: */
|
||||||
|
|
||||||
|
|
@ -11942,6 +11945,7 @@ static int do_open(int want_new_tool)
|
||||||
strcpy(starter_id, d_names[which]);
|
strcpy(starter_id, d_names[which]);
|
||||||
load_starter(starter_id);
|
load_starter(starter_id);
|
||||||
|
|
||||||
|
SDL_FillRect(canvas, NULL, SDL_MapRGB(canvas->format, 255, 255, 255));
|
||||||
SDL_BlitSurface(img_starter_bkgd, NULL, canvas, NULL);
|
SDL_BlitSurface(img_starter_bkgd, NULL, canvas, NULL);
|
||||||
SDL_BlitSurface(img_starter, NULL, canvas, NULL);
|
SDL_BlitSurface(img_starter, NULL, canvas, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue