Пример #1
0
bool Player::getTexture(size_t textureNumber, TextureInfo& ti) const
{
	switch (textureNumber)
	{
	case 0:
		return getCurrentTexture(ti);
	default:
		return false;
	}
}
Пример #2
0
void DirectionSprite::render(void)
{
    Texture *tx = getCurrentTexture();

    //todo refactor this to use point inheritance
    SDL_Rect *src = getSDLRect();
    SDL_Rect *dst = getSDLRect();

    src->x = 0;
    src->y = 0;

    tx->renderCopy(src, dst);

    delete src;
    delete dst;

    //tick++;
}