mirror of
https://github.com/zeldaret/tp.git
synced 2024-11-23 05:19:57 +00:00
Work on various units, mostly d_menu_letter (#2240)
This commit is contained in:
parent
083991a8d0
commit
bec20e3dd4
2
.clangd
2
.clangd
@ -1,5 +1,5 @@
|
|||||||
CompileFlags:
|
CompileFlags:
|
||||||
Add: [-Wno-c++11-compat-deprecated-writable-strings, -Wno-extern-initializer]
|
Add: [-Wno-c++11-compat-deprecated-writable-strings, -Wno-extern-initializer, -Wno-multichar]
|
||||||
---
|
---
|
||||||
If:
|
If:
|
||||||
PathMatch: .*/*.inc
|
PathMatch: .*/*.inc
|
||||||
|
@ -550,7 +550,7 @@ config.libs = [
|
|||||||
Object(Matching, "d/d_menu_fmap2D.cpp"),
|
Object(Matching, "d/d_menu_fmap2D.cpp"),
|
||||||
Object(Matching, "d/d_menu_insect.cpp"),
|
Object(Matching, "d/d_menu_insect.cpp"),
|
||||||
Object(Matching, "d/d_menu_item_explain.cpp"),
|
Object(Matching, "d/d_menu_item_explain.cpp"),
|
||||||
Object(NonMatching, "d/d_menu_letter.cpp"),
|
Object(NonMatching, "d/d_menu_letter.cpp", extra_cflags=['-pragma "nosyminline on"']),
|
||||||
Object(Matching, "d/d_menu_option.cpp"),
|
Object(Matching, "d/d_menu_option.cpp"),
|
||||||
Object(Matching, "d/d_menu_ring.cpp"),
|
Object(Matching, "d/d_menu_ring.cpp"),
|
||||||
Object(Equivalent, "d/d_menu_save.cpp"),
|
Object(Equivalent, "d/d_menu_save.cpp"),
|
||||||
@ -683,7 +683,7 @@ config.libs = [
|
|||||||
"JParticle",
|
"JParticle",
|
||||||
[
|
[
|
||||||
Object(Matching, "JSystem/JParticle/JPAResourceManager.cpp"),
|
Object(Matching, "JSystem/JParticle/JPAResourceManager.cpp"),
|
||||||
Object(Equivalent, "JSystem/JParticle/JPAResource.cpp"),
|
Object(Matching, "JSystem/JParticle/JPAResource.cpp", extra_cflags=['-pragma "nosyminline off"']),
|
||||||
Object(Matching, "JSystem/JParticle/JPABaseShape.cpp"),
|
Object(Matching, "JSystem/JParticle/JPABaseShape.cpp"),
|
||||||
Object(Matching, "JSystem/JParticle/JPAExtraShape.cpp"),
|
Object(Matching, "JSystem/JParticle/JPAExtraShape.cpp"),
|
||||||
Object(Matching, "JSystem/JParticle/JPAChildShape.cpp"),
|
Object(Matching, "JSystem/JParticle/JPAChildShape.cpp"),
|
||||||
|
@ -119,8 +119,12 @@ public:
|
|||||||
mWhite = i_white;
|
mWhite = i_white;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/* 801DFA4C */ virtual JUtility::TColor getBlack() const;
|
/* 801DFA4C */ virtual JUtility::TColor getBlack() const {
|
||||||
/* 801DFA40 */ virtual JUtility::TColor getWhite() const;
|
return mBlack;
|
||||||
|
}
|
||||||
|
/* 801DFA40 */ virtual JUtility::TColor getWhite() const {
|
||||||
|
return mWhite;
|
||||||
|
}
|
||||||
/* 8025603C */ virtual J2DMaterial* getMaterial() const { return NULL; }
|
/* 8025603C */ virtual J2DMaterial* getMaterial() const { return NULL; }
|
||||||
/* 802FDBFC */ virtual void drawFullSet(f32, f32, f32, f32, Mtx*);
|
/* 802FDBFC */ virtual void drawFullSet(f32, f32, f32, f32, Mtx*);
|
||||||
/* 802FE380 */ virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16,
|
/* 802FE380 */ virtual void drawTexCoord(f32, f32, f32, f32, s16, s16, s16, s16, s16, s16, s16,
|
||||||
|
@ -77,8 +77,12 @@ public:
|
|||||||
/* 80254408 */ virtual bool setBlack(JUtility::TColor);
|
/* 80254408 */ virtual bool setBlack(JUtility::TColor);
|
||||||
/* 80186C84 */ virtual bool setWhite(JUtility::TColor white) { mWhiteColor = white; return true; }
|
/* 80186C84 */ virtual bool setWhite(JUtility::TColor white) { mWhiteColor = white; return true; }
|
||||||
/* 8019230C */ virtual bool setBlackWhite(JUtility::TColor, JUtility::TColor);
|
/* 8019230C */ virtual bool setBlackWhite(JUtility::TColor, JUtility::TColor);
|
||||||
/* 801DFA34 */ virtual JUtility::TColor getBlack() const;
|
/* 801DFA34 */ virtual JUtility::TColor getBlack() const {
|
||||||
/* 801DFA28 */ virtual JUtility::TColor getWhite() const;
|
return mBlackColor;
|
||||||
|
}
|
||||||
|
/* 801DFA28 */ virtual JUtility::TColor getWhite() const {
|
||||||
|
return mWhiteColor;
|
||||||
|
}
|
||||||
/* 8025602C */ virtual J2DMaterial* getMaterial() const { return NULL; }
|
/* 8025602C */ virtual J2DMaterial* getMaterial() const { return NULL; }
|
||||||
|
|
||||||
/* 802FFBC4 */ J2DTextBox(u64, JGeometry::TBox2<f32> const&, ResFONT const*, char const*, s16,
|
/* 802FFBC4 */ J2DTextBox(u64, JGeometry::TBox2<f32> const&, ResFONT const*, char const*, s16,
|
||||||
|
@ -266,11 +266,22 @@ struct daNpcT_motionAnmData_c {
|
|||||||
|
|
||||||
class daNpcT_Hermite_c {
|
class daNpcT_Hermite_c {
|
||||||
public:
|
public:
|
||||||
/* 8014CBAC */ ~daNpcT_Hermite_c();
|
|
||||||
|
|
||||||
/* 0x00 */ f32 field_0x00;
|
/* 0x00 */ f32 field_0x00;
|
||||||
/* 0x04 */ cXyz mPosition;
|
/* 0x04 */ cXyz mPosition;
|
||||||
/* 0x10 */ f32 field_0x10;
|
/* 0x10 */ f32 field_0x10;
|
||||||
|
|
||||||
|
/* 8014CBAC */ virtual ~daNpcT_Hermite_c() {}
|
||||||
|
|
||||||
|
// constants might be wrong, regalloc
|
||||||
|
void Set(f32 param_1) {
|
||||||
|
field_0x00 = param_1;
|
||||||
|
f32 sqr = param_1 * param_1;
|
||||||
|
f32 cubed = param_1 * sqr;
|
||||||
|
mPosition.x = 1.0f + (2.0f * cubed - 3.0f * sqr);
|
||||||
|
mPosition.y = 4.0f * cubed + 3.0f * sqr;
|
||||||
|
mPosition.z = param_1 + (cubed - 2.0f * sqr);
|
||||||
|
field_0x10 = cubed - sqr;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class daNpcT_Path_c {
|
class daNpcT_Path_c {
|
||||||
|
@ -1525,6 +1525,14 @@ inline void dComIfGs_onLetterGetFlag(int i_no) {
|
|||||||
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().onLetterGetFlag(i_no);
|
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().onLetterGetFlag(i_no);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline int dComIfGs_isLetterReadFlag(int i_no) {
|
||||||
|
return g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().isLetterReadFlag(i_no);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void dComIfGs_onLetterReadFlag(int i_no) {
|
||||||
|
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().onLetterReadFlag(i_no);
|
||||||
|
}
|
||||||
|
|
||||||
inline u8 dComIfGs_getArrowNum() {
|
inline u8 dComIfGs_getArrowNum() {
|
||||||
return g_dComIfG_gameInfo.info.getPlayer().getItemRecord().getArrowNum();
|
return g_dComIfG_gameInfo.info.getPlayer().getItemRecord().getArrowNum();
|
||||||
}
|
}
|
||||||
|
@ -72,14 +72,14 @@ private:
|
|||||||
/* 0x024 */ J2DScreen* mpSdwScreen;
|
/* 0x024 */ J2DScreen* mpSdwScreen;
|
||||||
/* 0x028 */ J2DScreen* mpLetterScreen[2];
|
/* 0x028 */ J2DScreen* mpLetterScreen[2];
|
||||||
/* 0x030 */ J2DScreen* mpIconScreen;
|
/* 0x030 */ J2DScreen* mpIconScreen;
|
||||||
/* 0x034 */ J2DTextBox* field_0x34[6][5];
|
/* 0x034 */ J2DPane* field_0x34[6][5];
|
||||||
/* 0x0AC */ J2DTextBox* field_0xac[6][5];
|
/* 0x0AC */ J2DTextBox* field_0xac[6][5];
|
||||||
/* 0x124 */ J2DTextBox* field_0x124[6][4];
|
/* 0x124 */ J2DTextBox* field_0x124[6][4];
|
||||||
/* 0x184 */ J2DTextBox* field_0x184[6][4];
|
/* 0x184 */ J2DTextBox* field_0x184[6][4];
|
||||||
/* 0x1E4 */ J2DTextBox* field_0x1e4[2];
|
/* 0x1E4 */ J2DTextBox* field_0x1e4[2];
|
||||||
/* 0x1EC */ J2DTextBox* field_0x1ec;
|
/* 0x1EC */ J2DTextBox* field_0x1ec;
|
||||||
/* 0x1F0 */ J2DTextBox* field_0x1f0[9];
|
/* 0x1F0 */ J2DTextBox* field_0x1f0[9];
|
||||||
/* 0x214 */ J2DTextBox* mpPageLight[9];
|
/* 0x214 */ J2DPicture* mpPageLight[9];
|
||||||
/* 0x238 */ J2DTextBox* field_0x238[9];
|
/* 0x238 */ J2DTextBox* field_0x238[9];
|
||||||
/* 0x25C */ J2DTextBox* field_0x25c[12];
|
/* 0x25C */ J2DTextBox* field_0x25c[12];
|
||||||
/* 0x28C */ J2DTextBox* mpAButtonString[5];
|
/* 0x28C */ J2DTextBox* mpAButtonString[5];
|
||||||
|
@ -20,7 +20,7 @@ public:
|
|||||||
return getStringLocal(param_0, param_1, param_2, param_3, param_4, param_5);
|
return getStringLocal(param_0, param_1, param_2, param_3, param_4, param_5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 801E1D10 */ virtual void getStringPage(u32, u8, u8, J2DTextBox*, J2DTextBox*, JUTFont*, COutFont_c*,
|
/* 801E1D10 */ virtual f32 getStringPage(u32, u8, u8, J2DTextBox*, J2DTextBox*, JUTFont*, COutFont_c*,
|
||||||
u8);
|
u8);
|
||||||
/* 80249DB4 */ virtual void resetStringLocal(J2DTextBox*);
|
/* 80249DB4 */ virtual void resetStringLocal(J2DTextBox*);
|
||||||
/* 80249DE4 */ virtual void drawOutFontLocal(J2DTextBox*, f32);
|
/* 80249DE4 */ virtual void drawOutFontLocal(J2DTextBox*, f32);
|
||||||
|
@ -17,7 +17,7 @@ JPAParticleCallBack::~JPAParticleCallBack() {
|
|||||||
|
|
||||||
/* 8027EFEC-8027F8C8 27992C 08DC+00 0/0 1/1 0/0 .text
|
/* 8027EFEC-8027F8C8 27992C 08DC+00 0/0 1/1 0/0 .text
|
||||||
* init_p__15JPABaseParticleFP18JPAEmitterWorkData */
|
* init_p__15JPABaseParticleFP18JPAEmitterWorkData */
|
||||||
// NONMATCHING a couple problems, likely issues with setLength and get_r_ss
|
// NONMATCHING a couple problems, likely issues with setLength
|
||||||
void JPABaseParticle::init_p(JPAEmitterWorkData* work) {
|
void JPABaseParticle::init_p(JPAEmitterWorkData* work) {
|
||||||
JPABaseEmitter* emtr = work->mpEmtr;
|
JPABaseEmitter* emtr = work->mpEmtr;
|
||||||
JPAExtraShape* esp = work->mpRes->getEsp();
|
JPAExtraShape* esp = work->mpRes->getEsp();
|
||||||
@ -56,8 +56,8 @@ void JPABaseParticle::init_p(JPAEmitterWorkData* work) {
|
|||||||
JGeometry::TVec3<f32> velDir;
|
JGeometry::TVec3<f32> velDir;
|
||||||
if (emtr->mDirSpeed) {
|
if (emtr->mDirSpeed) {
|
||||||
Mtx mtx;
|
Mtx mtx;
|
||||||
s16 angleY = emtr->get_r_ss();
|
int angleZ = emtr->get_r_ss();
|
||||||
s16 angleZ = emtr->get_r_zp() * 0x8000 * emtr->mSpread;
|
f32 angleY = emtr->get_r_zp() * 0x8000 * emtr->mSpread;
|
||||||
JPAGetYZRotateMtx(angleY, angleZ, mtx);
|
JPAGetYZRotateMtx(angleY, angleZ, mtx);
|
||||||
MTXConcat(work->mDirectionMtx, mtx, mtx);
|
MTXConcat(work->mDirectionMtx, mtx, mtx);
|
||||||
velDir.set(emtr->mDirSpeed * mtx[0][2],
|
velDir.set(emtr->mDirSpeed * mtx[0][2],
|
||||||
|
@ -1117,3 +1117,8 @@ void JPAResource::calcWorkData_d(JPAEmitterWorkData* work) {
|
|||||||
MTXConcat(work->mpEmtr->mGlobalRot, mtx, work->mGlobalRot);
|
MTXConcat(work->mpEmtr->mGlobalRot, mtx, work->mGlobalRot);
|
||||||
MTXMultVecSR(work->mGlobalRot, &work->mpEmtr->mLocalDir, &work->mGlobalEmtrDir);
|
MTXMultVecSR(work->mGlobalRot, &work->mpEmtr->mLocalDir, &work->mGlobalEmtrDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma push
|
||||||
|
#pragma force_active on
|
||||||
|
static u8 jpa_resource_padding[28] = {0};
|
||||||
|
#pragma pop
|
||||||
|
@ -1092,8 +1092,77 @@ dCcD_SrcSph daNpcF_c::mCcDSph = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* 801464D8-8014698C 140E18 04B4+00 1/1 0/0 0/0 .text chkPassed2__13daNpcT_Path_cF4cXyzP4cXyzii */
|
/* 801464D8-8014698C 140E18 04B4+00 1/1 0/0 0/0 .text chkPassed2__13daNpcT_Path_cF4cXyzP4cXyzii */
|
||||||
int daNpcT_Path_c::chkPassed2(cXyz param_0, cXyz* param_1, int param_2, int param_3) {
|
// NONMATCHING
|
||||||
// NONMATCHING
|
int daNpcT_Path_c::chkPassed2(cXyz param_1, cXyz* param_2, int param_3, int param_4) {
|
||||||
|
cXyz cStack_80;
|
||||||
|
cXyz local_8c;
|
||||||
|
cXyz local_98;
|
||||||
|
cXyz cStack_a4;
|
||||||
|
cXyz cStack_b0;
|
||||||
|
cXyz cStack_bc;
|
||||||
|
u16 idx = getIdx();
|
||||||
|
u16 local_140;
|
||||||
|
u16 local_142;
|
||||||
|
u16 local_144;
|
||||||
|
local_144 = idx;
|
||||||
|
local_142 = idx;
|
||||||
|
if (chkClose() && getNumPnts() == param_3) {
|
||||||
|
daNpcT_decIdx(getNumPnts(), local_142, 1, chkReverse());
|
||||||
|
daNpcT_incIdx(getNumPnts(), local_144, 1, chkReverse());
|
||||||
|
} else {
|
||||||
|
daNpcT_decIdx(param_3, local_142, 0, chkReverse());
|
||||||
|
daNpcT_incIdx(param_3, local_144, 0, chkReverse());
|
||||||
|
}
|
||||||
|
local_140 = local_142;
|
||||||
|
if (chkClose() && getNumPnts() == param_3) {
|
||||||
|
daNpcT_decIdx(getNumPnts(), local_140, 1, chkReverse());
|
||||||
|
} else {
|
||||||
|
daNpcT_decIdx(param_3, local_140, 0, chkReverse());
|
||||||
|
}
|
||||||
|
|
||||||
|
cStack_80 = getPntPos(local_140);
|
||||||
|
local_8c = getPntPos(local_142);
|
||||||
|
local_98 = getPntPos(idx);
|
||||||
|
cStack_a4 = getPntPos(local_144);
|
||||||
|
if (local_142 == (u16)(idx & 0xffff)) {
|
||||||
|
cStack_b0 = cStack_a4 - local_8c;
|
||||||
|
} else {
|
||||||
|
cStack_b0 = local_98 - local_8c;
|
||||||
|
}
|
||||||
|
if (local_144 == (u16)(idx & 0xffff)) {
|
||||||
|
cStack_bc = cStack_a4 - local_8c;
|
||||||
|
} else {
|
||||||
|
cStack_bc = cStack_a4 - local_98;
|
||||||
|
}
|
||||||
|
daNpcT_Hermite_c adStack_70;
|
||||||
|
cXyz auStack_d4;
|
||||||
|
adStack_70.Set(field_0x1E * (1.0f / param_4));
|
||||||
|
hermite(local_8c, cStack_b0, local_98, cStack_bc, adStack_70,
|
||||||
|
auStack_d4);
|
||||||
|
param_2->x = auStack_d4.x;
|
||||||
|
param_2->y = auStack_d4.y;
|
||||||
|
param_2->z = auStack_d4.z;
|
||||||
|
f32 local_12c;
|
||||||
|
f32 local_130;
|
||||||
|
f32 local_134;
|
||||||
|
f32 local_138;
|
||||||
|
f32 auStack_13c;
|
||||||
|
if (cM3d_Len2dSqPntAndSegLine(param_1.x, param_1.z, local_8c.x, local_8c.z, local_98.x,
|
||||||
|
local_98.z, &local_12c, &local_134, &auStack_13c) &&
|
||||||
|
cM3d_Len2dSqPntAndSegLine(param_2->x, param_2->z, local_8c.x, local_8c.z, local_98.x,
|
||||||
|
local_98.z, &local_130, &local_138, &auStack_13c))
|
||||||
|
{
|
||||||
|
s16 sVar10 = cM_atan2s(local_98.x - local_8c.x,
|
||||||
|
local_98.z - local_8c.z);
|
||||||
|
s16 sVar11 = cM_atan2s(local_130 - local_12c,
|
||||||
|
local_138 - local_134);
|
||||||
|
s16 diff = sVar10 - sVar11;
|
||||||
|
u16 uVar4 = abs(diff);
|
||||||
|
if (uVar4 > 0x4000) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 8014698C-80146C98 1412CC 030C+00 1/1 0/0 0/0 .text
|
/* 8014698C-80146C98 1412CC 030C+00 1/1 0/0 0/0 .text
|
||||||
@ -2246,11 +2315,6 @@ BOOL daNpcT_chkTmpBit(u32 i_idx) {
|
|||||||
return dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_idx]);
|
return dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 8014CBAC-8014CBF4 1474EC 0048+00 1/0 0/0 0/0 .text __dt__16daNpcT_Hermite_cFv */
|
|
||||||
daNpcT_Hermite_c::~daNpcT_Hermite_c() {
|
|
||||||
// NONMATCHING
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 8014CC0C-8014CC10 14754C 0004+00 1/0 1/0 0/0 .text setCollision__8daNpcT_cFv */
|
/* 8014CC0C-8014CC10 14754C 0004+00 1/0 1/0 0/0 .text setCollision__8daNpcT_cFv */
|
||||||
void daNpcT_c::setCollision() {
|
void daNpcT_c::setCollision() {
|
||||||
/* empty function */
|
/* empty function */
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user