215 |
215 |
216 r.w:= 26; |
216 r.w:= 26; |
217 r.h:= 19; |
217 r.h:= 19; |
218 |
218 |
219 DrawRoundRect(@r, cWhiteColor, cNearBlackColor, texsurf, true); |
219 DrawRoundRect(@r, cWhiteColor, cNearBlackColor, texsurf, true); |
220 |
220 |
221 // overwrite flag for cpu teams and keep players from using it |
221 // overwrite flag for cpu teams and keep players from using it |
222 if (Hedgehogs[0].Gear <> nil) and (Hedgehogs[0].BotLevel > 0) then |
222 if (Hedgehogs[0].Gear <> nil) and (Hedgehogs[0].BotLevel > 0) then |
223 Flag:= 'cpu' |
223 Flag:= 'cpu' |
224 else if Flag = 'cpu' then |
224 else if Flag = 'cpu' then |
225 Flag:= 'hedgewars'; |
225 Flag:= 'hedgewars'; |
236 PLongwordArray(texsurf^.pixels)^[32 * 2 + 23]:= cNearBlackColor; |
236 PLongwordArray(texsurf^.pixels)^[32 * 2 + 23]:= cNearBlackColor; |
237 PLongwordArray(texsurf^.pixels)^[32 * 16 + 2]:= cNearBlackColor; |
237 PLongwordArray(texsurf^.pixels)^[32 * 16 + 2]:= cNearBlackColor; |
238 PLongwordArray(texsurf^.pixels)^[32 * 16 + 23]:= cNearBlackColor; |
238 PLongwordArray(texsurf^.pixels)^[32 * 16 + 23]:= cNearBlackColor; |
239 |
239 |
240 FlagTex:= Surface2Tex(texsurf, false); |
240 FlagTex:= Surface2Tex(texsurf, false); |
241 |
241 SDL_FreeSurface(texsurf); |
|
242 texsurf:= nil; |
|
243 |
242 dec(drY, r.h + 2); |
244 dec(drY, r.h + 2); |
243 DrawHealthY:= drY; |
245 DrawHealthY:= drY; |
244 for i:= 0 to 7 do |
246 for i:= 0 to 7 do |
245 with Hedgehogs[i] do |
247 with Hedgehogs[i] do |
246 if Gear <> nil then |
248 if Gear <> nil then |
247 begin |
249 begin |
248 NameTagTex:= RenderStringTex(Name, Clan^.Color, CheckCJKFont(Name,fnt16)); |
250 NameTagTex:= RenderStringTex(Name, Clan^.Color, CheckCJKFont(Name,fnt16)); |
249 if Hat <> 'NoHat' then |
251 if Hat <> 'NoHat' then |
250 begin |
252 begin |
251 texsurf:= nil; |
|
252 if (Length(Hat) > 39) and (Copy(Hat,1,8) = 'Reserved') and (Copy(Hat,9,32) = PlayerHash) then |
253 if (Length(Hat) > 39) and (Copy(Hat,1,8) = 'Reserved') and (Copy(Hat,9,32) = PlayerHash) then |
253 texsurf:= LoadImage(Pathz[ptHats] + '/Reserved/' + Copy(Hat,9,Length(s)-8), ifNone) |
254 texsurf:= LoadImage(Pathz[ptHats] + '/Reserved/' + Copy(Hat,9,Length(s)-8), ifNone) |
254 else |
255 else |
255 texsurf:= LoadImage(Pathz[ptHats] + '/' + Hat, ifNone); |
256 texsurf:= LoadImage(Pathz[ptHats] + '/' + Hat, ifNone); |
256 if texsurf <> nil then |
257 if texsurf <> nil then |
257 begin |
258 begin |
258 HatTex:= Surface2Tex(texsurf, true); |
259 HatTex:= Surface2Tex(texsurf, true); |
259 SDL_FreeSurface(texsurf) |
260 SDL_FreeSurface(texsurf) |
260 end |
261 end |