-draw_space_dots(SDL_Surface *s) {
- int i;
- Uint16 *rawpixel;
- rawpixel = (Uint16 *) s->pixels;
-
- for(i = 0; i<MAXSPACEDOTS; i++) {
- if(sdot[i].y<0) {
- sdot[i].y = 0;
- }
- rawpixel[(int)(s->pitch/2*(int)sdot[i].y) + (int)(sdot[i].x)] = sdot[i].color;
- sdot[i].x -= xscroll / (1.3 + sdot[i].z);
- sdot[i].y -= yscroll / (1.3 + sdot[i].z);
- if(sdot[i].y >= XSIZE) sdot[i].x -= XSIZE;
- else if(sdot[i].x < 0) sdot[i].x = XSIZE-1;
- if(sdot[i].y > YSIZE) sdot[i].y -= YSIZE;
- else if(sdot[i].y < 0) sdot[i].y += YSIZE-1;
- }
-}
-
-void
-draw_engine_dots(SDL_Surface *s) {
- int i;
- Uint16 *rawpixel;
- rawpixel = (Uint16 *) s->pixels;
-
- for(i = 0; i<MAXENGINEDOTS; i++) {
- if(edot[i].active) {
- edot[i].x += edot[i].dx*t_frame - xscroll;
- edot[i].y += edot[i].dy*t_frame - yscroll;
- if((edot[i].life -= t_frame*3)<0 || edot[i].y<0 || edot[i].y>YSIZE) {
- edot[i].active = 0;
- } else if(edot[i].x<0 || edot[i].x>XSIZE) {
- edot[i].active = 0;
- } else {
- int heatindex;
- heatindex = edot[i].life * 6;
- //rawpixel[(int)(s->pitch/2*(int)(edot[i].y)) + (int)(edot[i].x)] = lifecolor[(int)(edot[i].life)];
- rawpixel[(int)(s->pitch/2*(int)(edot[i].y)) + (int)(edot[i].x)] = heatindex>3*W ? heatcolor[3*W-1] : heatcolor[heatindex];
- }
- }
- }
-}
-
-void