gtkradiant/contrib/pk3man/memfile.cpp
mattn caabb8dceb * added pk3man and fixed it to compile for latest radiant
* NOTE: Not included in the build chain - doesn't link
* NOTE: iepair.h is not used at the moment


git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@225 8a3a26a2-13c4-0310-b231-cf6edde360e5
2008-03-18 17:11:08 +00:00

36 lines
596 B
C++

// MemFile.cpp: implementation of the CMemFile class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "memfile.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMemFile::CMemFile()
{
data=NULL;
ptr=NULL;
end=NULL;
}
CMemFile::CMemFile(char *block,long len)
{
data=block;
ptr=block;
end=block+len;
}
CMemFile::~CMemFile()
{
}
void CMemFile::Read(void *to,long size)
{
memcpy(to,ptr,size);
ptr+=size;
}