match + document FakePiki::moveVelocity

This commit is contained in:
HeartPiece 2024-05-01 12:01:26 +10:00
parent 6236bb6154
commit e251539e2f
12 changed files with 82 additions and 321 deletions

View File

@ -33,7 +33,7 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASDSPChannel.cpp">JAudio//JAS/JASDSPChannel.cpp</a> | 11462 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASTaskThread.cpp">JAudio//JAS/JASTaskThread.cpp</a> | 12200 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASWSParser.cpp">JAudio//JAS/JASWSParser.cpp</a> | 12435 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DJoint.cpp">J3D/J3DJoint.cpp</a> | 13780 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPADynamicsBlock.cpp">JParticle/JPADynamicsBlock.cpp</a> | 13887 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASAiCtrl.cpp">JAudio//JAS/JASAiCtrl.cpp</a> | 14267 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DShape.cpp">J3D/J3DShape.cpp</a> | 14992 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JGadget/std-vector.cpp">JGadget/std-vector.cpp</a> | 16058 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DShape.cpp">J3D/J3DShape.cpp</a> | 14990 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JGadget/std-vector.cpp">JGadget/std-vector.cpp</a> | 16058 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio_JParticle/object-particle.cpp">JStudio_JParticle/object-particle.cpp</a> | 16762 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/stb.cpp">JStudio/stb.cpp</a> | 16978 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio_JStage/object-camera.cpp">JStudio_JStage/object-camera.cpp</a> | 17767 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DCluster.cpp">J3D/J3DCluster.cpp</a> | 18124 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DTextBoxEx.cpp">J2D/J2DTextBoxEx.cpp</a> | 18983 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISystemInterface.cpp">JAudio//JAI/JAISystemInterface.cpp</a> | 19058 |
@ -73,7 +73,7 @@
| ---- | ---- | ---- | ---- |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectHikinoU/PSBnkMgr.cpp">PSBnkMgr.cpp</a> | 10222 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectHikinoU/PSSe.cpp">PSSe.cpp</a> | 22622 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectHikinoU/PSSeq.cpp">PSSeq.cpp</a> | 27120 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectHikinoU/PSAutoBgm.cpp">PSAutoBgm.cpp</a> | 53589 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectHikinoU/PSGame.cpp">PSGame.cpp</a> | 75560 | | |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectHikinoU/PSGame.cpp">PSGame.cpp</a> | 75559 | | |
### <section id="plugProjectKandoU">plugProjectKandoU</section>
| File | Size (bytes) | File | Size (bytes) |
@ -83,20 +83,20 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiEnter.cpp">aiEnter.cpp</a> | 10813 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/naviWhistle.cpp">naviWhistle.cpp</a> | 11601 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemHoney.cpp">itemHoney.cpp</a> | 12289 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiBreakGate.cpp">aiBreakGate.cpp</a> | 13962 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/texCaster.cpp">texCaster.cpp</a> | 16071 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCaveInfo.cpp">gameCaveInfo.cpp</a> | 16103 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_CaveResult.cpp">singleGS_CaveResult.cpp</a> | 19720 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemCave.cpp">itemCave.cpp</a> | 20160 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_CaveResult.cpp">singleGS_CaveResult.cpp</a> | 19720 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemCave.cpp">itemCave.cpp</a> | 20265 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pathfinder.cpp">pathfinder.cpp</a> | 20409 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCPlate.cpp">gameCPlate.cpp</a> | 23760 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/dynCreature.cpp">dynCreature.cpp</a> | 25483 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameDynamics.cpp">gameDynamics.cpp</a> | 25802 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPikihead.cpp">itemPikihead.cpp</a> | 26651 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/vsCardMgr.cpp">vsCardMgr.cpp</a> | 30801 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_MainGame.cpp">singleGS_MainGame.cpp</a> | 31722 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemBridge.cpp">itemBridge.cpp</a> | 32134 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_MainGame.cpp">singleGS_MainGame.cpp</a> | 31722 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemBridge.cpp">itemBridge.cpp</a> | 32140 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemGate.cpp">itemGate.cpp</a> | 32798 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gamePlayDataMemCard.cpp">gamePlayDataMemCard.cpp</a> | 36029 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 36278 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gamePlayData.cpp">gamePlayData.cpp</a> | 36923 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 36433 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gamePlayData.cpp">gamePlayData.cpp</a> | 36923 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/routeMgr.cpp">routeMgr.cpp</a> | 39120 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameGeneratorCache.cpp">gameGeneratorCache.cpp</a> | 40204 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiMgr.cpp">pikiMgr.cpp</a> | 41251 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/mapMgr.cpp">mapMgr.cpp</a> | 41795 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/collinfo.cpp">collinfo.cpp</a> | 43421 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_CaveGame.cpp">singleGS_CaveGame.cpp</a> | 52772 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/cellPyramid.cpp">cellPyramid.cpp</a> | 52800 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiFormation.cpp">aiFormation.cpp</a> | 53092 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi_demoCheck.cpp">navi_demoCheck.cpp</a> | 57727 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemWeed.cpp">itemWeed.cpp</a> | 62058 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletState.cpp">pelletState.cpp</a> | 63200 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemUjamushi.cpp">itemUjamushi.cpp</a> | 63548 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/fakePiki.cpp">fakePiki.cpp</a> | 65918 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPlant.cpp">itemPlant.cpp</a> | 73150 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi_demoCheck.cpp">navi_demoCheck.cpp</a> | 57727 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/fakePiki.cpp">fakePiki.cpp</a> | 60508 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemWeed.cpp">itemWeed.cpp</a> | 62058 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletState.cpp">pelletState.cpp</a> | 63200 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemUjamushi.cpp">itemUjamushi.cpp</a> | 63548 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPlant.cpp">itemPlant.cpp</a> | 73150 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSection.cpp">baseGameSection.cpp</a> | 91856 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiPrimitives.cpp">aiPrimitives.cpp</a> | 117041 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletMgr.cpp">pelletMgr.cpp</a> | 142975 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi.cpp">navi.cpp</a> | 152187 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiState.cpp">pikiState.cpp</a> | 154957 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_Zukan.cpp">singleGS_Zukan.cpp</a> | 163432 |

View File

@ -37,7 +37,6 @@ struct J3DCurrentMtxInfo {
u32 mMtxIdxRegB; // _04
u32 getMtxIdxRegA() const { return mMtxIdxRegA; }
u32 getMtxIdxRegB() const { return mMtxIdxRegB; }
};
struct J3DCurrentMtx : public J3DCurrentMtxInfo {

View File

@ -273,6 +273,22 @@ struct TPkEffect {
inline bool isFlag(int flagID) { return mFlags.typeView & flagID; }
inline void clear()
{
mFlags.clear();
mBackupFlags.clear();
killKourin_();
killDoping_();
killNage_();
killMoe_();
killChudoku_();
killMoeSmoke_();
killBlackDown_();
killWater_();
killHamonA_();
killHamonB_();
}
// for start of cutscene, disable all effects
inline void killAllEffects()
{

View File

@ -20,11 +20,11 @@ struct Code {
};
enum SlipCode {
SlipCode0 = 0x0,
SlipCode1 = 0x1,
SlipCode2 = 0x2,
SlipCode3 = 0x3,
SLIPCODE_MASK = 0x3,
SlipCode_NoSlip = 0x0, // normal ground
SlipCode_Gradual = 0x1, // slow slip if not moving, like in VoR going up to SCx
SlipCode_Steep = 0x2, // strong slip, cannot walk up, like slope behind ship in VoR
SlipCode3 = 0x3, // unknown
SLIPCODE_MASK = 0x3,
};
#pragma enumsalwaysint reset
@ -34,7 +34,7 @@ struct Code {
char* getSlipCodeName();
bool isBald();
void read(Stream&);
void setCode(int, int, bool);
void setCode(int attribute, int slip, bool isBald);
void write(Stream&);
inline char* getContents() { return (char*)mContents; }

View File

@ -604,8 +604,7 @@ void J3DShape::simpleDrawCache() const
sOldVcdVatCmd = mVcdVatCmd;
}
if (J3DShape::sEnvelopeFlag != 0 && !mHasPNMTXIdx)
{
if (J3DShape::sEnvelopeFlag != 0 && !mHasPNMTXIdx) {
mCurrentMtx.load();
}

View File

@ -1116,320 +1116,65 @@ void FakePiki::turnTo(Vector3f& targetPos)
*/
void FakePiki::moveVelocity()
{
Sys::Triangle* tri = mBounceTriangle;
// update simulation (next/target) velocity based on the triangle we're standing on
Sys::Triangle* tri = mBounceTriangle; // triangle we're currently on
Vector3f newVelocity = Vector3f(0.0f);
Vector3f oldVelocity = Vector3f(mVelocity);
Vector3f oldVelocity = Vector3f(mVelocity); // our current velocity
if (tri) {
f32 oldSpeed = oldVelocity.length();
f32 collSpeedDot = dot(oldVelocity, mCollisionPosition);
Vector3f vec1 = oldVelocity - (mCollisionPosition * collSpeedDot);
// update our direction based on collision, but keep speed the same
f32 oldSpeed = oldVelocity.length();
Vector3f newDir = mCollisionPosition * oldVelocity.dot(mCollisionPosition);
newDir = oldVelocity - newDir;
newDir.normalise();
vec1.normalise();
oldVelocity = vec1 * oldSpeed;
oldVelocity = newDir * oldSpeed;
// check if we're on slippery ground
int code = tri->mCode.getSlipCode();
if (code == 0) {
if (code == MapCode::Code::SlipCode_NoSlip) {
// ground is not slippery
if (oldSpeed < 0.1f) {
Vector3f scaleVec = Vector3f(0.0f, -_aiConstants->mGravity.mData * sys->mDeltaTime, 0.0f);
f32 collScaleDot = dot(scaleVec, mCollisionPosition);
Vector3f vec2 = scaleVec - mCollisionPosition * collScaleDot;
vec2 = Vector3f(-vec2.x, -vec2.y, -vec2.z);
newVelocity = vec2 * 1.0f;
// going below speed threshold, slow to a stop
Vector3f fallVelocity = Vector3f(0.0f, -(_aiConstants->mGravity.mData * sys->mDeltaTime), 0.0f);
Vector3f newDir = mCollisionPosition * fallVelocity.dot(mCollisionPosition);
newDir = fallVelocity - newDir;
// decelerate to a stop
newDir = Vector3f(-newDir.x, -newDir.y, -newDir.z);
newVelocity = newDir * 1.0f;
}
} else {
Vector3f scaleVec = Vector3f(0.0f, -_aiConstants->mGravity.mData * sys->mDeltaTime, 0.0f);
f32 collScaleDot = dot(scaleVec, mCollisionPosition);
Vector3f vec2 = scaleVec - mCollisionPosition * collScaleDot;
vec2.normalise();
// some form of slipping happening
Vector3f fallVelocity = Vector3f(0.0f, -(_aiConstants->mGravity.mData * sys->mDeltaTime), 0.0f);
Vector3f moveDir = mCollisionPosition * fallVelocity.dot(mCollisionPosition);
moveDir = fallVelocity - moveDir;
moveDir.normalise();
f32 scale;
if (code == MapCode::Code::SlipCode2) {
scale = 2.5f;
f32 slipFactor;
if (code == MapCode::Code::SlipCode_Steep) {
// if we're on steep/extra slippery ground, slip faster
slipFactor = 2.5f;
if (isNavi() && ((Navi*)this)->getOlimarData()->hasItem(OlimarData::ODII_RepugnantAppendage)) {
scale = 4.0f;
// if we have rush boots, we slip even FASTER on steep slopes
slipFactor = 4.0f;
}
} else {
scale = 1.0f;
// gradual slope, just slip at regular gravity
slipFactor = 1.0f;
}
newVelocity = (((vec2 * _aiConstants->mGravity.mData) * sys->mDeltaTime) * scale);
// slip under gravity, extra if extra slippery slope
newVelocity = (((moveDir * _aiConstants->mGravity.mData) * sys->mDeltaTime) * slipFactor);
}
}
Vector3f vec3 = (oldVelocity + mSimPosition) - mSimVelocity;
vec3.length(); // something's gotten commented out involving this
vec3 *= sys->mDeltaTime / 0.1f;
mSimVelocity = mSimVelocity + vec3;
Vector3f accel = (oldVelocity + mSimPosition) - mSimVelocity;
accel.length(); // remnant from some commented out code block with a comparison, probably, or debug info
mSimVelocity = mSimVelocity + accel * (sys->mDeltaTime / 0.1f);
mSimVelocity = mSimVelocity + newVelocity;
/*
stwu r1, -0x80(r1)
mflr r0
stw r0, 0x84(r1)
stfd f31, 0x70(r1)
psq_st f31, 120(r1), 0, qr0
stfd f30, 0x60(r1)
psq_st f30, 104(r1), 0, qr0
stfd f29, 0x50(r1)
psq_st f29, 88(r1), 0, qr0
stfd f28, 0x40(r1)
psq_st f28, 72(r1), 0, qr0
stfd f27, 0x30(r1)
psq_st f27, 56(r1), 0, qr0
stfd f26, 0x20(r1)
psq_st f26, 40(r1), 0, qr0
stfd f25, 0x10(r1)
psq_st f25, 24(r1), 0, qr0
stw r31, 0xc(r1)
mr r31, r3
lfs f30, lbl_805182B4@sda21(r2)
lwz r3, 0xc8(r3)
fmr f29, f30
lfs f27, 0x1e4(r31)
fmr f28, f30
cmplwi r3, 0
lfs f26, 0x1e8(r31)
lfs f25, 0x1ec(r31)
beq lbl_8013DEFC
fmuls f0, f26, f26
fmuls f1, f25, f25
fmadds f0, f27, f27, f0
fadds f31, f1, f0
fcmpo cr0, f31, f30
ble lbl_8013DCCC
ble lbl_8013DCD0
frsqrte f0, f31
fmuls f31, f0, f31
b lbl_8013DCD0
lbl_8013DCCC:
fmr f31, f30
lbl_8013DCD0:
lfs f2, 0xd0(r31)
lfs f3, 0xcc(r31)
fmuls f1, f26, f2
lfs f4, 0xd4(r31)
lfs f0, lbl_805182B4@sda21(r2)
fmadds f1, f27, f3, f1
fmadds f1, f25, f4, f1
fmuls f2, f2, f1
fmuls f3, f3, f1
fmuls f1, f4, f1
fsubs f4, f26, f2
fsubs f2, f27, f3
fsubs f3, f25, f1
fmuls f1, f4, f4
fmuls f5, f3, f3
fmadds f1, f2, f2, f1
fadds f1, f5, f1
fcmpo cr0, f1, f0
ble lbl_8013DD2C
ble lbl_8013DD30
frsqrte f0, f1
fmuls f1, f0, f1
b lbl_8013DD30
lbl_8013DD2C:
fmr f1, f0
lbl_8013DD30:
lfs f0, lbl_805182B4@sda21(r2)
fcmpo cr0, f1, f0
ble lbl_8013DD50
lfs f0, lbl_80518304@sda21(r2)
fdivs f0, f0, f1
fmuls f2, f2, f0
fmuls f4, f4, f0
fmuls f3, f3, f0
lbl_8013DD50:
fmuls f27, f2, f31
addi r3, r3, 0x5c
fmuls f26, f4, f31
fmuls f25, f3, f31
bl getSlipCode__Q27MapCode4CodeFv
cmpwi r3, 0
bne lbl_8013DDE4
lfs f0, lbl_805182D4@sda21(r2)
fcmpo cr0, f31, f0
bge lbl_8013DEFC
lwz r4, _aiConstants__4Game@sda21(r13)
lwz r3, sys@sda21(r13)
lfs f1, 0x28(r4)
lfs f0, 0x54(r3)
lfs f7, 0xd0(r31)
fmuls f0, f1, f0
lfs f4, lbl_805182B4@sda21(r2)
lfs f1, 0xcc(r31)
lfs f6, 0xd4(r31)
fneg f5, f0
lfs f2, lbl_80518304@sda21(r2)
fmuls f0, f5, f7
fmadds f0, f4, f1, f0
fmadds f0, f4, f6, f0
fmuls f3, f1, f0
fmuls f1, f7, f0
fmuls f0, f6, f0
fsubs f3, f4, f3
fsubs f1, f5, f1
fsubs f0, f4, f0
fneg f3, f3
fneg f1, f1
fneg f0, f0
fmuls f30, f3, f2
fmuls f29, f1, f2
fmuls f28, f0, f2
b lbl_8013DEFC
lbl_8013DDE4:
lwz r5, _aiConstants__4Game@sda21(r13)
lwz r4, sys@sda21(r13)
lfs f1, 0x28(r5)
lfs f0, 0x54(r4)
lfs f2, 0xd0(r31)
fmuls f0, f1, f0
lfs f3, lbl_805182B4@sda21(r2)
lfs f6, 0xcc(r31)
lfs f5, 0xd4(r31)
fneg f4, f0
fmuls f0, f4, f2
fmadds f0, f3, f6, f0
fmadds f0, f3, f5, f0
fmuls f1, f2, f0
fmuls f2, f6, f0
fmuls f0, f5, f0
fsubs f28, f4, f1
fsubs f30, f3, f2
fsubs f29, f3, f0
fmuls f0, f28, f28
fmuls f1, f29, f29
fmadds f0, f30, f30, f0
fadds f1, f1, f0
fcmpo cr0, f1, f3
ble lbl_8013DE58
ble lbl_8013DE5C
frsqrte f0, f1
fmuls f1, f0, f1
b lbl_8013DE5C
lbl_8013DE58:
fmr f1, f3
lbl_8013DE5C:
lfs f0, lbl_805182B4@sda21(r2)
fcmpo cr0, f1, f0
ble lbl_8013DE7C
lfs f0, lbl_80518304@sda21(r2)
fdivs f0, f0, f1
fmuls f30, f30, f0
fmuls f28, f28, f0
fmuls f29, f29, f0
lbl_8013DE7C:
cmpwi r3, 2
bne lbl_8013DEC4
mr r3, r31
lfs f31, lbl_80518308@sda21(r2)
lwz r12, 0(r31)
lwz r12, 0x1c(r12)
mtctr r12
bctrl
clrlwi. r0, r3, 0x18
beq lbl_8013DEC8
mr r3, r31
bl getOlimarData__Q24Game4NaviFv
li r4, 7
bl hasItem__Q24Game10OlimarDataFi
clrlwi. r0, r3, 0x18
beq lbl_8013DEC8
lfs f31, lbl_8051830C@sda21(r2)
b lbl_8013DEC8
lbl_8013DEC4:
lfs f31, lbl_80518304@sda21(r2)
lbl_8013DEC8:
lwz r3, _aiConstants__4Game@sda21(r13)
lwz r4, sys@sda21(r13)
lfs f0, 0x28(r3)
lfs f3, 0x54(r4)
fmuls f2, f30, f0
fmuls f1, f28, f0
fmuls f0, f29, f0
fmuls f2, f2, f3
fmuls f1, f1, f3
fmuls f0, f0, f3
fmuls f30, f2, f31
fmuls f29, f1, f31
fmuls f28, f0, f31
lbl_8013DEFC:
lfs f0, 0x1f4(r31)
lfs f2, 0x1f8(r31)
fadds f1, f26, f0
lfs f8, 0x204(r31)
lfs f0, 0x1f0(r31)
fadds f2, f25, f2
lfs f7, 0x208(r31)
fsubs f3, f1, f8
fadds f1, f27, f0
lfs f9, 0x200(r31)
fsubs f4, f2, f7
lfs f0, lbl_805182B4@sda21(r2)
fmuls f5, f3, f3
fsubs f2, f1, f9
fmuls f6, f4, f4
fmadds f1, f2, f2, f5
fadds f1, f6, f1
fcmpo cr0, f1, f0
lwz r3, sys@sda21(r13)
lfs f0, lbl_805182D4@sda21(r2)
lfs f1, 0x54(r3)
fdivs f0, f1, f0
fmuls f2, f2, f0
fmuls f1, f3, f0
fmuls f0, f4, f0
fadds f2, f9, f2
fadds f1, f8, f1
fadds f0, f7, f0
stfs f2, 0x200(r31)
stfs f1, 0x204(r31)
stfs f0, 0x208(r31)
lfs f0, 0x200(r31)
lfs f1, 0x204(r31)
fadds f0, f0, f30
lfs f2, 0x208(r31)
fadds f1, f1, f29
fadds f2, f2, f28
stfs f0, 0x200(r31)
stfs f1, 0x204(r31)
stfs f2, 0x208(r31)
psq_l f31, 120(r1), 0, qr0
lfd f31, 0x70(r1)
psq_l f30, 104(r1), 0, qr0
lfd f30, 0x60(r1)
psq_l f29, 88(r1), 0, qr0
lfd f29, 0x50(r1)
psq_l f28, 72(r1), 0, qr0
lfd f28, 0x40(r1)
psq_l f27, 56(r1), 0, qr0
lfd f27, 0x30(r1)
psq_l f26, 40(r1), 0, qr0
lfd f26, 0x20(r1)
psq_l f25, 24(r1), 0, qr0
lfd f25, 0x10(r1)
lwz r0, 0x84(r1)
lwz r31, 0xc(r1)
mtlr r0
addi r1, r1, 0x80
blr
*/
}
/**

View File

@ -526,7 +526,7 @@ void Mgr::onLoadResources()
mPlatform = loadPlatform(textArc, "platform.bin");
MapCode::Code mapCode;
mapCode.setCode(MapCode::Code::Attribute1, MapCode::Code::SlipCode2, true);
mapCode.setCode(MapCode::Code::Attribute1, MapCode::Code::SlipCode_Steep, true);
mPlatform->setMapCodeAll(mapCode);
closeTextArc(textArc);

View File

@ -1267,7 +1267,7 @@ void Mgr::onLoadResources()
}
MapCode::Code mapCode;
mapCode.setCode(MapCode::Code::Attribute1 + MapCode::Code::Attribute2, MapCode::Code::SlipCode0, true);
mapCode.setCode(MapCode::Code::Attribute1 + MapCode::Code::Attribute2, MapCode::Code::SlipCode_NoSlip, true);
mObjectPathComponent = "user/Kando/bridge/s_bridge";
JKRArchive* textArcShort = openTextArc("texts.szs");

View File

@ -759,9 +759,9 @@ void Mgr::onLoadResources()
mPlatformA = loadPlatform(arc, "cap_platform.bin");
mPlatformB = loadPlatform(arc, "side_platform.bin");
MapCode::Code code;
code.setCode(1, 2, true);
code.setCode(MapCode::Code::Attribute1, MapCode::Code::SlipCode_Steep, true);
mPlatformA->setMapCodeAll(code);
code.setCode(1, 0, true);
code.setCode(MapCode::Code::Attribute1, MapCode::Code::SlipCode_NoSlip, true);
mPlatformB->setMapCodeAll(code);
closeTextArc(arc);
}

View File

@ -486,7 +486,7 @@ Mgr::Mgr()
mPlatforms[2] = loadPlatform(textArc, "platform_3.bin");
MapCode::Code mapCode;
mapCode.setCode(MapCode::Code::Attribute1 | MapCode::Code::Attribute2, MapCode::Code::SlipCode0, true);
mapCode.setCode(MapCode::Code::Attribute1 | MapCode::Code::Attribute2, MapCode::Code::SlipCode_NoSlip, true);
mPlatforms[0]->setMapCodeAll(mapCode);
mPlatforms[1]->setMapCodeAll(mapCode);

View File

@ -399,9 +399,9 @@ void Mgr::onLoadResources()
mCapPlatform = loadPlatform(archive, "cap_platform.bin");
mSidePlatform = loadPlatform(archive, "side_platform.bin");
MapCode::Code code;
code.setCode(1, 2, true);
code.setCode(MapCode::Code::Attribute1, MapCode::Code::SlipCode_Steep, true);
mCapPlatform->setMapCodeAll(code);
code.setCode(1, 1, true);
code.setCode(MapCode::Code::Attribute1, MapCode::Code::SlipCode_Gradual, true);
mSidePlatform->setMapCodeAll(code);
closeTextArc(archive);
}

View File

@ -189,8 +189,10 @@ void Piki::onKill(CreatureKillArg* killArg)
gameSystem->mSection->sendMessage(deadMsg);
}
Vector3f pikiPos = getPosition();
mEffectsObj->doDead();
Vector3f pikiPos = getPosition();
efx::TPkEffect* effectObj = mEffectsObj;
effectObj->clear();
efx::createSimpleDead(*effectObj->mHamonPosPtr, effectObj->mPikiColor);
mSoundObj->startFreePikiSound(PSSE_PK_VC_GHOST, 90, 0);
if (gameSystem && !gameSystem->isFlag(GAMESYS_DisableDeathCounter)) {
@ -487,7 +489,7 @@ void Piki::inWaterCallback(WaterBox* wbox)
mEffectsObj->mHeight = wbox->getSeaHeightPtr();
if (isAlive()) {
efx::TPkEffect* effectObj = mEffectsObj;
effectObj->doWaterEntry(); // regswap in this inline
effectObj->doWaterEntry(effectObj->isFlag(PKEFF_Drown)); // regswap in this inline
mSoundObj->startFreePikiSetSound(PSSE_PK_SE_WATER_IN, PSGame::SeMgr::SETSE_PikiLanding, 90, 0);
}