Commit Graph

24782 Commits

Author SHA1 Message Date
Michael Lutz
c78e559e88 Codechange: [OSX] Remove unused 'app active' flag. 2021-02-13 22:21:17 +01:00
Michael Lutz
9c8721922b Fix: [OSX] An emulated right mouse down event has to be followed by right mouse up. 2021-02-13 22:21:17 +01:00
Michael Lutz
649ff5f9f9 Codechange: [OSX] Use relative mouse handling during scrolling. 2021-02-13 22:21:17 +01:00
Michael Lutz
43326d11d8 Change: [OSX] Use a layer-backed view to speed up drawing. 2021-02-13 22:21:17 +01:00
Michael Lutz
2a8c3a2cf6 Codechange: [OSX] Align backing buffer pitch for a tiny bit performance. 2021-02-13 22:21:17 +01:00
Michael Lutz
94b76ce9a4 Cleanup: [OSX] Move event loop into video driver file. 2021-02-13 22:21:17 +01:00
Michael Lutz
23389e9491 Remove: [OSX] Startup splash screen.
It wasn't displayed anyway as it was never copied to the bundle.
2021-02-13 22:21:17 +01:00
Michael Lutz
063b90b97d Codechange: [OSX] Move key event handling to our view. 2021-02-13 22:21:17 +01:00
Michael Lutz
f4bd54fedd Codechange: [OSX] Move mouse event handling to our NSView. 2021-02-13 22:21:17 +01:00
Michael Lutz
bd42fc94cc Codechange: [OSX] Move some things from video driver to our NSView. 2021-02-13 22:21:17 +01:00
Michael Lutz
965ce12947 Codechange: [OSX] Use newer mouse tracking API. 2021-02-13 22:21:17 +01:00
Michael Lutz
42af13c141 Codechange: [OSX] Split drawing into its own subview.
This allows the drawing backend code to be independent
of any event or command handling.
2021-02-13 22:21:17 +01:00
Michael Lutz
60f30036f1 Codechange: [OSX] Drain autoreleased objects in each game loop cycle. 2021-02-13 22:21:17 +01:00
Michael Lutz
8aaf4ea098 Codechange: [OSX] Split Window and back buffer creation in Cocoa video driver. 2021-02-13 22:21:17 +01:00
Michael Lutz
0eff7de659 Cleanup: [OSX] Doxygen comment style in video driver. 2021-02-13 22:21:17 +01:00
Michael Lutz
8ced72ab10 Codechange: [OSX] Inline some functions that are used in only one place. 2021-02-13 22:21:17 +01:00
Michael Lutz
13134f9d64 Codechange: [OSX] Replace #define with modern code. 2021-02-13 22:21:17 +01:00
Michael Lutz
88f6c7a9f3 Codechange: [OSX] Fold remaining Cocoa video subdriver into the main driver. 2021-02-13 22:21:17 +01:00
Michael Lutz
e6bea3961f Change: [OSX] Replace screen resolution list with suggested window sizes.
We never change the real screen resolution on OSX. As such, offering a list
of resolutions is pointless. Instead of that, offer the user a list of
commonly used window sizes up to the current screen size.
2021-02-13 22:21:17 +01:00
Michael Lutz
4db7837d06 Codechange: [OSX] There is only one subdriver left, remove virtual dispatch. 2021-02-13 22:21:17 +01:00
Michael Lutz
63ed3f3575 Codechange: Move Fontconfig-specific code to a seperate file. 2021-02-13 20:09:14 +01:00
Michael Lutz
f2294851e6 Codechange: [OSX] Move OSX-specific font code to a separate file. 2021-02-13 20:09:14 +01:00
Michael Lutz
c6af8f16f6 Codechange: [Win32] Move Win32-specific font code to a seperate file. 2021-02-13 20:09:14 +01:00
Michael Lutz
5ad1640984 Codechange: Make OS font handle of the FontCache read-only. 2021-02-13 20:09:14 +01:00
Michael Lutz
2b0200d429 Codechange: OS-specific data for font search is not used outside of searching. 2021-02-13 20:09:14 +01:00
Michael Lutz
84636fc2af Codechange: Remove all remaining uses of cpp_offset. 2021-02-13 20:08:53 +01:00
Michael Lutz
7845434270 Codechange: Don't use cpp_offsetof in the save/load code.
Many of the member variables that are used in save/load are inside types
that are not standard layout types. Using pointer arithmetics to determine
addresses of members inside types that are not standard layout is generally
undefined behaviour. If we'd use C++17, it is conditionally supported, which means
each compiler may or may not support it. And even then using it for individual
array elements is syntactically not supported the the standard offsetof function.

Unfortunately, the trickery employed for saving linkgraph settings causes quite some
clutter in the settings ini files.
2021-02-13 20:08:53 +01:00
Michael Lutz
9c9292949f Codechange: Don't use cpp_offsetof in the TTO/TTD savegame loader.
Many of the member variables that are used in the oldloader are inside types
that are not standard layout types. Using pointer arithmetics to determine
addresses of members inside types that are not standard layout is generally
undefined behaviour. If we'd use C++17, it is conditionally supported, which means
each compiler may or may not support it. And even then using it for individual
array elements is syntactically not supported the the standard offsetof function.
2021-02-13 20:08:53 +01:00
translators
0f621b4956 Update: Translations from eints
portuguese (brazilian): 36 changes by AKANexus
2021-02-13 18:59:59 +00:00
SamuXarick
36ab9c64ef Fix: Desert/rainforest data coordinate 'y' is off by 1 when their 'x' coordinate is negative 2021-02-13 19:18:41 +01:00
Charles Pigott
d9df20d102 Change: Use a more specific error message when attempting to bulldoze your own HQ 2021-02-13 18:10:13 +00:00
glx22
348f322df1 Fix f1f281b31: [Win32] MinGW doesn't know timeapi.h 2021-02-13 19:07:42 +01:00
glx22
f181037bed Change: [Actions] Also run CI for VS2017 2021-02-13 17:31:57 +01:00
glx22
5a4d5f03b0 Codechange: Implement a constructor for CurrencySpec 2021-02-13 17:31:57 +01:00
Johannes E. Krause
3ac43582c2 Codechange: [NewGRF] Make it more explicit which parts of the TTD vehicle structure (var 80+) are not implemented 2021-02-13 16:07:23 +00:00
translators
fa0704138d Update: Translations from eints
spanish (mexican): 7 changes by absay
dutch: 7 changes by Afoklala
french: 7 changes by arikover
2021-02-12 19:00:59 +00:00
Patric Stout
52317bb7df Change: [SDL2] Remove unneeded delay of redrawing the screen
In testing, I could find no reason why this statement is here.

The comment is rather unclear (it states what it does, but not
why it would be needed).

This line of code was introduced with f4f40448, which gives no
further insight on why it would be needed to have it here.

As such, let's remove it and see if anyone else reports any
problems with it. If so, this commit can be reverted and a more
clear comment should be added what this line of code is dealing
with (the WHY, not the WHAT).
2021-02-11 20:23:53 +01:00
Patric Stout
2e1535389a Codechange: [SDL2] Don't use globals if we can do with locals 2021-02-11 20:23:53 +01:00
Patric Stout
2bbef6b5cf Codechange: [SDL2] Name paint function Paint(), like other drivers do
This reduces confusion when reading different drivers.
2021-02-11 20:23:53 +01:00
Patric Stout
569ce6c7b4 Fix 30e69c51: palette was not marked dirty when creating a new
This means the code depended that the caller did this for us
before MakePalette() is executed, which is neither a
requirement nor a promise the code makes.
2021-02-11 20:23:53 +01:00
translators
64e2d6b672 Update: Translations from eints
korean: 7 changes by telk5093
russian: 11 changes by Ln-Wolf
finnish: 7 changes by hpiirai
2021-02-11 19:01:10 +00:00
Kuhnovic
83ddb1501f
Feature: Remove all industries button in scenario editor (#8550) 2021-02-10 16:35:50 +01:00
Loïc Guilloux
f1f281b318
Fix: [Win32] Set minimum resolution for timers to 1ms. (#8660) 2021-02-09 21:21:57 +01:00
Owen Rudge
395e015282 Change: Convert .md to .rtf for Windows/Mac packages 2021-02-08 23:23:24 +00:00
embeddedt
6c8f2227cd
Fix: [Emscripten] open links in browser (#8655) 2021-02-08 19:18:30 +01:00
Patric Stout
ac2b5e57cf
Fix: mention our websites with https:// (instead of http://) (#8657)
It is 2021. Nobody should advertise http anymore. Not even us.
2021-02-08 19:07:34 +01:00
Owen Rudge
da4c404f3d Fix: [Actions] Use same vcpkg commit for CI on macOS as release builds 2021-02-08 16:13:03 +00:00
glx22
af0acc9a75 Update: Specify CMake minimum version in COMPILING.md
Also give some hints for MSVC users.
2021-02-07 16:21:13 +01:00
glx22
2cbfcd2327 Change: [CMake] Bump minimum version to 3.9 2021-02-07 16:21:13 +01:00
Loïc Guilloux
b927da73c1
Fix 81d335b081: Use non-pulsating red highlight for coverage (#8622) 2021-02-07 16:20:26 +01:00