#include "PinkLiner.h" PinkLiner::PinkLiner() { //ctor } PinkLiner::~PinkLiner() { //dtor } void PinkLiner::init( b2World &world, float x, float y, float angle ) { // Images if ( m_imgCar == nullptr ) { m_imgCar = SDL_LoadBMP("Textures/LinerRose.bmp"); SDL_SetColorKey( m_imgCar, SDL_SRCCOLORKEY, SDL_MapRGBA( m_imgCar->format, 0, 0, 0, 255 ) ); } if ( m_imgWheel == nullptr ) { m_imgWheel = SDL_LoadBMP("Textures/LinerWheelRose.bmp"); SDL_SetColorKey( m_imgWheel, SDL_SRCCOLORKEY, SDL_MapRGBA( m_imgWheel->format, 0, 0, 0, 255 ) ); } // Être propre sur soi destroy( world ); // Eléments createCarenage( world, x, y, 0.5f, 0.2f ); b2Vec2 rel ; rel.Set( -0.5f, 0.1f ); createMotorWheel( world, rel, 10.0f, 0.1f ); rel.Set( 0.5f, 0.1f ); createFreeWheel( world, rel, 10.0f, 0.1f ); // Fin return ; }