Commit Graph

324 Commits

Author SHA1 Message Date
Cyprian Klimaszewski add6521abd Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-08 22:26:18 +05:00
Peter Nelson 2557cf2098 Codechange: Remove unnecessary 'core' includes. (#14867) 2025-12-08 22:24:32 +05:00
Peter Nelson 90001dabfa Codechange: Replace color with colour. 2025-12-08 20:43:11 +05:00
Peter Nelson 4a555528fd Codechange: Dereference with x-> instead of (*x). (#14700) 2025-12-08 18:46:14 +05:00
dP 8404c2a7cc Merge remote-tracking branch 'upstream/master' 2025-09-28 02:33:49 +05:00
Jonathan G Rennison 98ffd3cdb1 Fix: Off-by-one when drawing diagonal lines (#14523) 2025-08-24 13:24:17 +01:00
Jonathan G Rennison add40a2de2 Fix #10222: Off by one drawing even-width horizontal/vertical lines 2025-08-17 20:41:49 +01:00
Jonathan G Rennison 80f72d3722 Fix: Off-by-one in Blitter::DrawLineGeneric 2025-08-17 20:41:22 +01:00
Peter Nelson 8e2df7809b Codechange: Add distinct type to hold pixel drawing colour. (#14457)
This is used for individual pixels as well as line drawing.
2025-07-20 22:57:55 +01:00
dP 0fe7c3635c Fix compilation errors after the merge 2025-06-27 18:03:03 +05:00
dP f0f93c68ca Merge remote-tracking branch 'upstream/master' 2025-06-14 17:01:17 +05:00
dP df3a6e321f Merge remote-tracking branch 'upstream/master' 2025-05-14 18:41:13 +05:00
Rubidium 3cd040ffe9 Codechange: unify moving of pixels in the blitters 2025-05-11 21:51:57 +02:00
Rubidium a48a5f0cc6 Codechange: replace memcpy with std::copy_n 2025-05-10 16:50:58 +02:00
Rubidium 7981fcb297 Codechange: use std::fill_n over memset 2025-05-09 17:20:41 +02:00
Rubidium 96873dee63 Codechange: use std::array.fill over memset 2025-05-09 17:20:41 +02:00
frosch 228f9ca941 Fix #13854: 40bpp-anim blitter recolouring failed for 32bpp pixels without mask channel. (#14242) 2025-05-09 17:16:29 +02:00
Rubidium cc51b29234 Codechange: use std::fill_n/copy_n over MemSetT/MemCpyT 2025-05-06 20:03:35 +02:00
frosch 8571af9833 Codechange: Turn ZoomLevel into enum class. 2025-05-03 23:21:09 +02:00
frosch c0d4ab69d0 Codechange: Add a container to index data by zoom level. 2025-05-03 23:21:09 +02:00
frosch 518a34c286 Codechange: Use std::byte for generic buffers. 2025-05-03 18:43:20 +02:00
frosch 02082a0211 Codechange: Deduplicate array lookup. 2025-05-03 18:43:20 +02:00
frosch bb767608de Codechange: Pass SpriteType as direct parameter to SpriteEncoder::Encoder. 2025-05-03 18:43:20 +02:00
Rubidium af25eecc15 Codechange: use const for std::string_view where appropriate 2025-04-29 10:15:18 +02:00
Rubidium 49ef3eee13 Codechange: replace char* with std::string_view 2025-04-27 20:08:02 +02:00
frosch 2a62eea005 Codefix: Comment style. (#14064) 2025-04-21 17:25:09 +02:00
frosch d97936e77a Codechange: Replace ALIGN macro with C++11 alignas specifier. 2025-04-18 17:16:48 +02:00
Peter Nelson 0b3619ea35 Codechange: Use unique_ptr to manage blitters. (#13904) 2025-03-27 08:38:58 +00:00
Peter Nelson 234c9fb3bd Codechange: Use EnumBitSet for SpriteFlags. 2025-03-23 18:01:02 +00:00
Peter Nelson 5abe7c1386 Codechange: Use default initialisation for 32bpp_sse2's SpriteData.
Avoids using memset.
2025-03-23 18:01:02 +00:00
Rubidium 576a96c685 Codechange: let the ReusableBuffer use std::vector as storage 2025-02-16 19:31:13 +01:00
Jonathan G Rennison d06b371254 Cleanup: Fix various spelling errors 2025-02-12 22:44:51 +01:00
Peter Nelson afc0745aa2 Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383) 2025-01-28 22:17:34 +00:00
Peter Nelson 1e14fd6a0d Codechange: Use enum class for PaletteAnimation. 2025-01-25 21:42:21 +00:00
Peter Nelson 161b02efda Codechange: Use enum class for BlitterMode. 2025-01-25 21:42:21 +00:00
Peter Nelson c5d3ac7a71 Codechange: Move colour brightness methods to palette code.
This allows reuse outside of blitters.
2025-01-21 00:45:31 +00:00
Rubidium 8f7468483a Codechange: use std::unique_ptr over manual memory management 2025-01-15 21:52:21 +01:00
dP a86fd7c621 Update to 15.0-beta1 2024-12-25 20:34:06 +05:00
Peter Nelson 7b717fcccb Codechange: Replace AllocatorProc with SpriteAllocator class.
This allows for state to be passed to or maintained by the allocator.
2024-05-30 20:16:28 +01:00
Peter Nelson a28ab8cac2 Codechange: Replace C-style casts to size_t with static_cast. (#12455)
* Codechange: Replace C-style casts to size_t with static_cast.

This touches only simple value-type casts.

* Codechange: Replace static_cast<size_t>(-1) with SIZE_MAX

Co-authored-by: Rubidium <rubidium@openttd.org>
2024-04-19 20:34:36 +01:00
dP 6a2d656354 Merge remote-tracking branch 'upstream/master' 2024-04-11 13:24:33 +07:00
dP 872e715374 Update to 14.0-RC3 2024-04-11 11:07:23 +07:00
Peter Nelson 6bc4a62c27 Codechange: Pass std::string_view from blitters instead of char *. 2024-04-10 22:02:04 +01:00
Peter Nelson 8e881471c1 Codechange: Pass replacement blitter name as string_view instead char *. 2024-04-05 23:23:33 +01:00
Peter Nelson 7572cfd103 Codechange: Redefine ZOOM_LVL so that ZOOM_LVL_NORMAL is 1x zoom.
This matches expectations of what normal zoom means.
2024-04-04 22:27:03 +01:00
Peter Nelson 3c94e81665 Codechange: Use ZOOM_LVL_MIN to refer to first zoom level.
Many uses of ZOOM_LVL_NORMAL actually just want the first zoom level slot, so use ZOOM_LVL_MIN to make this clearer.
2024-04-04 22:27:03 +01:00
frosch a886bd9666 Fix #12319, 3a676a5: Some SSE blitters were broken due to ODR violations (#12322) 2024-03-16 23:42:38 +00:00
Patric Stout a3cfd23cf9 Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
dP ab029055b0 Fix highlight tinting in 32bpp-sse* blitters 2024-03-17 02:55:46 +07:00
dP ec561070b1 Fix highlight tinting in 32bpp-anim-sse4 blitter 2024-03-17 02:44:01 +07:00