mirror of
https://github.com/zeldaret/ss
synced 2026-07-08 05:50:30 -04:00
d_t_stream OK
This commit is contained in:
@@ -2,14 +2,14 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global
|
||||
_epilog = .text:0x00000030; // type:function size:0x2C scope:global
|
||||
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
|
||||
dTgStream_c_classInit__Fv = .text:0x00000070; // type:function size:0x5C
|
||||
TgStream__addToStreamList = .text:0x000000D0; // type:function size:0x64
|
||||
TgStream__init = .text:0x00000140; // type:function size:0xE0
|
||||
fn_203_220 = .text:0x00000220; // type:function size:0x54
|
||||
fn_203_280 = .text:0x00000280; // type:function size:0x8
|
||||
addToList__11dTgStream_cFR9fLiMgBa_c = .text:0x000000D0; // type:function size:0x64
|
||||
create__11dTgStream_cFv = .text:0x00000140; // type:function size:0xE0
|
||||
doDelete__11dTgStream_cFv = .text:0x00000220; // type:function size:0x54
|
||||
actorExecute__11dTgStream_cFv = .text:0x00000280; // type:function size:0x8
|
||||
__dt__11dTgStream_cFv = .text:0x00000290; // type:function size:0x5C
|
||||
_ctors = .ctors:0x00000000; // type:label scope:global
|
||||
_dtors = .dtors:0x00000000; // type:label scope:global
|
||||
lbl_203_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float
|
||||
lbl_203_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float
|
||||
g_profile_TAG_STREAM = .data:0x00000000; // type:object size:0x10
|
||||
lbl_203_data_10 = .data:0x00000010; // type:object size:0x4 data:4byte
|
||||
TgStream__vtable = .data:0x00000014; // type:object size:0x74
|
||||
lbl_203_data_10 = .data:0x00000010; // type:object size:0x4 scope:local data:4byte
|
||||
__vt__11dTgStream_c = .data:0x00000014; // type:object size:0x74
|
||||
|
||||
@@ -42199,8 +42199,8 @@ sInstance__11dTitleMgr_c = .sbss:0x805756B4; // type:object size:0x4 data:4byte
|
||||
TITLE_SCREEN_CHANGE = .sbss:0x805756B8; // type:object size:0x4 data:4byte
|
||||
sInstance__10dTgSiren_c = .sbss:0x805756BC; // type:object size:0x4 data:4byte
|
||||
WEATHER_TAG = .sbss:0x805756C0; // type:object size:0x8 data:4byte
|
||||
StreamTList = .sbss:0x805756C8; // type:object size:0x8 data:4byte
|
||||
SandStreamTList = .sbss:0x805756D0; // type:object size:0x8 data:4byte
|
||||
sStreamList__11dTgStream_c = .sbss:0x805756C8; // type:object size:0x8 data:4byte
|
||||
sSandStreamList__11dTgStream_c = .sbss:0x805756D0; // type:object size:0x8 data:4byte
|
||||
lbl_805756D8 = .sbss:0x805756D8; // type:object size:0x8 data:4byte
|
||||
IMPRISONED_PTR = .sbss:0x805756E0; // type:object size:0x4 data:4byte
|
||||
TADTONE_GAME = .sbss:0x805756E4; // type:object size:0x4 data:4byte
|
||||
|
||||
+1
-1
@@ -2957,7 +2957,7 @@ config.libs = [
|
||||
Rel(NonMatching, "d_t_sparks2", "REL/d/t/d_t_sparks2.cpp"),
|
||||
Rel(NonMatching, "d_t_sparks", "REL/d/t/d_t_sparks.cpp"),
|
||||
Rel(NonMatching, "d_t_spore", "REL/d/t/d_t_spore.cpp"),
|
||||
Rel(NonMatching, "d_t_stream", "REL/d/t/d_t_stream.cpp"),
|
||||
Rel(Matching, "d_t_stream", "REL/d/t/d_t_stream.cpp"),
|
||||
Rel(NonMatching, "d_t_sword_battle_game", "REL/d/t/d_t_sword_battle_game.cpp"),
|
||||
Rel(Matching, "d_t_sw_area", "REL/d/t/d_t_sw_area.cpp"),
|
||||
Rel(Matching, "d_t_tackle", "REL/d/t/d_t_tackle.cpp"),
|
||||
|
||||
@@ -52,6 +52,14 @@ public:
|
||||
BOOL isLinked() const {
|
||||
return get() != nullptr;
|
||||
}
|
||||
|
||||
dAcRef_c<T> *getPrev() const {
|
||||
return static_cast<dAcRef_c<T> *>(cListNd_c::getPrev());
|
||||
}
|
||||
|
||||
dAcRef_c<T> *getNext() const {
|
||||
return static_cast<dAcRef_c<T> *>(cListNd_c::getNext());
|
||||
}
|
||||
};
|
||||
|
||||
// Ghidra: ActorBase
|
||||
|
||||
@@ -2,13 +2,35 @@
|
||||
#define D_T_STREAM_H
|
||||
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "f/f_list_mg.h"
|
||||
#include "f/f_list_nd.h"
|
||||
#include "m/m_mtx.h"
|
||||
|
||||
class dTgStream_c : public dAcBase_c {
|
||||
class dTgStream_c : public dTg_c {
|
||||
public:
|
||||
dTgStream_c() {}
|
||||
dTgStream_c() : mStreamNode(this) {}
|
||||
virtual ~dTgStream_c() {}
|
||||
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int actorExecute() override;
|
||||
|
||||
static fLiMgBa_c sStreamList;
|
||||
static fLiMgBa_c sSandStreamList;
|
||||
|
||||
void addToList(fLiMgBa_c &list);
|
||||
|
||||
private:
|
||||
/* 0x0FC */ u8 mSceneflag; ///< Sceneflag to indicate when to flow
|
||||
/* 0x0FD */ u8 mAreaIdx; ///<
|
||||
/* 0x0FE */ u8 mSpeed; ///<
|
||||
/* 0x0FF */ u8 mOrder; ///<
|
||||
/* 0x100 */ u8 mIsSand;
|
||||
/* 0x101 */ u8 field_0x101;
|
||||
/* 0x104 */ mMtx_c mArea;
|
||||
|
||||
/* 0x134 */ fLiNdBa_c mStreamNode;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,66 @@
|
||||
#include "d/t/d_t_stream.h"
|
||||
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_list_mg.h"
|
||||
#include "toBeSorted/area_math.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(TAG_STREAM, dTgStream_c, fProfile::TAG_STREAM, 0x29D, 0, 0);
|
||||
|
||||
void dTgStream_c::addToList(fLiMgBa_c &list) {
|
||||
// Upcasting for simplicity of the mOrder check.
|
||||
dAcRef_c<dTgStream_c> *pIt = static_cast<dAcRef_c<dTgStream_c> *>(list.getFirst());
|
||||
if (pIt != nullptr) {
|
||||
while (pIt != nullptr) {
|
||||
if (pIt->get()->mOrder <= mOrder) {
|
||||
pIt = pIt->getNext();
|
||||
continue;
|
||||
}
|
||||
|
||||
list.insertAfter(&mStreamNode, pIt->getPrev());
|
||||
return;
|
||||
}
|
||||
list.append(&mStreamNode);
|
||||
}
|
||||
|
||||
else {
|
||||
list.append(&mStreamNode);
|
||||
}
|
||||
}
|
||||
|
||||
int dTgStream_c::create() {
|
||||
mSceneflag = getFromParams(0, 0xFF);
|
||||
mAreaIdx = getFromParams(8, 0xFF);
|
||||
mSpeed = getFromParams(16, 0xFF);
|
||||
if (mSpeed == 0xFF) {
|
||||
mSpeed = 0;
|
||||
}
|
||||
|
||||
mOrder = getFromParams(28, 0xFF);
|
||||
mIsSand = getFromParams(24, 0xF);
|
||||
field_0x101 = (mRotation.z & 0x3) == 1;
|
||||
mRotation.z = 0;
|
||||
|
||||
if (mIsSand == 1) {
|
||||
addToList(sSandStreamList);
|
||||
} else {
|
||||
addToList(sStreamList);
|
||||
}
|
||||
|
||||
matrixCreateFromPosRotYScale(mArea, mPosition, mRotation.y, mScale, nullptr, 0.f);
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dTgStream_c::doDelete() {
|
||||
if (mIsSand == 1) {
|
||||
sSandStreamList.remove(&mStreamNode);
|
||||
} else {
|
||||
sStreamList.remove(&mStreamNode);
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dTgStream_c::actorExecute() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user