]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Draw images without specifying an extension so to make menu and client code consisten...
authorterencehill <piuntn@gmail.com>
Sat, 17 Apr 2021 10:25:11 +0000 (12:25 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 17 Apr 2021 10:25:11 +0000 (12:25 +0200)
qcsrc/client/hud/crosshair.qc
qcsrc/client/hud/panel/pressedkeys.qc
qcsrc/client/main.qc
qcsrc/client/view.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/vehicles/cl_vehicles.qh
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc

index f45edf9614107e9e3e9d7b923dec09baf57a7778..c697268eb4d2ef82928b800ee5771e5cc302ad8e 100644 (file)
@@ -533,27 +533,27 @@ void HUD_Crosshair(entity this)
 
                                        ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha;
                                        ring_inner_rgb = vec3(autocvar_crosshair_ring_vortex_inner_color_red, autocvar_crosshair_ring_vortex_inner_color_green, autocvar_crosshair_ring_vortex_inner_color_blue);
-                                       ring_inner_image = "gfx/crosshair_ring_inner.tga";
+                                       ring_inner_image = "gfx/crosshair_ring_inner";
 
                                        // draw the outer ring to show the current charge of the weapon
                                        ring_value = charge;
                                        ring_alpha = autocvar_crosshair_ring_vortex_alpha;
                                        ring_rgb = wcross_color;
-                                       ring_image = "gfx/crosshair_ring_nexgun.tga";
+                                       ring_image = "gfx/crosshair_ring_nexgun";
                                }
                                else if (autocvar_crosshair_ring && wepent.activeweapon == WEP_MINE_LAYER && WEP_CVAR(minelayer, limit) && autocvar_crosshair_ring_minelayer)
                                {
                                        ring_value = bound(0, wepent.minelayer_mines / WEP_CVAR(minelayer, limit), 1);
                                        ring_alpha = autocvar_crosshair_ring_minelayer_alpha;
                                        ring_rgb = wcross_color;
-                                       ring_image = "gfx/crosshair_ring.tga";
+                                       ring_image = "gfx/crosshair_ring";
                                }
                                else if (wepent.activeweapon == WEP_HAGAR && wepent.hagar_load && autocvar_crosshair_ring_hagar)
                                {
                                        ring_value = bound(0, wepent.hagar_load / WEP_CVAR_SEC(hagar, load_max), 1);
                                        ring_alpha = autocvar_crosshair_ring_hagar_alpha;
                                        ring_rgb = wcross_color;
-                                       ring_image = "gfx/crosshair_ring.tga";
+                                       ring_image = "gfx/crosshair_ring";
                                }
                                else if(autocvar_crosshair_ring_reload && weapon_clipsize) // forces there to be only an ammo ring
                                {
@@ -565,9 +565,9 @@ void HUD_Crosshair(entity this)
                                        // Note: This is to stop Taoki from complaining that the image doesn't match all potential balances.
                                        // if a new image for another weapon is added, add the code (and its respective file/value) here
                                        if ((wepent.activeweapon == WEP_RIFLE) && (weapon_clipsize == 80))
-                                               ring_image = "gfx/crosshair_ring_rifle.tga";
+                                               ring_image = "gfx/crosshair_ring_rifle";
                                        else
-                                               ring_image = "gfx/crosshair_ring.tga";
+                                               ring_image = "gfx/crosshair_ring";
                                }
                                else if ( autocvar_crosshair_ring && autocvar_crosshair_ring_arc && arc_heat && wepent.activeweapon == WEP_ARC )
                                {
@@ -575,7 +575,7 @@ void HUD_Crosshair(entity this)
                                        ring_alpha = (1-arc_heat)*autocvar_crosshair_ring_arc_cold_alpha +
                                                arc_heat*autocvar_crosshair_ring_arc_hot_alpha;
                                        ring_rgb = (1-arc_heat)*wcross_color + arc_heat*autocvar_crosshair_ring_arc_hot_color;
-                                       ring_image = "gfx/crosshair_ring.tga";
+                                       ring_image = "gfx/crosshair_ring";
                                }
 
                                // if in weapon switch animation, fade ring out/in
@@ -651,7 +651,7 @@ void HUD_Crosshair(entity this)
                                if((autocvar_crosshair_dot_color_custom) && (autocvar_crosshair_dot_color != "0"))
                                        wcross_color = stov(autocvar_crosshair_dot_color);
 
-                               CROSSHAIR_DRAW(wcross_resolution * autocvar_crosshair_dot_size, "gfx/crosshairdot.tga", f * autocvar_crosshair_dot_alpha);
+                               CROSSHAIR_DRAW(wcross_resolution * autocvar_crosshair_dot_size, "gfx/crosshairdot", f * autocvar_crosshair_dot_alpha);
                                // FIXME why don't we use wcross_alpha here?
                                wcross_color = wcross_color_old;
                        }
index 7940e9462e0d4f1f0c725abefaa02b46684b16b2..f61dc6663a00c4c477c349ccce33d3a7e19c99cf 100644 (file)
@@ -62,16 +62,16 @@ void HUD_PressedKeys()
 
        if(autocvar_hud_panel_pressedkeys_attack)
        {
-               drawpic_aspect_skin(pos + eX * (3/4 * keysize.x), ((pressedkeys & KEY_ATCK) ? "key_atck_inv.tga" : "key_atck.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawpic_aspect_skin(pos + eX * (7/4 * keysize.x), ((pressedkeys & KEY_ATCK2) ? "key_atck2_inv.tga" : "key_atck2.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos + eX * (3/4 * keysize.x), ((pressedkeys & KEY_ATCK) ? "key_atck_inv" : "key_atck"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(pos + eX * (7/4 * keysize.x), ((pressedkeys & KEY_ATCK2) ? "key_atck2_inv" : "key_atck2"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                pos.y += keysize.y;
        }
 
-       drawpic_aspect_skin(pos, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv.tga" : "key_crouch.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_FORWARD) ? "key_forward_inv.tga" : "key_forward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * (10/4 * keysize.x), ((pressedkeys & KEY_JUMP) ? "key_jump_inv.tga" : "key_jump.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos, ((pressedkeys & KEY_CROUCH) ? "key_crouch_inv" : "key_crouch"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_FORWARD) ? "key_forward_inv" : "key_forward"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (10/4 * keysize.x), ((pressedkeys & KEY_JUMP) ? "key_jump_inv" : "key_jump"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
        pos.y += keysize.y;
-       drawpic_aspect_skin(pos + eX * (1/4 * keysize.x), ((pressedkeys & KEY_LEFT) ? "key_left_inv.tga" : "key_left.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv.tga" : "key_backward.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       drawpic_aspect_skin(pos + eX * (9/4 * keysize.x), ((pressedkeys & KEY_RIGHT) ? "key_right_inv.tga" : "key_right.tga"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (1/4 * keysize.x), ((pressedkeys & KEY_LEFT) ? "key_left_inv" : "key_left"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (5/4 * keysize.x), ((pressedkeys & KEY_BACKWARD) ? "key_backward_inv" : "key_backward"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawpic_aspect_skin(pos + eX * (9/4 * keysize.x), ((pressedkeys & KEY_RIGHT) ? "key_right_inv" : "key_right"), keysize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 }
index b6e5a87eda138daeb4558a8480e585d27498b359..757effd99bf766574f3fb328e25766ad5e782a90 100644 (file)
@@ -123,13 +123,13 @@ void CSQC_Init()
 
        {
                get_mi_min_max_texcoords(1); // try the CLEVER way first
-               minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
+               minimapname = strcat("gfx/", mi_shortname, "_radar");
                shortmapname = mi_shortname;
 
                if (precache_pic(minimapname) == "")
                {
                        // but maybe we have a non-clever minimap
-                       minimapname = strcat("gfx/", mi_shortname, "_mini.tga");
+                       minimapname = strcat("gfx/", mi_shortname, "_mini");
                        if (precache_pic(minimapname) == "")
                                minimapname = ""; // FAIL
                        else
index 8b13146633c81e10c3b42712f0ecf3cb13eb22b3..871fab3bde130952261046fff316d14e95c6fa81 100644 (file)
@@ -955,17 +955,17 @@ void HUD_Draw(entity this)
        if(STAT(NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
        {
                vector col = '0.25 0.90 1' + vec3(STAT(NADE_TIMER), -STAT(NADE_TIMER), -STAT(NADE_TIMER));
-               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(NADE_TIMER), col, autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
        }
        else if(STAT(CAPTURE_PROGRESS))
        {
-               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(CAPTURE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, _("Capture progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
        }
        else if(STAT(REVIVE_PROGRESS))
        {
-               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring.tga", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
+               DrawCircleClippedPic(vec2(0.5 * vid_conwidth, 0.6 * vid_conheight), 0.1 * vid_conheight, "gfx/crosshair_ring", STAT(REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
                drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), vec2(vid_conwidth, 0.025 * vid_conheight), '1 1 1', 1, DRAWFLAG_NORMAL);
        }
        HUD_Scale_Disable();
@@ -1086,7 +1086,7 @@ void View_NightVision()
        tc_10 = '1.5 0 0' - '0.2 0 0' * sin(time * 0.5) + '0 0.5 0' * cos(time * 1.7);
        //tc_11 = '1 1 0' + '0.6 0 0' * sin(time * 0.6) + '0 0.3 0' * cos(time * 0.1);
        tc_11 = tc_01 + tc_10 - tc_00;
-       R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE, true);
+       R_BeginPolygon("gfx/nightvision-bg", DRAWFLAG_ADDITIVE, true);
        R_PolygonVertex('0 0 0', tc_00, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
@@ -1100,7 +1100,7 @@ void View_NightVision()
        tc_01 = tc_00 + '0 3 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.2);
        tc_10 = tc_00 + '2 0 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.3);
        tc_11 = tc_01 + tc_10 - tc_00;
-       R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE, true);
+       R_BeginPolygon("gfx/nightvision-fg", DRAWFLAG_ADDITIVE, true);
        R_PolygonVertex('0 0 0', tc_00, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
        R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
index 84812fc4605cb2d34fb8497b975e1b9b7d6bafa3..2157062b2a7f5f3806c62055bded9a971fda7957 100644 (file)
@@ -88,9 +88,9 @@ void turret_draw2d(entity this)
                if(hud != HUD_NORMAL)
                {
                        if((get_turretinfo(this.m_id)).spawnflags & TUR_FLAG_MOVE)
-                               txt = "gfx/vehicles/turret_moving.tga";
+                               txt = "gfx/vehicles/turret_moving";
                        else
-                               txt = "gfx/vehicles/turret_stationary.tga";
+                               txt = "gfx/vehicles/turret_stationary";
 
                        vector pz = drawgetimagesize(txt) * autocvar_cl_vehicles_crosshair_size;
                        drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.7, DRAWFLAG_NORMAL);
index ff9448fdd856f2e26e2477723f470db8b687e836..76bdc67313d230d4d1a4e25b2c162826a77e5029 100644 (file)
@@ -10,13 +10,13 @@ bool autocvar__vehicles_shownchasemessage;
 vector autocvar_hud_progressbar_vehicles_ammo1_color;
 vector autocvar_hud_progressbar_vehicles_ammo2_color;
 
-const string vCROSS_BURST = "gfx/vehicles/crosshair_burst.tga";
-const string vCROSS_DROP  = "gfx/vehicles/crosshair_drop.tga";
-const string vCROSS_GUIDE = "gfx/vehicles/crosshair_guide.tga";
-const string vCROSS_HEAL  = "gfx/vehicles/crosshair_heal.tga";
-const string vCROSS_HINT  = "gfx/vehicles/crosshair_hint.tga";
-const string vCROSS_LOCK  = "gfx/vehicles/crosshair_lock.tga";
-const string vCROSS_RAIN  = "gfx/vehicles/crosshair_rain.tga";
+const string vCROSS_BURST = "gfx/vehicles/crosshair_burst";
+const string vCROSS_DROP  = "gfx/vehicles/crosshair_drop";
+const string vCROSS_GUIDE = "gfx/vehicles/crosshair_guide";
+const string vCROSS_HEAL  = "gfx/vehicles/crosshair_heal";
+const string vCROSS_HINT  = "gfx/vehicles/crosshair_hint";
+const string vCROSS_LOCK  = "gfx/vehicles/crosshair_lock";
+const string vCROSS_RAIN  = "gfx/vehicles/crosshair_rain";
 
 entity dropmark;
 
index 0afd31f8c77e00d6bdc7b349efdbc15837d0d6e6..5d3922e7742624aaac5154ffb6909368584491d2 100644 (file)
@@ -110,17 +110,17 @@ void bumble_raygun_draw(entity this)
         al = 0.25 + random() * 0.5;
         _vtmp1 = this.origin + _dir * _len * (0.25 + i);
         _vtmp1 += (randomvec() * (_len * 0.2) * (frametime * 2));       //this.raygun_l1;
-        Draw_CylindricLine(this.origin, _vtmp1, sz, "gfx/colors/white.tga", 1, 1, this.colormod, al, df, view_origin);
+        Draw_CylindricLine(this.origin, _vtmp1, sz, "gfx/colors/white", 1, 1, this.colormod, al, df, view_origin);
 
         _vtmp2 = this.origin + _dir * _len * (0.5 + i);
         _vtmp2 += (randomvec() * (_len * 0.2) * (frametime * 5));       //this.raygun_l2;
-        Draw_CylindricLine(_vtmp1, _vtmp2, sz, "gfx/colors/white.tga", 1, 1, this.colormod, al, df, view_origin);
+        Draw_CylindricLine(_vtmp1, _vtmp2, sz, "gfx/colors/white", 1, 1, this.colormod, al, df, view_origin);
 
         _vtmp1 = this.origin + _dir * _len * (0.75 + i);
         _vtmp1 += randomvec() * (_len * 0.2) * (frametime * 10);     //this.raygun_l3;
-        Draw_CylindricLine(_vtmp2, _vtmp1, sz, "gfx/colors/white.tga", 1, 1, this.colormod, al, df, view_origin);
+        Draw_CylindricLine(_vtmp2, _vtmp1, sz, "gfx/colors/white", 1, 1, this.colormod, al, df, view_origin);
 
-        Draw_CylindricLine(_vtmp1, this.bumble_origin +  randomvec() * 32, sz, "gfx/colors/white.tga", 1, 1, this.colormod, al, df, view_origin);
+        Draw_CylindricLine(_vtmp1, this.bumble_origin +  randomvec() * 32, sz, "gfx/colors/white", 1, 1, this.colormod, al, df, view_origin);
     }
 }