Commit Graph

240 Commits (83d63464db912f030b4cbf2936a878d1c86c338d)

Author SHA1 Message Date
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 5 months ago
Patric Stout bb49112784 Codechange: switch our codebase to C++20 6 months ago
Loïc Guilloux 93ba6d6776
Fix: compilation without precompiled headers (#11770) 6 months ago
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 6 months ago
Peter Nelson a2a7ecf88e
Fix 9ce1626b: Some blitters have `bp->remap` aliased to `remap` for performance. (#11626)
While this probably doesn't make a huge difference for the custom transparent remap code path, the alias is there so use it.
6 months ago
Peter Nelson 9ce1626bb4 Change: Support custom transparency remaps with 32bpp blitters.
This closes a 15 year old TODO...
6 months ago
Peter Nelson b85ecf9ac2
Codechange: Replace pointer to Sprite array with reference to SpriteCollection. (#11580)
Add `SpriteLoader::SpriteCollection` type which is an array of `SpriteLoad::Sprite`.

This removes the ambiguity of what `SpriteLoader::Sprite *` is pointing to,
and cleans up mismatches using both dereference -> and array access [] for the
same object.
6 months ago
rubidium42 cb8612ba79 Remove: ZOOM_LVL_COUNT
This is the only enumeration with a COUNT and END. The logic of the COUNT
implied that BEGIN could be non-zero, but all but two uses of zoom level
assume that BEGIN is zero, making the separate count only confusing.
7 months ago
Michael Lutz 071fdab236 Codechange: Replicate cursor screen backup to chat message display, removing explicit memory management.
Incidentally, this makes Blitter::GetBytesPerPixel unneeed.
8 months ago
Rubidium c9276c2959 Codechange: replace x.size() == 0 with x.empty() 8 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 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
12 months ago
Rubidium 07860e67e2 Codechange: use fmt::format_to to format the help message 1 year ago
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 1 year ago
Patric Stout 199e41c762
Codechange: use default dtor instead of empty (#10826) 1 year ago
Peter Nelson e6740046ee Codechange: Use range-for iteration. 1 year ago
Rubidium 12085d088c Cleanup: remove obsolete string_compare_type 1 year ago
Rubidium 86786a7af6 Codechange: introduce StrEqualsIgnoreCase/StrCompareIgnoreCase to replace strcasecmp 1 year ago
PeterN e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Tyler Trahan a18182e24b
Revert 92c7551: Line drawing algorithm fix broke other cases (#10497)
This reverts commit 92c755161d.
1 year ago
Nik Nyby 92c755161d
Fix #10222: Adjust line drawing algorithm (#10491) 1 year ago
Rubidium 71b46db8d0 Cleanup: remove commented out code 1 year ago
Rubidium f7af9a299a Codechange: prevent suspicious pointer scaling 2 years ago
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.
2 years ago
PeterN 4031894aef
Cleanup: Remove svn-style `$Id$` comments. (#10122) 2 years ago
Jonathan G Rennison 47456ac672 Change: Reduce number of instructions in AlphaBlendTwoPixels 2 years ago
Jonathan G Rennison f9cdb5b610 Fix: Correctly set alpha of output in AlphaBlendTwoPixels
Match alpha behaviour of ComposeColourRGBA
2 years ago
glx22 da1a0d042e Fix: don't use animated SSE4 Draw() when animation is disabled 2 years ago
glx22 bba6ad1f4e Fix #9935: Use more selectivity when building SSE specific code 2 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
Patric Stout bcd7a7aafe
Codechange: rename _SQ64 into POINTER_IS_64BIT (#9313) 3 years ago
rubidium42 b791ffc6de Fix: do not hide parameter by local variable with the same name 3 years ago
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 3 years ago
rubidium42 ddaedaf32a Fix: empty undocumented branches 3 years ago
Charles Pigott 591ea9862d
Codechange: Suppress warnings when asserts are disabled (#8916) 3 years ago
Michael Lutz ae1f7bd695
Fix 937d60f2: Broken company colours for 40bpp-blitter. (#8821) 3 years ago
Michael Lutz 937d60f239
Fix #8774: Black screenshots when using 40bpp-blitter. (#8791)
This affected all screenshot types that render to an off-screen
buffer and don't copy the actual screen contents.
3 years ago
Michael Lutz ef4cec9382 Fix #8750: [OpenGL] Line drawing did not set proper RGB/mask colours. 3 years ago
Michael Lutz 94d8acb7d0 Add: A 32 bpp blitter that uses the animation buffer from the video backend to speed up palette animation. 3 years ago
Michael Lutz 200be7d20c Add: [OpenGL] Support for a separate animation buffer that stores the palette values of the screen in addition to the colour buffer. 3 years ago
Michael Lutz 01ef44fa4f Codechange: Allow blitter factories to decide at runtime if the blitter is usable. 3 years ago
Michael Lutz d4dbb3f46e Fix: Don't trash video buffer alpha in SSE3/4 blitters. 3 years ago
Michael Lutz 02e8741457 Codechange: Allow for using a sprite encoder that is not the currently active blitter when loading a sprite. 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
Charles Pigott 348c231e12 Codechange: Make codestyle for CMake files consistent for 'control' statements 4 years ago
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
Michael Lutz 37bc2f8064 Codechange: Use std::string in the driver and blitter selection code. 4 years ago
Michael Lutz 9dd8b3d430 Remove: [OSX] Stuff that is pre-10.7 from the Cocoa/Quartz video driver. 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago