mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-02 22:30:13 +02:00
1cb61df1e51a715916233ba91e845c66a5a87e81
[N-Gage] Correct SDL_FLIP_HORIZONTAL for sprite sheet textures - ApplyFlip: swap toward midpoint when dest == source to avoid overwriting pixels before they are read - CopyEx: restore original bitmap pixels after BitBlt so the texture is not permanently mutated across frames - CopyEx: extract srcrect sub-region before transforming so flip/ rotate/scale operate on the correct pixels, not the full texture [N-Gage] Use scratch bitmap in CopyEx to avoid mutating source texture. Replace the write-then-restore pattern on the source texture with a persistent iScratchBitmap. The transform pipeline operates entirely within iPixelBufferA/B; the final result is copied into iScratchBitmap and BitBlt reads from there. The source texture is never written to. [N-Gage] Fix Copy() for render-target textures by using direct BitBlt Bypass pixel readback for SDL_TEXTUREACCESS_TARGET textures in CRenderer::Copy(). Reading raw pixels via DataAddress() on a server-side bitmap is unreliable; use BitBlt directly instead. [N-Gage] Implement color-key masking using Symbian's BitBltMasked. This implementation works fine, but relies on a platform specific property. This isn't ideal. Todo: Add SDL_PIXELFORMAT_ARGB4444 to the N-Gage's rendering back-end. [N-Gage] Avoid using BitBltMasked to improve performance. Much better! Write only non-color-key source pixels directly into the destination bitmap preserving existing destination pixels wherever the color key matches. This replaces BitBltMasked and avoids the cost of building an EGray2 mask. [N-Gage] Remove redundant function call since we're not using BitBltMasked() anymore. [N-Gage] Remove SDL_PROP_TEXTURE_NGAGE_COLOR_KEY_NUMBER - Promote SDL_PIXELFORMAT_XRGB4444 to SDL_PIXELFORMAT_ARGB4444 instead. - Remove now unused functions.
[N-Gage] Fix image transformations, add color keying, and improve overall rendering performance. Fixes #15427
Simple DirectMedia Layer (SDL for short) is a cross-platform library designed to make it easy to write multi-media software, such as games and emulators.
You can find the latest release and additional information at: https://www.libsdl.org/
Installation instructions and a quick introduction is available in INSTALL.md
This library is distributed under the terms of the zlib license, available in LICENSE.txt.
Enjoy!
Sam Lantinga (slouken@libsdl.org)
Languages
C
85.7%
C++
6.6%
Objective-C
3.3%
CMake
1.7%
Perl
0.7%
Other
1.7%