Link singleGS_MainGame.cpp

This commit is contained in:
PikHacker 2024-06-24 00:18:57 -04:00
parent 40205c9e55
commit a22c2891ff
8 changed files with 61 additions and 9007 deletions

File diff suppressed because it is too large Load Diff

View File

@ -29,10 +29,10 @@
| <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> | 10504 |
| <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/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/JParticle/JPADynamicsBlock.cpp">JParticle/JPADynamicsBlock.cpp</a> | 12718 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JMessage/resource.cpp">JMessage/resource.cpp</a> | 13104 | <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/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> | 14990 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DMaterial.cpp">J2D/J2DMaterial.cpp</a> | 15401 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio_JParticle/object-particle.cpp">JStudio_JParticle/object-particle.cpp</a> | 16851 |
| <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/J3D/J3DCluster.cpp">J3D/J3DCluster.cpp</a> | 18929 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JMessage/resource.cpp">JMessage/resource.cpp</a> | 13104 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/stb.cpp">JStudio/stb.cpp</a> | 13495 |
| <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/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> | 14990 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DMaterial.cpp">J2D/J2DMaterial.cpp</a> | 15401 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio_JParticle/object-particle.cpp">JStudio_JParticle/object-particle.cpp</a> | 16851 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DCluster.cpp">J3D/J3DCluster.cpp</a> | 18929 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DMaterialFactory.cpp">J2D/J2DMaterialFactory.cpp</a> | 18966 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J2D/J2DTextBoxEx.cpp">J2D/J2DTextBoxEx.cpp</a> | 19100 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASChannel.cpp">JAudio//JAS/JASChannel.cpp</a> | 19252 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JAudio/JSystem/JAS/JASBNKParser.cpp">JAudio//JAS/JASBNKParser.cpp</a> | 19529 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/JStudio/fvb.cpp">JStudio/fvb.cpp</a> | 19853 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/JSystem/J3D/J3DTevs.cpp">J3D/J3DTevs.cpp</a> | 20723 |
@ -78,18 +78,17 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pathfinder.cpp">pathfinder.cpp</a> | 22655 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPikihead.cpp">itemPikihead.cpp</a> | 23992 |
| <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> | 25766 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameDynamics.cpp">gameDynamics.cpp</a> | 27094 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/vsCardMgr.cpp">vsCardMgr.cpp</a> | 30816 |
| <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> | 32197 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemGate.cpp">itemGate.cpp</a> | 32852 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/routeMgr.cpp">routeMgr.cpp</a> | 34238 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 35991 | <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/gamePlayData.cpp">gamePlayData.cpp</a> | 37116 | <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/cellPyramid.cpp">cellPyramid.cpp</a> | 48067 | <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/singleGS_CaveGame.cpp">singleGS_CaveGame.cpp</a> | 52995 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiFormation.cpp">aiFormation.cpp</a> | 53253 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletState.cpp">pelletState.cpp</a> | 63252 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemUjamushi.cpp">itemUjamushi.cpp</a> | 64495 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPlant.cpp">itemPlant.cpp</a> | 73525 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSection.cpp">baseGameSection.cpp</a> | 86610 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiPrimitives.cpp">aiPrimitives.cpp</a> | 117085 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletMgr.cpp">pelletMgr.cpp</a> | 134788 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi.cpp">navi.cpp</a> | 152313 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiState.cpp">pikiState.cpp</a> | 155487 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/naviState.cpp">naviState.cpp</a> | 163046 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_Zukan.cpp">singleGS_Zukan.cpp</a> | 163810 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameMapParts.cpp">gameMapParts.cpp</a> | 164131 | | |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemBridge.cpp">itemBridge.cpp</a> | 32197 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemGate.cpp">itemGate.cpp</a> | 32852 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/routeMgr.cpp">routeMgr.cpp</a> | 34238 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/piki.cpp">piki.cpp</a> | 35991 |
| <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/gamePlayData.cpp">gamePlayData.cpp</a> | 37116 |
| <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/cellPyramid.cpp">cellPyramid.cpp</a> | 48067 |
| <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/singleGS_CaveGame.cpp">singleGS_CaveGame.cpp</a> | 52995 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiFormation.cpp">aiFormation.cpp</a> | 53253 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletState.cpp">pelletState.cpp</a> | 63252 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemUjamushi.cpp">itemUjamushi.cpp</a> | 64495 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/itemPlant.cpp">itemPlant.cpp</a> | 73525 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/baseGameSection.cpp">baseGameSection.cpp</a> | 86610 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/aiPrimitives.cpp">aiPrimitives.cpp</a> | 117085 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pelletMgr.cpp">pelletMgr.cpp</a> | 134788 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/navi.cpp">navi.cpp</a> | 152313 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/pikiState.cpp">pikiState.cpp</a> | 155487 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/naviState.cpp">naviState.cpp</a> | 163046 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/singleGS_Zukan.cpp">singleGS_Zukan.cpp</a> | 163810 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectKandoU/gameMapParts.cpp">gameMapParts.cpp</a> | 164131 |
### <section id="plugProjectKonoU">plugProjectKonoU</section>
| File | Size (bytes) | File | Size (bytes) |

View File

@ -91,9 +91,11 @@ struct TContainerEnumerator_const_TVector : public TEnumerator<const T*> {
};
template <typename T>
struct TContainerEnumerator_
{
TContainerEnumerator_(T& a) : enumerator(a.begin(), a.end()) { }
struct TContainerEnumerator_ {
TContainerEnumerator_(T& a)
: enumerator(a.begin(), a.end())
{
}
JGadget::TEnumerator<T::iterator> enumerator;
};
} // namespace JGadget

View File

@ -988,7 +988,7 @@
["plugProjectKandoU/itemWeed", false],
["plugProjectKandoU/aiBridge", true],
["plugProjectKandoU/aiTeki", true],
["plugProjectKandoU/singleGS_MainGame", false],
["plugProjectKandoU/singleGS_MainGame", true],
["plugProjectKandoU/singleGS_CaveGame", false],
["plugProjectKandoU/singleGS_MainResult", true],
["plugProjectKandoU/singleGS_CaveResult", false],

View File

@ -456,31 +456,29 @@ void TControl::reset()
*/
bool TControl::forward(u32 time)
{
TObject *p;
mSuspend = mObject_control.getSuspend();
bool result = mObject_control.forward(time);
u32 statusAnd = 0x0f;
u32 statusOr = 0;
for (JGadget::TContainerEnumerator_< JGadget::TLinkList<JStudio::stb::TObject, -12> > it(mObjectContainer); it.enumerator; )
{
TObject* p;
mSuspend = mObject_control.getSuspend();
bool result = mObject_control.forward(time);
u32 statusAnd = 0x0f;
u32 statusOr = 0;
for (JGadget::TContainerEnumerator_<JGadget::TLinkList<JStudio::stb::TObject, -12>> it(mObjectContainer); it.enumerator;) {
// this sucks, ideally `*it` should return a `TObject&` or `TObject*`, but idk how to set that up
p = &**it.enumerator;
TObject::TEStatus s;
bool v = true;
if (!p->forward(time) && !result)
{
v = false;
}
result = v;
s = p->getStatus();
TObject::TEStatus s;
statusAnd &= s;
statusOr |= s;
}
bool v = true;
if (!p->forward(time) && !result) {
v = false;
}
result = v;
s = p->getStatus();
statusAnd &= s;
statusOr |= s;
}
setStatus(statusAnd | statusOr << 16);
@ -616,10 +614,10 @@ bool TParse::parseBlock_object(const data::TParse_TBlock_object& object, u32 fla
return (flags & 0x40) ? true : false;
}
newObj->mControl = control;
newObj->mControl = control;
JGadget::TLinkList<TObject, -12>::iterator i = control->mObjectContainer.end();
control->mObjectContainer.Insert(i, newObj);
return true;
}
} // namespace stb

View File

@ -88,7 +88,7 @@ KANDO_FILES:=\
$(BUILD_DIR)/asm/plugProjectKandoU/itemWeed.o\
$(BUILD_DIR)/src/plugProjectKandoU/aiBridge.o\
$(BUILD_DIR)/src/plugProjectKandoU/aiTeki.o\
$(BUILD_DIR)/asm/plugProjectKandoU/singleGS_MainGame.o\
$(BUILD_DIR)/src/plugProjectKandoU/singleGS_MainGame.o\
$(BUILD_DIR)/asm/plugProjectKandoU/singleGS_CaveGame.o\
$(BUILD_DIR)/src/plugProjectKandoU/singleGS_MainResult.o\
$(BUILD_DIR)/asm/plugProjectKandoU/singleGS_CaveResult.o\

View File

@ -208,13 +208,20 @@ void GameState::init(SingleGameSection* game, StateArg* arg)
*/
unknown GameState::gameStart(SingleGameSection*)
{
// Feels like there should be more to this, but the DispObjGround stuff is sometimes before this stuff, sometimes after, idk
gameSystem->setFlag(GAMESYS_IsPlaying);
if (gameSystem->mTimeMgr->mDayCount != 0) {
PSMGetSceneMgr()->mScenes->mChild->startMainSeq();
PSSystem::SceneMgr* mgr = PSSystem::getSceneMgr();
mgr->checkScene();
mgr->mScenes->mChild->startMainSeq();
} else {
static_cast<PSM::Scene_Objects*>(PSMGetSceneMgr()->mScenes->mChild)->onStartMainSeq();
static_cast<PSM::Scene_Objects*>(PSMGetSceneMgr()->mScenes->mChild)->getEnvSe()->on();
// PikSceneMgr cast is solely to fix a regswap, very cool
PSGame::PikSceneMgr* mgr = static_cast<PSGame::PikSceneMgr*>(PSSystem::getSceneMgr());
mgr->checkScene();
static_cast<PSM::Scene_Objects*>(mgr->mScenes->mChild)->onStartMainSeq();
mgr = static_cast<PSGame::PikSceneMgr*>(PSSystem::getSceneMgr());
mgr->checkScene();
static_cast<PSM::Scene_Game*>(mgr->mScenes->mChild)->getEnvSe()->on();
}
}
@ -810,13 +817,13 @@ void GameState::onMovieDone(SingleGameSection* game, MovieConfig* config, u32, u
return;
}
// @intns: only remaining regswaps are in this loop - Piki* piki should load into r25 not r28.
// ground all pikmin when cutscene ends
Iterator<Piki> iterator(pikiMgr);
CI_LOOP(iterator)
{
FakePiki* piki = *iterator;
Vector3f pos = piki->getPosition();
pos.y = mapMgr->getMinY(pos);
Piki* piki = *iterator;
Vector3f pos = piki->getPosition();
pos.y = mapMgr->getMinY(pos);
piki->setPosition(pos, false);
}

View File

@ -1045,3 +1045,5 @@ You have 4800 out of 10000 Pokos and 115 out of 201 treasures.",2024-06-12 19:40
You have 4801 out of 10000 Pokos and 115 out of 201 treasures.",2024-06-12 13:59:44.487264
4803,2234836,0.48036691978594914,115,410232,0.5754766741109004,"
You have 4803 out of 10000 Pokos and 115 out of 201 treasures.",2024-06-13 17:40:00.559601
4839,2251656,0.4839822954067104,115,411285,0.5769538307877047,"
You have 4839 out of 10000 Pokos and 115 out of 201 treasures.",2024-06-24 00:11:02.360510

1 code_count_in_pokos code_completion_in_bytes code_completion_in_percentage data_count_in_treasures data_completion_in_bytes data_completion_in_percentage sentence created_at
1045
1046
1047
1048
1049