88
99#include " LCE/filesystem/Filesystem.h"
1010#include " LCE/libLCE.h"
11- #include < BinaryIO/BinaryIO .h>
11+ #include < BinaryIO/BinaryBuffer .h>
1212#include < optional>
1313#include < string>
1414#include < variant>
@@ -49,14 +49,15 @@ namespace lce::save {
4949 public io::Serializable {
5050 protected:
5151 /* * Creates a save file with the contents of the given Filesystem */
52- SaveFileCommons (const Filesystem &fs, const bio::ByteOrder byteOrder,
52+ SaveFileCommons (const Filesystem &fs,
53+ const bio::util::ByteOrder byteOrder,
5354 const uint16_t origVersion = 11 ,
5455 const uint16_t version = 11 )
5556 : Filesystem(fs), mOriginalVersion (origVersion), mVersion (version),
5657 mByteOrder (byteOrder) {};
5758
5859 explicit SaveFileCommons (
59- const bio::ByteOrder byteOrder = bio::ByteOrder::LITTLE ,
60+ const bio::util:: ByteOrder byteOrder = bio::util ::ByteOrder::LITTLE ,
6061 const uint16_t origVersion = 11 , const uint16_t version = 11 )
6162 : mOriginalVersion(origVersion), mVersion(version),
6263 mByteOrder(byteOrder) {};
@@ -85,16 +86,16 @@ namespace lce::save {
8586 static SaveFileCommons *deserializeAuto (std::vector<uint8_t > &data);
8687
8788 /* * @returns The serialized save file's version */
88- static uint16_t
89- getVersionFromData ( std::vector<uint8_t > &data,
90- bio::ByteOrder byteOrder = bio::ByteOrder::LITTLE );
89+ static uint16_t getVersionFromData (
90+ std::vector<uint8_t > &data,
91+ bio::util:: ByteOrder byteOrder = bio::util ::ByteOrder::LITTLE );
9192
9293 /* * @returns The save file's original version */
9394 [[nodiscard]] uint16_t getOriginalVersion () const ;
9495 /* * @returns The save file's version */
9596 [[nodiscard]] uint16_t getVersion () const ;
9697 /* * @returns The save file's byte order (endianness) */
97- [[nodiscard]] bio::ByteOrder getByteOrder () const ;
98+ [[nodiscard]] bio::util:: ByteOrder getByteOrder () const ;
9899 /* * Sets the save file's original version */
99100 void setOriginalVersion (uint16_t version);
100101 /* * Sets the save file's version
@@ -104,7 +105,7 @@ namespace lce::save {
104105 */
105106 void setVersion (uint16_t version);
106107 /* * Sets the save file's byte order (endianness) */
107- void setEndian (bio::ByteOrder byteOrder);
108+ void setEndian (bio::util:: ByteOrder byteOrder);
108109
109110 /* * Migrates the current save file to the chosen version should there be
110111 * any differences */
@@ -114,7 +115,7 @@ namespace lce::save {
114115 *
115116 * @returns The save file's byte order (endianness)
116117 */
117- static bio::ByteOrder detectByteOrder (std::vector<uint8_t > data);
118+ static bio::util:: ByteOrder detectByteOrder (std::vector<uint8_t > data);
118119
119120 friend std::wostream &operator <<(std::wostream &wos,
120121 const SaveFileCommons &f) {
@@ -137,7 +138,7 @@ namespace lce::save {
137138 // NOTE: this could be wrong name
138139 uint16_t mOriginalVersion ;
139140 uint16_t mVersion ;
140- bio::ByteOrder mByteOrder ;
141+ bio::util:: ByteOrder mByteOrder ;
141142 };
142143} // namespace lce::save
143144
0 commit comments