The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404309
This commit is contained in:
parent
1bd0c772d9
commit
0158b925d3
6 changed files with 64 additions and 64 deletions
|
@ -193,61 +193,6 @@ struct SDL_SysWMinfo;
|
|||
* These key constants were renamed for clarity or consistency.
|
||||
*/
|
||||
/*@{*/
|
||||
#define SDLK_0 '0'
|
||||
#define SDLK_1 '1'
|
||||
#define SDLK_2 '2'
|
||||
#define SDLK_3 '3'
|
||||
#define SDLK_4 '4'
|
||||
#define SDLK_5 '5'
|
||||
#define SDLK_6 '6'
|
||||
#define SDLK_7 '7'
|
||||
#define SDLK_8 '8'
|
||||
#define SDLK_9 '9'
|
||||
#define SDLK_a 'a'
|
||||
#define SDLK_b 'b'
|
||||
#define SDLK_c 'c'
|
||||
#define SDLK_d 'd'
|
||||
#define SDLK_e 'e'
|
||||
#define SDLK_f 'f'
|
||||
#define SDLK_g 'g'
|
||||
#define SDLK_h 'h'
|
||||
#define SDLK_i 'i'
|
||||
#define SDLK_j 'j'
|
||||
#define SDLK_k 'k'
|
||||
#define SDLK_l 'l'
|
||||
#define SDLK_m 'm'
|
||||
#define SDLK_n 'n'
|
||||
#define SDLK_o 'o'
|
||||
#define SDLK_p 'p'
|
||||
#define SDLK_q 'q'
|
||||
#define SDLK_r 'r'
|
||||
#define SDLK_s 's'
|
||||
#define SDLK_t 't'
|
||||
#define SDLK_u 'u'
|
||||
#define SDLK_v 'v'
|
||||
#define SDLK_w 'w'
|
||||
#define SDLK_x 'x'
|
||||
#define SDLK_y 'y'
|
||||
#define SDLK_z 'z'
|
||||
#define SDLK_QUOTE '\''
|
||||
#define SDLK_MINUS '-'
|
||||
#define SDLK_BACKQUOTE '`'
|
||||
#define SDLK_EXCLAIM '!'
|
||||
#define SDLK_QUOTEDBL '"'
|
||||
#define SDLK_HASH '#'
|
||||
#define SDLK_DOLLAR '$'
|
||||
#define SDLK_AMPERSAND '&'
|
||||
#define SDLK_LEFTPAREN '('
|
||||
#define SDLK_RIGHTPAREN ')'
|
||||
#define SDLK_ASTERISK '*'
|
||||
#define SDLK_PLUS '+'
|
||||
#define SDLK_COLON ':'
|
||||
#define SDLK_LESS '<'
|
||||
#define SDLK_GREATER '>'
|
||||
#define SDLK_QUESTION '?'
|
||||
#define SDLK_AT '@'
|
||||
#define SDLK_CARET '^'
|
||||
#define SDLK_UNDERSCORE '_'
|
||||
#define SDLK_KP0 SDLK_KP_0
|
||||
#define SDLK_KP1 SDLK_KP_1
|
||||
#define SDLK_KP2 SDLK_KP_2
|
||||
|
|
|
@ -55,6 +55,62 @@ enum
|
|||
SDLK_TAB = '\t',
|
||||
SDLK_SPACE = ' ',
|
||||
|
||||
SDLK_0 = '0',
|
||||
SDLK_1 = '1',
|
||||
SDLK_2 = '2',
|
||||
SDLK_3 = '3',
|
||||
SDLK_4 = '4',
|
||||
SDLK_5 = '5',
|
||||
SDLK_6 = '6',
|
||||
SDLK_7 = '7',
|
||||
SDLK_8 = '8',
|
||||
SDLK_9 = '9',
|
||||
SDLK_a = 'a',
|
||||
SDLK_b = 'b',
|
||||
SDLK_c = 'c',
|
||||
SDLK_d = 'd',
|
||||
SDLK_e = 'e',
|
||||
SDLK_f = 'f',
|
||||
SDLK_g = 'g',
|
||||
SDLK_h = 'h',
|
||||
SDLK_i = 'i',
|
||||
SDLK_j = 'j',
|
||||
SDLK_k = 'k',
|
||||
SDLK_l = 'l',
|
||||
SDLK_m = 'm',
|
||||
SDLK_n = 'n',
|
||||
SDLK_o = 'o',
|
||||
SDLK_p = 'p',
|
||||
SDLK_q = 'q',
|
||||
SDLK_r = 'r',
|
||||
SDLK_s = 's',
|
||||
SDLK_t = 't',
|
||||
SDLK_u = 'u',
|
||||
SDLK_v = 'v',
|
||||
SDLK_w = 'w',
|
||||
SDLK_x = 'x',
|
||||
SDLK_y = 'y',
|
||||
SDLK_z = 'z',
|
||||
SDLK_QUOTE = '\'',
|
||||
SDLK_MINUS = '-',
|
||||
SDLK_BACKQUOTE = '`',
|
||||
SDLK_EXCLAIM = '!',
|
||||
SDLK_QUOTEDBL = '"',
|
||||
SDLK_HASH = '#',
|
||||
SDLK_DOLLAR = '$',
|
||||
SDLK_AMPERSAND = '&',
|
||||
SDLK_LEFTPAREN = '(',
|
||||
SDLK_RIGHTPAREN = ')',
|
||||
SDLK_ASTERISK = '*',
|
||||
SDLK_PLUS = '+',
|
||||
SDLK_COLON = ':',
|
||||
SDLK_LESS = '<',
|
||||
SDLK_GREATER = '>',
|
||||
SDLK_QUESTION = '?',
|
||||
SDLK_AT = '@',
|
||||
SDLK_CARET = '^',
|
||||
SDLK_UNDERSCORE = '_',
|
||||
|
||||
SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
|
||||
|
||||
SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
|
||||
|
|
|
@ -216,7 +216,7 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,
|
|||
* \return 0 on success, or -1 if the surface is not valid
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
|
||||
Uint32 flag, Uint32 key);
|
||||
int flag, Uint32 key);
|
||||
|
||||
/**
|
||||
* \brief Gets the color key (transparent pixel) in a blittable surface.
|
||||
|
|
|
@ -239,7 +239,7 @@ SDL_SetSurfaceRLE(SDL_Surface * surface, int flag)
|
|||
}
|
||||
|
||||
int
|
||||
SDL_SetColorKey(SDL_Surface * surface, Uint32 flag, Uint32 key)
|
||||
SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
|
||||
{
|
||||
int flags;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
/* A simple test program framework */
|
||||
|
||||
#define SDL_NO_COMPAT
|
||||
#include "SDL.h"
|
||||
|
||||
#define DEFAULT_WINDOW_WIDTH 640
|
||||
|
|
|
@ -57,22 +57,20 @@ LoadSprite(char *file)
|
|||
|
||||
/* Set transparent pixel as the pixel at (0,0) */
|
||||
if (temp->format->palette) {
|
||||
SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint8 *) temp->pixels);
|
||||
SDL_SetColorKey(temp, 1, *(Uint8 *) temp->pixels);
|
||||
} else {
|
||||
switch (temp->format->BitsPerPixel) {
|
||||
case 15:
|
||||
SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
|
||||
(*(Uint16 *) temp->pixels) & 0x00007FFF);
|
||||
SDL_SetColorKey(temp, 1, (*(Uint16 *) temp->pixels) & 0x00007FFF);
|
||||
break;
|
||||
case 16:
|
||||
SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint16 *) temp->pixels);
|
||||
SDL_SetColorKey(temp, 1, *(Uint16 *) temp->pixels);
|
||||
break;
|
||||
case 24:
|
||||
SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
|
||||
(*(Uint32 *) temp->pixels) & 0x00FFFFFF);
|
||||
SDL_SetColorKey(temp, 1, (*(Uint32 *) temp->pixels) & 0x00FFFFFF);
|
||||
break;
|
||||
case 32:
|
||||
SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint32 *) temp->pixels);
|
||||
SDL_SetColorKey(temp, 1, *(Uint32 *) temp->pixels);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue