BVB Source Codes

CRYENGINE Show XMLCPB_BufferReader.cpp Source code

Return Download CRYENGINE: download XMLCPB_BufferReader.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /*************************************************************************
  4. *************************************************************************/
  5.  
  6. #include "StdAfx.h"
  7. #include "XMLCPB_BufferReader.h"
  8. #include "XMLCPB_Reader.h"
  9.  
  10. using namespace XMLCPB;
  11.  
  12. //////////////////////////////////////////////////////////////////////////
  13.  
  14. void SBufferReader::ReadFromFile(CReader& Reader, IPlatformOS::ISaveReaderPtr& pOSSaveReader, uint32 readSize)
  15. {
  16.         assert(m_bufferSize == 0);
  17.         assert(!m_pBuffer);
  18.  
  19.         m_pBuffer = (uint8*)m_pHeap->Malloc(readSize, "");
  20.  
  21.         m_bufferSize = readSize;
  22.  
  23.         Reader.ReadDataFromFile(pOSSaveReader, const_cast<uint8*>(GetPointer(0)), readSize);
  24. }
  25.  
  26. //////////////////////////////////////////////////////////////////////////
  27.  
  28. void SBufferReader::ReadFromMemory(CReader& Reader, const uint8* pData, uint32 dataSize, uint32 readSize, uint32& outReadLoc)
  29. {
  30.         assert(m_bufferSize == 0);
  31.         assert(!m_pBuffer);
  32.  
  33.         m_pBuffer = (uint8*)m_pHeap->Malloc(readSize, "");
  34.  
  35.         m_bufferSize = readSize;
  36.  
  37.         Reader.ReadDataFromMemory(pData, dataSize, const_cast<uint8*>(GetPointer(0)), readSize, outReadLoc);
  38. }
  39.  
downloadXMLCPB_BufferReader.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top