/*****************/ /*** Map Stuph ***/ /*****************/ #include "stdafx.h" //#include "gl3d.h" #include #include #include #include #include "Map.h" /*****************************************************************************/ void CMap::Load(CFile *File,float Version) { // Version 1 int Width; int Height; File->Read(&Width,sizeof(int)); File->Read(&Height,sizeof(int)); Delete(); SetSize(Width,Height); for (int Y=0;YRead(&ThisElem,sizeof(sMapElem)); Set(X,Y,ThisElem,TRUE); } } } /*****************************************************************************/ void CMap::Save(CFile *File) { int Width=GetWidth(); int Height=GetHeight(); File->Write(&Width,sizeof(int)); File->Write(&Height,sizeof(int)); for (int Y=0;YWrite(&ThisElem,sizeof(sMapElem)); } } } /*****************************************************************************/ void CMap::SetSize(int Width,int Height,BOOL ClearFlag) { Map.resize(Width); for (int i=0;i=0 && X=0 && Y