Object Property Enum

This commit is contained in:
elijah-thomas774
2025-09-16 21:55:32 -04:00
parent d591961dbd
commit 0a2b38da2b
16 changed files with 75 additions and 40 deletions
+37 -1
View File
@@ -24,6 +24,42 @@
// vtable: 0x805015b8
// non-official name
class dAcObjBase_c : public dAcBase_c {
public:
enum ObjProperties_e {
OBJ_PROP_0x1 = (1 << 0),
OBJ_PROP_0x2 = (1 << 1),
OBJ_PROP_0x4 = (1 << 2),
OBJ_PROP_0x8 = (1 << 3),
OBJ_PROP_0x10 = (1 << 4),
OBJ_PROP_0x20 = (1 << 5),
OBJ_PROP_0x40 = (1 << 6),
OBJ_PROP_0x80 = (1 << 7),
OBJ_PROP_0x100 = (1 << 8),
OBJ_PROP_0x200 = (1 << 9),
OBJ_PROP_0x400 = (1 << 10),
OBJ_PROP_0x800 = (1 << 11),
OBJ_PROP_0x1000 = (1 << 12),
OBJ_PROP_0x2000 = (1 << 13),
OBJ_PROP_0x4000 = (1 << 14),
OBJ_PROP_0x8000 = (1 << 15),
OBJ_PROP_0x10000 = (1 << 16),
OBJ_PROP_0x20000 = (1 << 17),
OBJ_PROP_0x40000 = (1 << 18),
OBJ_PROP_0x80000 = (1 << 19),
OBJ_PROP_0x100000 = (1 << 20),
OBJ_PROP_0x200000 = (1 << 21),
OBJ_PROP_0x400000 = (1 << 22),
OBJ_PROP_0x800000 = (1 << 23),
OBJ_PROP_0x1000000 = (1 << 24),
OBJ_PROP_0x2000000 = (1 << 25),
OBJ_PROP_0x4000000 = (1 << 26),
OBJ_PROP_0x8000000 = (1 << 27),
OBJ_PROP_0x10000000 = (1 << 28),
OBJ_PROP_0x20000000 = (1 << 29),
OBJ_PROP_0x40000000 = (1 << 30),
OBJ_PROP_0x80000000 = (1 << 31),
};
public:
/* 0x0FC */ f32 mYOffset;
/* 0x100 */ f32 field_0x100;
@@ -82,7 +118,7 @@ public:
}
bool checkSlower(f32 speed) const {
return fabsf(mSpeed) <= speed;
return std::fabsf(mSpeed) <= speed;
}
bool checkYOffsetField_0x100() const {
+3 -3
View File
@@ -94,7 +94,7 @@ int dAcOF400GateSeal_c::actorExecute() {
f32 frame = mAnmClr.getFrameStart(0);
mAnmClr.setFrame(frame, 0);
} else {
if (checkObjectProperty(2)) {
if (checkObjectProperty(OBJ_PROP_0x2)) {
f32 frame = mAnmClr.getFrameMax(0);
mAnmClr.setFrame(frame, 0);
} else {
@@ -102,9 +102,9 @@ int dAcOF400GateSeal_c::actorExecute() {
}
}
if (mAnmClr.isStop(0)) {
setObjectProperty(0x200);
setObjectProperty(OBJ_PROP_0x200);
} else {
unsetObjectProperty(0x200);
unsetObjectProperty(OBJ_PROP_0x200);
}
return SUCCEEDED;
}
+2 -2
View File
@@ -70,10 +70,10 @@ int dAcOAmber_c::draw() {
void dAcOAmber_c::registerInEvent() {
const char *eventName = EventManager::sInstance->getCurrentEventName();
if (strequals(eventName, "TimeDoorIn") || strequals(eventName, "TimeDoorOut")) {
mObjectActorFlags |= 0x200;
setObjectProperty(OBJ_PROP_0x200);
}
}
void dAcOAmber_c::unkVirtFunc_0x6C() {
mObjectActorFlags &= ~0x200;
unsetObjectProperty(OBJ_PROP_0x200);
}
+5 -5
View File
@@ -134,7 +134,7 @@ int dAcOChair_c::actorExecute() {
mStateMgr.executeState();
// Calculate the HealCooldown (Heal link if needed)
if (!checkObjectProperty(0x8000)) {
if (!checkObjectProperty(OBJ_PROP_0x8000)) {
if (!isBench()) {
mCyl.SetC(getPosition());
dCcS::GetInstance()->Set(&mCyl);
@@ -148,7 +148,7 @@ int dAcOChair_c::actorExecute() {
}
// Set the flag that link is sitting
if (checkObjectProperty(0x8000) && isPlayerSitting()) {
if (checkObjectProperty(OBJ_PROP_0x8000) && isPlayerSitting()) {
if (mSceneflag < 0xFF && !SceneflagManager::sInstance->checkBoolFlag(mRoomID, mSceneflag)) {
SceneflagManager::sInstance->setFlag(mRoomID, mSceneflag);
}
@@ -159,7 +159,7 @@ int dAcOChair_c::actorExecute() {
}
if (!isBench()) {
if (isChairTypeIdk0() && !checkObjectProperty(0x8000)) {
if (isChairTypeIdk0() && !checkObjectProperty(OBJ_PROP_0x8000)) {
if (sLib::absDiff(getRotation().y, getXZAngleToPlayer()) > 910) {
getRotation().y = getXZAngleToPlayer();
}
@@ -173,7 +173,7 @@ int dAcOChair_c::actorExecute() {
mMdl.setLocalMtx(mWorldMtx);
mMdl.calc(false);
} else {
if (isChairTypeIdk0() && !checkObjectProperty(0x8000)) {
if (isChairTypeIdk0() && !checkObjectProperty(OBJ_PROP_0x8000)) {
if (sLib::absDiff(getRotation().y, getXZAngleToPlayer()) > 910) {
getRotation().y = getXZAngleToPlayer();
}
@@ -251,7 +251,7 @@ void dAcOChair_c::updateChairPos() {
mPositionCopy3 = mPositionCopy2;
} else {
field_0xB1A = true;
if (!checkObjectProperty(0x8000)) {
if (!checkObjectProperty(OBJ_PROP_0x8000)) {
mVec3_c work = mVec3_c::Ez * getDistToPlayer();
work.rotY(getRelativeYRotationToPlayer());
work.z = 0.f;
@@ -89,10 +89,10 @@ int dAcOFlyingClawshotTarget_c::actorExecute() {
f32 dist_to = markPoint.squareDistance(player->mPosition);
if (checkObjectProperty(0x4)) {
if (checkObjectProperty(OBJ_PROP_0x4)) {
player->vt_0x0DC(this, mMarkPoint);
}
if (checkObjectProperty(0x4) && dist_to < 2500.f &&
if (checkObjectProperty(OBJ_PROP_0x4) && dist_to < 2500.f &&
(player->checkActionFlagsCont(0x10000000) || player->checkActionFlagsCont(0x20000000))) {
static mVec3_c vec = -mVec3_c::Ey;
mVec3_c v2;
@@ -125,7 +125,7 @@ int dAcOFlyingClawshotTarget_c::actorExecute() {
switch (mState) {
case 0: {
if (checkObjectProperty(0x4)) {
if (checkObjectProperty(OBJ_PROP_0x4)) {
if (player->checkActionFlagsCont(0x10000000) || player->checkActionFlagsCont(0x20000000)) {
mState = 2;
} else {
@@ -134,7 +134,7 @@ int dAcOFlyingClawshotTarget_c::actorExecute() {
}
} break;
case 1: {
if (checkObjectProperty(0x4)) {
if (checkObjectProperty(OBJ_PROP_0x4)) {
if (player->checkActionFlagsCont(0x10000000) || player->checkActionFlagsCont(0x20000000)) {
mState = 2;
}
@@ -143,7 +143,7 @@ int dAcOFlyingClawshotTarget_c::actorExecute() {
}
} break;
case 2: {
if (!checkObjectProperty(0x4)) {
if (!checkObjectProperty(OBJ_PROP_0x4)) {
mState = 0;
}
} break;
+2 -2
View File
@@ -808,7 +808,7 @@ void dAcOivyRope_c::fn_256_D1B0() {
}
void dAcOivyRope_c::fn_256_D2B0() {
if (checkObjectProperty(0x1)) {
if (checkObjectProperty(OBJ_PROP_0x1)) {
return;
}
@@ -1124,7 +1124,7 @@ void dAcOivyRope_c::fn_256_E3E0() {
mField_0x1039 = fn_256_DF30();
} break;
case 5: {
if (checkObjectProperty(0x1)) {
if (checkObjectProperty(OBJ_PROP_0x1)) {
mField_0x1039 = 2;
} else {
for (int i = 0; i < 0x23; i++) {
+1 -1
View File
@@ -35,7 +35,7 @@ int dAcOropeBase_c::doDelete() {
}
int dAcOropeBase_c::actorExecute() {
if (checkObjectProperty(2)) {
if (checkObjectProperty(OBJ_PROP_0x2)) {
field_0x35C = true;
} else {
field_0x35C = false;
+2 -2
View File
@@ -109,10 +109,10 @@ int dAcOstreamLava_c::actorExecute() {
dRoom_c *currentRoom = dStage_c::GetInstance()->getRoom(mRoomID);
if (currentRoom->checkFlag(2)) {
setObjectProperty(0x200);
setObjectProperty(OBJ_PROP_0x200);
return SUCCEEDED;
} else {
unsetObjectProperty(0x200);
unsetObjectProperty(OBJ_PROP_0x200);
return SUCCEEDED;
}
}
+1 -1
View File
@@ -82,7 +82,7 @@ int dAcOTarzanPole_c::actorExecute() {
const dAcPy_c *player = dAcPy_c::GetLink();
bool bVar = false;
if (mCollider.ChkTgHit() && mCollider.ChkTgAtHitType(AT_TYPE_WHIP)) {
setObjectProperty(0x1000);
setObjectProperty(OBJ_PROP_0x1000);
}
mVec = mVec3_c::Ex * sXOffset + mVec3_c::Ey * sYOffset;
+3 -3
View File
@@ -404,7 +404,7 @@ void dAcOtubo_c::initializeState_Rebirth() {
mSph.ClrCoSet();
mSph.ClrTgSet();
setObjectProperty(0x200);
setObjectProperty(OBJ_PROP_0x200);
getLinkage().fn_80050EA0(this);
int item_drop_table = getParams2UpperByte();
@@ -426,7 +426,7 @@ void dAcOtubo_c::executeState_Rebirth() {
case 0: count = dAcItem_c::getTotalArrowCount(); break;
case 1: count = dAcItem_c::getTotalSeedCount(); break;
}
if (checkObjectProperty(0x2) && count <= 3) {
if (checkObjectProperty(OBJ_PROP_0x2) && count <= 3) {
if (sLib::calcTimer(&mTimer_0x9E8) == 0) {
mStateMgr.changeState(StateID_Wait);
}
@@ -438,7 +438,7 @@ void dAcOtubo_c::finalizeState_Rebirth() {
mSph.OnCoSet();
mSph.OnTgSet();
mpPosition = &mPosition;
unsetObjectProperty(0x200);
unsetObjectProperty(OBJ_PROP_0x200);
setActorProperty(AC_PROP_0x1);
}
+1 -2
View File
@@ -129,8 +129,7 @@ int dAcOTumbleWeed_c::actorExecute() {
}
adjustTimeScale();
// TODO(mObjectActorFlags)
if (checkObjectProperty(0x2)) {
if (checkObjectProperty(OBJ_PROP_0x2)) {
// Weak function not being placed right
if (sLib::calcTimer(&mTumbleTimer) == 0) {
killNoItemDrop();
+1 -1
View File
@@ -96,7 +96,7 @@ void dAcObjFairy_c::executeState_CatchDemo() {
}
void dAcObjFairy_c::finalizeState_CatchDemo() {
field_0xB89 = 0;
unsetObjectProperty(0x200);
unsetObjectProperty(OBJ_PROP_0x200);
}
bool dAcObjFairy_c::shouldAvoidLink() const {
+1 -1
View File
@@ -66,7 +66,7 @@ void dAcOsw_c::rideCallback(dBgW *unknown, dAcObjBase_c *actor, dAcObjBase_c *in
}
}
}
interactor->setObjectProperty(0x40);
interactor->setObjectProperty(OBJ_PROP_0x40);
}
bool dAcOsw_c::createHeap() {
+4 -4
View File
@@ -1192,9 +1192,9 @@ int dAcTbox_c::actorExecute() {
dRoom_c *r = dStage_c::GetInstance()->getRoom(mRoomID);
bool hasFlags = r->checkFlag(0x1E);
if (hasFlags) {
setObjectProperty(0x200);
setObjectProperty(OBJ_PROP_0x200);
} else {
unsetObjectProperty(0x200);
unsetObjectProperty(OBJ_PROP_0x200);
}
if (hasFlags) {
@@ -1328,9 +1328,9 @@ int dAcTbox_c::actorExecuteInEvent() {
dRoom_c *r = dStage_c::GetInstance()->getRoom(mRoomID);
bool hasFlags = r->checkFlag(0x1E);
if (hasFlags) {
setObjectProperty(0x200);
setObjectProperty(OBJ_PROP_0x200);
} else {
unsetObjectProperty(0x200);
unsetObjectProperty(OBJ_PROP_0x200);
}
if (hasFlags) {
+6 -6
View File
@@ -72,16 +72,16 @@ bool dLinkage_c::tryAttach(
return false;
}
}
pActor->unsetObjectProperty(0x1000);
pActor->unsetObjectProperty(0x4);
pActor->unsetObjectProperty(dAcObjBase_c::OBJ_PROP_0x1000);
pActor->unsetObjectProperty(dAcObjBase_c::OBJ_PROP_0x4);
mControllingActor.link(pSrc);
mState = STATE_ACTIVE;
mType = type;
if (type == CONNECTION_4) {
pActor->setObjectProperty(0x4);
pActor->setObjectProperty(dAcObjBase_c::OBJ_PROP_0x4);
} else if (type == CONNECTION_7) {
pActor->setObjectProperty(0x1000);
pActor->setObjectProperty(dAcObjBase_c::OBJ_PROP_0x1000);
field_0x1A = 4;
}
MTXIdentity(carryTransMtx);
@@ -134,11 +134,11 @@ void dLinkage_c::fn_80050EB0(dAcObjBase_c *pActor) {
MTXIdentity(carryTransMtx);
} else if (mType == CONNECTION_4) {
if (pActor) {
pActor->unsetObjectProperty(0x4);
pActor->unsetObjectProperty(dAcObjBase_c::OBJ_PROP_0x4);
}
} else if (mType == CONNECTION_7) {
if (pActor) {
pActor->unsetObjectProperty(0x1000);
pActor->unsetObjectProperty(dAcObjBase_c::OBJ_PROP_0x1000);
}
}
+1 -1
View File
@@ -1958,6 +1958,6 @@ bool daPlayerModelBase_c::fn_80061410() {
// and this causes the vtable and all other weak functions to be here
/* vt 0x114 */ void daPlayerModelBase_c::somethingWithCarriedActorFlags() {
if (mCarriedActorRef.get() != nullptr) {
mCarriedActorRef.get()->setObjectProperty(0x200);
mCarriedActorRef.get()->setObjectProperty(OBJ_PROP_0x200);
}
}