[ create a new paste ] login | about

Link: http://codepad.org/GMji2PXA    [ raw code | fork ]

C, pasted on Oct 30:
1
2
3
4
5
6
7
8
9
10
11
12
	RotateAngle += 5;
	RotateAngle %= 360;

	PlayerX -=
		(PlayerWidth/2) * cos((float)RotateAngle)
        + (PlayerHeight/2) * sin((float)RotateAngle);
	PlayerY -=
		(PlayerHeight/2) * cos((float)RotateAngle)
        - (PlayerWidth/2) * sin((float)RotateAngle); 

	dbRotateSprite (Handle,RotateAngle);
	dbSprite (Sprite,PlayerX,PlayerY,Handle);


Create a new paste based on this one


Comments: