changeset 9693:cf5a441f1069 draft

(svn r13800) -Codechange: minor comment style fixes in misc_gui.cpp
author smatz <smatz@openttd.org>
date Wed, 23 Jul 2008 15:01:50 +0000
parents 22cb1402d757
children d242326b460b
files src/misc_gui.cpp
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -424,7 +424,7 @@
 		height = max<int>(height, h);
 
 		if (msg1 == INVALID_STRING_ID) {
-			// only 1 line will be printed
+			/* only 1 line will be printed */
 			y[1] = (height - 15) / 2 + 15 - 5;
 		} else {
 			int over = (height - h) / 4;
@@ -518,10 +518,10 @@
 		if ((x | y) != 0) {
 			pt = RemapCoords2(x, y);
 			vp = FindWindowById(WC_MAIN_WINDOW, 0)->viewport;
-			pt.x = Clamp(UnScaleByZoom(pt.x - vp->virtual_left, vp->zoom) + vp->left - (334/2), 0, _screen.width - 334);
-			pt.y = Clamp(UnScaleByZoom(pt.y - vp->virtual_top, vp->zoom) + vp->top - (137/2), 22, _screen.height - 137);
+			pt.x = Clamp(UnScaleByZoom(pt.x - vp->virtual_left, vp->zoom) + vp->left - (334 / 2),  0, _screen.width  - 334);
+			pt.y = Clamp(UnScaleByZoom(pt.y - vp->virtual_top,  vp->zoom) + vp->top  - (137 / 2), 22, _screen.height - 137);
 		} else {
-			pt.x = (_screen.width - 334) >> 1;
+			pt.x = (_screen.width  - 334) >> 1;
 			pt.y = (_screen.height - 137) >> 1;
 		}
 		new ErrmsgWindow(pt, 334, 137, msg_1, msg_2, _errmsg_face_widgets, true);
@@ -1050,7 +1050,7 @@
 	{
 		if (this->orig == NULL || strcmp(this->text.buf, this->orig) != 0) {
 			/* If the parent is NULL, the editbox is handled by general function
-				* HandleOnEditText */
+			 * HandleOnEditText */
 			if (this->parent != NULL) {
 				this->parent->OnQueryTextFinished(this->text.buf);
 			} else {
@@ -1184,7 +1184,7 @@
 		this->top = parent->top + (parent->height / 2) - (this->height / 2);
 
 		/* Create a backup of the variadic arguments to strings because it will be
-		* overridden pretty often. We will copy these back for drawing */
+		 * overridden pretty often. We will copy these back for drawing */
 		CopyOutDParam(this->params, 0, lengthof(this->params));
 		this->widget[QUERY_WIDGET_CAPTION].data = caption;
 		this->message    = message;
@@ -1272,7 +1272,8 @@
  * @param message string that will be shown for the window
  * @param parent pointer to parent window, if this pointer is NULL the parent becomes
  * the main window WC_MAIN_WINDOW
- * @param callback callback function pointer to set in the window descriptor*/
+ * @param callback callback function pointer to set in the window descriptor
+ */
 void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallbackProc *callback)
 {
 	new QueryWindow(&_query_desc, caption, message, parent, callback);
@@ -1382,7 +1383,7 @@
 	void GenerateFileName()
 	{
 		/* Check if we are not a spectator who wants to generate a name..
-				Let's use the name of player #0 for now. */
+		 * Let's use the name of player #0 for now. */
 		const Player *p = GetPlayer(IsValidPlayerID(_local_player) ? _local_player : PLAYER_FIRST);
 
 		SetDParam(0, p->index);
@@ -1421,7 +1422,7 @@
 		InitializeTextBuffer(&this->text, this->edit_str_buf, lengthof(this->edit_str_buf), 240);
 
 		/* pause is only used in single-player, non-editor mode, non-menu mode. It
-		* will be unpaused in the WE_DESTROY event handler. */
+		 * will be unpaused in the WE_DESTROY event handler. */
 		if (_game_mode != GM_MENU && !_networking && _game_mode != GM_EDITOR) {
 			if (_pause_game >= 0) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
 		}
@@ -1593,7 +1594,7 @@
 	virtual void OnTimeout()
 	{
 		/* This test protects against using widgets 11 and 12 which are only available
-		 * in those two saveload mode  */
+		 * in those two saveload mode */
 		if (!(_saveload_mode == SLD_SAVE_GAME || _saveload_mode == SLD_SAVE_SCENARIO)) return;
 
 		if (this->IsWidgetLowered(11)) { // Delete button clicked