From 80d06e7dcd5aa2c842a56074e283930622fa54a4 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 25 Mar 2020 17:42:36 +0100 Subject: [PATCH] Cleaned up warnings. --- src/client/sound.c | 2 - src/gs-entbase/client/point_message.cpp | 2 - src/gs-entbase/server/trigger_cdaudio.cpp | 2 +- src/menu-fn/m_controls.cpp | 2 +- src/menu-fn/m_internetgames.cpp | 2 +- src/menu-fn/m_langames.cpp | 2 +- src/server/valve/monster_zombie.cpp | 2 - src/shared/gearbox/w_displacer.c | 6 +- src/shared/gearbox/w_eagle.c | 6 +- src/shared/gearbox/w_grapple.c | 6 +- src/shared/gearbox/w_knife.c | 6 +- src/shared/gearbox/w_m249.c | 6 +- src/shared/gearbox/w_penguin.c | 8 +- src/shared/gearbox/w_pipewrench.c | 6 +- src/shared/gearbox/w_shockrifle.c | 6 +- src/shared/gearbox/w_sniperrifle.c | 6 +- src/shared/gearbox/w_sporelauncher.c | 6 +- src/shared/hunger/w_ap9.c | 6 +- src/shared/hunger/w_chaingun.c | 6 +- src/shared/hunger/w_flame.c | 6 +- src/shared/hunger/w_glock.c | 6 +- src/shared/hunger/w_handgrenade.c | 6 +- src/shared/hunger/w_medkit.c | 6 +- src/shared/hunger/w_shovel.c | 6 +- src/shared/hunger/w_sniper.c | 6 +- src/shared/hunger/w_sniper2.c | 6 +- src/shared/hunger/w_spanner.c | 8 +- src/shared/hunger/w_taurus.c | 6 +- src/shared/poke646/w_bradnailer.c | 7 +- src/shared/poke646/w_cmlwbr.c | 6 +- src/shared/poke646/w_heaterpipe.c | 6 +- src/shared/poke646/w_nailgun.c | 6 +- src/shared/poke646/w_pipebomb.c | 6 +- src/shared/poke646/w_shotgun.c | 6 +- src/shared/poke646/w_xs.c | 6 +- src/shared/rewolf/w_aicore.c | 4 +- src/shared/rewolf/w_beamgun.c | 4 +- src/shared/rewolf/w_chemicalgun.c | 4 +- src/shared/rewolf/w_dml.c | 4 +- src/shared/rewolf/w_fists.c | 5 +- src/shared/rewolf/w_gausspistol.c | 4 +- src/shared/rewolf/w_grenade.c | 4 +- src/shared/rewolf/w_minigun.c | 4 +- src/shared/rewolf/w_shotgun.c | 4 +- src/shared/scihunt/w_cannon.c | 6 +- src/shared/scihunt/w_chainsaw.c | 6 +- src/shared/scihunt/w_hammer.c | 6 +- src/shared/tfc/w_asscan.c | 6 +- src/shared/tfc/w_autorifle.c | 6 +- src/shared/tfc/w_crowbar.c | 6 +- src/shared/tfc/w_dbs.c | 6 +- src/shared/tfc/w_flamer.c | 6 +- src/shared/tfc/w_glauncher.c | 6 +- src/shared/tfc/w_grapple.c | 6 +- src/shared/tfc/w_incendiary.c | 6 +- src/shared/tfc/w_knife.c | 6 +- src/shared/tfc/w_medkit.c | 6 +- src/shared/tfc/w_nailgun.c | 6 +- src/shared/tfc/w_pipebomb.c | 6 +- src/shared/tfc/w_railgun.c | 6 +- src/shared/tfc/w_rpg.c | 6 +- src/shared/tfc/w_sbs.c | 6 +- src/shared/tfc/w_sniper.c | 6 +- src/shared/tfc/w_supernail.c | 6 +- src/shared/tfc/w_tranquil.c | 6 +- src/shared/tfc/w_umbrella.c | 6 +- src/shared/tfc/w_wrench.c | 6 +- src/shared/valve/player.cpp | 2 +- src/shared/valve/w_hornetgun.c | 7 +- src/shared/valve/w_tripmine.c | 1 - src/vgui/font.cpp | 14 +- src/vgui/ui.cpp | 109 ++++++------ src/vgui/ui_3dview.cpp | 192 ++++++++++++---------- src/vgui/ui_button.cpp | 129 ++++++++------- src/vgui/ui_checkbox.cpp | 20 +-- src/vgui/ui_label.cpp | 4 +- src/vgui/ui_list.cpp | 4 +- src/vgui/ui_listbox.cpp | 4 +- src/vgui/ui_menubutton.cpp | 4 +- src/vgui/ui_pic.cpp | 4 +- src/vgui/ui_radio.cpp | 4 +- src/vgui/ui_scrollbar.cpp | 2 +- src/vgui/ui_slider.cpp | 4 +- src/vgui/ui_tabview.cpp | 4 +- src/vgui/ui_textbox.cpp | 4 +- src/vgui/ui_window.cpp | 4 +- 86 files changed, 466 insertions(+), 412 deletions(-) diff --git a/src/client/sound.c b/src/client/sound.c index 1f251035..1c855df3 100644 --- a/src/client/sound.c +++ b/src/client/sound.c @@ -18,8 +18,6 @@ var int g_voxcount; var int g_voxpos; var float g_voxtime = 0.0f; -var int g_iSoundStyleCurrent; - class CCSAmbientSound { float m_flVolume; float m_flAttn; diff --git a/src/gs-entbase/client/point_message.cpp b/src/gs-entbase/client/point_message.cpp index 17f7007a..6c49a5ec 100644 --- a/src/gs-entbase/client/point_message.cpp +++ b/src/gs-entbase/client/point_message.cpp @@ -76,8 +76,6 @@ int PointMessage_Visible( vector p1, vector p2, vector ang) void PointMessage_Draw(void) { - string msg; - float distance; vector vecPlayer; #ifdef WASTES diff --git a/src/gs-entbase/server/trigger_cdaudio.cpp b/src/gs-entbase/server/trigger_cdaudio.cpp index a4f868a0..ea99d0a3 100644 --- a/src/gs-entbase/server/trigger_cdaudio.cpp +++ b/src/gs-entbase/server/trigger_cdaudio.cpp @@ -30,7 +30,7 @@ class trigger_cdaudio : CBaseTrigger void trigger_cdaudio :: Trigger ( void ) { - if (!other.flags & FL_CLIENT) { + if (!(other.flags & FL_CLIENT)) { return; } #ifdef GS_DEVELOPER diff --git a/src/menu-fn/m_controls.cpp b/src/menu-fn/m_controls.cpp index 7e0f5171..2fba059c 100644 --- a/src/menu-fn/m_controls.cpp +++ b/src/menu-fn/m_controls.cpp @@ -94,7 +94,7 @@ void menu_controls_update(void) c = ctrl_lbActBind3.GetCount(); - for (int i = 0; i < c; i++) { + for (i = 0; i < c; i++) { string cmd = ctrl_lbActBind3.GetItem(i); if (cmd == " ") { diff --git a/src/menu-fn/m_internetgames.cpp b/src/menu-fn/m_internetgames.cpp index 54055c27..06caff0f 100644 --- a/src/menu-fn/m_internetgames.cpp +++ b/src/menu-fn/m_internetgames.cpp @@ -103,7 +103,7 @@ void inet_btnrefresh(void) stof(gethostcachestring(srv_fldPlayers, i)), stof(gethostcachestring(srv_fldMaxplayers, i)) ); - ping = sprintf("%d", gethostcachevalue(srv_fldPing, i)); + ping = sprintf("%d", stof(gethostcachestring(srv_fldPing, i))); inet_lbServers_Name.AddEntry(gethostcachestring(srv_fldName, i)); inet_lbServers_Ping.AddEntry(ping); inet_lbServers_Map.AddEntry(gethostcachestring(srv_fldMap, i)); diff --git a/src/menu-fn/m_langames.cpp b/src/menu-fn/m_langames.cpp index 5edecc7d..1b354383 100644 --- a/src/menu-fn/m_langames.cpp +++ b/src/menu-fn/m_langames.cpp @@ -97,7 +97,7 @@ void lan_btnrefresh(void) stof(gethostcachestring(srv_fldPlayers, i)), stof(gethostcachestring(srv_fldMaxplayers, i)) ); - ping = sprintf("%d", gethostcachevalue(srv_fldPing, i)); + ping = sprintf("%d", stof(gethostcachestring(srv_fldPing, i))); lan_lbServers_Name.AddEntry(gethostcachestring(srv_fldName, i)); lan_lbServers_Ping.AddEntry(ping); lan_lbServers_Map.AddEntry(gethostcachestring(srv_fldMap, i)); diff --git a/src/server/valve/monster_zombie.cpp b/src/server/valve/monster_zombie.cpp index 427c2840..cfda57b3 100644 --- a/src/server/valve/monster_zombie.cpp +++ b/src/server/valve/monster_zombie.cpp @@ -107,8 +107,6 @@ void monster_zombie::vPain(int iHitBody) void monster_zombie::vDeath(int iHitBody) { - int r; - think = Respawn; nextthink = time + 10.0f; diff --git a/src/shared/gearbox/w_displacer.c b/src/shared/gearbox/w_displacer.c index 21b48edd..51fa5175 100644 --- a/src/shared/gearbox/w_displacer.c +++ b/src/shared/gearbox/w_displacer.c @@ -316,7 +316,7 @@ w_displacer_hud(void) } void -w_displacer_hudpic(int selected, vector pos) +w_displacer_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -327,7 +327,7 @@ w_displacer_hudpic(int selected, vector pos) [0,180/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -338,7 +338,7 @@ w_displacer_hudpic(int selected, vector pos) [0,180/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/gearbox/w_eagle.c b/src/shared/gearbox/w_eagle.c index 3036a757..21d1b34d 100644 --- a/src/shared/gearbox/w_eagle.c +++ b/src/shared/gearbox/w_eagle.c @@ -325,7 +325,7 @@ w_eagle_aimanim(void) } void -w_eagle_hudpic(int selected, vector pos) +w_eagle_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -336,7 +336,7 @@ w_eagle_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -347,7 +347,7 @@ w_eagle_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/gearbox/w_grapple.c b/src/shared/gearbox/w_grapple.c index da72939b..39f69d65 100644 --- a/src/shared/gearbox/w_grapple.c +++ b/src/shared/gearbox/w_grapple.c @@ -235,7 +235,7 @@ w_grapple_aimanim(void) } void -w_grapple_hudpic(int selected, vector pos) +w_grapple_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -246,7 +246,7 @@ w_grapple_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -257,7 +257,7 @@ w_grapple_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/gearbox/w_knife.c b/src/shared/gearbox/w_knife.c index 04c5d40b..3064d922 100644 --- a/src/shared/gearbox/w_knife.c +++ b/src/shared/gearbox/w_knife.c @@ -204,7 +204,7 @@ w_knife_aimanim(void) } void -w_knife_hudpic(int selected, vector pos) +w_knife_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -215,7 +215,7 @@ w_knife_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -226,7 +226,7 @@ w_knife_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/gearbox/w_m249.c b/src/shared/gearbox/w_m249.c index 65fdb3dc..45c61fc7 100644 --- a/src/shared/gearbox/w_m249.c +++ b/src/shared/gearbox/w_m249.c @@ -262,7 +262,7 @@ w_m249_aimanim(void) } void -w_m249_hudpic(int selected, vector pos) +w_m249_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -273,7 +273,7 @@ w_m249_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -284,7 +284,7 @@ w_m249_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/gearbox/w_penguin.c b/src/shared/gearbox/w_penguin.c index 71a306ac..c04d4584 100644 --- a/src/shared/gearbox/w_penguin.c +++ b/src/shared/gearbox/w_penguin.c @@ -131,7 +131,7 @@ penguin_die(int i) { /* clear this first to avoid infinite recursion */ self.customphysics = __NULL__; - self.vDeath = Empty; + self.vDeath = __NULL__; /* now we can explodededededed */ Effect_CreateExplosion(self.origin); @@ -313,17 +313,17 @@ w_penguin_hud(void) } void -w_penguin_hudpic(int s, vector pos) +w_penguin_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { drawsubpic(pos, [170,45], "sprites/640hudof04.spr_0.tga", [0,180/256], [170/256,45/256], - g_hud_color, 1, DRAWFLAG_ADDITIVE); + g_hud_color, a, DRAWFLAG_ADDITIVE); } else { drawsubpic(pos, [170,45], "sprites/640hudof03.spr_0.tga", [0,180/256], [170/256,45/256], - g_hud_color, 1, DRAWFLAG_ADDITIVE); + g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/gearbox/w_pipewrench.c b/src/shared/gearbox/w_pipewrench.c index dc5b9824..29f7e57d 100644 --- a/src/shared/gearbox/w_pipewrench.c +++ b/src/shared/gearbox/w_pipewrench.c @@ -278,7 +278,7 @@ w_pipewrench_aimanim(void) } void -w_pipewrench_hudpic(int selected, vector pos) +w_pipewrench_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -289,7 +289,7 @@ w_pipewrench_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -300,7 +300,7 @@ w_pipewrench_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/gearbox/w_shockrifle.c b/src/shared/gearbox/w_shockrifle.c index 2394accc..53345d6d 100644 --- a/src/shared/gearbox/w_shockrifle.c +++ b/src/shared/gearbox/w_shockrifle.c @@ -255,7 +255,7 @@ w_shockrifle_aimanim(void) } void -w_shockrifle_hudpic(int selected, vector pos) +w_shockrifle_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -266,7 +266,7 @@ w_shockrifle_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -277,7 +277,7 @@ w_shockrifle_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/gearbox/w_sniperrifle.c b/src/shared/gearbox/w_sniperrifle.c index a65a1bb0..750d8605 100644 --- a/src/shared/gearbox/w_sniperrifle.c +++ b/src/shared/gearbox/w_sniperrifle.c @@ -256,13 +256,13 @@ w_sniperrifle_aimanim(void) } void -w_sniperrifle_hudpic(int s, vector pos) +w_sniperrifle_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/640hudof04.spr_0.tga", [0,135/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hudof04.spr_0.tga", [0,135/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/640hudof03.spr_0.tga", [0,135/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hudof03.spr_0.tga", [0,135/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/gearbox/w_sporelauncher.c b/src/shared/gearbox/w_sporelauncher.c index 24e5dfb2..aa1f7cd9 100644 --- a/src/shared/gearbox/w_sporelauncher.c +++ b/src/shared/gearbox/w_sporelauncher.c @@ -314,7 +314,7 @@ w_sporelauncher_aimanim(void) } void -w_sporelauncher_hudpic(int selected, vector pos) +w_sporelauncher_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -325,7 +325,7 @@ w_sporelauncher_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -336,7 +336,7 @@ w_sporelauncher_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_ap9.c b/src/shared/hunger/w_ap9.c index 864a0ecd..91bf79ae 100644 --- a/src/shared/hunger/w_ap9.c +++ b/src/shared/hunger/w_ap9.c @@ -293,7 +293,7 @@ w_ap9_hud(void) } void -w_ap9_hudpic(int selected, vector pos) +w_ap9_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -304,7 +304,7 @@ w_ap9_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -315,7 +315,7 @@ w_ap9_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_chaingun.c b/src/shared/hunger/w_chaingun.c index c13a9920..5d975710 100644 --- a/src/shared/hunger/w_chaingun.c +++ b/src/shared/hunger/w_chaingun.c @@ -263,7 +263,7 @@ w_chaingun_aimanim(void) } void -w_chaingun_hudpic(int selected, vector pos) +w_chaingun_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -274,7 +274,7 @@ w_chaingun_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -285,7 +285,7 @@ w_chaingun_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_flame.c b/src/shared/hunger/w_flame.c index abc3254e..05ace313 100644 --- a/src/shared/hunger/w_flame.c +++ b/src/shared/hunger/w_flame.c @@ -206,7 +206,7 @@ w_flame_aimanim(void) } void -w_flame_hudpic(int selected, vector pos) +w_flame_hudpic(int selected, vector pos, float a) { #ifdef CSQC @@ -218,7 +218,7 @@ if (selected) { [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -229,7 +229,7 @@ if (selected) { [0,0/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_glock.c b/src/shared/hunger/w_glock.c index dcfe21c6..c2248c2e 100644 --- a/src/shared/hunger/w_glock.c +++ b/src/shared/hunger/w_glock.c @@ -295,7 +295,7 @@ w_glock_hud(void) #endif } void -w_glock_hudpic(int selected, vector pos) +w_glock_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -306,7 +306,7 @@ w_glock_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -317,7 +317,7 @@ w_glock_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_handgrenade.c b/src/shared/hunger/w_handgrenade.c index b6184517..9125ce3d 100644 --- a/src/shared/hunger/w_handgrenade.c +++ b/src/shared/hunger/w_handgrenade.c @@ -223,13 +223,13 @@ w_handgrenade_aimanim(void) } void -w_handgrenade_hudpic(int s, vector pos) +w_handgrenade_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/640hud6.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud6.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/640hud3.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud3.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/hunger/w_medkit.c b/src/shared/hunger/w_medkit.c index f0b7e017..836b5564 100644 --- a/src/shared/hunger/w_medkit.c +++ b/src/shared/hunger/w_medkit.c @@ -179,7 +179,7 @@ w_medkit_crosshair(void) } void -w_medkit_hudpic(int selected, vector pos) +w_medkit_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -190,7 +190,7 @@ w_medkit_hudpic(int selected, vector pos) [0,180/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -201,7 +201,7 @@ w_medkit_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_shovel.c b/src/shared/hunger/w_shovel.c index 2eb1fc0b..0528560b 100644 --- a/src/shared/hunger/w_shovel.c +++ b/src/shared/hunger/w_shovel.c @@ -184,7 +184,7 @@ w_shovel_aimanim(void) } void -w_shovel_hudpic(int selected, vector pos) +w_shovel_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -195,7 +195,7 @@ w_shovel_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -206,7 +206,7 @@ w_shovel_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_sniper.c b/src/shared/hunger/w_sniper.c index f26726c8..c72cd9b1 100644 --- a/src/shared/hunger/w_sniper.c +++ b/src/shared/hunger/w_sniper.c @@ -290,7 +290,7 @@ w_sniper_aimanim(void) } void -w_sniper_hudpic(int selected, vector pos) +w_sniper_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -301,7 +301,7 @@ w_sniper_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -312,7 +312,7 @@ w_sniper_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_sniper2.c b/src/shared/hunger/w_sniper2.c index ae0e22d2..7dd836f5 100644 --- a/src/shared/hunger/w_sniper2.c +++ b/src/shared/hunger/w_sniper2.c @@ -273,7 +273,7 @@ w_sniper2_aimanim(void) } void -w_sniper2_hudpic(int selected, vector pos) +w_sniper2_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -284,7 +284,7 @@ w_sniper2_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -295,7 +295,7 @@ w_sniper2_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_spanner.c b/src/shared/hunger/w_spanner.c index 93ba9c5a..f8a933e3 100644 --- a/src/shared/hunger/w_spanner.c +++ b/src/shared/hunger/w_spanner.c @@ -81,7 +81,6 @@ void w_spanner_primary(void) { int anim = 0; - int r; vector src; player pl = (player)self; @@ -128,6 +127,7 @@ w_spanner_primary(void) } if (trace_ent.takedamage) { + int r; Damage_Apply(trace_ent, self, 10, WEAPON_SPANNER, DMG_BLUNT ); if (!trace_ent.iBleeds) { @@ -176,7 +176,7 @@ w_spanner_aimanim(void) } void -w_spanner_hudpic(int selected, vector pos) +w_spanner_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -187,7 +187,7 @@ w_spanner_hudpic(int selected, vector pos) [0,180/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -198,7 +198,7 @@ w_spanner_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/hunger/w_taurus.c b/src/shared/hunger/w_taurus.c index cdeef09b..e28fca04 100644 --- a/src/shared/hunger/w_taurus.c +++ b/src/shared/hunger/w_taurus.c @@ -260,7 +260,7 @@ w_taurus_hud(void) } void -w_taurus_hudpic(int selected, vector pos) +w_taurus_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -271,7 +271,7 @@ w_taurus_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -282,7 +282,7 @@ w_taurus_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/poke646/w_bradnailer.c b/src/shared/poke646/w_bradnailer.c index 2a5abde9..6f4a4e5a 100644 --- a/src/shared/poke646/w_bradnailer.c +++ b/src/shared/poke646/w_bradnailer.c @@ -62,6 +62,7 @@ int w_bradnailer_pickup(int new) { /* TODO */ + return TRUE; } void @@ -202,7 +203,7 @@ w_bradnailer_release(void) } void -w_bradnailer_hudpic(int selected, vector pos) +w_bradnailer_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -213,7 +214,7 @@ w_bradnailer_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -224,7 +225,7 @@ w_bradnailer_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/poke646/w_cmlwbr.c b/src/shared/poke646/w_cmlwbr.c index 34d0bfe7..5db37fed 100644 --- a/src/shared/poke646/w_cmlwbr.c +++ b/src/shared/poke646/w_cmlwbr.c @@ -89,7 +89,7 @@ w_cmlwbr_release(void) } void -w_cmlwbr_hudpic(int selected, vector pos) +w_cmlwbr_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -100,7 +100,7 @@ w_cmlwbr_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -111,7 +111,7 @@ w_cmlwbr_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/poke646/w_heaterpipe.c b/src/shared/poke646/w_heaterpipe.c index 40e463ae..9dcf7523 100644 --- a/src/shared/poke646/w_heaterpipe.c +++ b/src/shared/poke646/w_heaterpipe.c @@ -78,7 +78,7 @@ w_heaterpipe_release(void) } void -w_heaterpipe_hudpic(int selected, vector pos) +w_heaterpipe_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -89,7 +89,7 @@ w_heaterpipe_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -100,7 +100,7 @@ w_heaterpipe_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/poke646/w_nailgun.c b/src/shared/poke646/w_nailgun.c index 9f914a2e..4f83a29e 100644 --- a/src/shared/poke646/w_nailgun.c +++ b/src/shared/poke646/w_nailgun.c @@ -134,7 +134,7 @@ w_nailgun_release(void) void -w_nailgun_hudpic(int selected, vector pos) +w_nailgun_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -145,7 +145,7 @@ w_nailgun_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -156,7 +156,7 @@ w_nailgun_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/poke646/w_pipebomb.c b/src/shared/poke646/w_pipebomb.c index 03d57d05..9c1974de 100644 --- a/src/shared/poke646/w_pipebomb.c +++ b/src/shared/poke646/w_pipebomb.c @@ -240,13 +240,13 @@ w_pipebomb_hud(void) } void -w_pipebomb_hudpic(int s, vector pos) +w_pipebomb_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/640hud6.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud6.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/640hud3.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud3.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/poke646/w_shotgun.c b/src/shared/poke646/w_shotgun.c index 4ec078d1..94fd6aee 100644 --- a/src/shared/poke646/w_shotgun.c +++ b/src/shared/poke646/w_shotgun.c @@ -232,13 +232,13 @@ float w_shotgun_aimanim(void) return self.flags & FL_CROUCHING ? ANIM_CR_AIMSHOTGUN : ANIM_AIMSHOTGUN; } -void w_shotgun_hudpic(int s, vector pos) +void w_shotgun_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/640hud4.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud4.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/640hud1.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud1.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/poke646/w_xs.c b/src/shared/poke646/w_xs.c index dfef0a57..a1ef0aab 100644 --- a/src/shared/poke646/w_xs.c +++ b/src/shared/poke646/w_xs.c @@ -91,7 +91,7 @@ w_xs_release(void) } void -w_xs_hudpic(int selected, vector pos) +w_xs_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -102,7 +102,7 @@ w_xs_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -113,7 +113,7 @@ w_xs_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/rewolf/w_aicore.c b/src/shared/rewolf/w_aicore.c index dd549b4f..09a57acb 100644 --- a/src/shared/rewolf/w_aicore.c +++ b/src/shared/rewolf/w_aicore.c @@ -98,7 +98,7 @@ w_aicore_aimanim(void) } void -w_aicore_hudpic(int selected, vector pos) +w_aicore_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -106,7 +106,7 @@ w_aicore_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_aicore0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_beamgun.c b/src/shared/rewolf/w_beamgun.c index a40bfe3d..c5903947 100644 --- a/src/shared/rewolf/w_beamgun.c +++ b/src/shared/rewolf/w_beamgun.c @@ -227,7 +227,7 @@ w_beamgun_hud(void) } void -w_beamgun_hudpic(int selected, vector pos) +w_beamgun_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -235,7 +235,7 @@ w_beamgun_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_beamgun0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_chemicalgun.c b/src/shared/rewolf/w_chemicalgun.c index df38d15d..599c28cf 100644 --- a/src/shared/rewolf/w_chemicalgun.c +++ b/src/shared/rewolf/w_chemicalgun.c @@ -315,7 +315,7 @@ w_chemicalgun_hud(void) } void -w_chemicalgun_hudpic(int selected, vector pos) +w_chemicalgun_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -323,7 +323,7 @@ w_chemicalgun_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_SPchemicalgun0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_dml.c b/src/shared/rewolf/w_dml.c index 2c2c7ab0..2352ab3a 100644 --- a/src/shared/rewolf/w_dml.c +++ b/src/shared/rewolf/w_dml.c @@ -334,7 +334,7 @@ w_dml_hud(void) } void -w_dml_hudpic(int selected, vector pos) +w_dml_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -342,7 +342,7 @@ w_dml_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_dml0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_fists.c b/src/shared/rewolf/w_fists.c index eeac4873..43590fc1 100644 --- a/src/shared/rewolf/w_fists.c +++ b/src/shared/rewolf/w_fists.c @@ -243,6 +243,7 @@ w_fists_pmodel(void) } else { return ""; }*/ + return ""; } string @@ -273,7 +274,7 @@ w_fists_pickup(int new) } void -w_fists_hudpic(int selected, vector pos) +w_fists_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -281,7 +282,7 @@ w_fists_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_fists0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_gausspistol.c b/src/shared/rewolf/w_gausspistol.c index aabd8425..a2839ff2 100644 --- a/src/shared/rewolf/w_gausspistol.c +++ b/src/shared/rewolf/w_gausspistol.c @@ -332,7 +332,7 @@ w_gausspistol_hud(void) } void -w_gausspistol_hudpic(int selected, vector pos) +w_gausspistol_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -340,7 +340,7 @@ w_gausspistol_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_gaussPistol0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_grenade.c b/src/shared/rewolf/w_grenade.c index b4e57732..8e372464 100644 --- a/src/shared/rewolf/w_grenade.c +++ b/src/shared/rewolf/w_grenade.c @@ -192,7 +192,7 @@ w_grenade_hud(void) } void -w_grenade_hudpic(int selected, vector pos) +w_grenade_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -200,7 +200,7 @@ w_grenade_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_dmlGrenade0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_minigun.c b/src/shared/rewolf/w_minigun.c index d7c9826b..c3d4d182 100644 --- a/src/shared/rewolf/w_minigun.c +++ b/src/shared/rewolf/w_minigun.c @@ -244,7 +244,7 @@ w_minigun_hud(void) } void -w_minigun_hudpic(int selected, vector pos) +w_minigun_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -252,7 +252,7 @@ w_minigun_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_minigun0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/rewolf/w_shotgun.c b/src/shared/rewolf/w_shotgun.c index aee630f4..42aec83c 100644 --- a/src/shared/rewolf/w_shotgun.c +++ b/src/shared/rewolf/w_shotgun.c @@ -298,7 +298,7 @@ w_shotgun_hud(void) } void -w_shotgun_hudpic(int selected, vector pos) +w_shotgun_hudpic(int selected, vector pos, float a) { #ifdef CSQC drawpic( @@ -306,7 +306,7 @@ w_shotgun_hudpic(int selected, vector pos) "gfx/vgui/640_weapon_shotgun0.tga", [170,43], [1,1,1], - 1.0f, + a, DRAWFLAG_NORMAL ); #endif diff --git a/src/shared/scihunt/w_cannon.c b/src/shared/scihunt/w_cannon.c index 8958a222..156e9f4e 100644 --- a/src/shared/scihunt/w_cannon.c +++ b/src/shared/scihunt/w_cannon.c @@ -217,13 +217,13 @@ float w_cannon_aimanim(void) return self.flags & FL_CROUCHING ? ANIM_CR_AIMSHOTGUN : ANIM_AIMSHOTGUN; } -void w_cannon_hudpic(int s, vector pos) +void w_cannon_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/w_cannon.spr_0.tga", [0,48/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/w_cannon.spr_0.tga", [0,48/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/w_cannon.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/w_cannon.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/scihunt/w_chainsaw.c b/src/shared/scihunt/w_chainsaw.c index 4d8e49ab..4b06063c 100644 --- a/src/shared/scihunt/w_chainsaw.c +++ b/src/shared/scihunt/w_chainsaw.c @@ -136,17 +136,17 @@ float w_chainsaw_aimanim(void) return self.flags & FL_CROUCHING ? ANIM_CR_AIMSQUEAK : ANIM_AIMSQUEAK; } -void w_chainsaw_hudpic(int s, vector pos) +void w_chainsaw_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { drawsubpic(pos, [170,45], "sprites/chainsaw.spr_0.tga", [0,48/256], [170/256,45/256], - g_hud_color, 1, DRAWFLAG_ADDITIVE); + g_hud_color, a, DRAWFLAG_ADDITIVE); } else { drawsubpic(pos, [170,45], "sprites/chainsaw.spr_0.tga", [0,0], [170/256,45/256], - g_hud_color, 1, DRAWFLAG_ADDITIVE); + g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/scihunt/w_hammer.c b/src/shared/scihunt/w_hammer.c index 7f3af64e..a3f0bc34 100644 --- a/src/shared/scihunt/w_hammer.c +++ b/src/shared/scihunt/w_hammer.c @@ -202,13 +202,13 @@ float w_hammer_aimanim(void) return self.flags & FL_CROUCHING ? ANIM_CR_AIMCROWBAR : ANIM_AIMCROWBAR; } -void w_hammer_hudpic(int s, vector pos) +void w_hammer_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/hammer.spr_0.tga", [0,48/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/hammer.spr_0.tga", [0,48/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/hammer.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/hammer.spr_0.tga", [0,0], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/tfc/w_asscan.c b/src/shared/tfc/w_asscan.c index b8724481..2be98acb 100644 --- a/src/shared/tfc/w_asscan.c +++ b/src/shared/tfc/w_asscan.c @@ -61,7 +61,7 @@ w_asscan_aimanim(void) } void -w_asscan_hudpic(int selected, vector pos) +w_asscan_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_asscan_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_asscan_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_autorifle.c b/src/shared/tfc/w_autorifle.c index c9f13f77..e32b4e89 100644 --- a/src/shared/tfc/w_autorifle.c +++ b/src/shared/tfc/w_autorifle.c @@ -61,7 +61,7 @@ w_autorifle_aimanim(void) } void -w_autorifle_hudpic(int selected, vector pos) +w_autorifle_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_autorifle_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_autorifle_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_crowbar.c b/src/shared/tfc/w_crowbar.c index a7f399ea..635a0a0c 100644 --- a/src/shared/tfc/w_crowbar.c +++ b/src/shared/tfc/w_crowbar.c @@ -179,7 +179,7 @@ w_crowbar_aimanim(void) } void -w_crowbar_hudpic(int selected, vector pos) +w_crowbar_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -190,7 +190,7 @@ w_crowbar_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -201,7 +201,7 @@ w_crowbar_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_dbs.c b/src/shared/tfc/w_dbs.c index 4078a93a..ac4094c3 100644 --- a/src/shared/tfc/w_dbs.c +++ b/src/shared/tfc/w_dbs.c @@ -238,13 +238,13 @@ w_dbs_aimanim(void) } void -w_dbs_hudpic(int s, vector pos) +w_dbs_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/640hud4.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud4.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/640hud1.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud1.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/tfc/w_flamer.c b/src/shared/tfc/w_flamer.c index 680bba9c..6a86eac9 100644 --- a/src/shared/tfc/w_flamer.c +++ b/src/shared/tfc/w_flamer.c @@ -61,7 +61,7 @@ w_flamer_aimanim(void) } void -w_flamer_hudpic(int selected, vector pos) +w_flamer_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_flamer_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_flamer_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_glauncher.c b/src/shared/tfc/w_glauncher.c index d25e862e..7cc8c241 100644 --- a/src/shared/tfc/w_glauncher.c +++ b/src/shared/tfc/w_glauncher.c @@ -61,7 +61,7 @@ w_glauncher_aimanim(void) } void -w_glauncher_hudpic(int selected, vector pos) +w_glauncher_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_glauncher_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_glauncher_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_grapple.c b/src/shared/tfc/w_grapple.c index a56b3df4..5e293c9c 100644 --- a/src/shared/tfc/w_grapple.c +++ b/src/shared/tfc/w_grapple.c @@ -61,7 +61,7 @@ w_grapple_aimanim(void) } void -w_grapple_hudpic(int selected, vector pos) +w_grapple_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_grapple_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_grapple_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_incendiary.c b/src/shared/tfc/w_incendiary.c index 6b74a282..ae2e803e 100644 --- a/src/shared/tfc/w_incendiary.c +++ b/src/shared/tfc/w_incendiary.c @@ -61,7 +61,7 @@ w_incendiary_aimanim(void) } void -w_incendiary_hudpic(int selected, vector pos) +w_incendiary_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_incendiary_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_incendiary_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_knife.c b/src/shared/tfc/w_knife.c index ee1e7b24..2e292b88 100644 --- a/src/shared/tfc/w_knife.c +++ b/src/shared/tfc/w_knife.c @@ -61,7 +61,7 @@ w_knife_aimanim(void) } void -w_knife_hudpic(int selected, vector pos) +w_knife_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_knife_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_knife_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_medkit.c b/src/shared/tfc/w_medkit.c index 08c458d3..d7e607f1 100644 --- a/src/shared/tfc/w_medkit.c +++ b/src/shared/tfc/w_medkit.c @@ -61,7 +61,7 @@ w_medkit_aimanim(void) } void -w_medkit_hudpic(int selected, vector pos) +w_medkit_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_medkit_hudpic(int selected, vector pos) [0,180/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_medkit_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_nailgun.c b/src/shared/tfc/w_nailgun.c index 41bbb668..6eba1865 100644 --- a/src/shared/tfc/w_nailgun.c +++ b/src/shared/tfc/w_nailgun.c @@ -61,7 +61,7 @@ w_nailgun_aimanim(void) } void -w_nailgun_hudpic(int selected, vector pos) +w_nailgun_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_nailgun_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_nailgun_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_pipebomb.c b/src/shared/tfc/w_pipebomb.c index 3b80a3bb..4d64c857 100644 --- a/src/shared/tfc/w_pipebomb.c +++ b/src/shared/tfc/w_pipebomb.c @@ -62,7 +62,7 @@ w_pipebomb_aimanim(void) } void -w_pipebomb_hudpic(int selected, vector pos) +w_pipebomb_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -73,7 +73,7 @@ w_pipebomb_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -84,7 +84,7 @@ w_pipebomb_hudpic(int selected, vector pos) [0,90/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_railgun.c b/src/shared/tfc/w_railgun.c index b59c17ed..1cf3be4b 100644 --- a/src/shared/tfc/w_railgun.c +++ b/src/shared/tfc/w_railgun.c @@ -61,7 +61,7 @@ w_railgun_aimanim(void) } void -w_railgun_hudpic(int selected, vector pos) +w_railgun_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_railgun_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_railgun_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_rpg.c b/src/shared/tfc/w_rpg.c index 07c92cc8..5251c1e6 100644 --- a/src/shared/tfc/w_rpg.c +++ b/src/shared/tfc/w_rpg.c @@ -61,13 +61,13 @@ w_rpg_aimanim(void) } void -w_rpg_hudpic(int selected, vector pos) +w_rpg_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { - drawsubpic(pos, [170,45], "sprites/640hud5.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud5.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/640hud2.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/640hud2.spr_0.tga", [0,45/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/tfc/w_sbs.c b/src/shared/tfc/w_sbs.c index 1ff50e8d..307b76c6 100644 --- a/src/shared/tfc/w_sbs.c +++ b/src/shared/tfc/w_sbs.c @@ -237,13 +237,13 @@ w_sbs_aimanim(void) } void -w_sbs_hudpic(int s, vector pos) +w_sbs_hudpic(int s, vector pos, float a) { #ifdef CSQC if (s) { - drawsubpic(pos, [170,45], "sprites/tfchud02.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/tfchud02.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } else { - drawsubpic(pos, [170,45], "sprites/tfchud01.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, 1, DRAWFLAG_ADDITIVE); + drawsubpic(pos, [170,45], "sprites/tfchud01.spr_0.tga", [0,180/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE); } #endif } diff --git a/src/shared/tfc/w_sniper.c b/src/shared/tfc/w_sniper.c index 8cec6c1d..297abec0 100644 --- a/src/shared/tfc/w_sniper.c +++ b/src/shared/tfc/w_sniper.c @@ -61,7 +61,7 @@ w_sniper_aimanim(void) } void -w_sniper_hudpic(int selected, vector pos) +w_sniper_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_sniper_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_sniper_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_supernail.c b/src/shared/tfc/w_supernail.c index 218ffc1d..833ab673 100644 --- a/src/shared/tfc/w_supernail.c +++ b/src/shared/tfc/w_supernail.c @@ -61,7 +61,7 @@ w_supernail_aimanim(void) } void -w_supernail_hudpic(int selected, vector pos) +w_supernail_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_supernail_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_supernail_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_tranquil.c b/src/shared/tfc/w_tranquil.c index 3599a61a..5ad0743b 100644 --- a/src/shared/tfc/w_tranquil.c +++ b/src/shared/tfc/w_tranquil.c @@ -61,7 +61,7 @@ w_tranquil_aimanim(void) } void -w_tranquil_hudpic(int selected, vector pos) +w_tranquil_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -72,7 +72,7 @@ w_tranquil_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -83,7 +83,7 @@ w_tranquil_hudpic(int selected, vector pos) [0,45/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_umbrella.c b/src/shared/tfc/w_umbrella.c index 966a0851..cc43208d 100644 --- a/src/shared/tfc/w_umbrella.c +++ b/src/shared/tfc/w_umbrella.c @@ -182,7 +182,7 @@ w_umbrella_aimanim(void) } void -w_umbrella_hudpic(int selected, vector pos) +w_umbrella_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -193,7 +193,7 @@ w_umbrella_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -204,7 +204,7 @@ w_umbrella_hudpic(int selected, vector pos) [0,0], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/tfc/w_wrench.c b/src/shared/tfc/w_wrench.c index 3f8b816a..3d77a30d 100644 --- a/src/shared/tfc/w_wrench.c +++ b/src/shared/tfc/w_wrench.c @@ -172,7 +172,7 @@ w_wrench_aimanim(void) } void -w_wrench_hudpic(int selected, vector pos) +w_wrench_hudpic(int selected, vector pos, float a) { #ifdef CSQC if (selected) { @@ -183,7 +183,7 @@ w_wrench_hudpic(int selected, vector pos) [0,180/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } else { @@ -194,7 +194,7 @@ w_wrench_hudpic(int selected, vector pos) [0,135/256], [170/256,45/256], g_hud_color, - 1.0f, + a, DRAWFLAG_ADDITIVE ); } diff --git a/src/shared/valve/player.cpp b/src/shared/valve/player.cpp index b305d99a..656325fb 100644 --- a/src/shared/valve/player.cpp +++ b/src/shared/valve/player.cpp @@ -14,7 +14,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -int input_sequence; +noref int input_sequence; class player { float health; diff --git a/src/shared/valve/w_hornetgun.c b/src/shared/valve/w_hornetgun.c index d31edcdf..d521b502 100644 --- a/src/shared/valve/w_hornetgun.c +++ b/src/shared/valve/w_hornetgun.c @@ -102,14 +102,15 @@ void w_hornetgun_shoothornet(void) { static void Hornet_Touch(void) { + string snd; int r = floor(random(1,4)); if (other.takedamage == DAMAGE_YES) { Damage_Apply(other, self.owner, 10, WEAPON_HORNETGUN, DMG_GENERIC); - string sample = sprintf("hornet/ag_hornethit%i.wav", r); + snd = sprintf("hornet/ag_hornethit%i.wav", r); } else { - string sample = sprintf("hornet/ag_buzz%i.wav", r); + snd = sprintf("hornet/ag_buzz%i.wav", r); } - sound(self, CHAN_BODY, sample, 1, ATTN_NORM); + sound(self, CHAN_BODY, snd, 1, ATTN_NORM); remove(self); } diff --git a/src/shared/valve/w_tripmine.c b/src/shared/valve/w_tripmine.c index 65042175..8acc356d 100644 --- a/src/shared/valve/w_tripmine.c +++ b/src/shared/valve/w_tripmine.c @@ -223,7 +223,6 @@ void w_tripmine_primary(void) void w_tripmine_release(void) { - int r; player pl = (player)self; if (pl.w_idle_next > 0.0) { diff --git a/src/vgui/font.cpp b/src/vgui/font.cpp index 3ed19f48..fe78299a 100644 --- a/src/vgui/font.cpp +++ b/src/vgui/font.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -31,7 +31,8 @@ typedef struct int iFlags; } font_s; -void Font_Load ( string strFile, font_s &fntNew ) +void +Font_Load ( string strFile, font_s &fntNew ) { #ifdef CLASSIC_VGUI fntNew.iID = (int)loadfont( "", "gfx/conchars", "12", -1, 0, 0 ); @@ -82,19 +83,22 @@ void Font_Load ( string strFile, font_s &fntNew ) #endif } -void Font_DrawText ( vector vecOrigin, string strText, font_s fnt ) +void +Font_DrawText ( vector vecOrigin, string strText, font_s fnt ) { drawfont = (float)fnt.iID; drawstring( vecOrigin, strText, [ fnt.iScale, fnt.iScale ], fnt.vecColor, fnt.flAlpha, (float)fnt.iFlags ); } -void Font_DrawField ( vector vecOrigin, vector vecSize, string strText, font_s fnt, int iAlignFlags ) +void +Font_DrawField ( vector vecOrigin, vector vecSize, string strText, font_s fnt, int iAlignFlags ) { drawfont = (float)fnt.iID; drawtextfield( vecOrigin, vecSize, (float)iAlignFlags, strText ); } -string Font_RGBtoHex(vector vecColor) +string +Font_RGBtoHex(vector vecColor) { static string numtohex(float x) { x = rint(x * 15); diff --git a/src/vgui/ui.cpp b/src/vgui/ui.cpp index d4454f5e..83773684 100644 --- a/src/vgui/ui.cpp +++ b/src/vgui/ui.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,14 +18,15 @@ font_s g_fntDefault; var int g_vguiWidgetCount; #ifdef CLASSIC_VGUI - #define UI_MAINCOLOR '255 200 0' / 255 + #define UI_MAINCOLOR [255,200,0] / 255 #define UI_MAINALPHA 255 #else var vector UI_MAINCOLOR; var float UI_MAINALPHA; #endif -int Util_MouseAbove(vector vecMousePos, vector vecPos, vector vecSize) +int +Util_MouseAbove(vector vecMousePos, vector vecPos, vector vecSize) { if (vecMousePos[0] >= vecPos[0] && vecMousePos[0] <= vecPos[0] + vecSize[0]) { if (vecMousePos[1] >= vecPos[1] && vecMousePos[1] <= vecPos[1] + vecSize[1]) { @@ -42,114 +43,130 @@ class CUIWidget CUIWidget m_parent; int m_iFlags; - virtual void( CUIWidget ) Add; - virtual void( int ) FlagAdd; - virtual void( int ) FlagRemove; - virtual void( vector ) SetPos; + virtual void(CUIWidget) Add; + virtual void(int) FlagAdd; + virtual void(int) FlagRemove; + virtual void(vector) SetPos; virtual vector() GetPos; virtual int() GetPosWidth; virtual int() GetPosHeight; - virtual void( ) Draw; - virtual void( float, float, float, float ) Input; + virtual void() Draw; + virtual void(float, float, float, float) Input; }; -void CUIWidget :: SetPos ( vector vecPos ) +void +CUIWidget::SetPos(vector vecPos) { m_vecOrigin = vecPos; } -vector CUIWidget :: GetPos ( void ) + +vector +CUIWidget::GetPos(void) { return m_vecOrigin; } -int CUIWidget :: GetPosWidth ( void ) + +int +CUIWidget::GetPosWidth(void) { return m_vecOrigin[0]; } -int CUIWidget :: GetPosHeight ( void ) + +int +CUIWidget::GetPosHeight(void) { return m_vecOrigin[1]; } -void CUIWidget :: FlagAdd ( int iFlag ) +void +CUIWidget::FlagAdd(int iFlag) { m_iFlags |= iFlag; } -void CUIWidget :: FlagRemove ( int iFlag ) + +void +CUIWidget::FlagRemove(int iFlag) { - m_iFlags -= ( m_iFlags & iFlag ); + m_iFlags -= (m_iFlags & iFlag); } -void CUIWidget :: Add ( CUIWidget wNew ) +void +CUIWidget::Add(CUIWidget wNew) { CUIWidget wNext = this; CUIWidget wParent; do { wParent = wNext; wNext = wNext.m_next; - } while ( wNext ); + } while (wNext); wParent.m_next = wNew; wNew.m_parent = this; } -void CUIWidget :: Draw ( void ) +void +CUIWidget::Draw(void) { CUIWidget wNext = this; do { wNext = wNext.m_next; - if ( wNext && wNext.m_iFlags & 1 && wNext.m_parent.m_iFlags & 1 ) { + if (wNext && wNext.m_iFlags & 1 && wNext.m_parent.m_iFlags & 1) { wNext.Draw(); } - } while ( wNext ); + } while (wNext); } -void CUIWidget :: Input ( float flEVType, float flKey, float flChar, float flDevID ) +void +CUIWidget::Input(float flEVType, float flKey, float flChar, float flDevID) { CUIWidget wNext = this; g_vguiWidgetCount = 0; do { wNext = wNext.m_next; - if ( wNext && wNext.m_iFlags & 1 && wNext.m_parent.m_iFlags & 1 ) { + if (wNext && wNext.m_iFlags & 1 && wNext.m_parent.m_iFlags & 1) { g_vguiWidgetCount++; - wNext.Input( flEVType, flKey, flChar, flDevID ); + wNext.Input(flEVType, flKey, flChar, flDevID); } - } while ( wNext ); + } while (wNext); } -void UISystem_Init ( void ) +void +UISystem_Init(void) { + /* we support fancier stuff in non-classic mode */ #ifndef CLASSIC_VGUI string strTemp; string strUIFile = "scripts/ui_style.txt"; - filestream fileUI = fopen( strUIFile, FILE_READ ); - - UI_MAINCOLOR = '68 68 68' / 255; + filestream fileUI = fopen(strUIFile, FILE_READ); + + UI_MAINCOLOR = [68,68,68] / 255; UI_MAINALPHA = 1.0f; - - if ( fileUI >= 0 ) { - while ( ( strTemp = fgets( fileUI ) ) ) { - if ( tokenizebyseparator( strTemp, "=" ) == 2 ) { - switch ( argv( 0 ) ) { + + if (fileUI >= 0) { + while ((strTemp = fgets(fileUI))) { + if (tokenizebyseparator(strTemp, "=") == 2) { + switch (argv(0)) { case "COLOR": - UI_MAINCOLOR = stov( argv( 1 ) ) / 255; + UI_MAINCOLOR = stov(argv(1)) / 255; break; case "ALPHA": - UI_MAINALPHA = stof( argv( 1 ) ) / 255; + UI_MAINALPHA = stof(argv(1)) / 255; break; } } } - fclose( fileUI ); + fclose(fileUI); } else { - error( sprintf( "[MENU] Cannot load UI file %s!", strUIFile ) ); + error(sprintf("[MENU] Cannot load UI file %s!", strUIFile)); } #endif - Font_Load( "scripts/ui_font.txt", g_fntDefault ); - precache_pic( "textures/ui/steam/icon_radiosel" ); - precache_pic( "textures/ui/steam/icon_radiounsel" ); - precache_pic( "textures/ui/steam/icon_checked" ); - precache_pic( "textures/ui/steam/icon_emptybox" ); - precache_pic( "textures/ui/steam/icon_down" ); - precache_pic( "textures/ui/steam/icon_up" ); - precache_pic( "textures/ui/steam/icon_close" ); + + Font_Load("scripts/ui_font.txt", g_fntDefault); + precache_pic("textures/ui/steam/icon_radiosel"); + precache_pic("textures/ui/steam/icon_radiounsel"); + precache_pic("textures/ui/steam/icon_checked"); + precache_pic("textures/ui/steam/icon_emptybox"); + precache_pic("textures/ui/steam/icon_down"); + precache_pic("textures/ui/steam/icon_up"); + precache_pic("textures/ui/steam/icon_close"); } diff --git a/src/vgui/ui_3dview.cpp b/src/vgui/ui_3dview.cpp index ea186906..ef5804cc 100644 --- a/src/vgui/ui_3dview.cpp +++ b/src/vgui/ui_3dview.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -14,77 +14,6 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -enumflags -{ - VIEW_VISIBLE -}; - -class CUI3DView : CUIWidget -{ - vector m_vecSize; - vector m_vec3DPos; - vector m_vec3DAngles; - float m_flFOV; - - void() CUI3DView; - virtual void() m_vDrawFunc = 0; - virtual void( float, float, float, float ) m_vInputFunc = 0; - virtual void() Draw; - virtual void( vector ) SetSize; - virtual vector() GetSize; - virtual void( vector ) Set3DAngles; - virtual vector() Get3DAngles; - virtual void( vector ) Set3DPos; - virtual vector() Get3DPos; - virtual void( void() ) SetDrawFunc; - virtual void( void(float, float, float, float) ) SetInputFunc; - virtual void( float, float, float, float ) Input; -}; - -void CUI3DView :: CUI3DView ( void ) -{ - m_flFOV = 90; - m_vecSize = '64 64'; - m_vec3DPos = m_vec3DAngles = '0 0 0'; - m_iFlags = VIEW_VISIBLE; -} - -void CUI3DView :: SetSize ( vector vecSize ) -{ - m_vecSize = vecSize; -} -vector CUI3DView :: GetSize ( void) -{ - return m_vecSize; -} - -void CUI3DView :: Set3DAngles ( vector vecAngles ) -{ - m_vec3DAngles = vecAngles; -} -vector CUI3DView :: Get3DAngles ( void) -{ - return m_vec3DAngles; -} - -void CUI3DView :: Set3DPos ( vector vecPos ) -{ - m_vec3DPos = vecPos; -} -vector CUI3DView :: Get3DPos ( void) -{ - return m_vec3DPos; -} - -void CUI3DView :: SetDrawFunc ( void() vFunc ) -{ - m_vDrawFunc = vFunc; -} -void CUI3DView :: SetInputFunc ( void(float, float, float, float) vFunc ) -{ - m_vInputFunc = vFunc; -} - noref .vector origin; noref .vector angles; noref .vector mins; @@ -92,23 +21,112 @@ noref .vector maxs; noref .string model; noref .float frame, frame2, lerpfrac, renderflags, frame1time; -void CUI3DView :: Draw ( void ) +enumflags { - if ( m_vDrawFunc ) { - clearscene(); - setproperty( VF_VIEWPORT, m_vecOrigin + m_parent.m_vecOrigin, m_vecSize ); - setproperty( VF_AFOV, 90 ); - setproperty( VF_ORIGIN, m_vec3DPos ); - setproperty( VF_ANGLES, m_vec3DAngles ); - //setproperty( VF_PERSPECTIVE, 1 ); - m_vDrawFunc(); - renderscene(); - } + VIEW_VISIBLE +}; + +class CUI3DView:CUIWidget +{ + vector m_vecSize; + vector m_vec3DPos; + vector m_vec3DAngles; + float m_flFOV; + + void() CUI3DView; + virtual void() m_vDrawFunc = 0; + virtual void(float, float, float, float) m_vInputFunc = 0; + virtual void() Draw; + virtual vector() GetSize; + virtual vector() Get3DPos; + virtual vector() Get3DAngles; + virtual void(vector) SetSize; + virtual void(vector) Set3DPos; + virtual void(vector) Set3DAngles; + virtual void(void()) SetDrawFunc; + virtual void(void(float, float, float, float)) SetInputFunc; + virtual void(float, float, float, float) Input; +}; + +void +CUI3DView::CUI3DView(void) +{ + m_flFOV = 90; + m_vecSize = [64,64]; + m_vec3DPos = m_vec3DAngles = [0,0,0]; + m_iFlags = VIEW_VISIBLE; } -void CUI3DView :: Input ( float flEVType, float flKey, float flChar, float flDevID ) +void +CUI3DView::SetSize(vector vecSize) { - if ( m_vInputFunc ) { - m_vInputFunc( flEVType, flKey, flChar, flDevID ); - } + m_vecSize = vecSize; +} + +vector +CUI3DView::GetSize(void) +{ + return m_vecSize; +} + +void +CUI3DView::Set3DAngles(vector vecAngles) +{ + m_vec3DAngles = vecAngles; +} + +vector +CUI3DView::Get3DAngles(void) +{ + return m_vec3DAngles; +} + +void +CUI3DView::Set3DPos(vector vecPos) +{ + m_vec3DPos = vecPos; +} + +vector +CUI3DView::Get3DPos(void) +{ + return m_vec3DPos; +} + +void +CUI3DView::SetDrawFunc(void() vFunc) +{ + m_vDrawFunc = vFunc; +} + +void +CUI3DView::SetInputFunc(void(float, float, float, float) vFunc) +{ + m_vInputFunc = vFunc; +} + +void +CUI3DView::Draw(void) +{ + if (!m_vDrawFunc) { + return; + } + + clearscene(); + setproperty(VF_VIEWPORT, m_vecOrigin + m_parent.m_vecOrigin, m_vecSize); + setproperty(VF_AFOV, 90); + setproperty(VF_ORIGIN, m_vec3DPos); + setproperty(VF_ANGLES, m_vec3DAngles); + m_vDrawFunc(); + renderscene(); +} + +void +CUI3DView::Input(float flEVType, float flKey, float flChar, float flDevID) +{ + if (!m_vInputFunc) { + return; + } + + m_vInputFunc(flEVType, flKey, flChar, flDevID); } diff --git a/src/vgui/ui_button.cpp b/src/vgui/ui_button.cpp index bed9a6d5..33ef81c6 100644 --- a/src/vgui/ui_button.cpp +++ b/src/vgui/ui_button.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -22,7 +22,7 @@ enumflags BUTTON_LASTACTIVE }; -class CUIButton : CUIWidget +class CUIButton:CUIWidget { vector m_vecColor; float m_flAlpha; @@ -30,119 +30,138 @@ class CUIButton : CUIWidget string m_strTitle; string m_strTitleActive; string m_strIcon; - + void() CUIButton; virtual void() m_vFunc = 0; virtual void() Draw; - virtual void( vector ) SetSize; virtual vector() GetSize; virtual int() GetSizeWidth; virtual int() GetSizeHeight; - virtual void( string ) SetTitle; - virtual void( string ) SetIcon; - virtual void( void() ) SetFunc; - virtual void( float, float, float, float ) Input; + virtual void(vector) SetSize; + virtual void(string) SetTitle; + virtual void(string) SetIcon; + virtual void(void()) SetFunc; + virtual void(float, float, float, float) Input; }; -void CUIButton :: CUIButton ( void ) +void +CUIButton::CUIButton(void) { m_vecColor = UI_MAINCOLOR; m_flAlpha = 1.0f; - m_vecSize = '96 24'; + m_vecSize = [96,24]; m_iFlags = BUTTON_VISIBLE; } -void CUIButton :: SetSize ( vector vecSize ) +void +CUIButton::SetSize(vector vecSize) { m_vecSize = vecSize; } -vector CUIButton :: GetSize ( void ) + +vector +CUIButton::GetSize(void) { return m_vecSize; } -int CUIButton :: GetSizeWidth ( void ) + +int +CUIButton::GetSizeWidth(void) { return m_vecSize[0]; } -int CUIButton :: GetSizeHeight ( void ) + +int +CUIButton::GetSizeHeight(void) { return m_vecSize[1]; } -void CUIButton :: SetTitle ( string strName ) +void +CUIButton::SetTitle(string strName) { + vector newsize; + int scale; + m_strTitle = strName; - m_strTitleActive = sprintf( "^3%s", m_strTitle ); + m_strTitleActive = sprintf("^3%s", m_strTitle); drawfont = g_fntDefault.iID; - SetSize( [ stringwidth( m_strTitle, TRUE, [ g_fntDefault.iScale, g_fntDefault.iScale ] ) + 16, 24 ] ); + + scale = g_fntDefault.iScale; + newsize[0] = stringwidth(m_strTitle, TRUE, [scale, scale]) + 16; + newsize[1] = 24; + SetSize(newsize); } -void CUIButton :: SetIcon ( string strName ) +void +CUIButton::SetIcon(string strName) { m_strIcon = strName; } -void CUIButton :: SetFunc ( void() vFunc ) +void +CUIButton::SetFunc(void() vFunc) { m_vFunc = vFunc; } -void CUIButton :: Draw ( void ) +void +CUIButton::Draw(void) { #ifndef CLASSIC_VGUI - drawfill( m_parent.m_vecOrigin + m_vecOrigin, m_vecSize, m_vecColor, m_flAlpha ); + drawfill(m_parent.m_vecOrigin + m_vecOrigin, m_vecSize, m_vecColor, m_flAlpha); - if ( m_iFlags & BUTTON_DOWN ) { - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, m_vecSize[1] - 1], [m_vecSize[0], 1], '1 1 1', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], '0 0 0', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, 1], [1, m_vecSize[1] - 2], '0 0 0', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], '1 1 1', 0.5f ); + if (m_iFlags & BUTTON_DOWN) { + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [0, m_vecSize[1] - 1], [m_vecSize[0], 1], [1,1,1], 0.5f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], [0,0,0], 0.5f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [0, 1], [1, m_vecSize[1] - 2], [0,0,0], 0.5f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], [1,1,1], 0.5f); } else { - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, m_vecSize[1] - 1], [m_vecSize[0], 1], '0 0 0', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], '1 1 1', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, 1], [1, m_vecSize[1] - 2], '1 1 1', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], '0 0 0', 0.5f ); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [0, m_vecSize[1] - 1], [m_vecSize[0], 1], [0,0,0], 0.5f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], [1,1,1], 0.5f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [0, 1], [1, m_vecSize[1] - 2], [1,1,1], 0.5f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], [0,0,0], 0.5f); } #else - if ( m_iFlags & BUTTON_DOWN ) { - drawfill( m_parent.m_vecOrigin + m_vecOrigin, m_vecSize, m_vecColor, 0.25f ); + if (m_iFlags & BUTTON_DOWN) { + drawfill(m_parent.m_vecOrigin + m_vecOrigin, m_vecSize, m_vecColor, 0.25f); } - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, m_vecSize[1] - 1], [m_vecSize[0], 1], m_vecColor, 1.0f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], m_vecColor, 1.0f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, 1], [1, m_vecSize[1] - 2], m_vecColor, 1.0f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], m_vecColor, 1.0f ); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [0, m_vecSize[1] - 1], [m_vecSize[0], 1], m_vecColor, 1.0f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], m_vecColor, 1.0f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [0, 1], [1, m_vecSize[1] - 2], m_vecColor, 1.0f); + drawfill(m_parent.m_vecOrigin + m_vecOrigin + [m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], m_vecColor, 1.0f); #endif - if ( m_strTitle ) { - if ( m_iFlags & BUTTON_LASTACTIVE ) { - Font_DrawText( m_parent.m_vecOrigin + m_vecOrigin + [ 8, 8 ], m_strTitleActive, g_fntDefault ); + if (m_strTitle) { + if (m_iFlags & BUTTON_LASTACTIVE) { + Font_DrawText(m_parent.m_vecOrigin + m_vecOrigin + [8, 8], m_strTitleActive, g_fntDefault); } else { - Font_DrawText( m_parent.m_vecOrigin + m_vecOrigin + [ 8, 8 ], m_strTitle, g_fntDefault ); + Font_DrawText(m_parent.m_vecOrigin + m_vecOrigin + [8, 8], m_strTitle, g_fntDefault); } } - if ( m_strIcon ) { - drawpic( m_parent.m_vecOrigin + m_vecOrigin + '2 2', m_strIcon, '16 16', '1 1 1', 1.0f, 0); + if (m_strIcon) { + drawpic(m_parent.m_vecOrigin + m_vecOrigin + [2,2], m_strIcon, [16,16], [1,1,1], 1.0f, 0); } } -void CUIButton :: Input ( float flEVType, float flKey, float flChar, float flDevID ) +void +CUIButton::Input(float flEVType, float flKey, float flChar, float flDevID) { - if ( flEVType == IE_KEYDOWN ) { - if ( flKey == K_MOUSE1 ) { - FlagRemove( BUTTON_LASTACTIVE ); - if ( Util_MouseAbove( getmousepos(), m_parent.m_vecOrigin + m_vecOrigin, m_vecSize ) ) { - //m_iFlags |= BUTTON_DOWN; - FlagAdd( BUTTON_DOWN ); - FlagAdd( BUTTON_LASTACTIVE ); + if (flEVType == IE_KEYDOWN) { + if (flKey == K_MOUSE1) { + FlagRemove(BUTTON_LASTACTIVE); + if (Util_MouseAbove(getmousepos(), m_parent.m_vecOrigin + m_vecOrigin, m_vecSize)) { + FlagAdd(BUTTON_DOWN); + FlagAdd(BUTTON_LASTACTIVE); } } - } else if ( flEVType == IE_KEYUP ) { - if ( flKey == K_MOUSE1 ) { - if ( m_iFlags & BUTTON_DOWN && Util_MouseAbove( getmousepos(), m_parent.m_vecOrigin + m_vecOrigin, m_vecSize ) ) { - if ( m_vFunc ) { + } else if (flEVType == IE_KEYUP) { + if (flKey == K_MOUSE1) { + if (m_iFlags & BUTTON_DOWN && Util_MouseAbove(getmousepos(), m_parent.m_vecOrigin + m_vecOrigin, m_vecSize)) { + if (m_vFunc) { m_vFunc(); } } - FlagRemove( BUTTON_DOWN ); + FlagRemove(BUTTON_DOWN); } } } diff --git a/src/vgui/ui_checkbox.cpp b/src/vgui/ui_checkbox.cpp index 4fa545f8..1b87ccea 100644 --- a/src/vgui/ui_checkbox.cpp +++ b/src/vgui/ui_checkbox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -42,7 +42,7 @@ void CUICheckbox :: CUICheckbox ( void ) { m_vecColor = UI_MAINCOLOR; m_flAlpha = 1.0f; - m_vecSize = '96 18'; + m_vecSize = [96,18]; m_iFlags = CHECKBOX_VISIBLE; } @@ -77,16 +77,16 @@ void CUICheckbox :: Draw ( void ) drawfill( m_parent.m_vecOrigin + m_vecOrigin, m_vecSize, m_vecColor, m_flAlpha ); if ( m_iFlags & CHECKBOX_DOWN ) { - drawfill( m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], '0 0 0', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, m_vecSize[1] - 1], [m_vecSize[0], 1], '1 1 1', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, 1], [1, m_vecSize[1] - 2], '0 0 0', 0.5f ); - drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], '1 1 1', 0.5f ); + drawfill( m_parent.m_vecOrigin + m_vecOrigin, [m_vecSize[0], 1], [0,0,0], 0.5f ); + drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, m_vecSize[1] - 1], [m_vecSize[0], 1], [1,1,1], 0.5f ); + drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ 0, 1], [1, m_vecSize[1] - 2], [0,0,0], 0.5f ); + drawfill( m_parent.m_vecOrigin + m_vecOrigin + [ m_vecSize[0] - 1, 1], [1, m_vecSize[1] - 2], [1,1,1], 0.5f ); } if ( m_iFlags & CHECKBOX_CHECKED ) { - drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_checked", '16 16', '1 1 1', 1.0f, 0); + drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_checked", [16,16], [1,1,1], 1.0f, 0); } else { - drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_emptybox", '16 16', '1 1 1', 1.0f, 0); + drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_emptybox", [16,16], [1,1,1], 1.0f, 0); } #else if ( m_iFlags & CHECKBOX_DOWN ) { @@ -97,9 +97,9 @@ void CUICheckbox :: Draw ( void ) } if ( m_iFlags & CHECKBOX_CHECKED ) { - drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_checked", '16 16', m_vecColor, 1.0f, 0); + drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_checked", [16,16], m_vecColor, 1.0f, 0); } else { - drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_emptybox", '16 16', m_vecColor, 1.0f, 0); + drawpic( m_parent.m_vecOrigin + m_vecOrigin, "textures/ui/steam/icon_emptybox", [16,16], m_vecColor, 1.0f, 0); } #endif if ( m_strTitle ) { diff --git a/src/vgui/ui_label.cpp b/src/vgui/ui_label.cpp index a16db30e..1c3a318c 100644 --- a/src/vgui/ui_label.cpp +++ b/src/vgui/ui_label.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,7 +28,7 @@ class CUILabel : CUIWidget void CUILabel :: CUILabel ( void ) { - m_vecSize = '96 16'; + m_vecSize = [96,16]; m_iFlags = BUTTON_VISIBLE; } diff --git a/src/vgui/ui_list.cpp b/src/vgui/ui_list.cpp index c21cbbf4..76b6a9f5 100644 --- a/src/vgui/ui_list.cpp +++ b/src/vgui/ui_list.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -49,7 +49,7 @@ class CUIList : CUIWidget void CUIList :: CUIList ( void ) { - m_vecSize = '96 16'; + m_vecSize = [96,16]; m_iFlags = 1; m_iSelected = -1; } diff --git a/src/vgui/ui_listbox.cpp b/src/vgui/ui_listbox.cpp index cfcd4d75..a7f9f24e 100644 --- a/src/vgui/ui_listbox.cpp +++ b/src/vgui/ui_listbox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -36,7 +36,7 @@ class CUIListBox : CUIWidget void CUIListBox :: CUIListBox ( void ) { - m_vecSize = '96 16'; + m_vecSize = [96,16]; m_iFlags = 1; m_iSelected = -1; } diff --git a/src/vgui/ui_menubutton.cpp b/src/vgui/ui_menubutton.cpp index 3edcb728..09d482db 100644 --- a/src/vgui/ui_menubutton.cpp +++ b/src/vgui/ui_menubutton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -47,7 +47,7 @@ void CUIMenuButton :: CUIMenuButton ( void ) { m_vecColor = UI_MAINCOLOR; m_flAlpha = 1.0f; - m_vecSize = '96 24'; + m_vecSize = [96,24]; m_iFlags = MBUTTON_VISIBLE | MBUTTON_SHOWOFFLINE | MBUTTON_SHOWSP | MBUTTON_SHOWMP; } diff --git a/src/vgui/ui_pic.cpp b/src/vgui/ui_pic.cpp index 139bcf32..a07ed160 100644 --- a/src/vgui/ui_pic.cpp +++ b/src/vgui/ui_pic.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -38,7 +38,7 @@ class CUIPic : CUIWidget void CUIPic :: CUIPic ( void ) { - m_vecSize = '16 16'; + m_vecSize = [16,16]; m_iFlags = IMAGE_VISIBLE; } diff --git a/src/vgui/ui_radio.cpp b/src/vgui/ui_radio.cpp index 4ab9cee3..338e0af4 100644 --- a/src/vgui/ui_radio.cpp +++ b/src/vgui/ui_radio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -44,7 +44,7 @@ void CUIRadio :: CUIRadio ( void ) { m_vecColor = UI_MAINCOLOR; m_flAlpha = 1.0f; - m_vecSize = '96 24'; + m_vecSize = [96,24]; m_iFlags = RADIO_VISIBLE; } diff --git a/src/vgui/ui_scrollbar.cpp b/src/vgui/ui_scrollbar.cpp index 5860f1d4..14aabfcd 100644 --- a/src/vgui/ui_scrollbar.cpp +++ b/src/vgui/ui_scrollbar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above diff --git a/src/vgui/ui_slider.cpp b/src/vgui/ui_slider.cpp index 4e26f0e9..7eaaf10b 100644 --- a/src/vgui/ui_slider.cpp +++ b/src/vgui/ui_slider.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -38,7 +38,7 @@ void CUISlider :: CUISlider ( void ) { m_vecColor = '76 88 68' / 255; m_flAlpha = 1.0f; - m_vecSize = '96 24'; + m_vecSize = [96,24]; m_iFlags = BUTTON_VISIBLE; } diff --git a/src/vgui/ui_tabview.cpp b/src/vgui/ui_tabview.cpp index 33140fc4..faadab04 100644 --- a/src/vgui/ui_tabview.cpp +++ b/src/vgui/ui_tabview.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -33,7 +33,7 @@ class CUITabView : CUIWidget void CUITabView :: CUITabView ( void ) { - m_vecSize = '96 16'; + m_vecSize = [96,16]; m_iFlags = BUTTON_VISIBLE; } diff --git a/src/vgui/ui_textbox.cpp b/src/vgui/ui_textbox.cpp index 49c5ccaa..2b5dbf70 100644 --- a/src/vgui/ui_textbox.cpp +++ b/src/vgui/ui_textbox.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -42,7 +42,7 @@ void CUITextBox :: CUITextBox ( void ) { m_vecColor = UI_MAINCOLOR; m_flAlpha = 1.0f; - m_vecSize = '96 24'; + m_vecSize = [96,24]; m_iFlags = BUTTON_VISIBLE; } diff --git a/src/vgui/ui_window.cpp b/src/vgui/ui_window.cpp index c4ec9a12..a124ee35 100644 --- a/src/vgui/ui_window.cpp +++ b/src/vgui/ui_window.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Marco Hladik + * Copyright (c) 2016-2020 Marco Hladik * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -73,7 +73,7 @@ void CUIWindow :: CUIWindow ( void ) m_vecColor = UI_MAINCOLOR; m_flAlpha = 1.0f; - m_vecMinSize = '64 64'; + m_vecMinSize = [64,64]; m_vecMaxSize = '640 480'; // TODO: Make this the screen res m_strTitle = "Window";