|
OpenTTD Source
1.10.0-RC1
|
Container for dumping the savegame (quickly) to memory. More...
Public Member Functions | |
| MemoryDumper () | |
| Initialise our variables. More... | |
| void | WriteByte (byte b) |
| Write a single byte into the dumper. More... | |
| void | Flush (SaveFilter *writer) |
| Flush this dumper into a writer. More... | |
| size_t | GetSize () const |
| Get the size of the memory dump made so far. More... | |
Data Fields | |
| std::vector< byte * > | blocks |
| Buffer with blocks of allocated memory. | |
| byte * | buf |
| Buffer we're going to write to. | |
| byte * | bufe |
| End of the buffer we write to. | |
Container for dumping the savegame (quickly) to memory.
Definition at line 126 of file saveload.cpp.
|
inline |
|
inline |
Flush this dumper into a writer.
| writer | The filter we want to use. |
Definition at line 163 of file saveload.cpp.
References SaveFilter::Finish(), ReadBuffer::GetSize(), min(), and SaveFilter::Write().
|
inline |
Get the size of the memory dump made so far.
Definition at line 182 of file saveload.cpp.
References ReadBuffer::buf.
|
inline |
Write a single byte into the dumper.
| b | The byte to write. |
Definition at line 147 of file saveload.cpp.
References MEMORY_CHUNK_SIZE.
Referenced by SlWriteByte().