X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=96c396831e8e93fc11c45e4703b46bc322c91d01;hp=a0680330e325b9a5f34144617cace44fe6c593a6;hb=0978da8f14d855eecae9882b559d6e8b0533e78e;hpb=e06676edd300c8a85d2e6715427e7e22e55c7670 diff --git a/main.c b/main.c index a068033..96c3968 100644 --- a/main.c +++ b/main.c @@ -66,7 +66,7 @@ struct bangdots bdot[MAXBANGDOTS], *bdotptr = bdot; char topline[1024]; char *initerror = ""; -struct ship ship = { SHIP, NULL, XSIZE/2, YSIZE/2, SCREENDXMIN, 0.0 }; +struct ship ship = { SHIP, ALL_FLAGS, NULL, XSIZE/2, YSIZE/2, SCREENDXMIN, 0.0 }; float screendx = SCREENDXMIN, screendy = 0.0; float xscroll, yscroll; @@ -531,9 +531,9 @@ void do_collision(Sprite *a, Sprite *b) { if(a->type == SHIP) { - a->type = -SHIP; bang = true; + a->flags = MOVE_FLAG; bang = true; } else if (b->type == SHIP) { - b->type = -SHIP; bang = true; + b->flags = MOVE_FLAG; bang = true; } else { bounce(a, b); } @@ -553,7 +553,7 @@ gameloop() { switch(state) { case DEAD_PAUSE: // Create a new ship and start all over again - ship.sprite_type = SHIP; + ship.flags = ALL_FLAGS; state = GAMEPLAY; play_tune(TUNE_GAMEPLAY); break; @@ -668,6 +668,7 @@ gameloop() { ship.x = XSIZE/2.2; ship.y = YSIZE/2; ship.dx = screendx; ship.dy = screendy; ship.lives = 4; + ship.flags = ALL_FLAGS; add_sprite(SPRITE(&ship)); score = 0;