~ubuntu-branches/ubuntu/dapper/bumprace/dapper

« back to all changes in this revision

Viewing changes to src/IMG.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian T. Steigies
  • Date: 2005-10-29 18:24:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051029182417-x3u19tbi0785ptnq
Tags: 1.5.1.dfsg-1
* remove back2.jpg from upstream source (closes: #336227)
* created background_by_cts.xcf with gimp which can be used as a replacement
  (I am not an artist, if you have a nice, free picture, please contact Karl)
* background_by_cts.xcf is converted in debian/rules with imagemagick to
  back2.jpg, thus build-depend on imagemagick
* GNU config automated update: config.sub (20050708 to 20050708),
  config.guess (20050708 to 20050803)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
    IMGLIB:  An example image loading library for use with SDL
3
 
    Copyright (C) 1999  Sam Lantinga
4
 
 
5
 
    This program is free software; you can redistribute it and/or modify
6
 
    it under the terms of the GNU General Public License as published by
7
 
    the Free Software Foundation; either version 2 of the License, or
8
 
    (at your option) any later version.
9
 
 
10
 
    This program is distributed in the hope that it will be useful,
11
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
    GNU General Public License for more details.
14
 
 
15
 
    You should have received a copy of the GNU General Public License
16
 
    along with this program; if not, write to the Free Software
17
 
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 
19
 
    Sam Lantinga
20
 
    5635-34 Springhouse Dr.
21
 
    Pleasanton, CA 94588 (USA)
22
 
    slouken@devolution.com
23
 
*/
24
 
 
25
 
/* A simple library to load images of various formats as SDL surfaces */
26
 
 
27
 
#ifndef _IMG_h
28
 
#define _IMG_h
29
 
 
30
 
#include "SDL.h"
31
 
#include "begin_code.h"
32
 
 
33
 
/* Set up for C function definitions, even when using C++ */
34
 
#ifdef __cplusplus
35
 
extern "C" {
36
 
#endif
37
 
 
38
 
/* Load an image from an SDL data source.
39
 
   The 'type' may be one of: "BMP", "GIF", "PNG", etc.
40
 
 
41
 
   If the image format supports a transparent pixel, SDL will set the
42
 
   colorkey for the surface.  You can enable RLE acceleration on the
43
 
   surface afterwards by calling:
44
 
        SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
45
 
 */
46
 
extern DECLSPEC SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc,
47
 
                                              char *type);
48
 
/* Convenience functions */
49
 
extern DECLSPEC SDL_Surface *IMG_Load(const char *file);
50
 
extern DECLSPEC SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
51
 
 
52
 
/* Invert the alpha of a surface for use with OpenGL
53
 
   This function is now a no-op, and only provided for backwards compatibility.
54
 
*/
55
 
extern DECLSPEC int IMG_InvertAlpha(int on);
56
 
 
57
 
/* Functions to detect a file type, given a seekable source */
58
 
extern DECLSPEC int IMG_isGIF(SDL_RWops *src);
59
 
extern DECLSPEC int IMG_isJPG(SDL_RWops *src);
60
 
extern DECLSPEC int IMG_isPNG(SDL_RWops *src);
61
 
 
62
 
/* Individual loading functions */
63
 
extern DECLSPEC SDL_Surface *IMG_LoadGIF_RW(SDL_RWops *src);
64
 
extern DECLSPEC SDL_Surface *IMG_LoadJPG_RW(SDL_RWops *src);
65
 
extern DECLSPEC SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src);
66
 
 
67
 
/* We'll use SDL for reporting errors */
68
 
#define IMG_SetError    SDL_SetError
69
 
#define IMG_GetError    SDL_GetError
70
 
 
71
 
/* Ends C function definitions when using C++ */
72
 
#ifdef __cplusplus
73
 
};
74
 
#endif
75
 
#include "close_code.h"
76
 
 
77
 
#endif /* _IMG_h */