summaryrefslogtreecommitdiff
path: root/src/include/graphic.h
blob: c1a92c5c2ad91ef1b6b0ac2288367127dfcf23c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef GRAPHIC_H
#define GRAPHIC_H

#include "SDL/SDL.h"
#include "data_ini.h"
#include "data_ress.h"
#include "data_localgame.h"

#define SCREEN_BPP 32
#define MY_SDLSURFACE_OPTS SDL_HWSURFACE|SDL_HWACCEL|SDL_SRCCOLORKEY|SDL_ASYNCBLIT|SDL_RLEACCEL

Uint32 getPixel(SDL_Surface *s, int x, int y);
Uint32 getPixel8BitPalette(SDL_Surface *s, int x, int y);
int isTransparent(SDL_Surface *s, int x, int y);

void putPixel(SDL_Surface *s, int x, int y, Uint32 p);
SDL_Surface * createSurface(int width, int height);
SDL_Surface * loadGif(char *filePath);
int paintTerrain(gameIni_t *gIni, gameRess_t *gRess, gameGraphics_t *gGraph);

int repaint(gameGraphSurfaces_t *srcSurfs, SDL_Rect *srcRect, SDL_Surface *dstSurf, SDL_Rect dstRect);
int findAndZSortObjects(gameGraphObjState_t *objectsStat, SDL_Rect *offsetRect, gameGraphObjState_t **objectsFound);
int paintObject(gameGraphObjState_t *obj, SDL_Rect *srcRect, SDL_Surface *dstSurf);

#endif /*GRAPHIC_H*/