Example #1
0
void IEffectPainter::WriteToStream (IWriteStream *pStream)
	{
	CString sUNID = GetCreator()->GetUNIDString();
	sUNID.WriteToStream(pStream);

	CString sClass = GetCreator()->GetTag();
	sClass.WriteToStream(pStream);

	OnWriteToStream(pStream);
	}
Example #2
0
void CTextPainter::OnWriteToStream (IWriteStream *pStream)

//	OnWriteToStream
//
//	Writes to a stream
//
//	CString			m_sText

	{
	m_sText.WriteToStream(pStream);
	}
Example #3
0
void CEffectCreator::WritePainterToStream (IWriteStream *pStream, IEffectPainter *pPainter)

//	WritePainterToStream
//
//	Writes the painter to the stream (pPainter may be NULL)

	{
	if (pPainter)
		pPainter->WriteToStream(pStream);
	else
		{
		//	Write the UNID

		CString sNull;
		sNull.WriteToStream(pStream);

		//	Write the Class

		sNull.WriteToStream(pStream);
		}
	}
Example #4
0
void CTopologyNode::WriteToStream (IWriteStream *pStream)

//	WriteToStream
//
//	Writes out the variable portions of the node
//
//	CString		m_sID
//	DWORD		m_SystemUNID
//	DWORD		m_pMap (UNID)
//	DWORD		m_xPos
//	DWORD		m_yPos
//	CString		m_sName
//	DWORD		m_iLevel
//	DWORD		m_dwID
//
//	DWORD		No of named gates
//	CString		gate: sName
//	CString		gate: sDestNode
//	CString		gate: sDestEntryPoint
//
//	DWORD		No of variant labels
//	CString		variant label
//
//	CAttributeDataBlock	m_Data
//	DWORD		flags
//
//	CString		m_sEpitaph
//	CString		m_sEndGameReason

	{
	int i;
	DWORD dwSave;

	m_sID.WriteToStream(pStream);
	pStream->Write((char *)&m_SystemUNID, sizeof(DWORD));

	dwSave = (m_pMap ? m_pMap->GetUNID() : 0);
	pStream->Write((char *)&dwSave, sizeof(DWORD));

	pStream->Write((char *)&m_xPos, sizeof(DWORD));
	pStream->Write((char *)&m_yPos, sizeof(DWORD));
	m_sName.WriteToStream(pStream);
	pStream->Write((char *)&m_iLevel, sizeof(DWORD));
	pStream->Write((char *)&m_dwID, sizeof(DWORD));

	DWORD dwCount = m_NamedGates.GetCount();
	pStream->Write((char *)&dwCount, sizeof(DWORD));
	for (i = 0; i < (int)dwCount; i++)
		{
		StarGateDesc *pDesc = (StarGateDesc *)m_NamedGates.GetValue(i);
		CString sName = m_NamedGates.GetKey(i);
		sName.WriteToStream(pStream);
		pDesc->sDestNode.WriteToStream(pStream);
		pDesc->sDestEntryPoint.WriteToStream(pStream);
		}

	dwCount = m_VariantLabels.GetCount();
	pStream->Write((char *)&dwCount, sizeof(DWORD));
	for (i = 0; i < (int)dwCount; i++)
		m_VariantLabels[i].WriteToStream(pStream);

	//	Write opaque data

	m_Data.WriteToStream(pStream);

	//	Flags

	dwSave = 0;
	dwSave |= (m_bKnown ? 0x00000001 : 0);
	pStream->Write((char *)&dwSave, sizeof(DWORD));

	//	Write end game data

	m_sEpitaph.WriteToStream(pStream);
	m_sEndGameReason.WriteToStream(pStream);
	}