diff --git a/src/core/file_format/playgo_chunk.cpp b/src/core/file_format/playgo_chunk.cpp index a9bea4a7..a430b1ac 100644 --- a/src/core/file_format/playgo_chunk.cpp +++ b/src/core/file_format/playgo_chunk.cpp @@ -27,7 +27,7 @@ bool PlaygoFile::LoadChunks(const Common::FS::IOFile& file) { if (ret) { chunks.resize(playgoHeader.chunk_count); - + auto chunk_attrs = reinterpret_cast(&chunk_attrs_data[0]); auto chunk_mchunks = reinterpret_cast(&chunk_mchunks_data[0]); @@ -61,7 +61,7 @@ bool PlaygoFile::LoadChunks(const Common::FS::IOFile& file) { } bool PlaygoFile::load_chunk_data(const Common::FS::IOFile& file, const chunk_t& chunk, - std::string& data) { + std::string& data) { if (file.IsOpen()) { if (file.Seek(chunk.offset)) { data.resize(chunk.length); @@ -70,6 +70,6 @@ bool PlaygoFile::load_chunk_data(const Common::FS::IOFile& file, const chunk_t& return true; } } - } + } return false; } \ No newline at end of file diff --git a/src/core/file_format/playgo_chunk.h b/src/core/file_format/playgo_chunk.h index 275312b1..4409d2d1 100644 --- a/src/core/file_format/playgo_chunk.h +++ b/src/core/file_format/playgo_chunk.h @@ -36,8 +36,8 @@ struct PlaygoHeader { chunk_t chunk_attrs; // [0;32000] chunk_t chunk_mchunks; - chunk_t chunk_labels; // [0;16000] - chunk_t mchunk_attrs; // [0;12800] + chunk_t chunk_labels; // [0;16000] + chunk_t mchunk_attrs; // [0;12800] chunk_t scenario_attrs; // [0;1024] chunk_t scenario_chunks; chunk_t scenario_labels; @@ -67,7 +67,7 @@ struct playgo_chunk_attr_entry_t { u16 mchunk_count; u64 language_mask; u32 mchunks_offset; //<-chunk_mchunks - u32 label_offset; //<-chunk_labels + u32 label_offset; //<-chunk_labels } __attribute__((packed)); struct playgo_chunk_loc_t { diff --git a/src/core/libraries/playgo/playgo.cpp b/src/core/libraries/playgo/playgo.cpp index fbd4ca06..66422dc2 100644 --- a/src/core/libraries/playgo/playgo.cpp +++ b/src/core/libraries/playgo/playgo.cpp @@ -103,7 +103,7 @@ s32 PS4_SYSV_ABI scePlayGoGetInstallSpeed(OrbisPlayGoHandle handle, } } *outSpeed = playgo->speed; - + return ORBIS_OK; } @@ -126,8 +126,8 @@ s32 PS4_SYSV_ABI scePlayGoGetLanguageMask(OrbisPlayGoHandle handle, s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoChunkId* chunkIds, uint32_t numberOfEntries, OrbisPlayGoLocus* outLoci) { - LOG_INFO(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", - handle, *chunkIds, numberOfEntries); + LOG_INFO(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", handle, + *chunkIds, numberOfEntries); auto* playgo = Common::Singleton::Instance(); @@ -142,7 +142,7 @@ s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoCh if (playgo->GetPlaygoHeader().file_size == 0) return ORBIS_PLAYGO_ERROR_NOT_SUPPORT_PLAYGO; - for (uint32_t i = 0; i < numberOfEntries; i++) { + for (uint32_t i = 0; i < numberOfEntries; i++) { if (chunkIds[i] <= playgo->chunks.size()) { outLoci[i] = OrbisPlayGoLocusValue::ORBIS_PLAYGO_LOCUS_LOCAL_FAST; } else { @@ -155,8 +155,8 @@ s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoCh s32 PS4_SYSV_ABI scePlayGoGetProgress(OrbisPlayGoHandle handle, const OrbisPlayGoChunkId* chunkIds, uint32_t numberOfEntries, OrbisPlayGoProgress* outProgress) { - LOG_INFO(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", - handle, *chunkIds, numberOfEntries); + LOG_INFO(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", handle, + *chunkIds, numberOfEntries); auto* playgo = Common::Singleton::Instance(); @@ -192,8 +192,7 @@ s32 PS4_SYSV_ABI scePlayGoGetProgress(OrbisPlayGoHandle handle, const OrbisPlayG s32 PS4_SYSV_ABI scePlayGoGetToDoList(OrbisPlayGoHandle handle, OrbisPlayGoToDo* outTodoList, u32 numberOfEntries, u32* outEntries) { - LOG_INFO(Lib_PlayGo, "called handle = {} numberOfEntries = {}", handle, - numberOfEntries); + LOG_INFO(Lib_PlayGo, "called handle = {} numberOfEntries = {}", handle, numberOfEntries); auto* playgo = Common::Singleton::Instance(); @@ -233,8 +232,7 @@ s32 PS4_SYSV_ABI scePlayGoInitialize(OrbisPlayGoInitParams* param) { sceSystemServiceParamGetInt(ORBIS_SYSTEM_SERVICE_PARAM_ID_LANG, &systemLang); playgo->langMask = scePlayGoConvertLanguage(systemLang); playgo->initialized = true; - } - else { + } else { return ORBIS_PLAYGO_ERROR_ALREADY_INITIALIZED; } return ORBIS_OK; diff --git a/src/core/libraries/playgo/playgo.h b/src/core/libraries/playgo/playgo.h index 9b77bd7a..f5ae1baa 100644 --- a/src/core/libraries/playgo/playgo.h +++ b/src/core/libraries/playgo/playgo.h @@ -19,7 +19,8 @@ s32 PS4_SYSV_ABI scePlayGoGetChunkId(OrbisPlayGoHandle handle, OrbisPlayGoChunkI u32 numberOfEntries, u32* outEntries); s32 PS4_SYSV_ABI scePlayGoGetEta(OrbisPlayGoHandle handle, const OrbisPlayGoChunkId* chunkIds, u32 numberOfEntries, OrbisPlayGoEta* outEta); -s32 PS4_SYSV_ABI scePlayGoGetInstallSpeed(OrbisPlayGoHandle handle, OrbisPlayGoInstallSpeed* outSpeed); +s32 PS4_SYSV_ABI scePlayGoGetInstallSpeed(OrbisPlayGoHandle handle, + OrbisPlayGoInstallSpeed* outSpeed); s32 PS4_SYSV_ABI scePlayGoGetLanguageMask(OrbisPlayGoHandle handle, OrbisPlayGoLanguageMask* outLanguageMask); s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoChunkId* chunkIds,