24.4. Graphics in the Pop Framework

The data about the state of the game and its critters lives inside the CGame object in the CPopDoc. The individual CPopView is responsible for getting graphic onscreen representations of the sprite objects associated with the game’s critters.

We allow the different views to use different kinds of graphics and to look at the world from different viewpoints. To this end, there are two key members of the CPopView class.

cGraphics *_pgraphics; 
cCritterViewer *_pviewpointcritter; 

Before continuing, let’s redraw our Pop Framework UML class diagram another time (see Figure 24.6). In redrawing a UML diagram, you might think of the classes as little pieces of wood connected by strings, with the strings being the ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.