From eeed6b3d8386dcf4be6ca08126d516def2da6663 Mon Sep 17 00:00:00 2001 From: Damien Appert Date: Sat, 11 Dec 2010 18:27:25 +0000 Subject: modif px*4 git-svn-id: file:///var/svn/2010-netlemmings/trunk@197 077b3477-7977-48bd-8428-443f22f7bfda --- src/graphic.c | 24 ++++-------------------- src/include/graphic.h | 1 - 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/src/graphic.c b/src/graphic.c index c6acf4f..18e62c2 100644 --- a/src/graphic.c +++ b/src/graphic.c @@ -70,20 +70,6 @@ SDL_Surface * loadGif(char *filePath) { return IMG_Load(filePath); } -int pxAreaColor (SDL_Surface* s, Uint32 p , int x , int y , int mX , int mY ){ - int i,j; - - // FIXME : make some test to prevent out of bound pixel - - for (i=x;iclip_rect.w, gGraph->surfaces.terrain->clip_rect.w - gIni->level.terrains[i].xpos); SDL_LockSurface(tile); - for (y=ymin; yclip_rect.h-1-y; @@ -175,10 +161,8 @@ int paintTerrain(gameIni_t *gIni, gameRess_t *gRess, gameGraphics_t *gGraph) { dstPixel=getPixel8BitPalette(tile, x, y2); dstStencil=ccc_terrain; } - - pxAreaColor (gGraph->surfaces.terrain,dstPixel,xdst,ydst,2,2); - pxAreaColor (gGraph->surfaces.stencil,dstStencil,xdst,ydst,2,2); - + putPixel(gGraph->surfaces.terrain,xdst,ydst,dstPixel); + putPixel(gGraph->surfaces.stencil,xdst,ydst,dstStencil); } } } diff --git a/src/include/graphic.h b/src/include/graphic.h index 1623d79..c1a92c5 100644 --- a/src/include/graphic.h +++ b/src/include/graphic.h @@ -16,7 +16,6 @@ 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 pxAreaColor (SDL_Surface* s, Uint32 p , int x , int y , int mX , int mY ); 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); -- cgit v1.2.3