mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 22:04:41 -04:00
fixed TBoxFlageManager::CopyFromSave - sceneIdx is signed
This commit is contained in:
@@ -4106,7 +4106,7 @@ doCommit__15TBoxFlagManagerFv = .text:0x800BE810; // type:function size:0x58
|
||||
checkUncommittedFlag__15TBoxFlagManagerFUs = .text:0x800BE870; // type:function size:0x68
|
||||
__ct__15TBoxFlagManagerFv = .text:0x800BE8E0; // type:function size:0x40
|
||||
init__15TBoxFlagManagerFv = .text:0x800BE920; // type:function size:0x4
|
||||
copyFromSave__15TBoxFlagManagerFUs = .text:0x800BE930; // type:function size:0x5C
|
||||
copyFromSave__15TBoxFlagManagerFs = .text:0x800BE930; // type:function size:0x5C
|
||||
checkFlag__15TBoxFlagManagerFUsUs = .text:0x800BE990; // type:function size:0x94
|
||||
getFlagCount__15TBoxFlagManagerCFv = .text:0x800BEA30; // type:function size:0x8
|
||||
setFlag__15TBoxFlagManagerFUs = .text:0x800BEA40; // type:function size:0x80
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <toBeSorted/file_manager.h>
|
||||
#include <toBeSorted/flag_space.h>
|
||||
|
||||
|
||||
class CommittableFlagManager {
|
||||
public:
|
||||
bool mNeedsCommit;
|
||||
@@ -47,7 +46,7 @@ public:
|
||||
TBoxFlagManager();
|
||||
virtual ~TBoxFlagManager() {}
|
||||
void init();
|
||||
void copyFromSave(u16 sceneIndex);
|
||||
void copyFromSave(s16 sceneIndex);
|
||||
bool checkFlag(u16 sceneIndex, u16 flag);
|
||||
virtual u16 getFlagCount() const;
|
||||
void setFlag(u16 flag);
|
||||
@@ -76,11 +75,11 @@ TBoxFlagManager::TBoxFlagManager() : CommittableFlagManager(false), mFlagSpace(s
|
||||
|
||||
void TBoxFlagManager::init() {}
|
||||
|
||||
void TBoxFlagManager::copyFromSave(u16 sceneIndex) {
|
||||
// mr should be a clrlwi
|
||||
mSceneIndex = sceneIndex;
|
||||
void TBoxFlagManager::copyFromSave(s16 sceneIndex) {
|
||||
u16 idx = sceneIndex;
|
||||
mSceneIndex = idx;
|
||||
u16 *flags = FileManager::getInstance()->getTBoxFlagsConst();
|
||||
mFlagSpace.copyFromSaveFile2(flags + (sceneIndex * 2), 0, 2);
|
||||
mFlagSpace.copyFromSaveFile2(flags + (idx * 2), 0, 2);
|
||||
}
|
||||
|
||||
bool TBoxFlagManager::checkFlag(u16 sceneIndex, u16 flag) {
|
||||
@@ -144,9 +143,8 @@ bool EnemyDefeatManager::checkUncommittedFlag(u16 flag) {
|
||||
}
|
||||
}
|
||||
|
||||
EnemyDefeatManager::EnemyDefeatManager() : CommittableFlagManager(false), mFlagSpace(sEnemyDefeatFlags, ARRAY_LENGTH(sEnemyDefeatFlags)) {
|
||||
|
||||
}
|
||||
EnemyDefeatManager::EnemyDefeatManager()
|
||||
: CommittableFlagManager(false), mFlagSpace(sEnemyDefeatFlags, ARRAY_LENGTH(sEnemyDefeatFlags)) {}
|
||||
|
||||
void EnemyDefeatManager::init() {
|
||||
mSceneIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user