X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=main.c;h=aab0d71d9183e27f0a7ec6590968485d1bbe74ac;hp=43a993dd977230723cab26076eb43ec6cafab600;hb=8193e09e49bc571f9c61e6e3adf45010271c08d5;hpb=a4c0b4c3158f9ce4ea9473dff373cf3e25f388e7 diff --git a/main.c b/main.c index 43a993d..aab0d71 100644 --- a/main.c +++ b/main.c @@ -26,6 +26,7 @@ #include "config.h" #include "file.h" #include "score.h" +#include "shape.h" #include "sound.h" #include @@ -52,6 +53,7 @@ struct rock_struct { int dead; // has been blown out of the way // to make room for a new ship appearing. SDL_Surface *image; + struct shape *shape; int type_number; }; struct black_point_struct { @@ -96,6 +98,8 @@ SDL_Surface *surf_rock[NROCKS], // THE ROCKS *surf_font_big; // The big font +struct shape rock_shapes[NROCKS]; + SFont_Font *g_font; // Structure global variables @@ -216,7 +220,7 @@ makebangdots(int xbang, int ybang, int dx, int dy, SDL_Surface *s, int power) { for(x = 0; xw; x++) { for(y = 0; yh; y++) { c = rawpixel[s->pitch/2*y + x]; - if(c && c != SDL_MapRGB(s->format,0,255,0)) { + if(c && c != s->format->colorkey) { theta = rnd()*M_PI*2; @@ -467,6 +471,7 @@ drawdots(SDL_Surface *s) { SDL_UnlockSurface(s); } + char a[MAX_PATH_LEN]; int init(int fullscreen) { @@ -563,11 +568,11 @@ init(int fullscreen) { // Load all our lovely rocks for(i = 0; i