Commit Graph

50287 Commits (42e57995dd59943476a7f9100e375ea8357b1fc4)
 

Author SHA1 Message Date
Jonathan G Rennison 42e57995dd Improve visibility of slopes under trees in viewport map vegetation mode
Loosely based on tree slope brightness adjustment from
https://github.com/nielsmh/OpenTTD/tree/tree-slope-brightness
3 years ago
Jonathan G Rennison eabfae9d31 MacOS: Change bundle ID
See: #208
3 years ago
Jonathan G Rennison 19b7ecf95a Merge branch 'master' into jgrpp 3 years ago
Charles Pigott 6af49b7885 Fix #8724: Got wrong DepotID/StationID for airports, causing crash 3 years ago
Charles Pigott 80fb1c74f0 Change: Make pathfinder account for maximum order speed, if set 3 years ago
milek7 b749d6f1cb Fix: Allow building with Allegro and without SDL on Linux 3 years ago
Jonathan G Rennison 4f74a83496 Add fast paths for clear/tree snow line checks in tile loop 3 years ago
Jonathan G Rennison 2e20da40ed Cache current value of snow line height 3 years ago
Jonathan G Rennison f595696e97 Add map bit to suppress water flooding checks
Set if all neighbour tiles are also water
This reduces the overhead of flood checks on large maps
3 years ago
Jonathan G Rennison 0df3e785cb Debug: Add console command to dump tile info 3 years ago
Jonathan G Rennison 1c1d272b57 Merge branch 'master' into jgrpp 3 years ago
translators e74069e4c2 Update: Translations from eints
estonian: 19 changes by siimsoni
french: 3 changes by glx22
3 years ago
Charles Pigott 8157af6d68 Fix #8276: Crash when a NewGRF object's size was not set 3 years ago
Charles Pigott 3af407340e Fix #8349: Close depot vehicle list windows when closing the depot window 3 years ago
Patric Stout 88959f5595
Codechange: [OSX] remove final bits of old debugging code (#8714) 3 years ago
Jonathan G Rennison c9ab460a03 Re-apply c0616750
Lost in merge: e95216b5
3 years ago
Jonathan G Rennison 2221805ddd Remove IncreaseRealtimeTick
Not needed as modal progress windows no longer use _realtime_tick
3 years ago
Jonathan G Rennison dfecdf3afb Merge branch 'master' into jgrpp
# Conflicts:
#	src/dock_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/terraform_gui.cpp
#	src/vehicle.cpp
#	src/video/allegro_v.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/dedicated_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
3 years ago
Charles Pigott 1d6a0c7b52 Fix: [YAPF] Road pathfinder did not account for length of tunnel/bridge in path cost
Copy calculations from the rail pathfinder
3 years ago
Charles Pigott c461999b2b Fix #8594: [NRT] Road pathfinder did not account for roadtype speed limits 3 years ago
Patric Stout e1b1608dc6
Fix ec1dd0bf: missing override causing compiler warnings (#8708) 3 years ago
Michael Lutz d16dc22fdf Codechange: Use C++-ism for zeroing. 3 years ago
Michael Lutz 5ca979b1e2 Fix: [OSX] Don't wait on the event loop for drawing. 3 years ago
Michael Lutz f3c192c63d Codechange: [OSX] Only keep a total dirty rect for drawing.
When drawing an 8bpp screen buffer, palette resolving was done for each
dirty rectangle. In areas with high activity, this would mean a pixel might
have been resolved multiple times. Also, if too many individual updates
were queued, the whole screen would be refreshed, even if unnecessary.

All other drivers only keep one overall dirty rect, so do it here as well.
3 years ago
translators 61275df7da Update: Translations from eints
estonian: 62 changes by siimsoni
korean: 1 change by telk5093
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
3 years ago
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 3 years ago
SamuXarick cb95b1d2e7 Codechange: Apply coding style 3 years ago
Patric Stout 058f13bdf9 Remove: [SDL] SDL 1.3 never happened, so remove all the special code for it 3 years ago
Patric Stout 0e76d965f1 Codechange: deduplicate tick-handlers of all video drivers
They were all identical, so better put this in a single place
hoping it is less likely to break.
3 years ago
Patric Stout 7996fadb91 Change: [Win32] Remove force_full_redraw and display_hz settings
These were special settings only for the win32-drivers, and
introduced in the very first version we track.

Time kinda had caught up with those variables, so it is time to
say farewell.

force_full_redraw was most likely a debug functionality "in case
our dirty-rect fails". This should no longer be needed.

display_hz was cute, as it had a max of 120. That is kinda
out-dated information, but I also doubt anyone was really using
this.
3 years ago
Patric Stout 23d6f4eac9 Codechange: [Win32] simplify when/where GdiFlush() is called 3 years ago
Patric Stout ec1dd0bf61 Codechange: be consistent in what CheckPaletteAnim() does and when it is called
Additionally, make sure this is a class method. Later commits
will make use of this.
3 years ago
Patric Stout 790fa7102e Codechange: be consistent in naming the paint function Paint()
Also move this function to be a class member. This to allow
further deduplicating of code in a later commit.
3 years ago
Patric Stout 761efbb457 Codechange: use (Un)LockVideoBuffer() to manage video buffer 3 years ago
Patric Stout 661eb39ecc Codechange: move all input-handling of video-drivers into InputLoop 3 years ago
Patric Stout 38b4ae1c0e Codechange: [Win32] make fast-forward check the same as with other drivers
It was of all the drivers the only one doing this slightly different.
When trying to unify more code, that was rather annoying.
3 years ago
Joe Stringer d21442941c Fix: [Cygwin] Fix missing uint definition
In file included from src/settingsgen/../string_func.h:30,
                 from src/settingsgen/settingsgen.cpp:11:
src/settingsgen/../core/bitmath_func.hpp:34:15: error: 'uint' does not name a type; did you mean 'uint8'?
   34 | static inline uint GB(const T x, const uint8 s, const uint8 n)
      |               ^~~~
      |               uint8
3 years ago
Patric Stout 08821f82b6 Fix: [Win32] run InteractiveRandom() once every tick, not once every message
Win32 was the only video driver doing this. It is just a bit too
much random.
3 years ago
Patric Stout 19fdbac287 Fix: [Win32] now we are drawing on a tick, no longer use WM_PAINT
WM_PAINT hits when-ever Windows feels like, but always after we
marked the screen as dirty. In result, it was lagging behind,
giving a sub-60fps experience.

With the new draw-tick there is no longer a need to be driven by
WM_PAINT, so it is better anyway to drive the drawing ourself. As
an added bonus this makes the win32 driver more like the others.
3 years ago
Jonathan G Rennison 8e3acbae28 Decrease model progress redraw timeout to 100ms 3 years ago
Jonathan G Rennison 68a0a4d1b9 Merge branch 'master' into jgrpp
# Conflicts:
#	src/newgrf_config.cpp
3 years ago
translators 5fc983a1bb Update: Translations from eints
german: 1 change by Wuzzy2
russian: 11 changes by Ln-Wolf
catalan: 2 changes by J0anJosep
spanish: 14 changes by perezdidac
3 years ago
Patric Stout b124c49ea4 Fix: [Actions] Also run CI against libsdl1.2 for every pull request 3 years ago
Patric Stout 8bf8c0f251 Fix d437445c: also use std::chrono for the GRFFileScanner modal window
For some reason I only converted one of the two modal windows we
have, and completely forgot the other.

While at it, synchronize the way those two modal windows work
in terms of "next_update".
3 years ago
Jonathan G Rennison e95216b59d Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/core/geometry_func.cpp
#	src/date.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/settings_type.h
#	src/video/allegro_v.cpp
#	src/video/dedicated_v.cpp
#	src/video/null_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
3 years ago
Patric Stout cb8e1706b2 Fix: [Actions] if SDL2 is installed, it is always picked over SDL1
So no need to install both SDL1 and SDL2, that gives a false idea
of reality.
3 years ago
Patric Stout d3df4674f9 Fix: [Actions] build our allegro driver too in our CI
This prevents us breaking it without realising.
3 years ago
Patric Stout 932abe6d5c Fix fa170b9: [SDL2] forgot to use GetGameInterval where needed 3 years ago
Patric Stout 15a0ac2735 Fix cd4f0f95: [Allegro] driver failed to build because of missing include 3 years ago
Patric Stout c4df0f95ae Fix: during switching of game-mode, drawing could show closed windows that shouldn't be closed yet
The higher your refresh-rate, the more likely this is. Mostly you
notice this when creating a new game or when abandoning a game.

This is a bit of a hack to keep the old behaviour, as before this
patch the game was already freezing your mouse while it was changing
game-mode, and it does this too after this patch. Just now it
freezes too a few frames earlier, to prevent not drawing windows
people still expect to see.
3 years ago