www.pudn.com > MyGame.rar > Ast.cpp


// Ast.cpp: implementation of the CAst class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#include "stdafx.h" 
#include "MyGame.h" 
#include "Ast.h" 
 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char THIS_FILE[]=__FILE__; 
#define new DEBUG_NEW 
#endif 
 
////////////////////////////////////////////////////////////////////// 
// Construction/Destruction 
////////////////////////////////////////////////////////////////////// 
 
CAst::CAst() 
{ 
	size=1; 
} 
 
CAst::~CAst() 
{ 
 
} 
 
 
int CAst::Draw() 
{ 
	glPushMatrix(); 
	glDisable(GL_LIGHTING); 
	glTranslate(p); 
	glRotatef(angle,0,0,1); 
	glScalef(size,size,size); 
	glBegin(GL_LINE_LOOP); 
	glColor3f((GLfloat).7,(GLfloat).6,(GLfloat).6); 
	glVertex3f( 1.0, 1.0,0); 
	glVertex3f(-1.0, 1.0,0); 
	glVertex3f(-1.0,-1.0,0); 
	glVertex3f( 1.0,-1.0,0); 
	glEnd(); 
	glEnable(GL_LIGHTING); 
	glPopMatrix(); 
	return 4; 
} 
 
void CAst::Hit(CBullet *b, list &AL, list &OL) 
{ 
 
}