Commit Graph

284 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
1 week ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
Jonathan G Rennison 5b894edde8 Fix mismatch between struct Blitter and class Blitter declarations 3 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
3 months ago
Jonathan G Rennison ff0c77ee3b Blitter: Do not override global screen pitch to use 8bpp blitter
8bpp blitter keep a point to pitch (default screen pitch)
3 months ago
Jonathan G Rennison dcb054d152 Add scoped helper to temporarily override screen pitch 4 months ago
Jonathan G Rennison bb22440ab7 Update text-size related caches after changing font details 4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 months ago
Jonathan G Rennison 55d78a23be Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/squirrel/include/squirrel.h
#	src/blitter/32bpp_sse_func.hpp
#	src/bridge_map.h
#	src/clear_map.h
#	src/company_manager_face.h
#	src/console_func.h
#	src/core/bitmath_func.hpp
#	src/core/endian_func.hpp
#	src/core/random_func.hpp
#	src/depot_map.h
#	src/elrail_func.h
#	src/fontcache.h
#	src/industry_map.h
#	src/map_func.h
#	src/newgrf_spritegroup.h
#	src/object_map.h
#	src/rail.h
#	src/rail_map.h
#	src/road_func.h
#	src/road_map.h
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/sl/oldloader.h
#	src/sprite.h
#	src/spritecache.h
#	src/station_func.h
#	src/station_map.h
#	src/story_base.h
#	src/strings_func.h
#	src/tile_cmd.h
#	src/tile_map.h
#	src/tile_type.h
#	src/town.h
#	src/town_map.h
#	src/tree_map.h
#	src/tunnel_map.h
#	src/tunnelbridge_map.h
#	src/vehicle_func.h
#	src/viewport_func.h
#	src/void_map.h
#	src/water.h
#	src/water_map.h
#	src/widget_type.h
4 months ago
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 4 months ago
Jonathan G Rennison f034714559 Use StringBuilder for GetString/GetStringWithArgs, as per upstream
Update dependent code as required
4 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
5 months ago
Peter Nelson daec0e2ca4 Codechange: Split palette handling to separate file. 5 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
5 months ago
Peter Nelson 313ee13e5f Codechange: Add Rect version of FillDrawPixelInfo().
This simplifies most callers as they longer have to split out a rect.
5 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
5 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
5 months ago
Peter Nelson 58c252b81a Cleanup: Remove unnecessary pressed button offset code. 5 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.
6 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(...)`.
6 months 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
9 months 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
10 months ago
Jonathan G Rennison d75c489466 Add various missing includes 11 months ago
Rubidium a47de4b2ab Cleanup: remove DRAW_STRING_BUFFER constant 12 months ago
Jonathan G Rennison 3a47b421b0 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/core/overflowsafe_type.hpp
#	src/economy.cpp
#	src/engine_base.h
#	src/ground_vehicle.cpp
#	src/group_gui.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/newgrf_commons.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_industries.cpp
#	src/newgrf_object.cpp
#	src/newgrf_roadstop.cpp
#	src/newgrf_station.cpp
#	src/rail_gui.cpp
#	src/road_cmd.h
#	src/road_gui.cpp
#	src/saveload/afterload.cpp
#	src/script/api/script_log.cpp
#	src/script/api/script_log.hpp
#	src/settings_gui.cpp
#	src/settingsgen/settingsgen.cpp
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/station_gui.cpp
#	src/strgen/strgen.cpp
#	src/string_func.h
#	src/string_type.h
#	src/table/settings/network_private_settings.ini
#	src/tests/math_func.cpp
#	src/textfile_gui.cpp
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/vehicle.cpp
#	src/waypoint_cmd.cpp
#	src/waypoint_cmd.h
#	src/widgets/dropdown.cpp
12 months ago
Jonathan G Rennison a10c5a62c9 Factor out function to get value with broadest digits 12 months ago
Jonathan G Rennison 5dd99fb046 Add setting for milliseconds per game tick mode 1 year ago
Patric Stout 60399e17bd Codechange: C++-ify the Layouter and related functions
They all now access a std::string_view, instead of a "const char *"
or std::string (in some cases).

Additionally, GetCharAtPosition and friends now return an index
instead of a "const char *", as it makes for a more clear interface.
1 year ago
Jonathan G Rennison 64c210f770 Merge branch 'master' into jgrpp
# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/engine.cpp
#	src/engine_func.h
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/newgrf.cpp
#	src/saveload/oldloader_sl.cpp
#	src/timetable_cmd.cpp
#	src/timetable_cmd.h
#	src/timetable_gui.cpp
1 year ago
PeterN f7e2b6ef12
Change: Make vehicle list dropdown buttons resize to fit strings. (#10286) 1 year ago
Jonathan G Rennison 351090ae7f Fix crash when launching game with non-default GUI scale in config
See: #459
1 year ago
Jonathan G Rennison 6d4474b84e Merge tag '13.0-beta2' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/company_gui.cpp
#	src/console_gui.cpp
#	src/depot_gui.cpp
#	src/error_gui.cpp
#	src/gfx.cpp
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/korean.txt
#	src/lang/polish.txt
#	src/misc_gui.cpp
#	src/network/network_content_gui.h
#	src/newgrf_debug_gui.cpp
#	src/order_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/station_gui.cpp
#	src/subsidy_gui.cpp
#	src/table/settings/gui_settings.ini
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_cmd.cpp
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/water_cmd.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
1 year ago
Jonathan G Rennison 02e19521bc Merge branch 'master' into jgrpp
# Conflicts:
#	src/build_vehicle_gui.cpp
#	src/cheat_gui.cpp
#	src/company_gui.cpp
#	src/error_gui.cpp
#	src/fios_gui.cpp
#	src/gfx_func.h
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/misc_gui.cpp
#	src/newgrf_debug_gui.cpp
#	src/order_gui.cpp
#	src/road_gui.cpp
#	src/roadveh_gui.cpp
#	src/settings_gui.cpp
#	src/ship_gui.cpp
#	src/station_gui.cpp
#	src/statusbar_gui.cpp
#	src/subsidy_gui.cpp
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/vehicle_gui.cpp
#	src/widget.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
1 year ago
Jonathan G Rennison 5bbf1f5375 Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/geometry_type.hpp
#	src/error_gui.cpp
#	src/rail_gui.cpp
#	src/tree_gui.cpp
#	src/vehicle_gui.cpp
#	src/widgets/dropdown.cpp
1 year ago
Peter Nelson 9bf24ec56f Codechange: Reorder and properly declare DrawSpriteIgnorePadding().
Parameters have been rearranged to be closer to those of the standard
DrawSprite() function, and PaletteID can now be set.
2 years ago
Peter Nelson 123983743f Change: Add optional text labels to slider widget. 2 years ago
Peter Nelson 9666e46739 Feature: Variable GUI scale.
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2 years ago
Peter Nelson 17d1fe26c2 Codechange: Helpers to allow passing a Rect to some functions. 2 years ago
Peter Nelson 18201dfbc3 Cleanup: Simplify CenterBounds() 2 years ago
Peter Nelson d0add1e07f Change: Ignore offsets when drawing GUI sprite. 2 years ago
Jonathan G Rennison 5dcffe3142 Add variants of Gfx draw functions which take a DPI 2 years ago
Jonathan G Rennison 7685c36f35 Implement partial parallelisation of non-map mode viewport rendering 2 years ago
Jonathan G Rennison ee2763dcfd Avoid using globals to control drawing of viewport sprites 2 years ago
Jonathan G Rennison 0a9c44d1a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/blitter/32bpp_anim_sse4.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/newgrf_object.h
#	src/road_gui.cpp
#	src/widgets/road_widget.h
#	src/window.cpp
2 years ago
Bouke Haarsma 45d98f689a Fix #9993: Handle DPI changes on macOS and Windows 2 years ago
Jonathan G Rennison 8688840e24 Viewport route step markers are now variable size to match font/text
See: #410
2 years ago
Jonathan G Rennison 8c0eca28a8 Recalculated route step sprite sizes when changing zoom levels 2 years ago
Jonathan G Rennison 981104e308 Add a functor fill mode to GfxFillPolygon 2 years ago
J0anJosep d9a37c915f Cleanup #9725: Replace cmd_helper related functions and remove cmd_helper.h. 2 years ago
Jonathan G Rennison 2f8e63e954 Merge branch 'master' into jgrpp
# Conflicts:
#	src/gfx.cpp
#	src/lang/traditional_chinese.txt
#	src/station_cmd.cpp
2 years ago