actorExecute 21%

This commit is contained in:
Orstedra
2025-05-25 01:00:35 +02:00
parent 1a2455757a
commit ad013ab51a
4 changed files with 74 additions and 7 deletions
@@ -10,7 +10,7 @@ draw__17dTgGateToGround_cFv = .text:0x000002F0; // type:function size:0x8
__dt__17dTgGateToGround_cFv = .text:0x00000300; // type:function size:0x70
_ctors = .ctors:0x00000000; // type:label scope:global
_dtors = .dtors:0x00000000; // type:label scope:global
lbl_205_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float
@20562 = .rodata:0x00000000; // type:object size:0x4 data:float
g_profile_GATE2GND_TAG = .data:0x00000000; // type:object size:0x10
lbl_205_data_10 = .data:0x00000010; // type:object size:0xC
@20583 = .data:0x00000010; // type:object size:0xC
__vt__17dTgGateToGround_c = .data:0x0000001C; // type:object size:0x74
+1
View File
@@ -6,6 +6,7 @@
extern "C" bool fn_80081FE0(void *, const char *);
extern "C" bool fn_800918E0(void *, s32, s16);
extern "C" void fn_80080960(void *, int, int, int, int);
class dCamera_c : public dBase_c {
public:
+11 -1
View File
@@ -1,11 +1,15 @@
#ifndef D_T_GATE_TO_GROUND_H
#define D_T_GATE_TO_GROUND_H
#include "common.h"
#include "d/a/d_a_base.h"
#include "m/m_mtx.h"
#include "toBeSorted/actor_event.h"
#include "toBeSorted/event.h"
class dTgGateToGround_c : public dAcBase_c {
public:
dTgGateToGround_c() {}
dTgGateToGround_c() : mEventRelated(*this, nullptr) {}
virtual ~dTgGateToGround_c() {}
virtual int create() override;
@@ -15,6 +19,12 @@ public:
virtual int draw() override; // fn_205_2F0
private:
ActorEventRelated mEventRelated;
/* 0x14c */ mMtx_c matrix;
int delayFrames;
/* 0x180 */ s16 params_FF_FF_00_00;
/* 0x182 */ u8 params_00_00_FF_00;
/* 0x183 */ u8 params_00_00_00_FF;
};
#endif
+60 -4
View File
@@ -1,19 +1,75 @@
#include "d/t/d_t_gate_to_ground.h"
#include "common.h"
#include "d/a/d_a_player.h"
#include "d/d_camera.h"
#include "d/d_player_act.h"
#include "d/d_sc_game.h"
#include "d/flag/storyflag_manager.h"
#include "f/f_base.h"
#include "toBeSorted/actor_event.h"
#include "toBeSorted/area_math.h"
#include "toBeSorted/event.h"
SPECIAL_ACTOR_PROFILE(GATE2GND_TAG, dTgGateToGround_c, fProfile::GATE2GND_TAG, 0x22, 0, 0);
int dTgGateToGround_c::create() {}
int dTgGateToGround_c::create() {
matrixCreateFromPosRotYScale(matrix, position, rotation.y, mScale, nullptr, 0.0f);
delayFrames = 0;
union {
u32 val;
struct {
u16 a;
u8 b;
u8 c;
};
} v;
v.val = params;
params_FF_FF_00_00 = v.a;
params_00_00_FF_00 = v.b;
params_00_00_00_FF = v.c;
return SUCCEEDED;
}
int dTgGateToGround_c::doDelete() {
return SUCCEEDED;
}
int dTgGateToGround_c::actorExecute() {}
int dTgGateToGround_c::actorExecute() {
dAcPy_c *player;
dCamera_c *camera;
int dTgGateToGround_c::actorExecuteInEvent() {}
if (params_FF_FF_00_00 == -1 || StoryflagManager::sInstance->getCounterOrFlag(params_FF_FF_00_00) != 0) {
player = dAcPy_c::LINK;
if (checkIfVec3fInMatrix(matrix, player->position)) {
if (player->getRidingActorType() == dAcPy_c::RIDING_LOFTWING) {
if (params_00_00_00_FF != -1) {
camera = dScGame_c::getCamera(0);
fn_80080960(camera->getField_0xD98(), params_00_00_00_FF, 0, roomid, 0);
}
delayFrames = 0;
} else if (delayFrames < 16) {
++delayFrames;
} else {
Event e = Event("CloudHole", 100, 0, 0, 0);
mEventRelated.scheduleEvent(e, 0);
}
} else {
delayFrames = 0;
}
}
return SUCCEEDED;
}
int dTgGateToGround_c::actorExecuteInEvent() {
if (mEventRelated.isThisActorInEvent() != 0) {
mEventRelated.advanceNext();
}
return SUCCEEDED;
}
int dTgGateToGround_c::draw() {
return SUCCEEDED;