Changeset - r15608:7b580ec7448a
[Not reviewed]
master
! ! !
rubidium - 14 years ago 2010-08-01 18:53:30
rubidium@openttd.org
(svn r20281) -Codechange: unify case scope closure + break coding style
66 files changed with 427 insertions and 215 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_abstractlist.cpp
Show inline comments
 
@@ -808,13 +808,15 @@ SQInteger AIAbstractList::Valuate(HSQUIR
 
		switch (sq_gettype(vm, -1)) {
 
			case OT_INTEGER: {
 
				sq_getinteger(vm, -1, &value);
 
			} break;
 
				break;
 
			}
 

	
 
			case OT_BOOL: {
 
				SQBool v;
 
				sq_getbool(vm, -1, &v);
 
				value = v ? 1 : 0;
 
			} break;
 
				break;
 
			}
 

	
 
			default: {
 
				/* See below for explanation. The extra pop is the return value. */
src/ai/api/ai_engine.cpp
Show inline comments
 
@@ -95,7 +95,7 @@
 
				return capacities[c];
 
			}
 
			return -1;
 
		} break;
 
		}
 

	
 
		case VEH_SHIP:
 
		case VEH_AIRCRAFT:
src/ai/api/ai_event_types.cpp
Show inline comments
 
@@ -56,7 +56,7 @@ int32 AIEventEnginePreview::GetCapacity(
 
				return capacities[c];
 
			}
 
			return -1;
 
		} break;
 
		}
 

	
 
		case VEH_SHIP:
 
		case VEH_AIRCRAFT:
src/airport_gui.cpp
Show inline comments
 
@@ -257,7 +257,8 @@ public:
 
				d.width += padding.width;
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 

	
 
			case BAIRW_AIRPORT_LIST: {
 
				for (int i = 0; i < NUM_AIRPORTS; i++) {
 
@@ -269,7 +270,8 @@ public:
 

	
 
				this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
 
				size->height = this->vscroll.GetCapacity() * this->line_height;
 
			} break;
 
				break;
 
			}
 

	
 
			default: break;
 
		}
 
@@ -356,7 +358,8 @@ public:
 
				if (num_clicked >= this->vscroll.GetCount()) break;
 
				const AirportSpec *as = GetAirportSpecFromClass(_selected_airport_class, num_clicked);
 
				if (as->IsAvailable()) this->SelectOtherAirport(num_clicked);
 
			} break;
 
				break;
 
			}
 

	
 
			case BAIRW_BTN_DONTHILIGHT: case BAIRW_BTN_DOHILIGHT:
 
				_settings_client.gui.station_show_coverage = (widget != BAIRW_BTN_DONTHILIGHT);
src/articulated_vehicles.cpp
Show inline comments
 
@@ -340,7 +340,8 @@ void AddArticulatedParts(Vehicle *first)
 
				}
 

	
 
				t->SetArticulatedPart();
 
			} break;
 
				break;
 
			}
 

	
 
			case VEH_ROAD: {
 
				RoadVehicle *front = RoadVehicle::From(first);
 
@@ -366,7 +367,8 @@ void AddArticulatedParts(Vehicle *first)
 
				}
 

	
 
				rv->SetArticulatedPart();
 
			} break;
 
				break;
 
			}
 
		}
 

	
 
		/* get common values from first engine */
src/autoreplace_gui.cpp
Show inline comments
 
@@ -288,7 +288,8 @@ public:
 
				d.width += padding.width;
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -433,13 +434,15 @@ public:
 
				EngineID veh_to = this->sel_engine[1];
 
				DoCommandP(0, this->sel_group << 16, veh_from + (veh_to << 16), CMD_SET_AUTOREPLACE);
 
				this->SetDirty();
 
			} break;
 
				break;
 
			}
 

	
 
			case RVW_WIDGET_STOP_REPLACE: { // Stop replacing
 
				EngineID veh_from = this->sel_engine[0];
 
				DoCommandP(0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16), CMD_SET_AUTOREPLACE);
 
				this->SetDirty();
 
			} break;
 
				break;
 
			}
 

	
 
			case RVW_WIDGET_LEFT_MATRIX:
 
			case RVW_WIDGET_RIGHT_MATRIX: {
src/blitter/8bpp_optimized.cpp
Show inline comments
 
@@ -88,7 +88,8 @@ void Blitter_8bppOptimized::Draw(Blitter
 
						if (m != 0) *dst = m;
 
						dst++; src++;
 
					} while (--pixels != 0);
 
				} break;
 
					break;
 
				}
 

	
 
				case BM_TRANSPARENT: {
 
					const uint8 *remap = bp->remap;
 
@@ -97,7 +98,8 @@ void Blitter_8bppOptimized::Draw(Blitter
 
						*dst = remap[*dst];
 
						dst++;
 
					} while (--pixels != 0);
 
				} break;
 
					break;
 
				}
 

	
 
				default:
 
					memcpy(dst, src, pixels);
src/bridge_gui.cpp
Show inline comments
 
@@ -254,7 +254,8 @@ public:
 
					this->BuildBridge(i);
 
					delete this;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case BBSW_DROPDOWN_ORDER:
 
				this->bridges->ToggleSortOrder();
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1072,7 +1072,8 @@ struct BuildVehicleWindow : Window {
 
					SetBit(hidden_mask, 9);
 
				}
 
				ShowDropDownMenu(this, _sort_listing[this->vehicle_type], this->sort_criteria, BUILD_VEHICLE_WIDGET_SORT_DROPDOWN, 0, hidden_mask);
 
			} break;
 
				break;
 
			}
 

	
 
			case BUILD_VEHICLE_WIDGET_CARGO_FILTER_DROPDOWN: // Select cargo filtering criteria dropdown menu
 
				ShowDropDownMenu(this, this->cargo_filter_texts, this->cargo_filter_criteria, BUILD_VEHICLE_WIDGET_CARGO_FILTER_DROPDOWN, 0, 0);
src/cheat_gui.cpp
Show inline comments
 
@@ -179,7 +179,8 @@ struct CheatWindow : Window {
 

	
 
					DrawFrameRect(button_left, y + 1, button_left + 20 - 1, y + FONT_HEIGHT_NORMAL - 1, on ? COLOUR_GREEN : COLOUR_RED, on ? FR_LOWERED : FR_NONE);
 
					SetDParam(0, on ? STR_CONFIG_SETTING_ON : STR_CONFIG_SETTING_OFF);
 
				} break;
 
					break;
 
				}
 

	
 
				default: {
 
					int32 val = (int32)ReadValue(ce->variable, ce->type);
 
@@ -198,7 +199,8 @@ struct CheatWindow : Window {
 
							GetString(buf, STR_CHEAT_CHANGE_COMPANY, lastof(buf));
 
							uint offset = 10 + GetStringBoundingBox(buf).width;
 
							DrawCompanyIcon(_local_company, rtl ? text_right - offset - 10 : text_left + offset, y + 2);
 
						} break;
 
							break;
 
						}
 

	
 
						/* Set correct string for switch climate cheat */
 
						case STR_CHEAT_SWITCH_CLIMATE: val += STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE;
 
@@ -206,7 +208,8 @@ struct CheatWindow : Window {
 

	
 
						default: SetDParam(0, val);
 
					}
 
				} break;
 
					break;
 
				}
 
			}
 

	
 
			DrawString(text_left, text_right, y + 1, ce->str);
src/company_cmd.cpp
Show inline comments
 
@@ -826,7 +826,8 @@ CommandCost CmdCompanyCtrl(TileIndex til
 
				}
 
			}
 
#endif /* ENABLE_NETWORK */
 
		} break;
 
			break;
 
		}
 

	
 
		case 1: // Make a new AI company
 
			if (!(flags & DC_EXEC)) return CommandCost();
 
@@ -859,7 +860,8 @@ CommandCost CmdCompanyCtrl(TileIndex til
 
			CompanyID c_index = c->index;
 
			delete c;
 
			AI::BroadcastNewEvent(new AIEventCompanyBankrupt(c_index));
 
		} break;
 
			break;
 
		}
 

	
 
		default: return CMD_ERROR;
 
	}
src/company_gui.cpp
Show inline comments
 
@@ -645,7 +645,8 @@ public:
 
				for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) {
 
					size->width = max(size->width, GetStringBoundingBox(*id).width + 34);
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -1814,7 +1815,8 @@ struct CompanyWindow : Window
 

	
 
					size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_SHARES_OWNED_BY).width);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
#ifdef ENABLE_NETWORK
 
			case CW_WIDGET_HAS_PASSWORD:
 
@@ -1868,7 +1870,8 @@ struct CompanyWindow : Window
 
						}
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case CW_WIDGET_DESC_OWNERS: {
 
				const Company *c2;
 
@@ -1884,7 +1887,8 @@ struct CompanyWindow : Window
 
						y += FONT_HEIGHT_NORMAL;
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
#ifdef ENABLE_NETWORK
 
			case CW_WIDGET_HAS_PASSWORD:
 
@@ -2102,14 +2106,16 @@ struct BuyCompanyWindow : Window {
 
			case BCW_FACE: {
 
				const Company *c = Company::Get((CompanyID)this->window_number);
 
				DrawCompanyManagerFace(c->face, c->colour, r.left, r.top);
 
			} break;
 
				break;
 
			}
 

	
 
			case BCW_QUESTION: {
 
				const Company *c = Company::Get((CompanyID)this->window_number);
 
				SetDParam(0, c->index);
 
				SetDParam(1, c->bankrupt_value);
 
				DrawStringMultiLine(r.left, r.right, r.top, r.bottom, STR_BUY_COMPANY_MESSAGE, TC_FROMSTRING, SA_CENTER);
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/console_cmds.cpp
Show inline comments
 
@@ -300,7 +300,8 @@ DEF_CONSOLE_CMD(ConLoad)
 

	
 
				strecpy(_file_to_saveload.name, FiosBrowseTo(item), lastof(_file_to_saveload.name));
 
				strecpy(_file_to_saveload.title, item->title, lastof(_file_to_saveload.title));
 
			} break;
 
				break;
 
			}
 
			default: IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file);
 
		}
 
	} else {
src/console_gui.cpp
Show inline comments
 
@@ -290,7 +290,8 @@ struct IConsoleWindow : Window
 
				IConsoleClearCommand();
 

	
 
				if (cmd != NULL) IConsoleCmdExec(cmd);
 
			} break;
 
				break;
 
			}
 

	
 
			case WKC_CTRL | WKC_RETURN:
 
				_iconsole_mode = (_iconsole_mode == ICONSOLE_FULL) ? ICONSOLE_OPENED : ICONSOLE_FULL;
src/depot_gui.cpp
Show inline comments
 
@@ -281,7 +281,8 @@ struct DepotWindow : Window {
 
				DrawAircraftImage(v, image_left, image_right,
 
									y + max(spr->height + spr->y_offs - 14, 0), // tall sprites needs an y offset
 
									this->sel);
 
			} break;
 
				break;
 
			}
 
			default: NOT_REACHED();
 
		}
 

	
 
@@ -506,7 +507,8 @@ struct DepotWindow : Window {
 
					}
 
					_cursor.vehchain = _ctrl_pressed;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case MODE_SHOW_VEHICLE: // show info window
 
				ShowVehicleViewWindow(v);
 
@@ -654,7 +656,8 @@ struct DepotWindow : Window {
 
				}
 
				fill->width = resize->width;
 
				fill->height = resize->height;
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -736,7 +739,7 @@ struct DepotWindow : Window {
 
				} else {
 
					ResetObjectToPlace();
 
				}
 
					break;
 
				break;
 

	
 
			case DEPOT_WIDGET_LOCATION:
 
				if (_ctrl_pressed) {
 
@@ -948,7 +951,8 @@ struct DepotWindow : Window {
 
				} else if (this->GetVehicleFromDepotWndPt(pt.x - nwi->pos_x, pt.y - nwi->pos_y, &v, NULL) == MODE_DRAG_VEHICLE && v != NULL && sel == v->index) {
 
					ShowVehicleViewWindow(v);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case DEPOT_WIDGET_SELL: case DEPOT_WIDGET_SELL_CHAIN: {
 
				if (this->IsWidgetDisabled(widget)) return;
 
@@ -970,7 +974,8 @@ struct DepotWindow : Window {
 
				}
 

	
 
				if (!DoCommandP(v->tile, v->index, sell_cmd, GetCmdSellVeh(v->type)) && is_engine) _backup_orders_tile = 0;
 
			} break;
 
				break;
 
			}
 

	
 
			default:
 
				this->sel = INVALID_VEHICLE;
src/fios_gui.cpp
Show inline comments
 
@@ -346,7 +346,8 @@ public:
 
				if (str != STR_ERROR_UNABLE_TO_READ_DRIVE) SetDParam(0, tot);
 
				DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP, str);
 
				DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, path, TC_BLACK);
 
			} break;
 
				break;
 
			}
 

	
 
			case SLWW_DRIVES_DIRECTORIES_LIST: {
 
				GfxFillRect(r.left + 1, r.top + 1, r.right, r.bottom, 0xD7);
 
@@ -362,7 +363,8 @@ public:
 
					y += this->resize.step_height;
 
					if (y >= this->vscroll.GetCapacity() * this->resize.step_height + r.top + WD_FRAMERECT_TOP) break;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case SLWW_DETAILS: {
 
				GfxFillRect(r.left + WD_FRAMERECT_LEFT, r.top + WD_FRAMERECT_TOP,
 
@@ -455,7 +457,8 @@ public:
 
						}
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/genworld_gui.cpp
Show inline comments
 
@@ -515,7 +515,8 @@ struct GenerateLandscapeWindow : public 
 
				 * outer most boundaries (left and right) as draw locations. */
 
				const NWidgetBase *nwi_spacer = this->GetWidget<NWidgetBase>(GLAND_HEIGHTMAP_NAME_SPACER);
 
				DrawString(min(r.left, nwi_spacer->pos_x), max<int>(r.right, nwi_spacer->pos_x + nwi_spacer->current_x), r.top, this->name, TC_ORANGE);
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -1199,7 +1200,8 @@ struct GenerateProgressWindow : public W
 
				/* We need some spacing for the 'border' */
 
				size->height += 8;
 
				size->width += 8;
 
			} break;
 
				break;
 
			}
 

	
 
			case GPWW_PROGRESS_TEXT:
 
				for (uint i = 0; i < GWP_CLASS_COUNT; i++) {
src/graph_gui.cpp
Show inline comments
 
@@ -1002,7 +1002,8 @@ struct PaymentRatesGraphWindow : BaseGra
 
				}
 
				this->UpdateLoweredWidgets();
 
				this->SetDirty();
 
			} break;
 
				break;
 
			}
 

	
 
			default:
 
				if (widget >= CPW_CARGO_FIRST) {
src/group_gui.cpp
Show inline comments
 
@@ -239,7 +239,8 @@ public:
 
				d.height += padding.height;
 
				d.width  += padding.width;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/industry_cmd.cpp
Show inline comments
 
@@ -691,7 +691,8 @@ static void AnimateTile_Industry(TileInd
 
				SetIndustryAnimationState(tile, m);
 
				MarkTileDirtyByTile(tile);
 
			}
 
		} break;
 
			break;
 
		}
 
	}
 
}
 

	
 
@@ -745,7 +746,8 @@ static void MakeIndustryTileBigger(TileI
 
				GetIndustryIndex(tile) == GetIndustryIndex(other)) {
 
			BuildOilRig(tile);
 
		}
 
	} break;
 
		break;
 
	}
 

	
 
	case GFX_TOY_FACTORY:
 
	case GFX_BUBBLE_CATCHER:
src/industry_gui.cpp
Show inline comments
 
@@ -329,7 +329,8 @@ public:
 
				/* Set it to something more sane :) */
 
				size->height = height * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
 
				size->width  = d.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
 
			} break;
 
				break;
 
			}
 

	
 
			case DPIW_FUND_WIDGET: {
 
				Dimension d = GetStringBoundingBox(STR_FUND_INDUSTRY_BUILD_NEW_INDUSTRY);
 
@@ -445,7 +446,8 @@ public:
 
						}
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -478,7 +480,8 @@ public:
 
					this->SetWidgetsDisabledState(!this->enabled[this->selected_index], DPIW_DISPLAY_WIDGET, DPIW_FUND_WIDGET, WIDGET_LIST_END);
 
					if (this->enabled[this->selected_index] && click_count > 1) this->OnClick(pt, DPIW_FUND_WIDGET, 1);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case DPIW_DISPLAY_WIDGET:
 
				if (this->selected_type != INVALID_INDUSTRYTYPE) ShowIndustryCargoesWindow(this->selected_type);
 
@@ -502,7 +505,8 @@ public:
 
				} else {
 
					HandlePlacePushButton(this, DPIW_FUND_WIDGET, SPR_CURSOR_INDUSTRY, HT_RECT, NULL);
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -803,7 +807,8 @@ public:
 
						ShowQueryString(STR_JUST_INT, STR_CONFIG_GAME_PRODUCTION, 10, 100, this, CS_ALPHANUMERAL, QSF_NONE);
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case IVW_GOTO: {
 
				Industry *i = Industry::Get(this->window_number);
 
@@ -1138,7 +1143,8 @@ public:
 
					y += this->resize.step_height;
 
					if (++n == this->vscroll.GetCapacity()) break; // max number of industries in 1 window
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -1200,7 +1206,8 @@ public:
 
						ScrollMainWindowToTile(this->industries[p]->location.tile);
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/landscape.cpp
Show inline comments
 
@@ -901,7 +901,8 @@ void GenerateLandscape(byte mode)
 
				for (uint i = ScaleByMapSize(GB(r, 9, 7) + 450); i != 0; --i) {
 
					GenerateTerrain(4, flag);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case LT_TROPIC: {
 
				uint32 r = Random();
 
@@ -920,7 +921,8 @@ void GenerateLandscape(byte mode)
 
				for (uint i = ScaleByMapSize(GB(r, 17, 7) + 410); i != 0; --i) {
 
					GenerateTerrain(3, flag);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			default: {
 
				uint32 r = Random();
 
@@ -929,7 +931,8 @@ void GenerateLandscape(byte mode)
 
				for (; i != 0; --i) {
 
					GenerateTerrain(_settings_game.difficulty.terrain_type, 0);
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/main_gui.cpp
Show inline comments
 
@@ -74,7 +74,8 @@ void HandleOnEditText(const char *str)
 

	
 
		/* Give 'id' the money, and substract it from ourself */
 
		DoCommandP(0, money_c, _rename_id, CMD_GIVE_MONEY | CMD_MSG(STR_ERROR_INSUFFICIENT_FUNDS), CcGiveMoney, str);
 
	} break;
 
		break;
 
	}
 
#endif /* ENABLE_NETWORK */
 
		default: NOT_REACHED();
 
	}
src/misc_gui.cpp
Show inline comments
 
@@ -1363,7 +1363,8 @@ struct QueryStringWindow : public QueryS
 
			case HEBR_EDITING: {
 
				Window *osk = FindWindowById(WC_OSK, 0);
 
				if (osk != NULL && osk->parent == this) osk->InvalidateData();
 
			} break;
 
				break;
 
			}
 
			case HEBR_CONFIRM: this->OnOk();
 
			/* FALL THROUGH */
 
			case HEBR_CANCEL: delete this; break; // close window, abandon changes
 
@@ -1515,7 +1516,8 @@ struct QueryWindow : public Window {
 
					proc(parent, true);
 
					proc = NULL;
 
				}
 
			} break;
 
				break;
 
			}
 
			case QUERY_WIDGET_NO:
 
				delete this;
 
				break;
src/music_gui.cpp
Show inline comments
 
@@ -334,7 +334,8 @@ struct MusicTrackSelectionWindow : publi
 
				d.width += padding.width;
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 

	
 
			case MTSW_LIST_LEFT: case MTSW_LIST_RIGHT: {
 
				Dimension d = {0, 0};
 
@@ -353,7 +354,8 @@ struct MusicTrackSelectionWindow : publi
 
				d.width += padding.width;
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -374,7 +376,8 @@ struct MusicTrackSelectionWindow : publi
 
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_PLAYLIST_TRACK_NAME);
 
					y += FONT_HEIGHT_SMALL;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case MTSW_LIST_RIGHT: {
 
				GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, 0);
 
@@ -388,7 +391,8 @@ struct MusicTrackSelectionWindow : publi
 
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_PLAYLIST_TRACK_NAME);
 
					y += FONT_HEIGHT_SMALL;
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -422,7 +426,8 @@ struct MusicTrackSelectionWindow : publi
 
						break;
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case MTSW_LIST_RIGHT: { // remove from playlist
 
				int y = this->GetRowFromWidget(pt.y, widget, 0, FONT_HEIGHT_SMALL);
 
@@ -437,7 +442,8 @@ struct MusicTrackSelectionWindow : publi
 

	
 
				this->SetDirty();
 
				SelectSongToPlay();
 
			} break;
 
				break;
 
			}
 

	
 
			case MTSW_CLEAR: // clear
 
				for (uint i = 0; _playlists[msf.playlist][i] != 0; i++) _playlists[msf.playlist][i] = 0;
 
@@ -549,14 +555,16 @@ struct MusicWindow : public Window {
 
				d.width += padding.width;
 
				d.height += padding.height;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 

	
 
			case MW_TRACK_NR: {
 
				Dimension d = GetStringBoundingBox(STR_MUSIC_TRACK_NONE);
 
				d.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
 
				d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 

	
 
			case MW_TRACK_NAME: {
 
				Dimension d = GetStringBoundingBox(STR_MUSIC_TITLE_NONE);
 
@@ -567,7 +575,8 @@ struct MusicWindow : public Window {
 
				d.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
 
				d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 

	
 
			/* Hack-ish: set the proper widget data; only needs to be done once
 
			 * per (Re)Init as that's the only time the language changes. */
 
@@ -604,7 +613,8 @@ struct MusicWindow : public Window {
 
					str = STR_MUSIC_TRACK_DIGIT;
 
				}
 
				DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, str);
 
			} break;
 
				break;
 
			}
 

	
 
			case MW_TRACK_NAME: {
 
				GfxFillRect(r.left, r.top + 1, r.right - 1, r.bottom, 0);
 
@@ -614,7 +624,8 @@ struct MusicWindow : public Window {
 
					SetDParamStr(0, GetSongName(_music_wnd_cursong - 1));
 
				}
 
				DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_FROMSTRING, SA_HOR_CENTER);
 
			} break;
 
				break;
 
			}
 

	
 
			case MW_MUSIC_VOL: case MW_EFFECT_VOL: {
 
				DrawFrameRect(r.left, r.top + 2, r.right, r.bottom - 2, COLOUR_GREY, FR_LOWERED);
 
@@ -626,7 +637,8 @@ struct MusicWindow : public Window {
 
					x += r.left;
 
				}
 
				DrawFrameRect(x, r.top, x + slider_width, r.bottom, COLOUR_GREY, FR_NONE);
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -680,7 +692,8 @@ struct MusicWindow : public Window {
 
				}
 

	
 
				_left_button_clicked = false;
 
			} break;
 
				break;
 
			}
 

	
 
			case MW_SHUFFLE: // toggle shuffle
 
				msf.shuffle ^= 1;
src/network/network.cpp
Show inline comments
 
@@ -389,7 +389,8 @@ void NetworkHandlePauseChange(PauseMode 
 
			char buffer[DRAW_STRING_BUFFER];
 
			GetString(buffer, str, lastof(buffer));
 
			NetworkTextMessage(NETWORK_ACTION_SERVER_MESSAGE, CC_DEFAULT, false, NULL, buffer);
 
		} break;
 
			break;
 
		}
 

	
 
		default:
 
			return;
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -507,7 +507,8 @@ struct NetworkChatWindow : public QueryS
 
				case HEBR_EDITING: {
 
					Window *osk = FindWindowById(WC_OSK, 0);
 
					if (osk != NULL && osk->parent == this) osk->InvalidateData();
 
				} break;
 
					break;
 
				}
 
				case HEBR_CONFIRM:
 
					SendChat(this->text.buf, this->dtype, this->dest);
 
					/* FALL THROUGH */
src/network/network_client.cpp
Show inline comments
 
@@ -789,7 +789,8 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER
 

	
 
				GetString(name, str, lastof(name));
 
				ci = NetworkFindClientInfoFromClientID(_network_own_client_id);
 
			} break;
 
				break;
 
			}
 

	
 
			default: return NETWORK_RECV_STATUS_MALFORMED_PACKET;
 
		}
src/network/network_content_gui.cpp
Show inline comments
 
@@ -603,7 +603,8 @@ public:
 
				}
 

	
 
				this->InvalidateData();
 
			} break;
 
				break;
 
			}
 

	
 
			case NCLWW_CHECKBOX:
 
			case NCLWW_TYPE:
src/network/network_gui.cpp
Show inline comments
 
@@ -540,7 +540,8 @@ public:
 
					this->DrawServerLine(ngl, y, ngl == this->server);
 
					y += this->resize.step_height;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case NGWW_LASTJOINED:
 
				/* Draw the last joined server, if any */
 
@@ -696,7 +697,8 @@ public:
 

	
 
				/* FIXME the disabling should go into some InvalidateData, which is called instead of the SetDirty */
 
				if (click_count > 1 && !this->IsWidgetDisabled(NGWW_JOIN)) this->OnClick(pt, NGWW_JOIN, 1);
 
			} break;
 
				break;
 
			}
 

	
 
			case NGWW_LASTJOINED: {
 
				NetworkGameList *last_joined = NetworkGameListAddItem(NetworkAddress(_settings_client.network.last_host, _settings_client.network.last_port));
 
@@ -716,7 +718,8 @@ public:
 
					/* FIXME the disabling should go into some InvalidateData, which is called instead of the SetDirty */
 
					if (click_count > 1 && !this->IsWidgetDisabled(NGWW_JOIN)) this->OnClick(pt, NGWW_JOIN, 1);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case NGWW_FIND: // Find server automatically
 
				switch (_settings_client.network.lan_internet) {
 
@@ -1171,7 +1174,8 @@ struct NetworkStartServerWindow : public
 

	
 
				this->map = (y == 0) ? NULL : _fios_items.Get(y - 1);
 
				this->SetDirty();
 
			} break;
 
				break;
 
			}
 

	
 
			case NSSW_CONNTYPE_BTN: // Connection type
 
				ShowDropDownMenu(this, _connection_types_dropdown, _settings_client.network.server_advertise, NSSW_CONNTYPE_BTN, 0, 0); // do it for widget NSSW_CONNTYPE_BTN
 
@@ -1227,7 +1231,8 @@ struct NetworkStartServerWindow : public
 
					}
 
				}
 
				ShowDropDownMenu(this, _language_dropdown, sel, NSSW_LANGUAGE_BTN, 0, 0);
 
			} break;
 
				break;
 
			}
 

	
 
			case NSSW_START: // Start game
 
				_is_network_server = true;
 
@@ -1631,7 +1636,8 @@ struct NetworkLobbyWindow : public Windo
 

	
 
				/* FIXME the disabling should go into some InvalidateData, which is called instead of the SetDirty */
 
				if (click_count > 1 && !this->IsWidgetDisabled(NLWW_JOIN)) this->OnClick(pt, NLWW_JOIN, 1);
 
			} break;
 
				break;
 
			}
 

	
 
			case NLWW_JOIN:     // Join company
 
				/* Button can be clicked only when it is enabled */
src/newgrf.cpp
Show inline comments
 
@@ -543,7 +543,8 @@ static ChangeInfoResult RailVehicleChang
 
						grfmsg(1, "RailVehicleChangeInfo: Invalid track type %d specified, ignoring", tracktype);
 
						break;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x08: // AI passenger service
 
				/* Tells the AI that this engine is designed for
 
@@ -556,7 +557,8 @@ static ChangeInfoResult RailVehicleChang
 
				if (speed == 0xFFFF) speed = 0;
 

	
 
				rvi->max_speed = speed;
 
			} break;
 
				break;
 
			}
 

	
 
			case PROP_TRAIN_POWER: // 0x0B Power
 
				rvi->power = buf->ReadWord();
 
@@ -587,7 +589,8 @@ static ChangeInfoResult RailVehicleChang
 
				if (spriteid < 0xFD) spriteid >>= 1;
 

	
 
				rvi->image_index = spriteid;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x13: { // Dual-headed
 
				uint8 dual = buf->ReadByte();
 
@@ -598,7 +601,8 @@ static ChangeInfoResult RailVehicleChang
 
					rvi->railveh_type = rvi->power == 0 ?
 
						RAILVEH_WAGON : RAILVEH_SINGLEHEAD;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case PROP_TRAIN_CARGO_CAPACITY: // 0x14 Cargo capacity
 
				rvi->capacity = buf->ReadByte();
 
@@ -616,7 +620,8 @@ static ChangeInfoResult RailVehicleChang
 
					ei->cargo_type = CT_INVALID;
 
					grfmsg(2, "RailVehicleChangeInfo: Invalid cargo type %d, using first refittable", ctype);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case PROP_TRAIN_WEIGHT: // 0x16 Weight
 
				SB(rvi->weight, 0, 8, buf->ReadByte());
 
@@ -664,7 +669,8 @@ static ChangeInfoResult RailVehicleChang
 
				}
 

	
 
				rvi->engclass = engclass;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x1A: // Alter purchase list sort order
 
				AlterVehicleListOrder(e->index, buf->ReadExtendedByte());
 
@@ -718,7 +724,8 @@ static ChangeInfoResult RailVehicleChang
 
				} else {
 
					SB(rvi->weight, 8, 8, weight);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case PROP_TRAIN_USER_DATA: // 0x25 User-defined bit mask to set when checking veh. var. 42
 
				rvi->user_def_data = buf->ReadByte();
 
@@ -787,7 +794,8 @@ static ChangeInfoResult RoadVehicleChang
 
				if (spriteid < 0xFD) spriteid >>= 1;
 

	
 
				rvi->image_index = spriteid;
 
			} break;
 
				break;
 
			}
 

	
 
			case PROP_ROADVEH_CARGO_CAPACITY: // 0x0F Cargo capacity
 
				rvi->capacity = buf->ReadByte();
 
@@ -804,7 +812,8 @@ static ChangeInfoResult RoadVehicleChang
 
					ei->cargo_type = CT_INVALID;
 
					grfmsg(2, "RoadVehicleChangeInfo: Invalid cargo type %d, using first refittable", cargo);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case PROP_ROADVEH_COST_FACTOR: // 0x11 Cost factor
 
				rvi->cost_factor = buf->ReadByte();
 
@@ -902,7 +911,8 @@ static ChangeInfoResult ShipVehicleChang
 
				if (spriteid < 0xFD) spriteid >>= 1;
 

	
 
				svi->image_index = spriteid;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: // Refittable
 
				svi->old_refittable = (buf->ReadByte() != 0);
 
@@ -927,7 +937,8 @@ static ChangeInfoResult ShipVehicleChang
 
					ei->cargo_type = CT_INVALID;
 
					grfmsg(2, "ShipVehicleChangeInfo: Invalid cargo type %d, using first refittable", cargo);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case PROP_SHIP_CARGO_CAPACITY: // 0x0D Cargo capacity
 
				svi->capacity = buf->ReadWord();
 
@@ -1016,7 +1027,8 @@ static ChangeInfoResult AircraftVehicleC
 
				if (spriteid < 0xFD) spriteid >>= 1;
 

	
 
				avi->image_index = spriteid;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: // Helicopter
 
				if (buf->ReadByte() == 0) {
 
@@ -1138,7 +1150,8 @@ static ChangeInfoResult StationChangeInf
 
				/* Swap classid because we read it in BE meaning WAYP or DFLT */
 
				uint32 classid = buf->ReadDWord();
 
				(*spec)->sclass = AllocateStationClass(BSWAP32(classid));
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: // Define sprite layout
 
				statspec->tiles = buf->ReadExtendedByte();
 
@@ -1200,7 +1213,8 @@ static ChangeInfoResult StationChangeInf
 
				statspec->tiles = srcstatspec->tiles;
 
				statspec->renderdata = srcstatspec->renderdata;
 
				statspec->copied_renderdata = true;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0B: // Callback mask
 
				statspec->callback_mask = buf->ReadByte();
 
@@ -1279,7 +1293,8 @@ static ChangeInfoResult StationChangeInf
 
				statspec->platforms = srcstatspec->platforms;
 
				statspec->layouts   = srcstatspec->layouts;
 
				statspec->copied_layouts = true;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x10: // Little/lots cargo threshold
 
				statspec->cargo_threshold = buf->ReadWord();
 
@@ -1423,7 +1438,8 @@ static ChangeInfoResult BridgeChangeInfo
 
						MapSpriteMappingRecolour(&bridge->sprite_table[tableid][sprite]);
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0E: // Flags; bit 0 - disable far pillars
 
				bridge->flags = buf->ReadByte();
 
@@ -1436,13 +1452,15 @@ static ChangeInfoResult BridgeChangeInfo
 
			case 0x10: { // purchase string
 
				StringID newone = GetGRFStringID(_cur_grffile->grfid, buf->ReadWord());
 
				if (newone != STR_UNDEFINED) bridge->material = newone;
 
				} break;
 
				break;
 
			}
 

	
 
			case 0x11: // description of bridge with rails or roads
 
			case 0x12: {
 
				StringID newone = GetGRFStringID(_cur_grffile->grfid, buf->ReadWord());
 
				if (newone != STR_UNDEFINED) bridge->transport_name[prop - 0x11] = newone;
 
				} break;
 
				break;
 
			}
 

	
 
			case 0x13: // 16 bits cost multiplier
 
				bridge->price = buf->ReadWord();
 
@@ -1503,7 +1521,8 @@ static ChangeInfoResult IgnoreTownHouseP
 
			byte count = buf->ReadByte();
 
			for (byte j = 0; j < count; j++) buf->ReadByte();
 
			ret = CIR_UNHANDLED;
 
		} break;
 
			break;
 
		}
 

	
 
		default:
 
			ret = CIR_UNKNOWN;
 
@@ -1584,7 +1603,8 @@ static ChangeInfoResult TownHouseChangeI
 
				if (housespec->min_year < 1930) housespec->min_year = 1930;
 

	
 
				_loaded_newgrf_features.has_newhouses = true;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: // Building flags
 
				housespec->building_flags = (BuildingFlags)buf->ReadByte();
 
@@ -1594,7 +1614,8 @@ static ChangeInfoResult TownHouseChangeI
 
				uint16 years = buf->ReadWord();
 
				housespec->min_year = GB(years, 0, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 0, 8);
 
				housespec->max_year = GB(years, 8, 8) > 150 ? MAX_YEAR : ORIGINAL_BASE_YEAR + GB(years, 8, 8);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0B: // Population
 
				housespec->population = buf->ReadByte();
 
@@ -1622,7 +1643,8 @@ static ChangeInfoResult TownHouseChangeI
 

	
 
				housespec->accepts_cargo[2] = cid;
 
				housespec->cargo_acceptance[2] = abs(goods); // but we do need positive value here
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x10: // Local authority rating decrease on removal
 
				housespec->remove_rating_decrease = buf->ReadWord();
 
@@ -1655,7 +1677,8 @@ static ChangeInfoResult TownHouseChangeI
 
				}
 

	
 
				_house_mngr.Add(hid + i, _cur_grffile->grfid, override);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x16: // Periodic refresh multiplier
 
				housespec->processing_time = buf->ReadByte();
 
@@ -1707,7 +1730,8 @@ static ChangeInfoResult TownHouseChangeI
 
						housespec->accepts_cargo[j] = cargo;
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x1F: // Minimum life span
 
				housespec->minimum_life = buf->ReadByte();
 
@@ -1717,7 +1741,8 @@ static ChangeInfoResult TownHouseChangeI
 
				byte count = buf->ReadByte();
 
				for (byte j = 0; j < count; j++) buf->ReadByte();
 
				ret = CIR_UNHANDLED;
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x21: // long introduction year
 
				housespec->min_year = buf->ReadWord();
 
@@ -1751,7 +1776,8 @@ static ChangeInfoResult GlobalVarChangeI
 
				} else {
 
					grfmsg(1, "GlobalVarChangeInfo: Price %d out of range, ignoring", price);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: // Cargo translation table
 
				/* This is loaded during the reservation stage, so just skip it here. */
 
@@ -1766,7 +1792,8 @@ static ChangeInfoResult GlobalVarChangeI
 
				if ((newone != STR_UNDEFINED) && (curidx < NUM_CURRENCY)) {
 
					_currency_specs[curidx].name = newone;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0B: { // Currency multipliers
 
				uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
 
@@ -1780,7 +1807,8 @@ static ChangeInfoResult GlobalVarChangeI
 
				} else {
 
					grfmsg(1, "GlobalVarChangeInfo: Currency multipliers %d out of range, ignoring", curidx);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0C: { // Currency options
 
				uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
 
@@ -1795,7 +1823,8 @@ static ChangeInfoResult GlobalVarChangeI
 
				} else {
 
					grfmsg(1, "GlobalVarChangeInfo: Currency option %d out of range, ignoring", curidx);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0D: { // Currency prefix symbol
 
				uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
 
@@ -1807,7 +1836,8 @@ static ChangeInfoResult GlobalVarChangeI
 
				} else {
 
					grfmsg(1, "GlobalVarChangeInfo: Currency symbol %d out of range, ignoring", curidx);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0E: { // Currency suffix symbol
 
				uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
 
@@ -1819,7 +1849,8 @@ static ChangeInfoResult GlobalVarChangeI
 
				} else {
 
					grfmsg(1, "GlobalVarChangeInfo: Currency symbol %d out of range, ignoring", curidx);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0F: { //  Euro introduction dates
 
				uint curidx = GetNewgrfCurrencyIdConverted(gvid + i);
 
@@ -1830,7 +1861,8 @@ static ChangeInfoResult GlobalVarChangeI
 
				} else {
 
					grfmsg(1, "GlobalVarChangeInfo: Euro intro date %d out of range, ignoring", curidx);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x10: // Snow line height table
 
				if (numinfo > 1 || IsSnowLineSet()) {
 
@@ -2051,7 +2083,8 @@ static ChangeInfoResult CargoChangeInfo(
 
						grfmsg(1, "CargoChangeInfo: Unknown town growth substitute value %d, setting to none.", substitute_type);
 
					case 0xFF: cs->town_effect = TE_NONE; break;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x19: // Town growth coefficient
 
				cs->multipliertowngrowth = buf->ReadWord();
 
@@ -2108,7 +2141,8 @@ static ChangeInfoResult SoundEffectChang
 
					/* Literally copy the data of the new sound over the original */
 
					*old_sound = *sound;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			default:
 
				ret = CIR_UNKNOWN;
 
@@ -2200,7 +2234,8 @@ static ChangeInfoResult IndustrytilesCha
 
					tsp->grf_prop.grffile = _cur_grffile;
 
					_industile_mngr.AddEntityID(indtid + i, _cur_grffile->grfid, subs_id); // pre-reserve the tile slot
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: { // Industry tile override
 
				byte ovrid = buf->ReadByte();
 
@@ -2212,7 +2247,8 @@ static ChangeInfoResult IndustrytilesCha
 
				}
 

	
 
				_industile_mngr.Add(indtid + i, _cur_grffile->grfid, ovrid);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0A: // Tile acceptance
 
			case 0x0B:
 
@@ -2220,7 +2256,8 @@ static ChangeInfoResult IndustrytilesCha
 
				uint16 acctp = buf->ReadWord();
 
				tsp->accepts_cargo[prop - 0x0A] = GetCargoTranslation(GB(acctp, 0, 8), _cur_grffile);
 
				tsp->acceptance[prop - 0x0A] = GB(acctp, 8, 8);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0D: // Land shape flags
 
				tsp->slopes_refused = (Slope)buf->ReadByte();
 
@@ -2311,7 +2348,8 @@ static ChangeInfoResult IgnoreIndustryPr
 
					if (gfx == 0xFE) buf->ReadWord();
 
				}
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		case 0x11:
 
		case 0x16:
 
@@ -2323,7 +2361,8 @@ static ChangeInfoResult IgnoreIndustryPr
 
			for (uint8 j = 0; j < number_of_sounds; j++) {
 
				buf->ReadByte();
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		default:
 
			ret = CIR_UNKNOWN;
 
@@ -2408,7 +2447,8 @@ static ChangeInfoResult IndustriesChange
 
					 * rely on callbacks, not on the original placement functions */
 
					indsp->check_proc = CHECK_NOTHING;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: { // Industry type override
 
				byte ovrid = buf->ReadByte();
 
@@ -2420,7 +2460,8 @@ static ChangeInfoResult IndustriesChange
 
				}
 
				indsp->grf_prop.override = ovrid;
 
				_industry_mngr.Add(indid + i, _cur_grffile->grfid, ovrid);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0A: { // Set industry layout(s)
 
				indsp->num_table = buf->ReadByte(); // Number of layaouts
 
@@ -2519,7 +2560,8 @@ static ChangeInfoResult IndustriesChange
 
				indsp->table = tile_table;
 
				SetBit(indsp->cleanup_flag, 1);
 
				free(itt);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0B: // Industry production flags
 
				indsp->life_type = (IndustryLifeType)buf->ReadByte();
 
@@ -2581,7 +2623,8 @@ static ChangeInfoResult IndustriesChange
 

	
 
				indsp->random_sounds = sounds;
 
				SetBit(indsp->cleanup_flag, 0);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x16: // Conflicting industry types
 
				for (byte j = 0; j < 3; j++) indsp->conflicting[j] = buf->ReadByte();
 
@@ -2614,7 +2657,8 @@ static ChangeInfoResult IndustriesChange
 
					uint32 multiples = buf->ReadDWord();
 
					indsp->input_cargo_multiplier[prop - 0x1C][0] = GB(multiples, 0, 16);
 
					indsp->input_cargo_multiplier[prop - 0x1C][1] = GB(multiples, 16, 16);
 
				} break;
 
					break;
 
				}
 

	
 
			case 0x1F: // Industry name
 
				indsp->name = buf->ReadWord();
 
@@ -2629,7 +2673,8 @@ static ChangeInfoResult IndustriesChange
 
			case 0x22: { // Callback additional mask
 
				byte aflag = buf->ReadByte();
 
				SB(indsp->callback_mask, (prop - 0x21) * 8, 8, aflag);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x23: // removal cost multiplier
 
				indsp->removal_cost_multiplier = buf->ReadDWord();
 
@@ -2729,7 +2774,8 @@ static ChangeInfoResult AirportChangeInf
 
					/* Create a copy of the original tiletable so it can be freed later. */
 
					DuplicateTileTable(as);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0C:
 
				as->min_year = buf->ReadWord();
 
@@ -2975,7 +3021,8 @@ static ChangeInfoResult AirportTilesChan
 
					tsp->grf_prop.grffile = _cur_grffile;
 
					_airporttile_mngr.AddEntityID(airtid + i, _cur_grffile->grfid, subs_id); // pre-reserve the tile slot
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x09: { // Airport tile override
 
				byte override = buf->ReadByte();
 
@@ -2987,7 +3034,8 @@ static ChangeInfoResult AirportTilesChan
 
				}
 

	
 
				_airporttile_mngr.Add(airtid + i, _cur_grffile->grfid, override);
 
			} break;
 
				break;
 
			}
 

	
 
			case 0x0E: // Callback flags
 
				tsp->callback_flags = buf->ReadByte();
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -415,7 +415,8 @@ struct NewGRFInspectWindow : Window {
 
			case NIW_PARENT: {
 
				uint index = GetFeatureHelper(this->window_number)->GetParent(GetFeatureIndex(this->window_number));
 
				::ShowNewGRFInspectWindow((GrfSpecFeature)GB(index, 24, 8), GetFeatureIndex(index));
 
			} break;
 
				break;
 
			}
 

	
 
			case NIW_MAINPANEL: {
 
				/* Does this feature have variables? */
 
@@ -580,7 +581,8 @@ struct SpriteAlignerWindow : Window {
 
				const Sprite *spr = GetSprite(this->current_sprite, ST_NORMAL);
 
				SetDParam(0, spr->x_offs);
 
				SetDParam(1, spr->y_offs);
 
			} break;
 
				break;
 
			}
 

	
 
			default:
 
				break;
 
@@ -711,7 +713,8 @@ struct SpriteAlignerWindow : Window {
 
				/* Ofcourse, we need to redraw the sprite, but where is it used?
 
				 * Everywhere is a safe bet. */
 
				MarkWholeScreenDirty();
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/newgrf_engine.cpp
Show inline comments
 
@@ -396,7 +396,8 @@ static inline const Vehicle *GRV(const R
 
						}
 
					}
 
					if (v == NULL) v = self;
 
				} break;
 
					break;
 
				}
 
			}
 
			uint32 count = GB(object->count, 0, 4);
 
			if (count == 0) count = GetRegister(0x100);
 
@@ -793,7 +794,8 @@ static uint32 VehicleGetVariable(const R
 
				case 0x7D: return GB(t->First()->index, 8, 8);
 
				case 0x7F: return 0; // Used for vehicle reversing hack in TTDP
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		case VEH_ROAD: {
 
			RoadVehicle *rv = RoadVehicle::From(v);
 
@@ -806,7 +808,8 @@ static uint32 VehicleGetVariable(const R
 
				case 0x68: return rv->crashed_ctr;
 
				case 0x69: return GB(rv->crashed_ctr, 8, 8);
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		case VEH_AIRCRAFT: {
 
			Aircraft *a = Aircraft::From(v);
 
@@ -815,7 +818,8 @@ static uint32 VehicleGetVariable(const R
 
				case 0x63: return a->targetairport;             // Airport to which the action refers
 
				case 0x66: return MapAircraftMovementAction(a); // Current movement action
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		default: break;
 
	}
src/newgrf_gui.cpp
Show inline comments
 
@@ -620,7 +620,8 @@ struct NewGRFWindow : public QueryString
 
						y += step_height;
 
					}
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case SNGRFS_AVAIL_LIST: {
 
				GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, 0xD7);
src/newgrf_text.cpp
Show inline comments
 
@@ -287,7 +287,8 @@ char *TranslateTTDPatchCodes(uint32 grfi
 
						tmp        |= ((uint8)*str++) << 8;
 
						d += Utf8Encode(d, SCC_NEWGRF_PUSH_WORD);
 
						d += Utf8Encode(d, tmp);
 
					} break;
 
						break;
 
					}
 
					case 4:
 
						d += Utf8Encode(d, SCC_NEWGRF_UNPRINT);
 
						d += Utf8Encode(d, *str++);
src/openttd.cpp
Show inline comments
 
@@ -507,7 +507,8 @@ int ttd_main(int argc, char *argv[])
 
				CreateConsole();
 
#endif
 
				if (mgo.opt != NULL) SetDebugString(mgo.opt);
 
			} break;
 
				break;
 
			}
 
		case 'e': _switch_mode = SM_EDITOR; break;
 
		case 'i':
 
			/* there is an argument, it is not empty, and it is exactly 1 char long */
src/order_cmd.cpp
Show inline comments
 
@@ -625,7 +625,8 @@ CommandCost CmdInsertOrder(TileIndex til
 
					if (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) return CMD_ERROR;
 
					break;
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		default: return CMD_ERROR;
 
	}
 
@@ -1081,7 +1082,8 @@ CommandCost CmdModifyOrder(TileIndex til
 
					default:
 
						NOT_REACHED();
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case MOF_COND_VARIABLE: {
 
				order->SetConditionVariable((OrderConditionVariable)data);
 
@@ -1105,7 +1107,8 @@ CommandCost CmdModifyOrder(TileIndex til
 
						if (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) order->SetConditionComparator(OCC_EQUALS);
 
						break;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case MOF_COND_COMPARATOR:
 
				order->SetConditionComparator((OrderConditionComparator)data);
 
@@ -1209,7 +1212,8 @@ CommandCost CmdCloneOrder(TileIndex tile
 

	
 
				InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		case CO_COPY: {
 
			Vehicle *src = Vehicle::GetIfValid(veh_src);
 
@@ -1264,7 +1268,8 @@ CommandCost CmdCloneOrder(TileIndex tile
 

	
 
				InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		case CO_UNSHARE: return DecloneOrder(dst, flags);
 
		default: return CMD_ERROR;
src/order_gui.cpp
Show inline comments
 
@@ -230,7 +230,8 @@ void DrawOrderString(const Vehicle *v, c
 
					SetDParam(5, order->GetStopLocation() + STR_ORDER_STOP_LOCATION_NEAR_END);
 
				}
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		case OT_GOTO_DEPOT:
 
			if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
 
@@ -812,7 +813,8 @@ public:
 

	
 
				/* Moving selected order */
 
				this->selected_order = to;
 
			} break;
 
				break;
 
			}
 
		}
 

	
 
		this->vscroll.SetCount(this->vehicle->GetNumOrders() + 1);
 
@@ -1069,7 +1071,8 @@ public:
 
				}
 

	
 
				this->UpdateButtonState();
 
			} break;
 
				break;
 
			}
 

	
 
			case ORDER_WIDGET_SKIP:
 
				this->OrderClick_Skip(0);
 
@@ -1136,7 +1139,8 @@ public:
 
			case ORDER_WIDGET_COND_COMPARATOR: {
 
				const Order *o = this->vehicle->GetOrder(this->OrderGetSel());
 
				ShowDropDownMenu(this, _order_conditional_condition, o->GetConditionComparator(), ORDER_WIDGET_COND_COMPARATOR, 0, (o->GetConditionVariable() == OCV_REQUIRES_SERVICE) ? 0x3F : 0xC0);
 
			} break;
 
				break;
 
			}
 

	
 
			case ORDER_WIDGET_COND_VALUE: {
 
				const Order *order = this->vehicle->GetOrder(this->OrderGetSel());
 
@@ -1144,7 +1148,8 @@ public:
 
				if (order->GetConditionVariable() == OCV_MAX_SPEED) value = ConvertSpeedToDisplaySpeed(value);
 
				SetDParam(0, value);
 
				ShowQueryString(STR_JUST_INT, STR_ORDER_CONDITIONAL_VALUE_CAPT, 5, 100, this, CS_NUMERAL, QSF_NONE);
 
			} break;
 
				break;
 
			}
 

	
 
			case ORDER_WIDGET_SHARED_ORDER_LIST:
 
				ShowVehicleListWindow(this->vehicle);
 
@@ -1224,7 +1229,8 @@ public:
 
					this->selected_order = -1;
 
					this->UpdateButtonState();
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case ORDER_WIDGET_DELETE:
 
				this->OrderClick_Delete(0);
src/pathfinder/npf/npf.cpp
Show inline comments
 
@@ -363,7 +363,8 @@ static int32 NPFRoadPathCost(AyStar *as,
 
				/* Increase cost for filled road stops */
 
				cost += _settings_game.pf.npf.npf_road_bay_occupied_penalty * (!rs->IsFreeBay(0) + !rs->IsFreeBay(1)) / 2;
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		default:
 
			break;
src/pathfinder/yapf/yapf_road.cpp
Show inline comments
 
@@ -81,7 +81,8 @@ protected:
 
						/* Increase cost for filled road stops */
 
						cost += Yapf().PfGetSettings().road_stop_bay_occupied_penalty * (!rs->IsFreeBay(0) + !rs->IsFreeBay(1)) / 2;
 
					}
 
				} break;
 
					break;
 
				}
 

	
 
				default:
 
					break;
src/rail_cmd.cpp
Show inline comments
 
@@ -1547,7 +1547,8 @@ CommandCost CmdConvertRail(TileIndex til
 
					}
 

	
 
					cost.AddCost((GetTunnelBridgeLength(tile, endtile) + 2) * RailConvertCost(type, totype));
 
				} break;
 
					break;
 
				}
 

	
 
				default: // MP_STATION, MP_ROAD
 
					if (flags & DC_EXEC) {
src/rail_gui.cpp
Show inline comments
 
@@ -1313,7 +1313,8 @@ public:
 
				SndPlayFx(SND_15_BEEP);
 
				this->SetDirty();
 
				DeleteWindowById(WC_SELECT_STATION, 0);
 
			} break;
 
				break;
 
			}
 

	
 
			case BRSW_HIGHLIGHT_OFF:
 
			case BRSW_HIGHLIGHT_ON:
src/road.cpp
Show inline comments
 
@@ -66,7 +66,8 @@ RoadBits CleanUpRoadBits(const TileIndex
 
					connective = (neighbor_rb & mirrored_rb) || // Neighbor has got the fitting RoadBit
 
							HasExactlyOneBit(neighbor_rb); // Neighbor has got only one Roadbit
 

	
 
				} break;
 
					break;
 
				}
 

	
 
				case MP_RAILWAY:
 
					connective = IsPossibleCrossing(neighbor_tile, DiagDirToAxis(dir));
src/road_cmd.cpp
Show inline comments
 
@@ -186,20 +186,23 @@ static CommandCost RemoveRoad(TileIndex 
 
		case MP_ROAD: {
 
			CommandCost ret = EnsureNoVehicleOnGround(tile);
 
			if (ret.Failed()) return ret;
 
		} break;
 
			break;
 
		}
 

	
 
		case MP_STATION: {
 
			if (!IsDriveThroughStopTile(tile)) return CMD_ERROR;
 

	
 
			CommandCost ret = EnsureNoVehicleOnGround(tile);
 
			if (ret.Failed()) return ret;
 
		} break;
 
			break;
 
		}
 

	
 
		case MP_TUNNELBRIDGE: {
 
			if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) return CMD_ERROR;
 
			CommandCost ret = TunnelBridgeIsFree(tile, GetOtherTunnelBridgeEnd(tile));
 
			if (ret.Failed()) return ret;
 
		} break;
 
			break;
 
		}
 

	
 
		default:
 
			return CMD_ERROR;
 
@@ -520,7 +523,8 @@ CommandCost CmdBuildRoad(TileIndex tile,
 
						}
 
						return_cmd_error(STR_ERROR_ALREADY_BUILT);
 
					}
 
				} break;
 
					break;
 
				}
 

	
 
				case ROAD_TILE_CROSSING:
 
					other_bits = GetCrossingRoadBits(tile);
 
@@ -594,7 +598,8 @@ CommandCost CmdBuildRoad(TileIndex tile,
 
			pieces = curbits; // we need to pay for both roadbits
 

	
 
			if (HasTileRoadType(tile, rt)) return_cmd_error(STR_ERROR_ALREADY_BUILT);
 
		} break;
 
			break;
 
		}
 

	
 
		case MP_TUNNELBRIDGE: {
 
			if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) goto do_clear;
 
@@ -603,7 +608,8 @@ CommandCost CmdBuildRoad(TileIndex tile,
 
			/* Don't allow adding roadtype to the bridge/tunnel when vehicles are already driving on it */
 
			CommandCost ret = TunnelBridgeIsFree(tile, GetOtherTunnelBridgeEnd(tile));
 
			if (ret.Failed()) return ret;
 
		} break;
 
			break;
 
		}
 

	
 
		default: {
 
do_clear:;
 
@@ -611,7 +617,8 @@ do_clear:;
 
			if (ret.Failed()) return ret;
 
			cost.AddCost(ret);
 
			tile_cleared = true;
 
		} break;
 
			break;
 
		}
 
	}
 

	
 
	if (other_bits != pieces) {
 
@@ -672,7 +679,8 @@ do_clear:;
 
					if (rt == ROADTYPE_ROAD) SetTownIndex(tile, p2);
 
				}
 
				if (rtt != ROAD_TILE_CROSSING) SetRoadBits(tile, existing | pieces, rt);
 
			} break;
 
				break;
 
			}
 

	
 
			case MP_TUNNELBRIDGE: {
 
				TileIndex other_end = GetOtherTunnelBridgeEnd(tile);
 
@@ -690,7 +698,8 @@ do_clear:;
 

	
 
					for (TileIndex t = tile + delta; t != other_end; t += delta) MarkTileDirtyByTile(t);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case MP_STATION:
 
				assert(IsDriveThroughStopTile(tile));
 
@@ -1601,7 +1610,8 @@ static VehicleEnterTileStatus VehicleEnt
 
				InvalidateWindowData(WC_VEHICLE_DEPOT, rv->tile);
 
				return VETSB_ENTERED_WORMHOLE;
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		default: break;
 
	}
src/road_gui.cpp
Show inline comments
 
@@ -653,12 +653,14 @@ struct BuildRoadToolbarWindow : Window {
 
				case DDSP_REMOVE_BUSSTOP: {
 
					TileArea ta(start_tile, end_tile);
 
					DoCommandP(ta.tile, ta.w | ta.h << 8, ROADSTOP_BUS, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_BUS]), CcPlaySound1D);
 
				} break;
 
					break;
 
				}
 

	
 
				case DDSP_REMOVE_TRUCKSTOP: {
 
					TileArea ta(start_tile, end_tile);
 
					DoCommandP(ta.tile, ta.w | ta.h << 8, ROADSTOP_TRUCK, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_TRUCK]), CcPlaySound1D);
 
				} break;
 
					break;
 
				}
 
			}
 
		}
 
	}
src/saveload/afterload.cpp
Show inline comments
 
@@ -699,7 +699,8 @@ bool AfterLoadGame()
 
						return false;
 
					}
 
					SB(_m[t].m6, 3, 3, st);
 
				} break;
 
					break;
 
				}
 
			}
 
		}
 
	}
src/saveload/oldloader_sl.cpp
Show inline comments
 
@@ -1530,7 +1530,8 @@ static bool LoadTTDPatchExtraChunks(Load
 

	
 
				/* Append static NewGRF configuration */
 
				AppendStaticGRFConfigs(&_grfconfig);
 
			} break;
 
				break;
 
			}
 

	
 
			/* TTDPatch version and configuration */
 
			case 0x3:
src/settings.cpp
Show inline comments
 
@@ -395,7 +395,8 @@ static void Write_ValidateSetting(void *
 
			case SLE_VAR_I32: {
 
				/* Override the minimum value. No value below sdb->min, except special value 0 */
 
				if (!(sdb->flags & SGF_0ISDISABLED) || val != 0) val = Clamp(val, sdb->min, sdb->max);
 
			} break;
 
				break;
 
			}
 
			case SLE_VAR_U32: {
 
				/* Override the minimum value. No value below sdb->min, except special value 0 */
 
				uint min = ((sdb->flags & SGF_0ISDISABLED) && (uint)val <= (uint)sdb->min) ? 0 : sdb->min;
 
@@ -585,7 +586,8 @@ static void IniSaveSettings(IniFile *ini
 
			case SDT_MANYOFMANY: MakeManyOfMany(buf, lastof(buf), sdb->many, i); break;
 
			default: NOT_REACHED();
 
			}
 
		} break;
 
			break;
 
		}
 

	
 
		case SDT_STRING:
 
			switch (GetVarMemType(sld->conv)) {
src/settings_gui.cpp
Show inline comments
 
@@ -299,7 +299,8 @@ struct GameOptionsWindow : Window {
 
				}
 

	
 
				ShowDropDownMenu(this, _driveside_dropdown, this->opt->vehicle.road_side, GOW_ROADSIDE_DROPDOWN, i, 0);
 
			} break;
 
				break;
 
			}
 

	
 
			case GOW_TOWNNAME_DROPDOWN: // Setup townname dropdown
 
				ShowTownnameDropdown(this, this->opt->game_creation.town_name);
 
@@ -322,7 +323,8 @@ struct GameOptionsWindow : Window {
 
				}
 

	
 
				ShowDropDownList(this, list, _dynlang.curr, GOW_LANG_DROPDOWN);
 
			} break;
 
				break;
 
			}
 

	
 
			case GOW_RESOLUTION_DROPDOWN: // Setup resolution dropdown
 
				ShowDropDownMenu(this, BuildDynamicDropdown(SPECSTR_RESOLUTION_START, _num_resolutions), GetCurRes(), GOW_RESOLUTION_DROPDOWN, 0, 0);
 
@@ -1627,7 +1629,8 @@ struct GameSettingsWindow : Window {
 
						this->flags4 |= WF_TIMEOUT_BEGIN;
 
						_left_button_clicked = false;
 
					}
 
				} break;
 
					break;
 
				}
 

	
 
				default: NOT_REACHED();
 
			}
src/signs_gui.cpp
Show inline comments
 
@@ -170,7 +170,8 @@ struct SignListWindow : Window, SignList
 
				resize->height = max<uint>(FONT_HEIGHT_NORMAL, GetSpriteSize(SPR_COMPANY_ICON).height);
 
				Dimension d = {this->text_offset + MAX_LENGTH_SIGN_NAME_PIXELS + WD_FRAMETEXT_RIGHT, WD_FRAMERECT_TOP + 5 * resize->height + WD_FRAMERECT_BOTTOM};
 
				*size = maxdim(*size, d);
 
			} break;
 
				break;
 
			}
 

	
 
			case SLW_CAPTION:
 
				SetDParam(0, max<size_t>(1000, Sign::GetPoolSize()));
src/smallmap_gui.cpp
Show inline comments
 
@@ -1067,7 +1067,8 @@ public:
 
				DrawPixelInfo new_dpi;
 
				if (!FillDrawPixelInfo(&new_dpi, r.left + 1, r.top + 1, r.right - r.left - 1, r.bottom - r.top - 1)) return;
 
				this->DrawSmallMap(&new_dpi);
 
			} break;
 
				break;
 
			}
 

	
 
			case SM_WIDGET_LEGEND: {
 
				uint columns = this->GetNumberColumnsLegend(r.right - r.left + 1);
 
@@ -1152,7 +1153,8 @@ public:
 
				w->viewport->dest_scrollpos_y = pt.y - (w->viewport->virtual_height >> 1);
 

	
 
				this->SetDirty();
 
			} break;
 
				break;
 
			}
 

	
 
			case SM_WIDGET_ZOOM_IN:
 
			case SM_WIDGET_ZOOM_OUT: {
src/statusbar_gui.cpp
Show inline comments
 
@@ -123,7 +123,8 @@ struct StatusBarWindow : Window {
 
				FOR_ALL_COMPANIES(c) max_money = max<int64>(c->money, max_money);
 
				SetDParam(0, 100LL * max_money);
 
				d = GetStringBoundingBox(STR_COMPANY_MONEY);
 
			} break;
 
				break;
 
			}
 

	
 
			default:
 
				return;
 
@@ -150,7 +151,8 @@ struct StatusBarWindow : Window {
 
					SetDParam(0, c->money);
 
					DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, STR_COMPANY_MONEY, TC_FROMSTRING, SA_HOR_CENTER);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case SBW_MIDDLE:
 
				/* Draw status bar */
src/strings.cpp
Show inline comments
 
@@ -672,7 +672,8 @@ static char *FormatString(char *buff, co
 
						}
 
						break;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case SCC_STRING1: { // {STRING1}
 
				/* String that consumes ONE argument */
 
@@ -878,7 +879,8 @@ static char *FormatString(char *buff, co
 
			case SCC_ZEROFILL_NUM: { // {ZEROFILL_NUM}
 
				int64 num = GetInt64(&argv);
 
				buff = FormatZerofillNumber(buff, num, GetInt64(&argv), last);
 
			} break;
 
				break;
 
			}
 

	
 
			case SCC_HEX: // {HEX}
 
				buff = FormatHexNumber(buff, (uint64)GetInt64(&argv), last);
src/terraform_gui.cpp
Show inline comments
 
@@ -676,7 +676,8 @@ struct ScenarioEditorLandscapeGeneration
 

	
 
					SndPlayFx(SND_15_BEEP);
 
					this->SetDirty();
 
				} break;
 
					break;
 
				}
 
				case ETTW_NEW_SCENARIO: // gen random land
 
					this->HandleButtonClick(widget);
 
					ShowCreateScenario();
src/timetable_gui.cpp
Show inline comments
 
@@ -298,7 +298,8 @@ struct TimetableWindow : Window {
 
				this->sel_index = 2 * selected_order - (int)travel;
 
				/* travel time of first order needs special handling */
 
				if (this->sel_index == -1) this->sel_index = this->vehicle->GetNumOrders() * 2 - 1;
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -454,7 +455,8 @@ struct TimetableWindow : Window {
 
					}
 
					y += FONT_HEIGHT_NORMAL;
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case TTV_SUMMARY_PANEL: {
 
				int y = r.top + WD_FRAMERECT_TOP;
 
@@ -511,7 +513,8 @@ struct TimetableWindow : Window {
 

	
 
				this->DeleteChildWindows();
 
				this->sel_index = (selected == INVALID_ORDER || selected == this->sel_index) ? -1 : selected;
 
			} break;
 
				break;
 
			}
 

	
 
			case TTV_START_DATE: // Change the date that the timetable starts.
 
				ShowSetDateWindow(this, v->index, _date, _cur_year, _cur_year + 15, ChangeTimetableStartCallback);
 
@@ -537,12 +540,14 @@ struct TimetableWindow : Window {
 
				}
 

	
 
				ShowQueryString(current, STR_TIMETABLE_CHANGE_TIME, 31, 150, this, CS_NUMERAL, QSF_NONE);
 
			} break;
 
				break;
 
			}
 

	
 
			case TTV_CLEAR_TIME: { // Clear waiting time button.
 
				uint32 p1 = PackTimetableArgs(v, this->sel_index);
 
				DoCommandP(0, p1, 0, CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
 
			} break;
 
				break;
 
			}
 

	
 
			case TTV_RESET_LATENESS: // Reset the vehicle's late counter.
 
				DoCommandP(0, v->index, 0, CMD_SET_VEHICLE_ON_TIME | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
 
@@ -553,7 +558,8 @@ struct TimetableWindow : Window {
 
				if (!HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(p2, 0);
 
				if (_ctrl_pressed) SetBit(p2, 1);
 
				DoCommandP(0, v->index, p2, CMD_AUTOFILL_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
 
			} break;
 
				break;
 
			}
 

	
 
			case TTV_EXPECTED:
 
				this->show_expected = !this->show_expected;
src/toolbar_gui.cpp
Show inline comments
 
@@ -1572,7 +1572,8 @@ public:
 
				} else {
 
					DrawString(r.left, r.right, (height - FONT_HEIGHT_NORMAL) / 2, STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR, TC_FROMSTRING, SA_HOR_CENTER);
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/town_gui.cpp
Show inline comments
 
@@ -806,7 +806,8 @@ public:
 
					y += this->resize.step_height;
 
					if (++n == this->vscroll.GetCapacity()) break; // max number of towns in 1 window
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/tree_cmd.cpp
Show inline comments
 
@@ -431,7 +431,8 @@ CommandCost CmdPlantTree(TileIndex tile,
 
					}
 
				}
 
				cost.AddCost(_price[PR_BUILD_TREES]);
 
			} break;
 
				break;
 
			}
 

	
 
			default:
 
				msg = STR_ERROR_SITE_UNSUITABLE;
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -1550,7 +1550,8 @@ static VehicleEnterTileStatus VehicleEnt
 
					t->track = TRACK_BIT_WORMHOLE;
 
					ClrBit(t->gv_flags, GVF_GOINGUP_BIT);
 
					ClrBit(t->gv_flags, GVF_GOINGDOWN_BIT);
 
				} break;
 
					break;
 
				}
 

	
 
				case VEH_ROAD: {
 
					RoadVehicle *rv = RoadVehicle::From(v);
 
@@ -1558,7 +1559,8 @@ static VehicleEnterTileStatus VehicleEnt
 
					/* There are no slopes inside bridges / tunnels. */
 
					ClrBit(rv->gv_flags, GVF_GOINGUP_BIT);
 
					ClrBit(rv->gv_flags, GVF_GOINGDOWN_BIT);
 
				} break;
 
					break;
 
				}
 

	
 
				case VEH_SHIP:
 
					Ship::From(v)->state = TRACK_BIT_WORMHOLE;
 
@@ -1576,7 +1578,8 @@ static VehicleEnterTileStatus VehicleEnt
 
						t->track = (DiagDirToAxis(dir) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y);
 
						return VETSB_ENTERED_WORMHOLE;
 
					}
 
				} break;
 
					break;
 
				}
 

	
 
				case VEH_ROAD: {
 
					RoadVehicle *rv = RoadVehicle::From(v);
 
@@ -1585,7 +1588,8 @@ static VehicleEnterTileStatus VehicleEnt
 
						rv->frame = 0;
 
						return VETSB_ENTERED_WORMHOLE;
 
					}
 
				} break;
 
					break;
 
				}
 

	
 
				case VEH_SHIP: {
 
					Ship *ship = Ship::From(v);
 
@@ -1593,7 +1597,8 @@ static VehicleEnterTileStatus VehicleEnt
 
						ship->state = (DiagDirToAxis(dir) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y);
 
						return VETSB_ENTERED_WORMHOLE;
 
					}
 
				} break;
 
					break;
 
				}
 

	
 
				default: NOT_REACHED();
 
			}
src/vehicle_cmd.cpp
Show inline comments
 
@@ -95,7 +95,8 @@ CommandCost CmdStartStopVehicle(TileInde
 
			Aircraft *a = Aircraft::From(v);
 
			/* cannot stop airplane when in flight, or when taking off / landing */
 
			if (!(v->vehstatus & VS_CRASHED) && a->state >= STARTTAKEOFF && a->state < TERM7) return_cmd_error(STR_ERROR_AIRCRAFT_IS_IN_FLIGHT);
 
		} break;
 
			break;
 
		}
 

	
 
		default: return CMD_ERROR;
 
	}
src/vehicle_gui.cpp
Show inline comments
 
@@ -775,7 +775,8 @@ static int CDECL VehicleLengthSorter(con
 
			const RoadVehicle *u;
 
			for (u = RoadVehicle::From(*a); u != NULL; u = u->Next()) r += u->rcache.cached_veh_length;
 
			for (u = RoadVehicle::From(*b); u != NULL; u = u->Next()) r -= u->rcache.cached_veh_length;
 
		} break;
 
			break;
 
		}
 

	
 
		default: NOT_REACHED();
 
	}
 
@@ -1149,7 +1150,8 @@ public:
 
						break;
 
					default: NOT_REACHED();
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
 
@@ -1220,7 +1222,8 @@ public:
 

	
 
				const Vehicle *v = this->vehicles[id_v];
 
				ShowVehicleViewWindow(v);
 
			} break;
 
				break;
 
			}
 

	
 
			case VLW_WIDGET_AVAILABLE_VEHICLES:
 
				ShowBuildVehicleWindow(INVALID_TILE, this->vehicle_type);
 
@@ -1523,7 +1526,8 @@ struct VehicleDetailsWindow : Window {
 
				SetDParam(0, STR_VEHICLE_INFO_AGE);
 
				dim = maxdim(dim, GetStringBoundingBox(STR_VEHICLE_INFO_AGE_RUNNING_COST_YR));
 
				size->width = dim.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
 
			} break;
 
				break;
 
			}
 

	
 
			case VLD_WIDGET_MIDDLE_DETAILS: {
 
				const Vehicle *v = Vehicle::Get(this->window_number);
 
@@ -1683,7 +1687,8 @@ struct VehicleDetailsWindow : Window {
 
					DrawVehicleImage(v, sprite_left + WD_FRAMERECT_LEFT, sprite_right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, INVALID_VEHICLE, 0);
 
				}
 
				DrawVehicleDetails(v, text_left + WD_FRAMERECT_LEFT, text_right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, this->vscroll.GetPosition(), this->vscroll.GetCapacity(), this->tab);
 
			} break;
 
				break;
 
			}
 

	
 
			case VLD_WIDGET_SERVICING_INTERVAL:
 
				/* Draw service interval text */
 
@@ -1724,7 +1729,8 @@ struct VehicleDetailsWindow : Window {
 
				SetDParam(0, v->index);
 
				ShowQueryString(STR_VEHICLE_NAME, STR_QUERY_RENAME_TRAIN_CAPTION + v->type,
 
						MAX_LENGTH_VEHICLE_NAME_BYTES, MAX_LENGTH_VEHICLE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT);
 
			} break;
 
				break;
 
			}
 

	
 
			case VLD_WIDGET_INCREASE_SERVICING_INTERVAL:   // increase int
 
			case VLD_WIDGET_DECREASE_SERVICING_INTERVAL: { // decrease int
 
@@ -1736,7 +1742,8 @@ struct VehicleDetailsWindow : Window {
 
				if (mod == v->service_interval) return;
 

	
 
				DoCommandP(v->tile, v->index, mod, CMD_CHANGE_SERVICE_INT | CMD_MSG(STR_ERROR_CAN_T_CHANGE_SERVICING));
 
			} break;
 
				break;
 
			}
 

	
 
			case VLD_WIDGET_DETAILS_CARGO_CARRIED:
 
			case VLD_WIDGET_DETAILS_TRAIN_VEHICLES:
 
@@ -2054,7 +2061,8 @@ public:
 
				if (v->type != VEH_TRAIN) {
 
					size->height = 0;
 
					size->width = 0;
 
				} break;
 
					break;
 
				}
 

	
 
			case VVW_WIDGET_VIEWPORT:
 
				size->width = VV_INITIAL_VIEWPORT_WIDTH;
 
@@ -2123,7 +2131,8 @@ public:
 
					SetDParam(0, v->current_order.GetDestination());
 
					SetDParam(1, v->GetDisplaySpeed());
 
					str = STR_VEHICLE_STATUS_HEADING_FOR_STATION + _settings_client.gui.vehicle_speed;
 
				} break;
 
					break;
 
				}
 

	
 
				case OT_GOTO_DEPOT: {
 
					SetDParam(0, v->type);
 
@@ -2134,7 +2143,8 @@ public:
 
					} else {
 
						str = STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE + _settings_client.gui.vehicle_speed;
 
					}
 
				} break;
 
					break;
 
				}
 

	
 
				case OT_LOADING:
 
					str = STR_VEHICLE_STATUS_LOADING_UNLOADING;
 
@@ -2194,7 +2204,8 @@ public:
 
				} else {
 
					ScrollMainWindowTo(v->x_pos, v->y_pos, v->z_pos);
 
				}
 
			} break;
 
				break;
 
			}
 

	
 
			case VVW_WIDGET_GOTO_DEPOT: // goto hangar
 
				DoCommandP(v->tile, v->index, _ctrl_pressed ? DEPOT_SERVICE : 0, GetCmdSendToDepot(v));
src/video/win32_v.cpp
Show inline comments
 
@@ -647,7 +647,8 @@ static LRESULT CALLBACK WndProcGdi(HWND 
 
					ChangeDisplaySettings(NULL, 0);
 
				}
 
			}
 
		} break;
 
			break;
 
		}
 
#endif
 
	}
 

	
src/viewport.cpp
Show inline comments
 
@@ -2242,7 +2242,8 @@ static int CalcHeightdiff(HighLightStyle
 
			h1 = TileHeight(TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_line_by_dir[12 + style_t])));
 
			ht = TileHeight(TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_line_by_dir[12 + style_t + 1])));
 
			h1 = max(h1, ht);
 
		} break;
 
			break;
 
		}
 
	}
 

	
 
	if (swap) Swap(h0, h1);
 
@@ -2582,7 +2583,8 @@ calc_heightdiff_single_direction:;
 
				}
 

	
 
				ShowMeasurementTooltips(measure_strings_length[index], index, params);
 
			} break;
 
				break;
 
			}
 

	
 
		case VPM_X_AND_Y_LIMITED: // Drag an X by Y constrained rect area.
 
			limit = (_thd.sizelimit - 1) * TILE_SIZE;
src/viewport_gui.cpp
Show inline comments
 
@@ -116,7 +116,8 @@ public:
 
				w->viewport->dest_scrollpos_x =  x - (w->viewport->virtual_width -  this->viewport->virtual_width) / 2;
 
				w->viewport->dest_scrollpos_y =  y - (w->viewport->virtual_height - this->viewport->virtual_height) / 2;
 
				w->viewport->follow_vehicle   = INVALID_VEHICLE;
 
			} break;
 
				break;
 
			}
 

	
 
			case EVW_VIEW_TO_MAIN: { // inverse location button (move this view to same spot as main view) 'Copy Location'
 
				const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
 
@@ -125,7 +126,8 @@ public:
 

	
 
				this->viewport->dest_scrollpos_x =  x + (w->viewport->virtual_width -  this->viewport->virtual_width) / 2;
 
				this->viewport->dest_scrollpos_y =  y + (w->viewport->virtual_height - this->viewport->virtual_height) / 2;
 
			} break;
 
				break;
 
			}
 
		}
 
	}
 

	
src/water_cmd.cpp
Show inline comments
 
@@ -668,12 +668,14 @@ static void DrawTile_Water(TileInfo *ti)
 
		case WATER_TILE_COAST: {
 
			DrawShoreTile(ti->tileh);
 
			DrawBridgeMiddle(ti);
 
		} break;
 
			break;
 
		}
 

	
 
		case WATER_TILE_LOCK: {
 
			const WaterDrawTileStruct *t = _lock_display_seq[GetSection(ti->tile)];
 
			DrawWaterStuff(ti, t, 0, ti->z > t[3].delta_y ? 24 : 0, true);
 
		} break;
 
			break;
 
		}
 

	
 
		case WATER_TILE_DEPOT:
 
			DrawWaterClassGround(ti);
src/window.cpp
Show inline comments
 
@@ -2724,7 +2724,8 @@ void RelocateAllWindows(int neww, int ne
 
				} else {
 
					if (top < 0) top = 0;
 
				}
 
			} break;
 
				break;
 
			}
 
		}
 

	
 
		if (w->viewport != NULL) {
0 comments (0 inline, 0 general)