RhythmGame 1.4.3
Loading...
Searching...
No Matches
Namespaces | Classes | Functions | Variables
resource_managers Namespace Reference

Classes and functions related to loading and managing resources such as charts, sounds, images, etc. More...

Namespaces

namespace  dp_options
 
namespace  gauge_mode
 
namespace  hi_speed_fix
 
namespace  lr2_skin
 
namespace  note_order_algorithm
 
namespace  score_target
 
namespace  select_keymode_filter
 
namespace  select_sort_mode
 

Classes

class  ArenaTicketOperation
 
class  AvatarImageProvider
 
class  BackbeatCatalog
 
class  BackbeatSource
 
struct  BgaResources
 
class  ChartDataFactory
 
class  ChartFactory
 
class  ChartFolderModel
 
struct  ChartPlayConfig
 
class  ConfigWriter
 
struct  Course
 
class  DxaImageProvider
 
struct  Entry
 
class  ExactRandomSequence
 
class  GaugeFactory
 
class  GeneralVars
 The general variables for the game that all screens and the engine should know about and respect. Profile-specific. More...
 
class  IniImageProvider
 
class  Languages
 Manages the available languages and the selected language. More...
 
struct  Level
 
class  Lr2FontCache
 
struct  Lr2FontDict
 
struct  Lr2FontGlyph
 
class  Lr2FontImageProvider
 
struct  Lr2RenderedFontText
 
class  OnlineUserData
 
class  Profile
 
struct  RandomizedData
 
class  SongAssetImageProvider
 
class  SongAssetStore
 
class  SongDbScanner
 
class  SoundTask
 
struct  Table
 
struct  TableInfo
 
class  Tables
 Manages the download and storage of tables from given URLs. More...
 
class  TachiData
 
struct  Trophy
 
class  Vars
 

Functions

template<typename Func >
auto withMappedFile (const std::filesystem::path &path, Func &&func) -> decltype(func(std::string_view{}))
 
auto readAndParse (std::string_view chart, ChartDataFactory::RandomGenerator randomGenerator)
 
QList< QList< qint64 > > createHistogram (const charts::BmsNotesData &calculatedNotesData, std::chrono::nanoseconds lastNoteTimestamp, size_t numBuckets)
 
auto prepareBmp (QImage image) -> QImage
 
auto loadBmp (std::filesystem::path path) -> QImage
 
auto loadBmp (const QByteArrayView encoded) -> QImage
 
auto loadBmpVideo (const std::filesystem::path &path, std::stop_token stop) -> std::unique_ptr< QMediaPlayer >
 
auto prepareBga (std::array< BgaResources::Track, 4 > tracks, std::unordered_map< uint64_t, std::filesystem::path > bmps, const std::filesystem::path &path, SongAssetStore *assetStore, std::stop_token stop) -> BgaResources
 
auto finishBga (BgaResources resources, std::stop_token stop) -> std::unique_ptr< qml_components::BgaContainer >
 
auto createAutoplayFromNotes (const gameplay_logic::BmsNotes &notes) -> std::vector< gameplay_logic::HitEvent >
 
void defineDb (db::SqliteCppDb &db)
 
auto findDataFolder () -> std::filesystem::path
 
auto selectGauges (Profile *profile, std::vector< std::unique_ptr< gameplay_logic::rules::BmsGauge > > gauges) -> QList< gameplay_logic::rules::BmsGauge * >
 
auto scanThemes (std::filesystem::path themesFolder) -> QMap< QString, qml_components::ThemeFamily >
 
void fillWithDefaults (QQmlPropertyMap &object, const QMap< QString, qml_components::ThemeFamily > &themes)
 
auto readJsonConfig (const std::filesystem::path &path) -> QJsonObject
 
void writeJsonConfig (const std::filesystem::path &path, QJsonObject values, bool merge)
 
auto writeConfig (const std::filesystem::path &path, QQmlPropertyMap &object) -> void
 
auto readConfig (const std::filesystem::path &path, QQmlPropertyMap &object, const QMap< QString, qml_components::ThemeFamily > &themeFamilies) -> void
 
int64_t addDirToParentDirs (db::SqliteCppDb &db, QString root, QString folder)
 
void loadChart (QThreadPool &threadPool, db::SqliteCppDb &db, int64_t directory, const std::filesystem::path &path, std::function< void(QString)> updateCurrentScannedFolder, std::atomic_bool *stop)
 
void loadArchivedChart (QThreadPool &threadPool, db::SqliteCppDb &db, int64_t directory, const std::filesystem::path &virtualPath, QByteArray contents, std::function< void(QString)> updateCurrentScannedFolder, std::atomic_bool *stop)
 
void addSongDirectoryFileToDb (db::SqliteCppDb &db, const char *table, const char *label, const std::filesystem::path &directory, const std::filesystem::path &path)
 
void addPreviewFileToDb (db::SqliteCppDb &db, const std::filesystem::path &directory, const std::filesystem::path &path)
 
void addReadmeFileToDb (db::SqliteCppDb &db, const std::filesystem::path &directory, const std::filesystem::path &path)
 
auto lowercaseExtension (const std::filesystem::path &path) -> std::string
 
auto fileNameStartsWithDot (const std::filesystem::path &path) -> bool
 
auto isReadmeCandidate (const std::filesystem::path &path) -> bool
 
auto isChartCandidate (const std::filesystem::path &path) -> bool
 
auto isPreviewCandidate (const std::filesystem::path &path) -> bool
 
void scanSongArchive (const std::filesystem::path &archivePath, QThreadPool &threadPool, db::SqliteCppDb &db, SongAssetStore &assetStore, const QString &root, const std::function< void(QString)> &updateCurrentScannedFolder, std::atomic_bool *stop)
 
void scanFolder (const std::filesystem::path &directory, const std::filesystem::path &parentDirectory, QThreadPool &threadPool, db::SqliteCppDb &db, SongAssetStore &assetStore, const QString &root, const std::function< void(QString)> &updateCurrentScannedFolder, std::vector< llfio::directory_handle::buffer_type > &buffer, std::atomic_bool *stop)
 
void validateThemeSettings (const std::filesystem::path &themePath, const std::filesystem::path &settingsPath)
 

Variables

constexpr auto chartRandomizationVersion = 1
 

Detailed Description

Classes and functions related to loading and managing resources such as charts, sounds, images, etc.

Some of them are exposed to QML, some are not.

Function Documentation

◆ addDirToParentDirs()

int64_t resource_managers::addDirToParentDirs ( db::SqliteCppDb &  db,
QString  root,
QString  folder 
)

◆ addPreviewFileToDb()

void resource_managers::addPreviewFileToDb ( db::SqliteCppDb &  db,
const std::filesystem::path &  directory,
const std::filesystem::path &  path 
)

◆ addReadmeFileToDb()

void resource_managers::addReadmeFileToDb ( db::SqliteCppDb &  db,
const std::filesystem::path &  directory,
const std::filesystem::path &  path 
)

◆ addSongDirectoryFileToDb()

void resource_managers::addSongDirectoryFileToDb ( db::SqliteCppDb &  db,
const char *  table,
const char *  label,
const std::filesystem::path &  directory,
const std::filesystem::path &  path 
)

◆ createAutoplayFromNotes()

auto resource_managers::createAutoplayFromNotes ( const gameplay_logic::BmsNotes &  notes) -> std::vector<gameplay_logic::HitEvent>

◆ createHistogram()

QList< QList< qint64 > > resource_managers::createHistogram ( const charts::BmsNotesData &  calculatedNotesData,
std::chrono::nanoseconds  lastNoteTimestamp,
size_t  numBuckets 
)

◆ defineDb()

void resource_managers::defineDb ( db::SqliteCppDb &  db)

◆ fileNameStartsWithDot()

auto resource_managers::fileNameStartsWithDot ( const std::filesystem::path &  path) -> bool

◆ fillWithDefaults()

void resource_managers::fillWithDefaults ( QQmlPropertyMap &  object,
const QMap< QString, qml_components::ThemeFamily > &  themes 
)

◆ findDataFolder()

auto resource_managers::findDataFolder ( ) -> std::filesystem::path

◆ finishBga()

auto resource_managers::finishBga ( BgaResources  resources,
std::stop_token  stop 
) -> std::unique_ptr<qml_components::BgaContainer>

◆ isChartCandidate()

auto resource_managers::isChartCandidate ( const std::filesystem::path &  path) -> bool

◆ isPreviewCandidate()

auto resource_managers::isPreviewCandidate ( const std::filesystem::path &  path) -> bool

◆ isReadmeCandidate()

auto resource_managers::isReadmeCandidate ( const std::filesystem::path &  path) -> bool

◆ loadArchivedChart()

void resource_managers::loadArchivedChart ( QThreadPool &  threadPool,
db::SqliteCppDb &  db,
int64_t  directory,
const std::filesystem::path &  virtualPath,
QByteArray  contents,
std::function< void(QString)>  updateCurrentScannedFolder,
std::atomic_bool *  stop 
)

◆ loadBmp() [1/2]

auto resource_managers::loadBmp ( const QByteArrayView  encoded) -> QImage

◆ loadBmp() [2/2]

auto resource_managers::loadBmp ( std::filesystem::path  path) -> QImage

◆ loadBmpVideo()

auto resource_managers::loadBmpVideo ( const std::filesystem::path &  path,
std::stop_token  stop 
) -> std::unique_ptr<QMediaPlayer>

◆ loadChart()

void resource_managers::loadChart ( QThreadPool &  threadPool,
db::SqliteCppDb &  db,
int64_t  directory,
const std::filesystem::path &  path,
std::function< void(QString)>  updateCurrentScannedFolder,
std::atomic_bool *  stop 
)

◆ lowercaseExtension()

auto resource_managers::lowercaseExtension ( const std::filesystem::path &  path) -> std::string

◆ prepareBga()

auto resource_managers::prepareBga ( std::array< BgaResources::Track, 4 >  tracks,
std::unordered_map< uint64_t, std::filesystem::path >  bmps,
const std::filesystem::path &  path,
SongAssetStore *  assetStore,
std::stop_token  stop 
) -> BgaResources

◆ prepareBmp()

auto resource_managers::prepareBmp ( QImage  image) -> QImage

◆ readAndParse()

auto resource_managers::readAndParse ( std::string_view  chart,
ChartDataFactory::RandomGenerator  randomGenerator 
)

◆ readConfig()

auto resource_managers::readConfig ( const std::filesystem::path &  path,
QQmlPropertyMap &  object,
const QMap< QString, qml_components::ThemeFamily > &  themeFamilies 
) -> void

◆ readJsonConfig()

auto resource_managers::readJsonConfig ( const std::filesystem::path &  path) -> QJsonObject

◆ scanFolder()

void resource_managers::scanFolder ( const std::filesystem::path &  directory,
const std::filesystem::path &  parentDirectory,
QThreadPool &  threadPool,
db::SqliteCppDb &  db,
SongAssetStore &  assetStore,
const QString &  root,
const std::function< void(QString)> &  updateCurrentScannedFolder,
std::vector< llfio::directory_handle::buffer_type > &  buffer,
std::atomic_bool *  stop 
)

◆ scanSongArchive()

void resource_managers::scanSongArchive ( const std::filesystem::path &  archivePath,
QThreadPool &  threadPool,
db::SqliteCppDb &  db,
SongAssetStore &  assetStore,
const QString &  root,
const std::function< void(QString)> &  updateCurrentScannedFolder,
std::atomic_bool *  stop 
)

◆ scanThemes()

auto resource_managers::scanThemes ( std::filesystem::path  themesFolder) -> QMap<QString, qml_components::ThemeFamily>

◆ selectGauges()

auto resource_managers::selectGauges ( Profile *  profile,
std::vector< std::unique_ptr< gameplay_logic::rules::BmsGauge > >  gauges 
) -> QList<gameplay_logic::rules::BmsGauge*>

◆ validateThemeSettings()

void resource_managers::validateThemeSettings ( const std::filesystem::path &  themePath,
const std::filesystem::path &  settingsPath 
)

◆ withMappedFile()

template<typename Func >
auto resource_managers::withMappedFile ( const std::filesystem::path &  path,
Func &&  func 
) -> decltype(func(std::string_view{}))

◆ writeConfig()

auto resource_managers::writeConfig ( const std::filesystem::path &  path,
QQmlPropertyMap &  object 
) -> void

◆ writeJsonConfig()

void resource_managers::writeJsonConfig ( const std::filesystem::path &  path,
QJsonObject  values,
bool  merge 
)

Variable Documentation

◆ chartRandomizationVersion

constexpr auto resource_managers::chartRandomizationVersion = 1
inlineconstexpr