Jonathan G Rennison
de5b114a83
Fix #10660 : Sprite Font scale affected by viewport zoom level limits. ( #10668 )
...
(cherry picked from commit db573c8742
)
# Conflicts:
# src/fontcache/spritefontcache.cpp
# src/gfx.cpp
# src/spritecache.cpp
2023-04-18 00:01:51 +01:00
Jonathan G Rennison
2ea1766677
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/commit-checker.yml
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/landscape.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/order_base.h
# src/order_cmd.cpp
# src/order_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/league_sl.cpp
# src/saveload/saveload.h
# src/script/api/script_object.hpp
# src/script/squirrel_helper.hpp
# src/settings_table.cpp
# src/station_cmd.cpp
# src/table/settings.h.preamble
# src/tree_cmd.cpp
# src/tree_map.h
# src/vehicle.cpp
# src/waypoint_cmd.cpp
2023-03-04 16:45:05 +00:00
Rubidium
a409e4b026
Add: documention to large functions that have too little documentation according to CodeQL
2023-02-25 23:57:36 +01:00
Rubidium
fbd0f5ad7d
Fix: inconsistent allocation error handling
...
Mix-and-matching std::bad_alloc exception handling with nullptr checks
2023-01-06 19:34:35 +01:00
Jonathan G Rennison
760cbcbb8b
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/blitter/32bpp_anim.hpp
# src/blitter/32bpp_base.hpp
# src/blitter/8bpp_base.hpp
# src/blitter/null.hpp
# src/cheat_gui.cpp
# src/gfx.cpp
# src/linkgraph/linkgraph.cpp
# src/spriteloader/grf.cpp
# src/station_cmd.cpp
2023-01-03 11:40:02 +00:00
Patric Stout
1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" ( #10306 )
...
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2023-01-02 20:30:02 +00:00
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
2022-12-04 20:43:11 +00:00
Peter Nelson
9666e46739
Feature: Variable GUI scale.
...
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2022-11-12 18:28:39 +00:00
Jonathan G Rennison
73e5c57e6b
Fix 5e413c9d
: Last sprite offset in GRF file was not recorded ( #10062 )
...
A line was missed when preparing PR #9988 , as this had been added
in a commit prior to the one which the PR was immediately based on
2022-09-29 11:56:42 +02:00
Jonathan G Rennison
5e413c9dcd
Fix #9804 : Only apply sprite_zoom_min setting when sprites available ( #9988 )
...
Only discard sprite zoom levels when a suitable higher zoom level is
defined in the same colour mode
This is to avoid placeholder or empty sprites being used, causing
visual artefacts
2022-09-21 12:37:11 +02:00
Jonathan G Rennison
309f1b47d2
Only apply sprite_zoom_min setting when suitable zoom levels are available
...
Only discard sprite zoom levels when a suitable higher zoom level is
defined in the same colour mode
See: https://github.com/OpenTTD/OpenTTD/issues/9804
2022-08-14 10:45:06 +01:00
Jonathan G Rennison
27316f70ec
Create enum for sprite cache control flag bits
2022-08-14 09:39:14 +01:00
Jonathan G Rennison
7d86909a90
Ensure that sprite data is cleared when loading over an existing sprite
...
Fixes crash when looking at recolour sprite in sprite viewer window
which has been overriden by a non-recolour sprite by a faulty GRF
2022-01-17 18:29:04 +00:00
Jonathan G Rennison
1a4b0d6ecf
Prevent NewGRFs from using Action A to replace internal sprites
2022-01-17 18:23:15 +00:00
Jonathan G Rennison
80236f5c4c
Remove a dubious use of FIND_FIRST_BIT
2021-11-01 23:14:44 +00:00
Jonathan G Rennison
ffef1c9e44
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/saveload/cargopacket_sl.cpp
# src/saveload/cheat_sl.cpp
# src/saveload/company_sl.cpp
# src/saveload/engine_sl.cpp
# src/saveload/map_sl.cpp
# src/saveload/order_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/stdafx.h
# src/table/settings/settings.ini
# src/town_cmd.cpp
# src/vehicle.cpp
2021-10-25 18:10:15 +01:00
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
2021-06-13 12:45:45 +02:00
Jonathan G Rennison
1002c6d9d2
Fix various compiler warnings
...
See: #267
2021-06-11 22:54:27 +01:00
Patric Stout
28e90769f7
Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
...
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
2021-06-03 17:30:00 +02:00
Jonathan G Rennison
fe64093cc0
Avoid reading non-32bpp sprites twice where possible
...
Try to avoid unnecessary over-reading
2021-05-30 22:02:14 +01:00
Rubidium
6bd12e24d7
Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality
...
(cherry picked from commit fdc11a9f94
)
2021-05-30 22:02:14 +01:00
Rubidium
fdc11a9f94
Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality
2021-05-08 12:39:34 +02:00
Jonathan G Rennison
edfa04286b
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/release.yml
# bin/CMakeLists.txt
# src/dock_gui.cpp
# src/lang/brazilian_portuguese.txt
# src/lang/catalan.txt
# src/lang/czech.txt
# src/lang/dutch.txt
# src/lang/english.txt
# src/lang/english_US.txt
# src/lang/estonian.txt
# src/lang/finnish.txt
# src/lang/french.txt
# src/lang/german.txt
# src/lang/hungarian.txt
# src/lang/indonesian.txt
# src/lang/italian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/lithuanian.txt
# src/lang/luxembourgish.txt
# src/lang/norwegian_bokmal.txt
# src/lang/polish.txt
# src/lang/portuguese.txt
# src/lang/romanian.txt
# src/lang/russian.txt
# src/lang/serbian.txt
# src/lang/simplified_chinese.txt
# src/lang/slovak.txt
# src/lang/spanish.txt
# src/lang/spanish_MX.txt
# src/lang/swedish.txt
# src/lang/tamil.txt
# src/lang/ukrainian.txt
# src/lang/vietnamese.txt
# src/newgrf.cpp
# src/newgrf_gui.cpp
# src/object_gui.cpp
# src/pathfinder/yapf/yapf_costrail.hpp
# src/pathfinder/yapf/yapf_node_rail.hpp
# src/rail_cmd.cpp
# src/roadveh_cmd.cpp
# src/town_cmd.cpp
# src/vehicle.cpp
# src/water_cmd.cpp
2021-04-11 02:39:33 +01:00
Charles Pigott
dd798d688b
Fix #8919 : Release builds with asserts enabled ( #8925 )
2021-04-01 23:57:49 +01:00
Patric Stout
fece1c57ca
Codechange: Suppress warnings when asserts are disabled ( #8917 )
2021-04-01 11:16:19 +02:00
Jonathan G Rennison
f4e29071be
Merge tag '1.11.0-beta2' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/release.yml
# CMakeLists.txt
# src/blitter/32bpp_optimized.cpp
# src/debug.cpp
# src/gfx.cpp
# src/gfx_func.h
# src/lang/czech.txt
# src/lang/english.txt
# src/lang/italian.txt
# src/lang/swedish.txt
# src/lang/ukrainian.txt
# src/network/network_server.cpp
# src/os/windows/crashlog_win.cpp
# src/os/windows/win32.cpp
# src/pathfinder/follow_track.hpp
# src/screenshot.cpp
# src/settings_type.h
# src/spritecache.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/video_driver.cpp
# src/video/video_driver.hpp
# src/video/win32_v.cpp
2021-03-02 11:59:03 +00:00
Michael Lutz
3e49aff35c
Codechange: Allow video drivers to handle the cursor themselves.
2021-02-22 22:16:07 +01:00
Michael Lutz
6776229047
Codechange: Make the simple Malloc sprite allocator globally usable.
2021-02-22 22:16:07 +01:00
Michael Lutz
70aa3b4011
Codechange: Give sprite encoders a hint which colour components of a sprite are filled with useful information.
2021-02-22 22:16:07 +01:00
Michael Lutz
e7e5316340
Add: Allow sprite encoders (blitters) to specify an alignment for sprite width and height.
2021-02-22 22:16:07 +01:00
Michael Lutz
02e8741457
Codechange: Allow for using a sprite encoder that is not the currently active blitter when loading a sprite.
2021-02-22 22:16:07 +01:00
Jonathan G Rennison
b7ddd486cf
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/aircraft_cmd.cpp
# src/blitter/32bpp_anim.cpp
# src/cargopacket.cpp
# src/cheat_gui.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/core/pool_func.hpp
# src/date.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/ground_vehicle.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/german.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/mcf.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf_engine.cpp
# src/newgrf_station.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/pathfinder/follow_track.hpp
# src/pathfinder/yapf/yapf_common.hpp
# src/saveload/saveload.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/station_kdtree.h
# src/string_func.h
# src/table/settings.ini
# src/tgp.cpp
# src/timetable_cmd.cpp
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/train_gui.cpp
# src/tree_gui.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
# src/viewport.cpp
# src/viewport_sprite_sorter_sse4.cpp
# src/window.cpp
2021-02-01 17:07:34 +00:00
Jonathan G Rennison
6c3e5642f8
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/crashlog.cpp
# src/fileio.cpp
# src/fileio_func.h
# src/fios_gui.cpp
# src/ini_load.cpp
# src/ini_type.h
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/network/network_client.cpp
# src/order_base.h
# src/order_cmd.cpp
# src/os/windows/win32.cpp
# src/road_cmd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/settings.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/table/settings.ini
# src/tree_cmd.cpp
# src/tree_gui.cpp
# src/vehicle_base.h
# src/video/cocoa/cocoa_v.mm
# src/video/cocoa/event.mm
# src/video/cocoa/wnd_quartz.mm
# src/viewport.cpp
# src/widgets/tree_widget.h
2021-01-31 01:08:35 +00:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
2020-12-27 10:55:42 +00:00
Jonathan G Rennison
aefefb61c2
Fix GetSpriteMainColour with non-default zoom sprites
...
This fixes viewport map mode with extra zoom ground tile sets
2020-12-27 03:03:05 +00:00
Jonathan G Rennison
81a1094cc8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_cmds.cpp
# src/date.cpp
# src/economy.cpp
# src/misc.cpp
# src/newgrf_house.cpp
2020-01-29 19:32:06 +00:00
Niels Martin Hansen
c8779fb311
Feature: NewGRF callback profiling ( #7868 )
...
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
2020-01-26 13:45:51 +01:00
Jonathan G Rennison
cbdd9f84d8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_gui.cpp
# src/lang/korean.txt
# src/video/sdl2_v.cpp
# src/video/sdl2_v.h
# src/window.cpp
# src/window_gui.h
2019-11-12 18:43:10 +00:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Jonathan G Rennison
36eb4165b8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/bridge_map.h
# src/crashlog.cpp
# src/industry.h
# src/linkgraph/linkgraph_type.h
# src/order_type.h
# src/saveload/afterload.cpp
# src/settings.cpp
# src/settings_type.h
# src/smallmap_gui.cpp
# src/spritecache.cpp
# src/stdafx.h
# src/table/settings.h.preamble
# src/train.h
# src/vehicle.cpp
# src/viewport.cpp
# src/viewport_func.h
# src/widgets/station_widget.h
# src/zoom_func.h
# src/zoom_type.h
2019-07-08 16:19:07 +01:00
Charles Pigott
10ba431d21
Codechange: Remove SpriteTypeByte type
2019-04-29 17:40:22 +01:00
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
2019-04-11 18:14:13 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Jonathan G Rennison
7ff252c58d
Merge branch 'master' into jgrpp
...
# Conflicts:
# Makefile.src.in
# findversion.sh
# projects/determineversion.vbs
# src/aircraft_cmd.cpp
# src/lang/dutch.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/linkgraph_gui.h
# src/order_cmd.cpp
# src/settings_gui.cpp
# src/smallmap_gui.cpp
# src/town_cmd.cpp
# src/viewport.cpp
# src/water_map.h
2019-03-04 01:18:25 +00:00
Greg Carlin
00d28a500d
Feature: Add option to adjust font size separately from GUI size. ( #7003 )
...
Adds an option in the "Game Options" next to "Interface Size" called "Font Size". Available options are normal, double, and quad.
2019-02-23 08:27:46 +00:00
Jonathan G Rennison
5995e825bc
Remove bitfield from struct SpriteCache
...
This causes issues with packing on MSVC
2019-01-23 17:32:54 +00:00
Jonathan G Rennison
f645222d8f
Add scope info logging to sprite read/load
2019-01-14 18:51:28 +00:00
Jonathan G Rennison
3f03d03d92
Fix uint8 file_slot in LoadNextSprite
2019-01-14 18:45:57 +00:00
Jonathan G Rennison
c9c3e6f574
Fix use of uint8 for file slot handles
2018-11-26 01:01:50 +00:00