# HG changeset patch # User unc0rr # Date 1160078824 0 # Node ID 33d147c69a8309e4ffdb61bd0d7be00867662b25 # Parent a7c2a61524c26d2d71a279a43064771d455f77de Color fixes diff -r a7c2a61524c2 -r 33d147c69a83 hedgewars/CCHandlers.inc --- a/hedgewars/CCHandlers.inc Thu Oct 05 19:40:11 2006 +0000 +++ b/hedgewars/CCHandlers.inc Thu Oct 05 20:07:04 2006 +0000 @@ -86,7 +86,8 @@ begin if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/color"', true); val(id, CurrentTeam.Color, c); -AdjustColor(CurrentTeam.Color) +CurrentTeam.AdjColor:= CurrentTeam.Color; +AdjustColor(CurrentTeam.AdjColor) end; procedure chAdd(var id: shortstring); diff -r a7c2a61524c2 -r 33d147c69a83 hedgewars/uStore.pas --- a/hedgewars/uStore.pas Thu Oct 05 19:40:11 2006 +0000 +++ b/hedgewars/uStore.pas Thu Oct 05 20:07:04 2006 +0000 @@ -104,7 +104,10 @@ Result.w:= w + 6; Result.h:= h + 2; DrawRoundRect(@Result, cWhiteColor, cColorNearBlack, Surface); -SDL_GetRGB(Color, Surface.format, @clr.r, @clr.g, @clr.b); +clr.r:= Color shr 16; +clr.g:= (Color shr 8) and $FF; +clr.b:= Color and $FF; +clr.a:= 0; tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr); Result.x:= X + 3; Result.y:= Y + 1; @@ -143,7 +146,7 @@ Team.HealthRect:= r; rr:= r; inc(rr.x, 2); dec(rr.w, 4); inc(rr.y, 2); dec(rr.h, 4); - DrawRoundRect(@rr, Team.Color, Team.Color, StoreSurface, false); + DrawRoundRect(@rr, Team.AdjColor, Team.AdjColor, StoreSurface, false); inc(r.y, r.h); dec(drY, r.h + 2); Team.DrawHealthY:= drY; @@ -174,7 +177,7 @@ Team:= TeamsList; while Team<>nil do begin - SDL_FillRect(StoreSurface, @r, Team.Color); + SDL_FillRect(StoreSurface, @r, Team.AdjColor); SDL_UpperBlit(tmpsurf, nil, StoreSurface, @r); Team.CrossHairRect:= r; inc(r.x, 16); @@ -376,7 +379,10 @@ begin r.x:= X; r.y:= Y; -SDL_GetRGB(cWhiteColor, PixelFormat, @clr.r, @clr.g, @clr.b); +clr.r:= $FF; +clr.g:= $FF; +clr.b:= $FF; +clr.a:= 0; tmpsurf:= TTF_RenderUTF8_Solid(Fontz[Font].Handle, PChar(s), clr); SDL_UpperBlit(tmpsurf, nil, Surface, @r); SDL_FreeSurface(tmpsurf) diff -r a7c2a61524c2 -r 33d147c69a83 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Thu Oct 05 19:40:11 2006 +0000 +++ b/hedgewars/uTeams.pas Thu Oct 05 20:07:04 2006 +0000 @@ -38,7 +38,7 @@ THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo; TTeam = record Next: PTeam; - Color: Longword; + Color, AdjColor: Longword; TeamName: string[MAXNAMELEN]; ExtDriven: boolean; Binds: TBinds;