This commit is contained in:
parent
073550f4c7
commit
5bfc9fdcda
14 changed files with 220 additions and 73 deletions
|
@ -25,13 +25,16 @@
|
|||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
// New Layer
|
||||
CLayerTile::CLayerTile(char *_Name,int Width,int Height,float ZDiv,BOOL Is3d)
|
||||
CLayerTile::CLayerTile(char *_Name,int Width,int Height,float MapDiv,float ZDiv,BOOL Is3d,BOOL Resizable)
|
||||
{
|
||||
SetName(_Name);
|
||||
Map.SetSize(Width,Height,TRUE);
|
||||
ZPosDiv=ZDiv;
|
||||
MapSizeDiv=MapDiv;
|
||||
ResizeFlag=Resizable;
|
||||
Render3dFlag=Is3d;
|
||||
Mode=MouseModePaint;
|
||||
|
||||
Map.SetSize(Width/MapDiv,Height/MapDiv,TRUE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -46,6 +49,14 @@ CLayerTile::~CLayerTile()
|
|||
{
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerTile::Resize(int Width,int Height)
|
||||
{
|
||||
if (!ResizeFlag) return; // Its a fixed size, so DONT DO IT!
|
||||
|
||||
Map.Resize(Width/MapSizeDiv,Height/MapSizeDiv);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -476,8 +487,6 @@ BOOL CLayerTile::Paint(CMap &Blk,CPoint &CursorPos)
|
|||
if (CursorPos.y==-1 || CursorPos.y==-1) return(FALSE); // Off Map?
|
||||
if (!Blk.IsValid()) return(FALSE); // Invalid tile?
|
||||
|
||||
// Tile.Flags=Flag;
|
||||
|
||||
Map.Set(CursorPos.x,CursorPos.y,Blk);
|
||||
|
||||
return(TRUE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue