src/video/SDL_blit_0.c
author Sam Lantinga <slouken@libsdl.org>
Sun, 14 Jul 2013 11:28:44 -0700
changeset 7776 d4a39491577f
parent 7502 6ff02ff3cf06
child 8093 b43765095a6f
permissions -rw-r--r--
Added the platform specific messagebox function to the video function list
slouken@0
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@6885
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
slouken@0
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@0
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@0
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@0
    20
*/
slouken@1402
    21
#include "SDL_config.h"
slouken@0
    22
slouken@0
    23
#include "SDL_video.h"
slouken@0
    24
#include "SDL_blit.h"
slouken@0
    25
slouken@0
    26
/* Functions to blit from bitmaps to other surfaces */
slouken@0
    27
slouken@1895
    28
static void
slouken@1895
    29
BlitBto1(SDL_BlitInfo * info)
slouken@0
    30
{
slouken@1895
    31
    int c;
slouken@1895
    32
    int width, height;
slouken@1895
    33
    Uint8 *src, *map, *dst;
slouken@1895
    34
    int srcskip, dstskip;
slouken@0
    35
slouken@1895
    36
    /* Set up some basic variables */
slouken@2262
    37
    width = info->dst_w;
slouken@2262
    38
    height = info->dst_h;
slouken@2262
    39
    src = info->src;
slouken@2267
    40
    srcskip = info->src_skip;
slouken@2262
    41
    dst = info->dst;
slouken@2267
    42
    dstskip = info->dst_skip;
slouken@1895
    43
    map = info->table;
slouken@1895
    44
    srcskip += width - (width + 7) / 8;
slouken@0
    45
slouken@1895
    46
    if (map) {
slouken@1895
    47
        while (height--) {
slouken@1895
    48
            Uint8 byte = 0, bit;
slouken@1895
    49
            for (c = 0; c < width; ++c) {
slouken@1895
    50
                if ((c & 7) == 0) {
slouken@1895
    51
                    byte = *src++;
slouken@1895
    52
                }
slouken@1895
    53
                bit = (byte & 0x80) >> 7;
slouken@1895
    54
                if (1) {
slouken@1895
    55
                    *dst = map[bit];
slouken@1895
    56
                }
slouken@1895
    57
                dst++;
slouken@1895
    58
                byte <<= 1;
slouken@1895
    59
            }
slouken@1895
    60
            src += srcskip;
slouken@1895
    61
            dst += dstskip;
slouken@1895
    62
        }
slouken@1895
    63
    } else {
slouken@1895
    64
        while (height--) {
slouken@1895
    65
            Uint8 byte = 0, bit;
slouken@1895
    66
            for (c = 0; c < width; ++c) {
slouken@1895
    67
                if ((c & 7) == 0) {
slouken@1895
    68
                    byte = *src++;
slouken@1895
    69
                }
slouken@1895
    70
                bit = (byte & 0x80) >> 7;
slouken@1895
    71
                if (1) {
slouken@1895
    72
                    *dst = bit;
slouken@1895
    73
                }
slouken@1895
    74
                dst++;
slouken@1895
    75
                byte <<= 1;
slouken@1895
    76
            }
slouken@1895
    77
            src += srcskip;
slouken@1895
    78
            dst += dstskip;
slouken@1895
    79
        }
slouken@1895
    80
    }
slouken@0
    81
}
slouken@2735
    82
slouken@1895
    83
static void
slouken@1895
    84
BlitBto2(SDL_BlitInfo * info)
slouken@0
    85
{
slouken@1895
    86
    int c;
slouken@1895
    87
    int width, height;
slouken@1895
    88
    Uint8 *src;
slouken@1895
    89
    Uint16 *map, *dst;
slouken@1895
    90
    int srcskip, dstskip;
slouken@0
    91
slouken@1895
    92
    /* Set up some basic variables */
slouken@2262
    93
    width = info->dst_w;
slouken@2262
    94
    height = info->dst_h;
slouken@2262
    95
    src = info->src;
slouken@2267
    96
    srcskip = info->src_skip;
slouken@2262
    97
    dst = (Uint16 *) info->dst;
slouken@2267
    98
    dstskip = info->dst_skip / 2;
slouken@1895
    99
    map = (Uint16 *) info->table;
slouken@1895
   100
    srcskip += width - (width + 7) / 8;
slouken@0
   101
slouken@1895
   102
    while (height--) {
slouken@1895
   103
        Uint8 byte = 0, bit;
slouken@1895
   104
        for (c = 0; c < width; ++c) {
slouken@1895
   105
            if ((c & 7) == 0) {
slouken@1895
   106
                byte = *src++;
slouken@1895
   107
            }
slouken@1895
   108
            bit = (byte & 0x80) >> 7;
slouken@1895
   109
            if (1) {
slouken@1895
   110
                *dst = map[bit];
slouken@1895
   111
            }
slouken@1895
   112
            byte <<= 1;
slouken@1895
   113
            dst++;
slouken@1895
   114
        }
slouken@1895
   115
        src += srcskip;
slouken@1895
   116
        dst += dstskip;
slouken@1895
   117
    }
slouken@0
   118
}
slouken@2735
   119
slouken@1895
   120
static void
slouken@1895
   121
BlitBto3(SDL_BlitInfo * info)
slouken@0
   122
{
slouken@1895
   123
    int c, o;
slouken@1895
   124
    int width, height;
slouken@1895
   125
    Uint8 *src, *map, *dst;
slouken@1895
   126
    int srcskip, dstskip;
slouken@0
   127
slouken@1895
   128
    /* Set up some basic variables */
slouken@2262
   129
    width = info->dst_w;
slouken@2262
   130
    height = info->dst_h;
slouken@2262
   131
    src = info->src;
slouken@2267
   132
    srcskip = info->src_skip;
slouken@2262
   133
    dst = info->dst;
slouken@2267
   134
    dstskip = info->dst_skip;
slouken@1895
   135
    map = info->table;
slouken@1895
   136
    srcskip += width - (width + 7) / 8;
slouken@0
   137
slouken@1895
   138
    while (height--) {
slouken@1895
   139
        Uint8 byte = 0, bit;
slouken@1895
   140
        for (c = 0; c < width; ++c) {
slouken@1895
   141
            if ((c & 7) == 0) {
slouken@1895
   142
                byte = *src++;
slouken@1895
   143
            }
slouken@1895
   144
            bit = (byte & 0x80) >> 7;
slouken@1895
   145
            if (1) {
slouken@1895
   146
                o = bit * 4;
slouken@1895
   147
                dst[0] = map[o++];
slouken@1895
   148
                dst[1] = map[o++];
slouken@1895
   149
                dst[2] = map[o++];
slouken@1895
   150
            }
slouken@1895
   151
            byte <<= 1;
slouken@1895
   152
            dst += 3;
slouken@1895
   153
        }
slouken@1895
   154
        src += srcskip;
slouken@1895
   155
        dst += dstskip;
slouken@1895
   156
    }
slouken@0
   157
}
slouken@2735
   158
slouken@1895
   159
static void
slouken@1895
   160
BlitBto4(SDL_BlitInfo * info)
slouken@0
   161
{
slouken@1895
   162
    int width, height;
slouken@1895
   163
    Uint8 *src;
slouken@1895
   164
    Uint32 *map, *dst;
slouken@1895
   165
    int srcskip, dstskip;
slouken@1895
   166
    int c;
slouken@0
   167
slouken@1895
   168
    /* Set up some basic variables */
slouken@2262
   169
    width = info->dst_w;
slouken@2262
   170
    height = info->dst_h;
slouken@2262
   171
    src = info->src;
slouken@2267
   172
    srcskip = info->src_skip;
slouken@2262
   173
    dst = (Uint32 *) info->dst;
slouken@2267
   174
    dstskip = info->dst_skip / 4;
slouken@1895
   175
    map = (Uint32 *) info->table;
slouken@1895
   176
    srcskip += width - (width + 7) / 8;
slouken@0
   177
slouken@1895
   178
    while (height--) {
slouken@1895
   179
        Uint8 byte = 0, bit;
slouken@1895
   180
        for (c = 0; c < width; ++c) {
slouken@1895
   181
            if ((c & 7) == 0) {
slouken@1895
   182
                byte = *src++;
slouken@1895
   183
            }
slouken@1895
   184
            bit = (byte & 0x80) >> 7;
slouken@1895
   185
            if (1) {
slouken@1895
   186
                *dst = map[bit];
slouken@1895
   187
            }
slouken@1895
   188
            byte <<= 1;
slouken@1895
   189
            dst++;
slouken@1895
   190
        }
slouken@1895
   191
        src += srcskip;
slouken@1895
   192
        dst += dstskip;
slouken@1895
   193
    }
slouken@0
   194
}
slouken@0
   195
slouken@1895
   196
static void
slouken@1895
   197
BlitBto1Key(SDL_BlitInfo * info)
slouken@0
   198
{
slouken@2262
   199
    int width = info->dst_w;
slouken@2262
   200
    int height = info->dst_h;
slouken@2262
   201
    Uint8 *src = info->src;
slouken@2262
   202
    Uint8 *dst = info->dst;
slouken@2267
   203
    int srcskip = info->src_skip;
slouken@2267
   204
    int dstskip = info->dst_skip;
slouken@2267
   205
    Uint32 ckey = info->colorkey;
slouken@1895
   206
    Uint8 *palmap = info->table;
slouken@1895
   207
    int c;
slouken@0
   208
slouken@1895
   209
    /* Set up some basic variables */
slouken@1895
   210
    srcskip += width - (width + 7) / 8;
slouken@0
   211
slouken@1895
   212
    if (palmap) {
slouken@1895
   213
        while (height--) {
slouken@1895
   214
            Uint8 byte = 0, bit;
slouken@1895
   215
            for (c = 0; c < width; ++c) {
slouken@1895
   216
                if ((c & 7) == 0) {
slouken@1895
   217
                    byte = *src++;
slouken@1895
   218
                }
slouken@1895
   219
                bit = (byte & 0x80) >> 7;
slouken@1895
   220
                if (bit != ckey) {
slouken@1895
   221
                    *dst = palmap[bit];
slouken@1895
   222
                }
slouken@1895
   223
                dst++;
slouken@1895
   224
                byte <<= 1;
slouken@1895
   225
            }
slouken@1895
   226
            src += srcskip;
slouken@1895
   227
            dst += dstskip;
slouken@1895
   228
        }
slouken@1895
   229
    } else {
slouken@1895
   230
        while (height--) {
slouken@1895
   231
            Uint8 byte = 0, bit;
slouken@1895
   232
            for (c = 0; c < width; ++c) {
slouken@1895
   233
                if ((c & 7) == 0) {
slouken@1895
   234
                    byte = *src++;
slouken@1895
   235
                }
slouken@1895
   236
                bit = (byte & 0x80) >> 7;
slouken@1895
   237
                if (bit != ckey) {
slouken@1895
   238
                    *dst = bit;
slouken@1895
   239
                }
slouken@1895
   240
                dst++;
slouken@1895
   241
                byte <<= 1;
slouken@1895
   242
            }
slouken@1895
   243
            src += srcskip;
slouken@1895
   244
            dst += dstskip;
slouken@1895
   245
        }
slouken@1895
   246
    }
slouken@0
   247
}
slouken@0
   248
slouken@1895
   249
static void
slouken@1895
   250
BlitBto2Key(SDL_BlitInfo * info)
slouken@0
   251
{
slouken@2262
   252
    int width = info->dst_w;
slouken@2262
   253
    int height = info->dst_h;
slouken@2262
   254
    Uint8 *src = info->src;
slouken@2262
   255
    Uint16 *dstp = (Uint16 *) info->dst;
slouken@2267
   256
    int srcskip = info->src_skip;
slouken@2267
   257
    int dstskip = info->dst_skip;
slouken@2267
   258
    Uint32 ckey = info->colorkey;
slouken@1895
   259
    Uint8 *palmap = info->table;
slouken@1895
   260
    int c;
slouken@0
   261
slouken@1895
   262
    /* Set up some basic variables */
slouken@1895
   263
    srcskip += width - (width + 7) / 8;
slouken@1895
   264
    dstskip /= 2;
slouken@0
   265
slouken@1895
   266
    while (height--) {
slouken@1895
   267
        Uint8 byte = 0, bit;
slouken@1895
   268
        for (c = 0; c < width; ++c) {
slouken@1895
   269
            if ((c & 7) == 0) {
slouken@1895
   270
                byte = *src++;
slouken@1895
   271
            }
slouken@1895
   272
            bit = (byte & 0x80) >> 7;
slouken@1895
   273
            if (bit != ckey) {
slouken@1895
   274
                *dstp = ((Uint16 *) palmap)[bit];
slouken@1895
   275
            }
slouken@1895
   276
            byte <<= 1;
slouken@1895
   277
            dstp++;
slouken@1895
   278
        }
slouken@1895
   279
        src += srcskip;
slouken@1895
   280
        dstp += dstskip;
slouken@1895
   281
    }
slouken@0
   282
}
slouken@0
   283
slouken@1895
   284
static void
slouken@1895
   285
BlitBto3Key(SDL_BlitInfo * info)
slouken@0
   286
{
slouken@2262
   287
    int width = info->dst_w;
slouken@2262
   288
    int height = info->dst_h;
slouken@2262
   289
    Uint8 *src = info->src;
slouken@2262
   290
    Uint8 *dst = info->dst;
slouken@2267
   291
    int srcskip = info->src_skip;
slouken@2267
   292
    int dstskip = info->dst_skip;
slouken@2267
   293
    Uint32 ckey = info->colorkey;
slouken@1895
   294
    Uint8 *palmap = info->table;
slouken@1895
   295
    int c;
slouken@0
   296
slouken@1895
   297
    /* Set up some basic variables */
slouken@1895
   298
    srcskip += width - (width + 7) / 8;
slouken@0
   299
slouken@1895
   300
    while (height--) {
slouken@1895
   301
        Uint8 byte = 0, bit;
slouken@1895
   302
        for (c = 0; c < width; ++c) {
slouken@1895
   303
            if ((c & 7) == 0) {
slouken@1895
   304
                byte = *src++;
slouken@1895
   305
            }
slouken@1895
   306
            bit = (byte & 0x80) >> 7;
slouken@1895
   307
            if (bit != ckey) {
slouken@1895
   308
                SDL_memcpy(dst, &palmap[bit * 4], 3);
slouken@1895
   309
            }
slouken@1895
   310
            byte <<= 1;
slouken@1895
   311
            dst += 3;
slouken@1895
   312
        }
slouken@1895
   313
        src += srcskip;
slouken@1895
   314
        dst += dstskip;
slouken@1895
   315
    }
slouken@0
   316
}
slouken@0
   317
slouken@1895
   318
static void
slouken@1895
   319
BlitBto4Key(SDL_BlitInfo * info)
slouken@0
   320
{
slouken@2262
   321
    int width = info->dst_w;
slouken@2262
   322
    int height = info->dst_h;
slouken@2262
   323
    Uint8 *src = info->src;
slouken@2262
   324
    Uint32 *dstp = (Uint32 *) info->dst;
slouken@2267
   325
    int srcskip = info->src_skip;
slouken@2267
   326
    int dstskip = info->dst_skip;
slouken@2267
   327
    Uint32 ckey = info->colorkey;
slouken@1895
   328
    Uint8 *palmap = info->table;
slouken@1895
   329
    int c;
slouken@0
   330
slouken@1895
   331
    /* Set up some basic variables */
slouken@1895
   332
    srcskip += width - (width + 7) / 8;
slouken@1895
   333
    dstskip /= 4;
slouken@0
   334
slouken@1895
   335
    while (height--) {
slouken@1895
   336
        Uint8 byte = 0, bit;
slouken@1895
   337
        for (c = 0; c < width; ++c) {
slouken@1895
   338
            if ((c & 7) == 0) {
slouken@1895
   339
                byte = *src++;
slouken@1895
   340
            }
slouken@1895
   341
            bit = (byte & 0x80) >> 7;
slouken@1895
   342
            if (bit != ckey) {
slouken@1895
   343
                *dstp = ((Uint32 *) palmap)[bit];
slouken@1895
   344
            }
slouken@1895
   345
            byte <<= 1;
slouken@1895
   346
            dstp++;
slouken@1895
   347
        }
slouken@1895
   348
        src += srcskip;
slouken@1895
   349
        dstp += dstskip;
slouken@1895
   350
    }
slouken@0
   351
}
slouken@0
   352
slouken@1895
   353
static void
slouken@1895
   354
BlitBtoNAlpha(SDL_BlitInfo * info)
slouken@0
   355
{
slouken@2262
   356
    int width = info->dst_w;
slouken@2262
   357
    int height = info->dst_h;
slouken@2262
   358
    Uint8 *src = info->src;
slouken@2262
   359
    Uint8 *dst = info->dst;
slouken@2267
   360
    int srcskip = info->src_skip;
slouken@2267
   361
    int dstskip = info->dst_skip;
slouken@2267
   362
    const SDL_Color *srcpal = info->src_fmt->palette->colors;
slouken@2267
   363
    SDL_PixelFormat *dstfmt = info->dst_fmt;
slouken@1895
   364
    int dstbpp;
slouken@1895
   365
    int c;
slouken@7502
   366
    Uint32 pixel;
slouken@7502
   367
    unsigned sR, sG, sB;
slouken@7502
   368
    unsigned dR, dG, dB, dA;
slouken@7502
   369
    const unsigned A = info->a;
slouken@0
   370
slouken@1895
   371
    /* Set up some basic variables */
slouken@1895
   372
    dstbpp = dstfmt->BytesPerPixel;
slouken@1895
   373
    srcskip += width - (width + 7) / 8;
slouken@0
   374
slouken@1895
   375
    while (height--) {
slouken@1895
   376
        Uint8 byte = 0, bit;
slouken@1895
   377
        for (c = 0; c < width; ++c) {
slouken@1895
   378
            if ((c & 7) == 0) {
slouken@1895
   379
                byte = *src++;
slouken@1895
   380
            }
slouken@1895
   381
            bit = (byte & 0x80) >> 7;
slouken@1895
   382
            if (1) {
slouken@1895
   383
                sR = srcpal[bit].r;
slouken@1895
   384
                sG = srcpal[bit].g;
slouken@1895
   385
                sB = srcpal[bit].b;
slouken@7502
   386
                DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
slouken@7502
   387
                ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA);
slouken@7502
   388
                ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
slouken@1895
   389
            }
slouken@1895
   390
            byte <<= 1;
slouken@1895
   391
            dst += dstbpp;
slouken@1895
   392
        }
slouken@1895
   393
        src += srcskip;
slouken@1895
   394
        dst += dstskip;
slouken@1895
   395
    }
slouken@0
   396
}
slouken@0
   397
slouken@1895
   398
static void
slouken@1895
   399
BlitBtoNAlphaKey(SDL_BlitInfo * info)
slouken@0
   400
{
slouken@2262
   401
    int width = info->dst_w;
slouken@2262
   402
    int height = info->dst_h;
slouken@2262
   403
    Uint8 *src = info->src;
slouken@2262
   404
    Uint8 *dst = info->dst;
slouken@2267
   405
    int srcskip = info->src_skip;
slouken@2267
   406
    int dstskip = info->dst_skip;
slouken@2267
   407
    SDL_PixelFormat *srcfmt = info->src_fmt;
slouken@2267
   408
    SDL_PixelFormat *dstfmt = info->dst_fmt;
slouken@1895
   409
    const SDL_Color *srcpal = srcfmt->palette->colors;
slouken@1895
   410
    int dstbpp;
slouken@1895
   411
    int c;
slouken@7502
   412
    Uint32 pixel;
slouken@7502
   413
    unsigned sR, sG, sB;
slouken@7502
   414
    unsigned dR, dG, dB, dA;
slouken@7502
   415
    const unsigned A = info->a;
slouken@2267
   416
    Uint32 ckey = info->colorkey;
slouken@0
   417
slouken@1895
   418
    /* Set up some basic variables */
slouken@1895
   419
    dstbpp = dstfmt->BytesPerPixel;
slouken@1895
   420
    srcskip += width - (width + 7) / 8;
slouken@0
   421
slouken@1895
   422
    while (height--) {
slouken@1895
   423
        Uint8 byte = 0, bit;
slouken@1895
   424
        for (c = 0; c < width; ++c) {
slouken@1895
   425
            if ((c & 7) == 0) {
slouken@1895
   426
                byte = *src++;
slouken@1895
   427
            }
slouken@1895
   428
            bit = (byte & 0x80) >> 7;
slouken@1895
   429
            if (bit != ckey) {
slouken@1895
   430
                sR = srcpal[bit].r;
slouken@1895
   431
                sG = srcpal[bit].g;
slouken@1895
   432
                sB = srcpal[bit].b;
slouken@7502
   433
                DISEMBLE_RGBA(dst, dstbpp, dstfmt, pixel, dR, dG, dB, dA);
slouken@7502
   434
                ALPHA_BLEND_RGBA(sR, sG, sB, A, dR, dG, dB, dA);
slouken@7502
   435
                ASSEMBLE_RGBA(dst, dstbpp, dstfmt, dR, dG, dB, dA);
slouken@1895
   436
            }
slouken@1895
   437
            byte <<= 1;
slouken@1895
   438
            dst += dstbpp;
slouken@1895
   439
        }
slouken@1895
   440
        src += srcskip;
slouken@1895
   441
        dst += dstskip;
slouken@1895
   442
    }
slouken@0
   443
}
slouken@0
   444
slouken@3162
   445
static const SDL_BlitFunc bitmap_blit[] = {
eviltypeguy@6967
   446
    (SDL_BlitFunc) NULL, BlitBto1, BlitBto2, BlitBto3, BlitBto4
slouken@0
   447
};
slouken@0
   448
slouken@3162
   449
static const SDL_BlitFunc colorkey_blit[] = {
eviltypeguy@6967
   450
    (SDL_BlitFunc) NULL, BlitBto1Key, BlitBto2Key, BlitBto3Key, BlitBto4Key
slouken@0
   451
};
slouken@0
   452
slouken@2267
   453
SDL_BlitFunc
slouken@2267
   454
SDL_CalculateBlit0(SDL_Surface * surface)
slouken@0
   455
{
slouken@1895
   456
    int which;
slouken@0
   457
slouken@1895
   458
    if (surface->format->BitsPerPixel != 1) {
slouken@1895
   459
        /* We don't support sub 8-bit packed pixel modes */
eviltypeguy@6967
   460
        return (SDL_BlitFunc) NULL;
slouken@1895
   461
    }
slouken@1895
   462
    if (surface->map->dst->format->BitsPerPixel < 8) {
slouken@1895
   463
        which = 0;
slouken@1895
   464
    } else {
slouken@1895
   465
        which = surface->map->dst->format->BytesPerPixel;
slouken@1895
   466
    }
slouken@2853
   467
    switch (surface->map->info.flags & ~SDL_COPY_RLE_MASK) {
slouken@2267
   468
    case 0:
slouken@1895
   469
        return bitmap_blit[which];
slouken@0
   470
slouken@2267
   471
    case SDL_COPY_COLORKEY:
slouken@1895
   472
        return colorkey_blit[which];
slouken@0
   473
slouken@2267
   474
    case SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
eviltypeguy@6967
   475
        return which >= 2 ? BlitBtoNAlpha : (SDL_BlitFunc) NULL;
slouken@0
   476
slouken@2267
   477
    case SDL_COPY_COLORKEY | SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
eviltypeguy@6967
   478
        return which >= 2 ? BlitBtoNAlphaKey : (SDL_BlitFunc) NULL;
slouken@1895
   479
    }
eviltypeguy@6967
   480
    return (SDL_BlitFunc) NULL;
slouken@0
   481
}
slouken@0
   482
slouken@1895
   483
/* vi: set ts=4 sw=4 expandtab: */