Skip to content

Commit

Permalink
GRAPHICS: Slight cleanup in crossBlit code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Aug 28, 2012
1 parent a92a509 commit e8cf0ad
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions graphics/conversion.cpp
Expand Up @@ -36,11 +36,10 @@ FORCEINLINE void crossBlitLogic(byte *dst, const byte *src, const uint w, const
const uint srcDelta, const uint dstDelta) {
for (uint y = 0; y < h; ++y) {
for (uint x = 0; x < w; ++x) {
uint32 color = *(const SrcColor *)src;
const uint32 color = *(const SrcColor *)src;
byte a, r, g, b;
srcFmt.colorToARGB(color, a, r, g, b);
color = dstFmt.ARGBToColor(a, r, g, b);
*(DstColor *)dst = color;
*(DstColor *)dst = dstFmt.ARGBToColor(a, r, g, b);

if (backward) {
src -= sizeof(SrcColor);
Expand Down Expand Up @@ -75,8 +74,7 @@ FORCEINLINE void crossBlitLogic3BppSource(byte *dst, const byte *src, const uint
for (uint x = 0; x < w; ++x) {
memcpy(col, src, 3);
srcFmt.colorToARGB(color, a, r, g, b);
color = dstFmt.ARGBToColor(a, r, g, b);
*(DstColor *)dst = color;
*(DstColor *)dst = dstFmt.ARGBToColor(a, r, g, b);

if (backward) {
src -= 3;
Expand Down

0 comments on commit e8cf0ad

Please sign in to comment.