frosch
fcad801685
Fix #12127 , 555a379: Truncation ellipses rendered shadows even for black font without shadows ( #12132 )
...
(cherry picked from commit bb86023d50
)
7 months ago
frosch
89b6773c93
Fix: Shadows of individual character glyphs could be drawn over other characters ( #12115 )
...
(cherry picked from commit 555a37930b
)
7 months ago
Jonathan G Rennison
c45bfccc2e
Always use 27ms/tick in wallclock timing mode
8 months ago
Jonathan G Rennison
2f1d2a9f4b
Survey: Don't transmit invalid realtime duration
8 months ago
Jonathan G Rennison
4a9803c6f0
Do not override global blitter to render overlay/plans to cache buffer
...
Creates thread safety issues with active draw jobs
8 months ago
Jonathan G Rennison
3365efa5b2
Ensure that sprite aligner click to pick sprites is thread safe
...
Use a mutex for list of sprite IDs found in (threaded) draw jobs
8 months ago
Jonathan G Rennison
539ca43525
Replace asserts with exits in GfxFillRect
8 months ago
Jonathan G Rennison
5404be172c
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/bitmath_func.cpp
# src/core/bitmath_func.hpp
# src/core/geometry_type.hpp
# src/game/game_text.hpp
# src/graph_gui.cpp
# src/pathfinder/npf/npf.cpp
# src/script/api/script_text.cpp
# src/spritecache.cpp
# src/track_func.h
8 months ago
Peter Nelson
ae575a7a5b
Codechange: Store text run positions in vector of points.
...
This simplifies the interlaced vector of x/y positions.
8 months ago
Michael Lutz
8ab3b6b205
Fix #11791 , e1f5be62: Run missing-glyph detection after toggling sprite font. ( #11812 )
...
(cherry picked from commit fd59393899
)
8 months ago
Jonathan G Rennison
bb22440ab7
Update text-size related caches after changing font details
9 months ago
Jonathan G Rennison
d7b75614bb
Merge branch 'master' into jgrpp
...
# Conflicts:
# media/baseset/CMakeLists.txt
# src/build_vehicle_gui.cpp
# src/console.cpp
# src/debug.cpp
# src/fontcache/freetypefontcache.cpp
# src/network/network.cpp
# src/openttd.cpp
# src/os/macosx/font_osx.cpp
# src/os/windows/font_win32.cpp
# src/settings_gui.cpp
# src/video/sdl2_v.cpp
# src/widgets/settings_widget.h
# src/window_gui.h
9 months ago
Patric Stout
302ba93471
Fix: [SDL2] only resolutions of the first display were shown ( #11778 )
9 months ago
Peter Nelson
a6873ef7dd
Codechange: Avoid repeatedly calling virtual methods in text drawing loop. ( #11774 )
9 months ago
Jonathan G Rennison
02e6925c2a
Select zoom layer before doing clipping/offsets in GfxBlitter
9 months ago
Jonathan G Rennison
bd35b0c47c
Debug: Log more info in GfxBlitter sprite dimension assert failures
9 months ago
Jonathan G Rennison
97e6f3062e
Adding of _t to (u)int types, and WChar to char32_t
...
See: eaae0bb5e
9 months ago
Jonathan G Rennison
f034714559
Use StringBuilder for GetString/GetStringWithArgs, as per upstream
...
Update dependent code as required
9 months ago
Jonathan G Rennison
b72366419b
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/blitter/32bpp_anim.cpp
# src/blitter/8bpp_optimized.cpp
# src/gfx.cpp
# src/gfx_func.h
# src/gfxinit.cpp
# src/network/core/os_abstraction.cpp
# src/spritecache.cpp
9 months ago
Peter Nelson
9ce1626bb4
Change: Support custom transparency remaps with 32bpp blitters.
...
This closes a 15 year old TODO...
9 months ago
Peter Nelson
daec0e2ca4
Codechange: Split palette handling to separate file.
9 months ago
Peter Nelson
4ecc107d30
Codechange: Perform simpler comparison first when checking for palette updates.
...
This avoids unnecessarily comparing contents of an array.
9 months ago
Jonathan G Rennison
d5a7a67b8c
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# src/ai/ai_gui.cpp
# src/blitter/32bpp_optimized.cpp
# src/blitter/32bpp_simple.cpp
# src/blitter/32bpp_sse2.cpp
# src/blitter/8bpp_optimized.cpp
# src/blitter/8bpp_simple.cpp
# src/blitter/null.cpp
# src/blitter/null.hpp
# src/company_gui.cpp
# src/game/game_gui.cpp
# src/genworld_gui.cpp
# src/gfx.cpp
# src/gfx_func.h
# src/graph_gui.cpp
# src/industry_gui.cpp
# src/linkgraph/linkgraphjob.cpp
# src/network/network_gui.cpp
# src/newgrf_debug_gui.cpp
# src/openttd.cpp
# src/pathfinder/npf/aystar.h
# src/road_gui.cpp
# src/saveload/order_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/script/api/script_log.cpp
# src/script/api/script_town.cpp
# src/script/script_gui.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_table.cpp
# src/settings_type.h
# src/smallmap_gui.cpp
# src/sortlist_type.h
# src/spritecache.cpp
# src/spriteloader/grf.cpp
# src/spriteloader/grf.hpp
# src/spriteloader/spriteloader.hpp
# src/station_cmd.cpp
# src/station_cmd.h
# src/station_gui.cpp
# src/strings.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/town_gui.cpp
# src/vehicle_gui.cpp
# src/vehicle_gui_base.h
# src/video/opengl.cpp
# src/video/opengl.h
# src/widgets/dropdown.cpp
# src/widgets/dropdown_type.h
# src/window_gui.h
9 months ago
Peter Nelson
fd0aa3dd19
Fix #11515 : Zoom level could wrap around when changing interface scale. ( #11615 )
...
This happened due to converting the new value to unsigned before clamping instead of after.
9 months ago
Peter Nelson
c1afbc9415
Fix: Update widget dimensions before updating viewport signs. ( #11611 )
...
Viewport signs used fullbevel WidgetDimensions before it was updated for the new interface scale.
9 months ago
Peter Nelson
b19a6c3b81
Fix: Window width/height was doubly-scaled with automatic DPI switch. ( #11598 )
10 months ago
Jonathan G Rennison
4fac6b295c
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/release-linux.yml
# src/base_consist.h
# src/blitter/32bpp_optimized.cpp
# src/blitter/32bpp_optimized.hpp
# src/blitter/32bpp_sse2.hpp
# src/blitter/8bpp_optimized.hpp
# src/gfx_func.h
# src/industry_cmd.cpp
# src/industrytype.h
# src/linkgraph/linkgraphjob.cpp
# src/mixer.cpp
# src/newgrf_callbacks.h
# src/openttd.cpp
# src/os/macosx/macos.mm
# src/os/windows/win32.cpp
# src/pathfinder/npf/npf.cpp
# src/road_cmd.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.h
# src/saveload/vehicle_sl.cpp
# src/sound.cpp
# src/spritecache.cpp
# src/spriteloader/spriteloader.hpp
# src/station_map.h
# src/timetable_cmd.cpp
# src/timetable_cmd.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/vehicle_cmd.cpp
# src/vehicle_gui_base.h
# src/video/opengl.cpp
# src/video/opengl.h
# src/viewport.cpp
10 months ago
Jonathan G Rennison
2e06374f6f
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/gfx_func.h
# src/group_gui.cpp
# src/industry_gui.cpp
# src/misc_gui.cpp
# src/news_gui.cpp
# src/settings_gui.cpp
# src/ship_gui.cpp
# src/smallmap_gui.cpp
# src/station_gui.cpp
# src/subsidy_gui.cpp
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/town_gui.cpp
# src/vehicle_gui.cpp
# src/viewport.cpp
# src/widget.cpp
# src/widgets/dropdown.cpp
# src/window.cpp
10 months ago
Jonathan G Rennison
5ae74ecf8e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/articulated_vehicles.cpp
# src/articulated_vehicles.h
# src/autoreplace_cmd.cpp
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/core/format.hpp
# src/genworld_gui.cpp
# src/gfx.cpp
# src/group_gui.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/misc/endian_buffer.hpp
# src/music/music_driver.hpp
# src/newgrf_gui.cpp
# src/rail_cmd.cpp
# src/road_gui.cpp
# src/settings_type.h
# src/strgen/strgen.cpp
# src/strings.cpp
# src/timetable_cmd.cpp
# src/town.h
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/vehicle_gui_base.h
# src/widget.cpp
# src/widgets/dropdown.cpp
# src/widgets/road_widget.h
10 months ago
Peter Nelson
d6515d6c98
Fix 0a8bcdd: Scaling non-sprite fonts does not depend on _font_zoom changing. ( #11579 )
10 months ago
Peter Nelson
0a8bcdd344
Change: Be selective about clearing sprite/font caches on interface scale change. ( #11576 )
...
Sprite cache contains all zoom levels anyway, so does not need to be reloaded.
Font cache does not need to be clear if the font zoom hasn't changed, i.e. when changing the max sprite zoom level setting.
10 months ago
Peter Nelson
dc27f1649a
Fix e2425b7: Sprites no longer refreshed if max zoom level changed.
...
Handle this via AdjustGUIZoom() instead.
10 months ago
Peter Nelson
e2425b72c1
Fix: Don't implicitly ReInit all windows after updating the character width cache.
...
This caused duplicate ReInit when changing interface scale.
10 months ago
Peter Nelson
6f7153bf71
Codechange: Make a generic DrawRectOutline function from DrawOutline. ( #11524 )
...
This allows drawing an outline from Rect, not just constrained to a Widget's Rect. And reduces duplication a little.
10 months ago
Jonathan G Rennison
21b49a213e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/cheat_gui.cpp
# src/main_gui.cpp
# src/network/network_gui.cpp
# src/saveload/saveload.h
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/timetable_cmd.cpp
# src/toolbar_gui.cpp
# src/widget.cpp
# src/widget_type.h
# src/widgets/dropdown_type.h
10 months ago
Jonathan G Rennison
2a31095118
Merge branch 'master' into jgrpp
...
# Conflicts:
# regression/regression/result.txt
# src/aircraft_cmd.cpp
# src/airport_gui.cpp
# src/articulated_vehicles.cpp
# src/console_cmds.cpp
# src/date_gui.cpp
# src/engine.cpp
# src/genworld_gui.cpp
# src/gfx_layout_fallback.cpp
# src/group_gui.cpp
# src/hotkeys.cpp
# src/network/core/tcp_connect.cpp
# src/network/core/tcp_listen.h
# src/newgrf.cpp
# src/newgrf.h
# src/newgrf_engine.cpp
# src/newgrf_gui.cpp
# src/newgrf_station.cpp
# src/openttd.cpp
# src/order_gui.cpp
# src/os/macosx/osx_main.cpp
# src/pathfinder/yapf/yapf_node_rail.hpp
# src/rail_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/cargopacket_sl.cpp
# src/saveload/linkgraph_sl.cpp
# src/saveload/station_sl.cpp
# src/script/api/script_industrytype.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_table.cpp
# src/settingsgen/settingsgen.cpp
# src/station.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/timer/timer_game_calendar.cpp
# src/timer/timer_game_calendar.h
# src/timer/timer_manager.h
# src/timer/timer_window.cpp
# src/timetable_cmd.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/vehicle_cmd.h
# src/vehicle_gui.cpp
# src/viewport.cpp
# src/widgets/dropdown.cpp
# src/window_func.h
# src/window_gui.h
10 months ago
Peter Nelson
c18a1494b7
Codechange: Remove FONT_HEIGHT_... macros. ( #11481 )
...
These make it look like we're dealing with a constant, but actually each is a call to `GetCharacterHeight(...)`.
10 months ago
Peter Nelson
d04fd4602d
Codechange: Assert that max width passed to GetStringHeight is non-zero.
...
Max width of zero will cause text layouters to crash, potentially after exhausting memory first.
10 months ago
Jonathan G Rennison
c929f7075e
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/SourceList.cmake
# src/build_vehicle_gui.cpp
# src/company_gui.cpp
# src/console_cmds.cpp
# src/depot_base.h
# src/elrail.cpp
# src/network/core/udp.cpp
# src/network/network_admin.cpp
# src/network/network_chat_gui.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/newgrf.cpp
# src/newgrf_engine.cpp
# src/newgrf_railtype.cpp
# src/newgrf_railtype.h
# src/newgrf_storage.h
# src/os/unix/crashlog_unix.cpp
# src/rail.h
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/road_cmd.cpp
# src/road_map.h
# src/saveload/labelmaps_sl.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/sl/oldloader_sl.cpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/table/settings/world_settings.ini
# src/tests/test_script_admin.cpp
# src/textfile_gui.cpp
# src/toolbar_gui.cpp
# src/train_cmd.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle_gui.cpp
# src/widget.cpp
# src/window.cpp
# src/window_gui.h
# src/window_type.h
11 months ago
Peter Nelson
58c037fba0
Change: Increase finance window lines (and underlines) with interface scale.
11 months ago
Peter Nelson
d19832569e
Cleanup: No need to cast `const Font *` to itself. ( #11395 )
11 months ago
Rubidium
c9276c2959
Codechange: replace x.size() == 0 with x.empty()
11 months ago
Jonathan G Rennison
52e4688851
Use Window iterate instead of from front/back when no order required
1 year ago
Niels Martin Hansen
4765d0f8c2
Change: Text Layouter support querying all lines for character at pixel
1 year ago
Jonathan G Rennison
c0598d34bf
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console.cpp
# src/os/os2/os2.cpp
# src/os/unix/font_unix.cpp
# src/strgen/strgen.h
# src/strgen/strgen_base.cpp
# src/table/settings/gui_settings.ini
1 year ago
Jonathan G Rennison
46f5fb9f25
Sprite cache: Allow caching only required subset of sprite zoom levels
...
Enable for blitters based on 32bpp_optimized or SSE
1 year ago
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
1 year ago
Jonathan G Rennison
ead18b2af2
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# src/3rdparty/md5/md5.h
# src/3rdparty/squirrel/squirrel/squtils.h
# src/animated_tile.cpp
# src/console_func.h
# src/core/CMakeLists.txt
# src/core/container_func.hpp
# src/core/smallstack_type.hpp
# src/crashlog.cpp
# src/crashlog.h
# src/debug.h
# src/economy.cpp
# src/gamelog.cpp
# src/industry_gui.cpp
# src/lang/catalan.txt
# src/misc_gui.cpp
# src/network/network_content.h
# src/newgrf.cpp
# src/newgrf.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/newgrf_gui.cpp
# src/os/unix/font_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/rail_cmd.cpp
# src/saveload/animated_tile_sl.cpp
# src/script/api/script_tilelist.cpp
# src/settings.cpp
# src/settingsgen/settingsgen.cpp
# src/sl/oldloader_sl.cpp
# src/station.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/strgen/strgen.cpp
# src/strgen/strgen_base.cpp
# src/table/settings/gui_settings.ini
# src/train_gui.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/vehicle_cmd.cpp
# src/vehicle_gui_base.h
# src/viewport_sprite_sorter.h
1 year ago
Jonathan G Rennison
d09b504bc5
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release-linux.yml
# .github/workflows/release-macos.yml
# .github/workflows/release-source.yml
# .github/workflows/release.yml
# CMakeLists.txt
# COMPILING.md
# src/ai/ai_core.cpp
# src/ai/ai_gui.cpp
# src/bridge_gui.cpp
# src/company_gui.cpp
# src/console_cmds.cpp
# src/core/CMakeLists.txt
# src/core/smallmap_type.hpp
# src/disaster_vehicle.h
# src/effectvehicle_base.h
# src/fontcache.cpp
# src/game/game_core.cpp
# src/game/game_gui.cpp
# src/gamelog.cpp
# src/gamelog_internal.h
# src/group_gui.cpp
# src/linkgraph/linkgraph.h
# src/misc.cpp
# src/network/core/config.h
# src/network/core/udp.cpp
# src/network/network_chat_gui.cpp
# src/network/network_content_gui.cpp
# src/network/network_gui.cpp
# src/newgrf.cpp
# src/newgrf_gui.cpp
# src/newgrf_profiling.cpp
# src/newgrf_profiling.h
# src/object_gui.cpp
# src/openttd.cpp
# src/openttd.h
# src/order_gui.cpp
# src/os/windows/font_win32.cpp
# src/rail_gui.cpp
# src/road.cpp
# src/road_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/saveload.h
# src/script/api/script_controller.cpp
# src/script/api/script_roadtypelist.cpp
# src/script/script_config.cpp
# src/script/script_config.hpp
# src/script/script_instance.cpp
# src/script/script_scanner.cpp
# src/script/squirrel.cpp
# src/script/squirrel_helper.hpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/table/settings/network_private_settings.ini
# src/timetable_gui.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/window_gui.h
1 year ago
Jonathan G Rennison
01c6705339
Fix text rendering with 8bpp-simple blitter
...
First member of string_colourremap was never assigned
Ensure that it is set to 0
1 year ago