SDLGameEngine

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# include/sgespriteimage.h

Go to the documentation of this file.

    00001 #ifndef _SGESPRITEIMAGE_H
    00002 #define _SGESPRITEIMAGE_H
    00003
    00004 #ifdef __cplusplus
    00005 extern "C" {
    00006 #endif
    00007
    00012 /*
    00013  * Copyright (c) 2007 Heiko Irrgang
    00014  *
    00015  * The license and distribution terms for this file may be
    00016  * found in the file COPYING in this distribution or at
    00017  * http://93-interactive.com/cms/products/software/sdl-game-engine/license/
    00018  */
    00019
    00035 typedef struct {
    00037         int useAlpha;
    00039         Uint32 collisionColor;
    00041         int x;
    00043         int y;
    00045         int w;
    00047         int h;
    00049         SDL_Surface *image;
    00050 } SGESPRITEIMAGE;
    00051
    00056 SGESPRITEIMAGE *sgeSpriteImageNew(void);
    00057
    00064 SGESPRITEIMAGE *sgeSpriteImageNewFile(SGEFILE *f, const char *name);
    00065
    00070 void sgeSpriteImageDestroy(SGESPRITEIMAGE *s);
    00071
    00077 SGESPRITEIMAGE *sgeSpriteImageDuplicate(SGESPRITEIMAGE *s);
    00078
    00088 void sgeSpriteImageSetImage(SGESPRITEIMAGE *s, SDL_Surface *image);
    00089
    00099 void sgeSpriteImageDraw(SGESPRITEIMAGE *s, Uint8 alpha, SDL_Surface *dest);
    00100
    00111 void sgeSpriteImageDrawXY(SGESPRITEIMAGE *s, int x, int y, Uint8 alpha, SDL_Surface *dest);
    00112
    00122 int sgeSpriteImageBoxCollide(SGESPRITEIMAGE *a, SGESPRITEIMAGE *b);
    00123
    00133 int sgeSpriteImageCollide(SGESPRITEIMAGE *a, SGESPRITEIMAGE *b);
    00134
    00139 void sgeSpriteImageUseAlpha(SGESPRITEIMAGE *s);
    00140
    00145 void sgeSpriteImageIgnoreAlpha(SGESPRITEIMAGE *s);
    00146
    00159 void sgeSpriteImageSetCollisionColor(SGESPRITEIMAGE *s, int r, int g, int b, int a);
    00160
    00161 // }@
    00162
    00163 #ifdef __cplusplus
    00164 }
    00165 #endif
    00166
    00167 #endif

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines