1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "common.h"
#include "d/flag/flag_managers.h"
#include "d/flag/flag_space.h"
#include "toBeSorted/file_manager.h"
u16 *FlagSpace::getFlagPtrChecked() const {
filemanagerCheck();
return mpFlags;
}
u16 *FlagSpace::getFlagPtrUnchecked() const {
return mpFlags;
}
void FlagSpace::unsetAll() {
setAllToZero(0, mCount);
}
void FlagSpace::setAllToZero(u16 offset, u16 flagCount) {
filemanagerCheck();
memset(mpFlags + offset, 0, (u16)(flagCount * 2));
}
void FlagSpace::copyFromSaveFile2(const u16 *pSaved, u16 offset, u16 flagCount) {
filemanagerCheck();
checkedMemcpy(mpFlags + offset, (u16)(mCount * 2), pSaved, (u16)(flagCount * 2));
}
void FlagSpace::copyFromSaveFile(const u16 *pSaved, u16 offset, u16 flagCount) {
checkedMemcpy(mpFlags + offset, (u16)(mCount * 2), pSaved, (u16)(flagCount * 2));
}
void FlagSpace::filemanagerCheck() const {
if (FileManager::GetInstance()->mIsFileUnk1[0]) {
return;
}
while (true) {}
}
|