1#pragma once
2
3#include "Library/LiveActor/LiveActor.h"
4
5#include "System/GameDataHolder.h"
6#include "System/GameDataHolderAccessor.h"
7#include "System/GameDataHolderWriter.h"
8
9struct BindInfo;
10class ChangeStageInfo;
11class ScenarioStartCamera;
12struct ShineInfo;
13class Shine;
14class RiseMapPartsHolder;
15class QuestInfo;
16class WorldTravelingNpc;
17class HackObjInfo;
18class CollectBgm;
19
20namespace nn::g3d {
21class ResFile;
22}
23
24namespace al {
25class CameraTicket;
26class GameDataHolderBase;
27class LayoutActor;
28class PlacementId;
29class PlacementInfo;
30class Scene;
31} // namespace al
32
33namespace ShopItem {
34struct ItemInfo;
35}
36
37enum class SessionEventProgress {
38 Entry = 0,
39 Wait1stMusician,
40 Wait2ndMusician,
41 Wait3rdMusician,
42 Wait4thMusician,
43 RequestGoToThePowerPlant,
44 WaitThePowerPlantWorks,
45 TheCeremonyIsReady,
46 GoForTheCeremony,
47};
48
49namespace GameDataFunction {
50GameDataHolder* getGameDataHolder(const al::IUseSceneObjHolder* holder);
51GameDataHolder* getGameDataHolder(const al::SceneObjHolder* holder);
52GameDataHolder* getGameDataHolder(al::GameDataHolderBase* holder);
53GameDataFile* getGameDataFile(GameDataHolderWriter writer);
54void setPlayingFileId(GameDataHolderWriter writer, s32 fileId);
55void initializeData(GameDataHolderWriter writer, s32 fileId);
56bool isPlayDemoOpening(GameDataHolderAccessor accessor);
57bool isGameClear(GameDataHolderAccessor accessor);
58void setRequireSave(GameDataHolderWriter writer);
59void setRequireSaveFrame(GameDataHolderWriter writer);
60u64 getPlayTimeTotal(GameDataHolderAccessor accessor);
61u64 getPlayTimeAcrossFile(GameDataHolderAccessor accessor);
62s64 getSaveDataIdForPrepo(GameDataHolderAccessor accessor);
63void startDemoStage(GameDataHolderWriter writer, const char* stageName);
64bool tryChangeNextStage(GameDataHolderWriter writer, const ChangeStageInfo* stageInfo);
65bool tryChangeNextStageWithStartRaceFlag(GameDataHolderWriter writer,
66 const ChangeStageInfo* stageInfo);
67bool tryChangeNextStageWithStartRaceYukimaru(GameDataHolderWriter writer,
68 const ChangeStageInfo* stageInfo);
69bool tryChangeNextStageWithDemoWorldWarp(GameDataHolderWriter writer, const char* stageName);
70bool tryChangeNextStageWithWorldWarpHole(GameDataHolderWriter writer, const char* stageName);
71void changeNextStageWithStartTimeBalloon(GameDataHolderWriter writer, s32 scenarioNo);
72const char* getCurrentStageName(GameDataHolderAccessor accessor);
73void changeNextStageWithEndTimeBalloon(GameDataHolderWriter writer);
74void changeNextStageWithCloset(GameDataHolderWriter writer);
75void findAreaAndChangeNextStage(GameDataHolderWriter writer, const al::LiveActor* actor,
76 const sead::Vector3f* actorTrans);
77void returnPrevStage(GameDataHolderWriter writer);
78bool isTimeBalloonSequence(GameDataHolderAccessor accessor);
79const char* getNextStageName(GameDataHolderAccessor accessor);
80const char* getCurrentStageName(GameDataHolderAccessor accessor, s32 fileId);
81bool isSeaOfTreeStage(GameDataHolderAccessor accessor);
82const char* getNextStageName(GameDataHolderAccessor accessor, s32 fileId);
83s32 calcNextScenarioNo(GameDataHolderAccessor accessor);
84void restartStage(GameDataHolderWriter writer);
85void missAndRestartStage(GameDataHolderWriter writer);
86bool isMissEndPrevStageForInit(GameDataHolderAccessor accessor);
87bool isMissEndPrevStageForSceneDead(GameDataHolderAccessor accessor);
88void reenterStage(GameDataHolderWriter writer);
89s32 getNextWorldId(GameDataHolderAccessor accessor);
90s32 getPrevWorldId(GameDataHolderAccessor accessor);
91s32 getWorldNumForNewReleaseShop(GameDataHolderAccessor accessor);
92bool isAlreadyGoWorld(GameDataHolderAccessor accessor, s32 worldId);
93const char* getWorldDevelopName(GameDataHolderAccessor accessor, s32 worldId);
94s32 getWorldIdForNewReleaseShop(GameDataHolderAccessor accessor, s32 worldId);
95bool isForwardWorldWarpDemo(GameDataHolderAccessor accessor);
96s32 getWorldNum(GameDataHolderAccessor accessor);
97bool isFirstTimeNextWorld(GameDataHolderAccessor accessor);
98bool checkIsNewWorldInAlreadyGoWorld(GameDataHolderAccessor accessor);
99s32 getCurrentWorldIdNoDevelop(GameDataHolderAccessor accessor);
100s32 getScenarioNo(const al::LiveActor* actor);
101s32 getScenarioNo(const al::LayoutActor* layout);
102s32 getScenarioNoPlacement(GameDataHolderAccessor accessor);
103bool isEqualScenario(const RiseMapPartsHolder*, s32 scenarioNo);
104s32 getMainQuestMin(const al::LiveActor* actor);
105s32 getCurrentWorldId(GameDataHolderAccessor accessor);
106void clearStartId(GameDataHolderWriter writer);
107void setCheckpointId(GameDataHolderWriter writer, const al::PlacementId* checkpointFlag);
108void setRestartPointId(GameDataHolderWriter writer, const al::PlacementId* playerRestartInfo);
109const char* tryGetRestartPointIdString(GameDataHolderAccessor accessor);
110const char* tryGetPlayerStartId(GameDataHolderAccessor accessor);
111bool isPlayerStartObj(const al::LiveActor* actor, const al::ActorInitInfo& initInfo);
112bool isPlayerStartObj(const al::LiveActor* actor, const al::PlacementInfo& placementInfo);
113bool isPlayerStartObj(const al::LiveActor* actor, const char* playerStartId);
114bool isPlayerStartLinkedObj(const al::LiveActor* actor, const al::ActorInitInfo& initInfo,
115 const char* linkName);
116void setStartShine(const al::LiveActor* actor, const ShineInfo* shineInfo);
117s32 getStartShineNextIndex(GameDataHolderAccessor accessor);
118bool isAlreadyShowExplainCheckpointFlag(GameDataHolderAccessor accessor);
119bool isEnableShowExplainCheckpointFlag(GameDataHolderAccessor accessor);
120void showExplainCheckpointFlag(GameDataHolderAccessor accessor);
121void getLifeMaxUpItem(const al::LiveActor* actor);
122s32 getPlayerHitPoint(GameDataHolderAccessor accessor);
123s32 getPlayerHitPointMaxCurrent(GameDataHolderAccessor accessor);
124s32 getPlayerHitPointMaxNormal(GameDataHolderAccessor accessor);
125bool isPlayerHitPointMax(GameDataHolderAccessor accessor);
126bool isPlayerHitPointMaxWithItem(GameDataHolderAccessor accessor);
127void recoveryPlayer(const al::LiveActor* actor);
128void recoveryPlayerForDebug(const al::LiveActor* actor);
129void recoveryPlayerMax(const al::LiveActor* actor);
130void recoveryPlayerForSystem(const GameDataHolder* holder);
131void recoveryPlayerMaxForSystem(const GameDataHolder* holder);
132void initPlayerHitPointForSystem(const GameDataHolder* holder);
133void damagePlayer(GameDataHolderWriter writer);
134void killPlayer(GameDataHolderWriter writer);
135bool isPlayerLifeZero(GameDataHolderAccessor accessor);
136bool isGotShine(GameDataHolderAccessor accessor, const ShineInfo* shineInfo);
137bool isGotShine(GameDataHolderAccessor accessor, const al::PlacementId* shine);
138bool isGotShine(GameDataHolderAccessor accessor, const char* stageName, const char* objId);
139bool isGotShine(GameDataHolderAccessor accessor, s32 shineIdx);
140bool isGotShine(const Shine* shineActor);
141void setGotShine(GameDataHolderWriter writer, const ShineInfo* shineInfo);
142s32 getGotShineNum(GameDataHolderAccessor accessor, s32 fileId = -1);
143ShineInfo* getLatestGetShineInfo(GameDataHolderAccessor accessor);
144s32 getCurrentShineNum(GameDataHolderAccessor accessor);
145s32 getTotalShineNum(GameDataHolderAccessor accessor, s32 fileId = -1);
146s32 getTotalShopShineNum(GameDataHolderAccessor accessor, s32 fileId = -1);
147bool tryGetNextMainScenarioLabel(sead::BufferedSafeStringBase<char>* scenarioName,
148 sead::BufferedSafeStringBase<char>* stageName,
149 const al::IUseSceneObjHolder* holder);
150s32 getMainScenarioNumMax(GameDataHolderAccessor accessor);
151void setMainScenarioNo(GameDataHolderWriter writer, s32 worldId);
152bool tryGetNextMainScenarioPos(sead::Vector3f*, GameDataHolderAccessor accessor);
153bool isPlayScenarioCamera(GameDataHolderAccessor accessor, const QuestInfo* questInfo);
154bool isPlayAlreadyScenarioStartCamera(GameDataHolderAccessor accessor, s32);
155bool isEnterStageFirst(GameDataHolderAccessor accessor);
156bool isNextMainShine(GameDataHolderAccessor accessor, s32 shineIdx);
157bool isMainShine(GameDataHolderAccessor accessor, s32 shineIdx);
158bool isLatestGetMainShine(GameDataHolderAccessor accessor, const ShineInfo* shineInfo);
159s32 tryFindLinkedShineIndex(const al::LiveActor* actor, const al::ActorInitInfo& initInfo);
160s32 tryFindLinkedShineIndex(const al::LiveActor* actor, const al::ActorInitInfo& initInfo,
161 s32 linkIdx);
162s32 tryFindLinkedShineIndexByLinkName(const al::LiveActor* actor, const al::ActorInitInfo& initInfo,
163 const char* linkName);
164s32 calcLinkedShineNum(const al::LiveActor* actor, const al::ActorInitInfo& initInfo);
165s32 tryFindShineIndex(const al::LiveActor* actor, const al::ActorInitInfo& initInfo);
166s32 tryFindShineIndex(const al::LiveActor* actor, const char* stageName, const char* objId);
167s32 tryFindShineUniqueId(const al::Scene* scene, const ShineInfo* shineInfo);
168void disableHintByShineIndex(const al::LiveActor* actor, s32 shineIdx);
169void enableHintByShineIndex(const al::LiveActor* actor, s32 shineIdx);
170bool calcIsGetMainShineAll(const al::IUseSceneObjHolder* holder);
171bool calcIsGetShineAllInWorld(GameDataHolderAccessor accessor, s32 worldId);
172bool calcIsGetShineAllInAllWorld(GameDataHolderAccessor accessor);
173bool tryFindAndInitShineInfoByOptionalId(ShineInfo* shineInfo, GameDataHolderAccessor accessor,
174 const char* optionalId);
175bool isGotLinkedShineBeforeInitActor(const al::ActorInitInfo& actorInitInfo, const char* linkName);
176bool checkIsComplete(const al::IUseSceneObjHolder* holder, s32 fileId);
177bool isExistInHackDictionary(GameDataHolderAccessor accessor, const char* hackName, s32 fileId);
178s32 getCollectedBgmNum(GameDataHolderAccessor accessor, s32 fileId);
179s32 getCollectedBgmMaxNum(GameDataHolderWriter writer);
180bool isEnableOpenMoonRock(const al::LiveActor* actor);
181void openMoonRock(const al::LiveActor* actor, const al::PlacementId* moonRock);
182bool isOpenMoonRock(GameDataHolderAccessor accessor);
183bool isEnableShowDemoOpenMoonRockFirst(GameDataHolderAccessor accessor);
184bool isEnableShowDemoOpenMoonRockWorld(GameDataHolderAccessor accessor);
185void showDemoOpenMoonRockFirst(GameDataHolderAccessor accessor);
186void showDemoOpenMoonRockWorld(GameDataHolderAccessor accessor);
187s32 calcMoonRockTalkMessageIndex(GameDataHolderAccessor accessor);
188void addMoonRockTalkMessageIndex(GameDataHolderWriter writer);
189bool isAppearedMoonRockTalkMessage(GameDataHolderAccessor accessor);
190void addPayShine(GameDataHolderWriter writer, s32 count);
191void addPayShineCurrentAll(GameDataHolderWriter writer);
192s32 getPayShineNum(GameDataHolderAccessor accessor);
193s32 getPayShineNum(GameDataHolderAccessor accessor, s32 worldId);
194s32 getTotalPayShineNum(GameDataHolderAccessor accessor);
195s32 getTotalPayShineNumClamp(GameDataHolderAccessor accessor);
196bool isPayShineAllInAllWorld(GameDataHolderAccessor accessor);
197void addKey(GameDataHolderWriter writer, s32 count);
198s32 getKeyNum(GameDataHolderAccessor accessor);
199s32 getCurrentKeyNum(GameDataHolderAccessor accessor);
200s32 getOpenDoorLockNum(GameDataHolderAccessor accessor);
201void openDoorLock(GameDataHolderWriter writer, const al::PlacementId* doorLock);
202bool isOpenDoorLock(GameDataHolderAccessor accessor, const al::PlacementId* doorLock);
203void setObjStarted(GameDataHolder* holder, const al::PlacementId* obj);
204bool isObjStarted(const GameDataHolder* holder, const al::PlacementId* obj);
205bool isObjStarted(GameDataHolderAccessor accessor, const char* stageName, const char* objId);
206void saveObjS32(GameDataHolderWriter writer, const al::PlacementId* obj, s32 value);
207bool tryFindSaveObjS32Value(s32* outValue, GameDataHolderAccessor accessor,
208 const al::PlacementId* obj);
209void onObjNoWriteSaveData(GameDataHolderWriter writer, const al::PlacementId* obj);
210void offObjNoWriteSaveData(GameDataHolderWriter writer, const al::PlacementId* obj);
211bool isOnObjNoWriteSaveData(GameDataHolderAccessor accessor, const al::PlacementId* obj);
212void onObjNoWriteSaveDataResetMiniGame(GameDataHolderWriter writer, const al::PlacementId* obj);
213void offObjNoWriteSaveDataResetMiniGame(GameDataHolderWriter writer, const al::PlacementId* obj);
214bool isOnObjNoWriteSaveDataResetMiniGame(GameDataHolderAccessor accessor,
215 const al::PlacementId* obj);
216void onObjNoWriteSaveDataInSameScenario(GameDataHolder* holder, const al::PlacementId* obj);
217bool isOnObjNoWriteSaveDataInSameScenario(const GameDataHolder* holder, const al::PlacementId* obj);
218void setSessionEventProgress(GameDataHolderWriter writer, const SessionEventProgress& progress);
219const SessionEventProgress& getSessionEventProgress(GameDataHolderAccessor accessor);
220bool isPayCoinToSphinx(const al::LiveActor* actor);
221void payCoinToSphinx(const al::LiveActor* actor);
222bool isRemovedCapByJango(const al::LiveActor* actor);
223bool isMainStage(GameDataHolderAccessor accessor);
224bool isGetCapFromJango(const al::LiveActor* actor);
225void removeCapByJango(const al::LiveActor* actor);
226void getCapFromJango(const al::LiveActor* actor);
227void addJangoCount(const al::LiveActor* actor);
228s32 getJangoCount(const al::LiveActor* actor);
229bool isFirstWorldTravelingStatus(const WorldTravelingNpc* actor);
230void saveWorldTravelingStatus(const WorldTravelingNpc* actor, const char* status);
231const char* getWorldTravelingStatus(const WorldTravelingNpc* actor);
232bool isRaceStart(GameDataHolderAccessor accessor);
233bool isRaceStartFlag(GameDataHolderAccessor accessor);
234bool isRaceStartYukimaru(GameDataHolderAccessor accessor);
235bool isRaceStartYukimaruTutorial(GameDataHolderAccessor accessor);
236bool isRaceWin(GameDataHolderAccessor accessor);
237bool isRaceWin(GameDataHolderAccessor accessor, s32);
238bool isRaceResultSecond(GameDataHolderAccessor accessor);
239bool isRaceResultThird(GameDataHolderAccessor accessor);
240bool isRaceLose(GameDataHolderAccessor accessor);
241bool isRaceCancel(GameDataHolderAccessor accessor);
242void winRace(GameDataHolderWriter writer);
243void endRaceResultSecond(GameDataHolderWriter writer);
244void endRaceResultThird(GameDataHolderWriter writer);
245void loseRace(GameDataHolderWriter writer);
246s32 getRaceRivalLevel(const al::LiveActor* actor);
247s32 getRaceRivalLevel(const al::Scene* scene);
248void setRaceRivalLevel(const al::LiveActor* actor, s32 level);
249void setLastRaceRanking(GameDataHolderAccessor accessor, s32 ranking);
250s32 getLastRaceRanking(GameDataHolderWriter writer);
251void incrementRaceLoseCount(const al::Scene* scene, s32 level);
252s32 getRaceLoseCount(const al::LiveActor*, s32 level);
253void addCoinCollect(GameDataHolderWriter writer, const al::PlacementId* coinCollect);
254void useCoinCollect(GameDataHolderWriter writer, s32 count);
255bool isGotCoinCollect(GameDataHolderAccessor accessor, const al::ActorInitInfo& coinCollect);
256s32 getCoinCollectNum(GameDataHolderAccessor accessor);
257s32 getCoinCollectGotNum(GameDataHolderAccessor accessor);
258s32 getCoinCollectGotNum(GameDataHolderAccessor accessor, s32 worldId);
259s32 getCoinCollectNumMax(GameDataHolderAccessor accessor);
260s32 getCoinCollectNumMax(GameDataHolderAccessor accessor, s32 worldId);
261bool tryFindExistCoinCollectStagePosExcludeHomeStageInCurrentWorld(sead::Vector3f* pos,
262 const char**,
263 GameDataHolderAccessor accessor);
264s32 getWorldScenarioNo(GameDataHolderAccessor accessor, s32 worldId);
265void addCoin(GameDataHolderWriter writer, s32 count);
266void subCoin(GameDataHolderWriter writer, s32 count);
267s32 getCoinNum(GameDataHolderAccessor accessor);
268s32 getTotalCoinNum(GameDataHolderAccessor accessor);
269bool isAppearCourseName(GameDataHolderAccessor accessor);
270void setStageHakoniwa(GameDataHolderWriter writer);
271bool isEnableCheckpointWarp(GameDataHolderAccessor accessor);
272void validateCheckpointWarp(GameDataHolderWriter writer);
273void invalidateCheckpointWarp(GameDataHolderWriter writer);
274s32 getCheckpointNumMaxInWorld(GameDataHolderAccessor accessor);
275const sead::Vector3f& getCheckpointTransInWorld(GameDataHolderAccessor accessor, s32 checkpointIdx);
276const char* getCheckpointObjIdInWorld(GameDataHolderAccessor accessor, s32 checkpointIdx);
277const sead::Vector3f& getCheckpointTransInWorld(GameDataHolderAccessor accessor, const char* objId);
278bool isGotCheckpointInWorld(GameDataHolderAccessor accessor, s32 checkpointIdx);
279bool isGotCheckpoint(GameDataHolderAccessor accessor, al::PlacementId* checkpoint);
280s32 calcGotCheckpointNumInWorld(GameDataHolderAccessor accessor);
281void changeNextSceneByGotCheckpoint(GameDataHolderWriter writer, s32 checkpointIdx);
282void changeNextSceneByHome(GameDataHolderWriter writer);
283bool isWarpCheckpoint(GameDataHolderAccessor accessor);
284const char* getCheckpointWarpObjId(GameDataHolderAccessor accessor);
285void registerCheckpointTrans(GameDataHolderWriter writer, const al::PlacementId* checkpoint,
286 const sead::Vector3f& trans);
287bool isEnableUnlockHint(GameDataHolderAccessor accessor);
288void unlockHint(GameDataHolderWriter writer);
289void unlockHintAmiibo(GameDataHolderWriter writer);
290s32 calcHintNum(GameDataHolderAccessor accessor);
291s32 calcRestHintNum(GameDataHolderAccessor accessor);
292bool checkExistHint(GameDataHolderAccessor accessor);
293s32 getHintNumMax(GameDataHolderAccessor accessor);
294const sead::Vector3f& calcHintTrans(GameDataHolderAccessor accessor, s32 hintIdx);
295const sead::Vector3f& getLatestHintTrans(GameDataHolderAccessor accessor);
296bool checkLatestHintSeaOfTree(GameDataHolderAccessor accessor);
297s32 calcHintMoonRockNum(GameDataHolderAccessor accessor);
298s32 getHintMoonRockNumMax(GameDataHolderAccessor accessor);
299const sead::Vector3f& calcHintMoonRockTrans(GameDataHolderAccessor accessor, s32 hintIdx);
300void initializeHintList(GameDataHolderWriter writer);
301const sead::Vector3f& calcHintTransMostEasy(GameDataHolderAccessor accessor);
302bool calcHintTransMostNear(sead::Vector3f* trans, GameDataHolderAccessor accessor,
303 const sead::Vector3f& pos);
304bool checkHintSeaOfTree(GameDataHolderAccessor accessor, s32 hintIdx);
305bool checkHintSeaOfTreeMoonRock(GameDataHolderAccessor accessor, s32 hintIdx);
306s32 findUnlockShineNum(bool* isGameClear, GameDataHolderAccessor accessor);
307s32 findUnlockShineNumByWorldId(bool* isGameClear, GameDataHolderAccessor accessor, s32 worldId);
308bool isUnlockedWorld(GameDataHolderAccessor accessor, s32 worldId);
309bool isUnlockedNextWorld(GameDataHolderAccessor accessor);
310bool isUnlockedAllWorld(GameDataHolderAccessor accessor);
311s32 getWorldIndexSpecial2();
312bool isUnlockedCurrentWorld(GameDataHolderAccessor accessor);
313bool isCollectShineForNextWorldAndNotUnlockNextWorld(const al::LiveActor* actor);
314const char* getMainStageName(GameDataHolderAccessor accessor, s32 worldId);
315const char* tryGetCurrentMainStageName(GameDataHolderAccessor accessor);
316const char16* tryGetWorldName(const al::LayoutActor* layout, s32 worldId);
317const char16* tryGetWorldNameCurrent(const al::LayoutActor* layout);
318const char16* tryGetRegionNameCurrent(const al::LayoutActor* layout);
319const char* getWorldDevelopNameCurrent(GameDataHolderAccessor accessor);
320s32 getWorldScenarioNum(GameDataHolderAccessor accessor, s32 worldId);
321const char* findMainStageNameByDevelopName(GameDataHolderAccessor accessor,
322 const char* developName);
323s32 findWorldIdByDevelopName(GameDataHolderAccessor accessor, const char* developName);
324s32 tryFindWorldIdByMainStageName(const al::Scene* scene, const char* mainStageName);
325s32 tryFindWorldIdByMainStageName(const al::IUseSceneObjHolder* holder, const char* mainStageName);
326bool checkEnableUnlockWorldSpecial1(const al::LiveActor* actor);
327s32 getWorldIndexSpecial1();
328bool checkEnableUnlockWorldSpecial2(const al::LiveActor* actor);
329const char16* tryGetWorldNameByFileId(const al::LayoutActor* layout, s32 fileId);
330bool isNewSaveDataByFileId(const al::LayoutActor*, s32 fileId);
331u64 getLastUpdateFileTime(const al::LayoutActor*, s32 fileId);
332void makeTextureSaveDataFileName(sead::BufferedSafeStringBase<char>* fileName,
333 const nn::g3d::ResFile* textureSaveData,
334 const GameDataHolder* holder, s32 fileId);
335s32 getWorldIndexPeach();
336s32 getWorldIndexCity();
337bool isCityWorldCeremonyAll(s32 worldId, s32 scenarioNo);
338s32 getWorldIndexSea();
339void unlockWorld(GameDataHolderWriter writer, s32 worldId);
340s32 getUnlockWorldIdForWorldMap(const al::LayoutActor* layout, s32 worldId);
341s32 getUnlockWorldIdForWorldMap(const al::LiveActor* actor, s32 worldId);
342s32 getUnlockWorldIdForWorldMap(const al::Scene* scene, s32 worldId);
343s32 getUnlockWorldIdForWorldMap(const GameDataHolder* holder, s32 worldId);
344s32 getUnlockWorldNumForWorldMap(const al::Scene* scene);
345s32 getUnlockWorldNumForWorldMap(const al::LiveActor* actor);
346s32 getUnlockWorldNumForWorldMap(const al::LayoutActor* layout);
347s32 calcNextLockedWorldIdForWorldMap(const al::LayoutActor* layout, s32 worldId);
348s32 calcNextLockedWorldIdForWorldMap(const al::Scene* scene, s32 worldId);
349s32 calcNextLockedWorldNumForWorldMap(const al::Scene* scene);
350s32 calcNextLockedWorldNumForWorldMap(const al::LayoutActor* layout);
351s32 getWorldIdForShineList(const al::LayoutActor* layout, s32 worldId);
352s32 calcWorldNumForShineList(const al::LayoutActor* layout);
353s32 getLatestUnlockWorldIdForShineTowerMeter(const al::LiveActor* actor);
354bool isClearSandWorldScenario1(const al::Scene* scene);
355bool isClearCityWorldScenario1(const al::Scene* scene);
356bool isClearSkyWorldScenario1(const al::Scene* scene);
357bool isCityWorldScenario2(const al::IUseSceneObjHolder* holder);
358bool isWorldCity(GameDataHolderAccessor accessor);
359s32 calcNextWorldId(GameDataHolderAccessor accessor);
360bool isPlayDemoWorldWarp(GameDataHolderAccessor accessor);
361bool isPlayDemoWorldWarpHole(GameDataHolderAccessor accessor);
362void noPlayDemoWorldWarp(GameDataHolderWriter writer);
363bool isPlayDemoReturnToHome(GameDataHolderAccessor accessor);
364void requestPlayDemoReturnToHome(GameDataHolderWriter writer);
365bool isPlayDemoAwardSpecial(GameDataHolderAccessor accessor);
366void requestPlayDemoAwardSpecial(GameDataHolderWriter writer);
367bool isPlayDemoLavaErupt(GameDataHolderAccessor accessor);
368bool isPlayDemoPlayerDownForBattleKoopaAfter(GameDataHolderAccessor accessor);
369void disablePlayDemoPlayerDownForBattleKoopaAfter(GameDataHolderWriter writer);
370void enteredStage(GameDataHolderWriter writer);
371const char* getCurrentCostumeTypeName(GameDataHolderAccessor accessor);
372const char* getCurrentCapTypeName(GameDataHolderAccessor accessor);
373void wearCostume(GameDataHolderWriter writer, const char* costumeName);
374void wearCap(GameDataHolderWriter writer, const char* capName);
375void wearCostumeRandom(al::IUseSceneObjHolder* holder);
376void wearCapRandom(al::IUseSceneObjHolder* holder);
377void tryWearCostumeRandomIfEnable(al::IUseSceneObjHolder* holder);
378bool isCostumeRandomMode(al::IUseSceneObjHolder* holder);
379void tryWearCapRandomIfEnable(al::IUseSceneObjHolder* holder);
380bool isCapRandomMode(al::IUseSceneObjHolder* holder);
381void setCostumeRandomMode(al::IUseSceneObjHolder* holder);
382void setCapRandomMode(al::IUseSceneObjHolder* holder);
383void resetCostumeRandomMode(al::IUseSceneObjHolder* holder);
384void resetCapRandomMode(al::IUseSceneObjHolder* holder);
385const sead::PtrArray<ShopItem::ItemInfo>& getShopItemInfoList(GameDataHolderAccessor accessor);
386bool isExistHackObjInfo(GameDataHolderAccessor accessor, const char* hackName);
387const HackObjInfo& getHackObjInfo(GameDataHolderAccessor accessor, const char* hackName);
388void addHackDictionary(GameDataHolderWriter writer, const char* hackName);
389bool isExistInHackDictionary(GameDataHolderAccessor accessor, const char* hackName);
390bool isShowHackTutorial(GameDataHolderAccessor accessor, const char* hackName, const char* suffix);
391void setShowHackTutorial(GameDataHolderWriter writer, const char* hackName, const char* suffix);
392bool isShowBindTutorial(GameDataHolderAccessor accessor, const BindInfo& bindInfo);
393void setShowBindTutorial(GameDataHolderWriter writer, const BindInfo& bindInfo);
394bool isGotShine(GameDataHolderAccessor accessor, s32 worldId, s32 shineIdx);
395bool isOpenShineName(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
396bool checkAchievementShine(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
397s32 calcShineNumInOneShine(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
398const char16* tryFindShineMessage(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
399const char16* tryFindShineMessage(const al::LiveActor* actor,
400 const al::IUseMessageSystem* messageSystem, s32 worldId,
401 s32 shineIdx);
402u64 findShineGetTime(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
403bool checkMoonRockShineForShineList(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
404bool checkUnlockHintByHintNpcForShineList(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
405bool checkUnlockHintByAmiiboForShineList(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
406bool checkShineSeaOfTreeForShineList(const al::LayoutActor* layout, s32 worldId, s32 shineIdx);
407s32 getWorldTotalShineNum(GameDataHolderAccessor accessor, s32 worldId);
408s32 getWorldTotalShineNumMax(GameDataHolderAccessor accessor, s32 worldId);
409void findShineTrans(sead::Vector3f* trans, GameDataHolderAccessor accessor, s32 worldId,
410 s32 shineIdx);
411const sead::Vector3f& getHomeTrans(GameDataHolderAccessor accessor);
412bool isExistHome(GameDataHolderAccessor accessor);
413bool isActivateHome(GameDataHolderAccessor accessor);
414s32 getMiniGameNum(GameDataHolderAccessor accessor);
415s32 getMiniGameNumMax(GameDataHolderAccessor accessor);
416const sead::Vector3f& getMiniGameTrans(GameDataHolderAccessor accessor, s32 miniGameIdx);
417const char* getMiniGameName(GameDataHolderAccessor accessor, s32 miniGameIdx);
418const sead::Vector3f& getRaceStartTrans(GameDataHolderAccessor accessor);
419const sead::Vector3f& getRaceGoalTrans(GameDataHolderAccessor accessor);
420const sead::Vector3f& getHintNpcTrans(GameDataHolderAccessor accessor);
421const sead::Vector3f& getShopNpcTrans(GameDataHolderAccessor accessor, s32 shopNpcIdx);
422bool isShopSellout(GameDataHolderAccessor accessor, s32 shopNpcIdx);
423s32 calcShopNum(GameDataHolderAccessor accessor);
424s32 getShopNpcIconNumMax(GameDataHolderAccessor accessor);
425bool isExistRaceStartNpc(GameDataHolderAccessor accessor);
426bool isExistHintNpc(GameDataHolderAccessor accessor);
427const sead::Matrix34f& getCurrentMapView(GameDataHolderAccessor accessor);
428bool isExistJango(GameDataHolderAccessor accessor);
429const sead::Vector3f& getJangoTrans(GameDataHolderAccessor accessor);
430bool isExistAmiiboNpc(GameDataHolderAccessor accessor);
431const sead::Vector3f& getAmiiboNpcTrans(GameDataHolderAccessor accessor);
432bool isInInvalidOpenMapStage(GameDataHolderAccessor accessor);
433const sead::Vector3f& getStageMapPlayerPos(GameDataHolderAccessor accessor);
434bool isExistTimeBalloonNpc(GameDataHolderAccessor accessor);
435const sead::Vector3f& getTimeBalloonNpcTrans(GameDataHolderAccessor accessor);
436bool isExistPoetter(GameDataHolderAccessor accessor);
437const sead::Vector3f& getPoetterTrans(GameDataHolderAccessor accessor);
438const sead::Vector3f& getMoonRockTrans(GameDataHolderAccessor accessor);
439void setHomeTrans(const al::LiveActor* actor, const sead::Vector3f& trans);
440void setRaceStartNpcTrans(const al::LiveActor* actor);
441void setRaceStartTrans(const al::LiveActor* actor);
442void setRaceGoalTrans(const al::LiveActor* actor);
443void setHintNpcTrans(const al::LiveActor* actor);
444void setJangoTrans(const al::LiveActor* actor);
445void disableJangoTrans(const al::LiveActor* actor);
446void setAmiiboNpcTrans(const al::LiveActor* actor);
447void setShopNpcTrans(const al::LiveActor* actor, const char* storeName, s32 shopNpcIdx);
448void setShopNpcTrans(GameDataHolderAccessor accessor, const al::PlacementInfo& placementInfo);
449void setMiniGameInfo(GameDataHolderAccessor accessor, const al::PlacementInfo& placementInfo);
450void setTimeBalloonTrans(GameDataHolderAccessor accessor, const sead::Vector3f& trans);
451void setPoetterTrans(GameDataHolderAccessor accessor, const sead::Vector3f& trans);
452void setStageMapPlayerPos(GameDataHolderWriter writer, const sead::Vector3f& trans);
453void setMoonRockTrans(GameDataHolderWriter writer, const sead::Vector3f& trans);
454s32 getHomeLevel(GameDataHolderAccessor accessor);
455void upHomeLevel(GameDataHolderWriter writer);
456void activateHome(GameDataHolderWriter writer);
457bool isLaunchHome(GameDataHolderAccessor accessor);
458void launchHome(GameDataHolderWriter writer);
459bool isCrashHome(GameDataHolderAccessor accessor);
460void crashHome(GameDataHolderWriter writer);
461bool isRepairHome(GameDataHolderAccessor accessor);
462void repairHome(GameDataHolderWriter writer);
463bool isBossAttackedHome(GameDataHolderAccessor accessor);
464void bossAttackHome(GameDataHolderWriter writer);
465bool isRepairHomeByCrashedBoss(GameDataHolderAccessor accessor);
466void repairHomeByCrashedBoss(GameDataHolderWriter writer);
467bool isFindKoopaNext(GameDataHolderAccessor accessor, s32 worldId);
468bool isBossAttackedHomeNext(GameDataHolderAccessor accessor, s32 worldId);
469bool isFindKoopa(GameDataHolderAccessor accessor);
470void findKoopa(GameDataHolderWriter writer);
471bool isEnableCap(GameDataHolderAccessor accessor);
472bool isMeetCap(GameDataHolderAccessor accessor);
473void enableCap(GameDataHolderWriter writer);
474void disableCapByPlacement(const al::LiveActor* actor);
475bool isTalkedCapNearHomeInWaterfall(const al::LiveActor* actor);
476void talkCapNearHomeInWaterfall(const al::LiveActor* actor);
477bool isFlagOnTalkMessageInfo(const al::IUseSceneObjHolder* holder, s32 talkMessageIdx);
478void onFlagTalkMessageInfo(const al::IUseSceneObjHolder* holder, s32 talkMessageIdx);
479s32 getWorldIndexHat();
480s32 getWorldIndexWaterfall();
481s32 getWorldIndexSand();
482s32 getWorldIndexForest();
483s32 getWorldIndexLake();
484s32 getWorldIndexCloud();
485s32 getWorldIndexClash();
486s32 getWorldIndexSnow();
487s32 getWorldIndexLava();
488s32 getWorldIndexBoss();
489s32 getWorldIndexSky();
490s32 getWorldIndexMoon();
491bool isWorldCap(GameDataHolderAccessor accessor);
492bool isWorldWaterfall(GameDataHolderAccessor accessor);
493bool isWorldSand(GameDataHolderAccessor accessor);
494bool isWorldForest(GameDataHolderAccessor accessor);
495bool isWorldLake(GameDataHolderAccessor accessor);
496bool isWorldCloud(GameDataHolderAccessor accessor);
497bool isWorldClash(GameDataHolderAccessor accessor);
498bool isWorldSnow(GameDataHolderAccessor accessor);
499bool isWorldSea(GameDataHolderAccessor accessor);
500bool isWorldBoss(GameDataHolderAccessor accessor);
501bool isWorldSky(GameDataHolderAccessor accessor);
502bool isWorldMoon(GameDataHolderAccessor accessor);
503bool isWorldPeach(GameDataHolderAccessor accessor);
504bool isWorldSpecial1(GameDataHolderAccessor accessor);
505bool isWorldSpecial2(GameDataHolderAccessor accessor);
506bool isWorldTypeMoon(GameDataHolderAccessor accessor, s32 worldId);
507bool isSnowMainScenario1(const al::IUseSceneObjHolder* holder);
508bool isSnowMainScenario2(const al::IUseSceneObjHolder* holder);
509bool isHomeShipStage(const GameDataHolder* holder);
510const char* getHomeShipStageName();
511bool isCityWorldCeremonyAgain(s32 worldId, s32 scenarioNo);
512bool isGoToCeremonyFromInsideHomeShip(GameDataHolderAccessor accessor);
513void registerScenarioStartCameraInfo(const ScenarioStartCamera* cameraInfo, s32,
514 al::CameraTicket* ticket);
515bool isEnableExplainAmiibo(GameDataHolderAccessor accessor);
516void endExplainAmiibo(GameDataHolderWriter writer);
517void startSearchHintByAmiibo(GameDataHolderWriter writer);
518void endSearchHintByAmiibo(GameDataHolderWriter writer);
519void setKidsModeOn(const al::Scene* scene);
520void setKidsModeOff(const al::Scene* scene);
521bool isCollectedBgm(GameDataHolderAccessor accessor, const char* resourceName,
522 const char* situationName);
523const CollectBgm& getCollectBgmByIndex(GameDataHolderAccessor accessor, s32 bgmIdx);
524bool trySetCollectedBgm(GameDataHolderWriter writer, const char* resourceName,
525 const char* situationName);
526s32 getCollectedBgmNum(GameDataHolderWriter writer);
527void registerShineInfo(GameDataHolderAccessor accessor, const ShineInfo* shineInfo,
528 const sead::Vector3f& trans);
529void setHintTrans(GameDataHolderAccessor accessor, s32 shineIdx, const sead::Vector3f& trans);
530void resetHintTrans(GameDataHolderAccessor accessor, s32 shineIdx);
531bool isKoopaLv3(GameDataHolderAccessor accessor);
532} // namespace GameDataFunction
533