Merge remote-tracking branch 'origin/main' into randomizer

# Conflicts:
#	src/f_op/f_op_actor_mng.cpp
This commit is contained in:
CraftyBoss
2026-05-24 03:40:08 -07:00
25 changed files with 167 additions and 81 deletions
+6
View File
@@ -4005,7 +4005,13 @@ int daAlink_c::procWolfHowlDemoInit() {
} else if (name == fpcNm_Tag_WaraHowl_e) {
mZ2WolfHowlMgr.setCorrectCurve(static_cast<daTagWrHowl_c*>(field_0x27f4)->getTuneId());
} else {
#if TARGET_PC
if (mZ2WolfHowlMgr.getCorrectCurveID() != 9) {
mZ2WolfHowlMgr.setCorrectCurve(-1);
}
#else
mZ2WolfHowlMgr.setCorrectCurve(-1);
#endif
}
} else {
#if TARGET_PC
+5
View File
@@ -324,6 +324,11 @@ int daItem_c::_daItem_create() {
m_itemNo = daItem_prm::getItemNo(this);
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(m_itemNo)) {
return cPhs_ERROR_e;
}
#endif
BOOL flag = dItem_data::chkFlag(m_itemNo, 2);
#if DEBUG
+7
View File
@@ -525,7 +525,14 @@ bool validate_writable_data_path(const std::filesystem::path& path, std::string*
try {
io::FileStream::WriteAllText(probePath, "dusk");
} catch (const std::exception& e) {
#if defined(__ANDROID__)
set_error(errorOut,
fmt::format("{} could not write to the selected folder. On Android, allow "
"\"All files access\" for Dusklight and try again.",
AppName));
#else
set_error(errorOut, fmt::format("{} could not write to the selected folder.", AppName));
#endif
Log.warn("Failed write probe for custom data folder '{}': {}", io::fs_path_to_string(path),
e.what());
return false;
+1 -1
View File
@@ -15,7 +15,7 @@
#define DUSK_CAN_OPEN_DATA_FOLDER 0
#endif
#if (defined(__APPLE__) && TARGET_OS_IOS && !TARGET_OS_MACCATALYST) || defined(__ANDROID__)
#if (defined(__APPLE__) && TARGET_OS_IOS && !TARGET_OS_MACCATALYST)
#define DUSK_CAN_CHANGE_DATA_FOLDER 0
#else
#define DUSK_CAN_CHANGE_DATA_FOLDER 1
-56
View File
@@ -1402,12 +1402,6 @@ fpc_ProcID fopAcM_createItemForPresentDemo(cXyz const* i_pos, int i_itemNo, u8 p
JUT_ASSERT(3214, 0 <= i_itemNo && i_itemNo < 256);
dComIfGp_event_setGtItm(i_itemNo);
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return fpcM_ERROR_PROCESS_ID_e;
}
#endif
if (i_itemNo == dItemNo_NONE_e) {
OS_REPORT("プレゼントデモ用なのに「ハズレ」です![%d]\n", i_itemNo); // Even though it is for a Present Demo, it is a 'Miss'!
return fpcM_ERROR_PROCESS_ID_e;
@@ -1426,12 +1420,6 @@ fpc_ProcID fopAcM_createItemForTrBoxDemo(cXyz const* i_pos, int i_itemNo, int i_
JUT_ASSERT(3259, 0 <= i_itemNo && i_itemNo < 256);
dComIfGp_event_setGtItm(i_itemNo);
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return fpcM_ERROR_PROCESS_ID_e;
}
#endif
if (i_itemNo == dItemNo_NONE_e) {
OS_REPORT("ゲットデモ用なのに「ハズレ」です![%d]\n", i_itemNo); // Even though it is for a Get Demo, it is a 'Miss'!
return fpcM_ERROR_PROCESS_ID_e;
@@ -1557,12 +1545,6 @@ fpc_ProcID fopAcM_createItemFromTable(cXyz const* i_pos, int i_itemNo, int i_ite
JUT_ASSERT(3655, 0 <= i_itemNo && i_itemNo <= 255 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
// clang-format on
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return fpcM_ERROR_PROCESS_ID_e;
}
#endif
u8 tableNum;
ItemTableList* tableList;
tableList = (ItemTableList*)dComIfGp_getItemTable();
@@ -1606,12 +1588,6 @@ fpc_ProcID fopAcM_createDemoItem(const cXyz* i_pos, int i_itemNo, int i_itemBitN
JUT_ASSERT(3824, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
// clang-format on
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return fpcM_ERROR_PROCESS_ID_e;
}
#endif
if (i_itemNo == dItemNo_NONE_e) {
return fpcM_ERROR_PROCESS_ID_e;
}
@@ -1624,10 +1600,6 @@ fpc_ProcID fopAcM_createItemForBoss(const cXyz* i_pos, int i_itemNo, int i_roomN
const csXyz* i_angle, const cXyz* i_scale, f32 i_speedF,
f32 i_speedY, int param_8) {
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return fpcM_ERROR_PROCESS_ID_e;
}
if (randomizer_IsActive()) {
if (i_itemNo == dItemNo_Randomizer_UTAWA_HEART_e)
{
@@ -1657,10 +1629,6 @@ fpc_ProcID fopAcM_createItemForMidBoss(const cXyz* i_pos, int i_itemNo, int i_ro
const csXyz* i_angle, const cXyz* i_scale, int param_6,
int param_7) {
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return fpcM_ERROR_PROCESS_ID_e;
}
// If we are fighting Ook in randomizer, we want to handle the boomerang check a different way.
if (randomizer_IsActive()) {
if (daAlink_c::checkStageName("D_MN05B")) {
@@ -1681,12 +1649,6 @@ fpc_ProcID fopAcM_createItemForMidBoss(const cXyz* i_pos, int i_itemNo, int i_ro
fopAc_ac_c* fopAcM_createItemForDirectGet(const cXyz* i_pos, int i_itemNo, int i_roomNo,
const csXyz* i_angle, const cXyz* i_scale, f32 i_speedF,
f32 i_speedY) {
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return NULL;
}
#endif
fopAc_ac_c* item = fopAcM_fastCreateItem(i_pos, i_itemNo, i_roomNo, i_angle, i_scale, &i_speedF, &i_speedY, -1,
0x7, NULL);
fopAc_ac_c* ret = item;
@@ -1696,12 +1658,6 @@ fopAc_ac_c* fopAcM_createItemForDirectGet(const cXyz* i_pos, int i_itemNo, int i
fopAc_ac_c* fopAcM_createItemForSimpleDemo(const cXyz* i_pos, int i_itemNo, int i_roomNo,
const csXyz* i_angle, const cXyz* i_scale, f32 i_speedF,
f32 i_speedY) {
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return NULL;
}
#endif
fopAc_ac_c* item = fopAcM_fastCreateItem(i_pos, i_itemNo, i_roomNo, i_angle, i_scale, &i_speedF, &i_speedY, -1,
0x4, NULL);
fopAc_ac_c* ret = item;
@@ -1714,12 +1670,6 @@ fpc_ProcID fopAcM_createItem(const cXyz* i_pos, int i_itemNo, int i_itemBitNo, i
JUT_ASSERT(4067, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
// clang-format on
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return fpcM_ERROR_PROCESS_ID_e;
}
#endif
if (i_itemNo == dItemNo_NONE_e) {
return fpcM_ERROR_PROCESS_ID_e;
}
@@ -1784,12 +1734,6 @@ fopAc_ac_c* fopAcM_fastCreateItem2(const cXyz* i_pos, int i_itemNo, int i_itemBi
JUT_ASSERT(4202, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo < (dSv_info_c::DAN_ITEM + dSv_info_c::MEMORY_ITEM + dSv_info_c::ZONE_ITEM )) || i_itemBitNo == 255);
// clang-format on
#if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(i_itemNo)) {
return NULL;
}
#endif
csXyz item_angle(csXyz::Zero);
if (i_itemNo == dItemNo_NONE_e) {