CDialogItemTemplate CDialogItemTemplate::GetNextItem() const
{
	// Get a pointer to the data
	const WORD* pw = GetDataPtr();
	// Skip all three data fields
	SkipData(pw); SkipData(pw); SkipExtraData(pw, m_bIsItemEx);

	// The next item template starts on the next DWORD boundary.
	const DLGITEMTEMPLATE* pItem = (const DLGITEMTEMPLATE*) AlignToDWORD(pw);
	return CDialogItemTemplate( m_rParent, pItem, m_bIsItemEx );
}
Beispiel #2
0
bool CMapReader::Read(FILE *fp)
{
	ReadHeader(fp);
	
	ReadTerrainCells(fp);
	
	if(CheckBlockEnd(0x00,fp) == false)
		return false;

	ReadQuadUVFaces(fp); SkipExtraData(800,18,fp);

	if(CheckBlockEnd(0x01,fp) == false)
		return false;

	ReadTriUVFaces(fp); SkipExtraData(800,16,fp);

	if(CheckBlockEnd(0x02,fp) == false)
		return false;

	ReadVertices(fp); SkipExtraData(2000,10,fp);

	if(CheckBlockEnd(0x03,fp) == false)
		return false;

	ReadTriFaces(fp); SkipExtraData(2000,32,fp);

	if(CheckBlockEnd(0x04,fp) == false)
		return false;

	ReadMeshes(fp); SkipExtraData(120,36,fp);

	if(CheckBlockEnd(0x05,fp) == false)
		return false;

	ReadBlockG(fp); SkipExtraData(4000,6,fp);

	if(CheckBlockEnd(0x06,fp) == false)
		return false;
	
	ReadBlockH(fp); SkipExtraData(10,32,fp);

	if(CheckBlockEnd(0x07,fp) == false)
		return false;

	ReadBlockI(fp); SkipExtraData(3500,16,fp);

	if(CheckBlockEnd(0x08,fp) == false)
		return false;

	ReadQuadFaces(fp); SkipExtraData(2000,40,fp);

	if(CheckBlockEnd(0x09,fp) == false)
		return false;

	ReadBlockK(fp); SkipExtraData(50,54,fp);

	if(CheckBlockEnd(0x0A,fp) == false)
		return false;

	ReadNavipoints(fp); SkipExtraData(50,36,fp);

	if(CheckBlockEnd(0x0B,fp) == false)
		return false;

	ReadBlockM(fp); SkipExtraData(50,36,fp);

	if(CheckBlockEnd(0x0C,fp) == false)
		return false;

	ReadBlockN(fp); SkipExtraData(1000,6,fp);

	if(CheckBlockEnd(0x0D,fp) == false)
		return false;

	ReadBlockO(fp); SkipExtraData(600,14,fp);

	if(CheckBlockEnd(0x0E,fp) == false)
		return false;

	ReadBlockP(fp);

	if(CheckBlockEnd(0x0F,fp) == false)
		return false;

	ReadBlockQ(fp);

	if(CheckBlockEnd(0x10,fp) == false)
		return false;

	ReadBlockR(fp);

	if(CheckBlockEnd(0x11,fp) == false)
		return false;

	return true;
}