From: Severin Meyer 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: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=2feab66b5f1a6b1a455e955ae1571aebf53aadf8 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 011f9a9c32..2b65269c35 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 e93b5e6001..82fb43f895 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 f49d205d0d..4c81461637 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 a3b5910140..de9fea79bd 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 ff853ee6b8..ae90b9efab 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 22883f40e1..a9fc38a7c3 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 23db1da64e..546306520b 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 f755681ee0..628c44af59 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 69fa4d8142..7068ffe6bf 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 c8fc81702d..31e5457dfb 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 92a657361b..882bd5cbcf 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 3956a3ff21..56ba0f1c9f 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 9a2519a95c..78b9f7d311 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 9012fb2599..1aff0d4f21 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 0d0012a53d..68491d1fe7 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 f0385b97f9..14a64b7e16 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 706c87ec2f..f49d32ba8a 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 a6816f9031..660b5b3c43 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 2170960eba..0382a3db09 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 916268f05e..82c8369b2e 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 0000000000..227200f999 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 bd728e2838..5b7570a550 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 10089d23e2..2d6e0ff904 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 2b0705e60e..3d0c56e2f1 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 538243c011..d79175ae2c 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 a4736687a6..255b2ff58d 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); } }