This commit is contained in:
Daveo 2000-11-20 16:21:43 +00:00
parent 073550f4c7
commit 5bfc9fdcda
14 changed files with 220 additions and 73 deletions

View file

@ -186,4 +186,22 @@ int Height=GetHeight();
}
/*****************************************************************************/
void CMap::Resize(int Width,int Height)
{
CMap Old=*this;
int OldWidth=Old.GetWidth();
int OldHeight=Old.GetHeight();
int MinW=min(Width,OldWidth);
int MinH=min(Height,OldHeight);
Delete();
SetSize(Width,Height,TRUE);
for (int Y=0; Y<MinH; Y++)
{
for (int X=0; X<MinW; X++)
{
Set(X,Y,Old.Get(X,Y));
}
}
}