1094 // draw flag |
1094 // draw flag |
1095 DrawTexture(-14, cScreenHeight + DrawHealthY + smallScreenOffset, FlagTex); |
1095 DrawTexture(-14, cScreenHeight + DrawHealthY + smallScreenOffset, FlagTex); |
1096 |
1096 |
1097 TeamHealthBarWidth:= cTeamHealthWidth * TeamHealthBarHealth div MaxTeamHealth; |
1097 TeamHealthBarWidth:= cTeamHealthWidth * TeamHealthBarHealth div MaxTeamHealth; |
1098 |
1098 |
1099 // draw health bar |
1099 // draw team health bar |
1100 r.x:= 0; |
1100 r.x:= 0; |
1101 r.y:= 0; |
1101 r.y:= 0; |
1102 r.w:= 2 + TeamHealthBarWidth; |
1102 r.w:= 2 + TeamHealthBarWidth; |
1103 r.h:= htex^.h; |
1103 r.h:= htex^.h; |
1104 DrawTextureFromRect(14, cScreenHeight + DrawHealthY + smallScreenOffset, @r, htex); |
1104 DrawTextureFromRect(14, cScreenHeight + DrawHealthY + smallScreenOffset, @r, htex); |
1105 |
1105 |
1106 // draw health bars right border |
1106 // draw health bar's right border |
1107 inc(r.x, cTeamHealthWidth + 2); |
1107 inc(r.x, cTeamHealthWidth + 2); |
1108 r.w:= 3; |
1108 r.w:= 3; |
1109 DrawTextureFromRect(TeamHealthBarWidth + 15, cScreenHeight + DrawHealthY + smallScreenOffset, @r, htex); |
1109 DrawTextureFromRect(TeamHealthBarWidth + 15, cScreenHeight + DrawHealthY + smallScreenOffset, @r, htex); |
1110 |
1110 |
|
1111 // draw hedgehog health separators in team health bar |
1111 h:= 0; |
1112 h:= 0; |
1112 if not hasGone then |
1113 if not hasGone then |
1113 for i:= 0 to cMaxHHIndex do |
1114 for i:= 0 to cMaxHHIndex do |
1114 begin |
1115 begin |
1115 inc(h, Hedgehogs[i].HealthBarHealth); |
1116 inc(h, Hedgehogs[i].HealthBarHealth); |
1116 if (h < TeamHealthBarHealth) and (Hedgehogs[i].HealthBarHealth > 0) then |
1117 if (h < TeamHealthBarHealth) and (Hedgehogs[i].HealthBarHealth > 0) then |
1117 DrawTexture(15 + h * TeamHealthBarWidth div TeamHealthBarHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture); |
1118 if (IsTooDarkToRead(Clan^.Color)) then |
|
1119 DrawTexture(15 + h * TeamHealthBarWidth div TeamHealthBarHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture) |
|
1120 else |
|
1121 DrawTexture(15 + h * TeamHealthBarWidth div TeamHealthBarHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSliderInverted].Texture); |
1118 end; |
1122 end; |
1119 |
1123 |
1120 // draw Lua value, if set |
1124 // draw Lua value, if set |
1121 if (hasLuaTeamValue) then |
1125 if (hasLuaTeamValue) then |
1122 DrawTexture(TeamHealthBarWidth + 22, cScreenHeight + DrawHealthY + smallScreenOffset, LuaTeamValueTex) |
1126 DrawTexture(TeamHealthBarWidth + 22, cScreenHeight + DrawHealthY + smallScreenOffset, LuaTeamValueTex) |
1168 else if (CurrentTeam = TeamsArray[t]) and (TurnTimeLeft > 0) then |
1172 else if (CurrentTeam = TeamsArray[t]) and (TurnTimeLeft > 0) then |
1169 begin |
1173 begin |
1170 h:= -NameTagTex^.w - 24; |
1174 h:= -NameTagTex^.w - 24; |
1171 if OwnerTex <> nil then |
1175 if OwnerTex <> nil then |
1172 h:= h - OwnerTex^.w - 4; |
1176 h:= h - OwnerTex^.w - 4; |
|
1177 if (IsTooDarkToRead(TeamsArray[t]^.Clan^.Color)) then |
|
1178 DrawSpriteRotatedF(sprFingerBackInv, h, cScreenHeight + DrawHealthY + smallScreenOffset + 2 + SpritesData[sprFingerBackInv].Width div 4, 0, 1, -90) |
|
1179 else |
|
1180 DrawSpriteRotatedF(sprFingerBack, h, cScreenHeight + DrawHealthY + smallScreenOffset + 2 + SpritesData[sprFingerBack].Width div 4, 0, 1, -90); |
1173 Tint(TeamsArray[t]^.Clan^.Color shl 8 or $FF); |
1181 Tint(TeamsArray[t]^.Clan^.Color shl 8 or $FF); |
1174 DrawSpriteRotatedF(sprFinger, h, cScreenHeight + DrawHealthY + smallScreenOffset + 2 + SpritesData[sprFinger].Width div 4, 0, 1, -90); |
1182 DrawSpriteRotatedF(sprFinger, h, cScreenHeight + DrawHealthY + smallScreenOffset + 2 + SpritesData[sprFinger].Width div 4, 0, 1, -90); |
1175 untint; |
1183 untint; |
1176 end; |
1184 end; |
1177 end; |
1185 end; |