[Freeciv-Dev] (PR#15482) SDL client: the color black is transparent in t
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15482 >
> [dmarks - Do 09. Feb 2006, 00:00:57]:
>
> See screenshot. The flag at the top is supposed to be the Cornish one.
>
> -Daniel
>
Here's a patch.
Index: client/gui-sdl/inteldlg.c
===================================================================
--- client/gui-sdl/inteldlg.c (Revision 11553)
+++ client/gui-sdl/inteldlg.c (Arbeitskopie)
@@ -236,13 +236,8 @@
/* ---------- */
pLogo = GET_SURF(get_nation_flag_sprite(tileset, p->nation));
- pLogo = make_flag_surface_smaler(pLogo);
-
pText1 = ZoomSurface(pLogo, 4.0 , 4.0, 1);
- FREESURFACE(pLogo);
pLogo = pText1;
- SDL_SetColorKey(pLogo,
- SDL_SRCCOLORKEY|SDL_RLEACCEL, getpixel(pLogo, pLogo->w - 1, pLogo->h
- 1));
pBuf = create_icon2(pLogo, pWindow->dst,
(WF_DRAW_THEME_TRANSPARENT|WF_WIDGET_HAS_INFO_LABEL|
Index: client/gui-sdl/plrdlg.c
===================================================================
--- client/gui-sdl/plrdlg.c (Revision 11553)
+++ client/gui-sdl/plrdlg.c (Arbeitskopie)
@@ -409,11 +409,7 @@
pStr->style |= (TTF_STYLE_BOLD|SF_CENTER);
pLogo = GET_SURF(get_nation_flag_sprite(tileset, pPlayer->nation));
- pLogo = make_flag_surface_smaler(pLogo);
pZoomed = ZoomSurface(pLogo, 3.0 - n * 0.05, 3.0 - n * 0.05 , 1);
- SDL_SetColorKey(pZoomed, SDL_SRCCOLORKEY|SDL_RLEACCEL,
- getpixel(pZoomed, pZoomed->w - 1, pZoomed->h - 1));
- FREESURFACE(pLogo);
pBuf = create_icon2(pZoomed, pWindow->dst,
(WF_DRAW_THEME_TRANSPARENT|WF_WIDGET_HAS_INFO_LABEL|WF_FREE_THEME));
@@ -671,10 +667,9 @@
pStr->style |= TTF_STYLE_BOLD;
pLogo = GET_SURF(get_nation_flag_sprite(tileset, pPlayer->nation));
- pLogo = make_flag_surface_smaler(pLogo);
pBuf = create_iconlabel(pLogo, pWindow->dst, pStr,
-
(WF_FREE_THEME|WF_DRAW_THEME_TRANSPARENT|WF_DRAW_TEXT_LABEL_WITH_SPACE));
+
(/*WF_FREE_THEME|*/WF_DRAW_THEME_TRANSPARENT|WF_DRAW_TEXT_LABEL_WITH_SPACE));
/* now add some eye candy ... */
switch (pDS->type) {
|
|