diff options
author | Damien Appert <dappert> | 2010-10-13 11:32:45 +0000 |
---|---|---|
committer | Damien Appert <dappert> | 2010-10-13 11:32:45 +0000 |
commit | 0f04b9729be824d03030aa06dd3c16e12aa719b0 (patch) | |
tree | 64e8d72b97a1767352f66cf3af42adddccd23501 /sdl-test/SDL_tuto | |
parent | e3b27177f0ee59483f6f9c2cfd6591d733b77435 (diff) | |
download | 2010-netlemmings-0f04b9729be824d03030aa06dd3c16e12aa719b0.tar.gz 2010-netlemmings-0f04b9729be824d03030aa06dd3c16e12aa719b0.tar.bz2 2010-netlemmings-0f04b9729be824d03030aa06dd3c16e12aa719b0.zip |
recherche ordre terrain
git-svn-id: file:///var/svn/2010-netlemmings/trunk@98 077b3477-7977-48bd-8428-443f22f7bfda
Diffstat (limited to 'sdl-test/SDL_tuto')
-rw-r--r-- | sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy b/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy index 1589ed1..ea4e4ef 100644 --- a/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy +++ b/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy @@ -2103,10 +2103,9 @@ void paint_terrain (struct gameInit *gInit, int choix){ SDL_Rect offset,rStencil; SDL_Surface *sf; - for(i=0;i<2;++i){ + for(i=0;i<4;++i){ // printf("LES TERRAINS : "); k=gInit->t.lt; - // if(i==0) {printf("NO_OVERWRITE\n");} // if(i==1) {printf("OVERWRITE\n");} @@ -2128,7 +2127,7 @@ void paint_terrain (struct gameInit *gInit, int choix){ printf("WTF ... k->data.pt->modif == %d\n",k->data.pt->modif); exit(34); } - if (i==1){ + if (i==0){ // remove : 2 if (k->data.pt->modif == 2 || k->data.pt->modif == 6){ offset.h = sf->h; @@ -2141,6 +2140,8 @@ void paint_terrain (struct gameInit *gInit, int choix){ // printf("\tterrain_%d = %d, %d, %d, %d\n",cpt++,k->ID, k->x, k->y,k->data.pt->modif); } + } + if (i==2){ // full : 0 if (k->data.pt->modif == 0 || k->data.pt->modif == 4) { if(choix==1){ @@ -2155,10 +2156,10 @@ void paint_terrain (struct gameInit *gInit, int choix){ }} // printf("\tterrain_%d = %d, %d, %d, %d\n",cpt++,k->ID, k->x, k->y,k->data.pt->modif); } - } else { - // NO_OVERWRITE : 8 10 12 14 + } + if(i==3) { + // REMOVE NO_OVERWRITE : 10 14 - // REMOVE if ((k->data.pt->modif == 10)||(k->data.pt->modif == 14)) { offset.h = sf->h; offset.w = sf->w; @@ -2169,7 +2170,9 @@ void paint_terrain (struct gameInit *gInit, int choix){ } // printf("\tterrain_%d = %d, %d, %d, %d\n",cpt++,k->ID, k->x, k->y,k->data.pt->modif); } - + } + if(i==1){ + // NO_OVERWRITE : 8 12 if (k->data.pt->modif == 8 || k->data.pt->modif == 12){ if(choix==1){ rStencil.x=k->x; @@ -2378,7 +2381,7 @@ void findTerrain( struct gameInit *gInit,int x, int y, int x0){ (y+15 > k->y)){//on the terrain ++cpt; print_num(screen, gInit->mapI.map.tabGif[1], 5 , screen->h-10, cpt); - print_num(screen, gInit->mapI.map.tabGif[1], 5 + cpt*30, screen->h-10, i); + print_num(screen, gInit->mapI.map.tabGif[1], 5 + cpt*40, screen->h-10, i); to.x=k->x; to.y=k->y; to.w=sf->w; |