From: Rudolf Polzer <divverent@alientrap.org>
Date: Sun, 16 Jan 2011 20:24:16 +0000 (+0100)
Subject: get rid of some dead code
X-Git-Tag: xonotic-v0.5.0~318^2~104^2
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a0351dd36fefcce48c4467548c7d47d0aca2076e;p=xonotic%2Fxonotic-data.pk3dir.git

get rid of some dead code
---

diff --git a/qcsrc/menu/item.c b/qcsrc/menu/item.c
index 497d1cf661..52b960e456 100644
--- a/qcsrc/menu/item.c
+++ b/qcsrc/menu/item.c
@@ -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)
diff --git a/qcsrc/menu/item/borderimage.c b/qcsrc/menu/item/borderimage.c
index 236b235222..b23078bae0 100644
--- a/qcsrc/menu/item/borderimage.c
+++ b/qcsrc/menu/item/borderimage.c
@@ -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)
diff --git a/qcsrc/menu/item/button.c b/qcsrc/menu/item/button.c
index 3d91229ec6..871685f537 100644
--- a/qcsrc/menu/item/button.c
+++ b/qcsrc/menu/item/button.c
@@ -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
diff --git a/qcsrc/menu/item/dialog.c b/qcsrc/menu/item/dialog.c
index 3d537bfb92..800a12681e 100644
--- a/qcsrc/menu/item/dialog.c
+++ b/qcsrc/menu/item/dialog.c
@@ -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
diff --git a/qcsrc/menu/item/inputbox.c b/qcsrc/menu/item/inputbox.c
index 750bc83b89..5b07afd4ee 100644
--- a/qcsrc/menu/item/inputbox.c
+++ b/qcsrc/menu/item/inputbox.c
@@ -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);
diff --git a/qcsrc/menu/item/label.c b/qcsrc/menu/item/label.c
index 7ed6e4f68e..d663244ca4 100644
--- a/qcsrc/menu/item/label.c
+++ b/qcsrc/menu/item/label.c
@@ -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)
 		{
diff --git a/qcsrc/menu/item/nexposee.c b/qcsrc/menu/item/nexposee.c
index 2369a41077..304bf1dd24 100644
--- a/qcsrc/menu/item/nexposee.c
+++ b/qcsrc/menu/item/nexposee.c
@@ -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)
 	{
diff --git a/qcsrc/menu/mbuiltin.qh b/qcsrc/menu/mbuiltin.qh
index 761b63a83b..e5d366eb70 100644
--- a/qcsrc/menu/mbuiltin.qh
+++ b/qcsrc/menu/mbuiltin.qh
@@ -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;
diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc
index 7bec34ea0b..92da56a253 100644
--- a/qcsrc/menu/menu.qc
+++ b/qcsrc/menu/menu.qc
@@ -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
 		}
 	}
 
diff --git a/qcsrc/menu/skin.qh b/qcsrc/menu/skin.qh
index 20da37d24e..437c49bf72 100644
--- a/qcsrc/menu/skin.qh
+++ b/qcsrc/menu/skin.qh
@@ -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