Commit Graph

966 Commits

Author SHA1 Message Date
Jonathan G Rennison
726b5cb4f6 Speed up filtering of which viewport labels should be displayed.
Add an inline, fast, inaccurate check to catch most off-screen labels,
before the relatively slow and expensive checks.
2016-01-01 21:53:58 +00:00
Jonathan G Rennison
6ecf53530f Merge branch 'enhanced_viewport_overlay-sx' into jgrpp 2015-12-02 11:29:05 +00:00
Jonathan G Rennison
374316e4b4 Fix new/enlarged route step markers not being redrawn. 2015-12-02 11:27:59 +00:00
Jonathan G Rennison
9ee5aecbaf Merge branch 'enhanced_viewport_overlay-sx' into jgrpp 2015-11-24 01:06:51 +00:00
Jonathan G Rennison
d2cd74223e Fix another out of bound buffer read in viewport map mode.
Drawing of non-company tunnels/bridges.
Caught by AddressSanitizer.
2015-11-22 23:30:09 +00:00
Jonathan G Rennison
8e3d9a520c Merge branch 'enhanced_viewport_overlay-sx' into jgrpp 2015-11-20 23:58:03 +00:00
Jonathan G Rennison
e91b84753b Fix performance regression rendering vehicle route overlays.
Performance issue was triggered when orders were modified whilst
the route was displayed and the game was in multiplayer mode.
2015-11-20 23:13:22 +00:00
Jonathan G Rennison
f770dd1ed9 Fix out of bound buffer read for non-company tunnels in viewport map mode.
Caught by AddressSanitizer.
2015-11-18 00:04:56 +00:00
Jonathan G Rennison
f8e1cf0dec Fix out of bound buffer read for non-company tunnels in viewport map mode.
Caught by AddressSanitizer.
2015-11-17 22:20:14 +00:00
Jonathan G Rennison
8cc6bddc24 Merge branch 'enhanced_viewport_overlay-sx' into jgrpp
Conflicts:
	src/misc.cpp
2015-11-11 19:20:36 +00:00
Jonathan G Rennison
919057a5e6 Cache tunnel info in viewport map mode, to prevent render flicker.
If we see a tunnel during the usual tile scan, keep it in the cache
until it is explicitly evicted by a clear tunnel tile action, or
the cache is cleared at game init/load/shutdown.
Select colours at the drawing rather than the cache-building stage.
Bridges and tunnels are now stored/handled separately.
The process for bridges is mostly unchanged.
2015-11-11 19:18:32 +00:00
Jonathan G Rennison
3788228d8f Slightly lower displayed height of bridges in viewport map mode. 2015-11-11 01:02:24 +00:00
Jonathan G Rennison
9990b1b837 Merge branch 'enhanced_viewport_overlay-sx' into jgrpp 2015-11-03 00:06:15 +00:00
Jonathan G Rennison
2503704d38 Fix displayed height for bridge/tunnels in viewport map mode. 2015-11-03 00:01:42 +00:00
Jonathan G Rennison
b5695551a5 Merge branch 'enhanced_viewport_overlay-sx' into jgrpp 2015-11-01 21:51:59 +00:00
Jonathan G Rennison
aa9f44eaec 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).
2015-11-01 21:51:10 +00:00
Jonathan G Rennison
0dbbd19223 Merge branch 'enhanced_viewport_overlay' into jgrpp 2015-10-30 21:23:11 +00:00
Jonathan G Rennison
71a662ef84 Avoid closing nested templates with >> for backwards compatibility.
(cherry picked from commit bdf0216bf0)
2015-10-30 21:22:37 +00:00
Jonathan G Rennison
129e14d817 Fix redrawing/clearing of vehicle route lines.
Fix new route lines not being (fully) added in a timely manner.
Fix old lines not being (fully) removed until a scroll/zoom.
Fix the screen invalidation algorithm assuming that the terrain is
perfectly flat at at near sea level. (Use of MarkTileDirtyByTile to
clear lines which do not follow tile height contours).
2015-10-30 21:05:33 +00:00
Jonathan G Rennison
d453c478e6 Merge branch 'enhanced_viewport_overlay-sx' into jgrpp 2015-09-18 22:13:29 +01:00
Jonathan G Rennison
6e3b3c04de Enhanced viewports: Fix bug in previous fix for aqueducts in viewport map mode.
Tile type tests were being performed on the wrong tile index.
This fixes commit 5540374227.
2015-09-18 22:12:58 +01:00
Jonathan G Rennison
bdf0216bf0 Avoid closing nested templates with >> for backwards compatibility. 2015-08-26 19:07:48 +01:00
Jonathan G Rennison
6c971f9a55 Merge branch 'enhanced_viewport_overlay-sx' into jgrpp 2015-08-07 21:31:05 +01:00
Jonathan G Rennison
5540374227 Enhanced viewports: Fix crash when looking at aqueducts in viewport map mode.
Don't use water tile accessors on aqueduct bridge heads.
2015-08-07 21:30:33 +01:00
Jonathan G Rennison
44ed3cb3bd Merge branch 'town-rating-label' into jgrpp
Conflicts:
	src/lang/english.txt
	src/town_cmd.cpp
2015-08-06 01:25:11 +01:00
patch-import
33d395ad59 Import town rating label patch
http://www.tt-forums.net/viewtopic.php?p=1118282#p1118282
2015-08-06 00:19:40 +01:00
Jonathan G Rennison
7ed93f9211 Merge branch 'enhanced_viewport_overlay-sx' into jgrpp
town_gui.cpp updated due to struct CommandContainer change.

Conflicts:
	src/command.cpp
	src/command_type.h
	src/gfxinit.cpp
	src/openttd.cpp
	src/pbs.cpp
	src/saveload/extended_ver_sl.cpp
	src/saveload/extended_ver_sl.h
	src/saveload/saveload.cpp
	src/stdafx.h
	src/train_cmd.cpp
	src/viewport_type.h
	src/window_type.h
2015-08-05 21:54:11 +01:00
Jonathan G Rennison
e24839ed65 Merge branch 'master' into enhanced_viewport_overlay
Notes on conflict resolution:
* MarkTileDirtyByTile gained an extra param on both sides of the merge
  Move bridge level offset to be after zoom level param, as it's used less.
* Add zoom level params to MarkBridgeDirty functions
* Fix undefined behaviour in colour_index cycling in ViewportMapDraw

Conflicts:
	src/clear_cmd.cpp
	src/pbs.cpp
	src/rail_cmd.cpp
	src/toolbar_gui.cpp
	src/train_cmd.cpp
	src/vehicle.cpp
	src/viewport.cpp
	src/viewport_func.h
2015-08-05 21:25:13 +01:00
patch-import
536a95dfd0 Import combined Enhanced viewport: zoom out, overlays & tooltips (r53_27127) patch
https://www.tt-forums.net/viewtopic.php?f=33&t=53394
2015-08-05 21:24:30 +01:00
Jonathan G Rennison
3c9c0acba1 Merge branch 'measurement_tool' into jgrpp 2015-08-02 21:06:39 +01:00
patch-import
9dfdd8bce8 Import measurement patch
http://www.tt-forums.net/viewtopic.php?p=1086160#p1086160
2015-08-02 21:04:46 +01:00
patch-import
6de087786c Import and rebase zoning patch
Fix some of the whitespace issues

http://www.tt-forums.net/viewtopic.php?p=888801#p888801
2015-08-02 13:17:42 +01:00
alberth
b1f1647303 (svn r27344) -Doc: Documenting the (Re)setObjectToPlace functions. 2015-07-28 08:16:52 +00:00
alberth
3cd390b2ce (svn r27344) -Doc: Documenting the (Re)setObjectToPlace functions. 2015-07-28 08:16:52 +00:00
frosch
67ae231f1b (svn r27340) -Fix [FS#6338]: Silence warning by moving _string_colourmap to a file no its own. (Cif) 2015-07-26 09:47:17 +00:00
frosch
4830497f0b (svn r27340) -Fix [FS#6338]: Silence warning by moving _string_colourmap to a file no its own. (Cif) 2015-07-26 09:47:17 +00:00
frosch
f27dc40c8a (svn r27248) -Fix [FS#6257]: Town labels on smallmap and zoomed-out viewports were not centered. (_dp_) 2015-04-25 11:58:19 +00:00
frosch
9fb56ca02e (svn r27248) -Fix [FS#6257]: Town labels on smallmap and zoomed-out viewports were not centered. (_dp_) 2015-04-25 11:58:19 +00:00
frosch
8d04567343 (svn r27162) -Fix [FS#6208]: Tile selection was drawn outside of map in some cases. (adf88) 2015-02-22 15:05:48 +00:00
frosch
f26e9bf59d (svn r27162) -Fix [FS#6208]: Tile selection was drawn outside of map in some cases. (adf88) 2015-02-22 15:05:48 +00:00
frosch
939719ffc0 (svn r27161) -Fix [FS#6156] [FS#6206]: Reimplement the viewport drawing algorithm. 2015-02-22 14:42:34 +00:00
frosch
3adf082db2 (svn r27161) -Fix [FS#6156] [FS#6206]: Reimplement the viewport drawing algorithm. 2015-02-22 14:42:34 +00:00
frosch
d35670aa2a (svn r27160) -Fix: Division of signed values by TILE_SIZE requires cast to stay signed. 2015-02-22 14:14:30 +00:00
frosch
cfac8dbbc6 (svn r27160) -Fix: Division of signed values by TILE_SIZE requires cast to stay signed. 2015-02-22 14:14:30 +00:00
frosch
79380a566e (svn r27158) -Codechange: Simplify mapping from viewport to smallmap coordinates by duplicating less code. 2015-02-22 14:10:44 +00:00
frosch
06d1d50884 (svn r27158) -Codechange: Simplify mapping from viewport to smallmap coordinates by duplicating less code. 2015-02-22 14:10:44 +00:00
frosch
bd3a8bf9e4 (svn r27157) -Fix: Mark bridge middle tiles dirty when building/removing/changing bridges. 2015-02-22 14:01:24 +00:00
frosch
e8e49e5dda (svn r27157) -Fix: Mark bridge middle tiles dirty when building/removing/changing bridges. 2015-02-22 14:01:24 +00:00
frosch
891e4c40ce (svn r27148) -Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty. 2015-02-14 12:53:07 +00:00
frosch
2e1be6081d (svn r27148) -Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty. 2015-02-14 12:53:07 +00:00