lab.cpp/SDL#4/xMario/xMarioMario.cpp

37 lines
1.3 KiB
C++

/* [CONSTRUCTOR] Construction d'un xMarioMario
=========================================================*/
xMarioMario::xMarioMario(xManager *m, int x, int y)
: xSpriteAnimation(
m,
"src/mario.png",
(SDL_Rect){
(int) (BLOC_SIZE*x+BLOC_SIZE*.1),
BLOC_SIZE*y,
(int) (BLOC_SIZE*.8),
BLOC_SIZE
}
){
// this->addFrame( (SDL_Rect){2, 0, 19, 29} );
// this->addFrame( (SDL_Rect){33, 0, 19, 29} );
// this->addFrame( (SDL_Rect){62, 0, 19, 29} );
// this->addFrame( (SDL_Rect){93, 0, 19, 29} );
// this->addFrame( (SDL_Rect){122, 0, 19, 29} );
// this->addFrame( (SDL_Rect){122, 0, 19, 29} );
// this->addFrame( (SDL_Rect){153, 0, 19, 29} );
// this->addFrame( (SDL_Rect){182, 0, 19, 29} );
// this->addFrame( (SDL_Rect){213, 0, 19, 29} );
this->addFrame( (SDL_Rect){238, 0, 19, 29} );
// this->addFrame( (SDL_Rect){269, 0, 19, 29} );
// this->addFrame( (SDL_Rect){298, 0, 19, 29} );
// this->addFrame( (SDL_Rect){329, 0, 19, 29} );
// /* (1) On definit les clip de chaque frame */
// this->addFrame( (SDL_Rect){21, 0, 18, 32} );
// this->addFrame( (SDL_Rect){42, 0, 18, 32} );
// this->addFrame( (SDL_Rect){63, 0, 18, 32} );
// this->addFrame( (SDL_Rect){82, 0, 18, 32} );
// this->addFrame( (SDL_Rect){103, 0, 18, 32} );
// this->addFrame( (SDL_Rect){125, 0, 18, 32} );
}