3#include "../../CP_SDK/Utils/Delegate.hpp"
4#include "../../CP_SDK/Utils/Il2cpp.hpp"
5#include "../../CP_SDK/Utils/MonoPtr.hpp"
9#include <custom-types/shared/coroutine.hpp>
11#include <GlobalNamespace/AdditionalContentModel.hpp>
12#include <GlobalNamespace/BeatmapCharacteristicCollectionSO.hpp>
13#include <GlobalNamespace/BeatmapCharacteristicSO.hpp>
14#include <GlobalNamespace/BeatmapDifficulty.hpp>
15#include <GlobalNamespace/BeatmapLevelsModel.hpp>
16#include <GlobalNamespace/ColorScheme.hpp>
17#include <GlobalNamespace/IBeatmapLevel.hpp>
18#include <GlobalNamespace/IPreviewBeatmapLevel.hpp>
19#include <GlobalNamespace/LevelCompletionResults.hpp>
20#include <GlobalNamespace/MenuTransitionsHelper.hpp>
21#include <GlobalNamespace/StandardLevelScenesTransitionSetupDataSO.hpp>
22#include <System/Threading/CancellationTokenSource.hpp>
23#include <UnityEngine/Sprite.hpp>
29 using namespace GlobalNamespace;
30 using namespace System::Threading;
31 using namespace UnityEngine;
41 CP_SDK_NO_DEF_CTORS(
Levels);
53 static std::vector<_v::Action<>> m_ReloadSongsCallbacks;
54 static std::mutex m_ReloadSongsCallbacksMutex;
128 static bool TryGetPreviewDifficultyBeatmapSet(_u::IPreviewBeatmapLevel* p_PreviewBeatmapLevel, _u::BeatmapCharacteristicSO* p_BeatmapCharacteristicSO, _u::PreviewDifficultyBeatmapSet** p_PreviewDifficultyBeatmapSet);
152 _u::BeatmapCharacteristicSO* p_BeatmapCharacteristicSO,
153 _u::BeatmapDifficulty p_BeatmapDifficulty,
154 std::vector<std::u16string>* p_CustomRequirements);
175 _u::BeatmapCharacteristicSO* p_Characteristic,
176 _u::BeatmapDifficulty p_Difficulty,
177 _u::OverrideEnvironmentSettings* p_OverrideEnvironmentSettings =
nullptr,
178 _u::ColorScheme* p_ColorScheme =
nullptr,
179 _u::GameplayModifiers* p_GameplayModifiers =
nullptr,
180 _u::PlayerSpecificSettings* p_PlayerSettings =
nullptr,
182 std::u16string_view p_MenuButtonText = u
"Menu");
188 static void GetBeatmapLevelFromLevelID( std::u16string_view p_LevelID,
198 using t_CharacteristicScores = std::vector<std::pair<_u::BeatmapDifficulty, int>>;
199 using t_Scores = std::map<_v::MonoPtr<_u::BeatmapCharacteristicSO>, t_CharacteristicScores>;
206 static t_Scores
GetScoresByLevelID(std::u16string_view p_SongHash,
bool* p_HaveAnyScore,
bool* p_HaveAllScores);
static bool TryGetPreviewBeatmapLevelForLevelID(std::u16string_view p_LevelID, _u::IPreviewBeatmapLevel **p_PreviewBeatmapLevel)
Try to get PreviewBeatmapLevel by level ID.
static bool PreviewDifficultyBeatmapSet_HasDifficulty(_u::PreviewDifficultyBeatmapSet *p_PreviewDifficultyBeatmapSet, _u::BeatmapDifficulty p_Difficulty)
Check if a difficulty is present in a PreviewDifficultyBeatmapSet.
static std::u16string_view BeatmapDifficultySerializedNameToDifficultyNameShort(std::u16string_view p_BeatmapDifficultySerializedName)
BeatmapDifficulty serialized name to difficulty name short.
static std::u16string_view BeatmapDifficultySerializedNameToDifficultyName(std::u16string_view p_BeatmapDifficultySerializedName)
BeatmapDifficulty serialized name to difficulty name.
static float GetAccuracy(int p_MaxScore, int p_Score)
Get accuracy.
static _u::Sprite * GetDefaultPackCover()
Get default pack cover.
static std::u16string_view SanitizeBeatmapCharacteristicSOSerializedName(std::u16string_view p_SerializedName)
Sanitize BeatmapCharacteristicSO serialized name.
static void TryLoadPreviewBeatmapLevelCoverAsync(_u::IPreviewBeatmapLevel *p_PreviewBeatmapLevel, _v::Action< bool, _u::Sprite * > p_Callback)
Try to load PreviewBeatmapLevel cover image async.
static _u::BeatmapDifficulty BeatmapDifficultySerializedNameToBeatmapDifficulty(std::u16string_view p_BeatmapDifficultySerializedName)
BeatmapDifficulty serialized name to BeatmapDifficulty.
static bool LevelID_IsCustom(std::u16string_view p_LevelID)
Is level ID a custom level ID.
static std::u16string SanitizeLevelID(std::u16string_view p_LevelID)
Sanitize a level ID for case matching.
static void OwnDLCLevelByLevelID(std::u16string_view p_LevelID, _v::Action< bool > p_Callback)
Own a DLC level by level ID.
static void StartBeatmapLevel(_u::IBeatmapLevel *p_Level, _u::BeatmapCharacteristicSO *p_Characteristic, _u::BeatmapDifficulty p_Difficulty, _u::OverrideEnvironmentSettings *p_OverrideEnvironmentSettings=nullptr, _u::ColorScheme *p_ColorScheme=nullptr, _u::GameplayModifiers *p_GameplayModifiers=nullptr, _u::PlayerSpecificSettings *p_PlayerSettings=nullptr, _v::Action< _u::StandardLevelScenesTransitionSetupDataSO *, _u::LevelCompletionResults *, _u::IDifficultyBeatmap * > p_SongFinishedCallback=nullptr, std::u16string_view p_MenuButtonText=u"Menu")
Start a BeatmapLevel.
static void PreviewDifficultyBeatmapSets_ForEach(_u::IPreviewBeatmapLevel *p_PreviewBeatmapLevel, _v::CFuncRef< bool, _u::PreviewDifficultyBeatmapSet * > p_Functor)
For each of PreviewDifficultyBeatmapSets for a PreviewBeatmapLevel.
static void ReloadSongs(bool p_Full, _v::CActionRef<> p_Callback=nullptr)
Reload songs.
static bool TryGetBeatmapCharacteristicSOBySerializedName(std::u16string_view p_SerializedName, _u::BeatmapCharacteristicSO **p_BeatmapCharacteristicSO)
Try get BeatmapCharacteristicSO by serialized name.
static bool TryGetHashFromLevelID(std::u16string_view p_LevelID, std::u16string *p_Hash)
Try get hash from level ID.
static t_Scores GetScoresByLevelID(std::u16string_view p_SongHash, bool *p_HaveAnyScore, bool *p_HaveAllScores)
Get scores from local cache for a level id.
static bool TryGetCustomRequirementsFor(_u::IPreviewBeatmapLevel *p_PreviewBeatmapLevel, _u::BeatmapCharacteristicSO *p_BeatmapCharacteristicSO, _u::BeatmapDifficulty p_BeatmapDifficulty, std::vector< std::u16string > *p_CustomRequirements)
Try get custom requirements for a IPreviewBeatmapLevel->BeatmapCharacteristicSO->BeatmapDifficulty.
static void LoadBeatmapLevelByLevelID(std::u16string_view p_LevelID, _v::Action< _v::MonoPtr< _u::IBeatmapLevel, true > > p_LoadCallback)
Load a BeatmapLevel by level ID.
static bool HasMappingCapability(std::u16string_view p_Capability)
Check for mapping capability.
static bool TryGetPreviewDifficultyBeatmapSet(_u::IPreviewBeatmapLevel *p_PreviewBeatmapLevel, _u::BeatmapCharacteristicSO *p_BeatmapCharacteristicSO, _u::PreviewDifficultyBeatmapSet **p_PreviewDifficultyBeatmapSet)
Try get preview difficulty beatmap set by CharacteristicSO.
static std::u16string_view BeatmapDifficultyToBeatmapDifficultyEnumName(_u::BeatmapDifficulty p_BeatmapDifficulty)
BeatmapDifficulty to BeatmapDifficulty enum name.
static int GetBeatmapCharacteristicSOOrdering(std::u16string_view p_SerializedName)
Get ordering value for a BeatmapCharacteristicSO.
Various platform utils like Delegate/Action/Function/Event system.
Game specific helper and utilities.