/* Put a line of text into file. */ void CTStream::PutLine_t(const char *strBuffer) // throws char * { // check parameters ASSERT(strBuffer!=NULL); // check that the stream is writteable ASSERT(IsWriteable()); // get string length INDEX iStringLength = strlen(strBuffer); // put line into stream Write_t(strBuffer, iStringLength); // write "\r\n" into stream Write_t("\r\n", 2); }
void CPlayerCharacter::Save_t( const CTFileName &fnFile) // throw char * { CTFileStream strm; strm.Create_t(fnFile); Write_t(&strm); strm.Close(); }
void CTStream::PutString_t(const char *strString) // throw char * { // check parameters ASSERT(strString!=NULL); // check that the stream is writteable ASSERT(IsWriteable()); // get string length INDEX iStringLength = strlen(strString); // put line into stream for( INDEX iLetter=0; iLetter<iStringLength; iLetter++) { if (*strString=='\n') { // write "\r\n" into stream Write_t("\r\n", 2); strString++; } else { Write_t(strString++, 1); } } }
/* * Save entire world (both brushes current state). */ void CWorld::Save_t(const CTFileName &fnmWorld) // throw char * { // create the file CTFileStream strmFile; strmFile.Create_t(fnmWorld); // save engine build _pNetwork->WriteVersion_t(strmFile); // write the world to the file Write_t(&strmFile); }
void CTStream::WriteRawChunk_t(void *pvBuffer, SLONG slSize) // throws char * { Write_t( (char *)pvBuffer, slSize); }
void CTStream::WriteSize_t(SLONG slSize) // throws char * { Write_t( (char *)&slSize, sizeof( SLONG)); }
void CTStream::WriteID_t(const CChunkID &cidSave) // throws char * { Write_t( &cidSave.cid_ID[0], CID_LENGTH); }