# HG changeset patch # User smxx # Date 1272569998 0 # Node ID f73e0e8e55c2c86c21a9da78c0125ef592014622 # Parent 4f2185ed8ca83586811e19cac0ede123d5a6d078 Engine: * Fixed highlight color (little/big endian issue or just different byte order for clan colors?) diff -r 4f2185ed8ca8 -r f73e0e8e55c2 hedgewars/uTeams.pas --- a/hedgewars/uTeams.pas Thu Apr 29 19:21:40 2010 +0000 +++ b/hedgewars/uTeams.pas Thu Apr 29 19:39:58 2010 +0000 @@ -80,6 +80,7 @@ TClan = record Color: Longword; + RColor: Longword; // color with reversed byte order Teams: array[0..Pred(cMaxTeams)] of PTeam; TeamsNumber: Longword; CurrTeam: LongWord; @@ -111,6 +112,7 @@ function CheckForWin: boolean; procedure TeamGone(s: shortstring); procedure TeamGoneEffect(var Team: TTeam); +function GetTeamStatString(p: PTeam): shortstring; implementation uses uMisc, uWorld, uAI, uLocale, uConsole, uAmmos, uChat; @@ -312,7 +314,8 @@ with team^.Clan^ do begin ClanIndex:= Pred(ClansCount); - Color:= TeamColor + Color:= TeamColor; + RColor:= $FF000000 or ((Color shr 16) and $FF) or ((Color shl 16) and $00FF0000) or (Color and $0000FF00) end end else begin @@ -458,6 +461,13 @@ end end; +function GetTeamStatString(p: PTeam): shortstring; +var s: ansistring; +begin + s:= p^.TeamName + ':' + inttostr(p^.TeamHealth) + ':'; + GetTeamStatString:= s; +end; + procedure initModule; begin CurrentTeam:= nil;