GalaxyMoveArgument decompilation

This commit is contained in:
shibbo 2019-10-14 12:34:05 -04:00
parent f1c20d9bac
commit bba1fe690c
4 changed files with 78 additions and 3 deletions

View File

@ -5,11 +5,17 @@
class JMapIdInfo
{
public:
JMapIdInfo(s64, const JMapInfoIter &);
JMapIdInfo(s64, s64);
JMapIdInfo() { }
JMapIdInfo(s32 param1, s32 zoneID)
{
_0 = param1;
mZoneId = zoneID;
}
JMapIdInfo(s32, const JMapInfoIter &);
JMapIdInfo(const JMapIdInfo &);
void initialize(s64, const JMapInfoIter &);
void initialize(s32, const JMapInfoIter &);
void operator=(const JMapIdInfo &);
bool operator==(const JMapIdInfo &);

View File

@ -4,8 +4,11 @@
#include "JMap/JMapInfo.h"
#include "JMap/JMapInfoIter.h"
class JMapIdInfo;
namespace MR
{
JMapIdInfo* getInitializeStartIdInfo();
void getRailInfo(JMapInfoIter *, const JMapInfo **, const JMapInfoIter &);
void getCameraRailInfo(JMapInfoIter *, const JMapInfo **, s32, s32);
};

View File

@ -0,0 +1,21 @@
#ifndef GALAXYMOVEARGUMENT_H
#define GALAXYMOVEARGUMENT_H
#include "JMap/JMapIdInfo.h"
class GalaxyMoveArgument
{
public:
GalaxyMoveArgument(u32, const char *, s32, const JMapIdInfo *);
bool isEqualStage(const char *) const;
bool isEqualStageScenario(const char *, s32) const;
u32 _0;
const char* mStageName; // _4
s32 mScenarioNo; // _8
s32 _C;
JMapIdInfo mStartInfo; // _10
};
#endif // GALAXYMOVEARGUMENT_H

View File

@ -0,0 +1,45 @@
#include "System/Galaxy/GalaxyMoveArgument.h"
#include "MR/SceneUtil.h"
#include "MR/StringUtil.h"
GalaxyMoveArgument::GalaxyMoveArgument(u32 p1, const char* pStage, s32 pScenarioNo, const JMapIdInfo* pInfo)
{
_0 = p1;
mStageName = pStage;
mScenarioNo = pScenarioNo;
_C = -1;
mStartInfo._0 = -1;
mStartInfo.mZoneId = -1;
if (pInfo != 0)
{
mStartInfo = *pInfo;
}
else
{
mStartInfo = *MR::getInitializeStartIdInfo();
}
}
bool GalaxyMoveArgument::isEqualStage(const char* pStage) const
{
if (mStageName == 0)
{
return false;
}
return MR::isEqualString(pStage, mStageName);
}
bool GalaxyMoveArgument::isEqualStageScenario(const char* pStage, s32 pScenarioNo) const
{
bool isEqual = false;
if (isEqualStage(pStage) && pScenarioNo == mScenarioNo)
{
isEqual = true;
}
return isEqual;
}