wut  v1.7.0
Wii U Toolchain
pdm_cpp.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 
11 #ifdef __cplusplus
12 
13 namespace nn {
14 
15 namespace pdm {
16 
18 typedef enum PlayDiaryFlags : uint16_t
19 {
21 
27 WUT_CHECK_SIZE(PlayDiaryFlags, 0x02);
28 
30 struct WUT_PACKED PlayDiary
31 {
33  uint64_t title_id;
35  uint32_t playtime;
37  uint16_t date;
40 };
41 WUT_CHECK_OFFSET(PlayDiary, 0x00, title_id);
42 WUT_CHECK_OFFSET(PlayDiary, 0x08, playtime);
43 WUT_CHECK_OFFSET(PlayDiary, 0x0c, date);
44 WUT_CHECK_OFFSET(PlayDiary, 0x0e, flags);
45 
47 struct WUT_PACKED PlayStats
48 {
50  uint64_t title_id;
52  uint32_t playtime;
54  uint16_t times_played;
58  uint16_t last_time_played;
59 
61  WUT_UNKNOWN_BYTES(2);
62 };
63 WUT_CHECK_OFFSET(PlayStats, 0x00, title_id);
64 WUT_CHECK_OFFSET(PlayStats, 0x08, playtime);
65 WUT_CHECK_OFFSET(PlayStats, 0x0c, times_played);
66 WUT_CHECK_OFFSET(PlayStats, 0x0e, first_time_played);
67 WUT_CHECK_OFFSET(PlayStats, 0x10, last_time_played);
68 
70 struct WUT_PACKED PlayEvent
71 {
72  uint64_t title_id;
73  WUT_UNKNOWN_BYTES(12);
74 };
75 WUT_CHECK_OFFSET(PlayEvent, 0x00, title_id);
76 
78 struct WUT_PACKED PlayLog
79 {
80  uint64_t title_id;
81  WUT_UNKNOWN_BYTES(16);
82 };
83 WUT_CHECK_OFFSET(PlayLog, 0x00, title_id);
84 
92 uint32_t
94  asm("Initialize__Q2_2nn3pdmFv");
95 
99 void
101  asm("Finalize__Q2_2nn3pdmFv");
102 
106 void
108  asm("CloseAllFiles__Q2_2nn3pdmFv");
109 
116 uint32_t
117 Convert(uint32_t userId)
118  asm("Convert__Q2_2nn3pdmFi");
119 
126 uint32_t
128  asm("WaitForConvertDone__Q2_2nn3pdmFv");
129 
140 uint32_t
141 GetPlayDiaryMaxLength(uint32_t* outMaxLength)
142  asm("GetPlayDiaryMaxLength__Q2_2nn3pdmFPi");
143 
156 uint32_t
157 GetPlayDiaryLength(uint32_t* outLength, uint32_t userId)
158  asm("GetPlayDiaryLength__Q2_2nn3pdmFPii");
159 
172 uint32_t
173 GetPlayDiaryStart(uint32_t* outStart, uint32_t userId)
174  asm("GetPlayDiaryStart__Q2_2nn3pdmFPii");
175 
197 uint32_t
198 GetPlayDiary(uint32_t* outAmount, PlayDiary* outPlayDiaries, uint32_t userId, uint32_t amount)
199  asm("GetPlayDiary__Q2_2nn3pdmFPiPQ3_2nn3pdm9PlayDiaryiT3");
200 
219 uint32_t
220 GetPlayDiary(PlayDiary* outPlayDiaries, uint32_t userId, uint32_t amount)
221  asm("GetPlayDiary__Q2_2nn3pdmFPQ3_2nn3pdm9PlayDiaryiT2");
222 
233 uint32_t
234 GetPlayEventMaxLength(uint32_t* outMaxLength)
235  asm("GetPlayEventMaxLength__Q2_2nn3pdmFPi");
236 
258 uint32_t
259 GetPlayEvent(uint32_t* outAmount, PlayEvent* outPlayEvents, uint32_t userId, uint32_t amount)
260  asm("GetPlayEvent__Q2_2nn3pdmFPiPQ3_2nn3pdm9PlayEventiT3");
261 
272 uint32_t
273 GetPlayLogMaxLength(uint32_t* outMaxLength)
274  asm("GetPlayLogMaxLength__Q2_2nn3pdmFPi");
275 
288 uint32_t
289 GetPlayLogLength(uint32_t* outLength, uint32_t userId)
290  asm("GetPlayLogLength__Q2_2nn3pdmFPii");
291 
304 uint32_t
305 GetPlayLogStart(uint32_t* outStart, uint32_t userId)
306  asm("GetPlayLogStart__Q2_2nn3pdmFPii");
307 
329 uint32_t
330 GetPlayLog(uint32_t* outAmount, PlayLog* outPlayLogs, uint32_t userId, uint32_t amount)
331  asm("GetPlayLog__Q2_2nn3pdmFPiPQ3_2nn3pdm7PlayLogiT3");
332 
351 uint32_t
352 GetPlayLog(PlayLog* outPlayLogs, uint32_t userId, uint32_t amount)
353  asm("GetPlayLog__Q2_2nn3pdmFPQ3_2nn3pdm7PlayLogiT2");
354 
365 uint32_t
366 GetPlayStatsMaxLength(uint32_t* outMaxLength)
367  asm("GetPlayStatsMaxLength__Q2_2nn3pdmFPi");
368 
381 uint32_t
382 GetPlayStatsLength(uint32_t* outLength, uint32_t userId)
383  asm("GetPlayStatsLength__Q2_2nn3pdmFPii");
384 
401 uint32_t
402 GetPlayStatsOfTitleId(PlayStats* outPlayStats, uint32_t userId, uint64_t titleId)
403  asm("GetPlayStatsOfTitleId__Q2_2nn3pdmFPQ3_2nn3pdm9PlayStatsiUL");
404 
426 uint32_t
427 GetPlayStats(uint32_t* outAmount, PlayStats* outPlayStats, uint32_t userId, uint32_t amount)
428  asm("GetPlayStats__Q2_2nn3pdmFPiPQ3_2nn3pdm9PlayStatsiT3");
429 
448 uint32_t
449 GetPlayStats(PlayStats* outPlayStats, uint32_t userId, uint32_t amount)
450  asm("GetPlayStats__Q2_2nn3pdmFPQ3_2nn3pdm9PlayStatsiT2");
451 
452 void
454  asm("NotifySetTimeBeginEvent__Q2_2nn3pdmFv");
455 
456 void
458  asm("NotifySetTimeEndEvent__Q2_2nn3pdmFv");
459 
460 } //namespace pdm
461 
462 } //namespace nn
463 
464 #endif
465 
uint64_t title_id
Title ID of the title.
Definition: pdm_cpp.h:33
uint16_t times_played
Total amount of times played.
Definition: pdm_cpp.h:54
uint32_t GetPlayStats(uint32_t *outAmount, PlayStats *outPlayStats, uint32_t userId, uint32_t amount) asm("GetPlayStats__Q2_2nn3pdmFPiPQ3_2nn3pdm9PlayStatsiT3")
Gets an array of PlayStats entries.
uint32_t GetPlayStatsMaxLength(uint32_t *outMaxLength) asm("GetPlayStatsMaxLength__Q2_2nn3pdmFPi")
The max amount of PlayStats that can be written into the save.
uint32_t GetPlayDiaryStart(uint32_t *outStart, uint32_t userId) asm("GetPlayDiaryStart__Q2_2nn3pdmFPii")
void Finalize() asm("Finalize__Q2_2nn3pdmFv")
Finalize PDM.
PlayDiaryFlags flags
flags PlayDiaryFlags
Definition: pdm_cpp.h:39
uint32_t GetPlayLogMaxLength(uint32_t *outMaxLength) asm("GetPlayLogMaxLength__Q2_2nn3pdmFPi")
The max amount of PlayLog that can be written into the save.
uint16_t date
Date in days since 01/01/2000.
Definition: pdm_cpp.h:37
uint32_t GetPlayLogStart(uint32_t *outStart, uint32_t userId) asm("GetPlayLogStart__Q2_2nn3pdmFPii")
PlayDiaryFlags
Flags for PlayDiary.
Definition: pdm_cpp.h:19
@ PLAYDIARY_FLAG_DEFAULT
Definition: pdm_cpp.h:20
@ PLAYDIARY_FLAG_PLAYED_IN_WII_MODE
Set when the user played in Wii Mode Note: Title Id should be ffff ffff ffff ffff when set.
Definition: pdm_cpp.h:24
@ PLAYDIARY_FLAG_UNKNOWN_0A00
Definition: pdm_cpp.h:25
uint32_t Convert(uint32_t userId) asm("Convert__Q2_2nn3pdmFi")
Convert an users PDM Save to a newer save version.
uint16_t last_time_played
Date when the title was last played in days since 01/01/2000.
Definition: pdm_cpp.h:58
uint32_t WaitForConvertDone() asm("WaitForConvertDone__Q2_2nn3pdmFv")
Wait until convert is done.
uint32_t GetPlayLog(uint32_t *outAmount, PlayLog *outPlayLogs, uint32_t userId, uint32_t amount) asm("GetPlayLog__Q2_2nn3pdmFPiPQ3_2nn3pdm7PlayLogiT3")
Gets an array of PlayLog entries.
uint32_t GetPlayDiaryLength(uint32_t *outLength, uint32_t userId) asm("GetPlayDiaryLength__Q2_2nn3pdmFPii")
Gets the amount of an users PlayDiary entries.
void CloseAllFiles() asm("CloseAllFiles__Q2_2nn3pdmFv")
Close all opened PDM Files.
uint32_t Initialize() asm("Initialize__Q2_2nn3pdmFv")
Initializes PDM.
void NotifySetTimeEndEvent() asm("NotifySetTimeEndEvent__Q2_2nn3pdmFv")
uint32_t GetPlayDiary(uint32_t *outAmount, PlayDiary *outPlayDiaries, uint32_t userId, uint32_t amount) asm("GetPlayDiary__Q2_2nn3pdmFPiPQ3_2nn3pdm9PlayDiaryiT3")
Gets an array of PlayDiary entries.
uint32_t GetPlayStatsOfTitleId(PlayStats *outPlayStats, uint32_t userId, uint64_t titleId) asm("GetPlayStatsOfTitleId__Q2_2nn3pdmFPQ3_2nn3pdm9PlayStatsiUL")
Gets PlayLog entry of a Title ID.
uint32_t GetPlayStatsLength(uint32_t *outLength, uint32_t userId) asm("GetPlayStatsLength__Q2_2nn3pdmFPii")
Gets the amount of an users PlayStats entries.
uint32_t GetPlayEvent(uint32_t *outAmount, PlayEvent *outPlayEvents, uint32_t userId, uint32_t amount) asm("GetPlayEvent__Q2_2nn3pdmFPiPQ3_2nn3pdm9PlayEventiT3")
Gets an array of PlayEvent entries.
uint16_t first_time_played
Date when the title was first played in days since 01/01/2000.
Definition: pdm_cpp.h:56
uint32_t GetPlayDiaryMaxLength(uint32_t *outMaxLength) asm("GetPlayDiaryMaxLength__Q2_2nn3pdmFPi")
The max amount of PlayDiary that can be written into the save.
void NotifySetTimeBeginEvent() asm("NotifySetTimeBeginEvent__Q2_2nn3pdmFv")
uint32_t GetPlayEventMaxLength(uint32_t *outMaxLength) asm("GetPlayEventMaxLength__Q2_2nn3pdmFPi")
The max amount of PlayEvent that can be written into the save.
uint32_t playtime
Playtime in Minutes.
Definition: pdm_cpp.h:35
uint32_t GetPlayLogLength(uint32_t *outLength, uint32_t userId) asm("GetPlayLogLength__Q2_2nn3pdmFPii")
Gets the amount of an users PlayLog entries.
Stores PlayData for each Day.
Definition: pdm_cpp.h:31
Unknown.
Definition: pdm_cpp.h:71
Unknown.
Definition: pdm_cpp.h:79
Stores total stats.
Definition: pdm_cpp.h:48
Definition: ac_cpp.h:15