Athena IO Library
ALTTPFileWriter.hpp
1 #ifndef ALTTP_FILE_WRITER_HPP
2 #define ALTTP_FILE_WRITER_HPP
3 
4 #include <string>
5 #include "athena/MemoryWriter.hpp"
6 #include "athena/ALTTPQuest.hpp"
7 
8 namespace athena
9 {
10 class ALTTPFile;
11 
12 namespace io
13 {
22 {
23  MEMORYCOPYWRITER_BASE();
24 
25 public:
31  ALTTPFileWriter(atUint8*, atUint64);
32 
37  ALTTPFileWriter(const std::string&);
38 
43  void writeFile(ALTTPFile* file);
44 
45 private:
46  void writeRoomFlags(ALTTPRoomFlags*);
47  void writeOverworldEvent(ALTTPOverworldEvent*);
48  void writeDungeonItems(ALTTPDungeonItemFlags);
49  atUint16 calculateChecksum(atUint32 game);
50 };
51 
52 } // io
53 } // zelda
54 
55 #endif // ALTTP_FILE_WRITER_HPP
ALTTPFileWriter(atUint8 *, atUint64)
This constructor takes an existing buffer to write to.
A Link to the Past data container class class.
Definition: ALTTPFile.hpp:18
A Link to the Past save data writer class.
void writeFile(ALTTPFile *file)
Writes the given SRAM data to a file on disk.