mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
GOB: use infix operator++ on Pixel iterators where possible
This commit is contained in:
parent
a2dbc6beba
commit
eb61c14d5c
@ -1028,7 +1028,7 @@ void Draw_Fascination::drawWinTrace(int16 left, int16 top, int16 width, int16 he
|
||||
|
||||
Pixel pixelTop = _frontSurface->get(left, top);
|
||||
Pixel pixelBottom = _frontSurface->get(left, bottom);
|
||||
for (int16 i = 0; i < width; i++, pixelTop++, pixelBottom++) {
|
||||
for (int16 i = 0; i < width; i++, ++pixelTop, ++pixelBottom) {
|
||||
pixelTop.set((pixelTop.get() + 128) & 0xFF);
|
||||
pixelBottom.set((pixelBottom.get() + 128) & 0xFF);
|
||||
}
|
||||
|
@ -375,12 +375,12 @@ void Surface::blit(const Surface &from, int16 left, int16 top, int16 right, int1
|
||||
|
||||
if (yAxisReflection) {
|
||||
srcRow += width - 1;
|
||||
for (uint16 i = 0; i < width; i++, dstRow++, srcRow--)
|
||||
for (uint16 i = 0; i < width; i++, ++dstRow, --srcRow)
|
||||
if (srcRow.get() != ((uint32) transp))
|
||||
dstRow.set(srcRow.get());
|
||||
}
|
||||
else {
|
||||
for (uint16 i = 0; i < width; i++, dstRow++, srcRow++)
|
||||
for (uint16 i = 0; i < width; i++, ++dstRow, ++srcRow)
|
||||
if (srcRow.get() != ((uint32) transp))
|
||||
dstRow.set(srcRow.get());
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ void Font::drawLetter(Surface &surf, uint8 c, uint16 x, uint16 y,
|
||||
dst.set(color2);
|
||||
}
|
||||
|
||||
dst++;
|
||||
++dst;
|
||||
data <<= 1;
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ void Video::drawPacked(byte *sprBuf, int16 width, int16 height,
|
||||
if (!transp || val)
|
||||
dst.set(val);
|
||||
|
||||
dst++;
|
||||
++dst;
|
||||
curx++;
|
||||
if (curx == destRight) {
|
||||
dst += dest.getWidth() + x - curx;
|
||||
|
@ -84,7 +84,7 @@ char Video_v1::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight,
|
||||
temp = *srcPtr++;
|
||||
if ((temp != 0) || (transp == 0))
|
||||
destPtr.set(temp);
|
||||
destPtr++;
|
||||
++destPtr;
|
||||
curWidth++;
|
||||
if (curWidth >= srcWidth) {
|
||||
curWidth = 0;
|
||||
@ -112,7 +112,7 @@ char Video_v1::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight,
|
||||
temp = memBuffer[(offset + counter2) % 4096];
|
||||
if ((temp != 0) || (transp == 0))
|
||||
destPtr.set(temp);
|
||||
destPtr++;
|
||||
++destPtr;
|
||||
|
||||
curWidth++;
|
||||
if (curWidth >= srcWidth) {
|
||||
|
@ -94,7 +94,7 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight,
|
||||
if ((temp != 0) || (transp == 0))
|
||||
destPtr.set(temp);
|
||||
|
||||
destPtr++;
|
||||
++destPtr;
|
||||
curWidth++;
|
||||
|
||||
if (curWidth >= srcWidth) {
|
||||
@ -128,7 +128,7 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight,
|
||||
if ((temp != 0) || (transp == 0))
|
||||
destPtr.set(temp);
|
||||
|
||||
destPtr++;
|
||||
++destPtr;
|
||||
curWidth++;
|
||||
|
||||
if (curWidth >= srcWidth) {
|
||||
|
@ -124,7 +124,7 @@ void Video_v6::drawYUV(Surface &destDesc, int16 x, int16 y,
|
||||
|
||||
int nextChromaLine = (i < ((height - 1) & ~3) ) ? dataWidth : 0;
|
||||
|
||||
for (int j = 0; j < width; j++, dstRow++) {
|
||||
for (int j = 0; j < width; j++, ++dstRow) {
|
||||
|
||||
int nextChromaColumn = (j < ((width - 1) & ~3)) ? 1 : 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user