Use the enumerated type for blend and scale mode instead of int
authorSam Lantinga <slouken@libsdl.org>
Sun, 12 Dec 2010 15:19:05 -0800
changeset 4929aa8888658021
parent 4927 d716dff4b13e
child 4930 719dbb5afce8
Use the enumerated type for blend and scale mode instead of int
Renamed SDL_TextureScaleMode to SDL_ScaleMode
Makefile.in
include/SDL_blendmode.h
include/SDL_compat.h
include/SDL_scalemode.h
include/SDL_surface.h
include/SDL_video.h
src/video/SDL_blendfillrect.c
src/video/SDL_blendline.c
src/video/SDL_blendpoint.c
src/video/SDL_blendrect.c
src/video/SDL_renderer_gl.c
src/video/SDL_renderer_gles.c
src/video/SDL_renderer_sw.c
src/video/SDL_surface.c
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/directfb/SDL_DirectFB_render.c
src/video/nds/SDL_ndsrender.c
src/video/photon/SDL_photon_render.c
src/video/ps3/SDL_ps3render.c
src/video/qnxgf/SDL_gf_render.c
src/video/win32/SDL_ceddrawrender.c
src/video/win32/SDL_d3drender.c
src/video/win32/SDL_gapirender.c
src/video/win32/SDL_gdirender.c
src/video/x11/SDL_x11render.c
test/common.c
test/testsprite2.c
     1.1 --- a/Makefile.in	Thu Dec 02 11:56:23 2010 -0800
     1.2 +++ b/Makefile.in	Sun Dec 12 15:19:05 2010 -0800
     1.3 @@ -44,7 +44,52 @@
     1.4  
     1.5  DIST = acinclude autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl-config.in sdl.m4 sdl.pc.in SDL.spec SDL.spec.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iPhoneOS
     1.6  
     1.7 -HDRS = SDL.h SDL_assert.h SDL_atomic.h SDL_audio.h SDL_clipboard.h SDL_compat.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_gesture.h SDL_haptic.h SDL_input.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_opengles.h SDL_pixels.h SDL_platform.h SDL_power.h SDL_quit.h SDL_rect.h SDL_revision.h SDL_rwops.h SDL_scancode.h SDL_shape.h SDL_stdinc.h SDL_surface.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_touch.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h
     1.8 +HDRS = \
     1.9 +	SDL.h \
    1.10 +	SDL_assert.h \
    1.11 +	SDL_atomic.h \
    1.12 +	SDL_audio.h \
    1.13 +	SDL_blendmode.h \
    1.14 +	SDL_clipboard.h \
    1.15 +	SDL_compat.h \
    1.16 +	SDL_cpuinfo.h \
    1.17 +	SDL_endian.h \
    1.18 +	SDL_error.h \
    1.19 +	SDL_events.h \
    1.20 +	SDL_gesture.h \
    1.21 +	SDL_haptic.h \
    1.22 +	SDL_input.h \
    1.23 +	SDL_joystick.h \
    1.24 +	SDL_keyboard.h \
    1.25 +	SDL_keysym.h \
    1.26 +	SDL_loadso.h \
    1.27 +	SDL_main.h \
    1.28 +	SDL_mouse.h \
    1.29 +	SDL_mutex.h \
    1.30 +	SDL_name.h \
    1.31 +	SDL_opengl.h \
    1.32 +	SDL_opengles.h \
    1.33 +	SDL_pixels.h \
    1.34 +	SDL_platform.h \
    1.35 +	SDL_power.h \
    1.36 +	SDL_quit.h \
    1.37 +	SDL_rect.h \
    1.38 +	SDL_revision.h \
    1.39 +	SDL_rwops.h \
    1.40 +	SDL_scalemode.h \
    1.41 +	SDL_scancode.h \
    1.42 +	SDL_shape.h \
    1.43 +	SDL_stdinc.h \
    1.44 +	SDL_surface.h \
    1.45 +	SDL_syswm.h \
    1.46 +	SDL_thread.h \
    1.47 +	SDL_timer.h \
    1.48 +	SDL_touch.h \
    1.49 +	SDL_types.h \
    1.50 +	SDL_version.h \
    1.51 +	SDL_video.h \
    1.52 +	begin_code.h \
    1.53 +	close_code.h
    1.54  
    1.55  LT_AGE      = @LT_AGE@
    1.56  LT_CURRENT  = @LT_CURRENT@
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/include/SDL_blendmode.h	Sun Dec 12 15:19:05 2010 -0800
     2.3 @@ -0,0 +1,64 @@
     2.4 +/*
     2.5 +    SDL - Simple DirectMedia Layer
     2.6 +    Copyright (C) 1997-2010 Sam Lantinga
     2.7 +
     2.8 +    This library is free software; you can redistribute it and/or
     2.9 +    modify it under the terms of the GNU Lesser General Public
    2.10 +    License as published by the Free Software Foundation; either
    2.11 +    version 2.1 of the License, or (at your option) any later version.
    2.12 +
    2.13 +    This library is distributed in the hope that it will be useful,
    2.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    2.16 +    Lesser General Public License for more details.
    2.17 +
    2.18 +    You should have received a copy of the GNU Lesser General Public
    2.19 +    License along with this library; if not, write to the Free Software
    2.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2.21 +
    2.22 +    Sam Lantinga
    2.23 +    slouken@libsdl.org
    2.24 +*/
    2.25 +
    2.26 +/**
    2.27 + *  \file SDL_blendmode.h
    2.28 + *  
    2.29 + *  Header file declaring the SDL_BlendMode enumeration
    2.30 + */
    2.31 +
    2.32 +#ifndef _SDL_blendmode_h
    2.33 +#define _SDL_blendmode_h
    2.34 +
    2.35 +#include "begin_code.h"
    2.36 +/* Set up for C function definitions, even when using C++ */
    2.37 +#ifdef __cplusplus
    2.38 +/* *INDENT-OFF* */
    2.39 +extern "C" {
    2.40 +/* *INDENT-ON* */
    2.41 +#endif
    2.42 +
    2.43 +/**
    2.44 + *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
    2.45 + */
    2.46 +typedef enum
    2.47 +{
    2.48 +    SDL_BLENDMODE_NONE = 0x00000000,     /**< No blending */
    2.49 +    SDL_BLENDMODE_MASK = 0x00000001,     /**< dst = A ? src : dst 
    2.50 +                                              (alpha is mask) */
    2.51 +    
    2.52 +    SDL_BLENDMODE_BLEND = 0x00000002,    /**< dst = (src * A) + (dst * (1-A)) */
    2.53 +    SDL_BLENDMODE_ADD = 0x00000004,      /**< dst = (src * A) + dst */
    2.54 +    SDL_BLENDMODE_MOD = 0x00000008       /**< dst = src * dst */
    2.55 +} SDL_BlendMode;
    2.56 +
    2.57 +/* Ends C function definitions when using C++ */
    2.58 +#ifdef __cplusplus
    2.59 +/* *INDENT-OFF* */
    2.60 +}
    2.61 +/* *INDENT-ON* */
    2.62 +#endif
    2.63 +#include "close_code.h"
    2.64 +
    2.65 +#endif /* _SDL_video_h */
    2.66 +
    2.67 +/* vi: set ts=4 sw=4 expandtab: */
     3.1 --- a/include/SDL_compat.h	Thu Dec 02 11:56:23 2010 -0800
     3.2 +++ b/include/SDL_compat.h	Sun Dec 12 15:19:05 2010 -0800
     3.3 @@ -202,6 +202,14 @@
     3.4      SDL_GRAB_ON = 1
     3.5  } SDL_GrabMode;
     3.6  
     3.7 +typedef enum
     3.8 +{
     3.9 +    SDL_TEXTURESCALEMODE_NONE = SDL_SCALEMODE_NONE,
    3.10 +    SDL_TEXTURESCALEMODE_FAST = SDL_SCALEMODE_FAST,
    3.11 +    SDL_TEXTURESCALEMODE_SLOW = SDL_SCALEMODE_SLOW,
    3.12 +    SDL_TEXTURESCALEMODE_BEST = SDL_SCALEMODE_BEST
    3.13 +} SDL_TextureScaleMode;
    3.14 +
    3.15  struct SDL_SysWMinfo;
    3.16  
    3.17  /**
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/include/SDL_scalemode.h	Sun Dec 12 15:19:05 2010 -0800
     4.3 @@ -0,0 +1,69 @@
     4.4 +/*
     4.5 +    SDL - Simple DirectMedia Layer
     4.6 +    Copyright (C) 1997-2010 Sam Lantinga
     4.7 +
     4.8 +    This library is free software; you can redistribute it and/or
     4.9 +    modify it under the terms of the GNU Lesser General Public
    4.10 +    License as published by the Free Software Foundation; either
    4.11 +    version 2.1 of the License, or (at your option) any later version.
    4.12 +
    4.13 +    This library is distributed in the hope that it will be useful,
    4.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    4.16 +    Lesser General Public License for more details.
    4.17 +
    4.18 +    You should have received a copy of the GNU Lesser General Public
    4.19 +    License along with this library; if not, write to the Free Software
    4.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    4.21 +
    4.22 +    Sam Lantinga
    4.23 +    slouken@libsdl.org
    4.24 +*/
    4.25 +
    4.26 +/**
    4.27 + *  \file SDL_scalemode.h
    4.28 + *  
    4.29 + *  Header file declaring the SDL_ScaleMode enumeration
    4.30 + */
    4.31 +
    4.32 +#ifndef _SDL_scalemode_h
    4.33 +#define _SDL_scalemode_h
    4.34 +
    4.35 +#include "begin_code.h"
    4.36 +/* Set up for C function definitions, even when using C++ */
    4.37 +#ifdef __cplusplus
    4.38 +/* *INDENT-OFF* */
    4.39 +extern "C" {
    4.40 +/* *INDENT-ON* */
    4.41 +#endif
    4.42 +
    4.43 +/**
    4.44 + *  \brief The texture scale mode used in SDL_RenderCopy().
    4.45 + */
    4.46 +typedef enum
    4.47 +{
    4.48 +    SDL_SCALEMODE_NONE = 0x00000000,     /**< No scaling, rectangles must
    4.49 +                                              match dimensions */
    4.50 +    
    4.51 +    SDL_SCALEMODE_FAST = 0x00000001,     /**< Point sampling or 
    4.52 +                                              equivalent algorithm */
    4.53 +    
    4.54 +    SDL_SCALEMODE_SLOW = 0x00000002,     /**< Linear filtering or 
    4.55 +                                              equivalent algorithm */
    4.56 +    
    4.57 +    SDL_SCALEMODE_BEST = 0x00000004      /**< Bicubic filtering or 
    4.58 +                                              equivalent algorithm */
    4.59 +} SDL_ScaleMode;
    4.60 +
    4.61 +
    4.62 +/* Ends C function definitions when using C++ */
    4.63 +#ifdef __cplusplus
    4.64 +/* *INDENT-OFF* */
    4.65 +}
    4.66 +/* *INDENT-ON* */
    4.67 +#endif
    4.68 +#include "close_code.h"
    4.69 +
    4.70 +#endif /* _SDL_video_h */
    4.71 +
    4.72 +/* vi: set ts=4 sw=4 expandtab: */
     5.1 --- a/include/SDL_surface.h	Thu Dec 02 11:56:23 2010 -0800
     5.2 +++ b/include/SDL_surface.h	Sun Dec 12 15:19:05 2010 -0800
     5.3 @@ -32,6 +32,8 @@
     5.4  #include "SDL_stdinc.h"
     5.5  #include "SDL_pixels.h"
     5.6  #include "SDL_rect.h"
     5.7 +#include "SDL_blendmode.h"
     5.8 +#include "SDL_scalemode.h"
     5.9  #include "SDL_rwops.h"
    5.10  
    5.11  #include "begin_code.h"
    5.12 @@ -88,7 +90,7 @@
    5.13      struct SDL_BlitMap *map;    /**< Private */
    5.14  
    5.15      /** format version, bumped at every change to invalidate blit maps */
    5.16 -    unsigned int format_version;        /**< Private */
    5.17 +    int format_version;         /**< Private */
    5.18  
    5.19      /** Reference count -- used when freeing surface */
    5.20      int refcount;               /**< Read-mostly */
    5.21 @@ -300,7 +302,7 @@
    5.22   *  \sa SDL_GetSurfaceBlendMode()
    5.23   */
    5.24  extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
    5.25 -                                                    int blendMode);
    5.26 +                                                    SDL_BlendMode blendMode);
    5.27  
    5.28  /**
    5.29   *  \brief Get the blend mode used for blit operations.
    5.30 @@ -313,13 +315,13 @@
    5.31   *  \sa SDL_SetSurfaceBlendMode()
    5.32   */
    5.33  extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,
    5.34 -                                                    int *blendMode);
    5.35 +                                                    SDL_BlendMode *blendMode);
    5.36  
    5.37  /**
    5.38   *  \brief Set the scale mode used for blit operations.
    5.39   *  
    5.40   *  \param surface   The surface to update.
    5.41 - *  \param scaleMode ::SDL_TextureScaleMode to use for blit scaling.
    5.42 + *  \param scaleMode ::SDL_ScaleMode to use for blit scaling.
    5.43   *  
    5.44   *  \return 0 on success, or -1 if the surface is not valid or the scale mode is
    5.45   *          not supported.
    5.46 @@ -331,7 +333,7 @@
    5.47   *  \sa SDL_GetSurfaceScaleMode()
    5.48   */
    5.49  extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface * surface,
    5.50 -                                                    int scaleMode);
    5.51 +                                                    SDL_ScaleMode scaleMode);
    5.52  
    5.53  /**
    5.54   *  \brief Get the scale mode used for blit operations.
    5.55 @@ -344,7 +346,7 @@
    5.56   *  \sa SDL_SetSurfaceScaleMode()
    5.57   */
    5.58  extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface * surface,
    5.59 -                                                    int *scaleMode);
    5.60 +                                                    SDL_ScaleMode *scaleMode);
    5.61  
    5.62  /**
    5.63   *  Sets the clipping rectangle for the destination surface in a blit.
    5.64 @@ -413,10 +415,10 @@
    5.65   */
    5.66  extern DECLSPEC int SDLCALL SDL_BlendPoint
    5.67      (SDL_Surface * dst, int x, int y,
    5.68 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.69 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.70  extern DECLSPEC int SDLCALL SDL_BlendPoints
    5.71      (SDL_Surface * dst, const SDL_Point * points, int count,
    5.72 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.73 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.74  
    5.75  /**
    5.76   *  Draws a line with \c color.
    5.77 @@ -438,10 +440,10 @@
    5.78   */
    5.79  extern DECLSPEC int SDLCALL SDL_BlendLine
    5.80      (SDL_Surface * dst, int x1, int y1, int x2, int y2,
    5.81 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.82 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.83  extern DECLSPEC int SDLCALL SDL_BlendLines
    5.84      (SDL_Surface * dst, const SDL_Point * points, int count,
    5.85 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.86 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.87  
    5.88  /**
    5.89   *  Draws the given rectangle with \c color.
    5.90 @@ -467,10 +469,10 @@
    5.91   */
    5.92  extern DECLSPEC int SDLCALL SDL_BlendRect
    5.93      (SDL_Surface * dst, const SDL_Rect * rect,
    5.94 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.95 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.96  extern DECLSPEC int SDLCALL SDL_BlendRects
    5.97      (SDL_Surface * dst, const SDL_Rect ** rects, int count,
    5.98 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
    5.99 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.100  
   5.101  /**
   5.102   *  Performs a fast fill of the given rectangle with \c color.
   5.103 @@ -496,92 +498,10 @@
   5.104   */
   5.105  extern DECLSPEC int SDLCALL SDL_BlendFillRect
   5.106      (SDL_Surface * dst, const SDL_Rect * rect,
   5.107 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.108 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.109  extern DECLSPEC int SDLCALL SDL_BlendFillRects
   5.110      (SDL_Surface * dst, const SDL_Rect ** rects, int count,
   5.111 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.112 -
   5.113 -#if 0
   5.114 -/**
   5.115 - *  Draws the given circle with \c color.
   5.116 - *  
   5.117 - *  The color should be a pixel of the format used by the surface, and 
   5.118 - *  can be generated by the SDL_MapRGB() function.
   5.119 - *  
   5.120 - *  \return 0 on success, or -1 on error.
   5.121 - */
   5.122 -extern DECLSPEC int SDLCALL SDL_DrawCircle
   5.123 -    (SDL_Surface * dst, int x, int y, int radius, Uint32 color);
   5.124 -
   5.125 -/**
   5.126 - *  Blends an RGBA value into the outline of the given circle.
   5.127 - *  
   5.128 - *  \return 0 on success, or -1 on error.
   5.129 - */
   5.130 -extern DECLSPEC int SDLCALL SDL_BlendCircle
   5.131 -    (SDL_Surface * dst, int x, int y, int radius,
   5.132 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.133 -
   5.134 -/**
   5.135 - *  Fills the given circle with \c color.
   5.136 - *  
   5.137 - *  The color should be a pixel of the format used by the surface, and 
   5.138 - *  can be generated by the SDL_MapRGB() function.
   5.139 - *  
   5.140 - *  \return 0 on success, or -1 on error.
   5.141 - */
   5.142 -extern DECLSPEC int SDLCALL SDL_FillCircle
   5.143 -    (SDL_Surface * dst, int x, int y, int radius, Uint32 color);
   5.144 -
   5.145 -/**
   5.146 - *  Blends an RGBA value into the given circle.
   5.147 - *  
   5.148 - *  \return This function returns 0 on success, or -1 on error.
   5.149 - */
   5.150 -extern DECLSPEC int SDLCALL SDL_BlendFillCircle
   5.151 -    (SDL_Surface * dst, int x, int y, int radius,
   5.152 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.153 -
   5.154 -/**
   5.155 - *  Draws the given ellipse with \c color.
   5.156 - *  
   5.157 - *  The color should be a pixel of the format used by the surface, and 
   5.158 - *  can be generated by the SDL_MapRGB() function.
   5.159 - *  
   5.160 - *  \return 0 on success, or -1 on error.
   5.161 - */
   5.162 -extern DECLSPEC int SDLCALL SDL_DrawEllipse
   5.163 -    (SDL_Surface * dst, int x, int y, int w, int h, Uint32 color);
   5.164 -
   5.165 -/**
   5.166 - *  Blends an RGBA value into the outline of the given ellipse.
   5.167 - *  
   5.168 - *  \return 0 on success, or -1 on error.
   5.169 - */
   5.170 -extern DECLSPEC int SDLCALL SDL_BlendEllipse
   5.171 -    (SDL_Surface * dst, int x, int y, int w, int h,
   5.172 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.173 -
   5.174 -/**
   5.175 - *  Fills the given ellipse with \c color.
   5.176 - *  
   5.177 - *  The color should be a pixel of the format used by the surface, and 
   5.178 - *  can be generated by the SDL_MapRGB() function.
   5.179 - *  
   5.180 - *  \return 0 on success, or -1 on error.
   5.181 - */
   5.182 -extern DECLSPEC int SDLCALL SDL_FillEllipse
   5.183 -    (SDL_Surface * dst, int x, int y, int w, int h, Uint32 color);
   5.184 -
   5.185 -/**
   5.186 - *  Blends an RGBA value into the given ellipse.
   5.187 - *  
   5.188 - *  \return This function returns 0 on success, or -1 on error.
   5.189 - */
   5.190 -extern DECLSPEC int SDLCALL SDL_BlendFillEllipse
   5.191 -    (SDL_Surface * dst, int x, int y, int w, int h,
   5.192 -     int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.193 -#endif // 0
   5.194 +     SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
   5.195  
   5.196  /**
   5.197   *  Performs a fast blit from the source surface to the destination surface.
     6.1 --- a/include/SDL_video.h	Thu Dec 02 11:56:23 2010 -0800
     6.2 +++ b/include/SDL_video.h	Sun Dec 12 15:19:05 2010 -0800
     6.3 @@ -32,6 +32,8 @@
     6.4  #include "SDL_stdinc.h"
     6.5  #include "SDL_pixels.h"
     6.6  #include "SDL_rect.h"
     6.7 +#include "SDL_blendmode.h"
     6.8 +#include "SDL_scalemode.h"
     6.9  #include "SDL_surface.h"
    6.10  
    6.11  #include "begin_code.h"
    6.12 @@ -214,38 +216,6 @@
    6.13  } SDL_TextureModulate;
    6.14  
    6.15  /**
    6.16 - *  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
    6.17 - */
    6.18 -typedef enum
    6.19 -{
    6.20 -    SDL_BLENDMODE_NONE = 0x00000000,     /**< No blending */
    6.21 -    SDL_BLENDMODE_MASK = 0x00000001,     /**< dst = A ? src : dst 
    6.22 -                                              (alpha is mask) */
    6.23 -    
    6.24 -    SDL_BLENDMODE_BLEND = 0x00000002,    /**< dst = (src * A) + (dst * (1-A)) */
    6.25 -    SDL_BLENDMODE_ADD = 0x00000004,      /**< dst = (src * A) + dst */
    6.26 -    SDL_BLENDMODE_MOD = 0x00000008       /**< dst = src * dst */
    6.27 -} SDL_BlendMode;
    6.28 -
    6.29 -/**
    6.30 - *  \brief The texture scale mode used in SDL_RenderCopy().
    6.31 - */
    6.32 -typedef enum
    6.33 -{
    6.34 -    SDL_TEXTURESCALEMODE_NONE = 0x00000000,     /**< No scaling, rectangles must
    6.35 -                                                     match dimensions */
    6.36 -    
    6.37 -    SDL_TEXTURESCALEMODE_FAST = 0x00000001,     /**< Point sampling or 
    6.38 -                                                     equivalent algorithm */
    6.39 -    
    6.40 -    SDL_TEXTURESCALEMODE_SLOW = 0x00000002,     /**< Linear filtering or 
    6.41 -                                                     equivalent algorithm */
    6.42 -    
    6.43 -    SDL_TEXTURESCALEMODE_BEST = 0x00000004      /**< Bicubic filtering or 
    6.44 -                                                     equivalent algorithm */
    6.45 -} SDL_TextureScaleMode;
    6.46 -
    6.47 -/**
    6.48   *  \brief An efficient driver-specific representation of pixel data
    6.49   */
    6.50  struct SDL_Texture;
    6.51 @@ -986,7 +956,7 @@
    6.52   *  \sa SDL_GetTextureBlendMode()
    6.53   */
    6.54  extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
    6.55 -                                                    int blendMode);
    6.56 +                                                    SDL_BlendMode blendMode);
    6.57  
    6.58  /**
    6.59   *  \brief Get the blend mode used for texture copy operations.
    6.60 @@ -999,13 +969,13 @@
    6.61   *  \sa SDL_SetTextureBlendMode()
    6.62   */
    6.63  extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
    6.64 -                                                    int *blendMode);
    6.65 +                                                    SDL_BlendMode *blendMode);
    6.66  
    6.67  /**
    6.68   *  \brief Set the scale mode used for texture copy operations.
    6.69   *  
    6.70   *  \param texture The texture to update.
    6.71 - *  \param scaleMode ::SDL_TextureScaleMode to use for texture scaling.
    6.72 + *  \param scaleMode ::SDL_ScaleMode to use for texture scaling.
    6.73   *  
    6.74   *  \return 0 on success, or -1 if the texture is not valid or the scale mode is
    6.75   *          not supported.
    6.76 @@ -1016,7 +986,7 @@
    6.77   *  \sa SDL_GetTextureScaleMode()
    6.78   */
    6.79  extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
    6.80 -                                                    int scaleMode);
    6.81 +                                                    SDL_ScaleMode scaleMode);
    6.82  
    6.83  /**
    6.84   *  \brief Get the scale mode used for texture copy operations.
    6.85 @@ -1029,7 +999,7 @@
    6.86   *  \sa SDL_SetTextureScaleMode()
    6.87   */
    6.88  extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
    6.89 -                                                    int *scaleMode);
    6.90 +                                                    SDL_ScaleMode *scaleMode);
    6.91  
    6.92  /**
    6.93   *  \brief Update the given texture rectangle with new pixel data.
    6.94 @@ -1135,7 +1105,7 @@
    6.95   *  
    6.96   *  \sa SDL_GetRenderDrawBlendMode()
    6.97   */
    6.98 -extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(int blendMode);
    6.99 +extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_BlendMode blendMode);
   6.100  
   6.101  /**
   6.102   *  \brief Get the blend mode used for drawing operations.
   6.103 @@ -1146,7 +1116,7 @@
   6.104   *  
   6.105   *  \sa SDL_SetRenderDrawBlendMode()
   6.106   */
   6.107 -extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode);
   6.108 +extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_BlendMode *blendMode);
   6.109  
   6.110  /**
   6.111   *  \brief Clear the current rendering target with the drawing color
     7.1 --- a/src/video/SDL_blendfillrect.c	Thu Dec 02 11:56:23 2010 -0800
     7.2 +++ b/src/video/SDL_blendfillrect.c	Sun Dec 12 15:19:05 2010 -0800
     7.3 @@ -26,7 +26,7 @@
     7.4  
     7.5  static int
     7.6  SDL_BlendFillRect_RGB555(SDL_Surface * dst, const SDL_Rect * rect,
     7.7 -                         int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
     7.8 +                         SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
     7.9  {
    7.10      unsigned inva = 0xff - a;
    7.11  
    7.12 @@ -49,7 +49,7 @@
    7.13  
    7.14  static int
    7.15  SDL_BlendFillRect_RGB565(SDL_Surface * dst, const SDL_Rect * rect,
    7.16 -                         int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.17 +                         SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.18  {
    7.19      unsigned inva = 0xff - a;
    7.20  
    7.21 @@ -72,7 +72,7 @@
    7.22  
    7.23  static int
    7.24  SDL_BlendFillRect_RGB888(SDL_Surface * dst, const SDL_Rect * rect,
    7.25 -                         int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.26 +                         SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.27  {
    7.28      unsigned inva = 0xff - a;
    7.29  
    7.30 @@ -95,7 +95,7 @@
    7.31  
    7.32  static int
    7.33  SDL_BlendFillRect_ARGB8888(SDL_Surface * dst, const SDL_Rect * rect,
    7.34 -                           int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.35 +                           SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.36  {
    7.37      unsigned inva = 0xff - a;
    7.38  
    7.39 @@ -118,7 +118,7 @@
    7.40  
    7.41  static int
    7.42  SDL_BlendFillRect_RGB(SDL_Surface * dst, const SDL_Rect * rect,
    7.43 -                      int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.44 +                      SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.45  {
    7.46      SDL_PixelFormat *fmt = dst->format;
    7.47      unsigned inva = 0xff - a;
    7.48 @@ -164,7 +164,7 @@
    7.49  
    7.50  static int
    7.51  SDL_BlendFillRect_RGBA(SDL_Surface * dst, const SDL_Rect * rect,
    7.52 -                       int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.53 +                       SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.54  {
    7.55      SDL_PixelFormat *fmt = dst->format;
    7.56      unsigned inva = 0xff - a;
    7.57 @@ -194,7 +194,7 @@
    7.58  
    7.59  int
    7.60  SDL_BlendFillRect(SDL_Surface * dst, const SDL_Rect * rect,
    7.61 -                  int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.62 +                  SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.63  {
    7.64      SDL_Rect clipped;
    7.65  
    7.66 @@ -263,12 +263,12 @@
    7.67  
    7.68  int
    7.69  SDL_BlendFillRects(SDL_Surface * dst, const SDL_Rect ** rects, int count,
    7.70 -                   int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.71 +                   SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    7.72  {
    7.73      SDL_Rect clipped;
    7.74      int i;
    7.75      int (*func)(SDL_Surface * dst, const SDL_Rect * rect,
    7.76 -                int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL;
    7.77 +                SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL;
    7.78      int status = 0;
    7.79  
    7.80      if (!dst) {
     8.1 --- a/src/video/SDL_blendline.c	Thu Dec 02 11:56:23 2010 -0800
     8.2 +++ b/src/video/SDL_blendline.c	Sun Dec 12 15:19:05 2010 -0800
     8.3 @@ -26,7 +26,7 @@
     8.4  
     8.5  static void
     8.6  SDL_BlendLine_RGB2(SDL_Surface * dst, int x1, int y1, int x2, int y2,
     8.7 -                   int blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
     8.8 +                   SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
     8.9                     SDL_bool draw_end)
    8.10  {
    8.11      const SDL_PixelFormat *fmt = dst->format;
    8.12 @@ -118,7 +118,7 @@
    8.13  
    8.14  static void
    8.15  SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2,
    8.16 -                     int blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.17 +                     SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.18                       SDL_bool draw_end)
    8.19  {
    8.20      const SDL_PixelFormat *fmt = dst->format;
    8.21 @@ -210,7 +210,7 @@
    8.22  
    8.23  static void
    8.24  SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2,
    8.25 -                     int blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.26 +                     SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.27                       SDL_bool draw_end)
    8.28  {
    8.29      const SDL_PixelFormat *fmt = dst->format;
    8.30 @@ -302,7 +302,7 @@
    8.31  
    8.32  static void
    8.33  SDL_BlendLine_RGB4(SDL_Surface * dst, int x1, int y1, int x2, int y2,
    8.34 -                   int blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.35 +                   SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.36                     SDL_bool draw_end)
    8.37  {
    8.38      const SDL_PixelFormat *fmt = dst->format;
    8.39 @@ -394,7 +394,7 @@
    8.40  
    8.41  static void
    8.42  SDL_BlendLine_RGBA4(SDL_Surface * dst, int x1, int y1, int x2, int y2,
    8.43 -                    int blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.44 +                    SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.45                      SDL_bool draw_end)
    8.46  {
    8.47      const SDL_PixelFormat *fmt = dst->format;
    8.48 @@ -486,7 +486,7 @@
    8.49  
    8.50  static void
    8.51  SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
    8.52 -                     int blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.53 +                     SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.54                       SDL_bool draw_end)
    8.55  {
    8.56      const SDL_PixelFormat *fmt = dst->format;
    8.57 @@ -578,7 +578,7 @@
    8.58  
    8.59  static void
    8.60  SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
    8.61 -                       int blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.62 +                       SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
    8.63                         SDL_bool draw_end)
    8.64  {
    8.65      const SDL_PixelFormat *fmt = dst->format;
    8.66 @@ -670,7 +670,7 @@
    8.67  
    8.68  typedef void (*BlendLineFunc) (SDL_Surface * dst,
    8.69                                 int x1, int y1, int x2, int y2,
    8.70 -                               int blendMode,
    8.71 +                               SDL_BlendMode blendMode,
    8.72                                 Uint8 r, Uint8 g, Uint8 b, Uint8 a,
    8.73                                 SDL_bool draw_end);
    8.74  
    8.75 @@ -707,7 +707,7 @@
    8.76  
    8.77  int
    8.78  SDL_BlendLine(SDL_Surface * dst, int x1, int y1, int x2, int y2,
    8.79 -              int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    8.80 +              SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    8.81  {
    8.82      BlendLineFunc func;
    8.83  
    8.84 @@ -734,7 +734,7 @@
    8.85  
    8.86  int
    8.87  SDL_BlendLines(SDL_Surface * dst, const SDL_Point * points, int count,
    8.88 -               int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    8.89 +               SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    8.90  {
    8.91      int i;
    8.92      int x1, y1;
     9.1 --- a/src/video/SDL_blendpoint.c	Thu Dec 02 11:56:23 2010 -0800
     9.2 +++ b/src/video/SDL_blendpoint.c	Sun Dec 12 15:19:05 2010 -0800
     9.3 @@ -24,7 +24,7 @@
     9.4  #include "SDL_draw.h"
     9.5  
     9.6  static int
     9.7 -SDL_BlendPoint_RGB555(SDL_Surface * dst, int x, int y, int blendMode, Uint8 r,
     9.8 +SDL_BlendPoint_RGB555(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r,
     9.9                        Uint8 g, Uint8 b, Uint8 a)
    9.10  {
    9.11      unsigned inva = 0xff - a;
    9.12 @@ -47,7 +47,7 @@
    9.13  }
    9.14  
    9.15  static int
    9.16 -SDL_BlendPoint_RGB565(SDL_Surface * dst, int x, int y, int blendMode, Uint8 r,
    9.17 +SDL_BlendPoint_RGB565(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r,
    9.18                        Uint8 g, Uint8 b, Uint8 a)
    9.19  {
    9.20      unsigned inva = 0xff - a;
    9.21 @@ -70,7 +70,7 @@
    9.22  }
    9.23  
    9.24  static int
    9.25 -SDL_BlendPoint_RGB888(SDL_Surface * dst, int x, int y, int blendMode, Uint8 r,
    9.26 +SDL_BlendPoint_RGB888(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r,
    9.27                        Uint8 g, Uint8 b, Uint8 a)
    9.28  {
    9.29      unsigned inva = 0xff - a;
    9.30 @@ -93,7 +93,7 @@
    9.31  }
    9.32  
    9.33  static int
    9.34 -SDL_BlendPoint_ARGB8888(SDL_Surface * dst, int x, int y, int blendMode,
    9.35 +SDL_BlendPoint_ARGB8888(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode,
    9.36                          Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    9.37  {
    9.38      unsigned inva = 0xff - a;
    9.39 @@ -116,7 +116,7 @@
    9.40  }
    9.41  
    9.42  static int
    9.43 -SDL_BlendPoint_RGB(SDL_Surface * dst, int x, int y, int blendMode, Uint8 r,
    9.44 +SDL_BlendPoint_RGB(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r,
    9.45                     Uint8 g, Uint8 b, Uint8 a)
    9.46  {
    9.47      SDL_PixelFormat *fmt = dst->format;
    9.48 @@ -162,7 +162,7 @@
    9.49  }
    9.50  
    9.51  static int
    9.52 -SDL_BlendPoint_RGBA(SDL_Surface * dst, int x, int y, int blendMode, Uint8 r,
    9.53 +SDL_BlendPoint_RGBA(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r,
    9.54                      Uint8 g, Uint8 b, Uint8 a)
    9.55  {
    9.56      SDL_PixelFormat *fmt = dst->format;
    9.57 @@ -192,7 +192,7 @@
    9.58  }
    9.59  
    9.60  int
    9.61 -SDL_BlendPoint(SDL_Surface * dst, int x, int y, int blendMode, Uint8 r,
    9.62 +SDL_BlendPoint(SDL_Surface * dst, int x, int y, SDL_BlendMode blendMode, Uint8 r,
    9.63                 Uint8 g, Uint8 b, Uint8 a)
    9.64  {
    9.65      if (!dst) {
    9.66 @@ -258,14 +258,14 @@
    9.67  
    9.68  int
    9.69  SDL_BlendPoints(SDL_Surface * dst, const SDL_Point * points, int count,
    9.70 -                int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    9.71 +                SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    9.72  {
    9.73      int minx, miny;
    9.74      int maxx, maxy;
    9.75      int i;
    9.76      int x, y;
    9.77      int (*func)(SDL_Surface * dst, int x, int y,
    9.78 -                int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL;
    9.79 +                SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) = NULL;
    9.80      int status = 0;
    9.81  
    9.82      if (!dst) {
    10.1 --- a/src/video/SDL_blendrect.c	Thu Dec 02 11:56:23 2010 -0800
    10.2 +++ b/src/video/SDL_blendrect.c	Sun Dec 12 15:19:05 2010 -0800
    10.3 @@ -26,7 +26,7 @@
    10.4  
    10.5  int
    10.6  SDL_BlendRect(SDL_Surface * dst, const SDL_Rect * rect,
    10.7 -              int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    10.8 +              SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
    10.9  {
   10.10      SDL_Rect full_rect;
   10.11      SDL_Point points[5];
   10.12 @@ -60,7 +60,7 @@
   10.13  
   10.14  int
   10.15  SDL_BlendRects(SDL_Surface * dst, const SDL_Rect ** rects, int count,
   10.16 -               int blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
   10.17 +               SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
   10.18  {
   10.19      int i;
   10.20  
    11.1 --- a/src/video/SDL_renderer_gl.c	Thu Dec 02 11:56:23 2010 -0800
    11.2 +++ b/src/video/SDL_renderer_gl.c	Sun Dec 12 15:19:05 2010 -0800
    11.3 @@ -126,8 +126,7 @@
    11.4        SDL_TEXTUREMODULATE_ALPHA),
    11.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    11.6        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    11.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
    11.8 -      SDL_TEXTURESCALEMODE_SLOW),
    11.9 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW),
   11.10       15,
   11.11       {
   11.12        SDL_PIXELFORMAT_INDEX1LSB,
   11.13 @@ -1004,17 +1003,17 @@
   11.14  GL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   11.15  {
   11.16      switch (texture->scaleMode) {
   11.17 -    case SDL_TEXTURESCALEMODE_NONE:
   11.18 -    case SDL_TEXTURESCALEMODE_FAST:
   11.19 -    case SDL_TEXTURESCALEMODE_SLOW:
   11.20 +    case SDL_SCALEMODE_NONE:
   11.21 +    case SDL_SCALEMODE_FAST:
   11.22 +    case SDL_SCALEMODE_SLOW:
   11.23          return 0;
   11.24 -    case SDL_TEXTURESCALEMODE_BEST:
   11.25 +    case SDL_SCALEMODE_BEST:
   11.26          SDL_Unsupported();
   11.27 -        texture->scaleMode = SDL_TEXTURESCALEMODE_SLOW;
   11.28 +        texture->scaleMode = SDL_SCALEMODE_SLOW;
   11.29          return -1;
   11.30      default:
   11.31          SDL_Unsupported();
   11.32 -        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   11.33 +        texture->scaleMode = SDL_SCALEMODE_NONE;
   11.34          return -1;
   11.35      }
   11.36  }
   11.37 @@ -1365,15 +1364,15 @@
   11.38  
   11.39      if (texture->scaleMode != data->scaleMode) {
   11.40          switch (texture->scaleMode) {
   11.41 -        case SDL_TEXTURESCALEMODE_NONE:
   11.42 -        case SDL_TEXTURESCALEMODE_FAST:
   11.43 +        case SDL_SCALEMODE_NONE:
   11.44 +        case SDL_SCALEMODE_FAST:
   11.45              data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
   11.46                                    GL_NEAREST);
   11.47              data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
   11.48                                    GL_NEAREST);
   11.49              break;
   11.50 -        case SDL_TEXTURESCALEMODE_SLOW:
   11.51 -        case SDL_TEXTURESCALEMODE_BEST:
   11.52 +        case SDL_SCALEMODE_SLOW:
   11.53 +        case SDL_SCALEMODE_BEST:
   11.54              data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
   11.55                                    GL_LINEAR);
   11.56              data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
    12.1 --- a/src/video/SDL_renderer_gles.c	Thu Dec 02 11:56:23 2010 -0800
    12.2 +++ b/src/video/SDL_renderer_gles.c	Sun Dec 12 15:19:05 2010 -0800
    12.3 @@ -112,8 +112,7 @@
    12.4        SDL_TEXTUREMODULATE_ALPHA),
    12.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    12.6        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    12.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
    12.8 -      SDL_TEXTURESCALEMODE_SLOW), 5,
    12.9 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW), 5,
   12.10       {
   12.11        /* OpenGL ES 1.x supported formats list */
   12.12        SDL_PIXELFORMAT_ABGR4444,
   12.13 @@ -533,17 +532,17 @@
   12.14  GLES_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   12.15  {
   12.16      switch (texture->scaleMode) {
   12.17 -    case SDL_TEXTURESCALEMODE_NONE:
   12.18 -    case SDL_TEXTURESCALEMODE_FAST:
   12.19 -    case SDL_TEXTURESCALEMODE_SLOW:
   12.20 +    case SDL_SCALEMODE_NONE:
   12.21 +    case SDL_SCALEMODE_FAST:
   12.22 +    case SDL_SCALEMODE_SLOW:
   12.23          return 0;
   12.24 -    case SDL_TEXTURESCALEMODE_BEST:
   12.25 +    case SDL_SCALEMODE_BEST:
   12.26          SDL_Unsupported();
   12.27 -        texture->scaleMode = SDL_TEXTURESCALEMODE_SLOW;
   12.28 +        texture->scaleMode = SDL_SCALEMODE_SLOW;
   12.29          return -1;
   12.30      default:
   12.31          SDL_Unsupported();
   12.32 -        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   12.33 +        texture->scaleMode = SDL_SCALEMODE_NONE;
   12.34          return -1;
   12.35      }
   12.36  }
   12.37 @@ -859,15 +858,15 @@
   12.38      GLES_SetBlendMode(data, texture->blendMode, 0);
   12.39  
   12.40      switch (texture->scaleMode) {
   12.41 -    case SDL_TEXTURESCALEMODE_NONE:
   12.42 -    case SDL_TEXTURESCALEMODE_FAST:
   12.43 +    case SDL_SCALEMODE_NONE:
   12.44 +    case SDL_SCALEMODE_FAST:
   12.45          data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
   12.46                                GL_NEAREST);
   12.47          data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
   12.48                                GL_NEAREST);
   12.49          break;
   12.50 -    case SDL_TEXTURESCALEMODE_SLOW:
   12.51 -    case SDL_TEXTURESCALEMODE_BEST:
   12.52 +    case SDL_SCALEMODE_SLOW:
   12.53 +    case SDL_SCALEMODE_BEST:
   12.54          data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
   12.55                                GL_LINEAR);
   12.56          data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
    13.1 --- a/src/video/SDL_renderer_sw.c	Thu Dec 02 11:56:23 2010 -0800
    13.2 +++ b/src/video/SDL_renderer_sw.c	Sun Dec 12 15:19:05 2010 -0800
    13.3 @@ -90,7 +90,7 @@
    13.4        SDL_TEXTUREMODULATE_ALPHA),
    13.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    13.6        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    13.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST),
    13.8 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST),
    13.9       14,
   13.10       {
   13.11        SDL_PIXELFORMAT_INDEX8,
    14.1 --- a/src/video/SDL_surface.c	Thu Dec 02 11:56:23 2010 -0800
    14.2 +++ b/src/video/SDL_surface.c	Sun Dec 12 15:19:05 2010 -0800
    14.3 @@ -438,7 +438,7 @@
    14.4  }
    14.5  
    14.6  int
    14.7 -SDL_SetSurfaceBlendMode(SDL_Surface * surface, int blendMode)
    14.8 +SDL_SetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode blendMode)
    14.9  {
   14.10      int flags, status;
   14.11  
   14.12 @@ -486,7 +486,7 @@
   14.13  }
   14.14  
   14.15  int
   14.16 -SDL_GetSurfaceBlendMode(SDL_Surface * surface, int *blendMode)
   14.17 +SDL_GetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode *blendMode)
   14.18  {
   14.19      if (!surface) {
   14.20          return -1;
   14.21 @@ -519,7 +519,7 @@
   14.22  }
   14.23  
   14.24  int
   14.25 -SDL_SetSurfaceScaleMode(SDL_Surface * surface, int scaleMode)
   14.26 +SDL_SetSurfaceScaleMode(SDL_Surface * surface, SDL_ScaleMode scaleMode)
   14.27  {
   14.28      int flags, status;
   14.29  
   14.30 @@ -531,13 +531,13 @@
   14.31      flags = surface->map->info.flags;
   14.32      surface->map->info.flags &= ~(SDL_COPY_NEAREST);
   14.33      switch (scaleMode) {
   14.34 -    case SDL_TEXTURESCALEMODE_NONE:
   14.35 +    case SDL_SCALEMODE_NONE:
   14.36          break;
   14.37 -    case SDL_TEXTURESCALEMODE_FAST:
   14.38 +    case SDL_SCALEMODE_FAST:
   14.39          surface->map->info.flags |= SDL_COPY_NEAREST;
   14.40          break;
   14.41 -    case SDL_TEXTURESCALEMODE_SLOW:
   14.42 -    case SDL_TEXTURESCALEMODE_BEST:
   14.43 +    case SDL_SCALEMODE_SLOW:
   14.44 +    case SDL_SCALEMODE_BEST:
   14.45          SDL_Unsupported();
   14.46          surface->map->info.flags |= SDL_COPY_NEAREST;
   14.47          status = -1;
   14.48 @@ -555,7 +555,7 @@
   14.49  }
   14.50  
   14.51  int
   14.52 -SDL_GetSurfaceScaleMode(SDL_Surface * surface, int *scaleMode)
   14.53 +SDL_GetSurfaceScaleMode(SDL_Surface * surface, SDL_ScaleMode *scaleMode)
   14.54  {
   14.55      if (!surface) {
   14.56          return -1;
   14.57 @@ -567,10 +567,10 @@
   14.58  
   14.59      switch (surface->map->info.flags & SDL_COPY_NEAREST) {
   14.60      case SDL_COPY_NEAREST:
   14.61 -        *scaleMode = SDL_TEXTURESCALEMODE_FAST;
   14.62 +        *scaleMode = SDL_SCALEMODE_FAST;
   14.63          break;
   14.64      default:
   14.65 -        *scaleMode = SDL_TEXTURESCALEMODE_NONE;
   14.66 +        *scaleMode = SDL_SCALEMODE_NONE;
   14.67          break;
   14.68      }
   14.69      return 0;
    15.1 --- a/src/video/SDL_sysvideo.h	Thu Dec 02 11:56:23 2010 -0800
    15.2 +++ b/src/video/SDL_sysvideo.h	Sun Dec 12 15:19:05 2010 -0800
    15.3 @@ -46,8 +46,8 @@
    15.4      int w;                      /**< The width of the texture */
    15.5      int h;                      /**< The height of the texture */
    15.6      int modMode;                /**< The texture modulation mode */
    15.7 -    int blendMode;              /**< The texture blend mode */
    15.8 -    int scaleMode;              /**< The texture scale mode */
    15.9 +    SDL_BlendMode blendMode;    /**< The texture blend mode */
   15.10 +    SDL_ScaleMode scaleMode;    /**< The texture scale mode */
   15.11      Uint8 r, g, b, a;           /**< Texture modulation values */
   15.12  
   15.13      SDL_Renderer *renderer;
   15.14 @@ -121,7 +121,7 @@
   15.15      SDL_Texture *textures;
   15.16  
   15.17      Uint8 r, g, b, a;                   /**< Color for drawing operations values */
   15.18 -    int blendMode;                      /**< The drawing blend mode */
   15.19 +    SDL_BlendMode blendMode;            /**< The drawing blend mode */
   15.20  
   15.21      void *driverdata;
   15.22  };
    16.1 --- a/src/video/SDL_video.c	Thu Dec 02 11:56:23 2010 -0800
    16.2 +++ b/src/video/SDL_video.c	Sun Dec 12 15:19:05 2010 -0800
    16.3 @@ -1959,8 +1959,8 @@
    16.4  
    16.5      {
    16.6          Uint8 r, g, b, a;
    16.7 -        int blendMode;
    16.8 -        int scaleMode;
    16.9 +        SDL_BlendMode blendMode;
   16.10 +        SDL_ScaleMode scaleMode;
   16.11  
   16.12          SDL_GetSurfaceColorMod(surface, &r, &g, &b);
   16.13          SDL_SetTextureColorMod(texture, r, g, b);
   16.14 @@ -2129,7 +2129,7 @@
   16.15  }
   16.16  
   16.17  int
   16.18 -SDL_SetTextureBlendMode(SDL_Texture * texture, int blendMode)
   16.19 +SDL_SetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode blendMode)
   16.20  {
   16.21      SDL_Renderer *renderer;
   16.22  
   16.23 @@ -2145,7 +2145,7 @@
   16.24  }
   16.25  
   16.26  int
   16.27 -SDL_GetTextureBlendMode(SDL_Texture * texture, int *blendMode)
   16.28 +SDL_GetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode *blendMode)
   16.29  {
   16.30      CHECK_TEXTURE_MAGIC(texture, -1);
   16.31  
   16.32 @@ -2156,7 +2156,7 @@
   16.33  }
   16.34  
   16.35  int
   16.36 -SDL_SetTextureScaleMode(SDL_Texture * texture, int scaleMode)
   16.37 +SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)
   16.38  {
   16.39      SDL_Renderer *renderer;
   16.40  
   16.41 @@ -2172,7 +2172,7 @@
   16.42  }
   16.43  
   16.44  int
   16.45 -SDL_GetTextureScaleMode(SDL_Texture * texture, int *scaleMode)
   16.46 +SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode)
   16.47  {
   16.48      CHECK_TEXTURE_MAGIC(texture, -1);
   16.49  
   16.50 @@ -2315,7 +2315,7 @@
   16.51  }
   16.52  
   16.53  int
   16.54 -SDL_SetRenderDrawBlendMode(int blendMode)
   16.55 +SDL_SetRenderDrawBlendMode(SDL_BlendMode blendMode)
   16.56  {
   16.57      SDL_Renderer *renderer;
   16.58  
   16.59 @@ -2332,7 +2332,7 @@
   16.60  }
   16.61  
   16.62  int
   16.63 -SDL_GetRenderDrawBlendMode(int *blendMode)
   16.64 +SDL_GetRenderDrawBlendMode(SDL_BlendMode *blendMode)
   16.65  {
   16.66      SDL_Renderer *renderer;
   16.67  
   16.68 @@ -2354,7 +2354,7 @@
   16.69          return -1;
   16.70      }
   16.71      if (!renderer->RenderClear) {
   16.72 -        int blendMode = renderer->blendMode;
   16.73 +        SDL_BlendMode blendMode = renderer->blendMode;
   16.74          int status;
   16.75  
   16.76          if (blendMode >= SDL_BLENDMODE_BLEND) {
    17.1 --- a/src/video/directfb/SDL_DirectFB_render.c	Thu Dec 02 11:56:23 2010 -0800
    17.2 +++ b/src/video/directfb/SDL_DirectFB_render.c	Sun Dec 12 15:19:05 2010 -0800
    17.3 @@ -104,8 +104,8 @@
    17.4        SDL_TEXTUREMODULATE_ALPHA),
    17.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND |
    17.6        SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    17.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
    17.8 -      SDL_TEXTURESCALEMODE_SLOW | SDL_TEXTURESCALEMODE_BEST),
    17.9 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST |
   17.10 +      SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST),
   17.11       14,
   17.12       {
   17.13        SDL_PIXELFORMAT_INDEX4LSB,
   17.14 @@ -711,21 +711,21 @@
   17.15      DirectFB_TextureData *data = (DirectFB_TextureData *) texture->driverdata;
   17.16  
   17.17      switch (texture->scaleMode) {
   17.18 -    case SDL_TEXTURESCALEMODE_NONE:
   17.19 -    case SDL_TEXTURESCALEMODE_FAST:
   17.20 +    case SDL_SCALEMODE_NONE:
   17.21 +    case SDL_SCALEMODE_FAST:
   17.22          data->render_options = DSRO_NONE;
   17.23          break;
   17.24 -    case SDL_TEXTURESCALEMODE_SLOW:
   17.25 +    case SDL_SCALEMODE_SLOW:
   17.26          data->render_options = DSRO_SMOOTH_UPSCALE | DSRO_SMOOTH_DOWNSCALE;
   17.27          break;
   17.28 -    case SDL_TEXTURESCALEMODE_BEST:
   17.29 +    case SDL_SCALEMODE_BEST:
   17.30          data->render_options =
   17.31              DSRO_SMOOTH_UPSCALE | DSRO_SMOOTH_DOWNSCALE | DSRO_ANTIALIAS;
   17.32          break;
   17.33      default:
   17.34          SDL_Unsupported();
   17.35          data->render_options = DSRO_NONE;
   17.36 -        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   17.37 +        texture->scaleMode = SDL_SCALEMODE_NONE;
   17.38          return -1;
   17.39      }
   17.40  #endif
    18.1 --- a/src/video/nds/SDL_ndsrender.c	Thu Dec 02 11:56:23 2010 -0800
    18.2 +++ b/src/video/nds/SDL_ndsrender.c	Sun Dec 12 15:19:05 2010 -0800
    18.3 @@ -82,7 +82,7 @@
    18.4       (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC),  /* u32 flags */
    18.5       (SDL_TEXTUREMODULATE_NONE),        /* u32 mod_modes */
    18.6       (SDL_BLENDMODE_MASK),      /* u32 blend_modes */
    18.7 -     (SDL_TEXTURESCALEMODE_FAST),       /* u32 scale_modes */
    18.8 +     (SDL_SCALEMODE_FAST),       /* u32 scale_modes */
    18.9       3,                         /* u32 num_texture_formats */
   18.10       {
   18.11        SDL_PIXELFORMAT_INDEX8,
    19.1 --- a/src/video/photon/SDL_photon_render.c	Thu Dec 02 11:56:23 2010 -0800
    19.2 +++ b/src/video/photon/SDL_photon_render.c	Sun Dec 12 15:19:05 2010 -0800
    19.3 @@ -104,8 +104,7 @@
    19.4       (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_ALPHA),
    19.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND |
    19.6        SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    19.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_SLOW |
    19.8 -      SDL_TEXTURESCALEMODE_FAST),
    19.9 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_SLOW | SDL_SCALEMODE_FAST),
   19.10       10,
   19.11       {SDL_PIXELFORMAT_INDEX8,
   19.12        SDL_PIXELFORMAT_RGB555,
   19.13 @@ -254,17 +253,17 @@
   19.14      /* Set current scale blitting capabilities */
   19.15      if (rdata->surfaces_type==SDL_PHOTON_SURFTYPE_OFFSCREEN)
   19.16      {
   19.17 -       renderer->info.scale_modes=SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_SLOW;
   19.18 +       renderer->info.scale_modes=SDL_SCALEMODE_NONE | SDL_SCALEMODE_SLOW;
   19.19         if ((didata->mode_2dcaps & SDL_VIDEO_PHOTON_CAP_SCALED_BLIT)==SDL_VIDEO_PHOTON_CAP_SCALED_BLIT)
   19.20         {
   19.21            /* This video mode supports hardware scaling */
   19.22 -          renderer->info.scale_modes|=SDL_TEXTURESCALEMODE_FAST;
   19.23 +          renderer->info.scale_modes|=SDL_SCALEMODE_FAST;
   19.24         }
   19.25      }
   19.26      else
   19.27      {
   19.28         /* PhImage blit functions do not support scaling */
   19.29 -       renderer->info.scale_modes=SDL_TEXTURESCALEMODE_NONE;
   19.30 +       renderer->info.scale_modes=SDL_SCALEMODE_NONE;
   19.31      }
   19.32  
   19.33      return renderer;
   19.34 @@ -984,39 +983,39 @@
   19.35  
   19.36     switch (texture->scaleMode)
   19.37     {
   19.38 -      case SDL_TEXTURESCALEMODE_NONE:
   19.39 +      case SDL_SCALEMODE_NONE:
   19.40             return 0;
   19.41 -      case SDL_TEXTURESCALEMODE_FAST:
   19.42 -           if ((renderer->info.scale_modes & SDL_TEXTURESCALEMODE_FAST)==SDL_TEXTURESCALEMODE_FAST)
   19.43 +      case SDL_SCALEMODE_FAST:
   19.44 +           if ((renderer->info.scale_modes & SDL_SCALEMODE_FAST)==SDL_SCALEMODE_FAST)
   19.45             {
   19.46                return 0;
   19.47             }
   19.48             else
   19.49             {
   19.50                SDL_Unsupported();
   19.51 -              texture->scaleMode = SDL_TEXTURESCALEMODE_FAST;
   19.52 +              texture->scaleMode = SDL_SCALEMODE_FAST;
   19.53                return -1;
   19.54             }
   19.55             break;
   19.56 -      case SDL_TEXTURESCALEMODE_SLOW:
   19.57 -           if ((renderer->info.scale_modes & SDL_TEXTURESCALEMODE_SLOW)==SDL_TEXTURESCALEMODE_SLOW)
   19.58 +      case SDL_SCALEMODE_SLOW:
   19.59 +           if ((renderer->info.scale_modes & SDL_SCALEMODE_SLOW)==SDL_SCALEMODE_SLOW)
   19.60             {
   19.61                return 0;
   19.62             }
   19.63             else
   19.64             {
   19.65                SDL_Unsupported();
   19.66 -              texture->scaleMode = SDL_TEXTURESCALEMODE_SLOW;
   19.67 +              texture->scaleMode = SDL_SCALEMODE_SLOW;
   19.68                return -1;
   19.69             }
   19.70             break;
   19.71 -      case SDL_TEXTURESCALEMODE_BEST:
   19.72 +      case SDL_SCALEMODE_BEST:
   19.73             SDL_Unsupported();
   19.74 -           texture->scaleMode = SDL_TEXTURESCALEMODE_SLOW;
   19.75 +           texture->scaleMode = SDL_SCALEMODE_SLOW;
   19.76             return -1;
   19.77        default:
   19.78             SDL_Unsupported();
   19.79 -           texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   19.80 +           texture->scaleMode = SDL_SCALEMODE_NONE;
   19.81             return -1;
   19.82     }
   19.83  
    20.1 --- a/src/video/ps3/SDL_ps3render.c	Thu Dec 02 11:56:23 2010 -0800
    20.2 +++ b/src/video/ps3/SDL_ps3render.c	Sun Dec 12 15:19:05 2010 -0800
    20.3 @@ -79,7 +79,7 @@
    20.4       (SDL_BLENDMODE_NONE),
    20.5       /* We use bilinear scaling on the SPE for YV12 & IYUV
    20.6        * (width and height % 8 = 0) */
    20.7 -     (SDL_TEXTURESCALEMODE_SLOW)
    20.8 +     (SDL_SCALEMODE_SLOW)
    20.9       }
   20.10  };
   20.11  
    21.1 --- a/src/video/qnxgf/SDL_gf_render.c	Thu Dec 02 11:56:23 2010 -0800
    21.2 +++ b/src/video/qnxgf/SDL_gf_render.c	Sun Dec 12 15:19:05 2010 -0800
    21.3 @@ -87,7 +87,7 @@
    21.4        SDL_TEXTUREMODULATE_ALPHA),
    21.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    21.6        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    21.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_SLOW),
    21.8 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_SLOW),
    21.9       13,
   21.10       {
   21.11        SDL_PIXELFORMAT_INDEX8,
    22.1 --- a/src/video/win32/SDL_ceddrawrender.c	Thu Dec 02 11:56:23 2010 -0800
    22.2 +++ b/src/video/win32/SDL_ceddrawrender.c	Sun Dec 12 15:19:05 2010 -0800
    22.3 @@ -85,7 +85,7 @@
    22.4        SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
    22.5       (SDL_TEXTUREMODULATE_NONE),
    22.6       (SDL_BLENDMODE_NONE),
    22.7 -     (SDL_TEXTURESCALEMODE_NONE),
    22.8 +     (SDL_SCALEMODE_NONE),
    22.9       0,
   22.10       {0},
   22.11       0,
   22.12 @@ -666,10 +666,10 @@
   22.13  DDRAW_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   22.14  {
   22.15      switch (texture->scaleMode) {
   22.16 -    case SDL_TEXTURESCALEMODE_NONE:
   22.17 +    case SDL_SCALEMODE_NONE:
   22.18      default:
   22.19          SDL_Unsupported();
   22.20 -        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   22.21 +        texture->scaleMode = SDL_SCALEMODE_NONE;
   22.22          return -1;
   22.23      }
   22.24      return 0;
    23.1 --- a/src/video/win32/SDL_d3drender.c	Thu Dec 02 11:56:23 2010 -0800
    23.2 +++ b/src/video/win32/SDL_d3drender.c	Sun Dec 12 15:19:05 2010 -0800
    23.3 @@ -150,8 +150,8 @@
    23.4        SDL_TEXTUREMODULATE_ALPHA),
    23.5       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    23.6        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    23.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
    23.8 -      SDL_TEXTURESCALEMODE_SLOW | SDL_TEXTURESCALEMODE_BEST),
    23.9 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST |
   23.10 +      SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST),
   23.11       0,
   23.12       {0},
   23.13       0,
   23.14 @@ -807,14 +807,14 @@
   23.15  D3D_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   23.16  {
   23.17      switch (texture->scaleMode) {
   23.18 -    case SDL_TEXTURESCALEMODE_NONE:
   23.19 -    case SDL_TEXTURESCALEMODE_FAST:
   23.20 -    case SDL_TEXTURESCALEMODE_SLOW:
   23.21 -    case SDL_TEXTURESCALEMODE_BEST:
   23.22 +    case SDL_SCALEMODE_NONE:
   23.23 +    case SDL_SCALEMODE_FAST:
   23.24 +    case SDL_SCALEMODE_SLOW:
   23.25 +    case SDL_SCALEMODE_BEST:
   23.26          return 0;
   23.27      default:
   23.28          SDL_Unsupported();
   23.29 -        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   23.30 +        texture->scaleMode = SDL_SCALEMODE_NONE;
   23.31          return -1;
   23.32      }
   23.33      return 0;
   23.34 @@ -1343,20 +1343,20 @@
   23.35      }
   23.36  
   23.37      switch (texture->scaleMode) {
   23.38 -    case SDL_TEXTURESCALEMODE_NONE:
   23.39 -    case SDL_TEXTURESCALEMODE_FAST:
   23.40 +    case SDL_SCALEMODE_NONE:
   23.41 +    case SDL_SCALEMODE_FAST:
   23.42          IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
   23.43                                           D3DTEXF_POINT);
   23.44          IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
   23.45                                           D3DTEXF_POINT);
   23.46          break;
   23.47 -    case SDL_TEXTURESCALEMODE_SLOW:
   23.48 +    case SDL_SCALEMODE_SLOW:
   23.49          IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
   23.50                                           D3DTEXF_LINEAR);
   23.51          IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
   23.52                                           D3DTEXF_LINEAR);
   23.53          break;
   23.54 -    case SDL_TEXTURESCALEMODE_BEST:
   23.55 +    case SDL_SCALEMODE_BEST:
   23.56          IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
   23.57                                           D3DTEXF_GAUSSIANQUAD);
   23.58          IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
    24.1 --- a/src/video/win32/SDL_gapirender.c	Thu Dec 02 11:56:23 2010 -0800
    24.2 +++ b/src/video/win32/SDL_gapirender.c	Sun Dec 12 15:19:05 2010 -0800
    24.3 @@ -210,7 +210,7 @@
    24.4  	(SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD),
    24.5  	(SDL_TEXTUREMODULATE_NONE),
    24.6  	(SDL_BLENDMODE_NONE),
    24.7 -	(SDL_TEXTURESCALEMODE_NONE),
    24.8 +	(SDL_SCALEMODE_NONE),
    24.9  	7,
   24.10  	{
   24.11  	    SDL_PIXELFORMAT_RGB555,
   24.12 @@ -233,7 +233,7 @@
   24.13  	(SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD),
   24.14  	(SDL_TEXTUREMODULATE_NONE),
   24.15  	(SDL_BLENDMODE_NONE),
   24.16 -	(SDL_TEXTURESCALEMODE_NONE),
   24.17 +	(SDL_SCALEMODE_NONE),
   24.18  	7,
   24.19  	{
   24.20  	    SDL_PIXELFORMAT_RGB555,
    25.1 --- a/src/video/win32/SDL_gdirender.c	Thu Dec 02 11:56:23 2010 -0800
    25.2 +++ b/src/video/win32/SDL_gdirender.c	Sun Dec 12 15:19:05 2010 -0800
    25.3 @@ -90,7 +90,7 @@
    25.4        SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
    25.5       (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_ALPHA),
    25.6       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK),
    25.7 -     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST),
    25.8 +     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST),
    25.9       14,
   25.10       {
   25.11        SDL_PIXELFORMAT_INDEX8,
   25.12 @@ -580,17 +580,17 @@
   25.13  GDI_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
   25.14  {
   25.15      switch (texture->scaleMode) {
   25.16 -    case SDL_TEXTURESCALEMODE_NONE:
   25.17 -    case SDL_TEXTURESCALEMODE_FAST:
   25.18 +    case SDL_SCALEMODE_NONE:
   25.19 +    case SDL_SCALEMODE_FAST:
   25.20          return 0;
   25.21 -    case SDL_TEXTURESCALEMODE_SLOW:
   25.22 -    case SDL_TEXTURESCALEMODE_BEST:
   25.23 +    case SDL_SCALEMODE_SLOW:
   25.24 +    case SDL_SCALEMODE_BEST:
   25.25          SDL_Unsupported();
   25.26 -        texture->scaleMode = SDL_TEXTURESCALEMODE_FAST;
   25.27 +        texture->scaleMode = SDL_SCALEMODE_FAST;
   25.28          return -1;
   25.29      default:
   25.30          SDL_Unsupported();
   25.31 -        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   25.32 +        texture->scaleMode = SDL_SCALEMODE_NONE;
   25.33          return -1;
   25.34      }
   25.35      return 0;
    26.1 --- a/src/video/x11/SDL_x11render.c	Thu Dec 02 11:56:23 2010 -0800
    26.2 +++ b/src/video/x11/SDL_x11render.c	Sun Dec 12 15:19:05 2010 -0800
    26.3 @@ -83,7 +83,7 @@
    26.4        SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
    26.5       SDL_TEXTUREMODULATE_NONE,
    26.6       SDL_BLENDMODE_NONE,
    26.7 -     SDL_TEXTURESCALEMODE_NONE,
    26.8 +     SDL_SCALEMODE_NONE,
    26.9       0,
   26.10       {0},
   26.11       0,
   26.12 @@ -331,8 +331,8 @@
   26.13          /* Update the capabilities of the renderer. */
   26.14          info->blend_modes |= (SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD |
   26.15                               SDL_BLENDMODE_MOD | SDL_BLENDMODE_MASK);
   26.16 -        info->scale_modes |= (SDL_TEXTURESCALEMODE_FAST | SDL_TEXTURESCALEMODE_SLOW |
   26.17 -                             SDL_TEXTURESCALEMODE_BEST);
   26.18 +        info->scale_modes |= (SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW |
   26.19 +                             SDL_SCALEMODE_BEST);
   26.20          info->mod_modes |= (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA);
   26.21      }
   26.22  #endif
   26.23 @@ -1078,7 +1078,7 @@
   26.24          // FIXME: Is the following required?
   26.25          /* Set the default blending and scaling modes. */
   26.26          texture->blendMode = SDL_BLENDMODE_NONE;
   26.27 -        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   26.28 +        texture->scaleMode = SDL_SCALEMODE_NONE;
   26.29          data->blend_op = PictOpSrc;
   26.30          data->filter = NULL;
   26.31      }
   26.32 @@ -1216,14 +1216,14 @@
   26.33      X11_RenderData *renderdata = (X11_RenderData *) renderer->driverdata;
   26.34  
   26.35      switch (texture->scaleMode) {
   26.36 -    case SDL_TEXTURESCALEMODE_NONE:
   26.37 +    case SDL_SCALEMODE_NONE:
   26.38  #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
   26.39          if (renderdata->use_xrender) {
   26.40              data->filter = NULL;
   26.41          }
   26.42  #endif
   26.43          return 0;
   26.44 -    case SDL_TEXTURESCALEMODE_FAST:
   26.45 +    case SDL_SCALEMODE_FAST:
   26.46          /* We can sort of fake it for streaming textures */
   26.47          if (data->yuv || texture->access == SDL_TEXTUREACCESS_STREAMING) {
   26.48              return 0;
   26.49 @@ -1233,12 +1233,12 @@
   26.50              data->filter = FilterFast;
   26.51              return 0;
   26.52          }
   26.53 -    case SDL_TEXTURESCALEMODE_SLOW:
   26.54 +    case SDL_SCALEMODE_SLOW:
   26.55          if (renderdata->use_xrender) {
   26.56              data->filter = FilterGood;
   26.57              return 0;
   26.58          }
   26.59 -    case SDL_TEXTURESCALEMODE_BEST:
   26.60 +    case SDL_SCALEMODE_BEST:
   26.61          if (renderdata->use_xrender) {
   26.62              data->filter = FilterBest;
   26.63              return 0;
   26.64 @@ -1249,12 +1249,12 @@
   26.65          SDL_Unsupported();
   26.66  #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
   26.67          if (renderdata->use_xrender) {
   26.68 -            texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   26.69 +            texture->scaleMode = SDL_SCALEMODE_NONE;
   26.70              data->filter = NULL;
   26.71          }
   26.72          else
   26.73  #endif
   26.74 -            texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
   26.75 +            texture->scaleMode = SDL_SCALEMODE_NONE;
   26.76          return -1;
   26.77      }
   26.78      return 0;
   26.79 @@ -2012,7 +2012,7 @@
   26.80              }
   26.81  
   26.82              /* Set the picture filter only if a scaling mode is set. */
   26.83 -            if (texture->scaleMode != SDL_TEXTURESCALEMODE_NONE) {
   26.84 +            if (texture->scaleMode != SDL_SCALEMODE_NONE) {
   26.85                  XRenderSetPictureFilter(data->display, src,
   26.86                                          texturedata->filter, 0, 0);
   26.87              }
    27.1 --- a/test/common.c	Thu Dec 02 11:56:23 2010 -0800
    27.2 +++ b/test/common.c	Sun Dec 12 15:19:05 2010 -0800
    27.3 @@ -437,16 +437,16 @@
    27.4  PrintScaleMode(Uint32 flag)
    27.5  {
    27.6      switch (flag) {
    27.7 -    case SDL_TEXTURESCALEMODE_NONE:
    27.8 +    case SDL_SCALEMODE_NONE:
    27.9          fprintf(stderr, "None");
   27.10          break;
   27.11 -    case SDL_TEXTURESCALEMODE_FAST:
   27.12 +    case SDL_SCALEMODE_FAST:
   27.13          fprintf(stderr, "Fast");
   27.14          break;
   27.15 -    case SDL_TEXTURESCALEMODE_SLOW:
   27.16 +    case SDL_SCALEMODE_SLOW:
   27.17          fprintf(stderr, "Slow");
   27.18          break;
   27.19 -    case SDL_TEXTURESCALEMODE_BEST:
   27.20 +    case SDL_SCALEMODE_BEST:
   27.21          fprintf(stderr, "Best");
   27.22          break;
   27.23      default:
    28.1 --- a/test/testsprite2.c	Thu Dec 02 11:56:23 2010 -0800
    28.2 +++ b/test/testsprite2.c	Sun Dec 12 15:19:05 2010 -0800
    28.3 @@ -21,7 +21,7 @@
    28.4  static SDL_Rect *velocities;
    28.5  static int sprite_w, sprite_h;
    28.6  static SDL_BlendMode blendMode = SDL_BLENDMODE_MASK;
    28.7 -static SDL_TextureScaleMode scaleMode = SDL_TEXTURESCALEMODE_NONE;
    28.8 +static SDL_ScaleMode scaleMode = SDL_SCALEMODE_NONE;
    28.9  
   28.10  /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
   28.11  static void
   28.12 @@ -256,16 +256,16 @@
   28.13              } else if (SDL_strcasecmp(argv[i], "--scale") == 0) {
   28.14                  if (argv[i + 1]) {
   28.15                      if (SDL_strcasecmp(argv[i + 1], "none") == 0) {
   28.16 -                        scaleMode = SDL_TEXTURESCALEMODE_NONE;
   28.17 +                        scaleMode = SDL_SCALEMODE_NONE;
   28.18                          consumed = 2;
   28.19                      } else if (SDL_strcasecmp(argv[i + 1], "fast") == 0) {
   28.20 -                        scaleMode = SDL_TEXTURESCALEMODE_FAST;
   28.21 +                        scaleMode = SDL_SCALEMODE_FAST;
   28.22                          consumed = 2;
   28.23                      } else if (SDL_strcasecmp(argv[i + 1], "slow") == 0) {
   28.24 -                        scaleMode = SDL_TEXTURESCALEMODE_SLOW;
   28.25 +                        scaleMode = SDL_SCALEMODE_SLOW;
   28.26                          consumed = 2;
   28.27                      } else if (SDL_strcasecmp(argv[i + 1], "best") == 0) {
   28.28 -                        scaleMode = SDL_TEXTURESCALEMODE_BEST;
   28.29 +                        scaleMode = SDL_SCALEMODE_BEST;
   28.30                          consumed = 2;
   28.31                      }
   28.32                  }
   28.33 @@ -316,7 +316,7 @@
   28.34          quit(2);
   28.35      }
   28.36      srand((unsigned int)time(NULL));
   28.37 -    if (scaleMode != SDL_TEXTURESCALEMODE_NONE) {
   28.38 +    if (scaleMode != SDL_SCALEMODE_NONE) {
   28.39          sprite_w += sprite_w / 2;
   28.40          sprite_h += sprite_h / 2;
   28.41      }