Files
itgmania212121/stepmania/src/CroppedSprite.h
T

50 lines
1.0 KiB
C++
Raw Normal View History

2002-04-16 17:31:00 +00:00
/*
-----------------------------------------------------------------------------
File: CroppedSprite.h
Desc: The song's CroppedSprite displayed in SelectSong.
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-04-16 17:31:00 +00:00
-----------------------------------------------------------------------------
*/
#ifndef _CroppedSprite_H_
#define _CroppedSprite_H_
#include "Sprite.h"
#include "Song.h"
class CroppedSprite : public Sprite
{
public:
CroppedSprite()
{
m_fCropWidth = m_fCropHeight = 100;
};
2002-05-19 01:59:48 +00:00
bool Load( CString sFilePath, bool bForceReload = false, int iMipMaps = 4, int iAlphaBits = 4, bool bDither = false, bool bStretch = false )
2002-04-16 17:31:00 +00:00
{
2002-05-19 01:59:48 +00:00
Sprite::Load( sFilePath, bForceReload, iMipMaps, iAlphaBits, bDither, bStretch );
2002-04-16 17:31:00 +00:00
CropToSize( m_fCropWidth, m_fCropHeight );
return true;
}
2002-05-01 19:14:55 +00:00
void SetCroppedSize( float fWidth, float fHeight )
{
m_fCropWidth = fWidth;
m_fCropHeight = fHeight;
}
2002-04-16 17:31:00 +00:00
protected:
2002-05-01 19:14:55 +00:00
void CropToSize( float fWidth, float fHeight );
2002-04-16 17:31:00 +00:00
float m_fCropWidth, m_fCropHeight;
};
#endif