Commit Graph

25406 Commits (8c3fa2a3bf079424529a49b58f0466e4285d5874)
 

Author SHA1 Message Date
Peter Nelson 913d8a7f28 Cleanup: Use std::vector in RandomSpriteGroup. 3 years ago
Peter Nelson 1aeaf39954 Cleanup: Use std::vector in DeterministicSpriteGroup. 3 years ago
Peter Nelson f785a70a2b Cleanup: Use std::vector in RealSpriteGroup. 3 years ago
rubidium42 e097c83c83 Codechange: move some OS abstraction method implementations out of the header 3 years ago
rubidium42 22720332eb Codechange: encapsulate network error handling 3 years ago
rubidium42 0eb17a70af Codechange: rename NetworkError to ShowNetworkError 3 years ago
Matt Kimber 67063ceeb3
Fix 3d7ab09: stopped trains not updating viewport hash when reversed for a second time (#9165) 3 years ago
Matt Kimber 520595ff87
Fix 3d7ab09: stopped trains not updating viewport hash when reversed for a second time (#9165) 3 years ago
rubidium42 05394d5216 Fix #6598: Prevent invalid memory accesses when abandoning a join from within a network game
One could join a network game from within an already running network game. This would call a NetworkDisconnect, but keeps the UI alive. If, during that process the join is aborted, e.g. by cancelling on a password dialog, you would still be in your network game but also get shown the server list.
Solve all the underlying problems by falling back to the main UI when (re)connecting to a(nother) server.
3 years ago
rubidium42 83985fe26f Codechange: Move join information into a single structure 3 years ago
rubidium42 39c51c35f4 Fix #6598: Do not disconnect before company number validation
NetworkClientConnectGame already does a NetworkDisconnect, so no reason to do it here
3 years ago
rubidium42 3bd416bfdb Change: [Console] Show help when passing invalid company number 3 years ago
Loïc Guilloux 376f2509ad
Fix: Don't consider regression AIs when starting a random AI (#9164) 3 years ago
Loïc Guilloux 282d5d302d
Change: [Actions] Add a 2 minutes timeout for regression test (#9166) 3 years ago
rubidium42 0345f99180 Feature: make the town directory horizontally resizable 3 years ago
Loïc Guilloux 2985277bec
Fix d4f0b6f4: [CMake] CMAKE_PROJECT_VERSION_XXX are not in CMake 3.9 (#9154) 3 years ago
rubidium42 40528db993 Fix #9152, Fix #9153: screenshot command showed error messages when successful 3 years ago
Peter Nelson 9c6c0a0966 Codechange: Scale sprite font height once on init instead of every call to GetHeight().
Scaling is not expensive, but it does not change either, and this avoids the need for a virtual method call. This cascades back to all GetCharacterHeight(FS_xxx) and FONT_HEIGHT_xxx calls.
3 years ago
Peter Nelson ce55cd0ce7 Cleanup: Use GetDefaultFontHeight() call instead of direct access.
This makes this part of font size setup in FreeTypeFontCache consist with OSX and Windows variants.
3 years ago
Peter Nelson 49aa392440 Fix: Cargo legend blob in cargo payment rate window did not rescale. 3 years ago
Peter Nelson 055067c49c Fix: Scale cargo lines in industry chain window.
Replaces constant pixel values with values scaled based on font size.
This allows the industry chain to maintain a consistent look across
different sizes. Previously all except cargo line height were fixed.
3 years ago
Peter Nelson 254ffe9dcc Fix: Scale industry chain legend blob by font size. 3 years ago
Peter Nelson 957beaaefc Fix: Improved scaling and spacing of sign list window.
Both company icon sprite and text now centred within each row, and extra
padding added to avoid the sprites running into each other.
3 years ago
Peter Nelson 617e85cc65 Fix: Scale legend blobs in Fund new industry window. 3 years ago
Peter Nelson 5434d63f91 Fix: Scale smallmap legend 'blob' to fit text. 3 years ago
Peter Nelson af70195e44 Fix: Tidy up sizing of sprite aligner window sprite list. 3 years ago
Peter Nelson 1df510c297 Fix: Company Key window scaling. 3 years ago
Peter Nelson 09206be054 Fix: Use unscaled values for padding OSK 3 years ago
Peter Nelson 56a6f66903 Codechange: Use text lines instead of pixel height of font for link graph widgets. 3 years ago
Peter Nelson 63cc340dc1 Codechange: Apply minimum size to toolbar widgets 3 years ago
Peter Nelson d32df00b5c Codechange: No longer necessary to manually resize volume sliders. 3 years ago
Peter Nelson 4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 3 years ago
Peter Nelson 6fe5353da2 Cleanup: Set unchanging scrollbar properties in constructor. 3 years ago
Peter Nelson 03a43b8247 Cleanup: Call SetMinimalSize instead of setting min_y directly. 3 years ago
Peter Nelson f5569763c9 Fix: Specify width when width is required instead of top. 3 years ago
Peter Nelson 2efa390a7d Codechange: Simplify calling of DrawCharCentered() 3 years ago
Peter Nelson 4f93dd95e4 Cleanup: Tidy up resize, fill and minimal size on widgets in town list window. 3 years ago
Peter Nelson 4c6cca459a Cleanup: Remove fairly redundant DrawDropdown() function. 3 years ago
Peter Nelson 5153e1b6e3 Cleanup: Horizontal widget size is commonly width rather than length. 3 years ago
PeterN 3dbd6475fe
Codechange: Use C++ features for train wagon overrides. (#9141)
This removes the need for C-style array management and allows use of iterators to perform wagon override lookups.
3 years ago
Patric Stout 665a3928e2 Remove: performance measurements in YAPF
YAPF was constantly measuring its performance, but only at
certain debug-levels this information was shown.

Now after years, I sincerely wonder if anyone still knows about this
feature and who still use it. Especially with the new framerate window,
this detailed performance is not as meaningful anymore as it once
was.
3 years ago
Patric Stout e162aff7a3 Cleanup: remove weird left-over comment in yapf.hpp 3 years ago
Patric Stout 69118d063f
Change: use TCP for everything except for master-server and initial server scan (#9130)
This means that pressing Refresh button and adding servers manually
now uses TCP.

The master-server and initial scan are still UDP as they will be
replaced by Game Coordinator; no need to change this now.

If we query a server that is too old, show a proper warning to the
user informing him the server is too old.
3 years ago
rubidium42 f00564eeb2
Fix: String validation could leave invalid Utf8 encoded strings (#9096)
In case a character was encoded in multiple bytes, but required fewer bytes to be encoded, the first byte would be copied to the output leaving an invalid Utf8 encoded string. Later uses of the validated string would use the same decode logic, which would yield a question mark and just read a single byte, so nothing dangerous happened.
Furthermore, because the next byte would not be a first byte of an encoded Utf8 character, the last few valid characters could be removed by the validation as well.
3 years ago
PeterN f018471b36
Cleanup: Remove old FiosList helper methods. (#9139) 3 years ago
glx22 9a8756d7ed Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops 3 years ago
glx22 14e92bd8e2 Codechange: Replace window related FOR_ALL with range-based for loops 3 years ago
rubidium42 a61696d6c5 Change: [Network] Encapsulate logic about the connection string to the network code (#23) 3 years ago
Patric Stout be37a2cab8 Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
3 years ago
Patric Stout 99f998805b Codechange: use std::string over stack-based strings if possible 3 years ago