The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
authorSam Lantinga <slouken@libsdl.org>
Mon, 14 Dec 2009 23:29:37 +0000
changeset 35605543db4239e6
parent 3559 5f26a7eb5ff0
child 3561 00e7c6b7eb03
The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
include/SDL_compat.h
include/SDL_keysym.h
include/SDL_surface.h
src/video/SDL_surface.c
test/common.h
test/testsprite2.c
     1.1 --- a/include/SDL_compat.h	Mon Dec 14 06:52:17 2009 +0000
     1.2 +++ b/include/SDL_compat.h	Mon Dec 14 23:29:37 2009 +0000
     1.3 @@ -193,61 +193,6 @@
     1.4   *  These key constants were renamed for clarity or consistency. 
     1.5   */
     1.6  /*@{*/
     1.7 -#define SDLK_0	'0'
     1.8 -#define SDLK_1	'1'
     1.9 -#define SDLK_2	'2'
    1.10 -#define SDLK_3	'3'
    1.11 -#define SDLK_4	'4'
    1.12 -#define SDLK_5	'5'
    1.13 -#define SDLK_6	'6'
    1.14 -#define SDLK_7	'7'
    1.15 -#define SDLK_8	'8'
    1.16 -#define SDLK_9	'9'
    1.17 -#define SDLK_a  'a'
    1.18 -#define SDLK_b  'b'
    1.19 -#define SDLK_c  'c'
    1.20 -#define SDLK_d  'd'
    1.21 -#define SDLK_e  'e'
    1.22 -#define SDLK_f  'f'
    1.23 -#define SDLK_g  'g'
    1.24 -#define SDLK_h  'h'
    1.25 -#define SDLK_i  'i'
    1.26 -#define SDLK_j  'j'
    1.27 -#define SDLK_k  'k'
    1.28 -#define SDLK_l  'l'
    1.29 -#define SDLK_m  'm'
    1.30 -#define SDLK_n  'n'
    1.31 -#define SDLK_o  'o'
    1.32 -#define SDLK_p  'p'
    1.33 -#define SDLK_q  'q'
    1.34 -#define SDLK_r  'r'
    1.35 -#define SDLK_s  's'
    1.36 -#define SDLK_t  't'
    1.37 -#define SDLK_u  'u'
    1.38 -#define SDLK_v  'v'
    1.39 -#define SDLK_w  'w'
    1.40 -#define SDLK_x  'x'
    1.41 -#define SDLK_y  'y'
    1.42 -#define SDLK_z  'z'
    1.43 -#define SDLK_QUOTE      '\''
    1.44 -#define SDLK_MINUS      '-'
    1.45 -#define SDLK_BACKQUOTE  '`'
    1.46 -#define SDLK_EXCLAIM    '!'
    1.47 -#define SDLK_QUOTEDBL   '"'
    1.48 -#define SDLK_HASH       '#'
    1.49 -#define SDLK_DOLLAR     '$'
    1.50 -#define SDLK_AMPERSAND  '&'
    1.51 -#define SDLK_LEFTPAREN  '('
    1.52 -#define SDLK_RIGHTPAREN ')'
    1.53 -#define SDLK_ASTERISK   '*'
    1.54 -#define SDLK_PLUS       '+'
    1.55 -#define SDLK_COLON      ':'
    1.56 -#define SDLK_LESS       '<'
    1.57 -#define SDLK_GREATER    '>'
    1.58 -#define SDLK_QUESTION   '?'
    1.59 -#define SDLK_AT         '@'
    1.60 -#define SDLK_CARET      '^'
    1.61 -#define SDLK_UNDERSCORE '_'
    1.62  #define SDLK_KP0 SDLK_KP_0
    1.63  #define SDLK_KP1 SDLK_KP_1
    1.64  #define SDLK_KP2 SDLK_KP_2
     2.1 --- a/include/SDL_keysym.h	Mon Dec 14 06:52:17 2009 +0000
     2.2 +++ b/include/SDL_keysym.h	Mon Dec 14 23:29:37 2009 +0000
     2.3 @@ -55,6 +55,62 @@
     2.4      SDLK_TAB = '\t',
     2.5      SDLK_SPACE = ' ',
     2.6  
     2.7 +    SDLK_0 = '0',
     2.8 +    SDLK_1 = '1',
     2.9 +    SDLK_2 = '2',
    2.10 +    SDLK_3 = '3',
    2.11 +    SDLK_4 = '4',
    2.12 +    SDLK_5 = '5',
    2.13 +    SDLK_6 = '6',
    2.14 +    SDLK_7 = '7',
    2.15 +    SDLK_8 = '8',
    2.16 +    SDLK_9 = '9',
    2.17 +    SDLK_a = 'a',
    2.18 +    SDLK_b = 'b',
    2.19 +    SDLK_c = 'c',
    2.20 +    SDLK_d = 'd',
    2.21 +    SDLK_e = 'e',
    2.22 +    SDLK_f = 'f',
    2.23 +    SDLK_g = 'g',
    2.24 +    SDLK_h = 'h',
    2.25 +    SDLK_i = 'i',
    2.26 +    SDLK_j = 'j',
    2.27 +    SDLK_k = 'k',
    2.28 +    SDLK_l = 'l',
    2.29 +    SDLK_m = 'm',
    2.30 +    SDLK_n = 'n',
    2.31 +    SDLK_o = 'o',
    2.32 +    SDLK_p = 'p',
    2.33 +    SDLK_q = 'q',
    2.34 +    SDLK_r = 'r',
    2.35 +    SDLK_s = 's',
    2.36 +    SDLK_t = 't',
    2.37 +    SDLK_u = 'u',
    2.38 +    SDLK_v = 'v',
    2.39 +    SDLK_w = 'w',
    2.40 +    SDLK_x = 'x',
    2.41 +    SDLK_y = 'y',
    2.42 +    SDLK_z = 'z',
    2.43 +    SDLK_QUOTE = '\'',
    2.44 +    SDLK_MINUS = '-',
    2.45 +    SDLK_BACKQUOTE = '`',
    2.46 +    SDLK_EXCLAIM = '!',
    2.47 +    SDLK_QUOTEDBL = '"',
    2.48 +    SDLK_HASH = '#',
    2.49 +    SDLK_DOLLAR = '$',
    2.50 +    SDLK_AMPERSAND = '&',
    2.51 +    SDLK_LEFTPAREN = '(',
    2.52 +    SDLK_RIGHTPAREN = ')',
    2.53 +    SDLK_ASTERISK = '*',
    2.54 +    SDLK_PLUS = '+',
    2.55 +    SDLK_COLON = ':',
    2.56 +    SDLK_LESS = '<',
    2.57 +    SDLK_GREATER = '>',
    2.58 +    SDLK_QUESTION = '?',
    2.59 +    SDLK_AT = '@',
    2.60 +    SDLK_CARET = '^',
    2.61 +    SDLK_UNDERSCORE = '_',
    2.62 +
    2.63      SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),
    2.64  
    2.65      SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),
     3.1 --- a/include/SDL_surface.h	Mon Dec 14 06:52:17 2009 +0000
     3.2 +++ b/include/SDL_surface.h	Mon Dec 14 23:29:37 2009 +0000
     3.3 @@ -216,7 +216,7 @@
     3.4   *  \return 0 on success, or -1 if the surface is not valid
     3.5   */
     3.6  extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,
     3.7 -                                            Uint32 flag, Uint32 key);
     3.8 +                                            int flag, Uint32 key);
     3.9  
    3.10  /**
    3.11   *  \brief Gets the color key (transparent pixel) in a blittable surface.
     4.1 --- a/src/video/SDL_surface.c	Mon Dec 14 06:52:17 2009 +0000
     4.2 +++ b/src/video/SDL_surface.c	Mon Dec 14 23:29:37 2009 +0000
     4.3 @@ -239,7 +239,7 @@
     4.4  }
     4.5  
     4.6  int
     4.7 -SDL_SetColorKey(SDL_Surface * surface, Uint32 flag, Uint32 key)
     4.8 +SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
     4.9  {
    4.10      int flags;
    4.11  
     5.1 --- a/test/common.h	Mon Dec 14 06:52:17 2009 +0000
     5.2 +++ b/test/common.h	Mon Dec 14 23:29:37 2009 +0000
     5.3 @@ -1,6 +1,7 @@
     5.4  
     5.5  /* A simple test program framework */
     5.6  
     5.7 +#define SDL_NO_COMPAT
     5.8  #include "SDL.h"
     5.9  
    5.10  #define DEFAULT_WINDOW_WIDTH  640
     6.1 --- a/test/testsprite2.c	Mon Dec 14 06:52:17 2009 +0000
     6.2 +++ b/test/testsprite2.c	Mon Dec 14 23:29:37 2009 +0000
     6.3 @@ -57,22 +57,20 @@
     6.4  
     6.5      /* Set transparent pixel as the pixel at (0,0) */
     6.6      if (temp->format->palette) {
     6.7 -        SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint8 *) temp->pixels);
     6.8 +        SDL_SetColorKey(temp, 1, *(Uint8 *) temp->pixels);
     6.9      } else {
    6.10          switch (temp->format->BitsPerPixel) {
    6.11          case 15:
    6.12 -            SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
    6.13 -                            (*(Uint16 *) temp->pixels) & 0x00007FFF);
    6.14 +            SDL_SetColorKey(temp, 1, (*(Uint16 *) temp->pixels) & 0x00007FFF);
    6.15              break;
    6.16          case 16:
    6.17 -            SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint16 *) temp->pixels);
    6.18 +            SDL_SetColorKey(temp, 1, *(Uint16 *) temp->pixels);
    6.19              break;
    6.20          case 24:
    6.21 -            SDL_SetColorKey(temp, SDL_SRCCOLORKEY,
    6.22 -                            (*(Uint32 *) temp->pixels) & 0x00FFFFFF);
    6.23 +            SDL_SetColorKey(temp, 1, (*(Uint32 *) temp->pixels) & 0x00FFFFFF);
    6.24              break;
    6.25          case 32:
    6.26 -            SDL_SetColorKey(temp, SDL_SRCCOLORKEY, *(Uint32 *) temp->pixels);
    6.27 +            SDL_SetColorKey(temp, 1, *(Uint32 *) temp->pixels);
    6.28              break;
    6.29          }
    6.30      }