diff options
author | Damien Appert <dappert> | 2010-10-24 11:48:14 +0000 |
---|---|---|
committer | Damien Appert <dappert> | 2010-10-24 11:48:14 +0000 |
commit | 99425e7d7a78a6bee679f296a4e43aecd0ac81c2 (patch) | |
tree | b1a271c4f105220810ed5f04e25939931aa343fc /sdl-test | |
parent | 66932ab7a21b6c4b36542340ea143924da274834 (diff) | |
download | 2010-netlemmings-99425e7d7a78a6bee679f296a4e43aecd0ac81c2.tar.gz 2010-netlemmings-99425e7d7a78a6bee679f296a4e43aecd0ac81c2.tar.bz2 2010-netlemmings-99425e7d7a78a6bee679f296a4e43aecd0ac81c2.zip |
test alpha et GIMP
git-svn-id: file:///var/svn/2010-netlemmings/trunk@112 077b3477-7977-48bd-8428-443f22f7bfda
Diffstat (limited to 'sdl-test')
-rw-r--r-- | sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy b/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy index 37e5bac..b0f82a3 100644 --- a/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy +++ b/sdl-test/SDL_tuto/TestParserLemmingsLVL/parse_ini.yy @@ -121,7 +121,7 @@ #define MINIMAP_X0 636 #define MINIMAP_Y0 325 #define MINIMAP_MX 464 -#define MINIMAP_MY 100 +#define MINIMAP_MY 120 // Config Cam @@ -732,7 +732,7 @@ if(strncmp($1,"tiles",5) == 0){ state=10; if($3->ptr.ints->val!=gInit->mapI.map.tiles){ - printf("BUG: variable parse && nbrFichier are different\n"); + printf("BUG: variable parse && nbrFichier are different %d waiting and %d found\n",$3->ptr.ints->val,gInit->mapI.map.tiles); exit(2); } //gInit->mapI.map.tiles=$3->ptr.ints->val; @@ -1277,6 +1277,7 @@ int checkPixelUP(int nbr, int x, int y, int size ){ int explode(int x, int y, int size){ printf("Play Sound SND_EXPLODE\n"); //GameController.sound.play(GameController.SND_EXPLODE); + return 0; } //return stencil value from the middle of the lemming @@ -1329,11 +1330,11 @@ int checkPixelUP(int nbr, int x, int y, int size ){ int lw=0; int lState=0; int fa; - int checkMask; - int sx; - int sy; - int idx; - int maxF; + //int checkMask; + //int sx; + //int sy; + //int idx; + //int maxF; int err; int levitation; int oldX; @@ -1582,15 +1583,15 @@ int checkPixelUP(int nbr, int x, int y, int size ){ if ( (++(k->data.pl->cptFall) & 1) == 1) // only every other step {k->y -= CLIMBER_STEP;} - err=(k->data.pl->dir==1) ? -3 : 3 ; - err=checkPixelUP(2,k->x+fx+err,k->y+fy,fs); + //fa=(k->data.pl->dir==1) ? 4 : 3 ; + err=checkPixelUP(2,k->x+fx+3,k->y+fy,fs); if(err==113){return 127;} if (midY(k->y+fy,fs) < 0 || err<2) { k->data.pl->dir = (k->data.pl->dir==1) ? 0 : 1 ; k->ID=1; //FALLER; k->data.pl->cptFall = 0; } else { - err=reachedPlateau(k->x+fx,k->y+fy,fs,k->data.pl->dir); + err=reachedPlateau(k->x+fx+3,k->y+fy,fs,k->data.pl->dir); if (err==115){return 115;} if(err) { k->data.pl->cptFall = 0; @@ -2555,7 +2556,7 @@ int checkPixelUP(int nbr, int x, int y, int size ){ //DEBUT TEST CREATION UN LEMMING // DEBUT DEBUG: LEMMING COLLISION - gInit->mapI.paraMap[1]=1; + gInit->mapI.paraMap[1]=10; // FIN DEBUG: LEMMING COLLISION nbLem=gInit->mapI.paraMap[1]; @@ -2841,7 +2842,7 @@ int miniMap (SDL_Surface *s, int x0, int y0, float coefX, float coefY){ printf("Bug Error x0 %d y0 %d coefX %f coefY %f s->pixels %p \n",x0,y0,coefX,coefY,s->pixels); return 189; } - + //printf("x0 %d y0 %d w0 %d h0 %d coefX %f coefY %f s->pixels %p \n",x0,y0,w0,h0,coefX,coefY,s->pixels); @@ -2866,7 +2867,10 @@ int miniMap (SDL_Surface *s, int x0, int y0, float coefX, float coefY){ w0=MINIMAP_MX/stepX; h0=MINIMAP_MY/stepY; - + //centrage camera + //printf("x0 %d w0/2 %d\n",x0,w0/2); + x0+=((x0+w0/3)>LEVEL_WIDTH)? 0 : (((int)coefX>=1)? ((-w0/3)/(int)coefX) : + (int)(((float)(-w0/3))/coefX) ); if(w0 + x0 >LEVEL_WIDTH){ w0=LEVEL_WIDTH-x0; @@ -3017,14 +3021,14 @@ int test_blit(SDL_Surface *spr,SDL_Rect *from,SDL_Surface *t,SDL_Rect *to){ SDL_Rect offset,objetAnim,rStencil; SDL_Surface *sf; struct listeSimplementChainee *k=NULL; - int res; int err=0; int type=0; - int ox,oy; + //int ox,oy; int mode=0; - Uint32 color,color2,color3; - int size; - void *temp_pixels = NULL; + //Uint32 color,color2,color3; + //int size; + //void *temp_pixels = NULL; + //DEBUT TEST: SPR k=gInit->o.lo; while ( k !=NULL ) { @@ -3080,14 +3084,14 @@ int test_blit(SDL_Surface *spr,SDL_Rect *from,SDL_Surface *t,SDL_Rect *to){ SDL_Rect offset,objetAnim,rStencil; SDL_Surface *sf; struct listeSimplementChainee *k=NULL; - int res; + //int res; int err=0; int type=0; int ox,oy; int mode=0; - Uint32 color,color2,color3; - int size; - void *temp_pixels = NULL; + Uint32 color,color2;//,color3; + //int size; + //void *temp_pixels = NULL; //DEBUT TEST: SPR k=gInit->o.lo; while ( k !=NULL ) { @@ -3912,7 +3916,7 @@ int test_blit(SDL_Surface *spr,SDL_Rect *from,SDL_Surface *t,SDL_Rect *to){ } else { test_blit(pStencil, &camera, screen, NULL); } - err=miniMap (screen,mouseX,mouseY,4,4); + err=miniMap (screen,mouseX,mouseY,4.,4.); if( err != 0){ return err;} |