Exemplo n.º 1
0
Sprite::Sprite(const Sprite& ref)
{
	if(mImageAlloc)
		delete mFullImage;
	*this = ref;
	TheDisplay.CreateSurfaceFromSurface(&mFullImage, ref.mFullImage);
	mFullImage->SetColorKey(0xFF00FF);
	mSurf = mFullImage->GetDDrawSurface();
	mImageAlloc = true;
}
Exemplo n.º 2
0
bool Sprite::InitializeSpriteCopy(const Sprite* ref)
{
	if(!ref)
		return false;

	if(mImageAlloc)
		delete mFullImage;
	*this = *ref;
	TheDisplay.CreateSurfaceFromSurface(&mFullImage, ref->mFullImage);
	mFullImage->SetColorKey(0xFF00FF);
	mSurf = mFullImage->GetDDrawSurface();
	mImageAlloc = true;
	
	return true;
}