giga-refactor, part 1
work on loading - NOT WORKING
This commit is contained in:
parent
dc0eda0445
commit
94044ef210
3 changed files with 868 additions and 596 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include "engine.h"
|
||||
#include "../ta-log.h"
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <chrono>
|
||||
|
||||
static DivCompatFlags defaultFlags;
|
||||
|
|
@ -952,6 +953,23 @@ bool DivCompatFlags::areDefaults() {
|
|||
return (*this==defaultFlags);
|
||||
}
|
||||
|
||||
bool DivCompatFlags::readData(SafeReader& reader) {
|
||||
DivConfig c;
|
||||
unsigned char magic[4];
|
||||
|
||||
reader.read(magic,4);
|
||||
if (memcmp(magic,"CFLG",4)!=0) {
|
||||
return false;
|
||||
}
|
||||
reader.readI();
|
||||
|
||||
String data=reader.readString();
|
||||
c.loadFromMemory(data.c_str());
|
||||
|
||||
// TODO: this
|
||||
return true;
|
||||
}
|
||||
|
||||
#define CHECK_AND_STORE_BOOL(_x) \
|
||||
if (_x!=defaultFlags._x) { \
|
||||
c.set(#_x,_x); \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue