
1295.5. The Image Class
spriteData.flipHorizontal = flip;
}
// Flip image vertically
virtual void flipVertical(bool flip)
{
spriteData.flipVertical = flip;
}
Listing 5.24. e image’s ip functions.
e next three functions are explained in more detail in Section 5.7 later in this chapter.
Let’s go over them briey here just to complete the code in the
Image class.
• e update function receives the current frameTime as a parameter. e update
function is where all code that needs to be synchronized with elapsed time should
be placed. e update function sets which frame from the texture image should be
displayed, and it calls setRect to select the current ...