summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
AgeCommit message (Collapse)Author
2019-03-09Codechange: Make a merged k-d tree index of all viewport signsNiels Martin Hansen
2019-02-23Fix #7004: Mark linkgraph dirty to be rebuilt on next draw call. (#7265)PeterN
Previously the linkgraph was rebuilt before the viewport extents were finalized.
2019-02-03Revert 479f13fc41, Fix #7133, Fix #7136: "Codechange: Tweak ↵Peter Nelson
ViewportAddLandscape so it no more relies on "go down as fast as possible" tile height model (Patch by adf88, #6583)" This reverts commit 479f13fc4133f2970aff82d2d0fb9b3c0cb919da.
2019-01-24Codechange: Tweak ViewportAddLandscape so it no more relies on "go down as ↵Johannes E. Krause
fast as possible" tile height model (Patch by adf88, #6583)
2019-01-24Codechange: Simplify marking tiles dirty when terraforming (Patch by adf88, ↵Johannes E. Krause
#6583)
2019-01-24Fix: jumping effect when scrolling viewport over bottom edge of the map ↵Johannes E. Krause
(Patch by adf88, #6583)
2019-01-24Codechange: Add InverseRemapCoords2 function for remapping viewport ↵Johannes E. Krause
coordinates to underlying tile coordinates (Patch by adf88, #6583)
2019-01-20Fix: Round up deltas for smooth scrolling, so target will be reachedbtzy
2019-01-17Fix: Some code and comment typosnikolas
Found with codespell
2018-11-18Revert: Sprite sorting optimisation sorted incorrectly.frosch
This reverts commit 25ab9c1997f770f4a8a66bb3ad4b82ba87e3a977.
2018-10-31Remove: A few bits of dead codeCharles Pigott
2018-10-26Codechange: Improve (un)zoom performanceJindrich Makovicka
When zooming out with a high res display, there can be about 150k sprites to be sorted before displaying. With the O(n^2) complexity of the sprite sorter, this can take several seconds. This patch works around this by sorting the sprites by the xmin coordinate first using QSort, which later allows an early bailout out of the inner loop. This is enough to cut down the full unzoom time on a 4k display to a fraction of second.
2018-07-19Feature: Framerate display window (#6822)Niels Martin Hansen
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
2018-04-30Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation.J0an Josep
2018-04-24Feature: GS methods to scroll viewport for players (#6745)Pavel Stupnikov
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2015-07-28(svn r27344) -Doc: Documenting the (Re)setObjectToPlace functions.alberth
2015-07-26(svn r27340) -Fix [FS#6338]: Silence warning by moving _string_colourmap to ↵frosch
a file no its own. (Cif)
2015-04-25(svn r27248) -Fix [FS#6257]: Town labels on smallmap and zoomed-out ↵frosch
viewports were not centered. (_dp_)
2015-02-22(svn r27162) -Fix [FS#6208]: Tile selection was drawn outside of map in some ↵frosch
cases. (adf88)
2015-02-22(svn r27161) -Fix [FS#6156] [FS#6206]: Reimplement the viewport drawing ↵frosch
algorithm.
2015-02-22(svn r27160) -Fix: Division of signed values by TILE_SIZE requires cast to ↵frosch
stay signed.
2015-02-22(svn r27158) -Codechange: Simplify mapping from viewport to smallmap ↵frosch
coordinates by duplicating less code.
2015-02-22(svn r27157) -Fix: Mark bridge middle tiles dirty when ↵frosch
building/removing/changing bridges.
2015-02-14(svn r27148) -Fix: Rounding and unit-conversion inconsistencies in calls to ↵frosch
MarkAllViewportsDirty.
2014-10-15(svn r27020) -Cleanup: some coding style consistency improvements (mostly ↵rubidium
spaces)
2014-10-12(svn r27002) -Fix-ish: replace some non-ASCII characters with ASCII ↵rubidium
characters, e.g. @þaram to @param
2014-09-22(svn r26910) -Fix: account for the height of the landscape at the edge of ↵rubidium
the map to determine the scroll boundaries (based on patch by ic111)
2014-09-22(svn r26908) -Codechange: replace a magic number by a more logical calculationrubidium
2014-09-21(svn r26900) -Fix-ish: dirty the appropriate area around map edges when ↵rubidium
terraforming there to prevent any artefacts from occuring (ic111)
2014-09-21(svn r26899) -Codechange: reduce the amount of tiles that needs to be drawn ↵rubidium
by taking the height of tiles into account instead of drawing way too many (ic111)
2014-09-21(svn r26870) -Fix (r15190): since freeform edges the 'tile height' at ↵rubidium
southern edge * 8 pixels just 'south' of the edge tile would not be drawn and would as a result not be refreshed causing artefacts to remain there. This adds a virtual slope to level 0 so it can be redrawn appropriately. Loosely based on patch by ic111
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-02-15(svn r26338) -Fix [FS#5908]: Don't redraw the link graph overlay if it's ↵fonsinchen
empty (MJP)
2014-01-02(svn r26209) -Codechange: remove some template magic and simplify some coderubidium
2014-01-02(svn r26205) -Feature: SSE 4.1 sprite sorter, improving the sorting ↵rubidium
performance significantly (MJP) For example with GCC 4.8, x86_64 Linux, Intel i5-3337U this patch improves the performance of Pile, Treham and Hamac test save games by about 10% in over-all run time at fast forward at 1920x1080 when zoomed out and when trees are not disabled.
2013-10-06(svn r25823) -Codechange [FS#5780]: Simplify if-cases in ↵frosch
ViewportDrawStrings. (Juanjo)
2013-06-30(svn r25546) -Fix: two small memory leaksrubidium
2013-05-19(svn r25264) -Feature: linkgraph overlay over main viewport (fonsinchen)rubidium
2013-02-06(svn r24975) -Fix [FS#5463]: Additional zoom in levels could glitch by a few ↵frosch
pixels due to incorrect rounding.
2013-01-08(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by ↵planetmaker
Eagle_rainbow)
2012-04-25(svn r24179) -Codechange: move some variables of Town to TownCacherubidium
2012-03-25(svn r24068) -Change/fix [FS#5103]: significantly reduce the area that is ↵rubidium
redrawn for text effects (Rhamphoryncus)
2012-03-25(svn r24065) -Feature-ish [FS#5101]: debug option for showing the redrawn ↵rubidium
dirty blocks/rectangles
2012-01-22(svn r23835) -Change [FS#4999]: Make signs placed in scenario editor belong ↵frosch
to the GS. That way they are always shown in game and are not editable.
2011-12-19(svn r23621) -Add: allow manipulation of signs via GameScriptstruebrain
2011-11-25(svn r23329) -Fix (r23316): Scale child sprite pixel offsets unless told not ↵peter1138
to. Fixes lifts and industry graphics.
2011-11-24(svn r23316) -Feature: Add ability to zoom in to 2x and 4x level.peter1138
2011-11-24(svn r23314) -Add: Add settings to restrict viewport zoom levels.peter1138
2011-11-06(svn r23125) -Codechange: Replace some 8s with TILE_SIZE / 2. (adf88)frosch