Files
itgmania212121/stepmania/src/CroppedSprite.h
T
2002-04-16 17:31:00 +00:00

44 lines
834 B
C++

/*
-----------------------------------------------------------------------------
File: CroppedSprite.h
Desc: The song's CroppedSprite displayed in SelectSong.
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
-----------------------------------------------------------------------------
*/
#ifndef _CroppedSprite_H_
#define _CroppedSprite_H_
#include "Sprite.h"
#include "Song.h"
class CroppedSprite : public Sprite
{
public:
CroppedSprite()
{
m_fCropWidth = m_fCropHeight = 100;
};
bool Load( CString sFilePath, DWORD dwHints = 0, bool bForceReload = false )
{
Sprite::Load( sFilePath, dwHints, bForceReload );
CropToSize( m_fCropWidth, m_fCropHeight );
return true;
}
void CropToSize( float fHeight, float fWidth );
protected:
float m_fCropWidth, m_fCropHeight;
};
#endif