vid_width = vf_size_x;
vid_height = vf_size_y;
- vector reticle_pos, reticle_size;
- vector splash_pos, splash_size;
+ vector reticle_pos = '0 0 0', reticle_size = '0 0 0';
+ vector splash_pos = '0 0 0', splash_size = '0 0 0';
WaypointSprite_Load();
else
shottype = SHOTTYPE_HITWORLD;
- vector wcross_color, wcross_size;
+ vector wcross_color = '0 0 0', wcross_size = '0 0 0';
string wcross_wep = "", wcross_name;
float wcross_scale, wcross_blur;
void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, float vertical, float icon_right_align, vector color, float theAlpha, float fadelerp)
{
- vector newPos, newSize;
+ vector newPos = '0 0 0', newSize = '0 0 0';
vector picpos, numpos;
if (vertical)
}
// always force 4:1 aspect
- vector newSize;
+ vector newSize = '0 0 0';
if(mySize_x/mySize_y > 4)
{
newSize_x = 4 * mySize_y;
}
// always force 3:1 aspect
- vector newSize;
+ vector newSize = '0 0 0';
if(mySize_x/mySize_y > 3)
{
newSize_x = 3 * mySize_y;
float kh_keys;
float keyteam;
float a, aa;
- vector p, pa, kh_size, kh_asize;
+ vector p = '0 0 0', pa, kh_size = '0 0 0', kh_asize = '0 0 0';
kh_keys = getstati(STAT_KH_KEYS);
float aspect = autocvar_hud_panel_pressedkeys_aspect;
if(aspect)
{
- vector newSize;
+ vector newSize = '0 0 0';
if(mySize_x/mySize_y > aspect)
{
newSize_x = aspect * mySize_y;
}
// always force 5:1 aspect
- vector newSize;
+ vector newSize = '0 0 0';
if(mySize_x/mySize_y > 5)
{
newSize_x = 5 * mySize_y;
HUD_Panel_GetProgressBarColor(speed);
HUD_Panel_DrawProgressBar(panel_pos + speed_offset, panel_size, "progressbar", speed/max_speed, 0, speed_baralign, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
}
- vector tmp_offset = '0 0 0', tmp_size;
+ vector tmp_offset = '0 0 0', tmp_size = '0 0 0';
if (autocvar_hud_panel_physics_text == 1 || autocvar_hud_panel_physics_text == 2)
{
tmp_size_x = panel_size_x * 0.75;
if(autocvar_hud_panel_physics_progressbar == 1 || autocvar_hud_panel_physics_progressbar == 2)
{
float peak_offset_x;
- vector peak_size;
+ vector peak_size = '0 0 0';
if (speed_baralign == 0)
peak_offset_x = min(top_speed, max_speed)/max_speed * panel_size_x;
else if (speed_baralign == 1)
HUD_Panel_SetPos(mousepos - panel_click_distance);
else if(highlightedAction == 2)
{
- vector mySize;
+ vector mySize = '0 0 0';
if(resizeCorner == 1) {
mySize_x = panel_click_resizeorigin_x - (mousepos_x - panel_click_distance_x);
mySize_y = panel_click_resizeorigin_y - (mousepos_y - panel_click_distance_y);
float center;
float columns, rows;
float tsize;
- vector dist;
+ vector dist = '0 0 0';
if(!mv_active)
return;
vector rotate(vector v, float a)
{
- vector w;
+ vector w = '0 0 0';
// FTEQCC SUCKS AGAIN
w_x = v_x * cos(a) + v_y * sin(a);
w_y = -1 * v_x * sin(a) + v_y * cos(a);
void drawborderlines(float thickness, vector pos, vector dim, vector color, float theAlpha, float drawflag)
{
- vector line_dim;
+ vector line_dim = '0 0 0';
// left and right lines
pos_x -= thickness;
void drawpic_tiled(vector pos, string pic, vector sz, vector area, vector color, float theAlpha, float drawflag)
{
- vector current_pos, end_pos, new_size, ratio;
+ vector current_pos = '0 0 0', end_pos, new_size = '0 0 0', ratio = '0 0 0';
end_pos = pos + area;
current_pos_y = pos_y;
vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_size)
{
float body_table_height, i;
- vector tmp, column_dim;
+ vector tmp = '0 0 0', column_dim = '0 0 0';
entity pl;
body_table_height = 1.25 * hud_fontsize_y * max(1, tm.team_size); // no player? show 1 empty line
drawstring(pos, sprintf(_("Accuracy stats (average %d%%)"), average_accuracy), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
pos_y += 1.25 * hud_fontsize_y + autocvar_scoreboard_border_thickness;
- vector tmp;
+ vector tmp = '0 0 0';
tmp_x = sbwidth;
tmp_y = height * rows;
pos_y += 1.25 * hud_fontsize_y + autocvar_scoreboard_border_thickness;
// draw table
- vector tmp;
+ vector tmp = '0 0 0';
tmp_x = sbwidth;
tmp_y = hud_fontsize_y * rows;
pos_y += hud_fontsize_y;
drawstring(pos, _("Rankings"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
pos_y += hud_fontsize_y + autocvar_scoreboard_border_thickness;
- vector tmp;
+ vector tmp = '0 0 0';
tmp_x = sbwidth;
tmp_y = 1.25 * hud_fontsize_y * RANKINGS_RECEIVED_CNT;
if(autocvar_r_letterbox)
return;
- vector picsize, hudloc, pic2size, picloc;
+ vector picsize, hudloc = '0 0 0', pic2size, picloc;
// Fetch health & ammo stats
HUD_GETSTATS
if(autocvar_r_letterbox)
return;
- vector picsize, hudloc, pic2size, picloc;
+ vector picsize, hudloc = '0 0 0', pic2size, picloc;
// Fetch health & ammo stats
HUD_GETSTATS
if(autocvar_r_letterbox)
return;
- vector picsize, hudloc, pic2size, picloc;
+ vector picsize, hudloc = '0 0 0', pic2size, picloc;
float i;
// Fetch health & ammo stats
if(autocvar_r_letterbox)
return;
- vector picsize, hudloc, pic2size, picloc;
+ vector picsize, hudloc = '0 0 0', pic2size, picloc;
// Fetch health & ammo stats
HUD_GETSTATS
if(autocvar_r_letterbox)
return;
- vector picsize, hudloc, pic2size, picloc;
+ vector picsize, hudloc = '0 0 0', pic2size, picloc;
// Fetch health & ammo stats
HUD_GETSTATS
#define M1 30
#define M2 10
- vector v1, v2, v3;
+ vector v1, v2 = '0 0 0', v3;
v1 = '1 1 0' * M1;
v2_x = vid_conwidth - (2 * M1);
v2_y = vid_conheight - (2 * M1);
#include "item/textslider.c"
#include "item/listbox.c"
#include "item/inputbox.c"
-#include "item/gecko.c"
#include "xonotic/dialog.c"
#include "xonotic/tab.c"
#include "xonotic/mainwindow.c"
#include "xonotic/image.c"
#include "xonotic/crosshairbutton.c"
#include "xonotic/playermodel.c"
-#include "xonotic/dialog_news.c"
#include "xonotic/checkbox_slider_invalid.c"
#include "xonotic/charmap.c"
#include "xonotic/keybinder.c"
+++ /dev/null
-// Andreas Kirsch Gecko item (to test it)
-#ifdef INTERFACE
-CLASS(Gecko) EXTENDS(Item)
- METHOD(Gecko, configureBrowser, void( entity, string ) )
- METHOD(Gecko, draw, void(entity))
- METHOD(Gecko, keyDown, float(entity, float, float, float))
- METHOD(Gecko, keyUp, float(entity, float, float, float))
- METHOD(Gecko, mouseMove, float(entity, vector))
- METHOD(Gecko, mouseDrag, float(entity, vector))
- METHOD(Gecko, resizeNotify, void(entity, vector, vector, vector, vector))
- ATTRIB(Gecko, texturePath, string, string_null )
- ATTRIB(Gecko, textureExtent, vector, '0 0 0')
-ENDCLASS(Gecko)
-#endif
-
-#ifdef IMPLEMENTATION
-// define static members
-float _gecko_instanceNumber;
-
-void Gecko_configureBrowser( entity me, string URI ) {
- me.focusable = 1;
-
- //create a new gecko object if needed
- if( !me.texturePath ) {
- me.texturePath = strzone( strcat( "_dynamic/gecko/menu/", ftos( _gecko_instanceNumber ) ) );
- _gecko_instanceNumber+=1;
- // TODO: add error checks
- gecko_create( me.texturePath );
- }
- gecko_navigate( me.texturePath, URI );
-}
-
-void Gecko_draw(entity me)
-{
- vector drawSize;
-
- if( me.texturePath ) {
- /* The gecko browser is actually only drawn to a part of the
- texture. Correct scaling so that part fills up the whole
- item area. */
- drawSize_x = 1.0 / me.textureExtent_x;
- drawSize_y = 1.0 / me.textureExtent_y;
- draw_Picture( '0 0 0', strcat( "/", me.texturePath ),
- drawSize, '1 1 1', 1.0 );
- } else {
- vector fontsize;
- fontsize_x = fontsize_y = 1.0 / 30.0;
- fontsize_z = 0.0;
- draw_Text( '0 0 0', _("Browser not initialized!"), fontsize, '1 1 1', 1.0, 0 );
- }
- SUPER(Gecko).draw(me);
-}
-
-float Gecko_keyDown(entity me, float scan, float ascii, float shift)
-{
- if( scan == K_ESCAPE ) {
- return 0;
- }
- if (ascii >= 32)
- return gecko_keyevent( me.texturePath, ascii, GECKO_BUTTON_DOWN );
- else
- return gecko_keyevent( me.texturePath, scan, GECKO_BUTTON_DOWN );
-}
-
-float Gecko_keyUp(entity me, float scan, float ascii, float shift)
-{
- if (ascii >= 32)
- return gecko_keyevent( me.texturePath, ascii, GECKO_BUTTON_UP );
- else
- return gecko_keyevent( me.texturePath, scan, GECKO_BUTTON_UP );
-}
-
-float Gecko_mouseMove(entity me, vector pos)
-{
- gecko_mousemove( me.texturePath, pos_x, pos_y );
- return 1;
-}
-
-float Gecko_mouseDrag(entity me, vector pos)
-{
- gecko_mousemove( me.texturePath, pos_x, pos_y );
- return 1;
-}
-
-void Gecko_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
-{
- SUPER(Gecko).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
- gecko_resize( me.texturePath, absSize_x, absSize_y );
- me.textureExtent = gecko_get_texture_extent( me.texturePath );
-}
-
-string toStringGecko(entity me)
-{
- return me.texturePath;
-}
-
-#endif
void ListBox_draw(entity me)
{
float i;
- vector absSize, fillSize;
+ vector absSize, fillSize = '0 0 0';
vector oldshift, oldscale;
if(me.pressed == 2)
me.mouseDrag(me, me.dragScrollPos); // simulate mouseDrag event
vector color_hslimage(vector v, vector margin)
{
- vector pos;
+ vector pos = '0 0 0';
v = rgb_to_hsl(v);
if (v_y)
{
+++ /dev/null
-#ifdef INTERFACE
-CLASS(XonoticNewsDialog) EXTENDS(XonoticDialog)
- METHOD(XonoticNewsDialog, fill, void(entity))
- ATTRIB(XonoticNewsDialog, title, string, _("News"))
- ATTRIB(XonoticNewsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS)
- ATTRIB(XonoticNewsDialog, intendedWidth, float, 0.96)
- ATTRIB(XonoticNewsDialog, rows, float, 24)
- ATTRIB(XonoticNewsDialog, columns, float, 1)
-ENDCLASS(XonoticNewsDialog)
-#endif
-
-#ifdef IMPLEMENTATION
-void XonoticNewsDialog_fill(entity me)
-{
- entity e;
- me.TR(me);
- me.TD(me, 24, 1, e = spawnGecko());
- e.configureBrowser( e, _("http://www.xonotic.org/team/blog/") );
-}
-#endif
// 5: AES required
{
- vector iconSize;
+ vector iconSize = '0 0 0';
iconSize_y = me.realFontSize_y * me.iconsSizeFactor;
iconSize_x = me.realFontSize_x * me.iconsSizeFactor;
- vector iconPos;
+ vector iconPos = '0 0 0';
iconPos_x = (me.columnIconsSize - 3 * iconSize_x) * 0.5;
iconPos_y = (1 - iconSize_y) * 0.5;
}
void preMenuDraw()
{
- vector fs, sz, line, mid;
+ vector fs, sz = '0 0 0', line, mid;
updateCheck();
vector W_CalculateProjectileSpread(vector forward, float spread)
{
float sigma;
- vector v1, v2;
+ vector v1 = '0 0 0', v2;
float dx, dy, r;
float sstyle;
spread *= g_weaponspreadfactor;
void RuneCarriedThink()
{
float rcount, rnum;
- vector ang;
+ vector ang = '0 0 0';
entity rune;
if(self.owner.classname != "player" || time < game_starttime)
vector shortangle_vxy(vector ang1, vector ang2)
{
- vector vtmp;
+ vector vtmp = '0 0 0';
vtmp_x = shortangle_f(ang1_x,ang2_x);
vtmp_y = shortangle_f(ang1_y,ang2_y);