Revise vehicle HUD images and make small updates to the HUD drawing function
authorSeverin Meyer <sev.ch@web.de>
Thu, 23 Jul 2015 14:12:38 +0000 (16:12 +0200)
committerSeverin Meyer <sev.ch@web.de>
Thu, 23 Jul 2015 14:12:38 +0000 (16:12 +0200)
26 files changed:
gfx/vehicles/bar_dwn_left.tga
gfx/vehicles/bar_dwn_right.tga
gfx/vehicles/bar_up_left.tga
gfx/vehicles/bar_up_right.tga
gfx/vehicles/bullets.tga
gfx/vehicles/bumb.tga
gfx/vehicles/bumb_lgun.tga
gfx/vehicles/bumb_rgun.tga
gfx/vehicles/bumb_side.tga
gfx/vehicles/bumb_side_gun.tga
gfx/vehicles/frame.tga
gfx/vehicles/health.tga
gfx/vehicles/raptor.tga
gfx/vehicles/raptor_bombs.tga
gfx/vehicles/raptor_guns.tga
gfx/vehicles/rocket.tga
gfx/vehicles/sbot.tga
gfx/vehicles/sbot_mguns.tga
gfx/vehicles/sbot_rpods.tga
gfx/vehicles/shield.tga
gfx/vehicles/template.png [new file with mode: 0644]
gfx/vehicles/vh-shield.tga
gfx/vehicles/waki.tga
gfx/vehicles/waki_guns.tga
gfx/vehicles/waki_rockets.tga
qcsrc/client/vehicles/all.qc

index 011f9a9..2b65269 100644 (file)
Binary files a/gfx/vehicles/bar_dwn_left.tga and b/gfx/vehicles/bar_dwn_left.tga differ
index e93b5e6..82fb43f 100644 (file)
Binary files a/gfx/vehicles/bar_dwn_right.tga and b/gfx/vehicles/bar_dwn_right.tga differ
index f49d205..4c81461 100644 (file)
Binary files a/gfx/vehicles/bar_up_left.tga and b/gfx/vehicles/bar_up_left.tga differ
index a3b5910..de9fea7 100644 (file)
Binary files a/gfx/vehicles/bar_up_right.tga and b/gfx/vehicles/bar_up_right.tga differ
index ff853ee..ae90b9e 100644 (file)
Binary files a/gfx/vehicles/bullets.tga and b/gfx/vehicles/bullets.tga differ
index 22883f4..a9fc38a 100644 (file)
Binary files a/gfx/vehicles/bumb.tga and b/gfx/vehicles/bumb.tga differ
index 23db1da..5463065 100644 (file)
Binary files a/gfx/vehicles/bumb_lgun.tga and b/gfx/vehicles/bumb_lgun.tga differ
index f755681..628c44a 100644 (file)
Binary files a/gfx/vehicles/bumb_rgun.tga and b/gfx/vehicles/bumb_rgun.tga differ
index 69fa4d8..7068ffe 100644 (file)
Binary files a/gfx/vehicles/bumb_side.tga and b/gfx/vehicles/bumb_side.tga differ
index c8fc817..31e5457 100644 (file)
Binary files a/gfx/vehicles/bumb_side_gun.tga and b/gfx/vehicles/bumb_side_gun.tga differ
index 92a6573..882bd5c 100644 (file)
Binary files a/gfx/vehicles/frame.tga and b/gfx/vehicles/frame.tga differ
index 3956a3f..56ba0f1 100644 (file)
Binary files a/gfx/vehicles/health.tga and b/gfx/vehicles/health.tga differ
index 9a2519a..78b9f7d 100644 (file)
Binary files a/gfx/vehicles/raptor.tga and b/gfx/vehicles/raptor.tga differ
index 9012fb2..1aff0d4 100644 (file)
Binary files a/gfx/vehicles/raptor_bombs.tga and b/gfx/vehicles/raptor_bombs.tga differ
index 0d0012a..68491d1 100644 (file)
Binary files a/gfx/vehicles/raptor_guns.tga and b/gfx/vehicles/raptor_guns.tga differ
index f0385b9..14a64b7 100644 (file)
Binary files a/gfx/vehicles/rocket.tga and b/gfx/vehicles/rocket.tga differ
index 706c87e..f49d32b 100644 (file)
Binary files a/gfx/vehicles/sbot.tga and b/gfx/vehicles/sbot.tga differ
index a6816f9..660b5b3 100644 (file)
Binary files a/gfx/vehicles/sbot_mguns.tga and b/gfx/vehicles/sbot_mguns.tga differ
index 2170960..0382a3d 100644 (file)
Binary files a/gfx/vehicles/sbot_rpods.tga and b/gfx/vehicles/sbot_rpods.tga differ
index 916268f..82c8369 100644 (file)
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 (file)
index 0000000..227200f
Binary files /dev/null and b/gfx/vehicles/template.png differ
index bd728e2..5b7570a 100644 (file)
Binary files a/gfx/vehicles/vh-shield.tga and b/gfx/vehicles/vh-shield.tga differ
index 10089d2..2d6e0ff 100644 (file)
Binary files a/gfx/vehicles/waki.tga and b/gfx/vehicles/waki.tga differ
index 2b0705e..3d0c56e 100644 (file)
Binary files a/gfx/vehicles/waki_guns.tga and b/gfx/vehicles/waki_guns.tga differ
index 538243c..d79175a 100644 (file)
Binary files a/gfx/vehicles/waki_rockets.tga and b/gfx/vehicles/waki_rockets.tga differ
index a473668..255b2ff 100644 (file)
@@ -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);
                }
        }