From 42e1bad3d2dfb2a054437e266ebab9c36686f098 Mon Sep 17 00:00:00 2001 From: boykopovar Date: Sun, 13 Sep 2026 10:30:13 +0300 Subject: [PATCH] refactor(libs): move NpTrophy2 types from global SceTypes to libSceNpTrophy2 --- core/libs/SceTypes.hpp | 61 ---------------- .../prx/libSceNpTrophy2/src/NpTrophy2.hpp | 1 + .../libSceNpTrophy2/src/NpTrophy2Types.hpp | 70 +++++++++++++++++++ 3 files changed, 71 insertions(+), 61 deletions(-) create mode 100644 core/libs/prx/libSceNpTrophy2/src/NpTrophy2Types.hpp diff --git a/core/libs/SceTypes.hpp b/core/libs/SceTypes.hpp index 94ef4354f..c6fe8de1b 100644 --- a/core/libs/SceTypes.hpp +++ b/core/libs/SceTypes.hpp @@ -1423,68 +1423,7 @@ struct NpEntitlementAccessAddcontEntitlementInfo { std::uint32_t download_status; }; -struct NpTrophy2Progress { std::uint32_t value; }; -struct NpTrophy2GameDetails { - std::uint32_t num_groups; - std::uint32_t num_trophies; - std::uint32_t num_platinum; - std::uint32_t num_gold; - std::uint32_t num_silver; - std::uint32_t num_bronze; - char title[128]; -}; - -struct NpTrophy2GameData { - std::uint32_t unlocked_trophies; - std::uint32_t unlocked_platinum; - std::uint32_t unlocked_gold; - std::uint32_t unlocked_silver; - std::uint32_t unlocked_bronze; - std::uint32_t progress_percentage; -}; - -struct NpTrophy2GroupDetails { - std::int32_t group_id; - std::uint32_t num_trophies; - std::uint32_t num_platinum; - std::uint32_t num_gold; - std::uint32_t num_silver; - std::uint32_t num_bronze; - char title[128]; -}; - -struct NpTrophy2GroupData { - std::int32_t group_id; - std::uint32_t unlocked_trophies; - std::uint32_t unlocked_platinum; - std::uint32_t unlocked_gold; - std::uint32_t unlocked_silver; - std::uint32_t unlocked_bronze; - std::uint32_t progress_percentage; - std::uint8_t reserved[4]; -}; - -struct NpTrophy2Details { - std::int32_t trophy_id; - std::int32_t trophy_grade; - std::int32_t group_id; - bool hidden; - bool has_reward; - std::uint8_t reserved2[2]; - NpTrophy2Progress target; - char name[128]; - char description[1024]; - char reward[128]; -}; - -struct NpTrophy2Data { - std::int32_t trophy_id; - bool unlocked; - std::uint8_t reserved[3]; - NpTrophy2Progress progress; - std::uint64_t timestamp_tick; -}; struct NpUniversalDataSystemInitParam { std::size_t size; diff --git a/core/libs/prx/libSceNpTrophy2/src/NpTrophy2.hpp b/core/libs/prx/libSceNpTrophy2/src/NpTrophy2.hpp index 055d5c711..2980e3e1d 100644 --- a/core/libs/prx/libSceNpTrophy2/src/NpTrophy2.hpp +++ b/core/libs/prx/libSceNpTrophy2/src/NpTrophy2.hpp @@ -4,6 +4,7 @@ #include #include +#include "NpTrophy2Types.hpp" #include "SceTypes.hpp" #endif diff --git a/core/libs/prx/libSceNpTrophy2/src/NpTrophy2Types.hpp b/core/libs/prx/libSceNpTrophy2/src/NpTrophy2Types.hpp new file mode 100644 index 000000000..30fadecda --- /dev/null +++ b/core/libs/prx/libSceNpTrophy2/src/NpTrophy2Types.hpp @@ -0,0 +1,70 @@ +#ifndef CORE_LIBS_SCE_NP_TROPHY2_TYPES_HPP +#define CORE_LIBS_SCE_NP_TROPHY2_TYPES_HPP + +#include +#include + +struct NpTrophy2Progress { std::uint32_t value; }; + +struct NpTrophy2GameDetails { + std::uint32_t num_groups; + std::uint32_t num_trophies; + std::uint32_t num_platinum; + std::uint32_t num_gold; + std::uint32_t num_silver; + std::uint32_t num_bronze; + char title[128]; +}; + +struct NpTrophy2GameData { + std::uint32_t unlocked_trophies; + std::uint32_t unlocked_platinum; + std::uint32_t unlocked_gold; + std::uint32_t unlocked_silver; + std::uint32_t unlocked_bronze; + std::uint32_t progress_percentage; +}; + +struct NpTrophy2GroupDetails { + std::int32_t group_id; + std::uint32_t num_trophies; + std::uint32_t num_platinum; + std::uint32_t num_gold; + std::uint32_t num_silver; + std::uint32_t num_bronze; + char title[128]; +}; + +struct NpTrophy2GroupData { + std::int32_t group_id; + std::uint32_t unlocked_trophies; + std::uint32_t unlocked_platinum; + std::uint32_t unlocked_gold; + std::uint32_t unlocked_silver; + std::uint32_t unlocked_bronze; + std::uint32_t progress_percentage; + std::uint8_t reserved[4]; +}; + +struct NpTrophy2Details { + std::int32_t trophy_id; + std::int32_t trophy_grade; + std::int32_t group_id; + bool hidden; + bool has_reward; + std::uint8_t reserved2[2]; + NpTrophy2Progress target; + char name[128]; + char description[1024]; + char reward[128]; +}; + +struct NpTrophy2Data { + std::int32_t trophy_id; + bool unlocked; + std::uint8_t reserved[3]; + NpTrophy2Progress progress; + std::uint64_t timestamp_tick; +}; + +#endif