- Creat mòdul proc_explosio per a vore pixels volant quan se trenca algo
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "proc_arounders.h"
|
||||
#include "jgame.h"
|
||||
#include "proc_mapa.h"
|
||||
#include "proc_explosio.h"
|
||||
|
||||
namespace arounders
|
||||
{
|
||||
@@ -108,6 +109,7 @@ namespace arounders
|
||||
draw::setSource(marca);
|
||||
draw::draw(arounders::seleccionat->x-3, arounders::seleccionat->y-3);
|
||||
}
|
||||
explosio::pintar();
|
||||
}
|
||||
|
||||
const bool seleccionar()
|
||||
@@ -213,6 +215,7 @@ namespace arounders
|
||||
draw::draw(a->x-9, a->y-12);
|
||||
draw::setTrans(0);
|
||||
draw::setDestination(nullptr);
|
||||
explosio::crear(a->x+4, a->y+3, 20, 200, 20, 0);
|
||||
mapa::arounders::morts++;
|
||||
}
|
||||
|
||||
@@ -862,6 +865,7 @@ namespace arounders
|
||||
void doCavar(arounder *a)
|
||||
{
|
||||
if (a->orientacio == arounders::orientacions::dreta) {
|
||||
explosio::crear(a->x+8, a->y, 10, 200, 10, 3);
|
||||
put_pixel(a->x+8, a->y, 0);
|
||||
put_pixel(a->x+8, a->y+1, 0);
|
||||
put_pixel(a->x+8, a->y+2, 0);
|
||||
@@ -871,6 +875,7 @@ namespace arounders
|
||||
put_pixel(a->x+8, a->y+6, 0);
|
||||
put_pixel(a->x+8, a->y+7, 0);
|
||||
} else {
|
||||
explosio::crear(a->x-1, a->y, 10, 200, 10, 3);
|
||||
put_pixel(a->x-1, a->y, 0);
|
||||
put_pixel(a->x-1, a->y+1, 0);
|
||||
put_pixel(a->x-1, a->y+2, 0);
|
||||
@@ -880,10 +885,12 @@ namespace arounders
|
||||
put_pixel(a->x-1, a->y+6, 0);
|
||||
put_pixel(a->x-1, a->y+7, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void doPerforar(arounder *a)
|
||||
{
|
||||
explosio::crear(a->x+4, a->y+8, 10, 200, 10, 3);
|
||||
put_pixel(a->x , a->y+8, 0);
|
||||
put_pixel(a->x+1, a->y+8, 0);
|
||||
put_pixel(a->x+2, a->y+8, 0);
|
||||
|
||||
Reference in New Issue
Block a user