1#include "Game/System/GameDataConst.hpp"
2#include "Game/System/GameEventFlag.hpp"
3#include "Game/System/GameEventFlagTable.hpp"
4#include "Game/Util.hpp"
7u32 GameDataConst::getPowerStarNumToOpenGalaxy(
const char *pGalaxy) {
9 info.attach(&GalaxyIDBCSV);
11 element = info.findElement<
const char *>(
"name", pGalaxy, 0);
13 element.getValue<u32>(
"PowerStarNum", &powerStarNum);
17bool GameDataConst::isPowerStarGreen(
const char *pName, s32 a2) {
18 return isPowerStarSpecial(pName, a2,
"SpecialStarGreen");
21bool GameDataConst::isPowerStarRed(
const char *pName, s32 a2) {
22 return isPowerStarSpecial(pName, a2,
"SpecialStarRed");
25bool GameDataConst::isPowerStarLuigiHas(
const char *pName, s32 a2) {
26 return isPowerStarSpecial(pName, a2,
"SpecialStarFindingLuigi");
29bool GameDataConst::isGrandStar(
const char *pName, s32 a2) {
30 return isPowerStarSpecial(pName, a2,
"SpecialStarGrand");
33bool GameDataConst::isGalaxyLuigiArrested(
const char *pGalaxy, s32 starId) {
36 const char* galaxyName = accessor.getGalaxyName();
38 if (MR::isEqualString(galaxyName, pGalaxy) && ((starId == -1) || starId == accessor.getStarId())) {
45bool GameDataConst::isGalaxyAppearGreenDriver(
const char *pGalaxyName) {
47 snprintf(buf, 0x30,
"Appear%s", pGalaxyName);
48 return !GameEventFlagTable::isExist(buf) ? false : GameEventFlagTable::isDependedAnother(buf,
"SpecialStarGreenAll");
51u32 GameDataConst::getIncludedGrandGalaxyId(
const char *pGalaxy) {
53 info.attach(&GalaxyIDBCSV);
55 element = info.findElement<
const char *>(
"name", pGalaxy, 0);
56 u32 grandGalaxyNo = 0;
57 element.getValue<u32>(
"GrandGalaxyNo", &grandGalaxyNo);