mirror of
https://github.com/zeldaret/ss
synced 2026-05-23 15:01:38 -04:00
d_t_mass_obj 99%
This commit is contained in:
@@ -1539,7 +1539,7 @@ d/tg/d_t_mass_object.cpp:
|
||||
.rodata start:0x804EE5A8 end:0x804EE6C0
|
||||
.data start:0x80536478 end:0x80536608
|
||||
.sbss start:0x80575930 end:0x80575938
|
||||
.bss start:0x805B57A8 end:0x805B57C0
|
||||
.bss start:0x805B57A8 end:0x805B57BC
|
||||
|
||||
d/tg/d_t_camera.cpp:
|
||||
.text start:0x8027A0B0 end:0x8027A370 align:16
|
||||
|
||||
+59
-57
@@ -14557,56 +14557,56 @@ initializeState__21sFStateID_c<7dTgSw_c>CFR7dTgSw_c = .text:0x80275280; // type:
|
||||
__sinit_\d_t_switch_cpp = .text:0x802752B0; // type:function size:0x338 scope:local
|
||||
__dt__21sFStateID_c<7dTgSw_c>Fv = .text:0x802755F0; // type:function size:0x58 scope:weak
|
||||
isSameName__21sFStateID_c<7dTgSw_c>CFPCc = .text:0x80275650; // type:function size:0x88 scope:weak
|
||||
TgMassObj__ctor = .text:0x802756E0; // type:function size:0x4C
|
||||
getCurrentStageGrassSubtype = .text:0x80275730; // type:function size:0x124
|
||||
fn_80275860 = .text:0x80275860; // type:function size:0x8
|
||||
TgMassObj__init = .text:0x80275870; // type:function size:0x85C
|
||||
fn_802760D0 = .text:0x802760D0; // type:function size:0x14
|
||||
TgMassObj__destroy = .text:0x802760F0; // type:function size:0xB4
|
||||
fn_802761B0 = .text:0x802761B0; // type:function size:0x7C
|
||||
TgMassObj__update = .text:0x80276230; // type:function size:0xEC
|
||||
TgMassObj__draw = .text:0x80276320; // type:function size:0x74
|
||||
dTgMassObj_c_classInit__Fv = .text:0x802756E0; // type:function size:0x4C
|
||||
getCurrentStageGrassSubtype__12dTgMassObj_cFv = .text:0x80275730; // type:function size:0x124
|
||||
actorCreate__12dTgMassObj_cFv = .text:0x80275860; // type:function size:0x8
|
||||
actorPostCreate__12dTgMassObj_cFv = .text:0x80275870; // type:function size:0x85C
|
||||
__ct__29TList<18dTgMassObjInstance,0>Fv = .text:0x802760D0; // type:function size:0x14
|
||||
doDelete__12dTgMassObj_cFv = .text:0x802760F0; // type:function size:0xB4
|
||||
__dt__10GrassModelFv = .text:0x802761B0; // type:function size:0x7C
|
||||
actorExecute__12dTgMassObj_cFv = .text:0x80276230; // type:function size:0xEC
|
||||
draw__12dTgMassObj_cFv = .text:0x80276320; // type:function size:0x74
|
||||
unloadRoom__12dTgMassObj_cFUs = .text:0x802763A0; // type:function size:0x60
|
||||
fn_80276400 = .text:0x80276400; // type:function size:0x250
|
||||
fn_80276650 = .text:0x80276650; // type:function size:0x260
|
||||
fn_802768B0 = .text:0x802768B0; // type:function size:0xB4
|
||||
fn_80276970 = .text:0x80276970; // type:function size:0x60
|
||||
fn_802769D0 = .text:0x802769D0; // type:function size:0x40
|
||||
fn_80276A10 = .text:0x80276A10; // type:function size:0x40
|
||||
fn_80276A50 = .text:0x80276A50; // type:function size:0x3C8
|
||||
fn_80276E20 = .text:0x80276E20; // type:function size:0x20
|
||||
fn_80276E40 = .text:0x80276E40; // type:function size:0x3C
|
||||
fn_80276E80 = .text:0x80276E80; // type:function size:0x44
|
||||
fn_80276ED0 = .text:0x80276ED0; // type:function size:0x288
|
||||
fn_80277160 = .text:0x80277160; // type:function size:0x94
|
||||
fn_80277200 = .text:0x80277200; // type:function size:0x58
|
||||
fn_80277260 = .text:0x80277260; // type:function size:0x74
|
||||
fn_802772E0 = .text:0x802772E0; // type:function size:0xD8
|
||||
fn_802773C0 = .text:0x802773C0; // type:function size:0x80
|
||||
fn_80277440 = .text:0x80277440; // type:function size:0xE0
|
||||
fn_80277520 = .text:0x80277520; // type:function size:0xB4
|
||||
fn_802775E0 = .text:0x802775E0; // type:function size:0xA0
|
||||
fn_80277680 = .text:0x80277680; // type:function size:0x150
|
||||
fn_802777D0 = .text:0x802777D0; // type:function size:0x48
|
||||
fn_80277820 = .text:0x80277820; // type:function size:0x28
|
||||
fn_80277850 = .text:0x80277850; // type:function size:0x1EC
|
||||
fn_80277A40 = .text:0x80277A40; // type:function size:0x20C
|
||||
fn_80277C50 = .text:0x80277C50; // type:function size:0x1014
|
||||
fn_80278C70 = .text:0x80278C70; // type:function size:0x5A0
|
||||
fn_80279210 = .text:0x80279210; // type:function size:0x394
|
||||
fn_802795B0 = .text:0x802795B0; // type:function size:0xBC
|
||||
fn_80279670 = .text:0x80279670; // type:function size:0xC8
|
||||
fn_80279740 = .text:0x80279740; // type:function size:0x84
|
||||
fn_802797D0 = .text:0x802797D0; // type:function size:0x48
|
||||
fn_80279820 = .text:0x80279820; // type:function size:0xD0
|
||||
fn_802798F0 = .text:0x802798F0; // type:function size:0x64
|
||||
fn_80279960 = .text:0x80279960; // type:function size:0x60
|
||||
fn_802799C0 = .text:0x802799C0; // type:function size:0x64
|
||||
fn_80279A30 = .text:0x80279A30; // type:function size:0x1D4
|
||||
fn_80279C10 = .text:0x80279C10; // type:function size:0x418
|
||||
fn_8027A030 = .text:0x8027A030; // type:function size:0x5C
|
||||
fn_8027A090 = .text:0x8027A090; // type:function size:0x4
|
||||
fn_8027A0A0 = .text:0x8027A0A0; // type:function size:0x4
|
||||
initializeCircle__12dTgMassObj_cFP10GrassModelP7mVec3_cP7mVec3_clP6mMtx_clUlUcilUcf = .text:0x80276400; // type:function size:0x250
|
||||
initializeBox__12dTgMassObj_cFP10GrassModelP7mVec3_cP7mVec3_ciP6mMtx_ciUlUcilUcf = .text:0x80276650; // type:function size:0x260
|
||||
remove__10GrassModelFv = .text:0x802768B0; // type:function size:0xB4
|
||||
__dt__14GrassModelDataFv = .text:0x80276970; // type:function size:0x60
|
||||
__dt__18dTgMassObjInstanceFv = .text:0x802769D0; // type:function size:0x40
|
||||
__dt__19dTgMassObjTransformFv = .text:0x80276A10; // type:function size:0x40
|
||||
setModelInfo__10GrassModelFffilUsUsiUclUlP16mHeapAllocator_c = .text:0x80276A50; // type:function size:0x3C8
|
||||
__ct__14GrassModelDataFv = .text:0x80276E20; // type:function size:0x20
|
||||
__ct__18dTgMassObjInstanceFv = .text:0x80276E40; // type:function size:0x3C
|
||||
initResForModel__10GrassModelFlQ34nw4r3g3d6ResMatQ34nw4r3g3d6ResShp = .text:0x80276E80; // type:function size:0x44
|
||||
spawnSingleGrass__10GrassModelFiUsP7mVec3_cUsliilUc = .text:0x80276ED0; // type:function size:0x288
|
||||
addToRoom__10GrassModelFUllP18dTgMassObjInstance = .text:0x80277160; // type:function size:0x94
|
||||
addToFreeInstances__10GrassModelFP18dTgMassObjInstance = .text:0x80277200; // type:function size:0x58
|
||||
unloadRoom__10GrassModelFUs = .text:0x80277260; // type:function size:0x74
|
||||
update__10GrassModelFv = .text:0x802772E0; // type:function size:0xD8
|
||||
draw__10GrassModelFv = .text:0x802773C0; // type:function size:0x80
|
||||
aquireTransform__10GrassModelFv = .text:0x80277440; // type:function size:0xE0
|
||||
releaseTransform__10GrassModelFP19dTgMassObjTransform = .text:0x80277520; // type:function size:0xB4
|
||||
__ct__19dTgMassObjTransformFv = .text:0x802775E0; // type:function size:0xA0
|
||||
update__19dTgMassObjTransformFv = .text:0x80277680; // type:function size:0x150
|
||||
releaseDynamicTransform__18dTgMassObjInstanceFP10GrassModel = .text:0x802777D0; // type:function size:0x48
|
||||
reset__18dTgMassObjInstanceFv = .text:0x80277820; // type:function size:0x28
|
||||
getDrawMatrix__18dTgMassObjInstanceFP6mMtx_c = .text:0x80277850; // type:function size:0x1EC
|
||||
checkForHit__18dTgMassObjInstanceFP10GrassModelP14GrassModelDataUs = .text:0x80277A40; // type:function size:0x20C
|
||||
checkForHit__18dTgMassObjInstanceFUlR15dCcMassS_HitInfP12dAcObjBase_cP10GrassModelP14GrassModelDataUl = .text:0x80277C50; // type:function size:0x1014
|
||||
FUN_80278c70__18dTgMassObjInstanceFUlR15dCcMassS_HitInfP9dAcBase_cP10GrassModel = .text:0x80278C70; // type:function size:0x5A0
|
||||
handleLinkSpinAttack__18dTgMassObjInstanceFP10GrassModel = .text:0x80279210; // type:function size:0x394
|
||||
isHidden__18dTgMassObjInstanceFff = .text:0x802795B0; // type:function size:0xBC
|
||||
handleTimeshiftZone__18dTgMassObjInstanceFv = .text:0x80279670; // type:function size:0xC8
|
||||
tryCreateLinkedLists__14GrassModelDataFlPQ23EGG4Heap = .text:0x80279740; // type:function size:0x84
|
||||
destroyLinkedLists__14GrassModelDataFv = .text:0x802797D0; // type:function size:0x48
|
||||
unloadRoom__14GrassModelDataFP10GrassModeli = .text:0x80279820; // type:function size:0xD0
|
||||
initRes__14GrassModelDataFQ34nw4r3g3d6ResMatQ34nw4r3g3d6ResShp = .text:0x802798F0; // type:function size:0x64
|
||||
addToRoom__14GrassModelDataFlP18dTgMassObjInstance = .text:0x80279960; // type:function size:0x60
|
||||
removeFromRoom__14GrassModelDataFlP18dTgMassObjInstance = .text:0x802799C0; // type:function size:0x64
|
||||
update__14GrassModelDataFP10GrassModel = .text:0x80279A30; // type:function size:0x1D4
|
||||
draw__14GrassModelDataFffPQ34nw4r4math5MTX34 = .text:0x80279C10; // type:function size:0x418
|
||||
__dt__12dTgMassObj_cFv = .text:0x8027A030; // type:function size:0x5C
|
||||
drawXlu__10GrassModelFv = .text:0x8027A090; // type:function size:0x4
|
||||
drawOpa__10GrassModelFv = .text:0x8027A0A0; // type:function size:0x4
|
||||
TgCamera__ctor = .text:0x8027A0B0; // type:function size:0x4C
|
||||
TgCamera__init = .text:0x8027A100; // type:function size:0x54
|
||||
fn_8027A160 = .text:0x8027A160; // type:function size:0x68
|
||||
@@ -28649,8 +28649,10 @@ lbl_804EE3B8 = .rodata:0x804EE3B8; // type:object size:0xC0 data:4byte
|
||||
@LOCAL@checkIsClear__9dAcTbox_cCFv@fsIdxes@0 = .rodata:0x804EE478; // type:object size:0xD0 data:4byte
|
||||
lbl_804EE548 = .rodata:0x804EE548; // type:object size:0x30
|
||||
lbl_804EE578 = .rodata:0x804EE578; // type:object size:0x30 align:4 data:float
|
||||
TgMassObj__GRASS_A_TYPES = .rodata:0x804EE5A8; // type:object size:0xF8 data:4byte
|
||||
lbl_804EE6A0 = .rodata:0x804EE6A0; // type:object size:0x20
|
||||
GRASS_A_TYPES = .rodata:0x804EE5A8; // type:object size:0x8C data:4byte
|
||||
GRASS_MODEL_NAMES = .rodata:0x804EE634; // type:object size:0x3C data:4byte
|
||||
GRASS_VECS = .rodata:0x804EE670; // type:object size:0x30 data:4byte
|
||||
@LOCAL@FUN_80279c10__14GrassModelDataFffP6mMtx_c@fifoMtx = .rodata:0x804EE6A0; // type:object size:0x20
|
||||
lbl_804EE6C0 = .rodata:0x804EE6C0; // type:object size:0x40 data:4byte
|
||||
lbl_804EE700 = .rodata:0x804EE700; // type:object size:0x28 data:4byte
|
||||
lbl_804EE728 = .rodata:0x804EE728; // type:object size:0x28
|
||||
@@ -36451,9 +36453,9 @@ lbl_80536500 = .data:0x80536500; // type:object size:0xA data:string
|
||||
lbl_8053650C = .data:0x8053650C; // type:object size:0xA data:string
|
||||
lbl_80536518 = .data:0x80536518; // type:object size:0x1A data:string
|
||||
jumptable_80536534 = .data:0x80536534; // type:object size:0x28 scope:local
|
||||
TgMassObj__vtable = .data:0x8053655C; // type:object size:0x74
|
||||
lbl_805365D0 = .data:0x805365D0; // type:object size:0x2C
|
||||
lbl_805365FC = .data:0x805365FC; // type:object size:0xC
|
||||
__vt__12dTgMassObj_c = .data:0x8053655C; // type:object size:0x74
|
||||
__vt__10GrassModel = .data:0x805365D0; // type:object size:0x2C
|
||||
__vt__14GrassModelData = .data:0x805365FC; // type:object size:0xC
|
||||
g_profile_CAMERA_TAG = .data:0x80536608; // type:object size:0x10
|
||||
TgCamera__vtable = .data:0x80536618; // type:object size:0x10
|
||||
lbl_80536628 = .data:0x80536628; // type:object size:0x68
|
||||
@@ -42566,7 +42568,7 @@ sCurrentObtainingItemOarcName = .sbss:0x80575918; // type:object size:0x4 data:4
|
||||
@GUARD@checkIsClear__9dAcTbox_cCFv@offsets = .sbss:0x80575927; // type:object size:0x1 data:byte
|
||||
lbl_80575928 = .sbss:0x80575928; // type:object size:0x8 data:byte
|
||||
sInstance__12dTgMassObj_c = .sbss:0x80575930; // type:object size:0x4 data:4byte
|
||||
lbl_80575934 = .sbss:0x80575934; // type:object size:0x4 data:4byte
|
||||
sAllocator__12dTgMassObj_c = .sbss:0x80575934; // type:object size:0x4 data:4byte
|
||||
sDisp00ArrowRotation__14dLytPauseMgr_c = .sbss:0x80575938; // type:object size:0x4 align:4 data:float
|
||||
sDisp00ArrowLength__14dLytPauseMgr_c = .sbss:0x8057593C; // type:object size:0x4 align:4 data:float
|
||||
sInstance__14dLytPauseMgr_c = .sbss:0x80575940; // type:object size:0x4 data:4byte
|
||||
@@ -42636,7 +42638,7 @@ Udchuff = .sbss:0x80575B40; // type:object size:0x20 data:4byte
|
||||
Ydchuff = .sbss:0x80575B60; // type:object size:0x8 data:4byte
|
||||
sm_numberMemo__10sStateID_c = .sbss:0x80575B68; // type:object size:0x4 data:4byte
|
||||
sAssertCallback__7sAssert = .sbss:0x80575B70; // type:object size:0x4 data:4byte
|
||||
cCounter_c__m_gameFrame = .sbss:0x80575B78; // type:object size:0x4 data:4byte
|
||||
m_gameFrame__10cCounter_c = .sbss:0x80575B78; // type:object size:0x4 data:4byte
|
||||
lbl_80575B7C = .sbss:0x80575B7C; // type:object size:0x4 data:4byte
|
||||
mFirst__24DynamicModuleControlBase = .sbss:0x80575B80; // type:object size:0x4 data:4byte
|
||||
mLast__24DynamicModuleControlBase = .sbss:0x80575B84; // type:object size:0x4 data:4byte
|
||||
@@ -52391,7 +52393,7 @@ StateID_On__7dTgSw_c = .bss:0x805B56F8; // type:object size:0x30 data:4byte
|
||||
StateID_OffWait__7dTgSw_c = .bss:0x805B5738; // type:object size:0x30 data:4byte
|
||||
@5126 = .bss:0x805B5768; // type:object size:0xC scope:local
|
||||
StateID_Off__7dTgSw_c = .bss:0x805B5778; // type:object size:0x30 data:4byte
|
||||
lbl_805B57A8 = .bss:0x805B57A8; // type:object size:0x18 data:4byte
|
||||
sGrassModels__12dTgMassObj_c = .bss:0x805B57A8; // type:object size:0x14 data:4byte
|
||||
lbl_805B57C0 = .bss:0x805B57C0; // type:object size:0x10
|
||||
TgTkEvnt__STATE_WAIT = .bss:0x805B57D0; // type:object size:0x30 data:4byte
|
||||
lbl_805B5800 = .bss:0x805B5800; // type:object size:0x10
|
||||
|
||||
@@ -214,8 +214,8 @@ namespace JMathInlineVEC {
|
||||
}
|
||||
|
||||
inline f32 C_VECSquareMag(register const Vec* v) {
|
||||
register f32 x_y;
|
||||
register f32 z;
|
||||
register f32 x_y;
|
||||
register f32 res;
|
||||
#ifdef __MWERKS__
|
||||
asm {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef C_COUNTER_H
|
||||
#define C_COUNTER_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
class cCounter_c {
|
||||
public:
|
||||
static s32 GetGameFrame() {
|
||||
return m_gameFrame;
|
||||
}
|
||||
private:
|
||||
static s32 m_gameFrame;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -158,6 +158,9 @@ public:
|
||||
mVec3_c &getPosition() {
|
||||
return mPosition;
|
||||
}
|
||||
mVec3_c const &getPosition() const {
|
||||
return mPosition;
|
||||
}
|
||||
mAng3_c &getRotation() {
|
||||
return mRotation;
|
||||
}
|
||||
@@ -166,6 +169,11 @@ public:
|
||||
return mPosition - other.mPosition;
|
||||
}
|
||||
|
||||
void getPostionDifferenceOut(const mVec3_c &other, mVec3_c& result) const {
|
||||
mVec3_c diff = (other - mPosition);
|
||||
result = diff;
|
||||
}
|
||||
|
||||
f32 getHeightDifference(const dAcBase_c &b) const {
|
||||
return mPosition.y - b.mPosition.y;
|
||||
}
|
||||
@@ -194,6 +202,10 @@ public:
|
||||
return mRoomID == room;
|
||||
}
|
||||
|
||||
void setRoomId(u32 room) {
|
||||
mRoomID = room;
|
||||
}
|
||||
|
||||
void unsetActorProperty(u32 property) {
|
||||
mActorProperties &= ~property;
|
||||
}
|
||||
|
||||
@@ -751,6 +751,13 @@ public:
|
||||
|
||||
const mVec3_c &GetAtHitPos() const;
|
||||
mVec3_c &GetAtHitPos();
|
||||
const mVec3_c &GetAtHitPosInline() const {
|
||||
return mAt.mHitPos;
|
||||
}
|
||||
|
||||
mVec3_c &GetAtHitPosInline() {
|
||||
return mAt.mHitPos;
|
||||
}
|
||||
bool GetAtFlag0x2() const;
|
||||
bool GetAtFlag0x4() const;
|
||||
bool GetAtFlag0x8() const;
|
||||
@@ -773,6 +780,9 @@ public:
|
||||
|
||||
bool ChkTgAtHitType(u32) const;
|
||||
u32 GetTgAtHitType() const;
|
||||
bool ChkAtType(u32 mask) const {
|
||||
return mAt.MskType(mask);
|
||||
}
|
||||
bool ChkTgBit14() const;
|
||||
u8 GetTgDamage() const;
|
||||
u16 GetTgDamageFlags() const;
|
||||
@@ -1051,6 +1061,12 @@ public:
|
||||
u32 ChkCo_0x40000000() {
|
||||
return mCo.MskSPrm(0x40000000);
|
||||
}
|
||||
u32 ChkCo_0x10() {
|
||||
return mCo.MskSPrm(0x10);
|
||||
}
|
||||
u32 ChkCo_0x2() {
|
||||
return mCo.MskSPrm(0x2);
|
||||
}
|
||||
|
||||
/**
|
||||
* SET HIT
|
||||
|
||||
@@ -63,6 +63,9 @@ public:
|
||||
cCcD_Obj *GetAtHitObj() const {
|
||||
return mpAtObj;
|
||||
}
|
||||
cCcD_Obj *GetCoHitObj() const {
|
||||
return mpCoObj;
|
||||
}
|
||||
};
|
||||
|
||||
class dCcMassS_Mng {
|
||||
|
||||
+29
-1
@@ -434,6 +434,30 @@ public:
|
||||
return field_0x2F1C;
|
||||
}
|
||||
|
||||
bool getfield_0x38B0() const {
|
||||
return field_0x38B0;
|
||||
}
|
||||
|
||||
void setfield_0x38B0(bool val) {
|
||||
field_0x38B0 = val;
|
||||
}
|
||||
|
||||
f32 getfield_0x38C0() const {
|
||||
return field_0x38C0;
|
||||
}
|
||||
|
||||
const mVec3_c& getfield_0x38B4() const {
|
||||
return field_0x38B4;
|
||||
}
|
||||
|
||||
mVec3_c& getfield_0x38C8() {
|
||||
return field_0x38C8;
|
||||
}
|
||||
|
||||
void setfield_0x38C4(s32 val) {
|
||||
field_0x38C4 = val;
|
||||
}
|
||||
|
||||
s32 getField_0x38DC() const {
|
||||
return field_0x38DC;
|
||||
}
|
||||
@@ -442,6 +466,10 @@ public:
|
||||
field_0x38DC = v;
|
||||
}
|
||||
|
||||
f32 getfield_0x5D44() const {
|
||||
return field_0x5D44;
|
||||
}
|
||||
|
||||
void setField_0x5D48(f32 val) {
|
||||
field_0x5D48 = val;
|
||||
}
|
||||
@@ -503,7 +531,7 @@ private:
|
||||
/* 0x48E4 */ Bpm4 field_0x48E4;
|
||||
/* 0x5CE4 */ PaletteDefaultMCF field_0x5CE4;
|
||||
/* 0x5D04 */ TwoPaletteDefaultMCF field_0x5D04;
|
||||
/* 0x5D44 */ u8 field_0x5D44[0x5D48 - 0x5D44];
|
||||
/* 0x5D44 */ f32 field_0x5D44;
|
||||
/* 0x5D48 */ f32 field_0x5D48;
|
||||
/* 0x5D4C */ u8 field_0x5D4C[0x5D59 - 0x5D4C];
|
||||
/* 0x5D59 */ struct { // Anonymous until more is known
|
||||
|
||||
@@ -61,8 +61,8 @@ public:
|
||||
/* vt 0x0C0 */ virtual bool isUsingWhip() const {
|
||||
return false;
|
||||
}
|
||||
/* vt 0x0C4 */ virtual bool anotherThingWithWhip() {
|
||||
return false;
|
||||
/* vt 0x0C4 */ virtual const mVec3_c* anotherThingWithWhip() {
|
||||
return nullptr;
|
||||
}
|
||||
/* vt 0x0C8 */ virtual bool somethingWithWHip() {
|
||||
return false;
|
||||
@@ -642,7 +642,7 @@ public:
|
||||
return mAttackDirection == ATTACK_JUMP_SLASH;
|
||||
}
|
||||
|
||||
u16 getSpecificAttackDirection() const {
|
||||
s32 getSpecificAttackDirection() const {
|
||||
return mSpecificAttackDirection;
|
||||
}
|
||||
|
||||
@@ -650,6 +650,10 @@ public:
|
||||
return vt_0x1C0() != nullptr;
|
||||
}
|
||||
|
||||
static s32 getCurrentSwordTypeInline() {
|
||||
return sCurrentSword;
|
||||
}
|
||||
|
||||
static bool isInEvent();
|
||||
bool isAttackingLeft() const;
|
||||
bool isAttackingRight() const;
|
||||
|
||||
@@ -1,7 +1,255 @@
|
||||
#ifndef D_T_MASS_OBJ_H
|
||||
#define D_T_MASS_OBJ_H
|
||||
|
||||
#include "c/c_math.h"
|
||||
#include "common.h"
|
||||
#include "d/d_heap.h"
|
||||
#include "d/t/d_tg.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "egg/math/eggMatrix.h"
|
||||
#include "egg/math/eggQuat.h"
|
||||
#include "m/m3d/m_proc.h"
|
||||
#include "m/m3d/m_scnleaf.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_color.h"
|
||||
#include "m/m_heap.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_quat.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/res/g3d_resmat.h"
|
||||
#include "nw4r/g3d/res/g3d_resshp.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
#include "rvl/GX/GXTypes.h"
|
||||
#include "s/s_Math.h"
|
||||
#include "toBeSorted/tlist.h"
|
||||
|
||||
class dTgMassObjInstance;
|
||||
class dTgMassObjTransform;
|
||||
class GrassModel;
|
||||
class GrassModelData;
|
||||
class dCcMassS_HitInf;
|
||||
class dAcObjBase_c;
|
||||
|
||||
typedef TList<dTgMassObjInstance, 0> dTgMassObjInstanceList;
|
||||
typedef TList<dTgMassObjTransform, 0> dTgMassObjTransformList;
|
||||
|
||||
// a single piece of grass
|
||||
// dTgMassObjInstance
|
||||
// size: 0x34
|
||||
class dTgMassObjInstance {
|
||||
public:
|
||||
enum Flags {
|
||||
TG_MASS_UNK2_IS_HIDDEN = 1,
|
||||
TG_MASS_UNK2_IS_CUT = 2,
|
||||
TG_MASS_UNK2_TIMESHIFT_RELATED = 4,
|
||||
};
|
||||
dTgMassObjInstance(){
|
||||
reset();
|
||||
}
|
||||
~dTgMassObjInstance() {}
|
||||
void reset();
|
||||
void releaseDynamicTransform(GrassModel *param_2);
|
||||
s32 checkForHit(GrassModel *param2,GrassModelData *param3,u16 roomid);
|
||||
undefined4 checkForHit(u32 param_2,dCcMassS_HitInf& param_3,dAcObjBase_c* param_4,
|
||||
GrassModel *param_5,GrassModelData* param_6,undefined4 roomid);
|
||||
undefined4 FUN_80278c70(u32 param_2,dCcMassS_HitInf & param_3,dAcBase_c *param_4,
|
||||
GrassModel *param_5);
|
||||
undefined4 handleLinkSpinAttack(GrassModel *param_2);
|
||||
s32 handleTimeshiftZone();
|
||||
void getDrawMatrix(mMtx_c *pOut);
|
||||
bool isHidden(f32 param2, f32 param3);
|
||||
bool isItemDrop10() const {
|
||||
return mSpecialItemDropId == 10;
|
||||
}
|
||||
|
||||
// private:
|
||||
/* 0x00 */ TListNode<dTgMassObjInstance> mLink;
|
||||
/* 0x08 */ GXColorS10 mTevColor;
|
||||
/* 0x10 */ mVec3_c mGroundHeight;
|
||||
/* 0x1C */ dTgMassObjTransform *mInitPosTransform;
|
||||
/* 0x20 */ dTgMassObjTransform *mDynamicTransform;
|
||||
/* 0x24 */ f32 field_0x24; // unused?
|
||||
/* 0x28 */ f32 mScale;
|
||||
/* 0x2C */ u16 mGrassFlags;
|
||||
/* 0x2E */ u16 yRotation;
|
||||
/* 0x30 */ u8 mSpecialItemDropId;
|
||||
/* 0x31 */ u8 mLightingCode;
|
||||
/* 0x32 */ u8 mMassObjSubtype;
|
||||
/* 0x33 */ bool mActiveInPresent;
|
||||
};
|
||||
|
||||
// a transform for a single piece of grass
|
||||
// size: 0x50
|
||||
class dTgMassObjTransform {
|
||||
public:
|
||||
|
||||
dTgMassObjTransform();
|
||||
~dTgMassObjTransform() {}
|
||||
void update();
|
||||
const mMtx_c& getMtx() const {
|
||||
return mMtx;
|
||||
}
|
||||
|
||||
void setQuat(const mQuat_c& quat) {
|
||||
mQuat.set(quat);
|
||||
}
|
||||
|
||||
void setMtxFromQuat(const mQuat_c& quat) {
|
||||
mMtx.fromQuat(quat);
|
||||
}
|
||||
|
||||
/* 0x00 */ s32 field_0x00;
|
||||
/* 0x04 */ s32 field_0x04;
|
||||
/* 0x08 */ mMtx_c mMtx;
|
||||
/* 0x38 */ mAng mRotY;
|
||||
/* 0x3A */ mAng mRotX;
|
||||
/* 0x3C */ s16 mRotXSpeed;
|
||||
/* 0x40 */ EGG::Quatf mQuat;
|
||||
};
|
||||
|
||||
class GrassModelData {
|
||||
public:
|
||||
GrassModelData() : mLinkedLists(nullptr) {}
|
||||
virtual ~GrassModelData() {
|
||||
destroyLinkedLists();
|
||||
}
|
||||
void initRes(nw4r::g3d::ResMat pResMat, nw4r::g3d::ResShp pResShp);
|
||||
void addToRoom(s32 room, dTgMassObjInstance* p3);
|
||||
void removeFromRoom(s32 room, dTgMassObjInstance* p3);
|
||||
void update(GrassModel*);
|
||||
bool tryCreateLinkedLists(s32 entrycount, EGG::Heap* heap);
|
||||
void destroyLinkedLists();
|
||||
void unloadRoom(GrassModel *param_2,int roomid);
|
||||
void draw(f32 param_1,f32 param_2,
|
||||
nw4r::math::MTX34 *param_4);
|
||||
private:
|
||||
/* 0x04 */ nw4r::g3d::ResMat mResMat;
|
||||
/* 0x08 */ nw4r::g3d::ResShp mResShp;
|
||||
/* 0x0C */ dTgMassObjInstanceList* mLinkedLists;
|
||||
/* 0x10 */ u16 mLinkedListsCount;
|
||||
};
|
||||
|
||||
struct GrassModelInfo {
|
||||
/* 0x00 */ char* mArcName;
|
||||
/* 0x04 */ char* mModelName;
|
||||
/* 0x08 */ char* mCutModelName;
|
||||
/* 0x0C */ u32 field_0x0C;
|
||||
/* 0x10 */ u16 mRadius;
|
||||
/* 0x12 */ u16 field_0x12;
|
||||
/* 0x14 */ u16 mInstanceCount;
|
||||
/* 0x16 */ u16 mStaticTransformCount;
|
||||
/* 0x18 */ u16 mDynamicTransformCount;
|
||||
/* 0x1A */ u8 field_0x1A;
|
||||
/* 0x1B */ u8 field_0x1B; // might be padding
|
||||
};
|
||||
|
||||
|
||||
struct GrassModelNames {
|
||||
/* 0x00 */ char* mArcName;
|
||||
/* 0x04 */ char* mModelName;
|
||||
/* 0x08 */ char* mCutModelName;
|
||||
};
|
||||
|
||||
class GrassModel : public m3d::proc_c {
|
||||
public:
|
||||
GrassModel() : mpModelData(nullptr), mInstanceList(nullptr), mStaticTransformationList(nullptr), mDynamicTransformationList(nullptr), mCutCounter(0) {}
|
||||
/* vt 0x08 */ virtual ~GrassModel() {
|
||||
remove();
|
||||
}
|
||||
undefined4
|
||||
setModelInfo(f32 radius,f32 param_2,int param_4,
|
||||
s32 roomCount,u16 instanceListLength,u16 staticTransformationListLength,int dynamicTransformationListLength,
|
||||
undefined1 param_9,s32 opaDrawPrio,u32 xluDrawPrio,mHeapAllocator_c *allocator);
|
||||
undefined4
|
||||
spawnSingleGrass(int modelSubtype,u16 roomid,mVec3_c *groundHeight,
|
||||
u16 yRotation,s32 specialItemDropId,int affectedByTimeshift,int activeInPresent,
|
||||
s32 massObjSubtype,u8 lightingCode);
|
||||
void addToFreeInstances(dTgMassObjInstance *param_2);
|
||||
s32 addToRoom(u32 param2, s32 roomid, dTgMassObjInstance* param4);
|
||||
void unloadRoom(u16 roomid);
|
||||
void initResForModel(s32 param_2,nw4r::g3d::ResMat pResMat,nw4r::g3d::ResShp pResShp);
|
||||
dTgMassObjTransform* aquireTransform();
|
||||
void update();
|
||||
void releaseTransform(dTgMassObjTransform*);
|
||||
void setModelInfo(const GrassModelInfo* modelInfo, mHeapAllocator_c * heap) {
|
||||
setModelInfo(
|
||||
modelInfo->mRadius, modelInfo->field_0x0C,
|
||||
modelInfo->field_0x12, 0x3F,
|
||||
modelInfo->mInstanceCount, modelInfo->mStaticTransformCount,
|
||||
modelInfo->mDynamicTransformCount, (f32)modelInfo->field_0x1A,
|
||||
0x7F, 0xFFFFFFFF, heap
|
||||
);
|
||||
}
|
||||
|
||||
void setRadius(f32 r) {
|
||||
mRadius = r;
|
||||
mRadiusSquared = r * r;
|
||||
}
|
||||
|
||||
void setInstanceLength(s32 len) {
|
||||
mInstanceListLength = len;
|
||||
}
|
||||
|
||||
s32 getInstanceListLength() const {
|
||||
return mInstanceListLength;
|
||||
}
|
||||
|
||||
s32 getDynamicTransformListLength() const {
|
||||
return mDynamicTransformationListLength;
|
||||
}
|
||||
|
||||
dTgMassObjInstanceList& getFree() {
|
||||
return mFreeInstances;
|
||||
}
|
||||
|
||||
bool testSpecialItemtype(s32 itemtype) {
|
||||
return itemtype == 10;
|
||||
}
|
||||
|
||||
/* vt 0x10 */ virtual void remove() override;
|
||||
// /* vt 0x14 */ virtual int entry();
|
||||
/* vt 0x18 */ virtual void drawOpa() override {
|
||||
draw();
|
||||
}
|
||||
/* vt 0x1C */ virtual void drawXlu() override {
|
||||
draw();
|
||||
}
|
||||
void draw();
|
||||
|
||||
void calcCutCounter() {
|
||||
mCutCounter = (mCutCounter != 0) ? mCutCounter-1 : mCutCounter;
|
||||
}
|
||||
|
||||
dTgMassObjTransformList& GetUnk3Too() {
|
||||
return mAquiredTransforms;
|
||||
}
|
||||
|
||||
dTgMassObjTransformList& GetUnk3() {
|
||||
return mAvailableTransforms;
|
||||
}
|
||||
|
||||
// private:
|
||||
/* 0x18 */ GrassModelData* mpModelData;
|
||||
/* 0x1C */ dTgMassObjInstance* mInstanceList;
|
||||
/* 0x20 */ dTgMassObjTransform* mStaticTransformationList;
|
||||
/* 0x24 */ dTgMassObjTransform* mDynamicTransformationList;
|
||||
/* 0x28 */ dTgMassObjInstanceList mFreeInstances;
|
||||
/* 0x34 */ dTgMassObjTransformList mAquiredTransforms;
|
||||
/* 0x40 */ dTgMassObjTransformList mAvailableTransforms;
|
||||
/* 0x4C */ f32 mRadius;
|
||||
/* 0x50 */ f32 mRadiusSquared;
|
||||
/* 0x54 */ f32 field_0x54;
|
||||
/* 0x58 */ u16 field_0x58;
|
||||
/* 0x5A */ u16 mRoomCount;
|
||||
/* 0x5C */ u16 mInstanceListLength;
|
||||
/* 0x5E */ u16 mStaticTransformationListLength;
|
||||
/* 0x60 */ u16 mDynamicTransformationListLength;
|
||||
/* 0x62 */ u8 field_0x62;
|
||||
/* 0x63 */ u8 field_0x63;
|
||||
/* 0x64 */ s16 mCutCounter;
|
||||
/* 0x66 */ u8 field_0x66;
|
||||
/* 0x67 */ u8 field_0x67;
|
||||
};
|
||||
|
||||
class dTgMassObj_c : public dTg_c {
|
||||
public:
|
||||
@@ -12,10 +260,63 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
static u8 getCurrentStageGrassSubtype();
|
||||
|
||||
void unloadRoom(u16 roomid);
|
||||
|
||||
int initializeCircle(GrassModel *grassModel, mVec3_c *bbStart, mVec3_c *bbEnd,s32 xzDisplacement,mMtx_c *param_7,s32 specialItemDropId,
|
||||
undefined4 affectedByTimeshift,u8 activeInPresent,int randInt,s32 massObjSubtype,
|
||||
u8 lightingCode, f32 fParam);
|
||||
|
||||
int initializeBox(GrassModel *grassModel,mVec3_c *minVec,
|
||||
mVec3_c *maxVec,int xzDisplacement,mMtx_c *boundsMtx,int specialItemDropId,undefined4 affectedByTimeshift,
|
||||
u8 activeInPresent,int randInt,s32 massObjSubtype,u8 lightingCode, f32 fParam);
|
||||
|
||||
virtual int actorExecute() override;
|
||||
virtual int actorCreate() override;
|
||||
virtual int actorPostCreate() override;
|
||||
virtual int draw() override;
|
||||
virtual int doDelete() override;
|
||||
|
||||
mMtx_c getPreparedMtx() const {
|
||||
mMtx_c mtx;
|
||||
mtx.transS(mPosition);
|
||||
mtx.YrotM(mRotation.y);
|
||||
mtx.scaleM(mScale);
|
||||
mMtx_c mtx2 = mtx;
|
||||
mtx2.inverse();
|
||||
return mtx2;
|
||||
}
|
||||
|
||||
GrassModel* getGrassModel(s32 i) {
|
||||
return sGrassModels[i];
|
||||
}
|
||||
|
||||
void toGlobalRoom() {
|
||||
s8 roomid = getRoomId();
|
||||
addActorToRoom(-1);
|
||||
mRoomID = roomid;
|
||||
}
|
||||
|
||||
s32 getGrassTypeFromParams() {
|
||||
return getFromParams(0, 7);
|
||||
}
|
||||
|
||||
mMtx_c makeBoundsMtx() {
|
||||
mMtx_c mtx;
|
||||
mtx.transS(mPosition);
|
||||
mtx.YrotM(mRotation.y);
|
||||
mtx.scaleM(mScale);
|
||||
return mtx;
|
||||
}
|
||||
|
||||
private:
|
||||
static dTgMassObj_c *sInstance;
|
||||
static mHeapAllocator_c *sAllocator;
|
||||
static GrassModel *sGrassModels[5];
|
||||
|
||||
/* 0x0FC */ s32 mMassSubtype;
|
||||
/* 0x100 */ u8 field_0xFC[0x104 - 0x100];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,10 +44,26 @@ struct Quatf {
|
||||
Vector3f rotateVector(const Vector3f &);
|
||||
Vector3f rotateVectorInv(const Vector3f &); // not in SS
|
||||
void slerpTo(const Quatf &, f32, Quatf &out) const;
|
||||
void slerpTo2(f32 fparam,const Quatf & param1, Quatf &out ) const {
|
||||
const Quatf & tmp = param1;
|
||||
slerpTo(tmp, fparam, out);
|
||||
}
|
||||
void limitSlerpTo(const Quatf &, f32, f32, Quatf &out) const;
|
||||
void makeVectorRotationLimit(Vector3f &, Vector3f &, f32); // not in SS
|
||||
void makeVectorRotation(const Vector3f &, const Vector3f &);
|
||||
|
||||
// not sure about the name
|
||||
f32 dot(const Quatf& other) const {
|
||||
f32 ret = v.dot(other.v);
|
||||
ret += w * other.w;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void set(const Quatf& other) {
|
||||
v.set(other.v);
|
||||
w = other.w;
|
||||
}
|
||||
|
||||
void multScalar(f32 s) {
|
||||
w *= s;
|
||||
v.x *= s;
|
||||
@@ -58,6 +74,12 @@ struct Quatf {
|
||||
set(1.0f, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
void makeWPositive() {
|
||||
if (w < 0.f) {
|
||||
multScalar(-1.f);
|
||||
}
|
||||
}
|
||||
|
||||
Vector3f v;
|
||||
f32 w;
|
||||
};
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
#ifndef EGG_VECTOR_H
|
||||
#define EGG_VECTOR_H
|
||||
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "common.h"
|
||||
#include "egg/math/eggMath.h"
|
||||
#include "nw4r/math/math_arithmetic.h"
|
||||
#include "nw4r/math/math_triangular.h"
|
||||
|
||||
#include "nw4r/math.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace EGG {
|
||||
|
||||
@@ -132,6 +135,10 @@ struct Vector3f : public nw4r::math::VEC3 {
|
||||
return squaredLength() <= Math<f32>::epsilon();
|
||||
}
|
||||
|
||||
bool isZero2() const {
|
||||
return fabsf(JMathInlineVEC::C_VECSquareMag(*this)) <= Math<f32>::epsilon();
|
||||
}
|
||||
|
||||
void setZero() {
|
||||
x = y = z = 0.0f;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,11 @@ public:
|
||||
void inverse() {
|
||||
MTXInverse(*this, *this);
|
||||
}
|
||||
mMtx_c copyInverse() {
|
||||
mMtx_c ret = *this;
|
||||
ret.inverse();
|
||||
return ret;
|
||||
}
|
||||
void multVecZero(nw4r::math::VEC3 &out) const; ///< Converts the matrix to a vector.
|
||||
void zero(); ///< Zeroes out the matrix.
|
||||
|
||||
@@ -142,6 +147,11 @@ public:
|
||||
MTXMultVec(*this, ret, ret);
|
||||
return ret;
|
||||
}
|
||||
mVec3_c multVec2(const mVec3_c &v) const {
|
||||
mVec3_c ret;
|
||||
MTXMultVec(*this, v, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void multVecSR(const mVec3_c &in, mVec3_c &out) const {
|
||||
MTXMultVecSR(*this, in, out);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define NW4R_UT_COLOR_H
|
||||
|
||||
#include "nw4r/types_nw4r.h"
|
||||
#include "rvl/GX/GXTypes.h"
|
||||
#include "rvl/GX.h" // IWYU pragma: export
|
||||
|
||||
namespace nw4r {
|
||||
@@ -61,6 +62,16 @@ public:
|
||||
operator u32() const {
|
||||
return ToU32ref();
|
||||
}
|
||||
|
||||
operator GXColorS10() const {
|
||||
GXColorS10 c;
|
||||
c.r = r;
|
||||
c.g = g;
|
||||
c.b = b;
|
||||
c.a = a;
|
||||
return c;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const u32 RED = 0xFF0000FF;
|
||||
static const u32 GREEN = 0x00FF00FF;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user