Rename some GameMessage

This commit is contained in:
intns 2024-05-03 11:40:04 +01:00
parent 3b966db64f
commit fcf2f8560f
2 changed files with 9 additions and 9 deletions

View File

@ -102,15 +102,15 @@ struct GameMessageVsGetOtakara : public GameMessage {
};
struct GameMessageVsGotCard : public GameMessage {
inline GameMessageVsGotCard(u32 onyonType)
: _04(onyonType)
inline GameMessageVsGotCard(u32 userIndex)
: mUserIndex(userIndex)
{
}
virtual bool actVs(VsGameSection*); // _10
// _00 = VTBL
u32 _04; // _04, onyon type according to ghidra, but that enum is meant to be a short
u32 mUserIndex; // _04
};
struct GameMessageVsPikminDead : public GameMessage {
@ -127,11 +127,11 @@ struct GameMessageVsRedOrSuckStart : public GameMessage {
};
struct GameMessageVsUseCard : public GameMessage {
GameMessageVsUseCard(int id) { _04 = id; }
GameMessageVsUseCard(int id) { mSlotIndex = id; }
virtual bool actVs(VsGameSection*); // _10
// _00 = VTBL
int _04; // _04
int mSlotIndex; // _04
};
} // namespace Game

View File

@ -970,11 +970,11 @@ bool GameMessageVsPikminDead::actVs(VsGameSection* section)
*/
bool GameMessageVsGotCard::actVs(VsGameSection* section)
{
VsGame::CardMgr::SlotMachine* slot = &section->mCardMgr->mSlotMachines[_04];
VsGame::CardMgr::SlotMachine* slot = &section->mCardMgr->mSlotMachines[mUserIndex];
if (!slot->_18 && slot->mSlotID != VsGame::UNRESOLVED) {
section->useCard();
}
section->mCardMgr->gotPlayerCard(_04);
section->mCardMgr->gotPlayerCard(mUserIndex);
return true;
}
@ -990,11 +990,11 @@ bool GameMessageVsUseCard::actVs(VsGameSection* section)
}
}
if (gGameConfig.mParms.mVsY.mData == 0) {
if (section->mCardMgr->usePlayerCard(_04, section->mTekiMgr)) {
if (section->mCardMgr->usePlayerCard(mSlotIndex, section->mTekiMgr)) {
section->useCard();
}
} else {
section->mCardMgr->stopSlot(_04);
section->mCardMgr->stopSlot(mSlotIndex);
}
return true;
}