-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing structure definitions, fix existing. #213
base: master
Are you sure you want to change the base?
Changes from 6 commits
eff2931
d51f3c8
00e7e5e
aa43955
4b44a3f
0d2dc6c
4d2ed72
8df6a34
24897c3
0dff13c
fb3f088
7047d4b
82ee4b7
4424cd9
a70028f
0b6555f
03b1d82
3984d83
5153a13
366cc0f
f88be88
edef451
b9ffada
cee9e9a
9b9e82a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,105 @@ | ||
#pragma once | ||
|
||
#include <orbis/_types/rtc.h> | ||
|
||
typedef struct OrbisNpTrophyDetails { | ||
size_t size; // this needs to be set with sizeof(OrbisNpTrophyDetails) or any function that calls with this data will return a error | ||
int32_t TRPID; // Trophy ID, 0-XXXX | ||
int32_t Unk00; // Unkown data | ||
int32_t Unk01; // Unkown data | ||
bool HiddenFromView; // this determans if you can see the trophy before its unlocked | ||
char Unk02[3]; // Unkown data | ||
char TrophyName[128]; // Trophy Name, EX: "UNLOCK ME" | ||
char TrophyDetails[1024]; // Description, EX: "This is what needs to be unlocked" | ||
/* Np Trophy */ | ||
|
||
typedef struct OrbisNpTrophyFlagArray | ||
{ | ||
uint32_t bits[128 >> 5]; | ||
} OrbisNpTrophyFlagArray; | ||
|
||
typedef struct OrbisNpTrophyGameDetails | ||
{ | ||
size_t size; // This needs to be set with sizeof(OrbisNpTrophyGameDetails) or any function that takes this structure as a parameter will return a error(0x80551604) | ||
uint32_t numGroups; | ||
uint32_t numTrophies; | ||
uint32_t numPlatinum; | ||
uint32_t numGold; | ||
uint32_t numSilver; | ||
uint32_t numBronze; | ||
char title[128]; | ||
char description[1024]; | ||
} OrbisNpTrophyGameDetails; | ||
|
||
typedef struct OrbisNpTrophyGameData | ||
{ | ||
size_t size; // This needs to be set with sizeof(OrbisNpTrophyGameData) or any function that takes this structure as a parameter will return a error(0x80551604) | ||
uint32_t unlockedTrophies; | ||
uint32_t unlockedPlatinum; | ||
uint32_t unlockedGold; | ||
uint32_t unlockedSilver; | ||
uint32_t unlockedBronze; | ||
uint32_t progressPercentage; | ||
} OrbisNpTrophyGameData; | ||
|
||
typedef struct OrbisNpTrophyGroupDetails | ||
{ | ||
size_t size; // This needs to be set with sizeof(OrbisNpTrophyGroupDetails) or any function that takes this structure as a parameter will return a error(0x80551604) | ||
int32_t groupId; | ||
uint32_t numTrophies; | ||
uint32_t numPlatinum; | ||
uint32_t numGold; | ||
uint32_t numSilver; | ||
uint32_t numBronze; | ||
char title[128]; | ||
char description[1024]; | ||
} OrbisNpTrophyGroupDetails; | ||
|
||
typedef struct OrbisNpTrophyGroupData | ||
{ | ||
size_t size; // This needs to be set with sizeof(OrbisNpTrophyGroupData) or any function that takes this structure as a parameter will return a error(0x80551604) | ||
int32_t groupId; | ||
uint32_t unlockedTrophies; | ||
uint32_t unlockedPlatinum; | ||
uint32_t unlockedGold; | ||
uint32_t unlockedSilver; | ||
uint32_t unlockedBronze; | ||
uint32_t progressPercentage; | ||
uint8_t UNK00[4]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use lowerCamcelCase here |
||
} OrbisNpTrophyGroupData; | ||
|
||
// | ||
typedef struct OrbisNpTrophyDetails | ||
{ | ||
size_t size; // This needs to be set with sizeof(OrbisNpTrophyDetails) or any function that takes this structure as a parameter will return a error(0x80551604) | ||
int32_t trophyId; // Trophy ID, 1-XXXX(0 should be the Platinum Trophy) | ||
int32_t trophyGrade; // gold/silver/bronze/Platinum | ||
int32_t groupId; // group where the trophy is located(normally 0 for single group trophy packs, depending on how many trophies exists and are split into groups inside the pack this could rage from 0 - xxxx) | ||
bool hidden; // this determines if you can see the trophy before its unlocked(hidden flagged trophys will not allow you to see the description until you have unlcoked them) | ||
char Unk02[3]; // Unkown data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use lowerCamelCase here |
||
char name[128]; // Trophy Name, EX: "UNLOCK ME" | ||
char description[1024]; // Description, EX: "This is what needs to be unlocked" | ||
} OrbisNpTrophyDetails; | ||
|
||
typedef struct OrbisNpTrophyData { | ||
size_t size; // this needs to be set with sizeof(OrbisNpTrophyDetails) or any function that calls with this data will return a error | ||
int32_t TRPID; // Trophy ID, 0-XX for loarge scope trophy sets | ||
bool IsUnlocked; // flag that tells if the trophy is locked or unlocked | ||
char Unk00[3]; // Unkown | ||
OrbisRtcTick Timecode; // time when the Trophy was unlocked | ||
// | ||
typedef struct OrbisNpTrophyData | ||
{ | ||
size_t size; // this needs to be set with sizeof(OrbisNpTrophyData) or any function that takes this structure as a parameter will return a error(0x80551604) | ||
int32_t trophyId; // Trophy ID, 1-XXXX(0 should be the Platinum Trophy) | ||
bool unlocked; // flag that tells if the user has unlocked the Trophy) | ||
char Unk00[3]; // likely padding, not sure why they didn't make unlocked a 32-bit value and swap a single bit for it, it would make it automaticlly alligned. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use lowerCamelCase here |
||
OrbisRtcTick timestamp; // RTC time stamp of when the trophy is unlocked(this isn't fully accurate due to the RTC drifting, it can be off anywhere from +1 second to a whole minute+ behind.) | ||
} OrbisNpTrophyData; | ||
|
||
typedef struct OrbisNpOnlineId { | ||
char data[16]; // account name, follows PSN schema, min 3/max 16 | ||
char term; // terminator, always '\0'? | ||
uint8_t UNK[3]; // Unkown, probably reserved? | ||
|
||
typedef struct OrbisNpTrophyScreenshotTarget | ||
{ | ||
int32_t context; // same context that comes form sceNpTrophyCreateContext once created. | ||
int32_t trophyId; // Trophy ID, 1-XXXX(0 should be the Platinum Trophy) | ||
} OrbisNpTrophyScreenshotTarget; | ||
|
||
/* Np Online*/ | ||
// | ||
typedef struct OrbisNpOnlineId | ||
{ | ||
char data[16]; // account name, follows PSN schema, min 3/max 16 | ||
char term; // terminator, always '\0'? | ||
uint8_t UNK[3]; // Unkown, probably reserved/padding? | ||
} OrbisNpOnlineId; | ||
|
||
typedef struct OrbisNpId { | ||
OrbisNpOnlineId handle; // online info | ||
uint8_t Unk20[8]; // could be uint64_t? | ||
uint8_t Unk28[8]; // could be uint64_t? | ||
// | ||
typedef struct OrbisNpId | ||
{ | ||
OrbisNpOnlineId handle; | ||
uint8_t Unk20[8]; | ||
uint8_t Unk28[8]; | ||
} OrbisNpId; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
typedef struct OrbisRtcTick { | ||
#include <stdint.h> | ||
|
||
typedef struct OrbisRtcTick | ||
{ | ||
uint64_t Ticks; | ||
} OrbisRtcTick; | ||
|
||
typedef struct OrbisRtcDateTime | ||
{ | ||
uint16_t year; | ||
uint16_t month; | ||
uint16_t day; | ||
uint16_t hour; | ||
uint16_t minute; | ||
uint16_t second; | ||
uint32_t microsecond; | ||
} OrbisRtcDateTime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be just
handle
nota_
prefix