Upgrade SDL2_image library to 2.0.2 version

This commit is contained in:
aurhat
2018-02-10 11:28:51 +01:00
parent 61170c787f
commit 7da7efcbd8
28 changed files with 2972 additions and 652 deletions
+21 -5
View File
@@ -1,6 +1,6 @@
/*
SDL_image: An example image loading library for use with SDL
Copyright (C) 1997-2016 Sam Lantinga <[email protected]>
Copyright (C) 1997-2017 Sam Lantinga <[email protected]>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -21,8 +21,8 @@
/* A simple library to load images of various formats as SDL surfaces */
#ifndef _SDL_IMAGE_H
#define _SDL_IMAGE_H
#ifndef SDL_IMAGE_H_
#define SDL_IMAGE_H_
#include "SDL.h"
#include "SDL_version.h"
@@ -37,7 +37,7 @@ extern "C" {
*/
#define SDL_IMAGE_MAJOR_VERSION 2
#define SDL_IMAGE_MINOR_VERSION 0
#define SDL_IMAGE_PATCHLEVEL 1
#define SDL_IMAGE_PATCHLEVEL 2
/* This macro can be used to fill a version structure with the compile-time
* version of the SDL_image library.
@@ -49,6 +49,18 @@ extern "C" {
(X)->patch = SDL_IMAGE_PATCHLEVEL; \
}
/**
* This is the version number macro for the current SDL_image version.
*/
#define SDL_IMAGE_COMPILEDVERSION \
SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_PATCHLEVEL)
/**
* This macro will evaluate to true if compiled with SDL_image at least X.Y.Z.
*/
#define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
(SDL_IMAGE_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
/* This function gets the version of the dynamically linked SDL_image library.
it should NOT be used to fill a version structure, instead you should
use the SDL_IMAGE_VERSION() macro.
@@ -103,6 +115,7 @@ extern DECLSPEC int SDLCALL IMG_isLBM(SDL_RWops *src);
extern DECLSPEC int SDLCALL IMG_isPCX(SDL_RWops *src);
extern DECLSPEC int SDLCALL IMG_isPNG(SDL_RWops *src);
extern DECLSPEC int SDLCALL IMG_isPNM(SDL_RWops *src);
extern DECLSPEC int SDLCALL IMG_isSVG(SDL_RWops *src);
extern DECLSPEC int SDLCALL IMG_isTIF(SDL_RWops *src);
extern DECLSPEC int SDLCALL IMG_isXCF(SDL_RWops *src);
extern DECLSPEC int SDLCALL IMG_isXPM(SDL_RWops *src);
@@ -119,6 +132,7 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadLBM_RW(SDL_RWops *src);
extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPCX_RW(SDL_RWops *src);
extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNG_RW(SDL_RWops *src);
extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNM_RW(SDL_RWops *src);
extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadSVG_RW(SDL_RWops *src);
extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTGA_RW(SDL_RWops *src);
extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTIF_RW(SDL_RWops *src);
extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXCF_RW(SDL_RWops *src);
@@ -131,6 +145,8 @@ extern DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArray(char **xpm);
/* Individual saving functions */
extern DECLSPEC int SDLCALL IMG_SavePNG(SDL_Surface *surface, const char *file);
extern DECLSPEC int SDLCALL IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst);
extern DECLSPEC int SDLCALL IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality);
extern DECLSPEC int SDLCALL IMG_SaveJPG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst, int quality);
/* We'll use SDL for reporting errors */
#define IMG_SetError SDL_SetError
@@ -142,4 +158,4 @@ extern DECLSPEC int SDLCALL IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst,
#endif
#include "close_code.h"
#endif /* _SDL_IMAGE_H */
#endif /* SDL_IMAGE_H_ */