From: Severin Meyer <sev.ch@web.de>
Date: Thu, 23 Jul 2015 14:12:38 +0000 (+0200)
Subject: Revise vehicle HUD images and make small updates to the HUD drawing function
X-Git-Tag: xonotic-v0.8.1~31^2~12
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2feab66b5f1a6b1a455e955ae1571aebf53aadf8;p=xonotic%2Fxonotic-data.pk3dir.git

Revise vehicle HUD images and make small updates to the HUD drawing function
---

diff --git a/gfx/vehicles/bar_dwn_left.tga b/gfx/vehicles/bar_dwn_left.tga
index 011f9a9c3..2b65269c3 100644
Binary files a/gfx/vehicles/bar_dwn_left.tga and b/gfx/vehicles/bar_dwn_left.tga differ
diff --git a/gfx/vehicles/bar_dwn_right.tga b/gfx/vehicles/bar_dwn_right.tga
index e93b5e600..82fb43f89 100644
Binary files a/gfx/vehicles/bar_dwn_right.tga and b/gfx/vehicles/bar_dwn_right.tga differ
diff --git a/gfx/vehicles/bar_up_left.tga b/gfx/vehicles/bar_up_left.tga
index f49d205d0..4c8146163 100644
Binary files a/gfx/vehicles/bar_up_left.tga and b/gfx/vehicles/bar_up_left.tga differ
diff --git a/gfx/vehicles/bar_up_right.tga b/gfx/vehicles/bar_up_right.tga
index a3b591014..de9fea79b 100644
Binary files a/gfx/vehicles/bar_up_right.tga and b/gfx/vehicles/bar_up_right.tga differ
diff --git a/gfx/vehicles/bullets.tga b/gfx/vehicles/bullets.tga
index ff853ee6b..ae90b9efa 100644
Binary files a/gfx/vehicles/bullets.tga and b/gfx/vehicles/bullets.tga differ
diff --git a/gfx/vehicles/bumb.tga b/gfx/vehicles/bumb.tga
index 22883f40e..a9fc38a7c 100644
Binary files a/gfx/vehicles/bumb.tga and b/gfx/vehicles/bumb.tga differ
diff --git a/gfx/vehicles/bumb_lgun.tga b/gfx/vehicles/bumb_lgun.tga
index 23db1da64..546306520 100644
Binary files a/gfx/vehicles/bumb_lgun.tga and b/gfx/vehicles/bumb_lgun.tga differ
diff --git a/gfx/vehicles/bumb_rgun.tga b/gfx/vehicles/bumb_rgun.tga
index f755681ee..628c44af5 100644
Binary files a/gfx/vehicles/bumb_rgun.tga and b/gfx/vehicles/bumb_rgun.tga differ
diff --git a/gfx/vehicles/bumb_side.tga b/gfx/vehicles/bumb_side.tga
index 69fa4d814..7068ffe6b 100644
Binary files a/gfx/vehicles/bumb_side.tga and b/gfx/vehicles/bumb_side.tga differ
diff --git a/gfx/vehicles/bumb_side_gun.tga b/gfx/vehicles/bumb_side_gun.tga
index c8fc81702..31e5457df 100644
Binary files a/gfx/vehicles/bumb_side_gun.tga and b/gfx/vehicles/bumb_side_gun.tga differ
diff --git a/gfx/vehicles/frame.tga b/gfx/vehicles/frame.tga
index 92a657361..882bd5cbc 100644
Binary files a/gfx/vehicles/frame.tga and b/gfx/vehicles/frame.tga differ
diff --git a/gfx/vehicles/health.tga b/gfx/vehicles/health.tga
index 3956a3ff2..56ba0f1c9 100644
Binary files a/gfx/vehicles/health.tga and b/gfx/vehicles/health.tga differ
diff --git a/gfx/vehicles/raptor.tga b/gfx/vehicles/raptor.tga
index 9a2519a95..78b9f7d31 100644
Binary files a/gfx/vehicles/raptor.tga and b/gfx/vehicles/raptor.tga differ
diff --git a/gfx/vehicles/raptor_bombs.tga b/gfx/vehicles/raptor_bombs.tga
index 9012fb259..1aff0d4f2 100644
Binary files a/gfx/vehicles/raptor_bombs.tga and b/gfx/vehicles/raptor_bombs.tga differ
diff --git a/gfx/vehicles/raptor_guns.tga b/gfx/vehicles/raptor_guns.tga
index 0d0012a53..68491d1fe 100644
Binary files a/gfx/vehicles/raptor_guns.tga and b/gfx/vehicles/raptor_guns.tga differ
diff --git a/gfx/vehicles/rocket.tga b/gfx/vehicles/rocket.tga
index f0385b97f..14a64b7e1 100644
Binary files a/gfx/vehicles/rocket.tga and b/gfx/vehicles/rocket.tga differ
diff --git a/gfx/vehicles/sbot.tga b/gfx/vehicles/sbot.tga
index 706c87ec2..f49d32ba8 100644
Binary files a/gfx/vehicles/sbot.tga and b/gfx/vehicles/sbot.tga differ
diff --git a/gfx/vehicles/sbot_mguns.tga b/gfx/vehicles/sbot_mguns.tga
index a6816f903..660b5b3c4 100644
Binary files a/gfx/vehicles/sbot_mguns.tga and b/gfx/vehicles/sbot_mguns.tga differ
diff --git a/gfx/vehicles/sbot_rpods.tga b/gfx/vehicles/sbot_rpods.tga
index 2170960eb..0382a3db0 100644
Binary files a/gfx/vehicles/sbot_rpods.tga and b/gfx/vehicles/sbot_rpods.tga differ
diff --git a/gfx/vehicles/shield.tga b/gfx/vehicles/shield.tga
index 916268f05..82c8369b2 100644
Binary files a/gfx/vehicles/shield.tga and b/gfx/vehicles/shield.tga differ
diff --git a/gfx/vehicles/template.png b/gfx/vehicles/template.png
new file mode 100644
index 000000000..227200f99
Binary files /dev/null and b/gfx/vehicles/template.png differ
diff --git a/gfx/vehicles/vh-shield.tga b/gfx/vehicles/vh-shield.tga
index bd728e283..5b7570a55 100644
Binary files a/gfx/vehicles/vh-shield.tga and b/gfx/vehicles/vh-shield.tga differ
diff --git a/gfx/vehicles/waki.tga b/gfx/vehicles/waki.tga
index 10089d23e..2d6e0ff90 100644
Binary files a/gfx/vehicles/waki.tga and b/gfx/vehicles/waki.tga differ
diff --git a/gfx/vehicles/waki_guns.tga b/gfx/vehicles/waki_guns.tga
index 2b0705e60..3d0c56e2f 100644
Binary files a/gfx/vehicles/waki_guns.tga and b/gfx/vehicles/waki_guns.tga differ
diff --git a/gfx/vehicles/waki_rockets.tga b/gfx/vehicles/waki_rockets.tga
index 538243c01..d79175ae2 100644
Binary files a/gfx/vehicles/waki_rockets.tga and b/gfx/vehicles/waki_rockets.tga differ
diff --git a/qcsrc/client/vehicles/all.qc b/qcsrc/client/vehicles/all.qc
index a4736687a..255b2ff58 100644
--- a/qcsrc/client/vehicles/all.qc
+++ b/qcsrc/client/vehicles/all.qc
@@ -247,11 +247,11 @@ void Vehicles_drawHUD(
 
 	drawpic(tmpPos, modelWeapon1, tmpSize, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), 1, DRAWFLAG_NORMAL);
 	drawpic(tmpPos, modelWeapon2, tmpSize, '1 1 1' * ammo2 + '1 0 0' * (1 - ammo2), 1, DRAWFLAG_NORMAL);
-	drawpic(tmpPos, vMODEL_SHIELD, tmpSize, '1 1 1', shield, DRAWFLAG_NORMAL);
+	drawpic(tmpPos, vMODEL_SHIELD, tmpSize, '1 1 1' * shield + '1 0 0' * (1 - shield), shield, DRAWFLAG_NORMAL);
 
 	// Health bar
 	tmpSize.y = hudSize.y / 2;
-	tmpPos.x  = hudPos.x + hudSize.x / 24;
+	tmpPos.x  = hudPos.x + hudSize.x * (32/768);
 	tmpPos.y  = hudPos.y;
 
 	drawsetcliparea(tmpPos.x + (tmpSize.x * (1 - health)), tmpPos.y, tmpSize.x, tmpSize.y);
@@ -264,7 +264,7 @@ void Vehicles_drawHUD(
 	drawpic(tmpPos, vBAR_SHIELD, tmpSize, '1 1 1', 1, DRAWFLAG_NORMAL);
 
 	// Ammo1 bar
-	tmpPos.x = hudPos.x + hudSize.x / 1.6;
+	tmpPos.x = hudPos.x + hudSize.x * (480/768);
 	tmpPos.y = hudPos.y;
 
 	if(ammo1)
@@ -286,10 +286,10 @@ void Vehicles_drawHUD(
 	drawresetcliparea();
 
 	// Health icon
-	tmpSize.x = hudSize.x / 6;
-	tmpSize.y = hudSize.y / 2;
-	tmpPos.x  = hudPos.x + hudSize.x / 24;
-	tmpPos.y  = hudPos.y;
+	tmpSize.x = hudSize.x * (80/768);
+	tmpSize.y = hudSize.y * (80/256);
+	tmpPos.x  = hudPos.x + hudSize.x * (56/768);
+	tmpPos.y  = hudPos.y + hudSize.y * (48/256);
 
 	if(health < 0.25)
 	{
@@ -333,21 +333,21 @@ void Vehicles_drawHUD(
 	}
 
 	// Ammo1 icon
-	tmpPos.x = hudPos.x + hudSize.x * 19 / 24;
-	tmpPos.y = hudPos.y;
+	tmpPos.x = hudPos.x + hudSize.x * (632/768);
+	tmpPos.y = hudPos.y + hudSize.y * (48/256);
 
 	if(ammo1)
-		drawpic(tmpPos, vICON_AMMO1, tmpSize, '1 1 1', 1, DRAWFLAG_NORMAL);
+		drawpic(tmpPos, iconAmmo1, tmpSize, '1 1 1', 1, DRAWFLAG_NORMAL);
 	else
-		drawpic(tmpPos, vICON_AMMO1, tmpSize, '1 1 1', 0.25, DRAWFLAG_NORMAL);
+		drawpic(tmpPos, iconAmmo1, tmpSize, '1 1 1', 0.2, DRAWFLAG_NORMAL);
 
 	// Ammo2 icon
 	tmpPos.y = hudPos.y + hudSize.y / 2;
 
 	if(ammo2)
-		drawpic(tmpPos, vICON_AMMO2, tmpSize, '1 1 1', 1, DRAWFLAG_NORMAL);
+		drawpic(tmpPos, iconAmmo2, tmpSize, '1 1 1', 1, DRAWFLAG_NORMAL);
 	else
-		drawpic(tmpPos, vICON_AMMO2, tmpSize, '1 1 1', 0.25, DRAWFLAG_NORMAL);
+		drawpic(tmpPos, iconAmmo2, tmpSize, '1 1 1', 0.2, DRAWFLAG_NORMAL);
 
 	// Crosshair
 	tmpSize  = draw_getimagesize(crosshair) * autocvar_cl_vehicles_crosshair_size;
@@ -360,17 +360,17 @@ void Vehicles_drawHUD(
 	if(shouldDrawBumbleGunnerCrosshair)
 	{
 		tmpSize = '1 1 1' * hud_fontsize;
-		tmpPos.x = hudPos.x + hudSize.x / 1.5;
+		tmpPos.x = hudPos.x + hudSize.x * (520/768);
 
 		if(!AuxiliaryXhairs[1].draw2d)
 		{
-			tmpPos.y = hudPos.y + hudSize.y / 2 - hudSize.y / 10 - tmpSize.y;
+			tmpPos.y = hudPos.y + hudSize.y * (96/256) - tmpSize.y;
 			drawstring(tmpPos, _("No right gunner!"), tmpSize, '1 1 1', blinkValue, DRAWFLAG_NORMAL);
 		}
 
 		if(!AuxiliaryXhairs[2].draw2d)
 		{
-			tmpPos.y = hudPos.y + hudSize.y / 2 + hudSize.y / 10;
+			tmpPos.y = hudPos.y + hudSize.y * (160/256);
 			drawstring(tmpPos, _("No left gunner!"), tmpSize, '1 1 1', blinkValue, DRAWFLAG_NORMAL);
 		}
 	}