From 17a25b08ad7cf14a625e82611a5fc3a20922b777 Mon Sep 17 00:00:00 2001 From: Heiko August Date: Sun, 25 Oct 2015 18:06:38 +0100 Subject: [PATCH 1/9] translate-de: add translations for train length and vehicle group in the detais window --- src/lang/german.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lang/german.txt b/src/lang/german.txt index 44d464eed2..759760977b 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -1289,6 +1289,10 @@ STR_CONFIG_SETTING_POPULATION_IN_LABEL :Zeige die Einwo STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT :Zeige die Einwohneranzahl neben den Städtenamen auf der Karte an STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Linienstärke in Diagrammen: {STRING} STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Strichdicke der Linien in Diagrammen. Dünnere Linien sind genauer ablesbar, dickere Linien sind besser sichtbar und erlauben es, Farben leichter zu unterscheiden +STR_CONFIG_SETTING_SHOW_TRAIN_LENGTH_IN_DETAILS :Zuglänge in den Fahrzeugdetails anzeigen: {STRING} +STR_CONFIG_SETTING_SHOW_TRAIN_LENGTH_IN_DETAILS_HELPTEXT :Zeige die Zuglänge im Fenster für die Fahrzeugdetails an +STR_CONFIG_SETTING_SHOW_VEHICLE_GROUP_IN_DETAILS :Gruppe in den Fahrzeugdetails anzeigen: {STRING} +STR_CONFIG_SETTING_SHOW_VEHICLE_GROUP_IN_DETAILS_HELPTEXT :Zeige die Fahrzeuggruppe im Fenster für die Fahrzeugdetails an STR_CONFIG_SETTING_LANDSCAPE :Landschaftstyp: {STRING} STR_CONFIG_SETTING_LANDSCAPE_HELPTEXT :Landschaftstype definiert grundlegende Spielscenarien in Bezug auf verfügbare Fracht und Wachstumsvoraussetzungen für Städte. NewGRFs und Spielskripte erlauben weitgehendere Kontrolle dieser Parameter @@ -3655,9 +3659,13 @@ STR_VEHICLE_INFO_MAX_SPEED_RANGE :{BLACK}Max. Ges STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Gewicht: {LTBLUE}{WEIGHT_SHORT} {BLACK}Leistung: {LTBLUE}{POWER}{BLACK} Max. Geschw.: {LTBLUE}{VELOCITY} STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Gewicht: {LTBLUE}{WEIGHT_SHORT} {BLACK}Leistung: {LTBLUE}{POWER}{BLACK} Max. Geschw.: {LTBLUE}{VELOCITY} {BLACK}Max. Zugkraft: {LTBLUE}{FORCE} +STR_VEHICLE_INFO_TRAIN_LENGTH :{BLACK}Zuglänge: {LTBLUE}{DECIMAL} Kachel{P "" n} {STRING} + STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Gewinn dieses Jahr: {LTBLUE}{CURRENCY_LONG} (letztes Jahr: {CURRENCY_LONG}) STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS :{BLACK}Zuverlässigkeit: {LTBLUE}{COMMA}% {BLACK}Pannen seit der letzten Wartung: {LTBLUE}{COMMA} +STR_VEHICLE_INFO_GROUP :{BLACK}Gruppe: {LTBLUE}{GROUP} + STR_VEHICLE_INFO_BUILT_VALUE :{LTBLUE}{ENGINE} {BLACK}Gebaut: {LTBLUE}{NUM}{BLACK} Wert: {LTBLUE}{CURRENCY_LONG} STR_VEHICLE_INFO_NO_CAPACITY :{BLACK}Kapazität: {LTBLUE}Keine{STRING} STR_VEHICLE_INFO_CAPACITY :{BLACK}Kapazität: {LTBLUE}{CARGO_LONG}{3:STRING} From fab9331a826ea9fe6c75c2bf22ae8a63dd4dd104 Mon Sep 17 00:00:00 2001 From: Heiko August Date: Sun, 25 Oct 2015 19:21:31 +0100 Subject: [PATCH 2/9] translate-de: add translation for additional infos in the group window --- src/lang/german.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lang/german.txt b/src/lang/german.txt index 759760977b..942212f5e4 100644 --- a/src/lang/german.txt +++ b/src/lang/german.txt @@ -3365,6 +3365,11 @@ STR_GROUP_REMOVE_ALL_VEHICLES :Liste leeren STR_GROUP_RENAME_CAPTION :{BLACK}Gruppe umbenennen +STR_GROUP_PROFIT_THIS_YEAR :Profit in diesem Jahr: +STR_GROUP_PROFIT_LAST_YEAR :Profit im letzten Jahr: +STR_GROUP_OCCUPANCY :Momentane Auslastung: +STR_GROUP_OCCUPANCY_VALUE :{NUM}% + # Build vehicle window STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :Neue Schienenfahrzeuge STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION :Neue elektrische Schienenfahrzeuge From b3e03e8cf92058d7f561d2bb1455d1e05ab619e8 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 1 Nov 2015 14:05:22 +0000 Subject: [PATCH 3/9] Fix middle of bridge not being redrawn when adding removing signals. --- src/rail_cmd.cpp | 6 ++---- src/tunnelbridge.h | 1 + src/tunnelbridge_cmd.cpp | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 9d326d0747..fd6c5bd36d 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1090,8 +1090,7 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1, } } } - MarkTileDirtyByTile(tile); - MarkTileDirtyByTile(tile_exit); + MarkBridgeOrTunnelDirty(tile); AddSideToSignalBuffer(tile, INVALID_DIAGDIR, GetTileOwner(tile)); YapfNotifyTrackLayoutChange(tile, track); } @@ -1538,8 +1537,7 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1 ClrBitTunnelBridgeSignal(end); _m[tile].m2 = 0; _m[end].m2 = 0; - MarkTileDirtyByTile(tile); - MarkTileDirtyByTile(end); + MarkBridgeOrTunnelDirty(tile); AddSideToSignalBuffer(tile, INVALID_DIAGDIR, GetTileOwner(tile)); YapfNotifyTrackLayoutChange(tile, track); return CommandCost(EXPENSES_CONSTRUCTION, cost); diff --git a/src/tunnelbridge.h b/src/tunnelbridge.h index 0a2c2293d5..03de071e9d 100644 --- a/src/tunnelbridge.h +++ b/src/tunnelbridge.h @@ -16,6 +16,7 @@ void MarkBridgeDirty(TileIndex begin, TileIndex end, DiagDirection direction, uint bridge_height); void MarkBridgeDirty(TileIndex tile); +void MarkBridgeOrTunnelDirty(TileIndex tile); /** * Calculates the length of a tunnel or a bridge (without end tiles) diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index f963222f5a..4dec3f80e0 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -80,6 +80,20 @@ void MarkBridgeDirty(TileIndex tile) MarkBridgeDirty(tile, GetOtherTunnelBridgeEnd(tile), GetTunnelBridgeDirection(tile), GetBridgeHeight(tile)); } +/** + * Mark bridge or tunnel tiles dirty. + * @param tile Bridge head or tunnel entrance. + */ +void MarkBridgeOrTunnelDirty(TileIndex tile) +{ + if (IsBridge(tile)) { + MarkBridgeDirty(tile); + } else { + MarkTileDirtyByTile(tile); + MarkTileDirtyByTile(GetOtherTunnelBridgeEnd(tile)); + } +} + /** Reset the data been eventually changed by the grf loaded. */ void ResetBridges() { From 95a329a4b95846ba6c54819e2007825becbb515d Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 1 Nov 2015 14:05:50 +0000 Subject: [PATCH 4/9] Fix signals on far side of bridge not being updated when adding/removing signals. --- src/rail_cmd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index fd6c5bd36d..e71d732d00 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1092,7 +1092,9 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1, } MarkBridgeOrTunnelDirty(tile); AddSideToSignalBuffer(tile, INVALID_DIAGDIR, GetTileOwner(tile)); + AddSideToSignalBuffer(tile_exit, INVALID_DIAGDIR, GetTileOwner(tile)); YapfNotifyTrackLayoutChange(tile, track); + YapfNotifyTrackLayoutChange(tile_exit, track); } return cost; } @@ -1539,7 +1541,9 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1 _m[end].m2 = 0; MarkBridgeOrTunnelDirty(tile); AddSideToSignalBuffer(tile, INVALID_DIAGDIR, GetTileOwner(tile)); + AddSideToSignalBuffer(end, INVALID_DIAGDIR, GetTileOwner(tile)); YapfNotifyTrackLayoutChange(tile, track); + YapfNotifyTrackLayoutChange(end, track); return CommandCost(EXPENSES_CONSTRUCTION, cost); } From c120b810d1d401999984ab01004473d72d410dac Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 1 Nov 2015 16:07:55 +0000 Subject: [PATCH 5/9] Mark dirty the catchment of a station on change as necessary for zoning. If the zoning mode is station catchment, or unserved industry/building, mark dirty the station catchment rectangle before removing, or after adding, (a) station tile(s). In the case of unserved industry mode, increase the refreshed catchment radius by 10 tiles, to wholly include industries partially inside the catchment area. --- src/station.cpp | 4 +--- src/station_base.h | 6 +++++- src/station_cmd.cpp | 18 ++++++++++++++++-- src/zoning.h | 3 +++ src/zoning_cmd.cpp | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/station.cpp b/src/station.cpp index 456262dea4..773e45e100 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -291,13 +291,11 @@ uint Station::GetCatchmentRadius() const * Determines catchment rectangle of this station * @return clamped catchment rectangle */ -Rect Station::GetCatchmentRect() const +Rect Station::GetCatchmentRectUsingRadius(uint catchment_radius) const { assert(!this->rect.IsEmpty()); /* Compute acceptance rectangle */ - int catchment_radius = this->GetCatchmentRadius(); - Rect ret = { max(this->rect.left - catchment_radius, 0), max(this->rect.top - catchment_radius, 0), diff --git a/src/station_base.h b/src/station_base.h index af4d206ba0..c4743bf88f 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -489,7 +489,11 @@ public: static void RecomputeIndustriesNearForAll(); uint GetCatchmentRadius() const; - Rect GetCatchmentRect() const; + Rect GetCatchmentRectUsingRadius(uint radius) const; + inline Rect GetCatchmentRect() const + { + return GetCatchmentRectUsingRadius(this->GetCatchmentRadius()); + } /* virtual */ inline bool TileBelongsToRailStation(TileIndex tile) const { diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index eb90c29ab5..65b4ea9b07 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -53,6 +53,7 @@ #include "linkgraph/linkgraph_base.h" #include "linkgraph/refresh.h" #include "widgets/station_widget.h" +#include "zoning.h" #include "table/strings.h" @@ -1383,6 +1384,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32 st->UpdateVirtCoord(); UpdateStationAcceptance(st, false); st->RecomputeIndustriesNear(); + ZoningMarkDirtyStationCoverageArea(st); InvalidateWindowData(WC_SELECT_STATION, 0, 0); InvalidateWindowData(WC_STATION_LIST, st->owner, 0); SetWindowWidgetDirty(WC_STATION_VIEW, st->index, WID_SV_TRAINS); @@ -1495,6 +1497,9 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector &affected } if (flags & DC_EXEC) { + bool already_affected = affected_stations.Include(st); + if (!already_affected) ZoningMarkDirtyStationCoverageArea(st); + /* read variables before the station tile is removed */ uint specindex = GetCustomStationSpecIndex(tile); Track track = GetRailStationTrack(tile); @@ -1529,8 +1534,6 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector &affected DeallocateSpecFromStation(st, specindex); - affected_stations.Include(st); - if (v != NULL) { /* Restore station reservation. */ if (IsRailStationTile(v->tile)) SetRailStationPlatformReservation(v->tile, TrackdirToExitdir(v->GetVehicleTrackdir()), true); @@ -1674,6 +1677,9 @@ static CommandCost RemoveRailStation(TileIndex tile, DoCommandFlag flags) } Station *st = Station::GetByTile(tile); + + if (flags & DC_EXEC) ZoningMarkDirtyStationCoverageArea(st); + CommandCost cost = RemoveRailStation(st, flags, _price[PR_CLEAR_STATION_RAIL]); if (flags & DC_EXEC) st->RecomputeIndustriesNear(); @@ -1863,6 +1869,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin MarkTileDirtyByTile(cur_tile); } + ZoningMarkDirtyStationCoverageArea(st); } if (st != NULL) { @@ -1933,6 +1940,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags) } if (flags & DC_EXEC) { + ZoningMarkDirtyStationCoverageArea(st); if (*primary_stop == cur_stop) { /* removed the first stop in the list */ *primary_stop = cur_stop->next; @@ -2299,6 +2307,7 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint st->UpdateVirtCoord(); UpdateStationAcceptance(st, false); st->RecomputeIndustriesNear(); + ZoningMarkDirtyStationCoverageArea(st); InvalidateWindowData(WC_SELECT_STATION, 0, 0); InvalidateWindowData(WC_STATION_LIST, st->owner, 0); InvalidateWindowData(WC_STATION_VIEW, st->index, -1); @@ -2337,6 +2346,7 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags) } if (flags & DC_EXEC) { + ZoningMarkDirtyStationCoverageArea(st); const AirportSpec *as = st->airport.GetSpec(); /* The noise level is the noise from the airport and reduce it to account for the distance to the town center. * And as for construction, always remove it, even if the setting is not set, in order to avoid the @@ -2539,6 +2549,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 st->UpdateVirtCoord(); UpdateStationAcceptance(st, false); st->RecomputeIndustriesNear(); + ZoningMarkDirtyStationCoverageArea(st); InvalidateWindowData(WC_SELECT_STATION, 0, 0); InvalidateWindowData(WC_STATION_LIST, st->owner, 0); SetWindowWidgetDirty(WC_STATION_VIEW, st->index, WID_SV_SHIPS); @@ -2569,6 +2580,7 @@ static CommandCost RemoveDock(TileIndex tile, DoCommandFlag flags) if (ret.Failed()) return ret; if (flags & DC_EXEC) { + ZoningMarkDirtyStationCoverageArea(st); DoClearSquare(tile1); MarkTileDirtyByTile(tile1); MakeWaterKeepingClass(tile2, st->owner); @@ -3903,11 +3915,13 @@ void BuildOilRig(TileIndex tile) st->UpdateVirtCoord(); UpdateStationAcceptance(st, false); st->RecomputeIndustriesNear(); + ZoningMarkDirtyStationCoverageArea(st); } void DeleteOilRig(TileIndex tile) { Station *st = Station::GetByTile(tile); + ZoningMarkDirtyStationCoverageArea(st); MakeWaterKeepingClass(tile, OWNER_NONE); diff --git a/src/zoning.h b/src/zoning.h index bfea293342..995e762e54 100644 --- a/src/zoning.h +++ b/src/zoning.h @@ -45,4 +45,7 @@ void DrawTileZoning(const TileInfo *ti); void ShowZoningToolbar(); +void ZoningMarkDirtyStationCoverageArea(const Station *st); +inline void ZoningMarkDirtyStationCoverageArea(const Waypoint *st) { } // no-op + #endif /* ZONING_H */ diff --git a/src/zoning_cmd.cpp b/src/zoning_cmd.cpp index 5f9240d76c..99a9640c4a 100644 --- a/src/zoning_cmd.cpp +++ b/src/zoning_cmd.cpp @@ -330,3 +330,35 @@ void DrawTileZoning(const TileInfo *ti) DrawZoningSprites(SPR_ZONING_INNER_HIGHLIGHT_BASE, TileZoningSpriteEvaluation(ti->tile, _local_company, _zoning.inner), ti); } } + +static uint GetZoningModeDependantStationCoverageRadius(const Station *st, ZoningEvaluationMode ev_mode) +{ + switch (ev_mode) { + case ZEM_STA_CATCH: return st->GetCatchmentRadius(); + case ZEM_BUL_UNSER: return st->GetCatchmentRadius(); + case ZEM_IND_UNSER: return st->GetCatchmentRadius() + 10; // this is to wholly update industries partially within the region + default: return 0; + } +} + +/** + * Mark dirty the coverage area around a station if the current zoning mode depends on station coverage + * + * @param const Station *st + * The station to use + */ +void ZoningMarkDirtyStationCoverageArea(const Station *st) +{ + if (st->rect.IsEmpty()) return; + + uint radius = max(GetZoningModeDependantStationCoverageRadius(st, _zoning.outer), GetZoningModeDependantStationCoverageRadius(st, _zoning.inner)); + + if (radius > 0) { + Rect rect = st->GetCatchmentRectUsingRadius(radius); + for (int x = rect.left; x <= rect.right; x++) { + for (int y = rect.top; y <= rect.bottom; y++) { + MarkTileDirtyByTile(TileXY(x, y)); + } + } + } +} From aa9f44eaec14f7acbe731dbe8f469f464d94c459 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 1 Nov 2015 21:51:10 +0000 Subject: [PATCH 6/9] Fix flicker/render errors of bridge/tunnels in viewport map mode. Fix bridges not being rendered when the region to be repainted did not intersect with either of the bridge ends. Fix flicker due to non-deterministic ordering of the two bridge/tunnel ends (if the tile heights of the two ends are different). --- src/viewport.cpp | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/src/viewport.cpp b/src/viewport.cpp index d478c7f753..95574a3df0 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1545,8 +1545,17 @@ static void ViewportMapStoreBridgeTunnel(const ViewPort * const vp, const TileIn /* It's a new one, add it to the list */ tbtm = tbtmv->Append(); - tbtm->from_tile = tile; - tbtm->to_tile = GetOtherTunnelBridgeEnd(tile); + TileIndex other_end = GetOtherTunnelBridgeEnd(tile); + + /* ensure deterministic ordering, to avoid render flicker */ + if (other_end > tile) { + tbtm->from_tile = other_end; + tbtm->to_tile = tile; + } else { + tbtm->from_tile = tile; + tbtm->to_tile = other_end; + } + if (vp->map_type == VPMT_OWNER && _settings_client.gui.use_owner_colour_for_tunnelbridge && o < MAX_COMPANIES) { const uint8 colour = _legend_land_owners[_company_to_list_pos[o]].colour; tbtm->colour = tile_is_tunnel ? _darken_colour[colour] : _lighten_colour[colour]; @@ -2083,6 +2092,31 @@ static inline uint32 ViewportMapGetColourOwner(const TileIndex tile, TileType t, return colour; } +static inline void ViewportMapStoreBridgeAboveTile(const ViewPort * const vp, const TileIndex tile) +{ + /* No need to bother for hidden things */ + if (!_settings_client.gui.show_bridges_on_map) return; + + /* Check existing stored bridges */ + TunnelBridgeToMap *tbtm = _vd.tunnel_bridge_to_map.Begin(); + TunnelBridgeToMap *tbtm_end = _vd.tunnel_bridge_to_map.End(); + for (; tbtm != tbtm_end; ++tbtm) { + if (!IsBridge(tbtm->from_tile)) continue; + + TileIndex from = tbtm->from_tile; + TileIndex to = tbtm->to_tile; + if (TileX(from) == TileX(to) && TileX(from) == TileX(tile)) { + if (TileY(from) > TileY(to)) std::swap(from, to); + if (TileY(from) <= TileY(tile) && TileY(tile) <= TileY(to)) return; /* already covered */ + } else if (TileY(from) == TileY(to) && TileY(from) == TileY(tile)) { + if (TileX(from) > TileX(to)) std::swap(from, to); + if (TileX(from) <= TileX(tile) && TileX(tile) <= TileX(to)) return; /* already covered */ + } + } + + ViewportMapStoreBridgeTunnel(vp, GetSouthernBridgeEnd(tile)); +} + static inline TileIndex ViewportMapGetMostSignificantTileType(const ViewPort * const vp, const TileIndex from_tile, TileType * const tile_type) { if (vp->zoom <= ZOOM_LVL_OUT_128X || !_settings_client.gui.viewport_map_scan_surroundings) { @@ -2090,6 +2124,7 @@ static inline TileIndex ViewportMapGetMostSignificantTileType(const ViewPort * c /* Store bridges and tunnels. */ if (ttype != MP_TUNNELBRIDGE) { *tile_type = ttype; + if (IsBridgeAbove(from_tile)) ViewportMapStoreBridgeAboveTile(vp, from_tile); } else { ViewportMapStoreBridgeTunnel(vp, from_tile); switch (GetTunnelBridgeTransportType(from_tile)) { @@ -2116,6 +2151,9 @@ static inline TileIndex ViewportMapGetMostSignificantTileType(const ViewPort * c importance = tile_importance; result = tile; } + if (ttype != MP_TUNNELBRIDGE && IsBridgeAbove(tile)) { + ViewportMapStoreBridgeAboveTile(vp, tile); + } } /* Store bridges and tunnels. */ From a286096f63c59e6c1ceed5d63e1abe10bcf86ca5 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 1 Nov 2015 22:54:24 +0000 Subject: [PATCH 7/9] Add readme and changelog to bundle/install target. --- Makefile.bundle.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile.bundle.in b/Makefile.bundle.in index 17a17e36e8..9b8bb82663 100644 --- a/Makefile.bundle.in +++ b/Makefile.bundle.in @@ -75,6 +75,8 @@ endif $(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/" $(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/" $(Q)cp "$(ROOT_DIR)/changelog.txt" "$(BUNDLE_DIR)/" + $(Q)cp "$(ROOT_DIR)/README.md" "$(BUNDLE_DIR)/" + $(Q)cp "$(ROOT_DIR)/jgrpp-changelog.md" "$(BUNDLE_DIR)/" ifdef MAN_DIR $(Q)mkdir -p "$(BUNDLE_DIR)/man/" $(Q)cp "$(ROOT_DIR)/docs/openttd.6" "$(BUNDLE_DIR)/man/" @@ -90,7 +92,7 @@ ifdef MENU_DIR $(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install" endif ifeq ($(TTD), openttd.exe) - $(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt" + $(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/"*.md ifeq ($(OS), DOS) $(Q)cp "$(ROOT_DIR)/os/dos/cwsdpmi/cwsdpmi.txt" "$(BUNDLE_DIR)/docs/" ifndef STRIP @@ -161,7 +163,7 @@ bundle_dmg: bundle bundle_exe: all @echo '[BUNDLE] Creating $(BUNDLE_NAME).exe' $(Q)mkdir -p "$(BUNDLES_DIR)" - $(Q)unix2dos "$(ROOT_DIR)/docs/"*.txt "$(ROOT_DIR)/readme.txt" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt" + $(Q)unix2dos "$(ROOT_DIR)/docs/"*.txt "$(ROOT_DIR)/readme.txt" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt" "$(ROOT_DIR)/"*.md $(Q)cd $(ROOT_DIR)/os/windows/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi $(Q)mv $(ROOT_DIR)/os/windows/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe" @@ -196,6 +198,7 @@ endif ifndef DO_NOT_INSTALL_CHANGELOG $(Q)install -d "$(INSTALL_DOC_DIR)" $(Q)install -m 644 "$(BUNDLE_DIR)/changelog.txt" "$(INSTALL_DOC_DIR)" + $(Q)install -m 644 "$(BUNDLE_DIR)/jgrpp-changelog.md" "$(INSTALL_DOC_DIR)" endif ifndef DO_NOT_INSTALL_LICENSE $(Q)install -d "$(INSTALL_DOC_DIR)" From 8db96aa31822369aceddfeca247c1078fb9035a9 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 1 Nov 2015 22:56:44 +0000 Subject: [PATCH 8/9] Version: Committing version data for tag: jgrpp-0.7.1 --- .ottdrev-vc | 4 ++-- README.md | 18 ++++++++++++------ jgrpp-changelog.md | 16 ++++++++++++++++ 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/.ottdrev-vc b/.ottdrev-vc index 3e9586e6f9..893b558275 100644 --- a/.ottdrev-vc +++ b/.ottdrev-vc @@ -1,2 +1,2 @@ -jgrpp-0.7.0 27415 0 jgrpp-0.7.0 -788f8c0cf7000f20953ac49e57bb799b1c75c7774d9b7aeb9b188fe3e415a7c9 - +jgrpp-0.7.1 27428 0 jgrpp-0.7.1 +60c05dd628290c02d39e5ade377ba82f949ab1da446e83903eb95ed57ea10c1a - diff --git a/README.md b/README.md index cd1726462f..1f167f0e13 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## JGR's Patchpack version 0.7.0 +## JGR's Patchpack version 0.7.1 This is a collection of patches applied to [OpenTTD](http://www.openttd.org/) @@ -38,7 +38,8 @@ See [jgrpp-changelog.md](jgrpp-changelog.md) for changelog. * Zoning: [imported](http://www.tt-forums.net/viewtopic.php?f=33&t=33701) This is modified to remove unimplemented modes, implement station ownership checks and implement station facility checks for industries. - As of v0.6.0, add a mode to show restricted signals. + As of v0.6.0, add a mode to show restricted signals. + As of v0.7.1, fix adding/removing station tiles not redrawing affected surrounding tiles when in the station catchment or unserved building/industry modes. * Departure boards: [imported](https://www.tt-forums.net/viewtopic.php?f=33&t=49956) * Fixed departure boards with orders with timetabled 0 travel times, e.g. those with depot service orders. @@ -50,7 +51,8 @@ See [jgrpp-changelog.md](jgrpp-changelog.md) for changelog. * Vehicles visible in tunnels (transparency setting): [imported](http://dev.openttdcoop.org/projects/clientpatches/repository/changes/VehicelsInTunnels.diff) -* Signals in tunnels and on bridges: [imported](http://www.tt-forums.net/viewtopic.php?f=33&t=41260) +* Signals in tunnels and on bridges: [imported](http://www.tt-forums.net/viewtopic.php?f=33&t=41260) + As of v0.7.1, fix various issues involving redrawing, updating of adjacent signals, and vehicles emitting smoke whilst stopped at a red signal. * Measurement tools: [imported](http://www.tt-forums.net/viewtopic.php?f=33&t=49212) @@ -72,12 +74,13 @@ See [jgrpp-changelog.md](jgrpp-changelog.md) for changelog. * Auto separation: Fix handling of non-station orders (e.g. waypoints and depots). Add setting to scale vehicle lateness adjustments. No longer set vehicle lateness to 0 if separation fails, instead leave it as it was. * Timetable GUI: Allow clearing of timetable time fields which are at 0. Allow explicitly setting timetable time fields to 0 without clearing them. * Add a company setting to enable automatic timetabling for new vehicles (added in v0.4.0). - * As of v0.7.0, the setting to scale vehicle lateness adjustments is a company setting. + * As of v0.7.0, the setting to scale vehicle lateness adjustments is a company setting. As of v0.7.1 the default value has been changed to 40%. * Vehicle repair cost: [imported](http://www.tt-forums.net/viewtopic.php?f=33&t=45642) * Enhanced viewport: [imported](https://www.tt-forums.net/viewtopic.php?f=33&t=53394) - Fixed crash when looking at aqueducts in viewport map mode. + Fixed crash when looking at aqueducts in viewport map mode. + As of v0.7.1, fix flicker and render errors of bridge/tunnels in viewport map mode, and rendering/clearing errors of vehicle route lines. * Infrastructure sharing: [imported](http://www.tt-forums.net/viewtopic.php?f=33&t=42254) Fixed various issues with additions to the settings GUI. @@ -145,9 +148,12 @@ See [jgrpp-changelog.md](jgrpp-changelog.md) for changelog. Enable stack traces on MinGW, try to demangle C++ symbol names, try to use libbfd for better symbol lookup, handle SIGSEGV while backtracing. * Multiplayer desync fixes/changes - * Fix YAPF pathfinder desync issue involving rail track type changes which where only passable by a subset of vehicles (trunk bug). (added in v0.6.0) + * Fix YAPF pathfinder desync issue involving rail track type changes which where only passable by a subset of vehicles (trunk bug). (added in v0.6.0, fixed in trunk as of v0.7.1) * Logging: Various changes and improvements to desync-related logging and debugging, see changelog for details. +* Translations + * German (by Auge): including vehicle group info, vehicle details window, and the zoning toolbar. + #### Caveats for loading savegames from the [Spring 2013 Patch Pack](http://www.tt-forums.net/viewtopic.php?f=33&t=66892): * This is not guaranteed to be bug free diff --git a/jgrpp-changelog.md b/jgrpp-changelog.md index 977a8df62c..398ab5cfb6 100644 --- a/jgrpp-changelog.md +++ b/jgrpp-changelog.md @@ -2,6 +2,22 @@ * * * +### v0.7.1 (2015-11-01) +* Enhanced viewports: + * Fix flicker and render errors of bridge/tunnels in viewport map mode. + * Fix rendering, clearing and timely update issues of vehicle route lines. +* Zoning: Fix adding/removing station tiles not redrawing affected surrounding tiles when in the station catchment or unserved building/industry modes. +* Bridges on signals and tunnels: + * Fix adjacent signals around bridge/tunnels not being updated when adding/updating (on the far side) and removing (on both sides) signals from the bridge/tunnel. + * Fix middle of bridge not being redrawn when adding/updating/removing signals to bridges. + * Fix vehicles continually emitting smoke when stopped at a red signal on a bridge. +* Change the default for the auto timetable separation rate company setting to 40%. This is to improve jam-resistance by default. +* Vehicle group info: make margins around text symmetric. +* Fix compilation on some compilers/platforms +* Add the changelog and readme to the bundle/install target. +* Add German translations by Auge, including: vehicle group info, vehicle details window, and the zoning toolbar. +* Bump trunk base from r27415 to r27428 + ### v0.7.0 (2015-10-29) * Fix timetable rounding depending on the client time display mode setting, which caused desyncs in multiplayer (departure boards patch bug). * Add reverse at waypoint orders. From 2503704d389b3f4020cd35d0a8f3ca10410298bf Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 3 Nov 2015 00:01:42 +0000 Subject: [PATCH 9/9] Fix displayed height for bridge/tunnels in viewport map mode. --- src/viewport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewport.cpp b/src/viewport.cpp index 95574a3df0..846a4f2fec 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -2338,7 +2338,7 @@ void ViewportMapDraw(const ViewPort * const vp) const TunnelBridgeToMap * const tbtm_end = _vd.tunnel_bridge_to_map.End(); for (const TunnelBridgeToMap *tbtm = _vd.tunnel_bridge_to_map.Begin(); tbtm != tbtm_end; tbtm++) { // For each bridge or tunnel TileIndex tile = tbtm->from_tile; - const int z = TileHeight(tile) * 4; + const int z = (IsBridge(tile) ? GetBridgeHeight(tile) : GetTileZ(tile)) * TILE_HEIGHT; TileIndexDiff delta = TileOffsByDiagDir(GetTunnelBridgeDirection(tile)); for (; tile != tbtm->to_tile; tile += delta) { // For each tile const Point pt = RemapCoords(TileX(tile) * TILE_SIZE, TileY(tile) * TILE_SIZE, z);