Exemplo n.º 1
0
void Unit::display(){
	IwGxSetColStream(owner->getColors(), 4);
    renderImageWorldSpace(position, getAngle(), scale, spriteSize, game->getRotation(), curFrame, numFrames, 0.0f);

    //UNCOMMENT TO DRAW DEBUG PRIMITIVES. Yellow circle = Unit Sight. Blue circle = Unit bounding volume
    /*
    CIwMat pMat = CIwMat::g_Identity;
    pMat.SetTrans(CIwVec3(position.x, -position.y, 1));
    CIwMat rot = CIwMat::g_Identity;
    rot.SetRotZ(IW_ANGLE_FROM_RADIANS(game->getRotation()));

    IwGxDebugPrimCircle(pMat*rot, sight, 2,IwGxGetColFixed(IW_GX_COLOUR_YELLOW), false);
    IwGxDebugPrimCircle(pMat*rot, getSize()/2.0, 2,IwGxGetColFixed(IW_GX_COLOUR_BLUE), false);
     */
}
Exemplo n.º 2
0
void Icing::display() {
	
	CIwColour ownerCol = owner->getColor();
	
	CIwColour* colors = (CIwColour*)malloc(sizeof(CIwColour)*4);
	
	colors[0] = ownerCol;
	colors[1] = ownerCol;
	colors[2] = ownerCol;
	colors[3] = ownerCol;
	
	IwGxSetColStream(colors, 4);
		
	renderImageWorldSpace(position, angle, scale, 256, game->getRotation(), 0, 1, .2f);
	
	delete colors;
}
Exemplo n.º 3
0
void Icing::display() {
	IwGxSetColStream(owner->getColors(), 4);
	renderImageWorldSpace(position, angle, scale, 256, game->getRotation(), 0, 1, .2f);
}