diff options
Diffstat (limited to 'io.cpp')
-rw-r--r-- | io.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -1,23 +0,0 @@ -static void -IO_WriteToStream(void *Address, uint64 FileSize, SDL_RWops *TestFile) -{ - uint64 Size_Written = SDL_RWwrite(TestFile, Address, 1, FileSize); - - if (Size_Written != FileSize) - Assert(0); -} - -static void -IO_ReadFromStream(void *Address, uint64 SizeToRead, SDL_RWops *File) -{ - int64 TotalBytesRead = 0; - uint8 *Address_Playhead = (uint8 *)Address; - while (TotalBytesRead < SizeToRead) { - uint64 BytesRead = SDL_RWread(File, Address, 1, (SizeToRead - TotalBytesRead)); - if (BytesRead == 0) - break; - TotalBytesRead += BytesRead; - Address_Playhead += BytesRead; - } - Assert(TotalBytesRead == SizeToRead); -} |