diff --git a/SDL#4/exe b/SDL#4/exe index 15cbcfc..594b38f 100755 Binary files a/SDL#4/exe and b/SDL#4/exe differ diff --git a/SDL#4/main.cpp b/SDL#4/main.cpp index a518277..3a59670 100644 --- a/SDL#4/main.cpp +++ b/SDL#4/main.cpp @@ -126,17 +126,17 @@ int main(int argc, char* argv[]) { mario->moveFromVelocity(); - // if( mgr->hit("mystery-bloc", 0, 1) ) mb.jump(); - // else mb.unjump(); + if( mgr->hit("mystery-bloc", 0, 1) ) mb.jump(); + else mb.unjump(); - // if( mgr->hit("mystery-bloc2", 0, 1) ) mb1.jump(); - // else mb1.unjump(); + if( mgr->hit("mystery-bloc2", 0, 1) ) mb1.jump(); + else mb1.unjump(); - // if( mgr->hit("mystery-bloc3", 0, 1) ) mb2.jump(); - // else mb2.unjump(); + if( mgr->hit("mystery-bloc3", 0, 1) ) mb2.jump(); + else mb2.unjump(); - // if( mgr->hit("mystery-bloc4", 0, 1) ) mb3.jump(); - // else mb3.unjump(); + if( mgr->hit("mystery-bloc4", 0, 1) ) mb3.jump(); + else mb3.unjump(); mgr->manageFps(); // Gestion des FPS (speed) mgr->update(); // Mise a jour du rendu diff --git a/SDL#4/main.o b/SDL#4/main.o index dc5ffc7..22e3814 100644 Binary files a/SDL#4/main.o and b/SDL#4/main.o differ diff --git a/SDL#4/xMario/xMarioMario.cpp b/SDL#4/xMario/xMarioMario.cpp index b574244..ebb28b5 100644 --- a/SDL#4/xMario/xMarioMario.cpp +++ b/SDL#4/xMario/xMarioMario.cpp @@ -22,7 +22,7 @@ xMarioMario::xMarioMario(xManager *m, int x, int y) // Position frame par defaut _pos = "NR"; // bottom-center - _gravity = 19; + _gravity = 8; // Constantes de mouvement sur X _velocity[0] = 0.0; @@ -92,7 +92,7 @@ void xMarioMario::moveFromVelocity(){ // TROUBLE // TROUBLE if( !this->onFloor() ) - this->move(0, _gravity); + _velocity[1] += _gravity; // TROUBLE // TROUBLE // TROUBLE