Commit Graph

41 Commits (eaae0bb5e71b237cc1fe1388ab74e6bd3aa0c69e)

Author SHA1 Message Date
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
11 months 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.
1 year 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
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
5 years ago
Jonathan G Rennison db924a4681 Codechange: [Blitter] Change DrawLine to be templated
This is remove per-pixel overheads due to use of the SetPixel virtual
method.
These overheads included:
* expensive virtual method call which prevents inlining
* palette lookup for every pixel
* branch on whether palette animation is enabled on every pixel

Regenerate project files.
5 years ago
Jonathan G Rennison 17257b9620 Add: 32bpp SSE2 blitter palette animator (#6795)
Create a new blitter mode: 32bpp-sse2-anim, which is 32bpp-anim + this.
32bpp-sse2-anim is now used by default where 32bpp-anim would have been.
Also use this with the 32bpp-sse4-anim blitter.

See issue #6469.
6 years ago
peter1138 209d3e2e9e (svn r26463) -Fix (r10190ish): Add special handling for PALETTE_CRASH to work for non-8bpp-mapped sprites. 10 years ago
frosch e4416d6a0c (svn r24610) -Change: [NewGRF] Set the reference brightness of 32bpp mask recolouring to 128. 12 years ago
rubidium 54e36c4ff8 (svn r24111) -Codechange: use Colour more instead of manually bitstuffing 12 years ago
peter1138 3ef77e55c5 (svn r23670) -Feature: Add ability to adjust brightness of colour after remapping for 32bpp sprites 13 years ago
rubidium 61625e53c9 (svn r23448) -Fix: keep a local copy of the palette in the 32bpp animated blitter so changes of the palette data during the game don't influence drawing (with SDL) 13 years ago
rubidium 2ccbd2a6f5 (svn r23446) -Codechange: move _cur_palette and it's related first/count dirty variables into a single structure 13 years ago
rubidium 4f87d2e88c (svn r23194) -Codechange: don't cast away const needlessly 13 years ago
rubidium 485c7cd99e (svn r22397) -Document: some tidbits of the blitter code 13 years ago
frosch 004c93f9da (svn r22288) -Codechange: Deduplicate Blitter_8bppBase::DrawLine() and Blitter_32bppBase::DrawLine() into Blitter::DrawLine(). 13 years ago
frosch 3d1008318b (svn r21782) -Codechange: Move declaration of AllocatorProc from Blitter:: to spritecache.h 14 years ago
alberth b2f9b0ac43 (svn r18907) -Cleanup: Smallmap was the last user of SetPixelIfEmpty(). 15 years ago
rubidium db33e32b4d (svn r18873) -Codechange: use PaletteID also in the blitter 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz d703f0c3b5 (svn r16628) -Codechange: remove one gcc2 hack 15 years ago
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 15 years ago
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
glx c10691faff (svn r14080) -Fix (r14052): assert triggered when drawing chat window with 32bpp-anim blitter (backup buffer was too small) 16 years ago
smatz 69cb2f088f (svn r13721) -Codechange: one less multiplication for colour mixing in 32bpp blitters (GeekToo) 16 years ago
smatz 1834a2f670 (svn r13640) -Codechange: make colours behind not fully solid objects less darker for BM_TRANSPARENT (for 32bpp blitters) 16 years ago
smatz 114c820c56 (svn r13639) -Codechange: rewrite 32bpp-anim and 32bpp-optimized drawing and encoding so it uses similiar scheme as 8bpp-optimized
All zoom levels are stored and a kind of RLE is used. Together with further changes and reducing number of variables, drawing is ~50% faster in average.
16 years ago
smatz 7a7ff65ac5 (svn r13571) -Codechange: define channels in struct Colour in different order on LE and BE machines 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
rubidium 9d8fa486af (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 16 years ago
rubidium 01e20c9140 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 17 years ago
truelight 89bdfaacd9 (svn r11076) -Fix: MakeTransparent of 32bpp blitter used 0..100; using 0..255 makes it much faster (frosch)
-Fix: ComposeColourXXX could work a tiny bit faster when using 256, not 255 as value to divide with; downside is that it can give alpha errors (frosch)
17 years ago
truelight 3fa3d2e365 (svn r10241) -Codechange: CopyToBuffer now produces a buffer that is unreadable from outside the blitter, so the blitter can store anything he likes
-Codechange: added CopyImageToBuffer, which produces a readable buffer for screenshots
-Fix: 32bpp-anim now holds animation on transparent objects to avoid strange graphical effects
-Fix: 32bpp-anim now works correct on mouse-movement (it holds the palette animation correctly)
17 years ago
truelight 2a6b7e4e02 (svn r10225) -Codechange: move common Colour routines for 32bpp to the base class (and nick it colour, not color) 17 years ago
truelight 1c4760ee06 (svn r10216) -Fix: palette animation always redid all palette entries, where in fact only a few indexes were needed
-Codechange: allow blitters to handle palette animation internally or even disable it; 8bpp uses video-backend for palette animation
17 years ago
truelight 26e9b5ca5f (svn r10206) -Codechange: more moving things to blitter-layer: ScrollBuffer 17 years ago
truelight 09879ea308 (svn r10203) -Codechange: more moving things to blitter-layer: DrawLine 17 years ago
peter1138 c31ff284c3 (svn r10201) -Codechange: Replace Blitter::SetHorizontalLine with Blitter::DrawRect, as the former was only used by the rectangle drawing code anyway. This lets us draw rectangles in one go. 17 years ago
truelight f5776a8c6b (svn r10193) -Fix r10190: somehow an other partly-patch was applied too 17 years ago
truelight 003375d375 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication
 Note: this allows much easier adding other types of video-drivers, like OpenGL
17 years ago