Commit Graph

58 Commits

Author SHA1 Message Date
Patric Stout ea8c1d8597 Change: make for smooth-scrolling based on actual time
This means if rendering takes a bit longer, scrolling goes a bit
quicker, making travel time always about the same time for the
same distance.
2024-01-25 10:29:48 +01:00
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 2024-01-06 13:37:33 +01:00
Peter Nelson a0dfb76e34 Codechange: Replace mishmash of types for widget index with WidgetID.
Indices were stored as int, but often passed around as uint/uint8_t and casts.

Now they should all use WidgetID.
2023-12-30 00:23:57 +00:00
Patric Stout 0238a2b567
Codechange: use std::variant instead of using bitflags in the value (#11191) 2023-08-12 16:05:00 +00:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium 321f01602a Codechange: reduce passing around parameters, but formatting strings earlier 2023-06-23 06:48:13 +02:00
Jonathan G Rennison d7bf6b2c07 Feature: Highlight waypoint tiles when adjacent or distant joining 2023-06-04 16:54:48 +01:00
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 2023-01-29 20:28:45 +01:00
Peter Nelson 002fe67bef Add: Optionally disable child sprites drawing relative to parent sprites offsets. 2022-12-23 15:43:11 +00:00
Tyler Trahan fbbc80f79e Fix #9020: Update station coverage highlight when adding/removing tiles 2022-03-10 20:54:45 +01:00
Niels Martin Hansen 6bd3106681 Feature: Multiple rotating views on title screen 2021-09-12 19:46:48 +02:00
Matt Kimber 40d5fe1631
Fix eeb88e8: Trains reversed while paused do not correctly update sprite bounds (#8540) 2021-01-17 19:57:16 +01:00
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
2020-07-27 17:31:29 +01:00
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 2020-01-12 19:37:43 +00:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
peter1138 81d335b081 Feature: Add station coverage area display for towns. 2019-04-25 09:14:01 +02:00
peter1138 b6733edd17 Feature: Add coverage area display for existing stations. 2019-04-25 09:14:01 +02:00
Niels Martin Hansen 37daf43037 Change: Zoom title game by UI zoom level 2019-04-24 23:04:55 +02:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Johannes E. Krause 05da5a177c Codechange: Simplify marking tiles dirty when terraforming (Patch by adf88, #6583) 2019-01-24 21:17:17 +01:00
frosch 3adf082db2 (svn r27161) -Fix [FS#6156] [FS#6206]: Reimplement the viewport drawing algorithm. 2015-02-22 14:42:34 +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 e8e49e5dda (svn r27157) -Fix: Mark bridge middle tiles dirty when building/removing/changing bridges. 2015-02-22 14:01:24 +00:00
rubidium 073aa05da5 (svn r26900) -Fix-ish: dirty the appropriate area around map edges when terraforming there to prevent any artefacts from occuring (ic111) 2014-09-21 17:29:48 +00:00
rubidium 4d619ad10e (svn r26899) -Codechange: reduce the amount of tiles that needs to be drawn by taking the height of tiles into account instead of drawing way too many (ic111) 2014-09-21 17:27:37 +00:00
rubidium ef7befdbd8 (svn r25264) -Feature: linkgraph overlay over main viewport (fonsinchen) 2013-05-19 14:49:25 +00:00
peter1138 07633a064c (svn r23329) -Fix (r23316): Scale child sprite pixel offsets unless told not to. Fixes lifts and industry graphics. 2011-11-25 23:06:17 +00:00
rubidium faf5d899f7 (svn r22017) -Codechange: move MarkTileDirtyByTile to viewport_func.h 2011-02-07 22:29:47 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
rubidium d89095b3ec (svn r21843) -Codechange: move documentation towards the code to make it more likely to be updates [t-z]. 2011-01-18 21:58:22 +00:00
alberth 3b0ee65571 (svn r21270) -Doc: Doxyment updates and additions. Removal of doxyment in code. 2010-11-20 14:15:02 +00:00
alberth 83094e5e58 (svn r21020) -Add: Use center of waypoint in waypoint gui, if available. 2010-10-23 20:39:21 +00:00
smatz bb4538665a (svn r20761) -Codechange: make PlaceObject() static 2010-09-07 11:05:22 +00:00
smatz 15c2a2d555 (svn r20760) -Cleanup (r20753): remove unused CheckMouseOverVehicle() 2010-09-07 11:03:46 +00:00
rubidium 3118292b14 (svn r19807) -Codechange: instead of having an unnamed enum and passing it as an int, name the enum and pass that 2010-05-13 08:56:01 +00:00
alberth 8d1d4267af (svn r19767) -Fix [FS#3808]: Height in smallmap was different from measured heights (ChillCore). 2010-05-07 20:39:00 +00:00
rubidium f94c83a387 (svn r18872) -Codechange: introduce PaletteID and use it 2010-01-21 01:38:13 +00:00
frosch a9d4147eb2 (svn r18702) -Fix [FS#3467]: Enable DrawGroundSpriteAt() to deal with foundations as DrawGroundSprite() does, and use this for drawing one-way-road-signs and clear-land-fences. 2010-01-03 20:55:00 +00:00
rubidium b0603f4c2e (svn r18602) -Codechange: unify the viewport sign and text effect drawing
-Fix [FS#3394]: signs could occasionally glitch
2009-12-22 12:50:41 +00:00
rubidium 0e78fdb54c (svn r18486) -Fix: when switching language and you're getting a different font, recalculate the coordinates/sizes of the viewport signs. Otherwise it gets glitchy or abbreviated (in the smallmap) 2009-12-13 19:33:07 +00:00
rubidium ff5b46190d (svn r18343) -Fix [FS#3336] (r18243): dark blue signs would be drawn transparent 2009-11-29 19:27:53 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 8275a98e1f (svn r16764) -Codechange: unify the way viewport signs are marked dirty 2009-07-08 08:30:35 +00:00
rubidium 3086383cdc (svn r16761) -Codechange: make UpdateViewportSignPos(ition) a class function of ViewportSign 2009-07-07 16:51:20 +00:00
frosch 8745a30971 (svn r16528) -Fix [FS#2959]: Draw PBS reservation as groundsprite resp. childsprite of foundation/bridgehead. 2009-06-07 13:25:21 +00:00
smatz af293142fe (svn r15725) -Fix: centering on a vehicle didn't respect its z coordinate 2009-03-15 15:25:18 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
rubidium 1357b0a4c2 (svn r14789) -Feature: allow scrolling with the left mouse button pressed (if enabled). Primarily useful for systems with touch screen (aapo) 2009-01-02 22:42:05 +00:00
rubidium cd3dda5c0c (svn r13010) -Codechange: move the tree building GUI out of misc_gui.cpp. 2008-05-08 13:29:35 +00:00
rubidium cabd771fc0 (svn r13009) -Codechange: move more tile highlighting related functions/types to tilehighlight_*.h. 2008-05-08 13:21:55 +00:00