X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=1f2856f858605da73a9a754d7997baa6af86deb2;hp=aab0d71d9183e27f0a7ec6590968485d1bbe74ac;hb=b7de8607ee49edb99979968d5149665bf5590087;hpb=8193e09e49bc571f9c61e6e3adf45010271c08d5 diff --git a/main.c b/main.c index aab0d71..1f2856f 100644 --- a/main.c +++ b/main.c @@ -113,6 +113,7 @@ struct spacedot sdot[MAXSPACEDOTS]; char topline[1024]; char *initerror = ""; +struct shape shipshape; float shipx,shipy = 240.0; // X position, 0..XSIZE float shipdx,shipdy; // Change in X position per tick. float rockrate,rockspeed; @@ -543,6 +544,7 @@ init(int fullscreen) { // Load the spaceship graphic. NULLERROR(temp = IMG_Load(add_path("sprites/ship.png"))); NULLERROR(surf_ship = SDL_DisplayFormat(temp)); + get_shape(surf_ship, &shipshape); // Load the life indicator (small ship) graphic. NULLERROR(temp = IMG_Load(add_path("indicators/life.png"))); @@ -568,7 +570,6 @@ init(int fullscreen) { // Load all our lovely rocks for(i = 0; ipixels; // Check that the black points on the ship are @@ -746,6 +754,7 @@ draw() { } } SDL_UnlockSurface(surf_screen); + */ } // Draw all the little ships @@ -886,6 +895,7 @@ gameloop() { rockptr->dy = rnd()-0.5; rockptr->type_number = random() % NROCKS; rockptr->image = surf_rock[rockptr->type_number];// [random()%NROCKS]; + rockptr->shape = &rock_shapes[rockptr->type_number]; rockptr->active = 1; rockptr->y = rnd()*(YSIZE + rockptr->image->h); }