mirror of
https://github.com/projectPiki/pikmin2.git
synced 2024-11-23 05:20:06 +00:00
make piki.cpp equivalent
This commit is contained in:
parent
919040a29e
commit
803ce056aa
@ -83,8 +83,8 @@
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameCPlate.cpp">gameCPlate.cpp</a> | 24190 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/dynCreature.cpp">dynCreature.cpp</a> | 25764 |
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameDynamics.cpp">gameDynamics.cpp</a> | 27112 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/vsCardMgr.cpp">vsCardMgr.cpp</a> | 30814 |
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_MainGame.cpp">singleGS_MainGame.cpp</a> | 31943 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemBridge.cpp">itemBridge.cpp</a> | 32179 |
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemGate.cpp">itemGate.cpp</a> | 32834 | <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/gameGeneratorCache.cpp">gameGeneratorCache.cpp</a> | 36353 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 36644 |
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemGate.cpp">itemGate.cpp</a> | 32834 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 35295 |
|
||||
| <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/gameGeneratorCache.cpp">gameGeneratorCache.cpp</a> | 36353 |
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gamePlayData.cpp">gamePlayData.cpp</a> | 37048 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/routeMgr.cpp">routeMgr.cpp</a> | 39142 |
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/collinfo.cpp">collinfo.cpp</a> | 43044 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/fakePiki.cpp">fakePiki.cpp</a> | 50426 |
|
||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/cellPyramid.cpp">cellPyramid.cpp</a> | 51266 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_CaveGame.cpp">singleGS_CaveGame.cpp</a> | 52995 |
|
||||
|
@ -35,7 +35,7 @@ struct ToeChudoku {
|
||||
void create(Vector3f*);
|
||||
void kill();
|
||||
|
||||
ContextChasePos mContext;
|
||||
ContextChasePos mContext[1];
|
||||
};
|
||||
|
||||
struct ToeDoping {
|
||||
@ -43,7 +43,7 @@ struct ToeDoping {
|
||||
void create(Vector3f*);
|
||||
void kill();
|
||||
|
||||
ContextChasePos mContext;
|
||||
ContextChasePos mContext[1];
|
||||
};
|
||||
|
||||
struct ToeHamonA {
|
||||
@ -84,7 +84,7 @@ struct ToeMoeSmoke {
|
||||
void create(Vector3f*);
|
||||
void kill();
|
||||
|
||||
ContextChasePos mContext;
|
||||
ContextChasePos mContext[1];
|
||||
};
|
||||
|
||||
struct ToeNagekira {
|
||||
@ -92,7 +92,7 @@ struct ToeNagekira {
|
||||
void create(Vector3f*);
|
||||
void kill();
|
||||
|
||||
ContextChasePos mContext;
|
||||
ContextChasePos mContext[1];
|
||||
};
|
||||
|
||||
struct ToeTanekira {
|
||||
|
@ -446,15 +446,15 @@ void ToeKourin::kill()
|
||||
void ToeDoping::create(Vector3f* chasePos)
|
||||
{
|
||||
P2ASSERTLINE(385, chasePos);
|
||||
mContext.mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeDoping->add(&mContext);
|
||||
mContext[0].mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeDoping->add(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C729C
|
||||
* @note Size: 0x2C
|
||||
*/
|
||||
void ToeDoping::kill() { pkEffectMgr->mTOneEmitters.mToeDoping->del(&mContext); }
|
||||
void ToeDoping::kill() { pkEffectMgr->mTOneEmitters.mToeDoping->del(mContext); }
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C72C8
|
||||
@ -463,15 +463,15 @@ void ToeDoping::kill() { pkEffectMgr->mTOneEmitters.mToeDoping->del(&mContext);
|
||||
void ToeNagekira::create(Vector3f* chasePos)
|
||||
{
|
||||
P2ASSERTLINE(399, chasePos);
|
||||
mContext.mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeNageKira->add(&mContext);
|
||||
mContext[0].mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeNageKira->add(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C7330
|
||||
* @note Size: 0x2C
|
||||
*/
|
||||
void ToeNagekira::kill() { pkEffectMgr->mTOneEmitters.mToeNageKira->del(&mContext); }
|
||||
void ToeNagekira::kill() { pkEffectMgr->mTOneEmitters.mToeNageKira->del(mContext); }
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C735C
|
||||
@ -504,15 +504,15 @@ void ToeMoeBC::kill()
|
||||
void ToeChudoku::create(Vector3f* chasePos)
|
||||
{
|
||||
P2ASSERTLINE(429, chasePos);
|
||||
mContext.mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeChudoku->add(&mContext);
|
||||
mContext[0].mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeChudoku->add(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C7488
|
||||
* @note Size: 0x2C
|
||||
*/
|
||||
void ToeChudoku::kill() { pkEffectMgr->mTOneEmitters.mToeChudoku->del(&mContext); }
|
||||
void ToeChudoku::kill() { pkEffectMgr->mTOneEmitters.mToeChudoku->del(mContext); }
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C74B4
|
||||
@ -583,15 +583,15 @@ void ToeHamonB::kill() { pkEffectMgr->mTOneEmitters.mToeHamonB->del(mContext); }
|
||||
void ToeMoeSmoke::create(Vector3f* chasePos)
|
||||
{
|
||||
P2ASSERTLINE(495, chasePos);
|
||||
mContext.mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeMoeSmoke->add(&mContext);
|
||||
mContext[0].mPosition = chasePos;
|
||||
pkEffectMgr->mTOneEmitters.mToeMoeSmoke->add(mContext);
|
||||
}
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C7720
|
||||
* @note Size: 0x2C
|
||||
*/
|
||||
void ToeMoeSmoke::kill() { pkEffectMgr->mTOneEmitters.mToeMoeSmoke->del(&mContext); }
|
||||
void ToeMoeSmoke::kill() { pkEffectMgr->mTOneEmitters.mToeMoeSmoke->del(mContext); }
|
||||
|
||||
/**
|
||||
* @note Address: 0x803C774C
|
||||
|
@ -664,90 +664,28 @@ int Piki::getStateID()
|
||||
f32 Piki::getSpeed(f32 multiplier)
|
||||
{
|
||||
if (doped()) {
|
||||
return pikiMgr->mParms->mPikiParms.mDopeRunSpeed.mValue;
|
||||
return pikiMgr->mParms->mPikiParms.mDopeRunSpeed();
|
||||
}
|
||||
|
||||
f32 baseSpeed = scaleValue(1.0f, pikiMgr->mParms->mPikiParms.mRunSpeed.mValue);
|
||||
f32 baseSpeed = scaleValue(1.0f, pikiMgr->mParms->mPikiParms.mRunSpeed());
|
||||
|
||||
if (mHappaKind == Flower) {
|
||||
baseSpeed = pikiMgr->mParms->mPikiParms.mFlowerRunSpeed.mValue;
|
||||
baseSpeed = pikiMgr->mParms->mPikiParms.mFlowerRunSpeed();
|
||||
} else if (mHappaKind == Bud) {
|
||||
baseSpeed = pikiMgr->mParms->mPikiParms.mBudRunSpeed.mValue;
|
||||
baseSpeed = pikiMgr->mParms->mPikiParms.mBudRunSpeed();
|
||||
}
|
||||
|
||||
int pikiType = getKind();
|
||||
f32 drag = scaleValue(1.0f, pikiMgr->mParms->mPikiParms.mWalkSpeed.mValue);
|
||||
f32 drag = scaleValue(1.0f, pikiMgr->mParms->mPikiParms.mWalkSpeed());
|
||||
f32 speed = multiplier * (baseSpeed - drag) + drag;
|
||||
|
||||
if (pikiType == White) {
|
||||
speed *= pikiMgr->mParms->mPikiParms.mWhiteRunSpeedMultiplier.mValue;
|
||||
speed *= pikiMgr->mParms->mPikiParms.mWhiteRunSpeedMultiplier();
|
||||
} else if (pikiType == Purple) {
|
||||
speed *= pikiMgr->mParms->mPikiParms.mPurpleRunSpeedMultiplier.mValue;
|
||||
speed *= pikiMgr->mParms->mPikiParms.mPurpleRunSpeedMultiplier();
|
||||
}
|
||||
|
||||
return speed;
|
||||
/*
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
stw r0, 0x24(r1)
|
||||
stfd f31, 0x10(r1)
|
||||
psq_st f31, 24(r1), 0, qr0
|
||||
stw r31, 0xc(r1)
|
||||
mr r31, r3
|
||||
fmr f31, f1
|
||||
bl doped__Q24Game4PikiFv
|
||||
clrlwi. r0, r3, 0x18
|
||||
beq lbl_80148F8C
|
||||
lwz r3, pikiMgr__4Game@sda21(r13)
|
||||
lwz r3, 0x6c(r3)
|
||||
lfs f1, 0x11a0(r3)
|
||||
b lbl_80148FFC
|
||||
|
||||
lbl_80148F8C:
|
||||
lwz r3, pikiMgr__4Game@sda21(r13)
|
||||
lbz r0, 0x2b9(r31)
|
||||
lwz r3, 0x6c(r3)
|
||||
lfs f1, lbl_80518440@sda21(r2)
|
||||
cmplwi r0, 2
|
||||
lfs f0, 0x2c8(r3)
|
||||
fmuls f2, f1, f0
|
||||
bne lbl_80148FB4
|
||||
lfs f2, 0x2f0(r3)
|
||||
b lbl_80148FC0
|
||||
|
||||
lbl_80148FB4:
|
||||
cmplwi r0, 1
|
||||
bne lbl_80148FC0
|
||||
lfs f2, 0x318(r3)
|
||||
|
||||
lbl_80148FC0:
|
||||
lfs f1, lbl_80518440@sda21(r2)
|
||||
lfs f0, 0x2a0(r3)
|
||||
lbz r0, 0x2b8(r31)
|
||||
fmuls f1, f1, f0
|
||||
cmpwi r0, 4
|
||||
fsubs f0, f2, f1
|
||||
fmadds f1, f31, f0, f1
|
||||
bne lbl_80148FEC
|
||||
lfs f0, 0x1010(r3)
|
||||
fmuls f1, f1, f0
|
||||
b lbl_80148FFC
|
||||
|
||||
lbl_80148FEC:
|
||||
cmpwi r0, 3
|
||||
bne lbl_80148FFC
|
||||
lfs f0, 0x1038(r3)
|
||||
fmuls f1, f1, f0
|
||||
|
||||
lbl_80148FFC:
|
||||
psq_l f31, 24(r1), 0, qr0
|
||||
lwz r0, 0x24(r1)
|
||||
lfd f31, 0x10(r1)
|
||||
lwz r31, 0xc(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user