mirror of
https://github.com/zeldaret/ss
synced 2026-05-31 09:21:42 -04:00
@@ -1571,6 +1571,7 @@ d/tg/d_t_event.cpp:
|
||||
d/tg/d_t_event_f.cpp:
|
||||
.text start:0x8027A740 end:0x8027AB30 align:16
|
||||
.data start:0x805367A0 end:0x80536828
|
||||
.sdata2 start:0x8057C650 end:0x8057C658
|
||||
|
||||
d/tg/d_tk_event.cpp:
|
||||
.text start:0x8027AB30 end:0x8027B408 align:16
|
||||
|
||||
+13
-13
@@ -14622,17 +14622,17 @@ actorExecute__10dTgEvent_cFv = .text:0x8027A460; // type:function size:0x150
|
||||
actorExecuteInEvent__10dTgEvent_cFv = .text:0x8027A5B0; // type:function size:0x108
|
||||
draw__10dTgEvent_cFv = .text:0x8027A6C0; // type:function size:0x8
|
||||
__dt__10dTgEvent_cFv = .text:0x8027A6D0; // type:function size:0x70
|
||||
TgEventF__ctor = .text:0x8027A740; // type:function size:0x5C
|
||||
TgEventF__init = .text:0x8027A7A0; // type:function size:0x9C
|
||||
fn_8027A840 = .text:0x8027A840; // type:function size:0x8
|
||||
checkStoryflagValid = .text:0x8027A850; // type:function size:0x14
|
||||
TgEventF__checkUncommitedStoryFlagValue = .text:0x8027A870; // type:function size:0x48
|
||||
TgEventF__setStoryFlag = .text:0x8027A8C0; // type:function size:0x1C
|
||||
TgEventF__unsetStoryFlag = .text:0x8027A8E0; // type:function size:0x1C
|
||||
TgEventF__update = .text:0x8027A900; // type:function size:0xFC
|
||||
TgEventF__updateInEvent = .text:0x8027AA00; // type:function size:0xB0
|
||||
fn_8027AAB0 = .text:0x8027AAB0; // type:function size:0x8
|
||||
TgEventF__dtor = .text:0x8027AAC0; // type:function size:0x70
|
||||
dTgEventF_c_classInit__Fv = .text:0x8027A740; // type:function size:0x5C
|
||||
create__11dTgEventF_cFv = .text:0x8027A7A0; // type:function size:0x9C
|
||||
doDelete__11dTgEventF_cFv = .text:0x8027A840; // type:function size:0x8
|
||||
checkStoryflagValid__11dTgEventF_cFUl = .text:0x8027A850; // type:function size:0x14
|
||||
checkUncommitedStoryFlagValue__11dTgEventF_cFUl = .text:0x8027A870; // type:function size:0x48
|
||||
setStoryFlag__11dTgEventF_cF12StoryFlags_e = .text:0x8027A8C0; // type:function size:0x1C
|
||||
unsetStoryFlag__11dTgEventF_cF12StoryFlags_e = .text:0x8027A8E0; // type:function size:0x1C
|
||||
actorExecute__11dTgEventF_cFv = .text:0x8027A900; // type:function size:0xFC
|
||||
actorExecuteInEvent__11dTgEventF_cFv = .text:0x8027AA00; // type:function size:0xB0
|
||||
draw__11dTgEventF_cFv = .text:0x8027AAB0; // type:function size:0x8
|
||||
__dt__11dTgEventF_cFv = .text:0x8027AAC0; // type:function size:0x70
|
||||
TgTkEvnt__ctor = .text:0x8027AB30; // type:function size:0xB8
|
||||
fn_8027ABF0 = .text:0x8027ABF0; // type:function size:0x58
|
||||
fn_8027AC50 = .text:0x8027AC50; // type:function size:0x6C
|
||||
@@ -36477,7 +36477,7 @@ lbl_805366A0 = .data:0x805366A0; // type:object size:0x78
|
||||
g_profile_EVENT_TAG = .data:0x80536718; // type:object size:0x10
|
||||
__vt__10dTgEvent_c = .data:0x80536728; // type:object size:0x78
|
||||
g_profile_EVENTF_TAG = .data:0x805367A0; // type:object size:0x10
|
||||
TgEventF__vtable = .data:0x805367B0; // type:object size:0x78
|
||||
__vt__11dTgEventF_c = .data:0x805367B0; // type:object size:0x78
|
||||
g_profile_TAG_TKEVNT = .data:0x80536828; // type:object size:0x10
|
||||
TgTkEvnt__vtable = .data:0x80536838; // type:object size:0x78
|
||||
lbl_805368B0 = .data:0x805368B0; // type:object size:0x30
|
||||
@@ -48517,7 +48517,7 @@ lbl_8057C634 = .sdata2:0x8057C634; // type:object size:0x4 align:4 data:float
|
||||
lbl_8057C638 = .sdata2:0x8057C638; // type:object size:0x4 align:4 data:float
|
||||
lbl_8057C640 = .sdata2:0x8057C640; // type:object size:0x4 align:4 data:float
|
||||
@23574 = .sdata2:0x8057C648; // type:object size:0x4 scope:local align:4 data:float
|
||||
lbl_8057C650 = .sdata2:0x8057C650; // type:object size:0x4 align:4 data:float
|
||||
@23549 = .sdata2:0x8057C650; // type:object size:0x4 align:4 data:float
|
||||
lbl_8057C658 = .sdata2:0x8057C658; // type:object size:0x4 align:4 data:float
|
||||
lbl_8057C65C = .sdata2:0x8057C65C; // type:object size:0x4 align:4 data:float
|
||||
lbl_8057C660 = .sdata2:0x8057C660; // type:object size:0x4 align:4 data:float
|
||||
|
||||
+1
-1
@@ -646,7 +646,7 @@ config.libs = [
|
||||
Object(NonMatching, "d/tg/d_t_mass_object.cpp"),
|
||||
Object(NonMatching, "d/tg/d_t_camera.cpp"),
|
||||
Object(Matching, "d/tg/d_t_event.cpp"),
|
||||
Object(NonMatching, "d/tg/d_t_event_f.cpp"),
|
||||
Object(Matching, "d/tg/d_t_event_f.cpp"),
|
||||
Object(NonMatching, "d/tg/d_tk_event.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_a_npc_inv.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_a_npc_tke.cpp"),
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef D_T_EVENT_F_H
|
||||
#define D_T_EVENT_F_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "toBeSorted/actor_event.h"
|
||||
|
||||
class dTgEventF_c : public dTg_c {
|
||||
public:
|
||||
dTgEventF_c() : mActorEvent(*this, nullptr) {}
|
||||
virtual ~dTgEventF_c() {}
|
||||
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
static int checkStoryflagValid(u32);
|
||||
static bool checkUncommitedStoryFlagValue(u32);
|
||||
static void setStoryFlag(StoryFlags_e);
|
||||
static void unsetStoryFlag(StoryFlags_e);
|
||||
virtual int actorExecute() override;
|
||||
virtual int actorExecuteInEvent() override;
|
||||
virtual int draw() override;
|
||||
|
||||
private:
|
||||
/* 0x0FC */ ActorEventRelated mActorEvent;
|
||||
/* 0x14C */ mMtx_c mMatrix;
|
||||
/* 0x17C */ u32 mEventId;
|
||||
/* 0x180 */ u32 mSetStoryflag;
|
||||
/* 0x184 */ u32 mTrigStoryflag;
|
||||
/* 0x188 */ u32 mSubtype;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,72 @@
|
||||
#include "d/t/d_t_event_f.h"
|
||||
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
#include "f/f_base.h"
|
||||
#include "toBeSorted/area_math.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(EVENTF_TAG, dTgEventF_c, fProfile::EVENTF_TAG, 0x14, 0, 0);
|
||||
|
||||
int dTgEventF_c::create() {
|
||||
matrixCreateFromPosRotYScale(mMatrix, mPosition, mRotation.y, mScale, 0x0, 0.0f);
|
||||
mEventId = getFromParams(0, 0xFF);
|
||||
mSetStoryflag = getFromParams(8, 0x7FF);
|
||||
if ((s32)mSetStoryflag == 0x3FF) {
|
||||
mSetStoryflag = 0xFFFFFFFF;
|
||||
}
|
||||
mTrigStoryflag = getFromParams(19, 0x7FF);
|
||||
if ((s32)mTrigStoryflag == 0x3FF) {
|
||||
mTrigStoryflag = 0xFFFFFFFF;
|
||||
}
|
||||
mSubtype = getFromParams(30, 0x3);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dTgEventF_c::doDelete() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dTgEventF_c::checkStoryflagValid(u32 counterIdx) {
|
||||
return StoryflagManager::sInstance->checkFlagValid(counterIdx);
|
||||
}
|
||||
|
||||
bool dTgEventF_c::checkUncommitedStoryFlagValue(u32 flag) {
|
||||
return StoryflagManager::sInstance->getUncommittedValue(flag);
|
||||
}
|
||||
|
||||
void dTgEventF_c::setStoryFlag(StoryFlags_e flag) {
|
||||
StoryflagManager::sInstance->setFlag(flag);
|
||||
}
|
||||
|
||||
void dTgEventF_c::unsetStoryFlag(StoryFlags_e flag) {
|
||||
StoryflagManager::sInstance->unsetFlag(flag);
|
||||
}
|
||||
|
||||
int dTgEventF_c::actorExecute() {
|
||||
if ((!checkStoryflagValid(mTrigStoryflag) || checkUncommitedStoryFlagValue(mTrigStoryflag))) {
|
||||
if ((mSubtype != 0 && !(checkStoryflagValid(mSetStoryflag) && checkUncommitedStoryFlagValue(mSetStoryflag))) ||
|
||||
(mSubtype == 0 && checkStoryflagValid(mSetStoryflag) && checkUncommitedStoryFlagValue(mSetStoryflag))) {
|
||||
if (checkAreaBox(mMatrix, dAcPy_c::LINK->mPosition)) {
|
||||
Event EStack_48 = Event(mEventId, (int)mRoomID, 0x100001, 0, 0);
|
||||
mActorEvent.scheduleEvent(EStack_48, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
int dTgEventF_c::actorExecuteInEvent() {
|
||||
if (mActorEvent.isThisActorInEvent()) {
|
||||
mActorEvent.advanceNext();
|
||||
if (!(mSubtype == 0 || !checkStoryflagValid(mSetStoryflag) || checkUncommitedStoryFlagValue(mSetStoryflag))) {
|
||||
setStoryFlag((StoryFlags_e)mSetStoryflag);
|
||||
} else if ((mSubtype == 0 && checkStoryflagValid(mSetStoryflag)) &&
|
||||
checkUncommitedStoryFlagValue(mSetStoryflag)) {
|
||||
unsetStoryFlag((StoryFlags_e)mSetStoryflag);
|
||||
}
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dTgEventF_c::draw() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
Reference in New Issue
Block a user