src/video/SDL_blit_0.c
author Sam Lantinga <slouken@libsdl.org>
Sun, 28 May 2006 13:04:16 +0000
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1402 d910939febfa
child 1668 4da1ee79c9af
permissions -rw-r--r--
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.

WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid.

The code is now run through a consistent indent format:
indent -i4 -nut -nsc -br -ce

The headers are being converted to automatically generate doxygen documentation.
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@0
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@252
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@1402
    22
#include "SDL_config.h"
slouken@0
    23
slouken@0
    24
#include "SDL_video.h"
slouken@0
    25
#include "SDL_blit.h"
slouken@0
    26
slouken@0
    27
/* Functions to blit from bitmaps to other surfaces */
slouken@0
    28
slouken@1662
    29
static void
slouken@1662
    30
BlitBto1 (SDL_BlitInfo * info)
slouken@0
    31
{
slouken@1662
    32
    int c;
slouken@1662
    33
    int width, height;
slouken@1662
    34
    Uint8 *src, *map, *dst;
slouken@1662
    35
    int srcskip, dstskip;
slouken@0
    36
slouken@1662
    37
    /* Set up some basic variables */
slouken@1662
    38
    width = info->d_width;
slouken@1662
    39
    height = info->d_height;
slouken@1662
    40
    src = info->s_pixels;
slouken@1662
    41
    srcskip = info->s_skip;
slouken@1662
    42
    dst = info->d_pixels;
slouken@1662
    43
    dstskip = info->d_skip;
slouken@1662
    44
    map = info->table;
slouken@1662
    45
    srcskip += width - (width + 7) / 8;
slouken@0
    46
slouken@1662
    47
    if (map) {
slouken@1662
    48
        while (height--) {
slouken@1662
    49
            Uint8 byte = 0, bit;
slouken@1662
    50
            for (c = 0; c < width; ++c) {
slouken@1662
    51
                if ((c & 7) == 0) {
slouken@1662
    52
                    byte = *src++;
slouken@1662
    53
                }
slouken@1662
    54
                bit = (byte & 0x80) >> 7;
slouken@1662
    55
                if (1) {
slouken@1662
    56
                    *dst = map[bit];
slouken@1662
    57
                }
slouken@1662
    58
                dst++;
slouken@1662
    59
                byte <<= 1;
slouken@1662
    60
            }
slouken@1662
    61
            src += srcskip;
slouken@1662
    62
            dst += dstskip;
slouken@1662
    63
        }
slouken@1662
    64
    } else {
slouken@1662
    65
        while (height--) {
slouken@1662
    66
            Uint8 byte = 0, bit;
slouken@1662
    67
            for (c = 0; c < width; ++c) {
slouken@1662
    68
                if ((c & 7) == 0) {
slouken@1662
    69
                    byte = *src++;
slouken@1662
    70
                }
slouken@1662
    71
                bit = (byte & 0x80) >> 7;
slouken@1662
    72
                if (1) {
slouken@1662
    73
                    *dst = bit;
slouken@1662
    74
                }
slouken@1662
    75
                dst++;
slouken@1662
    76
                byte <<= 1;
slouken@1662
    77
            }
slouken@1662
    78
            src += srcskip;
slouken@1662
    79
            dst += dstskip;
slouken@1662
    80
        }
slouken@1662
    81
    }
slouken@0
    82
}
slouken@1662
    83
static void
slouken@1662
    84
BlitBto2 (SDL_BlitInfo * info)
slouken@0
    85
{
slouken@1662
    86
    int c;
slouken@1662
    87
    int width, height;
slouken@1662
    88
    Uint8 *src;
slouken@1662
    89
    Uint16 *map, *dst;
slouken@1662
    90
    int srcskip, dstskip;
slouken@0
    91
slouken@1662
    92
    /* Set up some basic variables */
slouken@1662
    93
    width = info->d_width;
slouken@1662
    94
    height = info->d_height;
slouken@1662
    95
    src = info->s_pixels;
slouken@1662
    96
    srcskip = info->s_skip;
slouken@1662
    97
    dst = (Uint16 *) info->d_pixels;
slouken@1662
    98
    dstskip = info->d_skip / 2;
slouken@1662
    99
    map = (Uint16 *) info->table;
slouken@1662
   100
    srcskip += width - (width + 7) / 8;
slouken@0
   101
slouken@1662
   102
    while (height--) {
slouken@1662
   103
        Uint8 byte = 0, bit;
slouken@1662
   104
        for (c = 0; c < width; ++c) {
slouken@1662
   105
            if ((c & 7) == 0) {
slouken@1662
   106
                byte = *src++;
slouken@1662
   107
            }
slouken@1662
   108
            bit = (byte & 0x80) >> 7;
slouken@1662
   109
            if (1) {
slouken@1662
   110
                *dst = map[bit];
slouken@1662
   111
            }
slouken@1662
   112
            byte <<= 1;
slouken@1662
   113
            dst++;
slouken@1662
   114
        }
slouken@1662
   115
        src += srcskip;
slouken@1662
   116
        dst += dstskip;
slouken@1662
   117
    }
slouken@0
   118
}
slouken@1662
   119
static void
slouken@1662
   120
BlitBto3 (SDL_BlitInfo * info)
slouken@0
   121
{
slouken@1662
   122
    int c, o;
slouken@1662
   123
    int width, height;
slouken@1662
   124
    Uint8 *src, *map, *dst;
slouken@1662
   125
    int srcskip, dstskip;
slouken@0
   126
slouken@1662
   127
    /* Set up some basic variables */
slouken@1662
   128
    width = info->d_width;
slouken@1662
   129
    height = info->d_height;
slouken@1662
   130
    src = info->s_pixels;
slouken@1662
   131
    srcskip = info->s_skip;
slouken@1662
   132
    dst = info->d_pixels;
slouken@1662
   133
    dstskip = info->d_skip;
slouken@1662
   134
    map = info->table;
slouken@1662
   135
    srcskip += width - (width + 7) / 8;
slouken@0
   136
slouken@1662
   137
    while (height--) {
slouken@1662
   138
        Uint8 byte = 0, bit;
slouken@1662
   139
        for (c = 0; c < width; ++c) {
slouken@1662
   140
            if ((c & 7) == 0) {
slouken@1662
   141
                byte = *src++;
slouken@1662
   142
            }
slouken@1662
   143
            bit = (byte & 0x80) >> 7;
slouken@1662
   144
            if (1) {
slouken@1662
   145
                o = bit * 4;
slouken@1662
   146
                dst[0] = map[o++];
slouken@1662
   147
                dst[1] = map[o++];
slouken@1662
   148
                dst[2] = map[o++];
slouken@1662
   149
            }
slouken@1662
   150
            byte <<= 1;
slouken@1662
   151
            dst += 3;
slouken@1662
   152
        }
slouken@1662
   153
        src += srcskip;
slouken@1662
   154
        dst += dstskip;
slouken@1662
   155
    }
slouken@0
   156
}
slouken@1662
   157
static void
slouken@1662
   158
BlitBto4 (SDL_BlitInfo * info)
slouken@0
   159
{
slouken@1662
   160
    int width, height;
slouken@1662
   161
    Uint8 *src;
slouken@1662
   162
    Uint32 *map, *dst;
slouken@1662
   163
    int srcskip, dstskip;
slouken@1662
   164
    int c;
slouken@0
   165
slouken@1662
   166
    /* Set up some basic variables */
slouken@1662
   167
    width = info->d_width;
slouken@1662
   168
    height = info->d_height;
slouken@1662
   169
    src = info->s_pixels;
slouken@1662
   170
    srcskip = info->s_skip;
slouken@1662
   171
    dst = (Uint32 *) info->d_pixels;
slouken@1662
   172
    dstskip = info->d_skip / 4;
slouken@1662
   173
    map = (Uint32 *) info->table;
slouken@1662
   174
    srcskip += width - (width + 7) / 8;
slouken@0
   175
slouken@1662
   176
    while (height--) {
slouken@1662
   177
        Uint8 byte = 0, bit;
slouken@1662
   178
        for (c = 0; c < width; ++c) {
slouken@1662
   179
            if ((c & 7) == 0) {
slouken@1662
   180
                byte = *src++;
slouken@1662
   181
            }
slouken@1662
   182
            bit = (byte & 0x80) >> 7;
slouken@1662
   183
            if (1) {
slouken@1662
   184
                *dst = map[bit];
slouken@1662
   185
            }
slouken@1662
   186
            byte <<= 1;
slouken@1662
   187
            dst++;
slouken@1662
   188
        }
slouken@1662
   189
        src += srcskip;
slouken@1662
   190
        dst += dstskip;
slouken@1662
   191
    }
slouken@0
   192
}
slouken@0
   193
slouken@1662
   194
static void
slouken@1662
   195
BlitBto1Key (SDL_BlitInfo * info)
slouken@0
   196
{
slouken@1662
   197
    int width = info->d_width;
slouken@1662
   198
    int height = info->d_height;
slouken@1662
   199
    Uint8 *src = info->s_pixels;
slouken@1662
   200
    Uint8 *dst = info->d_pixels;
slouken@1662
   201
    int srcskip = info->s_skip;
slouken@1662
   202
    int dstskip = info->d_skip;
slouken@1662
   203
    Uint32 ckey = info->src->colorkey;
slouken@1662
   204
    Uint8 *palmap = info->table;
slouken@1662
   205
    int c;
slouken@0
   206
slouken@1662
   207
    /* Set up some basic variables */
slouken@1662
   208
    srcskip += width - (width + 7) / 8;
slouken@0
   209
slouken@1662
   210
    if (palmap) {
slouken@1662
   211
        while (height--) {
slouken@1662
   212
            Uint8 byte = 0, bit;
slouken@1662
   213
            for (c = 0; c < width; ++c) {
slouken@1662
   214
                if ((c & 7) == 0) {
slouken@1662
   215
                    byte = *src++;
slouken@1662
   216
                }
slouken@1662
   217
                bit = (byte & 0x80) >> 7;
slouken@1662
   218
                if (bit != ckey) {
slouken@1662
   219
                    *dst = palmap[bit];
slouken@1662
   220
                }
slouken@1662
   221
                dst++;
slouken@1662
   222
                byte <<= 1;
slouken@1662
   223
            }
slouken@1662
   224
            src += srcskip;
slouken@1662
   225
            dst += dstskip;
slouken@1662
   226
        }
slouken@1662
   227
    } else {
slouken@1662
   228
        while (height--) {
slouken@1662
   229
            Uint8 byte = 0, bit;
slouken@1662
   230
            for (c = 0; c < width; ++c) {
slouken@1662
   231
                if ((c & 7) == 0) {
slouken@1662
   232
                    byte = *src++;
slouken@1662
   233
                }
slouken@1662
   234
                bit = (byte & 0x80) >> 7;
slouken@1662
   235
                if (bit != ckey) {
slouken@1662
   236
                    *dst = bit;
slouken@1662
   237
                }
slouken@1662
   238
                dst++;
slouken@1662
   239
                byte <<= 1;
slouken@1662
   240
            }
slouken@1662
   241
            src += srcskip;
slouken@1662
   242
            dst += dstskip;
slouken@1662
   243
        }
slouken@1662
   244
    }
slouken@0
   245
}
slouken@0
   246
slouken@1662
   247
static void
slouken@1662
   248
BlitBto2Key (SDL_BlitInfo * info)
slouken@0
   249
{
slouken@1662
   250
    int width = info->d_width;
slouken@1662
   251
    int height = info->d_height;
slouken@1662
   252
    Uint8 *src = info->s_pixels;
slouken@1662
   253
    Uint16 *dstp = (Uint16 *) info->d_pixels;
slouken@1662
   254
    int srcskip = info->s_skip;
slouken@1662
   255
    int dstskip = info->d_skip;
slouken@1662
   256
    Uint32 ckey = info->src->colorkey;
slouken@1662
   257
    Uint8 *palmap = info->table;
slouken@1662
   258
    int c;
slouken@0
   259
slouken@1662
   260
    /* Set up some basic variables */
slouken@1662
   261
    srcskip += width - (width + 7) / 8;
slouken@1662
   262
    dstskip /= 2;
slouken@0
   263
slouken@1662
   264
    while (height--) {
slouken@1662
   265
        Uint8 byte = 0, bit;
slouken@1662
   266
        for (c = 0; c < width; ++c) {
slouken@1662
   267
            if ((c & 7) == 0) {
slouken@1662
   268
                byte = *src++;
slouken@1662
   269
            }
slouken@1662
   270
            bit = (byte & 0x80) >> 7;
slouken@1662
   271
            if (bit != ckey) {
slouken@1662
   272
                *dstp = ((Uint16 *) palmap)[bit];
slouken@1662
   273
            }
slouken@1662
   274
            byte <<= 1;
slouken@1662
   275
            dstp++;
slouken@1662
   276
        }
slouken@1662
   277
        src += srcskip;
slouken@1662
   278
        dstp += dstskip;
slouken@1662
   279
    }
slouken@0
   280
}
slouken@0
   281
slouken@1662
   282
static void
slouken@1662
   283
BlitBto3Key (SDL_BlitInfo * info)
slouken@0
   284
{
slouken@1662
   285
    int width = info->d_width;
slouken@1662
   286
    int height = info->d_height;
slouken@1662
   287
    Uint8 *src = info->s_pixels;
slouken@1662
   288
    Uint8 *dst = info->d_pixels;
slouken@1662
   289
    int srcskip = info->s_skip;
slouken@1662
   290
    int dstskip = info->d_skip;
slouken@1662
   291
    Uint32 ckey = info->src->colorkey;
slouken@1662
   292
    Uint8 *palmap = info->table;
slouken@1662
   293
    int c;
slouken@0
   294
slouken@1662
   295
    /* Set up some basic variables */
slouken@1662
   296
    srcskip += width - (width + 7) / 8;
slouken@0
   297
slouken@1662
   298
    while (height--) {
slouken@1662
   299
        Uint8 byte = 0, bit;
slouken@1662
   300
        for (c = 0; c < width; ++c) {
slouken@1662
   301
            if ((c & 7) == 0) {
slouken@1662
   302
                byte = *src++;
slouken@1662
   303
            }
slouken@1662
   304
            bit = (byte & 0x80) >> 7;
slouken@1662
   305
            if (bit != ckey) {
slouken@1662
   306
                SDL_memcpy (dst, &palmap[bit * 4], 3);
slouken@1662
   307
            }
slouken@1662
   308
            byte <<= 1;
slouken@1662
   309
            dst += 3;
slouken@1662
   310
        }
slouken@1662
   311
        src += srcskip;
slouken@1662
   312
        dst += dstskip;
slouken@1662
   313
    }
slouken@0
   314
}
slouken@0
   315
slouken@1662
   316
static void
slouken@1662
   317
BlitBto4Key (SDL_BlitInfo * info)
slouken@0
   318
{
slouken@1662
   319
    int width = info->d_width;
slouken@1662
   320
    int height = info->d_height;
slouken@1662
   321
    Uint8 *src = info->s_pixels;
slouken@1662
   322
    Uint32 *dstp = (Uint32 *) info->d_pixels;
slouken@1662
   323
    int srcskip = info->s_skip;
slouken@1662
   324
    int dstskip = info->d_skip;
slouken@1662
   325
    Uint32 ckey = info->src->colorkey;
slouken@1662
   326
    Uint8 *palmap = info->table;
slouken@1662
   327
    int c;
slouken@0
   328
slouken@1662
   329
    /* Set up some basic variables */
slouken@1662
   330
    srcskip += width - (width + 7) / 8;
slouken@1662
   331
    dstskip /= 4;
slouken@0
   332
slouken@1662
   333
    while (height--) {
slouken@1662
   334
        Uint8 byte = 0, bit;
slouken@1662
   335
        for (c = 0; c < width; ++c) {
slouken@1662
   336
            if ((c & 7) == 0) {
slouken@1662
   337
                byte = *src++;
slouken@1662
   338
            }
slouken@1662
   339
            bit = (byte & 0x80) >> 7;
slouken@1662
   340
            if (bit != ckey) {
slouken@1662
   341
                *dstp = ((Uint32 *) palmap)[bit];
slouken@1662
   342
            }
slouken@1662
   343
            byte <<= 1;
slouken@1662
   344
            dstp++;
slouken@1662
   345
        }
slouken@1662
   346
        src += srcskip;
slouken@1662
   347
        dstp += dstskip;
slouken@1662
   348
    }
slouken@0
   349
}
slouken@0
   350
slouken@1662
   351
static void
slouken@1662
   352
BlitBtoNAlpha (SDL_BlitInfo * info)
slouken@0
   353
{
slouken@1662
   354
    int width = info->d_width;
slouken@1662
   355
    int height = info->d_height;
slouken@1662
   356
    Uint8 *src = info->s_pixels;
slouken@1662
   357
    Uint8 *dst = info->d_pixels;
slouken@1662
   358
    int srcskip = info->s_skip;
slouken@1662
   359
    int dstskip = info->d_skip;
slouken@1662
   360
    const SDL_Color *srcpal = info->src->palette->colors;
slouken@1662
   361
    SDL_PixelFormat *dstfmt = info->dst;
slouken@1662
   362
    int dstbpp;
slouken@1662
   363
    int c;
slouken@1662
   364
    const int A = info->src->alpha;
slouken@0
   365
slouken@1662
   366
    /* Set up some basic variables */
slouken@1662
   367
    dstbpp = dstfmt->BytesPerPixel;
slouken@1662
   368
    srcskip += width - (width + 7) / 8;
slouken@0
   369
slouken@1662
   370
    while (height--) {
slouken@1662
   371
        Uint8 byte = 0, bit;
slouken@1662
   372
        for (c = 0; c < width; ++c) {
slouken@1662
   373
            if ((c & 7) == 0) {
slouken@1662
   374
                byte = *src++;
slouken@1662
   375
            }
slouken@1662
   376
            bit = (byte & 0x80) >> 7;
slouken@1662
   377
            if (1) {
slouken@1662
   378
                Uint32 pixel;
slouken@1662
   379
                unsigned sR, sG, sB;
slouken@1662
   380
                unsigned dR, dG, dB;
slouken@1662
   381
                sR = srcpal[bit].r;
slouken@1662
   382
                sG = srcpal[bit].g;
slouken@1662
   383
                sB = srcpal[bit].b;
slouken@1662
   384
                DISEMBLE_RGB (dst, dstbpp, dstfmt, pixel, dR, dG, dB);
slouken@1662
   385
                ALPHA_BLEND (sR, sG, sB, A, dR, dG, dB);
slouken@1662
   386
                ASSEMBLE_RGB (dst, dstbpp, dstfmt, dR, dG, dB);
slouken@1662
   387
            }
slouken@1662
   388
            byte <<= 1;
slouken@1662
   389
            dst += dstbpp;
slouken@1662
   390
        }
slouken@1662
   391
        src += srcskip;
slouken@1662
   392
        dst += dstskip;
slouken@1662
   393
    }
slouken@0
   394
}
slouken@0
   395
slouken@1662
   396
static void
slouken@1662
   397
BlitBtoNAlphaKey (SDL_BlitInfo * info)
slouken@0
   398
{
slouken@1662
   399
    int width = info->d_width;
slouken@1662
   400
    int height = info->d_height;
slouken@1662
   401
    Uint8 *src = info->s_pixels;
slouken@1662
   402
    Uint8 *dst = info->d_pixels;
slouken@1662
   403
    int srcskip = info->s_skip;
slouken@1662
   404
    int dstskip = info->d_skip;
slouken@1662
   405
    SDL_PixelFormat *srcfmt = info->src;
slouken@1662
   406
    SDL_PixelFormat *dstfmt = info->dst;
slouken@1662
   407
    const SDL_Color *srcpal = srcfmt->palette->colors;
slouken@1662
   408
    int dstbpp;
slouken@1662
   409
    int c;
slouken@1662
   410
    const int A = srcfmt->alpha;
slouken@1662
   411
    Uint32 ckey = srcfmt->colorkey;
slouken@0
   412
slouken@1662
   413
    /* Set up some basic variables */
slouken@1662
   414
    dstbpp = dstfmt->BytesPerPixel;
slouken@1662
   415
    srcskip += width - (width + 7) / 8;
slouken@0
   416
slouken@1662
   417
    while (height--) {
slouken@1662
   418
        Uint8 byte = 0, bit;
slouken@1662
   419
        for (c = 0; c < width; ++c) {
slouken@1662
   420
            if ((c & 7) == 0) {
slouken@1662
   421
                byte = *src++;
slouken@1662
   422
            }
slouken@1662
   423
            bit = (byte & 0x80) >> 7;
slouken@1662
   424
            if (bit != ckey) {
slouken@1662
   425
                int sR, sG, sB;
slouken@1662
   426
                int dR, dG, dB;
slouken@1662
   427
                Uint32 pixel;
slouken@1662
   428
                sR = srcpal[bit].r;
slouken@1662
   429
                sG = srcpal[bit].g;
slouken@1662
   430
                sB = srcpal[bit].b;
slouken@1662
   431
                DISEMBLE_RGB (dst, dstbpp, dstfmt, pixel, dR, dG, dB);
slouken@1662
   432
                ALPHA_BLEND (sR, sG, sB, A, dR, dG, dB);
slouken@1662
   433
                ASSEMBLE_RGB (dst, dstbpp, dstfmt, dR, dG, dB);
slouken@1662
   434
            }
slouken@1662
   435
            byte <<= 1;
slouken@1662
   436
            dst += dstbpp;
slouken@1662
   437
        }
slouken@1662
   438
        src += srcskip;
slouken@1662
   439
        dst += dstskip;
slouken@1662
   440
    }
slouken@0
   441
}
slouken@0
   442
slouken@0
   443
static SDL_loblit bitmap_blit[] = {
slouken@1662
   444
    NULL, BlitBto1, BlitBto2, BlitBto3, BlitBto4
slouken@0
   445
};
slouken@0
   446
slouken@0
   447
static SDL_loblit colorkey_blit[] = {
slouken@0
   448
    NULL, BlitBto1Key, BlitBto2Key, BlitBto3Key, BlitBto4Key
slouken@0
   449
};
slouken@0
   450
slouken@1662
   451
SDL_loblit
slouken@1662
   452
SDL_CalculateBlit0 (SDL_Surface * surface, int blit_index)
slouken@0
   453
{
slouken@1662
   454
    int which;
slouken@0
   455
slouken@1662
   456
    if (surface->format->BitsPerPixel != 1) {
slouken@1662
   457
        /* We don't support sub 8-bit packed pixel modes */
slouken@1662
   458
        return NULL;
slouken@1662
   459
    }
slouken@1662
   460
    if (surface->map->dst->format->BitsPerPixel < 8) {
slouken@1662
   461
        which = 0;
slouken@1662
   462
    } else {
slouken@1662
   463
        which = surface->map->dst->format->BytesPerPixel;
slouken@1662
   464
    }
slouken@1662
   465
    switch (blit_index) {
slouken@1662
   466
    case 0:                    /* copy */
slouken@1662
   467
        return bitmap_blit[which];
slouken@0
   468
slouken@1662
   469
    case 1:                    /* colorkey */
slouken@1662
   470
        return colorkey_blit[which];
slouken@0
   471
slouken@1662
   472
    case 2:                    /* alpha */
slouken@1662
   473
        return which >= 2 ? BlitBtoNAlpha : NULL;
slouken@0
   474
slouken@1662
   475
    case 4:                    /* alpha + colorkey */
slouken@1662
   476
        return which >= 2 ? BlitBtoNAlphaKey : NULL;
slouken@1662
   477
    }
slouken@1662
   478
    return NULL;
slouken@0
   479
}
slouken@0
   480
slouken@1662
   481
/* vi: set ts=4 sw=4 expandtab: */