mirror of
https://github.com/zeldaret/ss
synced 2026-05-25 23:35:13 -04:00
d_t_event OK
This commit is contained in:
@@ -14512,7 +14512,7 @@ fn_80274350 = .text:0x80274350; // type:function size:0x18
|
||||
setViewClipVals = .text:0x80274370; // type:function size:0x10
|
||||
fn_80274380 = .text:0x80274380; // type:function size:0x5C
|
||||
dTgSw_c_classInit__Fv = .text:0x802743E0; // type:function size:0xBC
|
||||
__dt__5dTg_cFv = .text:0x802744A0; // type:function size:0x58 scope:weak
|
||||
__dt__19sFState_c<7dTgSw_c>Fv = .text:0x802744A0; // type:function size:0x58 scope:weak
|
||||
__dt__22sFStateFct_c<7dTgSw_c>Fv = .text:0x80274500; // type:function size:0x6C scope:weak
|
||||
__dt__75sStateMgr_c<7dTgSw_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80274570; // type:function size:0xA0 scope:weak
|
||||
__dt__45sFStateMgr_c<7dTgSw_c,20sStateMethodUsr_FI_c>Fv = .text:0x80274610; // type:function size:0xA4 scope:weak
|
||||
|
||||
@@ -24,10 +24,10 @@ private:
|
||||
/* 0x0FC */ ActorEventRelated mActorEvent;
|
||||
/* 0x14C */ mMtx_c mMatrix;
|
||||
/* 0x17C */ u32 mEventId;
|
||||
/* 0x180 */ u32 setSceneflag;
|
||||
/* 0x184 */ u32 trigSceneflag;
|
||||
/* 0x188 */ u32 subtype;
|
||||
/* 0x18C */ u32 unkParamFlag;
|
||||
/* 0x180 */ u32 mSetSceneflag;
|
||||
/* 0x184 */ u32 mTrigSceneflag;
|
||||
/* 0x188 */ u32 mSubtype;
|
||||
/* 0x18C */ u32 mUnkParamFlag;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
+25
-25
@@ -1,33 +1,32 @@
|
||||
#include "d/t/d_t_event.h"
|
||||
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "f/f_base.h"
|
||||
#include "toBeSorted/area_math.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "toBeSorted/event.h"
|
||||
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(EVENT_TAG, dTgEvent_c, fProfile::EVENT_TAG, 0X13, 0, 0);
|
||||
|
||||
|
||||
int dTgEvent_c::create()
|
||||
{
|
||||
matrixCreateFromPosRotYScale(mMatrix, mPosition, mRotation.y, mScale, 0x0, 0.0f);
|
||||
mEventId = mParams & 0xFF;
|
||||
setSceneflag = mParams >> 8 & 0xFF;
|
||||
trigSceneflag = mParams >> 0x10 & 0xFF;
|
||||
subtype = mParams >> 0x18 & 0x3;
|
||||
unkParamFlag = mParams >> 0x1A & 1;
|
||||
return SUCCEEDED;
|
||||
int dTgEvent_c::create() {
|
||||
matrixCreateFromPosRotYScale(mMatrix, mPosition, mRotation.y, mScale, 0x0, 0.0f);
|
||||
mEventId = getFromParams(0, 0xFF);
|
||||
mSetSceneflag = getFromParams(8, 0xFF);
|
||||
mTrigSceneflag = getFromParams(16, 0xFF);
|
||||
mSubtype = getFromParams(24, 0x3);
|
||||
mUnkParamFlag = getFromParams(26, 0x1);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dTgEvent_c::doDelete() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
}
|
||||
|
||||
inline u32 fun(const u32 &flag, const u32 &returnFlag) {
|
||||
u32 b = 0;
|
||||
if (flag & 1) b = returnFlag;
|
||||
if (flag & 1) {
|
||||
b = returnFlag;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -40,11 +39,12 @@ inline bool dTgEvent_c::isValidFlag(u16 flag) {
|
||||
}
|
||||
|
||||
int dTgEvent_c::actorExecute() {
|
||||
if (!isValidFlag(trigSceneflag) || checkUncommittedFlag(trigSceneflag)) {
|
||||
if ((subtype != 0 && !(isValidFlag(setSceneflag) && checkUncommittedFlag(setSceneflag))) || (subtype == 0 && (isValidFlag(setSceneflag) && checkUncommittedFlag(setSceneflag)))) {
|
||||
if (checkIfVec3fInMatrix(mMatrix,dAcPy_c::LINK->mPosition)) {
|
||||
Event EStack_48 = Event(mEventId, mRoomID, fun(unkParamFlag, 0x1),0,0);
|
||||
mActorEvent.scheduleEvent(EStack_48,0);
|
||||
if (!isValidFlag(mTrigSceneflag) || checkUncommittedFlag(mTrigSceneflag)) {
|
||||
if ((mSubtype != 0 && !(isValidFlag(mSetSceneflag) && checkUncommittedFlag(mSetSceneflag))) ||
|
||||
(mSubtype == 0 && (isValidFlag(mSetSceneflag) && checkUncommittedFlag(mSetSceneflag)))) {
|
||||
if (checkIfVec3fInMatrix(mMatrix, dAcPy_c::LINK->mPosition)) {
|
||||
Event EStack_48 = Event(mEventId, mRoomID, fun(mUnkParamFlag, 0x1), 0, 0);
|
||||
mActorEvent.scheduleEvent(EStack_48, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,13 +54,13 @@ int dTgEvent_c::actorExecute() {
|
||||
int dTgEvent_c::actorExecuteInEvent() {
|
||||
if (mActorEvent.isThisActorInEvent() != 0) {
|
||||
mActorEvent.advanceNext();
|
||||
if (subtype != 0 && isValidFlag(setSceneflag) && !checkUncommittedFlag(setSceneflag)) {
|
||||
SceneflagManager::sInstance->setFlag(mRoomID, setSceneflag);
|
||||
} else if (subtype == 0 && isValidFlag(setSceneflag) && checkUncommittedFlag(setSceneflag)) {
|
||||
SceneflagManager::sInstance->unsetFlag(mRoomID, setSceneflag);
|
||||
if (mSubtype != 0 && isValidFlag(mSetSceneflag) && !checkUncommittedFlag(mSetSceneflag)) {
|
||||
SceneflagManager::sInstance->setFlag(mRoomID, mSetSceneflag);
|
||||
} else if (mSubtype == 0 && isValidFlag(mSetSceneflag) && checkUncommittedFlag(mSetSceneflag)) {
|
||||
SceneflagManager::sInstance->unsetFlag(mRoomID, mSetSceneflag);
|
||||
}
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dTgEvent_c::draw() {
|
||||
|
||||
Reference in New Issue
Block a user