]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
get rid of some dead code
authorRudolf Polzer <divverent@alientrap.org>
Sun, 16 Jan 2011 20:24:16 +0000 (21:24 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 16 Jan 2011 20:24:39 +0000 (21:24 +0100)
qcsrc/menu/item.c
qcsrc/menu/item/borderimage.c
qcsrc/menu/item/button.c
qcsrc/menu/item/dialog.c
qcsrc/menu/item/inputbox.c
qcsrc/menu/item/label.c
qcsrc/menu/item/nexposee.c
qcsrc/menu/mbuiltin.qh
qcsrc/menu/menu.qc
qcsrc/menu/skin.qh

index 497d1cf661699974a640bcf86e28a22b8d840e57..52b960e456c5893fb2bebcc6c1e146169fa44c3d 100644 (file)
@@ -42,7 +42,6 @@ void Item_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOr
 {
        me.origin = absOrigin;
        me.size = absSize;
-       // me.tooltip = "The quick brown fox jumped over the lazy sleeping dog's back then sat on a tack. Franz jagt im komplett verwahrlosten Taxi quer durch Bayern.";
 }
 
 void Item_draw(entity me)
index 236b2352221259a98b0e5604b4e3e2b06180b5c9..b23078bae061a91509793dc2dd415e542993a0cd 100644 (file)
@@ -57,8 +57,6 @@ void BorderImage_configureBorderImage(entity me, string theTitle, float sz, vect
 }
 void BorderImage_draw(entity me)
 {
-       //print(vtos(me.borderVec), "\n");
-
        if(me.src)
                draw_BorderPicture('0 0 0', me.src, '1 1 0', me.color, 1, me.borderVec);
        if(me.fontSize > 0)
index 3d91229ec6669dcd6f3af7c1b56858db72708b2f..871685f53797cfa38e11603e1297a15c3eb96a62 100644 (file)
@@ -169,4 +169,4 @@ void Button_draw(entity me)
                else if(!me.focused && me.playedfocus)
                        me.playedfocus = 0;
 }
-#endif
\ No newline at end of file
+#endif
index 3d537bfb92f3bc74f735a00a3031100d335e6118..800a12681e4eb3d8b95ba4c0206baf1691cf5f3a 100644 (file)
@@ -78,7 +78,6 @@ void Dialog_fill(entity me)
 
 void Dialog_addItemSimple(entity me, float row, float col, float rowspan, float colspan, entity e, vector v)
 {
-       //print(vtos(me.itemSpacing), " ", vtos(me.itemSize), "\n");
        vector o, s;
        o = me.itemOrigin + eX * ( col          * me.itemSpacing_x) + eY * ( row          * me.itemSpacing_y);
        s = me.itemSize   + eX * ((colspan - 1) * me.itemSpacing_x) + eY * ((rowspan - 1) * me.itemSpacing_y);
@@ -156,7 +155,7 @@ void Dialog_configureDialog(entity me)
        if(me.closable)
        {
                closebutton = me.closeButton = spawnButton();
-               closebutton.configureButton(closebutton, "Close", 0, me.closeButtonImage);
+               closebutton.configureButton(closebutton, "", 0, me.closeButtonImage);
                closebutton.onClick = Dialog_Close; closebutton.onClickEntity = me;
                closebutton.srcMulti = 0;
                me.addItem(me, closebutton, '0 0 0', '1 1 0', 1); // put it as LAST
index 750bc83b890453eb917fcaaac3aa804a54142727..5b07afd4eef2997d11b9ec5057379fd5ec89d478 100644 (file)
@@ -272,35 +272,6 @@ void InputBox_draw(entity me)
                                                draw_Text(p, substring(me.text, i, 2), me.realFontSize, '1 1 1', theAlpha, 0);
                                        }
                                }
-                               /*else if(ch2 == "a") // ^a found
-                               {
-                                       draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);
-                                       draw_Text(p, substring(me.text, i, 2), me.realFontSize, theColor, 0.8, 0);
-                                       
-                                       component = str2chr(me.text, i+2);
-                                       if (component >= '0' && component <= '9')
-                                               component = component - '0';
-                                       else if (component >= 'a' && component <= 'f')
-                                               component = component - 87;
-                                       else if (component >= 'A' && component <= 'F')
-                                               component = component - 55;
-                                       else
-                                               component = -1;
-                                       
-                                       if (component >= 0) // ^ah found
-                                       {
-                                               // FIX ME: overflow here
-                                               if (component == 20 && theVariableAlpha <= 0.97)
-                                                       theVariableAlpha = theVariableAlpha + 0.0625;
-                                               else if (component == 30 && theVariableAlpha >= 0.03)
-                                                       theVariableAlpha = theVariableAlpha - 0.0625;
-                                               else
-                                                       theVariableAlpha = component*0.0625;
-                                               
-                                               draw_Fill(p, eX * draw_TextWidth(substring(me.text, i, 3), 0, me.realFontSize) + eY * me.realFontSize_y, '0.8 0.8 0.8', 0.5);
-                                               draw_Text(p, strcat(ch, ch2), me.realFontSize, theColor, 0.8, 0);
-                                       }
-                               }*/
                                else
                                {
                                        draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);
index 7ed6e4f68ef82daf3b33821aba270e691eba3a18..d663244ca436a8b47d20203645a9c55d3b149f46 100644 (file)
@@ -75,9 +75,6 @@ void Label_draw(entity me)
                me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(t, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
        me.recalcPos = 0;
 
-       //if(me.text == "Bookmark")
-       //      draw_Fill(me.realOrigin, '0 1 0' + '1 0 0' * draw_TextWidth(t, me.allowColors, me.realFontSize), '1 0 1', 1);
-       
        if(me.fontSize)
                if(t)
                {
index 2369a41077db5334d6ea9ac63348fe3fb47c2b56..304bf1dd241c053fa707c13a39898f4a0377fcbf 100644 (file)
@@ -149,8 +149,6 @@ void Nexposee_draw(entity me)
                me.animationState = 0;
        }
 
-       //print(ftos(me.animationState), "\n");
-
        f = min(1, frametime * 5);
        switch(me.animationState)
        {
index 761b63a83b30dc1a97990cdc7a172e6c53e3de40..e5d366eb7049cd92ea883e24444c0dcc5c441230 100644 (file)
@@ -3,9 +3,6 @@
 //////////////////////////////////////////////////
 // AK FIXME: Create perhaps a special builtin file for the common cmds
 
-//#define PROFILESTRZONE
-//#define FIXEDFOPEN
-
 float  checkextension(string ext) = #1;
 
 // error cmds
@@ -100,11 +97,7 @@ float       bound(float min,float value, float max)  = #45;
 float  pow(float a, float b)  = #46;
 void   copyentity(entity src, entity dst)  = #47;
 
-#ifdef FIXEDFOPEN
-float  _fopen( string filename, float mode ) = #48;
-#else
 float  fopen(string filename, float mode)  = #48;
-#endif
 void   fclose(float fhandle)  = #49;
 string fgets(float fhandle)  = #50;
 void   fputs(float fhandle, string s)  = #51;
@@ -116,23 +109,8 @@ string     substring(string s, float start, float length)  = #54;
 
 vector stov(string s)  = #55;
 
-#ifdef PROFILESTRZONE
-string _strzone(string s)  = #56;
-void   _strunzone(string s) = #57;
-
-string( string s ) strzone =
-{
-       return _strzone( s );
-};
-
-void( string s ) strunzone =
-{
-       return _strunzone( s );
-};
-#else
 string strzone(string s)  = #56;
 void   strunzone(string s) = #57;
-#endif
 
 float  tokenize(string s) = #58;
 float(string s, string separator1, ...) tokenizebyseparator = #479;
@@ -343,26 +321,6 @@ string(string search, string replace, string subject) strreplace = #484;
 
 string(float uselocaltime, string format, ...) strftime = #478;
 
-#ifdef FIXEDFOPEN
-float  fopen( string filename, float mode ) =
-{
-       local float handle;
-       if( mode == FILE_READ ) {
-               return _fopen( filename, mode );
-       }
-
-       // check for data/
-       filename = strzone( filename );
-       if( substring( filename, 0, 5 ) != "data/" ) {
-               print( "menu: fopen: all output must go into data/!\n" );
-               return -1;
-       }
-       handle = _fopen( substring( filename, 5, 10000 ), mode );
-       strunzone( filename );
-       return handle;
-};
-#endif
-
 float(string s) tokenize_console = #514;
 float(float i) argv_start_index = #515;
 float(float i) argv_end_index = #516;
index 7bec34ea0b0a1ff91aad1c9ed91d051f34ca7fc9..92da56a25377baee061139f736433b684aea0458 100644 (file)
@@ -38,7 +38,7 @@ void() m_init =
                        s = getgamedirinfo(i, GETGAMEDIRINFO_NAME);
                        if not(s)
                                break;
-                       print(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
+                       dprint(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
                }
        }
 }
@@ -183,7 +183,7 @@ void(float key, float ascii) m_keyup =
                if(mouseButtonsPressed < 0)
                {
                        mouseButtonsPressed = 0;
-                       print("Warning: released an already released button\n");
+                       dprint("Warning: released an already released button\n");
                }
        }
        if(key == K_ALT) menuShiftState -= (menuShiftState & S_ALT);
@@ -221,7 +221,7 @@ void(float key, float ascii) m_keydown =
                if(mouseButtonsPressed > 10)
                {
                        mouseButtonsPressed = 10;
-                       print("Warning: pressed an already pressed button\n");
+                       dprint("Warning: pressed an already pressed button\n");
                }
        }
        if(key == K_ALT) menuShiftState |= S_ALT;
@@ -341,11 +341,6 @@ float m_testtooltipbox(vector tooltippos)
                return FALSE;
        if(tooltippos_y + menuTooltipSize_y > 1)
                return FALSE;
-       /*
-       menuTooltipOrigin_x = rint(tooltippos_x * cvar("vid_width")) / cvar("vid_width");
-       menuTooltipOrigin_y = rint(tooltippos_y * cvar("vid_height")) / cvar("vid_height");
-       menuTooltipOrigin_z = 0;
-       */
        menuTooltipOrigin = tooltippos;
        return TRUE;
 }
@@ -566,7 +561,7 @@ void() m_draw =
                if(!cvar("menu_video_played"))
                {
                        localcmd("set menu_video_played 1; cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
-                       menuLogoAlpha = -0.8; // no idea why, but when I start this at zero, it jumps instead of fading
+                       menuLogoAlpha = -0.8; // no idea why, but when I start this at zero, it jumps instead of fading FIXME
                }
        }
 
index 20da37d24e5d02f8204fefca6d61733dc59b3489..437c49bf72c3327f3b17b4ef70903fce63c47b4e 100644 (file)
@@ -17,7 +17,7 @@
 //#define SKINSTRING(name,def) case #name: break
 #define SKINSTRING(name,def) case #name: SKIN##name = strzone(value); break
        // I know this leaks memory when skin is read multiple times. Screw it.
-#define SKINEND case "": break; case "//": break; default: print("Invalid key in skin file: ", key, "\n"); } }
+#define SKINEND case "": break; case "//": break; default: dprint("Invalid key in skin file: ", key, "\n"); } }
 #include "skin-customizables.inc"
 #undef SKINEND
 #undef SKINSTRING