Foolish items

This commit is contained in:
gymnast86
2026-05-11 13:47:17 -07:00
parent 5e69c7bdce
commit ba5a59eee2
16 changed files with 507 additions and 367 deletions
+10 -2
View File
@@ -109,6 +109,14 @@ int daItemShield_c::__CreateHeap() {
int daItemShield_c::create() {
fopAcM_ct(this, daItemShield_c);
m_itemNo = IF_DUSK(randomizer_IsActive() ? randomizer_getItemAtLocation("Ordon Shield") : ) dItemNo_WOOD_SHIELD_e;
#if TARGET_PC
// Use home.angle.x as a check to see if we've set the foolish item model or not
// Otherwise we end up setting it twice
if (randomizer_IsActive() && m_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e && home.angle.x != 0) {
home.angle.z = randomizer_getRandomFoolishItemModelID();
home.angle.x = 0;
}
#endif
if (fopAcM_isSwitch(this, getSwBit2())) {
OS_REPORT("木の盾:もう取ったので出ません\n");
return cPhs_ERROR_e;
@@ -119,7 +127,7 @@ int daItemShield_c::create() {
if (getSwBit() == 0xff) {
OS_REPORT("[43;30m木の盾:スイッチビット指定がありません!\n\x1b[m");
}
int rv = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo));
int rv = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(M_ITEMNO_MODEL_ITEM_ID));
if (rv == cPhs_COMPLEATE_e) {
if (fopAcM_entrySolidHeap(this, CheckFieldItemCreateHeap, 0x820) == 0) {
return cPhs_ERROR_e;
@@ -338,7 +346,7 @@ int daItemShield_c::draw() {
}
int daItemShield_c::_delete() {
daItemBase_c::DeleteBase(dItem_data::getFieldArc(m_itemNo));
daItemBase_c::DeleteBase(dItem_data::getFieldArc(M_ITEMNO_MODEL_ITEM_ID));
return 1;
}