early-access version 2835
This commit is contained in:
46
externals/SDL/src/video/SDL_blit_1.c
vendored
46
externals/SDL/src/video/SDL_blit_1.c
vendored
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@@ -50,7 +50,7 @@ Blit1to1(SDL_BlitInfo * info)
|
||||
|
||||
while (height--) {
|
||||
#ifdef USE_DUFFS_LOOP
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
*dst = map[*src];
|
||||
@@ -58,7 +58,7 @@ Blit1to1(SDL_BlitInfo * info)
|
||||
dst++;
|
||||
src++;
|
||||
, width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
#else
|
||||
for (c = width; c; --c) {
|
||||
*dst = map[*src];
|
||||
@@ -103,14 +103,14 @@ Blit1to2(SDL_BlitInfo * info)
|
||||
|
||||
#ifdef USE_DUFFS_LOOP
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
*(Uint16 *)dst = map[*src++];
|
||||
dst += 2;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ Blit1to3(SDL_BlitInfo * info)
|
||||
|
||||
while (height--) {
|
||||
#ifdef USE_DUFFS_LOOP
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
o = *src * 4;
|
||||
@@ -221,7 +221,7 @@ Blit1to3(SDL_BlitInfo * info)
|
||||
src++;
|
||||
dst += 3;
|
||||
, width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
#else
|
||||
for (c = width; c; --c) {
|
||||
o = *src * 4;
|
||||
@@ -259,11 +259,11 @@ Blit1to4(SDL_BlitInfo * info)
|
||||
|
||||
while (height--) {
|
||||
#ifdef USE_DUFFS_LOOP
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
*dst++ = map[*src++];
|
||||
, width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
#else
|
||||
for (c = width / 4; c; --c) {
|
||||
*dst++ = map[*src++];
|
||||
@@ -299,7 +299,7 @@ Blit1to1Key(SDL_BlitInfo * info)
|
||||
|
||||
if (palmap) {
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
if ( *src != ckey ) {
|
||||
@@ -309,13 +309,13 @@ Blit1to1Key(SDL_BlitInfo * info)
|
||||
src++;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
}
|
||||
} else {
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
if ( *src != ckey ) {
|
||||
@@ -325,7 +325,7 @@ Blit1to1Key(SDL_BlitInfo * info)
|
||||
src++;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
}
|
||||
@@ -348,7 +348,7 @@ Blit1to2Key(SDL_BlitInfo * info)
|
||||
dstskip /= 2;
|
||||
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
if ( *src != ckey ) {
|
||||
@@ -358,7 +358,7 @@ Blit1to2Key(SDL_BlitInfo * info)
|
||||
dstp++;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dstp += dstskip;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ Blit1to3Key(SDL_BlitInfo * info)
|
||||
int o;
|
||||
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
if ( *src != ckey ) {
|
||||
@@ -391,7 +391,7 @@ Blit1to3Key(SDL_BlitInfo * info)
|
||||
dst += 3;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
}
|
||||
@@ -413,7 +413,7 @@ Blit1to4Key(SDL_BlitInfo * info)
|
||||
dstskip /= 4;
|
||||
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
if ( *src != ckey ) {
|
||||
@@ -423,7 +423,7 @@ Blit1to4Key(SDL_BlitInfo * info)
|
||||
dstp++;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dstp += dstskip;
|
||||
}
|
||||
@@ -450,7 +450,7 @@ Blit1toNAlpha(SDL_BlitInfo * info)
|
||||
dstbpp = dstfmt->BytesPerPixel;
|
||||
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP4(
|
||||
{
|
||||
sR = srcpal[*src].r;
|
||||
@@ -463,7 +463,7 @@ Blit1toNAlpha(SDL_BlitInfo * info)
|
||||
dst += dstbpp;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
}
|
||||
@@ -491,7 +491,7 @@ Blit1toNAlphaKey(SDL_BlitInfo * info)
|
||||
dstbpp = dstfmt->BytesPerPixel;
|
||||
|
||||
while (height--) {
|
||||
/* *INDENT-OFF* */
|
||||
/* *INDENT-OFF* */ /* clang-format off */
|
||||
DUFFS_LOOP(
|
||||
{
|
||||
if ( *src != ckey ) {
|
||||
@@ -506,7 +506,7 @@ Blit1toNAlphaKey(SDL_BlitInfo * info)
|
||||
dst += dstbpp;
|
||||
},
|
||||
width);
|
||||
/* *INDENT-ON* */
|
||||
/* *INDENT-ON* */ /* clang-format on */
|
||||
src += srcskip;
|
||||
dst += dstskip;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user