Build viewer/editor #13

Manually merged
williamjcm merged 128 commits from mass-viewer into master 2022-03-02 14:50:10 +01:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 975f471a68 - Show all commits

View file

@ -45,6 +45,10 @@ auto BinaryReader::position() -> Long {
return _ftelli64(_file); return _ftelli64(_file);
} }
auto BinaryReader::seek(Long position) -> bool {
return _fseeki64(_file, position, SEEK_SET) == 0;
}
void BinaryReader::closeFile() { void BinaryReader::closeFile() {
std::fclose(_file); std::fclose(_file);
_file = nullptr; _file = nullptr;

View file

@ -36,6 +36,8 @@ class BinaryReader {
auto eof() -> bool; auto eof() -> bool;
auto position() -> Long; auto position() -> Long;
auto seek(Long position) -> bool;
void closeFile(); void closeFile();
auto readChar(char& value) -> bool; auto readChar(char& value) -> bool;