OpenTTD Source 20250312-master-gcdcc6b491d
|
Yes, simply reading from a file. More...
Public Member Functions | |
FileReader (FileHandle &&file) | |
Create the file reader, so it reads from a specific file. | |
~FileReader () | |
Make sure everything is cleaned up. | |
size_t | Read (uint8_t *buf, size_t size) override |
Read a given number of bytes from the savegame. | |
void | Reset () override |
Reset this filter to read from the beginning of the file. | |
![]() | |
LoadFilter (std::shared_ptr< LoadFilter > chain) | |
Initialise this filter. | |
virtual | ~LoadFilter ()=default |
Make sure the writers are properly closed. | |
Data Fields | |
std::optional< FileHandle > | file |
The file to read from. | |
long | begin |
The begin of the file. | |
![]() | |
std::shared_ptr< LoadFilter > | chain |
Chained to the (savegame) filters. | |
Yes, simply reading from a file.
Definition at line 2309 of file saveload.cpp.
|
inline |
Create the file reader, so it reads from a specific file.
file | The file to read from. |
Definition at line 2317 of file saveload.cpp.
|
inline |
Make sure everything is cleaned up.
Definition at line 2322 of file saveload.cpp.
References _game_session_stats, begin, and GameSessionStats::savegame_size.
|
inlineoverridevirtual |
Read a given number of bytes from the savegame.
buf | The bytes to read. |
len | The number of bytes to read. |
Implements LoadFilter.
Definition at line 2329 of file saveload.cpp.
|
inlineoverridevirtual |
Reset this filter to read from the beginning of the file.
Reimplemented from LoadFilter.
Definition at line 2337 of file saveload.cpp.
References Debug.
long FileReader::begin |
std::optional<FileHandle> FileReader::file |
The file to read from.
Definition at line 2310 of file saveload.cpp.