-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced the `I_MapRGB()` function with a preprocessor macro to manually assemble 32-bit pixel values. This approach avoids the overhead of the `SDL_MapRGB()` function call, resulting in situational performance improvements when working with non-palettized, fixed pixel formats. The macro handles: - Shifting R, G, B components according to the format's `Rshift`, `Gshift`, `Bshift`. - Adjusting for bit loss using `Rloss`, `Gloss`, `Bloss`. - Applying the alpha mask (`Amask`) for consistency. This change is safe under the assumption of a fixed 32-bit pixel format (e.g., ARGB8888).
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters