mirror of
https://github.com/projectPiki/pikmin2.git
synced 2024-11-27 15:20:37 +00:00
khCaveResult closer
This commit is contained in:
parent
48e1144c6b
commit
f5dbea4537
@ -25,7 +25,7 @@
|
|||||||
| ---- | ---- | ---- | ---- |
|
| ---- | ---- | ---- | ---- |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISoundTable.cpp">JAudio//JAI/JAISoundTable.cpp</a> | 4382 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DBloSaver.cpp">J2D/J2DBloSaver.cpp</a> | 5301 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISoundTable.cpp">JAudio//JAI/JAISoundTable.cpp</a> | 4382 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DBloSaver.cpp">J2D/J2DBloSaver.cpp</a> | 5301 |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAIFx.cpp">JAudio//JAI/JAIFx.cpp</a> | 6025 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPAMath.cpp">JParticle/JPAMath.cpp</a> | 6293 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAIFx.cpp">JAudio//JAI/JAIFx.cpp</a> | 6025 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPAMath.cpp">JParticle/JPAMath.cpp</a> | 6293 |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JMessage/control.cpp">JMessage/control.cpp</a> | 6412 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JGadget/std-list.cpp">JGadget/std-list.cpp</a> | 6508 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JMessage/control.cpp">JMessage/control.cpp</a> | 6412 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JGadget/std-list.cpp">JGadget/std-list.cpp</a> | 6509 |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/jstudio-math.cpp">JStudio/jstudio-math.cpp</a> | 6948 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPAResourceLoader.cpp">JParticle/JPAResourceLoader.cpp</a> | 9831 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/jstudio-math.cpp">JStudio/jstudio-math.cpp</a> | 6948 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JParticle/JPAResourceLoader.cpp">JParticle/JPAResourceLoader.cpp</a> | 9831 |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISequenceHeap.cpp">JAudio//JAI/JAISequenceHeap.cpp</a> | 10033 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAIInitData.cpp">JAudio//JAI/JAIInitData.cpp</a> | 10317 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAISequenceHeap.cpp">JAudio//JAI/JAISequenceHeap.cpp</a> | 10033 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAI/JAIInitData.cpp">JAudio//JAI/JAIInitData.cpp</a> | 10317 |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio_JStage/object-light.cpp">JStudio_JStage/object-light.cpp</a> | 11294 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASDSPChannel.cpp">JAudio//JAS/JASDSPChannel.cpp</a> | 11896 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio_JStage/object-light.cpp">JStudio_JStage/object-light.cpp</a> | 11294 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASDSPChannel.cpp">JAudio//JAS/JASDSPChannel.cpp</a> | 11896 |
|
||||||
@ -96,7 +96,7 @@
|
|||||||
### <section id="plugProjectKonoU">plugProjectKonoU</section>
|
### <section id="plugProjectKonoU">plugProjectKonoU</section>
|
||||||
| File | Size (bytes) | File | Size (bytes) |
|
| File | Size (bytes) | File | Size (bytes) |
|
||||||
| ---- | ---- | ---- | ---- |
|
| ---- | ---- | ---- | ---- |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khCaveResult.cpp">khCaveResult.cpp</a> | 42360 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khFinalResult.cpp">khFinalResult.cpp</a> | 59554 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khCaveResult.cpp">khCaveResult.cpp</a> | 42526 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khFinalResult.cpp">khFinalResult.cpp</a> | 59554 |
|
||||||
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khDayEndResult.cpp">khDayEndResult.cpp</a> | 81835 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khWorldMap.cpp">khWorldMap.cpp</a> | 158638 |
|
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khDayEndResult.cpp">khDayEndResult.cpp</a> | 81835 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKonoU/khWorldMap.cpp">khWorldMap.cpp</a> | 158638 |
|
||||||
|
|
||||||
### <section id="plugProjectMorimuraU">plugProjectMorimuraU</section>
|
### <section id="plugProjectMorimuraU">plugProjectMorimuraU</section>
|
||||||
|
@ -25,10 +25,11 @@ struct TNode : public DNode {
|
|||||||
|
|
||||||
inline int getNextIndex(int a, int b)
|
inline int getNextIndex(int a, int b)
|
||||||
{
|
{
|
||||||
if (mQuantity < 0) {
|
// this whole thing is wrong and may or may not need to exist
|
||||||
return 0;
|
if (mPokoValue < 0) {
|
||||||
|
return mLostNum;
|
||||||
} else {
|
} else {
|
||||||
return (a + b) * mQuantity;
|
return (a + b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,10 +406,10 @@ void ObjCaveResult::doDraw(Graphics& gfx)
|
|||||||
gfx.mOrthoGraph.setPort();
|
gfx.mOrthoGraph.setPort();
|
||||||
pane1->show();
|
pane1->show();
|
||||||
pane2->hide();
|
pane2->hide();
|
||||||
paneList[0]->hide();
|
for (int i = 0; i < 2; i++) {
|
||||||
paneList[1]->hide();
|
paneList[i]->hide();
|
||||||
|
}
|
||||||
|
|
||||||
J2DPane** list = paneList;
|
|
||||||
mScreenMain->draw(gfx, gfx.mOrthoGraph);
|
mScreenMain->draw(gfx, gfx.mOrthoGraph);
|
||||||
|
|
||||||
u32 x, y, wd, ht;
|
u32 x, y, wd, ht;
|
||||||
@ -425,25 +425,28 @@ void ObjCaveResult::doDraw(Graphics& gfx)
|
|||||||
|
|
||||||
f32 offs = mScrollUpDown * 2.0f;
|
f32 offs = mScrollUpDown * 2.0f;
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
list[i]->add(0.0f, mScrollPos - offs);
|
paneList[i]->add(0.0f, mScrollPos - offs);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
mScreenMain->search(nametags[i])->show();
|
|
||||||
mScreenMain->search(icontags[i])->show();
|
mScreenMain->search(icontags[i])->show();
|
||||||
|
mScreenMain->search(nametags[i])->show();
|
||||||
mCounterOtaValues[i]->show();
|
mCounterOtaValues[i]->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 i = 0;
|
u32 i = 0;
|
||||||
int next;
|
|
||||||
FOREACH_NODE(Game::Result::TNode, mResultNode->mChild, cNode)
|
FOREACH_NODE(Game::Result::TNode, mResultNode->mChild, cNode)
|
||||||
{
|
{
|
||||||
|
// regswaps are probably mostly from these values
|
||||||
int isOdd = i % 2;
|
int isOdd = i % 2;
|
||||||
f32 calc = i * mScrollUpDown + mScrollPos;
|
u32 next;
|
||||||
|
|
||||||
|
f32 calc = i * mScrollUpDown + mScrollPos;
|
||||||
|
|
||||||
if (calc < -mScrollUpDown || mScissorMax < calc) {
|
if (calc < -mScrollUpDown || mScissorMax < calc) {
|
||||||
paneList[isOdd]->add(0.0f, offs);
|
paneList[isOdd]->add(0.0f, offs);
|
||||||
} else {
|
} else {
|
||||||
|
// isFlag doesnt work for this
|
||||||
if ((cNode->mItemMgr->mFlags & LOSTITEM_Unk2) == 2) {
|
if ((cNode->mItemMgr->mFlags & LOSTITEM_Unk2) == 2) {
|
||||||
if (cNode->mPokoValue < 0) {
|
if (cNode->mPokoValue < 0) {
|
||||||
next = 0;
|
next = 0;
|
||||||
@ -452,7 +455,8 @@ void ObjCaveResult::doDraw(Graphics& gfx)
|
|||||||
}
|
}
|
||||||
setAlpha(isOdd, 48);
|
setAlpha(isOdd, 48);
|
||||||
} else {
|
} else {
|
||||||
next = cNode->getNextIndex(cNode->mQuantity, cNode->mLostNum);
|
// this whole thing is wrong, might not be an inline at all
|
||||||
|
next = cNode->getNextIndex(cNode->mLostNum, cNode->mQuantity) * cNode->mLostNum;
|
||||||
setAlpha(isOdd, 255);
|
setAlpha(isOdd, 255);
|
||||||
}
|
}
|
||||||
paneList[!isOdd]->hide();
|
paneList[!isOdd]->hide();
|
||||||
@ -461,9 +465,9 @@ void ObjCaveResult::doDraw(Graphics& gfx)
|
|||||||
setTex(mScreenMain, icontags[isOdd], cNode->mTexture->mTexInfo);
|
setTex(mScreenMain, icontags[isOdd], cNode->mTexture->mTexInfo);
|
||||||
u64 tag = cNode->mMesgTag;
|
u64 tag = cNode->mMesgTag;
|
||||||
if (tag == 0) {
|
if (tag == 0) {
|
||||||
mScreenMain->search(icontags[isOdd])->hide();
|
mScreenMain->search(nametags[isOdd])->hide();
|
||||||
} else {
|
} else {
|
||||||
mScreenMain->search(icontags[isOdd])->setMsgID(tag + 1);
|
mScreenMain->search(nametags[isOdd])->setMsgID(tag + 1);
|
||||||
}
|
}
|
||||||
mCurrOtaValues[isOdd] = next;
|
mCurrOtaValues[isOdd] = next;
|
||||||
mCounterOtaValues[isOdd]->update();
|
mCounterOtaValues[isOdd]->update();
|
||||||
@ -480,13 +484,13 @@ void ObjCaveResult::doDraw(Graphics& gfx)
|
|||||||
setAlpha(isOdd, 255);
|
setAlpha(isOdd, 255);
|
||||||
mScreenMain->search(icontags[isOdd])->hide();
|
mScreenMain->search(icontags[isOdd])->hide();
|
||||||
mScreenMain->search(nametags[isOdd])->hide();
|
mScreenMain->search(nametags[isOdd])->hide();
|
||||||
mCounterOtaValues[i]->hide();
|
mCounterOtaValues[isOdd]->hide();
|
||||||
mScreenMain->draw(gfx, gfx.mOrthoGraph);
|
mScreenMain->draw(gfx, gfx.mOrthoGraph);
|
||||||
}
|
}
|
||||||
|
|
||||||
GXSetScissor(x, y, wd, ht);
|
GXSetScissor(x, y, wd, ht);
|
||||||
pane1->show();
|
pane1->hide();
|
||||||
pane2->hide();
|
pane2->show();
|
||||||
paneList[0]->hide();
|
paneList[0]->hide();
|
||||||
paneList[1]->hide();
|
paneList[1]->hide();
|
||||||
mScreenMain->draw(gfx, gfx.mOrthoGraph);
|
mScreenMain->draw(gfx, gfx.mOrthoGraph);
|
||||||
@ -504,7 +508,7 @@ void ObjCaveResult::doDraw(Graphics& gfx)
|
|||||||
u32 y = System::getRenderModeObj()->efbHeight;
|
u32 y = System::getRenderModeObj()->efbHeight;
|
||||||
u32 x = System::getRenderModeObj()->fbWidth;
|
u32 x = System::getRenderModeObj()->fbWidth;
|
||||||
f32 zero = 0.0f;
|
f32 zero = 0.0f;
|
||||||
JGeometry::TBox2f box(0.0f, zero + x, 0.0f, zero + y);
|
JGeometry::TBox2f box(0.0f, 0.0f, zero + x, zero + y);
|
||||||
gfx.mOrthoGraph.fillBox(box);
|
gfx.mOrthoGraph.fillBox(box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user