www.pudn.com > MyGame.rar > Stars.h
// Stars.h: interface for the CStars class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_STARS_H__49A36CEB_A981_443E_A031_373073A66214__INCLUDED_)
#define AFX_STARS_H__49A36CEB_A981_443E_A031_373073A66214__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GameObj.h"
#ifdef _WIN32
#define drand48() (((float) rand())/((float) RAND_MAX))
#define srand48(x) (srand((x)))
#endif
class CStars : public CGameObj
{
public:
CStars(int starn=200);
virtual ~CStars();
vector S;
vector C;
int cc;
int Draw();
void Update(int t)
{
static int tt;
tt+=t;
if(tt>300)
{
tt-=300;
cc=(cc+1)%10;
}
}
};
#endif // !defined(AFX_STARS_H__49A36CEB_A981_443E_A031_373073A66214__INCLUDED_)