The draw function

When the draw function is called in Listing 2:

A pointer to the off-screen buffer is also passed to the draw function.

The draw function is shown in its entirety in Listing 5.

Listing 5. The draw function.
void draw(int xCoor,int yCoor,BITMAP* buf,int color){
  show_mouse(NULL);//hide mouse pointer while drawing
  //Draw filled circle at mouse coor on off-screen buffer.
  //Copy the off-screen image to the screen.
  show_mouse(screen);//show mouse when drawing finished
}//end draw