class logo
	{
     private:
     	BITMAP *pic;
        SAMPLE *sound;
        float x,y;
        int sw,sh;
        float stretch;
        float speed;
        float count;

     public:
     	void init(BITMAP *picc,SAMPLE *soundd, int w, int h);
        void draw(BITMAP *backgr);
        int move(void);
    };

void logo::init(BITMAP *picc, SAMPLE *soundd, int w, int h)
	{
     pic=picc;
     sound=soundd;
     sw=w;
     sh=h;

	 x= (sw/2)/* - pic->w/2*/;
     y= (sh/2)/* - pic->h/2*/;

     stretch=9;

     speed=-.1;
	 count=100;
    }

void logo::draw(BITMAP *backgr)
	{
	static int trans_level=255;
	
	/*if(count>0)
       stretch_blit(pic,backgr,0,0,pic->w,pic->h,(int)(x-(pic->w*stretch)/2),(int)(y-(pic->h*stretch)/2),(int)(pic->w*stretch),(int)(pic->h*stretch));
    else
    {
       //set_trans_blender(255,255,255,trans_level);
       trans_level-=2;*/
       draw_sprite(backgr,pic,320-(int)pic->w/2,240-(int)pic->h/2);
    //}

     if(count==0)
       play_sample(sound,255,128,1000,FALSE);

     if(count==0 /*|| count ==-2*/)
    	rectfill(backgr,0,0,sw,sh,makecol(255,255,255));
    }

int logo::move(void)
	{
    if(count>0)
    	{
    	count--;
    	return 0;
        }
    else
        return 1;   	
    }
    
