1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
void MyApp::updateGame(float fElapsedTime)
{
SDL_Color blue = {0,0,255};
SDL_Color black = { 0, 0, 0};
if(pCanvas->clearCanvas())
{
pCanvas->printText(blue, black, "Using Sprites", solid);
pCanvas->drawSprite( pSprite, 100, 400 );
pCanvas->drawSprite( pSprite, 100, 300 );
pCanvas->drawSprite( pSprite, 200, 300 );
pCanvas->drawSprite( pSprite, 100, 200 );
pCanvas->drawSprite( pSprite, 200, 200 );
pCanvas->drawSprite( pSprite, 300, 200 );
pCanvas->drawSprite( pSprite, 100, 100 );
pCanvas->drawSprite( pSprite, 200, 100 );
pCanvas->drawSprite( pSprite, 300, 100 );
pCanvas->drawSprite( pSprite, 400, 100 );
pCanvas->flipCanvas();
}
}
| |