December 2002
Intermediate to advanced
648 pages
19h 53m
English
The cSpriteComposite holds an array of cSprite pointers called _childspriteptr. The default cSpriteComposite::draw behavior is to walk the array and call draw for each of the child sprites.
for (int i=0; i< _childspriteptr.GetSize(); i++)
_childspriteptr[i]->draw(pgraphics, drawflags); We can make some nice shapes this way. We’ll consider two examples in this section: the cSpriteBubble and the cPolyPolygon.
The PickNPoP game viewed in OpenGL 3D. On the left are cSpriteBubble and cSpriteBubbleGrayScale, on the right are cSpriteBubblePie

The cSpriteBubble consists of a disk with a rectangular highlight ...
Read now
Unlock full access