mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 12:37:18 -04:00
Merge decomp/main into dusk
Merges 44 upstream commits from zeldaret/tp decomp/main. Conflict resolutions: - .github/workflows/build.yml: keep deleted (not needed for PC port) - README.md: keep PC port README - J3DAnimation.h: keep OFFSET_PTR macro + add upstream forward decl - J3DModelLoader.h: keep BE(u32) mBlockNum + add field_0x1c - d_com_inf_game.h: keep PC port inlines + add upstream declarations - global.h: keep MULTI_CHAR macro + add FABSF macro - JUTConsole.cpp: keep uintptr_t cast for 64-bit - JUTDbPrint.cpp: keep PC enter_() helper + add cstring include - JUTResFont.cpp: take upstream loop/struct improvements with BE types - JUTCacheFont.cpp: take upstream decomp fix - float.h: use upstream !PLATFORM_GCN guard - d_a_npc_bouS/theB.cpp: keep MULTI_CHAR() for PC portability - d_a_npc_henna.cpp: keep uintptr_t + use upstream var name - d_demo.cpp: keep near_/far_ field renames for PC - d_resorce.cpp: keep uintptr_t + fix var name to res - d_s_room.cpp, m_Do_graphic.cpp: keep dusk includes + add cstring - m_Do_main.cpp: keep JHIComPortManager + use JAS_GLOBAL_INSTANCE_INIT - angle_utils.h: remove redundant types.h include
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#ifndef J3DANIMATION_H
|
||||
#define J3DANIMATION_H
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DModelData.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include "JSystem/JUtility/JUTNameTab.h"
|
||||
#include <dolphin/mtx.h>
|
||||
#include "global.h"
|
||||
|
||||
#include "dusk/endian.h"
|
||||
@@ -14,6 +14,8 @@
|
||||
#define OFFSET_PTR void*
|
||||
#endif
|
||||
|
||||
struct J3DTransformInfo;
|
||||
|
||||
struct JUTDataBlockHeader {
|
||||
/* 0x0 */ BE(u32) mType;
|
||||
/* 0x4 */ BE(u32) mSize;
|
||||
@@ -542,7 +544,7 @@ public:
|
||||
virtual ~J3DAnmTransformKey() {}
|
||||
virtual s32 getKind() const { return 8; }
|
||||
virtual void getTransform(u16 jointNo, J3DTransformInfo* pTransform) const {
|
||||
calcTransform(mFrame, jointNo, pTransform);
|
||||
calcTransform(getFrame(), jointNo, pTransform);
|
||||
}
|
||||
|
||||
/* 0x20 */ int mDecShift;
|
||||
|
||||
@@ -43,7 +43,10 @@ public:
|
||||
virtual void init(const Vec& param_0, const Mtx&) = 0;
|
||||
virtual void calc() = 0;
|
||||
|
||||
static J3DMtxBuffer* getMtxBuffer() { return mMtxBuffer; }
|
||||
static J3DMtxBuffer* getMtxBuffer() {
|
||||
J3D_ASSERT_NULLPTR(174, mMtxBuffer != NULL)
|
||||
return mMtxBuffer;
|
||||
}
|
||||
static J3DJoint* getJoint() {
|
||||
J3D_ASSERT_NULLPTR(185, mJoint != NULL)
|
||||
return mJoint;
|
||||
@@ -234,4 +237,12 @@ struct J3DMtxCalcCalcTransformBasic {
|
||||
static void calcTransform(J3DTransformInfo const&);
|
||||
};
|
||||
|
||||
inline s32 checkScaleOne(const Vec& param_0) {
|
||||
if (param_0.x == 1.0f && param_0.y == 1.0f && param_0.z == 1.0f) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* J3DJOINT_H */
|
||||
|
||||
@@ -93,7 +93,10 @@ public:
|
||||
J3D_ASSERT_NULLPTR(214, pAnmTexPattern != NULL);
|
||||
}
|
||||
|
||||
virtual void calc(u16* param_0) const { mAnmTexPattern->getTexNo(field_0x4, param_0); }
|
||||
virtual void calc(u16* param_0) const {
|
||||
J3D_ASSERT_NULLPTR(532, param_0);
|
||||
mAnmTexPattern->getTexNo(field_0x4, param_0);
|
||||
}
|
||||
|
||||
void operator=(J3DTexNoAnm const& other) {
|
||||
mAnmTexPattern = other.mAnmTexPattern;
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
J3DTexCoord* getTexCoord(u32 idx) { return mTexGenBlock->getTexCoord(idx); }
|
||||
J3DZMode* getZMode() { return mPEBlock->getZMode(); }
|
||||
J3DBlend* getBlend() { return mPEBlock->getBlend(); }
|
||||
J3DColorChan* getColorChan(u32 idx) { return getColorBlock()->getColorChan(idx); }
|
||||
J3DColorChan* getColorChan(u32 idx) { return mColorBlock->getColorChan(idx); }
|
||||
J3DGXColor* getMatColor(u32 i) { return mColorBlock->getMatColor(i); }
|
||||
|
||||
void setTevColor(u32 i, const J3DGXColorS10* i_color) { mTevBlock->setTevColor(i, i_color); }
|
||||
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
|
||||
void setDrawMtx(Mtx** pDrawMtx) { mDrawMtx = pDrawMtx; }
|
||||
void setNrmMtx(Mtx33** pNrmMtx) { mNrmMtx = pNrmMtx; }
|
||||
void setTexMtxLoadType(u32 type) { mFlags = (mFlags & 0xFFFF0FFF) | type; }
|
||||
void setTexMtxLoadType(u32 type) { mFlags = type | (mFlags & ~0xF000); }
|
||||
bool getNBTFlag() const { return mHasNBT; }
|
||||
u32 getBumpMtxOffset() const { return mBumpMtxOffset; }
|
||||
void setBumpMtxOffset(u32 offset) { mBumpMtxOffset = offset; }
|
||||
|
||||
@@ -201,10 +201,12 @@ struct J3DTevOrder : public J3DTevOrderInfo {
|
||||
J3DTevOrder() {
|
||||
J3DTevOrderInfo::operator=(j3dDefaultTevOrderInfoNull);
|
||||
}
|
||||
J3DTevOrder(const J3DTevOrderInfo& info) : J3DTevOrderInfo(info) {}
|
||||
J3DTevOrder(const J3DTevOrderInfo& info) {
|
||||
J3DTevOrderInfo::operator=(info);
|
||||
}
|
||||
J3DTevOrderInfo& getTevOrderInfo() { return *this; }
|
||||
|
||||
u8 getTexMap() { return mTexMap; }
|
||||
u8 getTexMap() const { return mTexMap; }
|
||||
};
|
||||
|
||||
extern u8 j3dTevSwapTableTable[1024];
|
||||
|
||||
@@ -90,7 +90,7 @@ struct J3DTexCoord : public J3DTexCoordInfo {
|
||||
mTexMtxReg = mTexGenMtx;
|
||||
}
|
||||
void setTexCoordInfo(const J3DTexCoordInfo& info) {
|
||||
__memcpy(this, &info, sizeof(J3DTexCoordInfo));
|
||||
J3DTexCoordInfo::operator=(info);
|
||||
}
|
||||
|
||||
u8 getTexGenType() const { return mTexGenType; }
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
class J3DModelData;
|
||||
class J3DMaterialTable;
|
||||
class J3DModelHierarchy;
|
||||
struct J3DModelHierarchy;
|
||||
|
||||
#if TARGET_PC
|
||||
#define OFFSET_PTR BE(u32)
|
||||
@@ -34,7 +34,8 @@ struct J3DModelFileData {
|
||||
/* 0x04 */ BE(u32) mMagic2;
|
||||
/* 0x08 */ u8 field_0x08[4];
|
||||
/* 0x0C */ BE(u32) mBlockNum;
|
||||
/* 0x10 */ u8 field_0x10[0x10];
|
||||
/* 0x10 */ u8 field_0x10[0x1C - 0x10];
|
||||
/* 0x1C */ int field_0x1c;
|
||||
/* 0x20 */ J3DModelBlock mBlocks[1];
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef J3DUFUR_H
|
||||
#define J3DUFUR_H
|
||||
|
||||
// NONMATCHING
|
||||
|
||||
#endif /* J3DUFUR_H */
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef J3DUMOTION_H
|
||||
#define J3DUMOTION_H
|
||||
|
||||
// NONMATCHING
|
||||
|
||||
#endif /* J3DUMOTION_H */
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef J3DUSHADOW_H
|
||||
#define J3DUSHADOW_H
|
||||
|
||||
// NONMATCHING
|
||||
|
||||
#endif /* J3DUSHADOW_H */
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
|
||||
class JAISeqMgr;
|
||||
class JAISoundChild;
|
||||
struct JAISoundChild;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -253,7 +253,7 @@ class JAIAudible;
|
||||
struct JAIAudience;
|
||||
class JAISe;
|
||||
class JAISeq;
|
||||
class JAISoundChild;
|
||||
struct JAISoundChild;
|
||||
class JAIStream;
|
||||
class JAITempoMgr;
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
#define JASCALC_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include <limits>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
*
|
||||
*
|
||||
*/
|
||||
struct JASCalc {
|
||||
static void imixcopy(const s16*, const s16*, s16*, u32);
|
||||
@@ -15,15 +16,8 @@ struct JASCalc {
|
||||
static void bzero(void* dest, u32 size);
|
||||
static f32 pow2(f32);
|
||||
|
||||
// Could not make it work as inline - specialization is in JASCalc.cpp
|
||||
template <typename A, typename B>
|
||||
static A clamp(B x); /* {
|
||||
if (std::numeric_limits<A>::min() >= x)
|
||||
return std::numeric_limits<A>::min();
|
||||
if (x >= std::numeric_limits<A>::max())
|
||||
return std::numeric_limits<A>::max();
|
||||
return x;
|
||||
} */
|
||||
static A clamp(B x);
|
||||
|
||||
static f32 clamp01(f32 i_value) {
|
||||
if (i_value <= 0.0f) {
|
||||
@@ -42,4 +36,13 @@ struct JASCalc {
|
||||
static const s16 CUTOFF_TO_IIR_TABLE[128][4];
|
||||
};
|
||||
|
||||
template <typename A, typename B>
|
||||
A JASCalc::clamp(B x) {
|
||||
if (x <= std::numeric_limits<A>::min())
|
||||
return std::numeric_limits<A>::min();
|
||||
if (x >= std::numeric_limits<A>::max())
|
||||
return std::numeric_limits<A>::max();
|
||||
return x;
|
||||
}
|
||||
|
||||
#endif /* JASCALC_H */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JAudio2/JASWaveInfo.h"
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JASDSPChannel;
|
||||
struct JASDSPChannel;
|
||||
|
||||
namespace JASDsp {
|
||||
struct TChannel;
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <string>
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#define JAS_GLOBAL_INSTANCE_INIT
|
||||
#else
|
||||
#define JAS_GLOBAL_INSTANCE_INIT {}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
*
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
class JKRHeap;
|
||||
class JASWaveBank;
|
||||
class JASBasicWaveBank;
|
||||
class JASSimpleWaveBank;
|
||||
struct JASBasicWaveBank;
|
||||
struct JASSimpleWaveBank;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef JAUAUDIENCE_H
|
||||
#define JAUAUDIENCE_H
|
||||
|
||||
// NONMATCHING
|
||||
|
||||
#endif /* JAUAUDIENCE_H */
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef JAUSOUNDOBJECT_H
|
||||
#define JAUSOUNDOBJECT_H
|
||||
|
||||
// NONMATCHING
|
||||
|
||||
#endif /* JAUSOUNDOBJECT_H */
|
||||
@@ -100,6 +100,8 @@ struct TValueIterator
|
||||
|
||||
TValueIterator(const void* begin) {
|
||||
mBegin = reinterpret_cast<const char*>(begin);
|
||||
bool unused = false;
|
||||
(void)&unused;
|
||||
}
|
||||
|
||||
const void* get() const { return mBegin; }
|
||||
|
||||
@@ -14,7 +14,12 @@ struct TLinkListNode {
|
||||
pPrev_ = NULL;
|
||||
}
|
||||
|
||||
~TLinkListNode() {}
|
||||
~TLinkListNode() {
|
||||
#if DEBUG
|
||||
JGADGET_ASSERTWARN(77, pNext_==NULL);
|
||||
JGADGET_ASSERTWARN(78, pPrev_==NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
TLinkListNode* getNext() const { return pNext_; }
|
||||
TLinkListNode* getPrev() const { return pPrev_; }
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <iterator>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
namespace JGadget {
|
||||
namespace search {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JGADGET_STD_STREAMBUF_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
namespace JGadget {
|
||||
template <typename T>
|
||||
|
||||
@@ -296,12 +296,7 @@ struct TVec3<f32> : public Vec {
|
||||
}
|
||||
|
||||
void scale(__REGISTER f32 sc) {
|
||||
#if DEBUG
|
||||
x *= sc;
|
||||
y *= sc;
|
||||
z *= sc;
|
||||
#else
|
||||
#ifdef __MWERKS__
|
||||
#if PLATFORM_GCN && defined(__MWERKS__)
|
||||
__REGISTER f32 z;
|
||||
__REGISTER f32 x_y;
|
||||
__REGISTER f32* dst = &x;
|
||||
@@ -315,12 +310,15 @@ struct TVec3<f32> : public Vec {
|
||||
ps_muls0 zres, z, sc
|
||||
psq_st zres, 8(dst), 1, 0
|
||||
};
|
||||
#endif
|
||||
#else
|
||||
x *= sc;
|
||||
y *= sc;
|
||||
z *= sc;
|
||||
#endif
|
||||
}
|
||||
|
||||
void scale(__REGISTER f32 sc, const TVec3<f32>& other) {
|
||||
#ifdef __MWERKS__
|
||||
#if PLATFORM_GCN && defined(__MWERKS__)
|
||||
__REGISTER const f32* src = &other.x;
|
||||
__REGISTER f32 z;
|
||||
__REGISTER f32 x_y;
|
||||
@@ -335,6 +333,10 @@ struct TVec3<f32> : public Vec {
|
||||
ps_muls0 zres, z, sc
|
||||
psq_st zres, 8(dst), 1, 0
|
||||
};
|
||||
#else
|
||||
x = other.x * sc;
|
||||
y = other.y * sc;
|
||||
z = other.z * sc;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -93,6 +93,11 @@
|
||||
updateSelectorSub(mode, (uintptr_t)pSrc, *pSrc, param_2); \
|
||||
}
|
||||
|
||||
#define DEFINE_UPDATE_COMBO_BOX_ID(T) \
|
||||
void updateComboBoxID(u32 mode, u32 id, T value, u32 param_4) { \
|
||||
updateSelectorSub(mode, id, value, param_4); \
|
||||
}
|
||||
|
||||
#define DEFINE_UPDATE_SLIDER(T) \
|
||||
void updateSlider(u32 mode, T* pSrc, T rangeMin, T rangeMax, u32 param_5) { \
|
||||
updateSliderSub(mode, (uintptr_t)pSrc, *pSrc, rangeMin, rangeMax, param_5); \
|
||||
@@ -265,10 +270,12 @@ public:
|
||||
DEFINE_START_COMBO_BOX(s16, jhostio::EKind_16B)
|
||||
DEFINE_START_COMBO_BOX(s32, jhostio::EKind_32B)
|
||||
|
||||
DEFINE_START_COMBO_BOX_ID(int, JORPropertyEvent::EKind_ValueID)
|
||||
DEFINE_START_COMBO_BOX_ID(s32, JORPropertyEvent::EKind_ValueID)
|
||||
|
||||
DEFINE_UPDATE_COMBO_BOX(u8)
|
||||
|
||||
DEFINE_UPDATE_COMBO_BOX_ID(s32)
|
||||
|
||||
void endComboBox() { endSelectorSub(); }
|
||||
|
||||
void genComboBoxItem(const char* label, s32 itemNo) {
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
u32 readIdxResource(void*, u32, u32);
|
||||
u32 readResource(void*, u32, u16);
|
||||
u32 countResource(void) const;
|
||||
u32 getFileAttribute(u32) const;
|
||||
u8 getFileAttribute(u32) const;
|
||||
|
||||
SDIFileEntry* findNameResource(const char*) const;
|
||||
bool isSameName(CArcName&, u32, u16) const;
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
u32 countFile() const { return mArcInfoBlock->num_file_entries; }
|
||||
s32 countDirectory() const { return mArcInfoBlock->num_nodes; }
|
||||
u8 getMountMode() const { return mMountMode; }
|
||||
bool isFileEntry(u32 param_0) {
|
||||
bool isFileEntry(u32 param_0) const {
|
||||
return getFileAttribute(param_0) & 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -275,6 +275,10 @@ inline s32 JKRResizeMemBlock(JKRHeap* heap, void* ptr, u32 size) {
|
||||
return JKRHeap::resize(ptr, size, heap);
|
||||
}
|
||||
|
||||
inline JKRHeap* JKRFindHeap(void* ptr) {
|
||||
return JKRHeap::findFromRoot(ptr);
|
||||
}
|
||||
|
||||
inline JKRHeap* JKRGetRootHeap() {
|
||||
return JKRHeap::getRootHeap();
|
||||
}
|
||||
|
||||
@@ -27,11 +27,11 @@ struct JPABaseShapeData {
|
||||
/* 0x1C */ u8 mAlphaRef1;
|
||||
/* 0x1D */ u8 mZModeCfg;
|
||||
/* 0x1E */ u8 mTexFlg;
|
||||
/* 0x1F */ u8 mTexAnmNum;
|
||||
/* 0x1F */ u8 texAnmKeyNum;
|
||||
/* 0x20 */ u8 mTexIdx;
|
||||
/* 0x21 */ u8 mClrFlg;
|
||||
/* 0x22 */ u8 mClrPrmKeyNum;
|
||||
/* 0x23 */ u8 mClrEnvKeyNum;
|
||||
/* 0x22 */ u8 prmAnmKeyNum;
|
||||
/* 0x23 */ u8 envAnmKeyNum;
|
||||
/* 0x24 */ s16 mClrAnmFrmMax;
|
||||
/* 0x26 */ GXColor mClrPrm;
|
||||
/* 0x2A */ GXColor mClrEnv;
|
||||
@@ -57,62 +57,62 @@ public:
|
||||
static GXTevColorArg st_ca[6][4];
|
||||
static GXTevAlphaArg st_aa[2][4];
|
||||
|
||||
GXBlendMode getBlendMode() const { return st_bm[mpData->mBlendModeCfg & 0x03]; }
|
||||
GXBlendFactor getBlendSrc() const { return st_bf[(mpData->mBlendModeCfg >> 2) & 0x0F]; }
|
||||
GXBlendFactor getBlendDst() const { return st_bf[(mpData->mBlendModeCfg >> 6) & 0x0F]; }
|
||||
GXLogicOp getLogicOp() const { return st_lo[(mpData->mBlendModeCfg >> 10) & 0x0F]; }
|
||||
GXBool getZCompLoc() const { return (GXBool)((mpData->mZModeCfg >> 5) & 0x01); }
|
||||
GXBlendMode getBlendMode() const { return st_bm[pBsd->mBlendModeCfg & 0x03]; }
|
||||
GXBlendFactor getBlendSrc() const { return st_bf[(pBsd->mBlendModeCfg >> 2) & 0x0F]; }
|
||||
GXBlendFactor getBlendDst() const { return st_bf[(pBsd->mBlendModeCfg >> 6) & 0x0F]; }
|
||||
GXLogicOp getLogicOp() const { return st_lo[(pBsd->mBlendModeCfg >> 10) & 0x0F]; }
|
||||
GXBool getZCompLoc() const { return (GXBool)((pBsd->mZModeCfg >> 5) & 0x01); }
|
||||
|
||||
GXBool getZEnable() const { return (GXBool)(mpData->mZModeCfg & 0x01); }
|
||||
GXCompare getZCmp() const { return st_c[(mpData->mZModeCfg >> 1) & 0x07]; }
|
||||
GXBool getZUpd() const { return (GXBool)((mpData->mZModeCfg >> 4) & 0x01); }
|
||||
GXBool getZEnable() const { return (GXBool)(pBsd->mZModeCfg & 0x01); }
|
||||
GXCompare getZCmp() const { return st_c[(pBsd->mZModeCfg >> 1) & 0x07]; }
|
||||
GXBool getZUpd() const { return (GXBool)((pBsd->mZModeCfg >> 4) & 0x01); }
|
||||
|
||||
GXCompare getAlphaCmp0() const { return st_c[mpData->mAlphaCompareCfg & 0x07]; }
|
||||
u8 getAlphaRef0() const { return mpData->mAlphaRef0; }
|
||||
GXAlphaOp getAlphaOp() const { return st_ao[(mpData->mAlphaCompareCfg >> 3) & 0x03]; }
|
||||
GXCompare getAlphaCmp1() const { return st_c[(mpData->mAlphaCompareCfg >> 5) & 0x07]; }
|
||||
u8 getAlphaRef1() const { return mpData->mAlphaRef1; }
|
||||
GXCompare getAlphaCmp0() const { return st_c[pBsd->mAlphaCompareCfg & 0x07]; }
|
||||
u8 getAlphaRef0() const { return pBsd->mAlphaRef0; }
|
||||
GXAlphaOp getAlphaOp() const { return st_ao[(pBsd->mAlphaCompareCfg >> 3) & 0x03]; }
|
||||
GXCompare getAlphaCmp1() const { return st_c[(pBsd->mAlphaCompareCfg >> 5) & 0x07]; }
|
||||
u8 getAlphaRef1() const { return pBsd->mAlphaRef1; }
|
||||
|
||||
const GXTevColorArg* getTevColorArg() const { return st_ca[(mpData->mFlags >> 0x0F) & 0x07]; }
|
||||
const GXTevAlphaArg* getTevAlphaArg() const { return st_aa[(mpData->mFlags >> 0x12) & 0x01]; }
|
||||
const GXTevColorArg* getTevColorArg() const { return st_ca[(pBsd->mFlags >> 0x0F) & 0x07]; }
|
||||
const GXTevAlphaArg* getTevAlphaArg() const { return st_aa[(pBsd->mFlags >> 0x12) & 0x01]; }
|
||||
|
||||
u32 getType() const { return (mpData->mFlags >> 0) & 0x0F; }
|
||||
u32 getDirType() const { return (mpData->mFlags >> 4) & 0x07; }
|
||||
u32 getRotType() const { return (mpData->mFlags >> 7) & 0x07; }
|
||||
u32 getBasePlaneType() const { return (mpData->mFlags >> 10) & 0x01; }
|
||||
u32 getTilingS() const { return (mpData->mFlags >> 25) & 0x01; }
|
||||
u32 getTilingT() const { return (mpData->mFlags >> 26) & 0x01; }
|
||||
BOOL isGlblClrAnm() const { return mpData->mFlags & 0x00001000; }
|
||||
BOOL isGlblTexAnm() const { return mpData->mFlags & 0x00004000; }
|
||||
BOOL isPrjTex() const { return mpData->mFlags & 0x00100000; }
|
||||
bool isDrawFwdAhead() const { return !!(mpData->mFlags & 0x00200000); }
|
||||
bool isDrawPrntAhead() const { return !!(mpData->mFlags & 0x00400000); }
|
||||
bool isClipOn() const { return !!(mpData->mFlags & 0x00800000); }
|
||||
BOOL isTexCrdAnm() const { return mpData->mFlags & 0x01000000; }
|
||||
bool isNoDrawParent() const { return !!(mpData->mFlags & 0x08000000); }
|
||||
bool isNoDrawChild() const { return !!(mpData->mFlags & 0x10000000); }
|
||||
u32 getType() const { return (pBsd->mFlags >> 0) & 0x0F; }
|
||||
u32 getDirType() const { return (pBsd->mFlags >> 4) & 0x07; }
|
||||
u32 getRotType() const { return (pBsd->mFlags >> 7) & 0x07; }
|
||||
u32 getBasePlaneType() const { return (pBsd->mFlags >> 10) & 0x01; }
|
||||
u32 getTilingS() const { return (pBsd->mFlags >> 25) & 0x01; }
|
||||
u32 getTilingT() const { return (pBsd->mFlags >> 26) & 0x01; }
|
||||
BOOL isGlblClrAnm() const { return pBsd->mFlags & 0x00001000; }
|
||||
BOOL isGlblTexAnm() const { return pBsd->mFlags & 0x00004000; }
|
||||
BOOL isPrjTex() const { return pBsd->mFlags & 0x00100000; }
|
||||
BOOL isDrawFwdAhead() const { return pBsd->mFlags & 0x00200000; }
|
||||
BOOL isDrawPrntAhead() const { return pBsd->mFlags & 0x00400000; }
|
||||
BOOL isClipOn() const { return pBsd->mFlags & 0x00800000; }
|
||||
BOOL isTexCrdAnm() const { return pBsd->mFlags & 0x01000000; }
|
||||
BOOL isNoDrawParent() const { return pBsd->mFlags >> 27 & 1; }
|
||||
BOOL isNoDrawChild() const { return pBsd->mFlags >> 28 & 1; }
|
||||
|
||||
BOOL isPrmAnm() const { return mpData->mClrFlg & 0x02; }
|
||||
BOOL isEnvAnm() const { return mpData->mClrFlg & 0x08; }
|
||||
u8 getClrAnmType() const { return (mpData->mClrFlg >> 4) & 0x07; }
|
||||
s16 getClrAnmMaxFrm() const { return mpData->mClrAnmFrmMax; }
|
||||
void getPrmClr(GXColor* dst) { *dst = mpData->mClrPrm; }
|
||||
void getPrmClr(s16 idx, GXColor* dst) { *dst = mpPrmClrAnmTbl[idx]; }
|
||||
void getEnvClr(GXColor* dst) { *dst = mpData->mClrEnv; }
|
||||
void getEnvClr(s16 idx, GXColor* dst) { *dst = mpEnvClrAnmTbl[idx]; }
|
||||
BOOL isPrmAnm() const { return pBsd->mClrFlg & 0x02; }
|
||||
BOOL isEnvAnm() const { return pBsd->mClrFlg & 0x08; }
|
||||
u32 getClrAnmType() const { return (pBsd->mClrFlg >> 4) & 0x07; }
|
||||
s16 getClrAnmMaxFrm() const { return pBsd->mClrAnmFrmMax; }
|
||||
void getPrmClr(GXColor* dst) const { *dst = pBsd->mClrPrm; }
|
||||
void getPrmClr(s16 idx, GXColor* dst) const { *dst = mpPrmClrAnmTbl[idx]; }
|
||||
void getEnvClr(GXColor* dst) const { *dst = pBsd->mClrEnv; }
|
||||
void getEnvClr(s16 idx, GXColor* dst) const { *dst = mpEnvClrAnmTbl[idx]; }
|
||||
|
||||
BOOL isTexAnm() const { return mpData->mTexFlg & 0x01; }
|
||||
u8 getTexAnmType() const { return (mpData->mTexFlg >> 2) & 0x07; }
|
||||
u32 getTexIdx() const { return mpData->mTexIdx; }
|
||||
BOOL isTexAnm() const { return pBsd->mTexFlg & 0x01; }
|
||||
u32 getTexAnmType() const { return (pBsd->mTexFlg >> 2) & 0x07; }
|
||||
u8 getTexIdx() const { return pBsd->mTexIdx; }
|
||||
u8 getTexIdx(u8 idx) const { return mpTexIdxAnimTbl[idx]; }
|
||||
|
||||
f32 getBaseSizeX() const { return mpData->mBaseSizeX; }
|
||||
f32 getBaseSizeY() const { return mpData->mBaseSizeY; }
|
||||
u8 getClrLoopOfstMask() const { return mpData->mClrAnmRndmMask; }
|
||||
u32 getClrLoopOfst(u32 param_1) const { return getClrLoopOfstMask() & param_1; }
|
||||
u8 getTexLoopOfstMask() const { return mpData->mTexAnmRndmMask; }
|
||||
u32 getTexLoopOfst(u8 param_1) const { return getTexLoopOfstMask() & param_1; }
|
||||
u8 getLoopOfstValue() const { return mpData->mAnmRndm; }
|
||||
f32 getBaseSizeX() const { return pBsd->mBaseSizeX; }
|
||||
f32 getBaseSizeY() const { return pBsd->mBaseSizeY; }
|
||||
u8 getClrLoopOfstMask() const { return pBsd->mClrAnmRndmMask; }
|
||||
s32 getClrLoopOfst(u8 param_1) const { return getClrLoopOfstMask() & param_1; }
|
||||
u8 getTexLoopOfstMask() const { return pBsd->mTexAnmRndmMask; }
|
||||
s32 getTexLoopOfst(u8 param_1) const { return getTexLoopOfstMask() & param_1; }
|
||||
u8 getLoopOfstValue() const { return pBsd->mAnmRndm; }
|
||||
|
||||
f32 getIncTransX() const { return ((f32*)mpTexCrdMtxAnmTbl)[5]; }
|
||||
f32 getInitTransX() const { return ((f32*)mpTexCrdMtxAnmTbl)[0]; }
|
||||
@@ -124,10 +124,10 @@ public:
|
||||
f32 getInitScaleY() const { return ((f32*)mpTexCrdMtxAnmTbl)[3]; }
|
||||
f32 getIncRot() const { return ((f32*)mpTexCrdMtxAnmTbl)[9]; }
|
||||
f32 getInitRot() const { return ((f32*)mpTexCrdMtxAnmTbl)[4]; }
|
||||
u8 getTexAnmKeyNum() const { return mpData->mTexAnmNum; }
|
||||
u8 getTexAnmKeyNum() const { return pBsd->texAnmKeyNum; }
|
||||
|
||||
public:
|
||||
/* 0x00 */ const JPABaseShapeData* mpData;
|
||||
/* 0x00 */ const JPABaseShapeData* pBsd;
|
||||
/* 0x04 */ const void* mpTexCrdMtxAnmTbl;
|
||||
/* 0x08 */ const u8* mpTexIdxAnimTbl;
|
||||
/* 0x0C */ GXColor* mpPrmClrAnmTbl;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
void init();
|
||||
void create(JPAEmitterWorkData*);
|
||||
|
||||
void calc(JPAEmitterWorkData* work) { mpCalcVolumeFunc(work); }
|
||||
void calc(JPAEmitterWorkData* work) const { mpCalcVolumeFunc(work); }
|
||||
|
||||
s16 getStartFrame() const { return mpData->mStartFrame; }
|
||||
u32 getResUserWork() const { return mpData->mResUserWork; }
|
||||
@@ -71,32 +71,32 @@ public:
|
||||
u32 getVolumeType() const { return (mpData->mFlags >> 8) & 0x07; }
|
||||
u16 getDivNumber() const { return mpData->mDivNumber; }
|
||||
f32 getRateRndm() const { return mpData->mRateRndm; }
|
||||
void getEmitterScl(JGeometry::TVec3<f32>* vec) const {
|
||||
vec->set(mpData->mEmitterScl.x, mpData->mEmitterScl.y, mpData->mEmitterScl.z);
|
||||
void getEmitterScl(JGeometry::TVec3<f32>* vec) const {
|
||||
vec->set(mpData->mEmitterScl.x, mpData->mEmitterScl.y, mpData->mEmitterScl.z);
|
||||
}
|
||||
void getEmitterTrs(JGeometry::TVec3<f32>* vec) const {
|
||||
vec->set(mpData->mEmitterTrs.x, mpData->mEmitterTrs.y, mpData->mEmitterTrs.z);
|
||||
void getEmitterTrs(JGeometry::TVec3<f32>* vec) const {
|
||||
vec->set(mpData->mEmitterTrs.x, mpData->mEmitterTrs.y, mpData->mEmitterTrs.z);
|
||||
}
|
||||
void getEmitterDir(JGeometry::TVec3<f32>* vec) const {
|
||||
vec->set(mpData->mEmitterDir.x, mpData->mEmitterDir.y, mpData->mEmitterDir.z);
|
||||
void getEmitterDir(JGeometry::TVec3<f32>* vec) const {
|
||||
vec->set(mpData->mEmitterDir.x, mpData->mEmitterDir.y, mpData->mEmitterDir.z);
|
||||
}
|
||||
void getEmitterRot(JGeometry::TVec3<s16>* vec) const {
|
||||
vec->set(mpData->mEmitterRot.x, mpData->mEmitterRot.y, mpData->mEmitterRot.z);
|
||||
}
|
||||
s16 getMaxFrame() { return mpData->mMaxFrame; }
|
||||
s16 getLifetime() { return mpData->mLifeTime; }
|
||||
u16 getVolumeSize() { return mpData->mVolumeSize; }
|
||||
f32 getRate() { return mpData->mRate; }
|
||||
u8 getRateStep() { return mpData->mRateStep; }
|
||||
f32 getVolumeSweep() { return mpData->mVolumeSweep; }
|
||||
f32 getVolumeMinRad() { return mpData->mVolumeMinRad; }
|
||||
f32 getInitVelOmni() { return mpData->mInitialVelOmni; }
|
||||
f32 getInitVelAxis() { return mpData->mInitialVelAxis; }
|
||||
f32 getInitVelDir() { return mpData->mInitialVelDir; }
|
||||
f32 getInitVelDirSp() { return mpData->mSpread; }
|
||||
f32 getInitVelRndm() { return mpData->mInitialVelRndm; }
|
||||
void getEmitterRot(JGeometry::TVec3<s16>* vec) const {
|
||||
vec->set(mpData->mEmitterRot.x, mpData->mEmitterRot.y, mpData->mEmitterRot.z);
|
||||
}
|
||||
s16 getMaxFrame() const { return mpData->mMaxFrame; }
|
||||
s16 getLifetime() const { return mpData->mLifeTime; }
|
||||
u16 getVolumeSize() const { return mpData->mVolumeSize; }
|
||||
f32 getRate() const { return mpData->mRate; }
|
||||
u8 getRateStep() const { return mpData->mRateStep; }
|
||||
f32 getVolumeSweep() const { return mpData->mVolumeSweep; }
|
||||
f32 getVolumeMinRad() const { return mpData->mVolumeMinRad; }
|
||||
f32 getInitVelOmni() const { return mpData->mInitialVelOmni; }
|
||||
f32 getInitVelAxis() const { return mpData->mInitialVelAxis; }
|
||||
f32 getInitVelDir() const { return mpData->mInitialVelDir; }
|
||||
f32 getInitVelDirSp() const { return mpData->mSpread; }
|
||||
f32 getInitVelRndm() const { return mpData->mInitialVelRndm; }
|
||||
f32 getInitVelRatio() const { return mpData->mInitialVelRatio; }
|
||||
f32 getAirRes() { return mpData->mAirResist; }
|
||||
f32 getAirRes() const { return mpData->mAirResist; }
|
||||
f32 getLifetimeRndm() const { return mpData->mLifeTimeRndm; }
|
||||
f32 getMomentRndm() const { return mpData->mMoment; }
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
void setStatus(u32 status) { mStatus |= status; }
|
||||
void clearStatus(u32 status) { mStatus &= ~status; }
|
||||
u32 checkStatus(u32 status) const { return (mStatus & status); }
|
||||
bool checkFlag(u32 flag) const { return !!(mpRes->getDyn()->getFlag() & flag); }
|
||||
u32 checkFlag(u32 flag) const { return pRes->getDyn()->getFlag() & flag; }
|
||||
u8 getResourceManagerID() const { return mResMgrID; }
|
||||
u8 getGroupID() const { return mGroupID; }
|
||||
u8 getDrawTimes() const { return mDrawTimes; }
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
/* 0xD4 */ JPAList<JPABaseParticle> mAlivePtclChld;
|
||||
/* 0xE0 */ JPAList<JPABaseParticle>* mpPtclPool;
|
||||
/* 0xE4 */ JPAEmitterManager* mpEmtrMgr;
|
||||
/* 0xE8 */ JPAResource* mpRes;
|
||||
/* 0xE8 */ JPAResource* pRes;
|
||||
/* 0xEC */ JPAEmitterCallBack* mpEmtrCallBack;
|
||||
/* 0xF0 */ JPAParticleCallBack* mpPtclCallBack;
|
||||
/* 0xF4 */ u32 mStatus;
|
||||
|
||||
@@ -33,8 +33,8 @@ public:
|
||||
s8 getExpScale() const { return mpData->mExpScale; }
|
||||
u8 getIndTexIdx() const { return mpData->mIndTexIdx; }
|
||||
u8 getSecTexIdx() const { return mpData->mSecTexIdx; }
|
||||
bool isUseIndirect() const { return !!(mpData->mFlags & 0x01); }
|
||||
bool isUseSecTex() const { return !!(mpData->mFlags & 0x0100); }
|
||||
BOOL isUseIndirect() const { return mpData->mFlags & 0x01; }
|
||||
BOOL isUseSecTex() const { return mpData->mFlags & 0x0100; }
|
||||
|
||||
public:
|
||||
const JPAExTexShapeData* mpData;
|
||||
|
||||
@@ -21,32 +21,27 @@ public:
|
||||
/* 0x04 */ JGeometry::TVec3<f32> mAccel;
|
||||
};
|
||||
|
||||
class JPAFieldVortex : public JPAFieldBase {
|
||||
class JPAFieldGravity : public JPAFieldBase {
|
||||
public:
|
||||
void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
|
||||
void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
|
||||
~JPAFieldVortex() {}
|
||||
|
||||
/* 0x10 */ JGeometry::TVec3<f32> field_0x10;
|
||||
/* 0x1C */ f32 field_0x1c;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
~JPAFieldGravity() {}
|
||||
};
|
||||
|
||||
class JPAFieldSpin : public JPAFieldBase {
|
||||
class JPAFieldAir : public JPAFieldBase {
|
||||
public:
|
||||
void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
|
||||
void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
|
||||
~JPAFieldSpin() {}
|
||||
|
||||
/* 0x10 */ JGeometry::TVec3<f32> field_0x10;
|
||||
/* 0x1C */ JGeometry::TVec3<f32> field_0x1c;
|
||||
/* 0x28 */ JGeometry::TVec3<f32> field_0x28;
|
||||
~JPAFieldAir() {}
|
||||
};
|
||||
|
||||
class JPAFieldRandom : public JPAFieldBase {
|
||||
class JPAFieldMagnet : public JPAFieldBase {
|
||||
public:
|
||||
void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
|
||||
void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
|
||||
~JPAFieldRandom() {}
|
||||
~JPAFieldMagnet() {}
|
||||
|
||||
/* 0x10 */ JGeometry::TVec3<f32> mDir;
|
||||
};
|
||||
|
||||
class JPAFieldNewton : public JPAFieldBase {
|
||||
@@ -59,20 +54,21 @@ public:
|
||||
/* 0x1C */ f32 mCutoff;
|
||||
};
|
||||
|
||||
class JPAFieldMagnet : public JPAFieldBase {
|
||||
class JPAFieldVortex : public JPAFieldBase {
|
||||
public:
|
||||
void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
|
||||
void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
|
||||
~JPAFieldMagnet() {}
|
||||
~JPAFieldVortex() {}
|
||||
|
||||
/* 0x10 */ JGeometry::TVec3<f32> mDir;
|
||||
/* 0x10 */ JGeometry::TVec3<f32> field_0x10;
|
||||
/* 0x1C */ f32 field_0x1c;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
};
|
||||
|
||||
class JPAFieldGravity : public JPAFieldBase {
|
||||
class JPAFieldRandom : public JPAFieldBase {
|
||||
public:
|
||||
void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
|
||||
void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
|
||||
~JPAFieldGravity() {}
|
||||
~JPAFieldRandom() {}
|
||||
};
|
||||
|
||||
class JPAFieldDrag : public JPAFieldBase {
|
||||
@@ -92,11 +88,15 @@ public:
|
||||
/* 0x28 */ JGeometry::TVec3<f32> field_0x28;
|
||||
};
|
||||
|
||||
class JPAFieldAir : public JPAFieldBase {
|
||||
class JPAFieldSpin : public JPAFieldBase {
|
||||
public:
|
||||
void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
|
||||
void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
|
||||
~JPAFieldAir() {}
|
||||
~JPAFieldSpin() {}
|
||||
|
||||
/* 0x10 */ JGeometry::TVec3<f32> field_0x10;
|
||||
/* 0x1C */ JGeometry::TVec3<f32> field_0x1c;
|
||||
/* 0x28 */ JGeometry::TVec3<f32> field_0x28;
|
||||
};
|
||||
|
||||
// unknown name
|
||||
@@ -122,36 +122,36 @@ public:
|
||||
JPAFieldBlock(u8 const*, JKRHeap*);
|
||||
void init(JKRHeap*);
|
||||
|
||||
u32 getType() { return mpData->mFlags & 0xF; }
|
||||
u32 getAddType() { return (mpData->mFlags >> 8) & 3; }
|
||||
u32 getSttFlag() { return mpData->mFlags >> 16; }
|
||||
bool checkStatus(u16 flag) { return flag & getSttFlag(); }
|
||||
u32 getType() const { return mpData->mFlags & 0xF; }
|
||||
u32 getAddType() const { return (mpData->mFlags >> 8) & 3; }
|
||||
u32 getSttFlag() const { return mpData->mFlags >> 16; }
|
||||
u32 checkStatus(u16 flag) { return flag & getSttFlag(); }
|
||||
f32 getMagRndm() const { return mpData->mMagRndm; }
|
||||
f32 getVal1() const { return mpData->mVal1; }
|
||||
f32 getFadeInTime() { return mpData->mFadeInTime; }
|
||||
f32 getFadeOutTime() { return mpData->mFadeOutTime; }
|
||||
f32 getEnTime() { return mpData->mEnTime; }
|
||||
f32 getDisTime() { return mpData->mDisTime; }
|
||||
u8 getCycle() { return mpData->mCycle; }
|
||||
f32 getFadeInRate() { return mFadeInRate; }
|
||||
f32 getFadeOutRate() { return mFadeOutRate; }
|
||||
JGeometry::TVec3<f32>& getPos() { return mPos; }
|
||||
JGeometry::TVec3<f32>& getDir() { return mDir; }
|
||||
f32 getFadeInTime() const { return mpData->mFadeInTime; }
|
||||
f32 getFadeOutTime() const { return mpData->mFadeOutTime; }
|
||||
f32 getEnTime() const { return mpData->mEnTime; }
|
||||
f32 getDisTime() const { return mpData->mDisTime; }
|
||||
u8 getCycle() const { return mpData->mCycle; }
|
||||
f32 getFadeInRate() const { return mFadeInRate; }
|
||||
f32 getFadeOutRate() const { return mFadeOutRate; }
|
||||
const JGeometry::TVec3<f32>& getPos() const { return mPos; }
|
||||
const JGeometry::TVec3<f32>& getDir() const { return mDir; }
|
||||
f32 getMag() const { return mMag; }
|
||||
void getPosOrig(JGeometry::TVec3<f32>* pos) { pos->set(mpData->mPos); }
|
||||
void getDirOrig(JGeometry::TVec3<f32>* dir) { dir->set(mpData->mDir); }
|
||||
f32 getMagOrig() { return mpData->mMag; }
|
||||
void getPosOrig(JGeometry::TVec3<f32>* pos) const { pos->set(mpData->mPos); }
|
||||
void getDirOrig(JGeometry::TVec3<f32>* dir) const { dir->set(mpData->mDir); }
|
||||
f32 getMagOrig() const { return mpData->mMag; }
|
||||
void initOpParam() {
|
||||
getPosOrig(&mPos);
|
||||
getDirOrig(&mDir);
|
||||
mMag = getMagOrig();
|
||||
}
|
||||
void prepare(JPAEmitterWorkData* work) { mpField->prepare(work, this); }
|
||||
void calc(JPAEmitterWorkData* work, JPABaseParticle* ptcl) { mpField->calc(work, this, ptcl); }
|
||||
void prepare(JPAEmitterWorkData* work) { pFld->prepare(work, this); }
|
||||
void calc(JPAEmitterWorkData* work, JPABaseParticle* ptcl) { pFld->calc(work, this, ptcl); }
|
||||
|
||||
private:
|
||||
/* 0x00 */ const JPAFieldBlockData* mpData;
|
||||
/* 0x04 */ JPAFieldBase* mpField;
|
||||
/* 0x04 */ JPAFieldBase* pFld;
|
||||
/* 0x08 */ f32 mFadeInRate;
|
||||
/* 0x0C */ f32 mFadeOutRate;
|
||||
/* 0x10 */ JGeometry::TVec3<f32> mPos;
|
||||
|
||||
@@ -11,7 +11,10 @@ struct JPAKeyBlock {
|
||||
JPAKeyBlock(u8 const*);
|
||||
f32 calc(f32);
|
||||
|
||||
u8 getID() { return mDataStart[8]; }
|
||||
u8 getID() const { return mDataStart[8]; }
|
||||
u8 getKeyNum() const { return mDataStart[9]; }
|
||||
BOOL isLoop() const { return mDataStart[11]; }
|
||||
const f32* getKeyData() const { return field_0x4; }
|
||||
|
||||
const u8* mDataStart;
|
||||
const f32* field_0x4;
|
||||
|
||||
@@ -12,8 +12,8 @@ struct JPANode {
|
||||
JPANode() : mpPrev(NULL), mpNext(NULL) {
|
||||
}
|
||||
~JPANode() {}
|
||||
JPANode<T>* getPrev() { return mpPrev; }
|
||||
JPANode<T>* getNext() { return mpNext; }
|
||||
JPANode<T>* getPrev() const { return mpPrev; }
|
||||
JPANode<T>* getNext() const { return mpNext; }
|
||||
T* getObject() { return &mData; }
|
||||
|
||||
/* 0x00 */ JPANode<T>* mpPrev;
|
||||
@@ -48,8 +48,7 @@ struct JPAList {
|
||||
} else {
|
||||
mpLast = node;
|
||||
mpFirst = node;
|
||||
node->mpPrev = NULL;
|
||||
node->mpNext = NULL;
|
||||
node->mpNext = node->mpPrev = NULL;
|
||||
}
|
||||
|
||||
mNum++;
|
||||
@@ -75,8 +74,7 @@ struct JPAList {
|
||||
|
||||
if (mNum == 1) {
|
||||
ret = mpFirst;
|
||||
mpLast = NULL;
|
||||
mpFirst = NULL;
|
||||
mpFirst = mpLast = NULL;
|
||||
mNum--;
|
||||
} else if (mNum) {
|
||||
ret = mpFirst;
|
||||
@@ -93,8 +91,7 @@ struct JPAList {
|
||||
|
||||
if (mNum == 1) {
|
||||
ret = mpLast;
|
||||
mpLast = NULL;
|
||||
mpFirst = NULL;
|
||||
mpFirst = mpLast = NULL;
|
||||
mNum--;
|
||||
} else if (mNum) {
|
||||
ret = mpLast;
|
||||
@@ -120,8 +117,7 @@ struct JPAList {
|
||||
mpLast = node->mpPrev;
|
||||
mNum--;
|
||||
} else {
|
||||
mpLast = NULL;
|
||||
mpFirst = NULL;
|
||||
mpFirst = mpLast = NULL;
|
||||
mNum--;
|
||||
}
|
||||
return node;
|
||||
|
||||
@@ -33,17 +33,15 @@ public:
|
||||
void getOffsetPosition(JGeometry::TVec3<f32>& pos) { pos.set(mOffsetPosition); }
|
||||
void getOffsetPosition(JGeometry::TVec3<f32>* pos) const { pos->set(mOffsetPosition); }
|
||||
u16 getRotateAngle() const { return mRotateAngle; }
|
||||
void getGlobalPosition(JGeometry::TVec3<f32>& pos) const { pos.set(mPosition); }
|
||||
void getGlobalPosition(JGeometry::TVec3<f32>* pos) const { pos->set(mPosition); }
|
||||
f32 getParticleScaleX() const { return mParticleScaleX; }
|
||||
f32 getParticleScaleY() const { return mParticleScaleY; }
|
||||
void setStatus(u32 flag) { mStatus |= flag; }
|
||||
u32 checkStatus(u32 flag) { return mStatus & flag; }
|
||||
u32 checkStatus(u32 flag) const { return mStatus & flag; }
|
||||
void initStatus(u32 status) { mStatus = status; }
|
||||
void setInvisibleParticleFlag() { setStatus(8); }
|
||||
void setDeleteParticleFlag() { setStatus(2); }
|
||||
void getVelVec(JGeometry::TVec3<f32>& vec) const { vec.set(mVelocity); }
|
||||
void getLocalPosition(JGeometry::TVec3<f32>& vec) const { vec.set(mLocalPosition); }
|
||||
void getVelVec(JGeometry::TVec3<f32>* vec) const { vec->set(mVelocity); }
|
||||
void getLocalPosition(JGeometry::TVec3<f32>* vec) const { vec->set(mLocalPosition); }
|
||||
void getBaseAxis(JGeometry::TVec3<f32>& vec) const { vec.set(mBaseAxis); }
|
||||
void getBaseAxis(JGeometry::TVec3<f32>* vec) const { vec->set(mBaseAxis); }
|
||||
|
||||
@@ -37,13 +37,13 @@ public:
|
||||
void calcWorkData_c(JPAEmitterWorkData*);
|
||||
void calcWorkData_d(JPAEmitterWorkData*);
|
||||
|
||||
JPABaseShape* getBsp() const { return mpBaseShape; }
|
||||
JPAExtraShape* getEsp() const { return mpExtraShape; }
|
||||
JPAChildShape* getCsp() const { return mpChildShape; }
|
||||
JPAExTexShape* getEts() const { return mpExTexShape; }
|
||||
JPADynamicsBlock* getDyn() const { return mpDynamicsBlock; }
|
||||
JPABaseShape* getBsp() const { return pBsp; }
|
||||
JPAExtraShape* getEsp() const { return pEsp; }
|
||||
JPAChildShape* getCsp() const { return pCsp; }
|
||||
JPAExTexShape* getEts() const { return pEts; }
|
||||
JPADynamicsBlock* getDyn() const { return pDyn; }
|
||||
|
||||
u32 getTexIdx(u32 idx) const { return mpTDB1[idx]; }
|
||||
const u16 getTexIdx(u8 idx) { return mpTDB1[idx]; }
|
||||
u16 getUsrIdx() const { return mUsrIdx; }
|
||||
|
||||
public:
|
||||
@@ -57,18 +57,18 @@ public:
|
||||
/* 0x14 */ ParticleFunc* mpCalcParticleChildFuncList;
|
||||
/* 0x18 */ ParticleFunc* mpDrawParticleChildFuncList;
|
||||
|
||||
/* 0x1C */ JPABaseShape* mpBaseShape;
|
||||
/* 0x20 */ JPAExtraShape* mpExtraShape;
|
||||
/* 0x24 */ JPAChildShape* mpChildShape;
|
||||
/* 0x28 */ JPAExTexShape* mpExTexShape;
|
||||
/* 0x2C */ JPADynamicsBlock* mpDynamicsBlock;
|
||||
/* 0x30 */ JPAFieldBlock** mpFieldBlocks;
|
||||
/* 0x34 */ JPAKeyBlock** mpKeyBlocks;
|
||||
/* 0x1C */ JPABaseShape* pBsp;
|
||||
/* 0x20 */ JPAExtraShape* pEsp;
|
||||
/* 0x24 */ JPAChildShape* pCsp;
|
||||
/* 0x28 */ JPAExTexShape* pEts;
|
||||
/* 0x2C */ JPADynamicsBlock* pDyn;
|
||||
/* 0x30 */ JPAFieldBlock** ppFld;
|
||||
/* 0x34 */ JPAKeyBlock** ppKey;
|
||||
/* 0x38 */ u16 const* mpTDB1;
|
||||
/* 0x3C */ u16 mUsrIdx;
|
||||
/* 0x3E */ u8 mFieldBlockNum;
|
||||
/* 0x3F */ u8 mKeyBlockNum;
|
||||
/* 0x40 */ u8 mTDB1Num;
|
||||
/* 0x3E */ u8 fldNum;
|
||||
/* 0x3F */ u8 keyNum;
|
||||
/* 0x40 */ u8 texNum;
|
||||
/* 0x41 */ u8 mpCalcEmitterFuncListNum;
|
||||
/* 0x42 */ u8 mpDrawEmitterFuncListNum;
|
||||
/* 0x43 */ u8 mpDrawEmitterChildFuncListNum;
|
||||
|
||||
@@ -21,16 +21,16 @@ public:
|
||||
void registTex(JPATexture*);
|
||||
u32 getResUserWork(u16) const;
|
||||
|
||||
void load(u16 idx, GXTexMapID texMapID) { mpTexArr[idx]->load(texMapID); }
|
||||
void load(u16 idx, GXTexMapID texMapID) { pTexAry[idx]->load(texMapID); }
|
||||
|
||||
public:
|
||||
/* 0x00 */ JKRHeap* mpHeap;
|
||||
/* 0x04 */ JPAResource** mpResArr;
|
||||
/* 0x08 */ JPATexture** mpTexArr;
|
||||
/* 0x0C */ u16 mResMax;
|
||||
/* 0x0E */ u16 mResNum;
|
||||
/* 0x10 */ u16 mTexMax;
|
||||
/* 0x12 */ u16 mTexNum;
|
||||
/* 0x04 */ JPAResource** pResAry;
|
||||
/* 0x08 */ JPATexture** pTexAry;
|
||||
/* 0x0C */ u16 resMaxNum;
|
||||
/* 0x0E */ u16 resRegNum;
|
||||
/* 0x10 */ u16 texMaxNum;
|
||||
/* 0x12 */ u16 texRegNum;
|
||||
};
|
||||
|
||||
#endif /* JPARESOURCEMANAGER_H */
|
||||
|
||||
@@ -79,9 +79,10 @@ public:
|
||||
transformOnGet_enable(param_0);
|
||||
}
|
||||
|
||||
void transform_setOrigin_TxyzRy(const Vec& xyz, f32 rotY) {
|
||||
bool transform_setOrigin_TxyzRy(const Vec& xyz, f32 rotY) {
|
||||
transformOnSet_setOrigin_TxyzRy(xyz, rotY);
|
||||
transformOnGet_setOrigin_TxyzRy(xyz, rotY);
|
||||
return true;
|
||||
}
|
||||
|
||||
void transform_setOrigin(const Vec& xyz, f32 rotY) {
|
||||
|
||||
@@ -27,6 +27,7 @@ struct TCreateObject : public JStudio::TCreateObject {
|
||||
JAISoundStarter* get_pJAISoundStarter_() { return pJAISoundStarter_; }
|
||||
const JStage::TSystem* get_pJSGSystem_() { return pJSGSystem_; }
|
||||
bool isPermit_onExit_notEnd() { return mPermit_onExit_notEnd; }
|
||||
void setPermit_onExit_notEnd(bool value) { mPermit_onExit_notEnd = value; }
|
||||
|
||||
/* 0x0C */ JAISoundStarter* pJAISoundStarter_;
|
||||
/* 0x10 */ const JStage::TSystem* pJSGSystem_;
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
#define JSTUDIO_JSTAGE_CONTROL_H
|
||||
|
||||
#include "JSystem/JGadget/pointer.h"
|
||||
#include "JSystem/JStage/JSGLight.h"
|
||||
#include "JSystem/JStage/JSGActor.h"
|
||||
#include "JSystem/JStage/JSGAmbientLight.h"
|
||||
#include "JSystem/JStage/JSGCamera.h"
|
||||
#include "JSystem/JStage/JSGFog.h"
|
||||
#include "JSystem/JStage/JSGLight.h"
|
||||
#include "JSystem/JStage/JSGSystem.h"
|
||||
#include "JSystem/JStudio/JStudio/jstudio-object.h"
|
||||
#include "JSystem/JStudio/JStudio/jstudio-math.h"
|
||||
|
||||
@@ -103,9 +103,7 @@ public:
|
||||
return --index < 0 ? index = mMaxLines - 1 : index;
|
||||
}
|
||||
|
||||
int nextIndex(int index) const {
|
||||
return ++index >= mMaxLines ? 0 : index;
|
||||
}
|
||||
int nextIndex(int index) const { return (++index >= mMaxLines) ? index = 0 : index; }
|
||||
|
||||
void scrollToLastLine() { scroll(mMaxLines); }
|
||||
void scrollToFirstLine() { scroll(-mMaxLines); }
|
||||
|
||||
@@ -124,9 +124,9 @@ public:
|
||||
return drawString_size_scale(posX, posY, getWidth(), getHeight(), str, len, visible);
|
||||
}
|
||||
|
||||
void drawString_scale(f32 posX, f32 posY, f32 width, f32 height, const char* str,
|
||||
f32 drawString_scale(f32 posX, f32 posY, f32 width, f32 height, const char* str,
|
||||
bool visible) {
|
||||
drawString_size_scale(posX, posY, width, height, str, strlen(str), visible);
|
||||
return (int)drawString_size_scale(posX, posY, width, height, str, strlen(str), visible);
|
||||
}
|
||||
|
||||
int getWidth(int i_no) const {
|
||||
|
||||
@@ -286,6 +286,8 @@ struct JUTGamePadLongPress {
|
||||
/* 0x50 */ s32 field_0x50;
|
||||
};
|
||||
|
||||
inline void JUTReadGamePad() { JUTGamePad::read(); }
|
||||
inline u32 JUTReadGamePad() {
|
||||
return JUTGamePad::read();
|
||||
}
|
||||
|
||||
#endif /* JUTGAMEPAD_H */
|
||||
|
||||
@@ -24,7 +24,11 @@ public:
|
||||
return mGpStatus[2] == false;
|
||||
}
|
||||
|
||||
void save() { GXSaveCPUFifo(this->mFifo); }
|
||||
void save() {
|
||||
#if !PLATFORM_SHIELD
|
||||
GXSaveCPUFifo(this->mFifo);
|
||||
#endif
|
||||
}
|
||||
|
||||
static JUTGraphFifo* sCurrentFifo;
|
||||
static bool mGpStatus[5];
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
#ifndef NDEVEXI2A_DEBUGGERDRIVER_H
|
||||
#define NDEVEXI2A_DEBUGGERDRIVER_H
|
||||
|
||||
#include <dolphin/os.h>
|
||||
#include "types.h"
|
||||
|
||||
typedef void (*MtrCallback)(s32, OSContext*);
|
||||
typedef void (*IntrCallback)(s16, OSContext*);
|
||||
|
||||
#include <NdevExi2A/DebuggerDriver.h>
|
||||
|
||||
static u32 ODEMUGetSize(u32 mail);
|
||||
|
||||
static void __DBMtrHandler(s32 param_0, OSContext* ctx);
|
||||
|
||||
static void __DBIntrHandler(s16 param_0, OSContext* ctx);
|
||||
|
||||
u8 __DBReadUSB_CSR();
|
||||
|
||||
void __DBReadMailbox(u32* out);
|
||||
|
||||
void __DBCheckMailBox(void);
|
||||
|
||||
BOOL __DBWriteMailbox(u32 val);
|
||||
|
||||
BOOL __DBRead(u32 param_0, void* dst, u32 count);
|
||||
|
||||
BOOL __DBWrite(u32 param_0, void* src, u32 count);
|
||||
|
||||
void DBInitComm(u8** a, MtrCallback callback);
|
||||
|
||||
void DBInitInterrupts(void);
|
||||
|
||||
BOOL ODEMUIsValidMail(u32 mail);
|
||||
|
||||
u32 DBQueryData(void);
|
||||
|
||||
u32 ODEMUGetPage(u32 v);
|
||||
|
||||
u32 ODEMUGetPc2NngcOffset(u32 v);
|
||||
|
||||
BOOL DBRead(u32* buffer, s32 count);
|
||||
|
||||
void __DBWaitForSendMail();
|
||||
|
||||
u32 ODEMUGenMailData(u32 v, u32 size);
|
||||
|
||||
BOOL DBWrite(void* src, u32 size);
|
||||
|
||||
void DBOpen(void);
|
||||
|
||||
void DBClose(void);
|
||||
|
||||
#endif /* NDEVEXI2A_DEBUGGERDRIVER_H */
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef NDEVEXI2A_EXI2_H
|
||||
#define NDEVEXI2A_EXI2_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BOOL __EXI2Select();
|
||||
|
||||
BOOL __EXI2Deselect();
|
||||
|
||||
BOOL __EXI2Sync();
|
||||
|
||||
BOOL __EXI2Imm(u32* param_0, int width, int param_2);
|
||||
|
||||
void __DBEXIInit();
|
||||
|
||||
BOOL __DBEXIReadReg(u32 param_0, void* dst, u32 param_2);
|
||||
|
||||
BOOL __DBEXIWriteReg(u32 param_0, void* src, u32 width);
|
||||
|
||||
BOOL __DBEXIReadRam(u32 param_0, void* dst, int count);
|
||||
|
||||
BOOL __DBEXIWriteRam(u32 param_0, void* src, int count);
|
||||
|
||||
u32 __EXISwap32(u32 v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* NDEVEXI2A_EXI2_H */
|
||||
@@ -2,33 +2,8 @@
|
||||
#define C_ANGLE_H
|
||||
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "angle_utils.h"
|
||||
|
||||
#define ADD_VAR(x, y) ((x) += (y))
|
||||
#define SUB_VAR(x, y) ((x) -= (y))
|
||||
#define MULT_VAR(x, y) ((x) *= (y))
|
||||
|
||||
#define ADD_VAR_CAST(x, y, t) ((x) += (t)(y))
|
||||
#define SUB_VAR_CAST(x, y, t) ((x) -= (t)(y))
|
||||
#define MULT_VAR_CAST(x, y, t) ((x) *= (t)(y))
|
||||
|
||||
#define ADD_ANGLE(x, y) ADD_VAR_CAST(x, y, s16)
|
||||
#define SUB_ANGLE(x, y) SUB_VAR_CAST(x, y, s16)
|
||||
#define MULT_ANGLE(x, y) MULT_VAR_CAST(x, y, s16)
|
||||
|
||||
// There are some angles that weren't sign-extended until the shield version
|
||||
#if !PLATFORM_SHIELD
|
||||
#define ADD_ANGLE_2 ADD_VAR
|
||||
#define SUB_ANGLE_2 SUB_VAR
|
||||
#define MULT_ANGLE_2 MULT_VAR
|
||||
|
||||
#define ADD_S8_2 ADD_VAR
|
||||
#else
|
||||
#define ADD_ANGLE_2 ADD_ANGLE
|
||||
#define SUB_ANGLE_2 SUB_ANGLE
|
||||
#define MULT_ANGLE_2 MULT_ANGLE
|
||||
|
||||
#define ADD_S8_2(x, y) ADD_VAR_CAST(x, y, s8)
|
||||
#endif
|
||||
|
||||
#define DEG2S_CONSTANT (0x8000 / 180.0f)
|
||||
#define S2DEG_CONSTANT (180.0f / 0x8000)
|
||||
|
||||
@@ -59,15 +59,13 @@ inline T cLib_minMaxLimit(T val, T min, T max) {
|
||||
template <typename T>
|
||||
inline T cLib_maxLimit(T val, T max) {
|
||||
T ret;
|
||||
T var_r30;
|
||||
|
||||
if (val > max) {
|
||||
var_r30 = max;
|
||||
ret = max;
|
||||
} else {
|
||||
var_r30 = val;
|
||||
ret = val;
|
||||
}
|
||||
|
||||
ret = var_r30;
|
||||
return (T)ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define C_M2D_H
|
||||
|
||||
|
||||
struct cM2dGCir;
|
||||
class cM2dGCir;
|
||||
|
||||
void cM2d_CrossCirLin(cM2dGCir&, float, float, float, float, float*, float*);
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef METROTRK_PORTABLE_STRING_TRK_H
|
||||
#define METROTRK_PORTABLE_STRING_TRK_H
|
||||
|
||||
int TRK_strlen(const char* str);
|
||||
|
||||
#endif /* METROTRK_PORTABLE_STRING_TRK_H */
|
||||
@@ -0,0 +1,23 @@
|
||||
#ifndef Z2AUDIOCS_SPKDATA_H
|
||||
#define Z2AUDIOCS_SPKDATA_H
|
||||
|
||||
#include "Z2AudioCS/SpkTable.h"
|
||||
#include "Z2AudioCS/SpkWave.h"
|
||||
#include "JSystem/JKernel/JKRArchive.h"
|
||||
|
||||
class SpkData {
|
||||
public:
|
||||
SpkData(JKRArchive*);
|
||||
void loadTable(u16 chan);
|
||||
void loadWave(u16 chan);
|
||||
BOOL isValid(void) const;
|
||||
|
||||
inline SpkTable& getTableMgr(void) { return mTableMgr; }
|
||||
inline SpkWave& getWaveMgr(void) { return mWaveMgr; }
|
||||
|
||||
/* 0x00 */ SpkTable mTableMgr;
|
||||
/* 0x10 */ SpkWave mWaveMgr;
|
||||
/* 0x14 */ JKRArchive* mResArc;
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_SPKDATA_H */
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef Z2AUDIOCS_SPKMIXINGBUFFER_H
|
||||
#define Z2AUDIOCS_SPKMIXINGBUFFER_H
|
||||
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
static const s32 cSamplesPerAudioPacket = 40;
|
||||
|
||||
class SpkMixingBuffer {
|
||||
public:
|
||||
SpkMixingBuffer(JKRHeap* heap);
|
||||
void mix(s32 chan, s16* src, s32 len, f32 weight, s32 offset);
|
||||
s16* getSamples(s32 chan) const;
|
||||
bool update(s32 chan);
|
||||
void bzeroBuffer(s32 chan);
|
||||
|
||||
private:
|
||||
/* 0x00 */ s16* mBuffer[4];
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_SPKMIXINGBUFFER_H */
|
||||
@@ -0,0 +1,119 @@
|
||||
#ifndef Z2AUDIOCS_SPKSOUND_H
|
||||
#define Z2AUDIOCS_SPKSOUND_H
|
||||
|
||||
#include "Z2AudioCS/SpkTable.h"
|
||||
#include "JSystem/JAudio2/JASGadget.h"
|
||||
#include "JSystem/JAudio2/JASHeapCtrl.h"
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include <revolution/types.h>
|
||||
|
||||
class SpkSound;
|
||||
|
||||
class SpkSoundHandle {
|
||||
public:
|
||||
SpkSoundHandle(void) : mSound(NULL) {}
|
||||
~SpkSoundHandle(void) {
|
||||
releaseSound();
|
||||
}
|
||||
void releaseSound(void);
|
||||
|
||||
inline bool isSoundAttached() const {
|
||||
return mSound != NULL;
|
||||
}
|
||||
inline SpkSound* operator->(void) const {
|
||||
JUT_ASSERT(62, mSound != NULL);
|
||||
return mSound;
|
||||
}
|
||||
inline operator bool() const {
|
||||
return isSoundAttached();
|
||||
}
|
||||
|
||||
/* 0x00 */ SpkSound* mSound;
|
||||
};
|
||||
|
||||
class SpkSoundVolume {
|
||||
public:
|
||||
SpkSoundVolume(void);
|
||||
void setRelease(s32);
|
||||
void setFadeOut(s32);
|
||||
f32 calc(bool&);
|
||||
void setTableVolume(f32);
|
||||
|
||||
/* 0x00 */ f32 field_0x00;
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0c;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x1C */ f32 mTableVolume;
|
||||
};
|
||||
|
||||
class SpkSound : public JASPoolAllocObject<SpkSound>, public JSULink<SpkSound> {
|
||||
public:
|
||||
SpkSound(void);
|
||||
~SpkSound(void);
|
||||
void update(f32 vol);
|
||||
void stop(s32 msec);
|
||||
void startRelease(void);
|
||||
bool isHandleAttached(void) const;
|
||||
void attachHandle(SpkSoundHandle* handle);
|
||||
void releaseHandle(void);
|
||||
bool start(s32 chan, s32 soundNum);
|
||||
void kill(void);
|
||||
bool isStopping(void) const;
|
||||
bool isDead(void) const;
|
||||
bool isLocked(void) const;
|
||||
void unlock(void);
|
||||
s32 getLifeTime(void);
|
||||
void setLifeTime(s32 lifeTime);
|
||||
void updateLifeTime(void);
|
||||
s32 convertMsecToFrames(s32 msec);
|
||||
bool isLoopWave(void);
|
||||
bool setWaveData(s32 soundNum);
|
||||
|
||||
inline s32 getPriority(void) const { return mPriority; }
|
||||
inline void setPriority(s32 priority) { mPriority = priority; }
|
||||
inline s32 getSoundNum(void) const { return mSoundNum; }
|
||||
inline void setSoundNum(s32 soundNum) { mSoundNum = soundNum; }
|
||||
|
||||
/* 0x10 */ SpkSoundHandle* mHandle;
|
||||
/* 0x14 */ s32 mSoundNum;
|
||||
/* 0x18 */ s16* mWaveData;
|
||||
/* 0x1C */ s32 mCurPos;
|
||||
/* 0x20 */ u32 field_0x20;
|
||||
/* 0x24 */ s32 mPriority;
|
||||
/* 0x28 */ u32 field_0x28;
|
||||
/* 0x2C */ s32 mWaveSize;
|
||||
/* 0x30 */ s32 mWaveLoopStart;
|
||||
/* 0x34 */ s32 mWaveLoopEnd;
|
||||
/* 0x38 */ s32 mState;
|
||||
/* 0x3C */ s32 mLifeTime;
|
||||
/* 0x40 */ SpkSoundVolume mVolume;
|
||||
};
|
||||
|
||||
class SpkSoundHolder : JASGlobalInstance<SpkSoundHolder> {
|
||||
public:
|
||||
SpkSoundHolder(void);
|
||||
bool startSound(s32 chan, s32 soundNum, SpkSoundHandle* handle);
|
||||
bool startLevelSound(s32 chan, s32 soundNum, SpkSoundHandle* handle);
|
||||
void stopAll(s32 chan, s32 msec);
|
||||
bool update(s32 chan);
|
||||
bool updateEachSound(s32 chan);
|
||||
void freeDeadSound(s32 chan);
|
||||
void appendSound(s32 chan, SpkSound* sound);
|
||||
void framework(void);
|
||||
|
||||
inline f32 getMasterVolume(void) const { return mMasterVolume; }
|
||||
inline void setMasterVolume(f32 vol) { mMasterVolume = vol; }
|
||||
inline s32 getConfigVolume(void) const { return mConfigVolume; }
|
||||
inline void setConfigVolume(s32 vol) { mConfigVolume = vol; }
|
||||
inline f32 getConfigVolumeF32(void) const { return (f32)mConfigVolume / 15.0f; }
|
||||
|
||||
/* 0x00 */ JSUList<SpkSound> mSoundList[WPAD_MAX_CONTROLLERS];
|
||||
/* 0x30 */ f32 mSoundVolumes[WPAD_MAX_CONTROLLERS];
|
||||
/* 0x40 */ f32 mMasterVolume;
|
||||
/* 0x44 */ s32 mConfigVolume;
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_SPKSOUND_H */
|
||||
@@ -0,0 +1,47 @@
|
||||
#ifndef Z2AUDIOCS_SPKSPEAKERCTRL_H
|
||||
#define Z2AUDIOCS_SPKSPEAKERCTRL_H
|
||||
|
||||
#include "Z2AudioCS/SpkMixingBuffer.h"
|
||||
#include <revolution/os.h>
|
||||
#include <revolution/types.h>
|
||||
#include <revolution/wenc.h>
|
||||
|
||||
struct SpeakerInfo {
|
||||
/* 0x00 */ bool mIsConnected;
|
||||
/* 0x01 */ bool mIsPlaying;
|
||||
/* 0x02 */ WENCInfo mEncInfo;
|
||||
/* 0x22 */ bool field_0x22;
|
||||
/* 0x23 */ bool mIsMuted;
|
||||
#if VERSION != VERSION_WII_USA_R0
|
||||
/* 0x24 */ s32 mState;
|
||||
#endif
|
||||
/* 0x28 */ s32 mRadioSensitivityTimer;
|
||||
/* 0x2C */ s32 mExtensionTimer;
|
||||
/* 0x30 */ u8 mVolume;
|
||||
};
|
||||
|
||||
class SpkSpeakerCtrl {
|
||||
public:
|
||||
static void setMixingBuffer(SpkMixingBuffer*);
|
||||
static void setup(void);
|
||||
static void connect(s32 chan);
|
||||
static void disconnect(s32 chan);
|
||||
static void setSpeakerOn(s32 chan);
|
||||
static void setSpeakerOnCallback(s32 chan, s32 param_1);
|
||||
static void setSpeakerPlay(s32 chan);
|
||||
static void startPlayCallback(s32 chan, s32 param_1);
|
||||
static void setSpeakerOff(s32 chan);
|
||||
static void retryConnection(s32 chan);
|
||||
static void framework(void);
|
||||
static void updateSpeaker(OSAlarm* alarm, OSContext* ctx);
|
||||
static bool isEnable(s32 chan);
|
||||
static void extensionProcess(s32 chan, s32 param_1);
|
||||
static bool updateExtensionProcess(s32 chan);
|
||||
static bool isSubmitPlayByExtensionConnect(s32 chan);
|
||||
static bool checkRadioSensitivity(s32 chan);
|
||||
static bool isSubmitPlayByRadioSensitivity(s32 chan);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_SPKSPEAKERCTRL_H */
|
||||
@@ -0,0 +1,38 @@
|
||||
#ifndef Z2AUDIOCS_SPKSYSTEM_H
|
||||
#define Z2AUDIOCS_SPKSYSTEM_H
|
||||
|
||||
#include "Z2AudioCS/SpkData.h"
|
||||
#include "Z2AudioCS/SpkMixingBuffer.h"
|
||||
#include "Z2AudioCS/SpkSound.h"
|
||||
#include "JSystem/JAudio2/JASGadget.h"
|
||||
#include "JSystem/JKernel/JKRArchive.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <revolution/types.h>
|
||||
|
||||
class SpkSystem : protected JASGlobalInstance<SpkSystem> {
|
||||
public:
|
||||
SpkSystem(JKRHeap* heap);
|
||||
void setResource(JKRArchive* resArc, u16, u16);
|
||||
void framework(void);
|
||||
void startSound(s32 chan, s32 param_1, SpkSoundHandle* handle);
|
||||
void startLevelSound(s32 chan, s32 param_1, SpkSoundHandle* handle);
|
||||
void stopAll(s32 chan, s32 msec);
|
||||
void setMasterVolume(f32 vol);
|
||||
f32 getMasterVolume(void);
|
||||
void setConfigVolume(s32 vol);
|
||||
static void newSoundMemPool(s32 numOfSound);
|
||||
static void connect(s32 chan);
|
||||
static void disconnect(s32 chan);
|
||||
static void extensionProcess(s32, s32);
|
||||
|
||||
inline SpkData* getData(void) const { return mData; }
|
||||
inline SpkMixingBuffer* getMixingBuffer(void) const { return mMixingBuffer; }
|
||||
|
||||
private:
|
||||
/* 0x00 */ JKRHeap* mHeap;
|
||||
/* 0x04 */ SpkData* mData;
|
||||
/* 0x08 */ SpkMixingBuffer* mMixingBuffer;
|
||||
/* 0x0C */ SpkSoundHolder* mSoundHolder;
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_SPKSYSTEM_H */
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef Z2AUDIOCS_SPKTABLE_H
|
||||
#define Z2AUDIOCS_SPKTABLE_H
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <revolution/types.h>
|
||||
#include <revolution/wpad.h>
|
||||
|
||||
struct SpkTableParams {
|
||||
/* 0x00 */ u16 mWaveNum;
|
||||
/* 0x02 */ u8 field_0x02;
|
||||
/* 0x03 */ u8 mVolume;
|
||||
/* 0x04 */ u16 mMsec;
|
||||
/* 0x06 */ u8 pad_0x06[2];
|
||||
};
|
||||
|
||||
class SpkTable {
|
||||
public:
|
||||
SpkTable(void);
|
||||
void setResource(void* res);
|
||||
|
||||
inline s32 getName(s32 num) {
|
||||
JUT_ASSERT(0x35, num >= 0);
|
||||
JUT_ASSERT(0x36, num < mNumOfSound);
|
||||
return *(mDataOffsets + num);
|
||||
}
|
||||
inline s32 getNumOfSound() const { return mNumOfSound; }
|
||||
inline bool isValid(void) const { return mIsInitialized; }
|
||||
inline SpkTableParams* getParams(s32 num) {
|
||||
JUT_ASSERT(46, num >= 0);
|
||||
JUT_ASSERT(47, num < mNumOfSound);
|
||||
return (SpkTableParams*)mEntryOffset + num;
|
||||
}
|
||||
|
||||
// private:
|
||||
/* 0x00 */ bool mIsInitialized;
|
||||
/* 0x04 */ s32 mNumOfSound;
|
||||
/* 0x08 */ u32 mEntryOffset;
|
||||
/* 0x0C */ s32* mDataOffsets;
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_SPKTABLE_H */
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef Z2AUDIOCS_SPKWAVE_H
|
||||
#define Z2AUDIOCS_SPKWAVE_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
struct WaveData {
|
||||
s32 size;
|
||||
u32 loopStartPos;
|
||||
u32 loopEndPos;
|
||||
s16 wave[0];
|
||||
};
|
||||
|
||||
class SpkWave {
|
||||
public:
|
||||
SpkWave(void);
|
||||
void setResource(void*);
|
||||
s32 getNumOfWaves(void) const;
|
||||
s32 getWaveSize(s32 num) const;
|
||||
u32 getLoopStartPos(s32 num) const;
|
||||
u32 getLoopEndPos(s32 num) const;
|
||||
s16* getWave(s32 num) const;
|
||||
WaveData* getWaveData(s32 num) const;
|
||||
|
||||
inline bool isValid(void) const { return mWaveData != NULL; }
|
||||
inline const void* getResource(void) const { return mWaveData; }
|
||||
inline void* getResource(void) { return mWaveData; }
|
||||
|
||||
private:
|
||||
/* 0x00 */ void* mWaveData;
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_SPKWAVE_H */
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef Z2AUDIOCS_H
|
||||
#define Z2AUDIOCS_H
|
||||
|
||||
#include "Z2AudioCS/SpkTable.h"
|
||||
#include "Z2AudioCS/SpkSound.h"
|
||||
#include <dolphin/types.h>
|
||||
|
||||
class JKRHeap;
|
||||
class JKRArchive;
|
||||
|
||||
class Z2AudioCS {
|
||||
public:
|
||||
static void newSpkSoundMemPool();
|
||||
static int init(JKRHeap* heap, JKRArchive* res, s32 param_2, s32 param_3);
|
||||
static void update();
|
||||
static void connect(s32 chan);
|
||||
static void disconnect(s32 chan);
|
||||
static void extensionProcess(s32 chan, s32 param_1);
|
||||
static SpkSoundHandle* getHandleSoundID(s32 soundNum);
|
||||
static SpkSoundHandle* start(s32 id, s32 chan);
|
||||
static SpkSoundHandle* startLevel(s32 id, s32 chan);
|
||||
static s32 getName(s32 num);
|
||||
static s32 getNumOfSound(void);
|
||||
static void stopAll(s32 chan, s32 msec);
|
||||
static void stop(s32 chan);
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_H */
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef Z2AUDIOCS_H
|
||||
#define Z2AUDIOCS_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
class JKRHeap;
|
||||
class JKRArchive;
|
||||
|
||||
class Z2AudioCS {
|
||||
public:
|
||||
static void newSpkSoundMemPool();
|
||||
static int init(JKRHeap*, JKRArchive*, s32, s32);
|
||||
static void update();
|
||||
static void connect(s32);
|
||||
static void disconnect(s32);
|
||||
static void extensionProcess(s32, s32);
|
||||
u32 getHandleSoundID(s32);
|
||||
static void start(s32, s32);
|
||||
static int startLevel(s32, s32);
|
||||
};
|
||||
|
||||
#endif /* Z2AUDIOCS_H */
|
||||
@@ -0,0 +1,88 @@
|
||||
#ifndef _ANGLE_UTILS_H_
|
||||
#define _ANGLE_UTILS_H_
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#define VAR_ADD(x, y) ((x) += (y))
|
||||
#define VAR_SUB(x, y) ((x) -= (y))
|
||||
#define VAR_MULT(x, y) ((x) *= (y))
|
||||
|
||||
#define VAR_ADD_CAST(x, y, t) ((x) += (t)(y))
|
||||
#define VAR_SUB_CAST(x, y, t) ((x) -= (t)(y))
|
||||
#define VAR_MULT_CAST(x, y, t) ((x) *= (t)(y))
|
||||
|
||||
#define S8_ADD(x, y) VAR_ADD_CAST(x, y, s8)
|
||||
#define U8_ADD(x, y) VAR_ADD_CAST(x, y, u8)
|
||||
#define S16_ADD(x, y) VAR_ADD_CAST(x, y, s16)
|
||||
#define U16_ADD(x, y) VAR_ADD_CAST(x, y, u16)
|
||||
#define S32_ADD(x, y) VAR_ADD_CAST(x, y, s32)
|
||||
#define U32_ADD(x, y) VAR_ADD_CAST(x, y, u32)
|
||||
|
||||
#define S8_SUB(x, y) VAR_SUB_CAST(x, y, s8)
|
||||
#define U8_SUB(x, y) VAR_SUB_CAST(x, y, u8)
|
||||
#define S16_SUB(x, y) VAR_SUB_CAST(x, y, s16)
|
||||
#define U16_SUB(x, y) VAR_SUB_CAST(x, y, u16)
|
||||
#define S32_SUB(x, y) VAR_SUB_CAST(x, y, s32)
|
||||
#define U32_SUB(x, y) VAR_SUB_CAST(x, y, u32)
|
||||
|
||||
#define S8_MULT(x, y) VAR_MULT_CAST(x, y, s8)
|
||||
#define U8_MULT(x, y) VAR_MULT_CAST(x, y, u8)
|
||||
#define S16_MULT(x, y) VAR_MULT_CAST(x, y, s16)
|
||||
#define U16_MULT(x, y) VAR_MULT_CAST(x, y, u16)
|
||||
#define S32_MULT(x, y) VAR_MULT_CAST(x, y, s32)
|
||||
#define U32_MULT(x, y) VAR_MULT_CAST(x, y, u32)
|
||||
|
||||
#define ANGLE_ADD S16_ADD
|
||||
#define ANGLE_SUB S16_SUB
|
||||
#define ANGLE_MULT S16_MULT
|
||||
|
||||
// There are some angles that weren't sign-extended until the shield version
|
||||
#if !PLATFORM_SHIELD
|
||||
#define S8_ADD_2 VAR_ADD
|
||||
#define U8_ADD_2 VAR_ADD
|
||||
#define S16_ADD_2 VAR_ADD
|
||||
#define U16_ADD_2 VAR_ADD
|
||||
#define S32_ADD_2 VAR_ADD
|
||||
#define U32_ADD_2 VAR_ADD
|
||||
|
||||
#define S8_SUB_2 VAR_SUB
|
||||
#define U8_SUB_2 VAR_SUB
|
||||
#define S16_SUB_2 VAR_SUB
|
||||
#define U16_SUB_2 VAR_SUB
|
||||
#define S32_SUB_2 VAR_SUB
|
||||
#define U32_SUB_2 VAR_SUB
|
||||
|
||||
#define S8_MULT_2 VAR_MULT
|
||||
#define U8_MULT_2 VAR_MULT
|
||||
#define S16_MULT_2 VAR_MULT
|
||||
#define U16_MULT_2 VAR_MULT
|
||||
#define S32_MULT_2 VAR_MULT
|
||||
#define U32_MULT_2 VAR_MULT
|
||||
#else
|
||||
#define S8_ADD_2 S8_ADD
|
||||
#define U8_ADD_2 U8_ADD
|
||||
#define S16_ADD_2 S16_ADD
|
||||
#define U16_ADD_2 U16_ADD
|
||||
#define S32_ADD_2 S32_ADD
|
||||
#define U32_ADD_2 U32_ADD
|
||||
|
||||
#define S8_SUB_2 S8_SUB
|
||||
#define U8_SUB_2 U8_SUB
|
||||
#define S16_SUB_2 S16_SUB
|
||||
#define U16_SUB_2 U16_SUB
|
||||
#define S32_SUB_2 S32_SUB
|
||||
#define U32_SUB_2 U32_SUB
|
||||
|
||||
#define S8_MULT_2 S8_MULT
|
||||
#define U8_MULT_2 U8_MULT
|
||||
#define S16_MULT_2 S16_MULT
|
||||
#define U16_MULT_2 U16_MULT
|
||||
#define S32_MULT_2 S32_MULT
|
||||
#define U32_MULT_2 U32_MULT
|
||||
#endif
|
||||
|
||||
#define ANGLE_ADD_2 S16_ADD_2
|
||||
#define ANGLE_SUB_2 S16_SUB_2
|
||||
#define ANGLE_MULT_2 S16_MULT_2
|
||||
|
||||
#endif // !_ANGLE_UTILS_H_
|
||||
+4465
-4463
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ public:
|
||||
/* 0x0570 */ u8 prm0;
|
||||
/* 0x0571 */ u8 prm1;
|
||||
/* 0x0572 */ u8 prm2;
|
||||
/* 0x0574 */ ga_s ga_s[256];
|
||||
/* 0x0574 */ struct ga_s ga_s[256];
|
||||
/* 0x4D74 */ int ga_num;
|
||||
/* 0x4D78 */ u8 HIOInit;
|
||||
/* 0x4D79 */ u8 initialized;
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
void CheckHit();
|
||||
void WaitAction();
|
||||
void HalfBreakAction();
|
||||
bool VibAction();
|
||||
u8 VibAction();
|
||||
void DummyAction();
|
||||
void RealAction();
|
||||
void Action();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "d/d_cc_uty.h"
|
||||
#include "d/d_msg_flow.h"
|
||||
|
||||
class dPath;
|
||||
struct dPath;
|
||||
|
||||
/**
|
||||
* @ingroup actors-enemies
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
*/
|
||||
class e_warpappear_class : public fopAc_ac_c {
|
||||
public:
|
||||
/* 0x568 */ request_of_phase_process_class mPhase;
|
||||
/* 0x570 */ u8 field_0x570;
|
||||
/* 0x574 */ J3DModel* mpModel;
|
||||
/* 0x578 */ mDoExt_btkAnm* mpBtk;
|
||||
/* 0x57c */ mDoExt_brkAnm* mpBrks[2];
|
||||
/* 0x568 */ request_of_phase_process_class phase;
|
||||
/* 0x570 */ u8 arg0;
|
||||
/* 0x574 */ J3DModel* model;
|
||||
/* 0x578 */ mDoExt_btkAnm* btk;
|
||||
/* 0x57c */ mDoExt_brkAnm* anm_p[2];
|
||||
/* 0x584 */ int field_0x584;
|
||||
/* 0x588 */ u8 field_0x588[0x58c - 0x588];
|
||||
/* 0x58C */ u32 mParticle1;
|
||||
/* 0x590 */ u32 mParticle2;
|
||||
/* 0x594 */ s16 field_0x594;
|
||||
/* 0x596 */ s16 field_0x596;
|
||||
/* 0x58C */ u32 portal_app_b;
|
||||
/* 0x590 */ u32 portal_app_c;
|
||||
/* 0x594 */ s16 counter;
|
||||
/* 0x596 */ s16 action;
|
||||
/* 0x598 */ s16 field_0x598;
|
||||
/* 0x59A */ s16 field_0x59a[2];
|
||||
/* 0x59E */ s16 field_0x59e;
|
||||
/* 0x5A0 */ s16 field_0x5a0;
|
||||
/* 0x59A */ s16 timer[2];
|
||||
/* 0x59E */ s16 demo_mode;
|
||||
/* 0x5A0 */ s16 demo_timer;
|
||||
/* 0x5A4 */ cXyz field_0x5a4;
|
||||
/* 0x5B0 */ cXyz field_0x5b0;
|
||||
/* 0x5BC */ cXyz field_0x5bc;
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
/* 0x5F4 */ f32 field_0x5f4;
|
||||
/* 0x5F8 */ f32 field_0x5f8;
|
||||
/* 0x5FC */ f32 field_0x5fc;
|
||||
/* 0x600 */ dMsgFlow_c mMsgFlow;
|
||||
/* 0x64C */ int field_0x64c;
|
||||
/* 0x600 */ dMsgFlow_c MsgFlow;
|
||||
/* 0x64C */ int target_info_count;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_warpappear_class) == 0x650);
|
||||
|
||||
+3
-187
@@ -3,194 +3,10 @@
|
||||
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
class dCcMassS_HitInf;
|
||||
class cCcD_Obj;
|
||||
|
||||
class dGrass_data_c {
|
||||
public:
|
||||
void WorkCo(fopAc_ac_c*, u32, int);
|
||||
void WorkAt_NoCutAnim(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, cCcD_Obj*);
|
||||
void Direction_Set(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, cCcD_Obj*, csXyz*);
|
||||
void WorkAt(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, u16);
|
||||
void hitCheck(int, u16);
|
||||
~dGrass_data_c() {}
|
||||
dGrass_data_c() {
|
||||
m_state = 0;
|
||||
}
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x01 */ u8 field_0x01;
|
||||
/* 0x02 */ s8 field_0x02;
|
||||
/* 0x03 */ u8 m_tableNo;
|
||||
/* 0x04 */ u8 m_itemBitNo;
|
||||
/* 0x05 */ u8 field_0x05;
|
||||
/* 0x06 */ u8 field_0x06[0x08 - 0x06];
|
||||
/* 0x08 */ s16 m_addCol;
|
||||
/* 0x0C */ cXyz m_pos;
|
||||
/* 0x18 */ Mtx m_modelMtx;
|
||||
/* 0x48 */ dGrass_data_c* mp_next;
|
||||
};
|
||||
|
||||
class dGrass_room_c {
|
||||
public:
|
||||
void newData(dGrass_data_c*);
|
||||
void deleteData();
|
||||
dGrass_room_c() {
|
||||
mp_data = NULL;
|
||||
}
|
||||
|
||||
dGrass_data_c* getData() { return mp_data; }
|
||||
|
||||
/* 0x0 */ dGrass_data_c* mp_data;
|
||||
};
|
||||
|
||||
class dGrass_anm_c {
|
||||
public:
|
||||
dGrass_anm_c() {
|
||||
m_state = 0;
|
||||
}
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x02 */ s16 m_angY;
|
||||
/* 0x04 */ s16 m_angX;
|
||||
/* 0x08 */ Mtx m_animMtx;
|
||||
};
|
||||
|
||||
class dGrass_packet_c : public J3DPacket {
|
||||
public:
|
||||
dGrass_packet_c();
|
||||
void calc();
|
||||
void update();
|
||||
void setData(dGrass_data_c*, int, cXyz&, int, u8, u8, s16, u8);
|
||||
dGrass_data_c* newData(cXyz&, int, u8, u8, s16, u8);
|
||||
void deleteRoom(int);
|
||||
int newAnm();
|
||||
void setAnm(int, s16);
|
||||
|
||||
virtual void draw();
|
||||
virtual ~dGrass_packet_c();
|
||||
|
||||
typedef void (dGrass_packet_c::*deleteFunc)(int);
|
||||
static deleteFunc m_deleteRoom;
|
||||
|
||||
dGrass_anm_c* getAnm() { return m_anm; }
|
||||
dGrass_anm_c* getAnm(int i_no) { return &m_anm[i_no]; }
|
||||
|
||||
dGrass_data_c* getData() { return m_data; }
|
||||
|
||||
void deleteAnm(int i_idx) { m_anm[i_idx].m_state = 0; }
|
||||
|
||||
/* 0x00010 */ u16 m_dataNum;
|
||||
/* 0x00014 */ dGrass_data_c m_data[1500];
|
||||
/* 0x1BD64 */ dGrass_anm_c m_anm[112];
|
||||
/* 0x1D5E4 */ dGrass_room_c m_room[64];
|
||||
/* 0x1D6E4 */ Vec* mp_pos;
|
||||
/* 0x1D6E8 */ Vec* mp_normal;
|
||||
/* 0x1D6EC */ GXColor* mp_colors;
|
||||
/* 0x1D6F0 */ Vec* mp_texCoords;
|
||||
/* 0x1D6F4 */ u8* mp_kusa9q_DL;
|
||||
/* 0x1D6F8 */ u32 m_kusa9q_DL_size;
|
||||
/* 0x1D6FC */ u8* mp_kusa9q_14_DL;
|
||||
/* 0x1D700 */ u32 m_kusa9q_DL_14_size;
|
||||
/* 0x1D704 */ u8* mp_Mkusa_9q_DL;
|
||||
/* 0x1D708 */ u32 m_Mkusa_9q_DL_size;
|
||||
/* 0x1D70C */ u8* mp_Mkusa_9q_cDL;
|
||||
/* 0x1D710 */ u32 m_Mkusa_9q_cDL_size;
|
||||
/* 0x1D714 */ s16 field_0x1d714;
|
||||
}; // Size: 0x1D718
|
||||
|
||||
STATIC_ASSERT(sizeof(dGrass_packet_c) == 0x1D718);
|
||||
|
||||
class dFlower_data_c {
|
||||
public:
|
||||
void WorkCo(fopAc_ac_c*, u32, int);
|
||||
void deleteAnm();
|
||||
void WorkAt_NoCutAnim(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, cCcD_Obj*);
|
||||
void WorkAt(fopAc_ac_c*, u32, int, dCcMassS_HitInf*);
|
||||
void hitCheck(fopAc_ac_c*, int);
|
||||
~dFlower_data_c();
|
||||
dFlower_data_c();
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x01 */ s8 field_0x01;
|
||||
/* 0x02 */ s8 m_tableNo;
|
||||
/* 0x03 */ u8 field_0x03;
|
||||
/* 0x04 */ s16 field_0x04;
|
||||
/* 0x08 */ cXyz m_pos;
|
||||
/* 0x14 */ Mtx m_modelMtx;
|
||||
/* 0x44 */ dFlower_data_c* mp_next;
|
||||
};
|
||||
|
||||
class dFlower_room_c {
|
||||
public:
|
||||
void newData(dFlower_data_c*);
|
||||
void deleteData();
|
||||
dFlower_room_c();
|
||||
|
||||
dFlower_data_c* getData() { return mp_data; }
|
||||
|
||||
/* 0x0 */ dFlower_data_c* mp_data;
|
||||
};
|
||||
|
||||
class dFlower_anm_c {
|
||||
public:
|
||||
dFlower_anm_c();
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x02 */ s16 m_angY;
|
||||
/* 0x04 */ s16 m_angX;
|
||||
/* 0x08 */ Mtx m_animMtx;
|
||||
};
|
||||
|
||||
class dFlower_packet_c : public J3DPacket {
|
||||
public:
|
||||
dFlower_packet_c();
|
||||
void calc();
|
||||
void update();
|
||||
void setData(dFlower_data_c*, int, s8, cXyz&, int, s8, s16);
|
||||
dFlower_data_c* newData(s8, cXyz&, int, s8, s16);
|
||||
void deleteRoom(int);
|
||||
int newAnm();
|
||||
void setAnm(int, s16);
|
||||
|
||||
virtual void draw();
|
||||
virtual ~dFlower_packet_c();
|
||||
|
||||
typedef void (dFlower_packet_c::*deleteFunc)(int);
|
||||
static deleteFunc m_deleteRoom;
|
||||
|
||||
dFlower_anm_c* getAnm(int i_idx) { return &m_anm[i_idx]; }
|
||||
dFlower_anm_c* getAnm() { return &m_anm[0]; }
|
||||
dFlower_data_c* getData() { return m_data; }
|
||||
|
||||
void deleteAnm(int i_idx) { m_anm[i_idx].m_state = 0; }
|
||||
|
||||
void setPlayerCutFlg(int i_flag) { m_playerCutFlg = i_flag != 0; }
|
||||
void setPlayerSwordAngY(s16 i_angY) { m_playerSwordAngY = i_angY; }
|
||||
void setPlayerSwordMoveAngY(s16 i_angY) { m_playerSwordMoveAngY = i_angY; }
|
||||
void setPlayerSwordTop(cXyz& i_pos) { m_playerSwordTop = i_pos; }
|
||||
cXyz& getPlayerSwordTop() { return m_playerSwordTop; }
|
||||
|
||||
/* 0x00010 */ u16 m_dataNum;
|
||||
/* 0x00014 */ dFlower_data_c m_data[1000];
|
||||
/* 0x11954 */ dFlower_anm_c m_anm[72];
|
||||
/* 0x12914 */ dFlower_room_c m_room[64];
|
||||
/* 0x12A14 */ u8 m_playerCutFlg;
|
||||
/* 0x12A16 */ s16 m_playerSwordAngY;
|
||||
/* 0x12A18 */ s16 m_playerSwordMoveAngY;
|
||||
/* 0x12A1C */ cXyz m_playerSwordTop;
|
||||
/* 0x12A28 */ Vec* mp_pos;
|
||||
/* 0x12A2C */ GXColor* mp_colors;
|
||||
/* 0x12A30 */ Vec* mp_texCoords;
|
||||
/* 0x12A34 */ u8* mp_mat2DL;
|
||||
/* 0x12A38 */ u32 m_mat2DL_size;
|
||||
/* 0x12A3C */ u8* mp_mat2Light4DL;
|
||||
/* 0x12A40 */ u32 m_mat2Light4DL_size;
|
||||
/* 0x12A44 */ u8* mp_Jhana01DL;
|
||||
/* 0x12A48 */ u32 m_Jhana01DL_size;
|
||||
/* 0x12A4C */ u8* mp_Jhana01_cDL;
|
||||
/* 0x12A50 */ u32 m_Jhana01_cDL_size;
|
||||
}; // Size: 0x12A54
|
||||
class dCcMassS_HitInf;
|
||||
class dFlower_packet_c;
|
||||
class dGrass_packet_c;
|
||||
|
||||
/**
|
||||
* @ingroup actors-unsorted
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "d/d_a_itembase_static.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
|
||||
struct daItemBase_data {
|
||||
/* 0x00 */ f32 mGravity;
|
||||
|
||||
@@ -18,7 +18,7 @@ struct fs_weed_s {
|
||||
|
||||
struct fs_tsubo_s {
|
||||
/* 0x00 */ cXyz field_0x00;
|
||||
/* 0x0C */ u8 field_0x0c[0x14 - 0x0c];
|
||||
/* 0x0C */ csXyz field_0x0c; // unused
|
||||
/* 0x14 */ J3DModel* model;
|
||||
/* 0x18 */ u8 field_0x18[0x1C - 0x18];
|
||||
/* 0x1C */ f32 field_0x1c;
|
||||
@@ -29,7 +29,7 @@ struct fs_tsubo_s {
|
||||
|
||||
struct fs_rod_s {
|
||||
/* 0x00 */ cXyz field_0x00;
|
||||
/* 0x0C */ u8 field_0x0C[0x14 - 0x0C];
|
||||
/* 0x0C */ csXyz field_0x0C; // unused
|
||||
/* 0x14 */ J3DModel* model;
|
||||
/* 0x18 */ J3DModel* ringModel[6];
|
||||
/* 0x30 */ mDoExt_3DlineMat0_c line_mat;
|
||||
@@ -41,9 +41,7 @@ struct fs_rod_s {
|
||||
|
||||
struct fs_lure_s {
|
||||
/* 0x00 */ cXyz field_0x00;
|
||||
/* 0x0C */ s16 field_0x0c;
|
||||
/* 0x0E */ s16 field_0x0e;
|
||||
/* 0x10 */ s16 field_0x10;
|
||||
/* 0x0C */ csXyz field_0x0c;
|
||||
/* 0x14 */ J3DModel* model;
|
||||
/* 0x18 */ J3DModel* hookModel[2];
|
||||
/* 0x20 */ u8 field_0x20[0x24 - 0x20];
|
||||
@@ -113,6 +111,10 @@ public:
|
||||
/* 0x40B4 */ dBgS_ObjAcch ballAcch;
|
||||
/* 0x428C */ u8 field_0x428c;
|
||||
/* 0x428D */ u8 field_0x428d;
|
||||
#if PLATFORM_SHIELD
|
||||
u8 unk_dbg_padding[0x6];
|
||||
J3DModel* dbg_models[2];
|
||||
#endif
|
||||
/* 0x4290 */ fs_koro2_s mKoro2[100];
|
||||
/* 0x6B30 */ J3DModel* canoeModel;
|
||||
/* 0x6B34 */ s16 field_0x6b34;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "d/d_msg_flow.h"
|
||||
#include "d/d_particle_copoly.h"
|
||||
#include "global.h"
|
||||
#include <cstring>
|
||||
|
||||
struct daNpc_GetParam1 { // name unknown
|
||||
/* 0x0 */ int fileIdx;
|
||||
@@ -169,7 +170,7 @@ public:
|
||||
int chkPassed1(cXyz, int);
|
||||
int chkPassed2(cXyz, cXyz*, int, int);
|
||||
#if DEBUG
|
||||
int drawDbgInfo(f32, int);
|
||||
void drawDbgInfo(f32, int);
|
||||
#endif
|
||||
|
||||
daNpcT_Path_c() {
|
||||
@@ -276,7 +277,7 @@ public:
|
||||
cXyz cStack_50 = *mAttnPosP - param_1;
|
||||
sVar3 += cM_atan2s(cStack_50.x, cStack_50.z);
|
||||
sVar3 -= param_2;
|
||||
sVar3 -= (s16)(field_0x150.y - param_2);
|
||||
ANGLE_SUB(sVar3, field_0x150.y - param_2);
|
||||
sVar3 += param_5;
|
||||
}
|
||||
if (param_3) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_A_NPC_BOU_H
|
||||
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include <cstring>
|
||||
|
||||
struct daNpc_Bou_HIOParam {
|
||||
/* 0x00 */ daNpcT_HIOParam common;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc_cd2.h"
|
||||
#include "d/actor/d_a_tag_schedule.h"
|
||||
#include <cstring>
|
||||
|
||||
/**
|
||||
* @ingroup actors-npcs
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
/* 0x5BC */ s16 field_0x5bc;
|
||||
/* 0x5BE */ s16 field_0x5be;
|
||||
/* 0x5C0 */ dMsgFlow_c mMsgFlow;
|
||||
/* 0x60C */ u8 field_0x60c[0x618 - 0x60c];
|
||||
/* 0x60C */ cXyz field_0x60c; // unused
|
||||
/* 0x618 */ s16 field_0x618;
|
||||
/* 0x61C */ f32 field_0x61c;
|
||||
/* 0x620 */ s16 field_0x620;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_A_NPC_KN_H
|
||||
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include <cstring>
|
||||
|
||||
struct daNpc_Kn_HIOParam {
|
||||
/* 0x00 */ daNpcT_HIOParam common;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_A_NPC_KOLIN_H
|
||||
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include <cstring>
|
||||
|
||||
struct daNpc_Kolin_HIOParam {
|
||||
/* 0x00 */ daNpcT_HIOParam common;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_A_NPC_THE_H
|
||||
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include <cstring>
|
||||
|
||||
struct daNpcThe_HIOParam {
|
||||
/* 0x00 */ daNpcF_HIOParam common;
|
||||
|
||||
@@ -48,18 +48,4 @@ private:
|
||||
|
||||
STATIC_ASSERT(sizeof(daBsGate_c) == 0x5B8);
|
||||
|
||||
class daBsGate_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daBsGate_HIO_c();
|
||||
~daBsGate_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x4 */ f32 mOpenSpeed;
|
||||
/* 0x8 */ f32 mCloseSpeed;
|
||||
/* 0xC */ u8 mShockStrength;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daBsGate_HIO_c) == 0x10);
|
||||
|
||||
#endif /* D_A_OBJ_BSGATE_H */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "d/d_cc_d.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
class dPath;
|
||||
struct dPath;
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
|
||||
@@ -15,11 +15,39 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class daObj_ItaMato_HIO_c;
|
||||
struct daObj_ItaMato_HIOParam {
|
||||
/* 0x00 */ f32 attn_offset;
|
||||
/* 0x04 */ f32 gravity;
|
||||
/* 0x08 */ f32 scale;
|
||||
/* 0x0C */ f32 real_shadow_size;
|
||||
/* 0x10 */ f32 shake_pow;
|
||||
};
|
||||
|
||||
class daObj_ItaMato_Param_c {
|
||||
public:
|
||||
virtual ~daObj_ItaMato_Param_c() {}
|
||||
|
||||
static daObj_ItaMato_HIOParam const m;
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
#define OBJ_ITAMATO_HIO_CLASS daObj_ItaMato_HIO_c
|
||||
|
||||
class daObj_ItaMato_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daObj_ItaMato_HIO_c();
|
||||
void genMessage(JORMContext* ctx);
|
||||
void listenPropertyEvent(const JORPropertyEvent*);
|
||||
|
||||
/* 0x8 */ daObj_ItaMato_HIOParam m;
|
||||
};
|
||||
#else
|
||||
#define OBJ_ITAMATO_HIO_CLASS daObj_ItaMato_Param_c
|
||||
#endif
|
||||
|
||||
class daObj_ItaMato_c : public fopAc_ac_c {
|
||||
private:
|
||||
/* 0x568 */ daObj_ItaMato_HIO_c* mHIO;
|
||||
/* 0x568 */ OBJ_ITAMATO_HIO_CLASS* mHIO;
|
||||
/* 0x56C */ request_of_phase_process_class mPhase;
|
||||
/* 0x574 */ J3DModel* mpModels[2];
|
||||
/* 0x57C */ dBgS_ObjAcch mBgc;
|
||||
|
||||
@@ -93,23 +93,4 @@ private:
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjKAT_c) == 0xa74);
|
||||
|
||||
class daObj_KatHIO_c : public JORReflexible {
|
||||
public:
|
||||
daObj_KatHIO_c();
|
||||
virtual ~daObj_KatHIO_c() {}
|
||||
|
||||
void genMessage(JORMContext* ctx) {
|
||||
// Golden Snail
|
||||
ctx->genLabel("黄金蟲(カタツムリ)", 0x80000001);
|
||||
// Model scale (male)
|
||||
ctx->genSlider("モデルスケール(オス)", &this->mScaleMale, 0.1f, 4.0f);
|
||||
// Model scale (female)
|
||||
ctx->genSlider("モデルスケール(メス)", &this->mScaleFemale, 0.1f, 4.0f);
|
||||
}
|
||||
|
||||
s8 field_0x4;
|
||||
f32 mScaleFemale;
|
||||
f32 mScaleMale;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_KATATSUMURI_H */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "d/d_cc_d.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
#include "d/d_kankyo.h"
|
||||
|
||||
|
||||
/**
|
||||
@@ -26,8 +26,8 @@ public:
|
||||
int Draw();
|
||||
int Delete();
|
||||
|
||||
u8 getSwBit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
u8 getType() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||
int getSwBit() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
int getType() { return fopAcM_GetParamBit(this, 8, 8); }
|
||||
|
||||
private:
|
||||
/* 0x568 */ request_of_phase_process_class mPhaseReq;
|
||||
@@ -51,15 +51,4 @@ private:
|
||||
|
||||
STATIC_ASSERT(sizeof(daLv3Candle_c) == 0x754);
|
||||
|
||||
class daLv3Candle_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
daLv3Candle_HIO_c();
|
||||
virtual ~daLv3Candle_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x00 vtable */
|
||||
/* 0x04 */ u8 field_0x04;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_LV3CANDLE_H */
|
||||
|
||||
@@ -40,10 +40,9 @@ public:
|
||||
virtual ~daLv3Water_c() {}
|
||||
virtual bool eventStart();
|
||||
|
||||
int getParam() { return fpcM_GetParam(this) >> 0xC & 0x0FFF; }
|
||||
int getParamSw() { return fpcM_GetParam(this) & 0xFF; }
|
||||
int getParam(int shift, int bit) { return fopAcM_GetParamBit(this, shift, bit); }
|
||||
int getParamEvent() { return shape_angle.x & 0xFF; }
|
||||
u8 getParamType() { return (shape_angle.x >> 8) & 0xFF; }
|
||||
int getParamType() { return (shape_angle.x & 0xFF00) >> 8; }
|
||||
u8 getType() { return mType; }
|
||||
|
||||
private:
|
||||
@@ -54,13 +53,13 @@ private:
|
||||
/* 0x5E0 */ mDoExt_btkAnm mBtk2;
|
||||
/* 0x5F8 */ u8 mMode;
|
||||
/* 0x5F9 */ u8 mType;
|
||||
/* 0x5FC */ f32 field_0x5fc;
|
||||
/* 0x600 */ u8 field_0x600;
|
||||
/* 0x601 */ u8 field_0x601;
|
||||
/* 0x602 */ u8 mSwitch1;
|
||||
/* 0x603 */ u8 mSwitch2;
|
||||
/* 0x604 */ u8 field_0x604;
|
||||
/* 0x605 */ u8 field_0x605;
|
||||
/* 0x5FC */ f32 mWaterLv; // Amount that the water's y coodinate should increase
|
||||
/* 0x600 */ u8 mCurrentWaterLvFrame; // Number of frames that the water level has been changing
|
||||
/* 0x601 */ u8 mWaterLvFrame; // Number of frames that should be taken for the water level to change
|
||||
/* 0x602 */ u8 mSwInitialState;
|
||||
/* 0x603 */ u8 mSwCurrentState;
|
||||
/* 0x604 */ u8 mLvControlWaitFrames;
|
||||
/* 0x605 */ u8 mSwStatePostEvent; // Only when true (i.e event initiated water raising instead of lowering) should anything be drawn
|
||||
/* 0x608 */ u32 mEmitterIDs[8];
|
||||
};
|
||||
|
||||
|
||||
@@ -32,21 +32,21 @@ public:
|
||||
private:
|
||||
/* 0x5B8 */ request_of_phase_process_class mPhase;
|
||||
/* 0x5C0 */ J3DModel* mpModel;
|
||||
/* 0x5C4 */ mDoExt_btkAnm mWaterSurfaceRefractionAnm;
|
||||
/* 0x5C4 */ mDoExt_btkAnm mRefractionAnm; // Applied to water surface
|
||||
/* 0x5DC */ u8 mMode;
|
||||
/* 0x5DD */ u8 mResourceIndex;
|
||||
/* 0x5E0 */ f32 mWaterLv;
|
||||
/* 0x5E4 */ u8 mCurrentWaterLvFrame;
|
||||
/* 0x5E5 */ u8 mWaterLvFrame;
|
||||
/* 0x5E6 */ u8 mFullRatio;
|
||||
/* 0x5E7 */ u8 mEastSwInitialStatus; // East SW is the lever in the east-most room on 2F, which can only be pulled after raising the water level in that room by pulling the lever in 4F
|
||||
/* 0x5E8 */ u8 mWestSwInitialStatus; // West SW is the lever in the west-most room on 2F, which can only be pulled after raising the water level in that room by pulling the lever in 4F
|
||||
/* 0x5E9 */ u8 mEastSwCurrentStatus;
|
||||
/* 0x5EA */ u8 mWestSwCurrentStatus;
|
||||
/* 0x5EB */ u8 mLevelControlWaitFrames;
|
||||
/* 0x5DD */ u8 mResIdx;
|
||||
/* 0x5E0 */ f32 mWaterLv; // Amount that the water's y coodinate should increase
|
||||
/* 0x5E4 */ u8 mCurrentWaterLvFrame; // Number of frames that the water level has been changing
|
||||
/* 0x5E5 */ u8 mWaterLvFrame; // Number of frames that should be taken for the water level to change
|
||||
/* 0x5E6 */ u8 mEvActivatorSwState;
|
||||
/* 0x5E7 */ u8 mEastSwInitialState; // East SW is the lever in the east-most room on 2F, which can only be pulled after raising the water level in that room by pulling the lever in 4F
|
||||
/* 0x5E8 */ u8 mWestSwInitialState; // West SW is the lever in the west-most room on 2F, which can only be pulled after raising the water level in that room by pulling the lever in 4F
|
||||
/* 0x5E9 */ u8 mEastSwCurrentState;
|
||||
/* 0x5EA */ u8 mWestSwCurrentState;
|
||||
/* 0x5EB */ u8 mLvControlWaitFrames;
|
||||
/* 0x5EC */ f32 mBaseYPos;
|
||||
/* 0x5F0 */ u32 mEastWaterParticles[4]; // If the central staircase isn't rotated to allow water from the east to flow down it, the water falls into the basin; these are the splash particles where the basin water and falling water meet
|
||||
/* 0x600 */ u32 mWestWaterParticles[4]; // If the central staircase isn't rotated to allow water from the west to flow down it, the water falls into the basin; these are the splash particles where the basin water and falling water meet
|
||||
/* 0x5F0 */ u32 mEastParticles[4]; // If the central staircase isn't rotated to allow water from the east to flow down it, the water falls into the basin; these are the splash particles where the basin water and falling water meet
|
||||
/* 0x600 */ u32 mWestParticles[4]; // If the central staircase isn't rotated to allow water from the west to flow down it, the water falls into the basin; these are the splash particles where the basin water and falling water meet
|
||||
|
||||
enum Mode_e {
|
||||
WAIT, LEVEL_CTRL
|
||||
|
||||
@@ -43,11 +43,11 @@ public:
|
||||
void setAnmSpeed(f32 speed) { mpBck->setPlaySpeed(speed); }
|
||||
|
||||
bool isSwitch() {
|
||||
return fopAcM_isSwitch(this, getSwitchNo()) ||
|
||||
/* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */
|
||||
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) ||
|
||||
/* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */
|
||||
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]);
|
||||
return (fopAcM_isSwitch(this, getSwitchNo()) ||
|
||||
/* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */
|
||||
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) ||
|
||||
/* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */
|
||||
dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) != false;
|
||||
}
|
||||
|
||||
inline void setAction(Mode_e i_action);
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
*/
|
||||
class daObjSCannonTen_c : public fopAc_ac_c, public request_of_phase_process_class {
|
||||
public:
|
||||
typedef void (daObjSCannonTen_c::*ExeProc)(void);
|
||||
|
||||
enum daSCannonTen_exeMode {
|
||||
MODE_WAIT,
|
||||
MODE_ORDER_EVT,
|
||||
@@ -55,8 +57,8 @@ public:
|
||||
void exeEmtLine();
|
||||
void delEmtAll();
|
||||
|
||||
static void (daObjSCannonTen_c::*s_exeProc[])();
|
||||
static void (daObjSCannonTen_c::*s_demoExeProc[][2])();
|
||||
static const ExeProc s_exeProc[];
|
||||
static const ExeProc s_demoExeProc[][2];
|
||||
|
||||
private:
|
||||
/* 0x574 */ J3DModel* mpModel;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef D_A_OBJ_SYROCK_H
|
||||
#define D_A_OBJ_SYROCK_H
|
||||
|
||||
#include "d/actor/d_a_obj_waterPillar.h"
|
||||
#include "d/d_bg_s_movebg_actor.h"
|
||||
#include "d/actor/d_a_obj_waterPillar.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
@@ -50,20 +50,20 @@ private:
|
||||
/* 0x5B8 */ request_of_phase_process_class mPhase;
|
||||
/* 0x5C0 */ J3DModel* mpModels[2];
|
||||
/* 0x5C8 */ u8 mMode;
|
||||
/* 0x5C9 */ u8 mDropAutomaticallySwitchNo;
|
||||
/* 0x5C9 */ u8 mAutoDropSwNo;
|
||||
/* 0x5CC */ dCcD_Stts mStts;
|
||||
/* 0x608 */ dCcD_Cyl mUnbrokenCylinderCollider; // Collider used to check for bomb/bomb arrow for breaking stalactite
|
||||
/* 0x608 */ dCcD_Cyl mUnbrokenCollider; // Collider used to check for bomb/bomb arrow for breaking stalactite
|
||||
/* 0x744 */ u8 mWaitFrames;
|
||||
/* 0x748 */ u32 mShakeOscillationAngleStep;
|
||||
/* 0x74C */ csXyz mShakeXZAngleOffset;
|
||||
/* 0x748 */ u32 mShakeOscAngStep;
|
||||
/* 0x74C */ csXyz mShakeAngOffset; // Y component is always 0
|
||||
/* 0x754 */ f32 mShakeAmplitude;
|
||||
/* 0x758 */ f32 mShakeXOscillationAngle;
|
||||
/* 0x75C */ f32 mShakeZOscillationAngle;
|
||||
/* 0x760 */ f32 mShakeDamping;
|
||||
/* 0x758 */ f32 mShakeXOscAngQuantum;
|
||||
/* 0x75C */ f32 mShakeZOscAngQuantum;
|
||||
/* 0x760 */ f32 mShakeDampingScale;
|
||||
/* 0x764 */ f32 mShakeMaxDecay;
|
||||
/* 0x768 */ f32 mShakeMinDecay;
|
||||
/* 0x76C */ cXyz mUnderwaterRotatedStalactiteOffset;
|
||||
/* 0x778 */ bool mInWaterPreviousFrame;
|
||||
/* 0x76C */ cXyz mUnderwaterOffset;
|
||||
/* 0x778 */ u8 mInWaterPrevFrame;
|
||||
/* 0x779 */ u8 field_0x779; // Redundant variable, thus left unnamed
|
||||
/* 0x77C */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x7BC */ dBgS_ObjAcch mAcch;
|
||||
@@ -77,31 +77,30 @@ private:
|
||||
}
|
||||
|
||||
// Switch to determine whether or not the stalactite has been broken
|
||||
u32 getSwBit1() {
|
||||
int getSwBit1() {
|
||||
return fopAcM_GetParamBit(this, 0, 8);
|
||||
}
|
||||
|
||||
// Switch to determine whether or not the stalactite should be broken automatically when player is in range
|
||||
u32 getSwBit2() {
|
||||
int getSwBit2() {
|
||||
return fopAcM_GetParamBit(this, 8, 8);
|
||||
}
|
||||
|
||||
// Event ID for Midna to stop and note the stalactite that fell by itself
|
||||
s32 getEvetID() {
|
||||
int getEvetID() {
|
||||
return fopAcM_GetParamBit(this, 16, 8);
|
||||
}
|
||||
|
||||
enum Mode_e {
|
||||
MODE_WAIT,
|
||||
MODE_DROP_INIT,
|
||||
MODE_WAIT,
|
||||
MODE_DROP_INIT,
|
||||
MODE_DROP,
|
||||
MODE_SINK,
|
||||
MODE_MOVE,
|
||||
MODE_SINK,
|
||||
MODE_MOVE,
|
||||
MODE_DROP_END
|
||||
};
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daSyRock_c) == 0x9a0);
|
||||
|
||||
|
||||
#endif /* D_A_OBJ_SYROCK_H */
|
||||
|
||||
@@ -34,14 +34,4 @@ private:
|
||||
|
||||
STATIC_ASSERT(sizeof(daTwGate_c) == 0x5fc);
|
||||
|
||||
class daTwGate_HIO_c : public fOpAcm_HIO_entry_c {
|
||||
public:
|
||||
daTwGate_HIO_c();
|
||||
~daTwGate_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext* ctx);
|
||||
|
||||
/* 0x4 */ f32 mRange;
|
||||
};
|
||||
|
||||
#endif /* D_A_OBJ_TWGATE_H */
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
#ifndef D_A_OBJ_WATERPILLAR_H
|
||||
#define D_A_OBJ_WATERPILLAR_H
|
||||
|
||||
#include "d/d_bg_s_acch.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_event_lib.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
* @class daWtPillar_c
|
||||
@@ -15,6 +10,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "d/d_bg_s_acch.h"
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_event_lib.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
class daWtPillar_c : public fopAc_ac_c, public request_of_phase_process_class, public dEvLib_callback_c {
|
||||
public:
|
||||
daWtPillar_c() : dEvLib_callback_c(this) {}
|
||||
@@ -59,7 +61,7 @@ public:
|
||||
static dCcD_SrcCyl mCcDCyl;
|
||||
|
||||
void onRockFlag() {
|
||||
mIsCarryingStalactite = true;
|
||||
mCarryingStalactite = true;
|
||||
}
|
||||
|
||||
cXyz getPos() {
|
||||
@@ -67,18 +69,18 @@ public:
|
||||
}
|
||||
|
||||
u8 isRockYure() {
|
||||
return mStalactiteShouldStartShaking;
|
||||
return mStartStalactiteShake;
|
||||
}
|
||||
|
||||
void clearRockYure() {
|
||||
mStalactiteShouldStartShaking = false;
|
||||
mStartStalactiteShake = false;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x584 */ request_of_phase_process_class mPhase;
|
||||
/* 0x58C */ J3DModel* mpModel;
|
||||
/* 0x590 */ mDoExt_btkAnm mVerticalTextureScrollAnimation;
|
||||
/* 0x5A8 */ mDoExt_bckAnm mModelRotationAnimation;
|
||||
/* 0x590 */ mDoExt_btkAnm mVTexScrollAnm;
|
||||
/* 0x5A8 */ mDoExt_bckAnm mModelRotAnm;
|
||||
/* 0x5C4 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x79C */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x7DC */ dCcD_Stts mStts;
|
||||
@@ -86,34 +88,34 @@ private:
|
||||
/* 0x95C */ dCcD_Cyl mCylinderCollider;
|
||||
/* 0xA98 */ u8 pad0[0x30];
|
||||
/* 0xAC8 */ cXyz field_0xAC8; // unused.
|
||||
/* 0xAD4 */ cXyz mScale; // Modified but never read; unused?
|
||||
/* 0xAD4 */ cXyz mDbgDrawScale;
|
||||
/* 0xAE0 */ f32 mCurrentHeight;
|
||||
/* 0xAE4 */ cM3dGCpsS mCapsuleSource;
|
||||
/* 0xB00 */ u8 mAction;
|
||||
/* 0xB02 */ u16 mWaitFrameDelay;
|
||||
/* 0xB04 */ f32 mTargetMaxSpeed;
|
||||
/* 0xB02 */ u16 mWaitFrames;
|
||||
/* 0xB04 */ f32 mTargetSpeed;
|
||||
/* 0xB08 */ u8 mSwitchNo;
|
||||
/* 0xB09 */ u8 mType;
|
||||
/* 0xB0A */ u8 pad2[0x6];
|
||||
/* 0xB10 */ f32 mFirstTargetHeight;
|
||||
/* 0xB10 */ f32 mUpFirstTargetHeight;
|
||||
/* 0xB14 */ f32 mMaxHeight;
|
||||
/* 0xB18 */ f32 mTargetHeightStalactiteOffset;
|
||||
/* 0xB1C */ f32 mRelativeWaterHeight;
|
||||
/* 0xB20 */ u32 mEffectOscillationAngleStep;
|
||||
/* 0xB24 */ cXyz mEffectOscillationVerticalOffset;
|
||||
/* 0xB30 */ f32 mEffectOscillationAngle;
|
||||
/* 0xB34 */ f32 mEffectOscillationAmplitude;
|
||||
/* 0xB38 */ f32 mEffectOscillationDampingScale;
|
||||
/* 0xB3C */ f32 mEffectOscillationMaxDecay;
|
||||
/* 0xB40 */ f32 mEffectOscillationMinDecay;
|
||||
/* 0xB20 */ u32 mVOscAngleStep;
|
||||
/* 0xB24 */ cXyz mVOscVOffset;
|
||||
/* 0xB30 */ f32 mVOscAngleQuantum;
|
||||
/* 0xB34 */ f32 mVOscAmplitude;
|
||||
/* 0xB38 */ f32 mVOscDampingScale;
|
||||
/* 0xB3C */ f32 mVOscMaxDecay;
|
||||
/* 0xB40 */ f32 mVOscMinDecay;
|
||||
/* 0xB44 */ u8 field_0xB44; // Modified, but never read; unused?
|
||||
/* 0xB45 */ u8 mStartedRisingOrDoesNotRiseAndFall;
|
||||
/* 0xB46 */ u8 mPillarIsPreparingToRise;
|
||||
/* 0xB48 */ u32 mBottomAndTopParticleEmmitters[7];
|
||||
/* 0xB64 */ u32 mWaterSurfaceParticleEmitters[2];
|
||||
/* 0xB45 */ u8 mIsUpOrStatic;
|
||||
/* 0xB46 */ u8 mIsUpFirst;
|
||||
/* 0xB48 */ u32 mBotAndTopEmmitters[7];
|
||||
/* 0xB64 */ u32 mWaterSurfaceEmitters[2];
|
||||
/* 0xB6C */ cXyz mTopPos;
|
||||
/* 0xB78 */ s8 mStalactiteShouldStartShaking; // Modified by d_a_obj_syRock
|
||||
/* 0xB79 */ u8 mIsCarryingStalactite; // Modified by d_a_obj_syRock
|
||||
/* 0xB78 */ u8 mStartStalactiteShake; // Modified by d_a_obj_syRock
|
||||
/* 0xB79 */ u8 mCarryingStalactite; // Modified by d_a_obj_syRock
|
||||
|
||||
s32 getEventID() {
|
||||
return shape_angle.x & 0xFF;
|
||||
@@ -124,11 +126,11 @@ private:
|
||||
}
|
||||
|
||||
enum Action_e {
|
||||
ACTION_SW_WAIT,
|
||||
ACTION_WAIT,
|
||||
ACTION_SW_WAIT,
|
||||
ACTION_WAIT,
|
||||
ACTION_UP_FIRST, ACTION_UP_FIRST_WAIT,
|
||||
ACTION_UP, ACTION_UP_WAIT,
|
||||
ACTION_DOWN,
|
||||
ACTION_UP, ACTION_UP_WAIT,
|
||||
ACTION_DOWN,
|
||||
ACTION_ROCK_WAIT, ACTION_ROCK_ON,
|
||||
ACTION_END
|
||||
};
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
* @class daObjWaterFall_c
|
||||
* @brief Waterfall With Collision Object
|
||||
* @brief Waterfall Collision
|
||||
*
|
||||
* @details Waterfalls that player cannot move through (e.g. those in Zora's Domain)
|
||||
* @details Collision added to waterfalls that player shouldn't move through (e.g. those in Zora's Domain). Doesn't actually draw the waterfall.
|
||||
*/
|
||||
class daObjWaterFall_c : public fopAc_ac_c {
|
||||
public:
|
||||
@@ -30,23 +30,23 @@ private:
|
||||
/* 0x574 */ dCcD_Stts mCylColliderStts;
|
||||
/* 0x5B0 */ dCcD_Tri mUnusedTriCollider[2];
|
||||
/* 0x868 */ dCcD_Cyl mCylCollider;
|
||||
/* 0x9A4 */ cXyz mCylColliderCenterOscillationTargets[2];
|
||||
/* 0x9BC */ cXyz mCylColliderCenter;
|
||||
/* 0x9C8 */ s8 mCylColliderCenterQuantizedOscillation;
|
||||
/* 0x9A4 */ cXyz mColOscPosTargets[2];
|
||||
/* 0x9BC */ cXyz mColCenter;
|
||||
/* 0x9C8 */ s8 mColOscDir;
|
||||
|
||||
enum Type_e {
|
||||
ALLOW_ARROWS_e
|
||||
};
|
||||
|
||||
BOOL checkFallOut() {
|
||||
return fopAcM_GetParamBit(this, 10, 4);
|
||||
return (BOOL) fopAcM_GetParamBit(this, 10, 4) == TRUE;
|
||||
}
|
||||
|
||||
Type_e getType() {
|
||||
return static_cast<Type_e>(fopAcM_GetParamBit(this, 8, 2));
|
||||
u8 getType() {
|
||||
return fopAcM_GetParamBit(this, 8, 2);
|
||||
}
|
||||
|
||||
u32 getSwbit() {
|
||||
u8 getSwbit() {
|
||||
return fopAcM_GetParamBit(this, 0, 8);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "d/d_kankyo.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
class dPath;
|
||||
struct dPath;
|
||||
|
||||
/**
|
||||
* @ingroup actors-unsorted
|
||||
|
||||
@@ -7,6 +7,29 @@
|
||||
|
||||
struct ResTIMG;
|
||||
|
||||
class daPy_frameCtrl_c : public J3DFrameCtrl {
|
||||
public:
|
||||
virtual ~daPy_frameCtrl_c() {}
|
||||
daPy_frameCtrl_c() {}
|
||||
bool checkAnmEnd();
|
||||
void updateFrame();
|
||||
void setFrameCtrl(u8 i_attribute, s16 i_start, s16 i_end, f32 i_rate, f32 i_frame);
|
||||
|
||||
u16 getEndFlg() const { return mEndFlg; }
|
||||
u16 getNowSetFlg() const { return mNowSetFlg; }
|
||||
void onEndFlg() { mEndFlg = 1; }
|
||||
void onNowSetFlg() { mNowSetFlg = 1; }
|
||||
void offNowSetFlg() { mNowSetFlg = 0; }
|
||||
void offEndFlg() {
|
||||
mEndFlg = 0;
|
||||
mNowSetFlg = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x14 */ u16 mEndFlg;
|
||||
/* 0x16 */ u16 mNowSetFlg;
|
||||
};
|
||||
|
||||
class daPy_sightPacket_c : public dDlst_base_c {
|
||||
public:
|
||||
daPy_sightPacket_c() {}
|
||||
@@ -111,29 +134,6 @@ private:
|
||||
/* 0x4 */ fopAc_ac_c* mActor;
|
||||
}; // Size: 0x8
|
||||
|
||||
class daPy_frameCtrl_c : public J3DFrameCtrl {
|
||||
public:
|
||||
virtual ~daPy_frameCtrl_c() {}
|
||||
daPy_frameCtrl_c() {}
|
||||
bool checkAnmEnd();
|
||||
void updateFrame();
|
||||
void setFrameCtrl(u8 i_attribute, s16 i_start, s16 i_end, f32 i_rate, f32 i_frame);
|
||||
|
||||
u16 getEndFlg() const { return mEndFlg; }
|
||||
u16 getNowSetFlg() const { return mNowSetFlg; }
|
||||
void onEndFlg() { mEndFlg = 1; }
|
||||
void onNowSetFlg() { mNowSetFlg = 1; }
|
||||
void offNowSetFlg() { mNowSetFlg = 0; }
|
||||
void offEndFlg() {
|
||||
mEndFlg = 0;
|
||||
mNowSetFlg = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x14 */ u16 mEndFlg;
|
||||
/* 0x16 */ u16 mNowSetFlg;
|
||||
};
|
||||
|
||||
class Z2WolfHowlMgr;
|
||||
class daBoomerang_c;
|
||||
|
||||
|
||||
@@ -21,17 +21,18 @@ public:
|
||||
u8 check(fopAc_ac_c*);
|
||||
bool check(cXyz const&);
|
||||
void execute();
|
||||
void draw();
|
||||
~data_c() {}
|
||||
data_c() { reset(); }
|
||||
|
||||
void setNext(data_c* i_next) { mpNext = i_next; }
|
||||
data_c* getNext() { return mpNext; }
|
||||
u8 getType() { return mType; }
|
||||
bool isUsed() { return mRoomNo < 0; }
|
||||
bool isUsed() { return mRoomNo >= 0; }
|
||||
s8 getRoomNo() { return mRoomNo; }
|
||||
|
||||
/* 0x00 */ s8 mRoomNo;
|
||||
/* 0x01 */ bool field_0x1;
|
||||
/* 0x01 */ u8 field_0x1;
|
||||
/* 0x02 */ u8 field_0x2;
|
||||
/* 0x03 */ u8 field_0x3;
|
||||
/* 0x04 */ u8 mType;
|
||||
@@ -44,7 +45,7 @@ public:
|
||||
public:
|
||||
void add(daSus_c::data_c*);
|
||||
void reset();
|
||||
room_c() { init(); }
|
||||
room_c() { mpData = NULL; }
|
||||
void init() { mpData = NULL; }
|
||||
|
||||
/* 0x0 */ data_c* mpData;
|
||||
@@ -55,6 +56,7 @@ public:
|
||||
static void check(fopAc_ac_c*);
|
||||
static bool check(s8 i_roomNo, cXyz const& i_pos);
|
||||
static void execute();
|
||||
static void draw();
|
||||
int create();
|
||||
|
||||
static void reset(int roomNo) {
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
#ifndef D_FLOWER_H
|
||||
#define D_FLOWER_H
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
|
||||
class cCcD_Obj;
|
||||
class dCcMassS_HitInf;
|
||||
class fopAc_ac_c;
|
||||
|
||||
class dFlower_data_c {
|
||||
public:
|
||||
void WorkCo(fopAc_ac_c*, u32, int);
|
||||
void deleteAnm();
|
||||
void WorkAt_NoCutAnim(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, cCcD_Obj*);
|
||||
void WorkAt(fopAc_ac_c*, u32, int, dCcMassS_HitInf*);
|
||||
void hitCheck(fopAc_ac_c*, int);
|
||||
~dFlower_data_c();
|
||||
dFlower_data_c();
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x01 */ s8 field_0x01;
|
||||
/* 0x02 */ s8 m_tableNo;
|
||||
/* 0x03 */ u8 field_0x03;
|
||||
/* 0x04 */ s16 field_0x04;
|
||||
/* 0x08 */ cXyz m_pos;
|
||||
/* 0x14 */ Mtx m_modelMtx;
|
||||
/* 0x44 */ dFlower_data_c* mp_next;
|
||||
};
|
||||
|
||||
class dFlower_room_c {
|
||||
public:
|
||||
void newData(dFlower_data_c*);
|
||||
void deleteData();
|
||||
dFlower_room_c();
|
||||
|
||||
dFlower_data_c* getData() { return mp_data; }
|
||||
|
||||
/* 0x0 */ dFlower_data_c* mp_data;
|
||||
};
|
||||
|
||||
class dFlower_anm_c {
|
||||
public:
|
||||
dFlower_anm_c();
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x02 */ s16 m_angY;
|
||||
/* 0x04 */ s16 m_angX;
|
||||
/* 0x08 */ Mtx m_animMtx;
|
||||
};
|
||||
|
||||
class dFlower_packet_c : public J3DPacket {
|
||||
public:
|
||||
dFlower_packet_c();
|
||||
void calc();
|
||||
void update();
|
||||
void setData(dFlower_data_c*, int, s8, cXyz&, int, s8, s16);
|
||||
dFlower_data_c* newData(s8, cXyz&, int, s8, s16);
|
||||
void deleteRoom(int);
|
||||
int newAnm();
|
||||
void setAnm(int, s16);
|
||||
|
||||
virtual void draw();
|
||||
virtual ~dFlower_packet_c();
|
||||
|
||||
typedef void (dFlower_packet_c::*deleteFunc)(int);
|
||||
|
||||
static deleteFunc getDeleteRoom() {
|
||||
JUT_ASSERT(174, m_deleteRoom != NULL);
|
||||
return m_deleteRoom;
|
||||
}
|
||||
|
||||
static deleteFunc m_deleteRoom;
|
||||
|
||||
dFlower_anm_c* getAnm(int i_idx) { return &m_anm[i_idx]; }
|
||||
dFlower_anm_c* getAnm() { return &m_anm[0]; }
|
||||
dFlower_data_c* getData() { return m_data; }
|
||||
|
||||
void deleteAnm(int i_idx) { m_anm[i_idx].m_state = 0; }
|
||||
|
||||
void setPlayerCutFlg(int i_flag) { m_playerCutFlg = i_flag != 0; }
|
||||
void setPlayerSwordAngY(s16 i_angY) { m_playerSwordAngY = i_angY; }
|
||||
void setPlayerSwordMoveAngY(s16 i_angY) { m_playerSwordMoveAngY = i_angY; }
|
||||
void setPlayerSwordTop(cXyz& i_pos) { m_playerSwordTop = i_pos; }
|
||||
cXyz& getPlayerSwordTop() { return m_playerSwordTop; }
|
||||
|
||||
/* 0x00010 */ u16 m_dataNum;
|
||||
/* 0x00014 */ dFlower_data_c m_data[1000];
|
||||
/* 0x11954 */ dFlower_anm_c m_anm[72];
|
||||
/* 0x12914 */ dFlower_room_c m_room[64];
|
||||
/* 0x12A14 */ u8 m_playerCutFlg;
|
||||
/* 0x12A16 */ s16 m_playerSwordAngY;
|
||||
/* 0x12A18 */ s16 m_playerSwordMoveAngY;
|
||||
/* 0x12A1C */ cXyz m_playerSwordTop;
|
||||
/* 0x12A28 */ Vec* mp_pos;
|
||||
/* 0x12A2C */ GXColor* mp_colors;
|
||||
/* 0x12A30 */ Vec* mp_texCoords;
|
||||
/* 0x12A34 */ u8* mp_mat2DL;
|
||||
/* 0x12A38 */ u32 m_mat2DL_size;
|
||||
/* 0x12A3C */ u8* mp_mat2Light4DL;
|
||||
/* 0x12A40 */ u32 m_mat2Light4DL_size;
|
||||
/* 0x12A44 */ u8* mp_Jhana01DL;
|
||||
/* 0x12A48 */ u32 m_Jhana01DL_size;
|
||||
/* 0x12A4C */ u8* mp_Jhana01_cDL;
|
||||
/* 0x12A50 */ u32 m_Jhana01_cDL_size;
|
||||
}; // Size: 0x12A54
|
||||
|
||||
#endif /* D_FLOWER_H */
|
||||
@@ -0,0 +1,113 @@
|
||||
#ifndef D_GRASS_H
|
||||
#define D_GRASS_H
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
|
||||
class cCcD_Obj;
|
||||
class csXyz;
|
||||
class dCcMassS_HitInf;
|
||||
class fopAc_ac_c;
|
||||
|
||||
class dGrass_data_c {
|
||||
public:
|
||||
void WorkCo(fopAc_ac_c*, u32, int);
|
||||
void WorkAt_NoCutAnim(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, cCcD_Obj*);
|
||||
void Direction_Set(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, cCcD_Obj*, csXyz*);
|
||||
void WorkAt(fopAc_ac_c*, u32, int, dCcMassS_HitInf*, u16);
|
||||
void hitCheck(int, u16);
|
||||
~dGrass_data_c() {}
|
||||
dGrass_data_c() {
|
||||
m_state = 0;
|
||||
}
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x01 */ u8 field_0x01;
|
||||
/* 0x02 */ s8 field_0x02;
|
||||
/* 0x03 */ u8 m_tableNo;
|
||||
/* 0x04 */ u8 m_itemBitNo;
|
||||
/* 0x05 */ u8 field_0x05;
|
||||
/* 0x06 */ u8 field_0x06[0x08 - 0x06];
|
||||
/* 0x08 */ s16 m_addCol;
|
||||
/* 0x0C */ cXyz m_pos;
|
||||
/* 0x18 */ Mtx m_modelMtx;
|
||||
/* 0x48 */ dGrass_data_c* mp_next;
|
||||
};
|
||||
|
||||
class dGrass_room_c {
|
||||
public:
|
||||
void newData(dGrass_data_c*);
|
||||
void deleteData();
|
||||
dGrass_room_c() {
|
||||
mp_data = NULL;
|
||||
}
|
||||
|
||||
dGrass_data_c* getData() { return mp_data; }
|
||||
|
||||
/* 0x0 */ dGrass_data_c* mp_data;
|
||||
};
|
||||
|
||||
class dGrass_anm_c {
|
||||
public:
|
||||
dGrass_anm_c() {
|
||||
m_state = 0;
|
||||
}
|
||||
|
||||
/* 0x00 */ u8 m_state;
|
||||
/* 0x02 */ s16 m_angY;
|
||||
/* 0x04 */ s16 m_angX;
|
||||
/* 0x08 */ Mtx m_animMtx;
|
||||
};
|
||||
|
||||
class dGrass_packet_c : public J3DPacket {
|
||||
public:
|
||||
dGrass_packet_c();
|
||||
void calc();
|
||||
void update();
|
||||
void setData(dGrass_data_c*, int, cXyz&, int, u8, u8, s16, u8);
|
||||
dGrass_data_c* newData(cXyz&, int, u8, u8, s16, u8);
|
||||
void deleteRoom(int);
|
||||
int newAnm();
|
||||
void setAnm(int, s16);
|
||||
|
||||
virtual void draw();
|
||||
virtual ~dGrass_packet_c();
|
||||
|
||||
typedef void (dGrass_packet_c::*deleteFunc)(int);
|
||||
|
||||
static deleteFunc getDeleteRoom() {
|
||||
JUT_ASSERT(181, m_deleteRoom != NULL);
|
||||
return m_deleteRoom;
|
||||
}
|
||||
|
||||
static deleteFunc m_deleteRoom;
|
||||
|
||||
dGrass_anm_c* getAnm() { return m_anm; }
|
||||
dGrass_anm_c* getAnm(int i_no) { return &m_anm[i_no]; }
|
||||
|
||||
dGrass_data_c* getData() { return m_data; }
|
||||
|
||||
void deleteAnm(int i_idx) { m_anm[i_idx].m_state = 0; }
|
||||
|
||||
/* 0x00010 */ u16 m_dataNum;
|
||||
/* 0x00014 */ dGrass_data_c m_data[1500];
|
||||
/* 0x1BD64 */ dGrass_anm_c m_anm[112];
|
||||
/* 0x1D5E4 */ dGrass_room_c m_room[64];
|
||||
/* 0x1D6E4 */ Vec* mp_pos;
|
||||
/* 0x1D6E8 */ Vec* mp_normal;
|
||||
/* 0x1D6EC */ GXColor* mp_colors;
|
||||
/* 0x1D6F0 */ Vec* mp_texCoords;
|
||||
/* 0x1D6F4 */ u8* mp_kusa9q_DL;
|
||||
/* 0x1D6F8 */ u32 m_kusa9q_DL_size;
|
||||
/* 0x1D6FC */ u8* mp_kusa9q_14_DL;
|
||||
/* 0x1D700 */ u32 m_kusa9q_DL_14_size;
|
||||
/* 0x1D704 */ u8* mp_Mkusa_9q_DL;
|
||||
/* 0x1D708 */ u32 m_Mkusa_9q_DL_size;
|
||||
/* 0x1D70C */ u8* mp_Mkusa_9q_cDL;
|
||||
/* 0x1D710 */ u32 m_Mkusa_9q_cDL_size;
|
||||
/* 0x1D714 */ s16 field_0x1d714;
|
||||
}; // Size: 0x1D718
|
||||
|
||||
STATIC_ASSERT(sizeof(dGrass_packet_c) == 0x1D718);
|
||||
|
||||
#endif /* D_GRASS_H */
|
||||
+67
-2
@@ -24,14 +24,79 @@ T PrmAbstract(const fopAc_ac_c* i_actor, T i_nbits, T i_shift) {
|
||||
|
||||
class HioVarious_c : public JORReflexible {
|
||||
public:
|
||||
HioVarious_c();
|
||||
virtual void genMessage(JORMContext*);
|
||||
|
||||
static void init(JORReflexible* node_ptr, const char* node_name);
|
||||
static void clean(JORReflexible* node_ptr);
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
static HioVarious_c M_hio;
|
||||
|
||||
/* 0x04 */ JORReflexible* node_ptrs[16];
|
||||
/* 0x44 */ const char* node_names[16];
|
||||
/* 0x84 */ u8 field_0x84;
|
||||
/* 0x84 */ s8 field_0x84;
|
||||
};
|
||||
|
||||
class HioThrow_c : public JORReflexible {
|
||||
public:
|
||||
HioThrow_c();
|
||||
#if DEBUG
|
||||
virtual void listen(u32 command, const JOREvent* event) { JORReflexible::listen(command, event); }
|
||||
virtual void genObjectInfo(const JORGenEvent* event) { JORReflexible::genObjectInfo(event); }
|
||||
virtual void listenNodeEvent(const JORNodeEvent* event) { JORReflexible::listenNodeEvent(event); }
|
||||
virtual void listenPropertyEvent(const JORPropertyEvent* event) { JORReflexible::listenPropertyEvent(event); }
|
||||
#endif
|
||||
virtual void genMessage(JORMContext*);
|
||||
|
||||
static void init(JORReflexible* node_ptr, const char* node_name);
|
||||
static void clean(JORReflexible* node_ptr);
|
||||
|
||||
static HioThrow_c M_hio;
|
||||
static cXyz M_throw_pos_st;
|
||||
static cXyz M_throw_pos_now;
|
||||
|
||||
/* 0x04 */ JORReflexible* node_ptrs[20];
|
||||
/* 0x54 */ const char* node_names[20];
|
||||
/* 0xA4 */ s8 field_0xa4;
|
||||
};
|
||||
|
||||
class HioField_c : public JORReflexible {
|
||||
public:
|
||||
HioField_c();
|
||||
virtual void genMessage(JORMContext*);
|
||||
|
||||
static HioField_c M_hio;
|
||||
|
||||
/* 0x04 */ JORReflexible* node_ptrs[16];
|
||||
/* 0x44 */ const char* node_names[16];
|
||||
/* 0x84 */ s8 field_0x84;
|
||||
};
|
||||
|
||||
class HioSpot_c : public JORReflexible {
|
||||
public:
|
||||
HioSpot_c();
|
||||
virtual void genMessage(JORMContext*);
|
||||
|
||||
static HioSpot_c M_hio;
|
||||
|
||||
/* 0x04 */ JORReflexible* node_ptrs[16];
|
||||
/* 0x44 */ const char* node_names[16];
|
||||
/* 0x84 */ s8 field_0x84;
|
||||
};
|
||||
|
||||
class HioObj_c : public JORReflexible {
|
||||
public:
|
||||
HioObj_c();
|
||||
virtual void genMessage(JORMContext*);
|
||||
|
||||
static void init();
|
||||
static void clean();
|
||||
|
||||
static HioObj_c M_hio;
|
||||
static const char* const M_node_name[];
|
||||
static JORReflexible* const M_node_ptr[];
|
||||
|
||||
/* 0x04 */ s8 M_no;
|
||||
};
|
||||
|
||||
}; // namespace daObj
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
struct ResourceData {
|
||||
const char* get_arcName() const { return mArcName; }
|
||||
s16 get_bmdName() const { return mBmdName; }
|
||||
s16 get_btk1Name() const { return mBtkName; }
|
||||
s16 get_bpk1Name() const { return mBpkName; }
|
||||
s16 get_bck1Name() const { return mBckName; }
|
||||
s16 get_bxa1Name() const { return mBxaName; }
|
||||
s16 get_brk1Name() const { return mBrkName; }
|
||||
s16 get_btp1Name() const { return mBtpName; }
|
||||
const s16 get_bmdName() const { return mBmdName; }
|
||||
const s16 get_btk1Name() const { return mBtkName; }
|
||||
const s16 get_bpk1Name() const { return mBpkName; }
|
||||
const s16 get_bck1Name() const { return mBckName; }
|
||||
const s16 get_bxa1Name() const { return mBxaName; }
|
||||
const s16 get_brk1Name() const { return mBrkName; }
|
||||
const s16 get_btp1Name() const { return mBtpName; }
|
||||
f32 get_scale() const { return mScale; }
|
||||
f32 get_offsetY() const { return mOffsetY; }
|
||||
s16 get_angleX() const { return mAngle.x; }
|
||||
|
||||
+31
-35
@@ -240,55 +240,51 @@ public:
|
||||
fopAc_ac_c* CheckObjectTarget(s32);
|
||||
bool LockonTruth();
|
||||
int checkDistance(cXyz*, s16, cXyz*, f32, f32, f32, f32);
|
||||
bool LockEdge() { return chkFlag(8) || chkFlag(0x20); }
|
||||
int GetCheckObjectCount() { return mCheckObjectCount; }
|
||||
void keepLock(int timer) { mAttnBlockTimer = timer; }
|
||||
|
||||
static dist_entry& getDistTable(int i_no) { return dist_table[i_no]; }
|
||||
|
||||
#if DEBUG
|
||||
void runDebugDisp0();
|
||||
#endif
|
||||
|
||||
JKRSolidHeap* getHeap() { return heap; }
|
||||
fopAc_ac_c* getCatghTarget() { return mCatghTarget.getCatghTarget(); }
|
||||
fopAc_ac_c* getZHintTarget() { return mZHintTarget.getZHintTarget(); }
|
||||
u8 getCatchChgItem() { return mCatghTarget.getChangeItem(); }
|
||||
BOOL chkFlag(u32 flag) { return (mFlags & flag) ? TRUE : FALSE; }
|
||||
void setFlag(u32 flag) { mFlags |= flag; }
|
||||
void clrFlag(u32 flag) { mFlags &= ~flag; }
|
||||
int GetActionCount() { return mActionCount; }
|
||||
int GetLockonCount() { return mLockonCount; }
|
||||
void LockSoundOn() { clrFlag(0x400000); }
|
||||
void LockSoundOff() { setFlag(0x400000); }
|
||||
bool Lockon() { return LockonTruth() || chkFlag(0x20000000); } // only matches with -O2?
|
||||
int ZHintRequest(fopAc_ac_c* param_1, int param_2) {
|
||||
return mZHintTarget.request(param_1, param_2);
|
||||
}
|
||||
|
||||
void LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist,
|
||||
s16 i_angle, int param_5) {
|
||||
mLookTarget.request(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle, param_5);
|
||||
}
|
||||
|
||||
void CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 i_horizontalDist, f32 i_upDist,
|
||||
f32 i_downDist, s16 i_angle, int param_5) {
|
||||
mCatghTarget.request(param_0, param_1, i_horizontalDist, i_upDist, i_downDist, i_angle,
|
||||
param_5);
|
||||
}
|
||||
|
||||
fopAc_ac_c* getLookTarget() {
|
||||
return mLookTarget.getLookTarget();
|
||||
}
|
||||
|
||||
void Init(fopAc_ac_c* param_0, u32 i_padNo) {
|
||||
mpPlayer = param_0;
|
||||
mPadNo = i_padNo;
|
||||
}
|
||||
|
||||
JKRSolidHeap* getHeap() { return heap; }
|
||||
void offAttnDraw() {
|
||||
draw[0].field_0x173 = 3;
|
||||
draw[1].field_0x173 = 3;
|
||||
}
|
||||
BOOL chkFlag(u32 flag) { return (mFlags & flag) ? TRUE : FALSE; }
|
||||
void setFlag(u32 flag) { mFlags |= flag; }
|
||||
void clrFlag(u32 flag) { mFlags &= ~flag; }
|
||||
bool LockEdge() { return chkFlag(8) || chkFlag(0x20); }
|
||||
void LockSoundOn() { clrFlag(0x400000); }
|
||||
void LockSoundOff() { setFlag(0x400000); }
|
||||
int GetLockonCount() { return mLockonCount; }
|
||||
int GetActionCount() { return mActionCount; }
|
||||
int GetCheckObjectCount() { return mCheckObjectCount; }
|
||||
fopAc_ac_c* getZHintTarget() { return mZHintTarget.getZHintTarget(); }
|
||||
int ZHintRequest(fopAc_ac_c* param_1, int param_2) {
|
||||
return mZHintTarget.request(param_1, param_2);
|
||||
}
|
||||
fopAc_ac_c* getCatghTarget() { return mCatghTarget.getCatghTarget(); }
|
||||
u8 getCatchChgItem() { return mCatghTarget.getChangeItem(); }
|
||||
int CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 i_horizontalDist, f32 i_upDist,
|
||||
f32 i_downDist, s16 i_angle, int param_5) {
|
||||
return mCatghTarget.request(param_0, param_1, i_horizontalDist, i_upDist, i_downDist,
|
||||
i_angle, param_5);
|
||||
}
|
||||
fopAc_ac_c* getLookTarget() {
|
||||
return mLookTarget.getLookTarget();
|
||||
}
|
||||
void LookRequest(fopAc_ac_c* param_0, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist,
|
||||
s16 i_angle, int param_5) {
|
||||
mLookTarget.request(param_0, i_horizontalDist, i_upDist, i_downDist, i_angle, param_5);
|
||||
}
|
||||
void keepLock(int timer) { mAttnBlockTimer = timer; }
|
||||
bool Lockon() { return LockonTruth() || chkFlag(0x20000000); } // only matches with -O2?
|
||||
|
||||
static type_tbl_entry loc_type_tbl[3];
|
||||
static type_tbl_entry act_type_tbl[5];
|
||||
|
||||
@@ -239,13 +239,6 @@ private:
|
||||
/* 0x1D4 */ u8 m_wtr_mode;
|
||||
}; // Size: 0x1D8
|
||||
|
||||
class dBgS_LinkAcch : public dBgS_Acch {
|
||||
public:
|
||||
dBgS_LinkAcch() { SetLink(); }
|
||||
|
||||
virtual ~dBgS_LinkAcch() {}
|
||||
};
|
||||
|
||||
class dBgS_ObjAcch : public dBgS_Acch {
|
||||
public:
|
||||
dBgS_ObjAcch() {
|
||||
@@ -255,6 +248,13 @@ public:
|
||||
virtual ~dBgS_ObjAcch() {}
|
||||
}; // Size: 0x1D8
|
||||
|
||||
class dBgS_LinkAcch : public dBgS_Acch {
|
||||
public:
|
||||
dBgS_LinkAcch() { SetLink(); }
|
||||
|
||||
virtual ~dBgS_LinkAcch() {}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(dBgS_ObjAcch) == 0x1D8);
|
||||
|
||||
class dBgS_StatueAcch : public dBgS_Acch {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "d/d_bg_s_chk.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_aab.h"
|
||||
|
||||
struct dBgS_CaptPoly;
|
||||
class dBgS_CaptPoly;
|
||||
|
||||
typedef void (*CaptPolyCallback)(dBgS_CaptPoly&, cBgD_Vtx_t*, u16, u16, u16, cM3dGPla*);
|
||||
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ class cBgS_GrpPassChk;
|
||||
class cBgS_PolyPassChk;
|
||||
class fopAc_ac_c;
|
||||
struct cBgD_Vtx_t;
|
||||
struct dBgS_CaptPoly;
|
||||
class dBgS_CaptPoly;
|
||||
|
||||
class cBgW_TriElm {
|
||||
public:
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
bool ChkNoCalcVtx() { return mFlags & NO_CALC_VTX_e; }
|
||||
bool ChkFlush() { return field_0x91 & 8; }
|
||||
void SetLock() { mFlags |= (u8)LOCK_e; }
|
||||
void OffRoofRegist() { field_0x91 |= 0x4; }
|
||||
void OffRoofRegist() { field_0x91 |= (u8)0x4; }
|
||||
void OnRoofRegist() { field_0x91 &= ~0x04; }
|
||||
bool ChkRoofRegist() { return field_0x91 & 4;}
|
||||
cBgD_Vtx_t* GetVtxTbl() const { return pm_vtx_tbl; }
|
||||
|
||||
@@ -11,7 +11,7 @@ class cBgS_GndChk;
|
||||
class cBgS_LinChk;
|
||||
class cBgS_ShdwDraw;
|
||||
class dBgS_Acch;
|
||||
struct dBgS_CaptPoly;
|
||||
class dBgS_CaptPoly;
|
||||
class dBgS_RoofChk;
|
||||
class dBgS_SphChk;
|
||||
class dBgS_SplGrpChk;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user