mirror of
https://github.com/zeldaret/ss
synced 2026-06-02 18:18:38 -04:00
start misc flag managers and update wibo
This commit is contained in:
Vendored
+2
-1
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"clangd.fallbackFlags": [
|
||||
"-I${workspaceFolder}/include"
|
||||
"-I${workspaceFolder}/include",
|
||||
"-I${workspaceFolder}/include/lib",
|
||||
]
|
||||
}
|
||||
@@ -44,6 +44,9 @@ toBeSorted/sceneflag_manager.cpp:
|
||||
.sbss start:0x805753E0 end:0x805753F0
|
||||
.bss start:0x805A78D0 end:0x805A7AD8
|
||||
|
||||
toBeSorted/misc_flag_managers.cpp:
|
||||
.text start:0x800BE7B0 end:0x800BEE00
|
||||
|
||||
toBeSorted/flag_space.cpp:
|
||||
.text start:0x800BEE00 end:0x800BEF90
|
||||
.data start:0x80510D04 end:0x80510D10
|
||||
|
||||
+10
-10
@@ -284,7 +284,7 @@ fn_8000A730 = .text:0x8000A730; // type:function size:0x58
|
||||
fn_8000A790 = .text:0x8000A790; // type:function size:0x58
|
||||
fn_8000A7F0 = .text:0x8000A7F0; // type:function size:0x58
|
||||
setSceneflags__11FileManagerFPUsUiUs = .text:0x8000A850; // type:function size:0x58
|
||||
fn_8000A8B0 = .text:0x8000A8B0; // type:function size:0x58
|
||||
setTBoxFlags__11FileManagerFPUsUiUs = .text:0x8000A8B0; // type:function size:0x58
|
||||
setTempflags__11FileManagerFPUsUsUs = .text:0x8000A910; // type:function size:0x58
|
||||
setZoneflags__11FileManagerFPUsUsUs = .text:0x8000A970; // type:function size:0x58
|
||||
fn_8000A9D0 = .text:0x8000A9D0; // type:function size:0x58
|
||||
@@ -4101,15 +4101,15 @@ unsetFlag__16SceneflagManagerFUsUs = .text:0x800BE490; // type:function size:0x7
|
||||
unsetSceneflagGlobal__16SceneflagManagerFUsUs = .text:0x800BE500; // type:function size:0xE0
|
||||
unsetTempOrSceneflag__16SceneflagManagerFUs = .text:0x800BE5E0; // type:function size:0x100
|
||||
doCommit__16SceneflagManagerFv = .text:0x800BE6E0; // type:function size:0xC8
|
||||
fn_800BE7B0 = .text:0x800BE7B0; // type:function size:0x58
|
||||
fn_800BE810 = .text:0x800BE810; // type:function size:0x58
|
||||
fn_800BE870 = .text:0x800BE870; // type:function size:0x68
|
||||
fn_800BE8E0 = .text:0x800BE8E0; // type:function size:0x40
|
||||
fn_800BE920 = .text:0x800BE920; // type:function size:0x4
|
||||
fn_800BE930 = .text:0x800BE930; // type:function size:0x5C
|
||||
fn_800BE990 = .text:0x800BE990; // type:function size:0x94
|
||||
fn_800BEA30 = .text:0x800BEA30; // type:function size:0x8
|
||||
fn_800BEA40 = .text:0x800BEA40; // type:function size:0x80
|
||||
commitIfNecessary__22CommittableFlagManagerFv = .text:0x800BE7B0; // type:function size:0x58
|
||||
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
|
||||
checkFlag__15TBoxFlagManagerFUsUs = .text:0x800BE990; // type:function size:0x94
|
||||
getFlagCount__15TBoxFlagManagerCFv = .text:0x800BEA30; // type:function size:0x8
|
||||
setFlag__15TBoxFlagManagerFUs = .text:0x800BEA40; // type:function size:0x80
|
||||
fn_800BEAC0 = .text:0x800BEAC0; // type:function size:0x40
|
||||
fn_800BEB00 = .text:0x800BEB00; // type:function size:0x7C
|
||||
fn_800BEB80 = .text:0x800BEB80; // type:function size:0x38
|
||||
|
||||
+2
-1
@@ -122,7 +122,7 @@ if not is_windows():
|
||||
config.compilers_tag = "1"
|
||||
config.dtk_tag = "v0.5.5"
|
||||
config.sjiswrap_tag = "v1.1.1"
|
||||
config.wibo_tag = "0.5.1"
|
||||
config.wibo_tag = "0.6.3"
|
||||
|
||||
# Project
|
||||
config.config_path = Path("config") / config.version / "config.yml"
|
||||
@@ -248,6 +248,7 @@ config.libs = [
|
||||
Object(Matching, "toBeSorted/bitwise_flag_helper.cpp"),
|
||||
Object(Matching, "toBeSorted/sceneflag_manager.cpp"),
|
||||
Object(NonMatching, "toBeSorted/flag_space.cpp"),
|
||||
Object(NonMatching, "toBeSorted/misc_flag_managers.cpp"),
|
||||
Object(Matching, "d/d_base.cpp"),
|
||||
Object(NonMatching, "d/a/d_a_base.cpp"),
|
||||
Object(NonMatching,"d/a/obj/d_a_obj_base.cpp"),
|
||||
|
||||
@@ -11,9 +11,11 @@ struct FileManager {
|
||||
u16* getSceneflags2();
|
||||
u16* getTempflags2();
|
||||
u16* getZoneflags2();
|
||||
u16* getTBoxFlags2();
|
||||
void setTempflags(u16*, u16, u16);
|
||||
void setZoneflags(u16*, u16, u16);
|
||||
void setSceneflags(u16*, u32, u16);
|
||||
void setTBoxFlags(u16*, u32, u16);
|
||||
static FileManager* getInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
#include <types.h>
|
||||
#include <toBeSorted/flag_space.h>
|
||||
#include <toBeSorted/file_manager.h>
|
||||
#include <toBeSorted/bitwise_flag_helper.h>
|
||||
|
||||
class CommittableFlagManager {
|
||||
public:
|
||||
bool mNeedsCommit;
|
||||
|
||||
virtual void doCommit() = 0;
|
||||
bool commitIfNecessary();
|
||||
void setNeedsCommit(bool commit) {
|
||||
mNeedsCommit = commit;
|
||||
}
|
||||
// CommittableFlagManager(bool commit) {
|
||||
// mNeedsCommit = commit;
|
||||
// }
|
||||
};
|
||||
|
||||
bool CommittableFlagManager::commitIfNecessary() {
|
||||
if (mNeedsCommit) {
|
||||
doCommit();
|
||||
mNeedsCommit = false;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class TBoxFlagManager: public CommittableFlagManager {
|
||||
// class TBoxFlagManager {
|
||||
// bool mNeedsCommit;
|
||||
// u32 pad;
|
||||
FlagSpace mFlagSpace;
|
||||
u16 mSceneIndex;
|
||||
BitwiseFlagHelper mFlagHelper;
|
||||
|
||||
static u16* sFlags;
|
||||
public:
|
||||
virtual void doCommit();
|
||||
bool checkUncommittedFlag(u16 flag);
|
||||
TBoxFlagManager();
|
||||
virtual ~TBoxFlagManager() {}
|
||||
void init();
|
||||
void copyFromSave(u16 sceneIndex);
|
||||
bool checkFlag(u16 sceneIndex, u16 flag);
|
||||
virtual s32 getFlagCount() const;
|
||||
void setFlag(u16 flag);
|
||||
bool checkUncommittedFlag(u16 sceneIndex, u16 flag);
|
||||
};
|
||||
|
||||
void TBoxFlagManager::doCommit() {
|
||||
if (mSceneIndex != 0xFFFF) {
|
||||
FileManager::getInstance()->setTBoxFlags(mFlagSpace.getFlagPtrUnchecked(), mSceneIndex * 2, 2);
|
||||
}
|
||||
}
|
||||
|
||||
bool TBoxFlagManager::checkUncommittedFlag(u16 flag) {
|
||||
return mFlagHelper.checkFlag(flag / 16, flag % 16, mFlagSpace.getFlagPtrUnchecked(), mFlagSpace.mCount);
|
||||
}
|
||||
|
||||
TBoxFlagManager::TBoxFlagManager(): mFlagSpace(sFlags, 2) {
|
||||
mSceneIndex = 0xFFFF;
|
||||
}
|
||||
|
||||
void TBoxFlagManager::init() {}
|
||||
|
||||
void TBoxFlagManager::copyFromSave(u16 sceneIndex) {
|
||||
mSceneIndex = sceneIndex;
|
||||
u16* flags = FileManager::getInstance()->getTBoxFlags2();
|
||||
mFlagSpace.copyFromSaveFile2(flags + sceneIndex * 2, 0, 2);
|
||||
}
|
||||
|
||||
bool TBoxFlagManager::checkFlag(u16 sceneIndex, u16 flag) {
|
||||
s32 actualFlag = sceneIndex * 0x20 + flag;
|
||||
return mFlagHelper.checkFlag(actualFlag % 16, actualFlag / 16, FileManager::getInstance()->getTBoxFlags2(), getFlagCount());
|
||||
}
|
||||
|
||||
s32 TBoxFlagManager::getFlagCount() const {
|
||||
return 0x200;
|
||||
}
|
||||
|
||||
void TBoxFlagManager::setFlag(u16 flag) {
|
||||
|
||||
}
|
||||
+1
-1
@@ -99,7 +99,7 @@ class Object:
|
||||
"add_to_all": True,
|
||||
"cflags": None,
|
||||
"mw_version": None,
|
||||
"shiftjis": False, # NOTE: This was defaulted to True -> caused it to not build in wsl?
|
||||
"shiftjis": True,
|
||||
"source": name,
|
||||
}
|
||||
self.options.update(options)
|
||||
|
||||
Reference in New Issue
Block a user