im making a RAPTOR clone (i know, been done many times) in SDL, and i'm having trouble getting the image to scroll vertically for the background.
Im using one bitmap for the background, and it scrolls, but doesnt loop.
The code im using comes from the cone3d lesson 6 source for horizontal scrolling, edited for vert. However, when the image runs out, its gone forever lol.
Can anyone help me get the code right so that it DOES work?

Code:
float scroll;

void DrawIMG(SDL_Surface *img, int x, int y, int w, int h, int x2, int y2)
{
  SDL_Rect dest;
  dest.x = x;
  dest.y = y;
  SDL_Rect dest2;
  dest2.x = x2;
  dest2.y = y2;
  dest2.w = w;
  dest2.h = h;
  SDL_BlitSurface(img, &dest2, screen, &dest);
}

void DrawScroll()
{
  if(scroll>3909-480)
  {
    DrawIMG(back, 0, 0,(int)(480),(int)(3909-scroll),0,(int)(scroll));
    DrawIMG(back, 0,(int)(3909-scroll-1),640,(int)(480-(3909-scroll)),0,0);
  } else {
    DrawIMG(back, 0,0,640,4480,0,(int)scroll);
  }
}
thanks in advance!

-Blizz