Skip to content
16 changes: 16 additions & 0 deletions include/JSystem/JGeometry/Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,22 @@ namespace JGeometry {
rDest.set(x, y, z);
}

inline void getYDirInline(TVec3f &rDest) const
{
f32 z = this->mMtx[2][1];
f32 y = this->mMtx[1][1];
f32 x = this->mMtx[0][1];
rDest.set(x, y, z);
}

inline void getZDirInline(TVec3f &rDest) const
{
f32 z = this->mMtx[2][2];
f32 y = this->mMtx[1][2];
f32 x = this->mMtx[0][2];
rDest.set(x, y, z);
}

#ifdef NON_MATCHING
inline void mult33Inline(const TVec3f &rSrc, TVec3f &rDest) const
{
Expand Down
1 change: 1 addition & 0 deletions include/JSystem/JSupport/JSUList.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class JSUList : public JSUPtrList

JSULink<T> *getFirst() const { return (JSULink<T> *)getFirstLink(); }
JSULink<T> *getLast() const { return (JSULink<T> *)getLastLink(); }
JSULink<T> *getNth(u32 index) const { return (JSULink<T> *)getNthLink(index); }
JSULink<T> *getEnd() const { return nullptr; }

u32 getNumLinks() const { return mLinkCount; }
Expand Down
1 change: 1 addition & 0 deletions include/Kaneshige/Course/CrsArea.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CrsArea
void searchLight(const JGeometry::TVec3f &p1) { search(7, p1); }

bool isInside() const { return mArea != nullptr; }
Course::Area *getArea() const { return mArea; }
f32 getRate() const { return mRate; }
f32 getShadowRate() const { return getRate(); }

Expand Down
105 changes: 105 additions & 0 deletions include/Sato/StringObj.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#ifndef STRINGOBJ_H
#define STRINGOBJ_H

#include "Inagaki/GameSoundMgr.h"
#include "JSystem/J3DU/J3DUClipper.h"
#include "JSystem/JGeometry/Vec.h"
#include "JSystem/JSupport/JSUList.h"
#include "Kaneshige/DarkAnmMgr.h"
#include "Kaneshige/ExModel.h"

// Forward declarations
class ExStringNodeManager;
class StringNodeManager;

class StringObj {
StringObj(u8, bool);
virtual ~StringObj() { return; };
void createModel(JKRSolidHeap *, u32);
void loadmodel(J3DModelData *);
void reset();
virtual void calc();
void update();
void setCurrentViewNo(u32);
void drawSimpleModel(u32, Mtx, J3DUClipper *, Mtx);

public:
// VTBL: 0x0
StringNodeManager *mStringNodeMgr; // 0x4
ExModel *mExModel; // 0x8
u32 _c;
f32 mScale; // 0x10
Mtx *_14;
u8 _18;
u8 _19[3]; // Padding?
ItemDarkAnmPlayer **mItemDarkAnmPlayer; // 0x1c
};

class StringNode {
public:
StringNode();
~StringNode();
void calc();

JGeometry::TVec3f mVel; // 0x0
JGeometry::TVec3f mPos; // 0xc
JGeometry::TVec3f _18; // 0x18
JGeometry::TVec3f _24; // 0x24
u8 _30; // 0x30
u8 _31; // 0x31
u8 _32[2]; // Padding?
f32 _34; // 0x34
JSULink<StringNode> _38; // 0x38
};

class StringNodeManager {
public:
StringNodeManager(u8, f32, bool, bool, u8);
virtual ~StringNodeManager();

void setAllNodePos(const JGeometry::TVec3f &);
void calc();
virtual void calcBetweenNodePosAll(f32);
void calcBetweenNodePos(StringNode *, StringNode *, f32, f32);
void resetNodeAll(JGeometry::TVec3f *);
void moveNodeAll();
void doAirFricG(f32, f32);
void doHeightCol();
void getNodeVel(u32, JGeometry::TVec3f *);
void getNodePos(u32, JGeometry::TVec3f *);
void addNodeVel(u32, JGeometry::TVec3f);
void setNodeVel(u32, JGeometry::TVec3f);
void addNodePos(u32, JGeometry::TVec3f);
void setNodePos(u32, JGeometry::TVec3f);

// VTBL: 0x0
JSUList<StringNode> mStrNodeList; // 0x4
f32 _10;
f32 _14;
f32 _18;
f32 _1c;
f32 _20; // Scaling multiplier of some sort.
f32 _24; // Something related to distance calculations...?
Vec _28;
StringNode *_34;
GameAudio::ObjectSoundMgr *mObjSoundMgr; // 0x38
u32 _3c;
u8 _40;
u8 _41[3]; // Padding?
f32 _44;
CrsGround *mCrsGround; // 0x48
u8 _4c;
u8 _4d[3]; // Padding?
};

class ExStringNodeManager : public StringNodeManager {
public:
ExStringNodeManager();
~ExStringNodeManager();
virtual void calcBetweenNodePosAll(f32);
void setNodeLengthAll(f32);

f32 _50;
};

#endif // STRINGOBJ_H
Loading