wut  v1.5.0
Wii U Toolchain
Data Structures | Typedefs | Enumerations | Functions
nn::pdm Namespace Reference

Data Structures

struct  PlayDiary
 Stores PlayData for each Day. More...
 
struct  PlayStats
 Stores total stats. More...
 
struct  PlayEvent
 Unknown. More...
 
struct  PlayLog
 Unknown. More...
 

Typedefs

typedef enum nn::pdm::PlayDiaryFlags PlayDiaryFlags
 Flags for PlayDiary. More...
 

Enumerations

enum  PlayDiaryFlags : uint16_t {
  PLAYDIARY_FLAG_DEFAULT = 0x0000 ,
  PLAYDIARY_FLAG_PLAYED_IN_WII_MODE = 0x0100 ,
  PLAYDIARY_FLAG_UNKNOWN_0A00 = 0x0a00
}
 Flags for PlayDiary. More...
 

Functions

uint32_t Initialize () asm("Initialize__Q2_2nn3pdmFv")
 Initializes PDM. More...
 
void Finalize () asm("Finalize__Q2_2nn3pdmFv")
 Finalize PDM. More...
 
void CloseAllFiles () asm("CloseAllFiles__Q2_2nn3pdmFv")
 Close all opened PDM Files. More...
 
uint32_t Convert (uint32_t userId) asm("Convert__Q2_2nn3pdmFi")
 Convert an users PDM Save to a newer save version. More...
 
uint32_t WaitForConvertDone () asm("WaitForConvertDone__Q2_2nn3pdmFv")
 Wait until convert is done. More...
 
uint32_t GetPlayDiaryMaxLength (uint32_t *outMaxLength) asm("GetPlayDiaryMaxLength__Q2_2nn3pdmFPi")
 The max amount of PlayDiary that can be written into the save. More...
 
uint32_t GetPlayDiaryLength (uint32_t *outLength, uint32_t userId) asm("GetPlayDiaryLength__Q2_2nn3pdmFPii")
 Gets the amount of an users PlayDiary entries. More...
 
uint32_t GetPlayDiaryStart (uint32_t *outStart, uint32_t userId) asm("GetPlayDiaryStart__Q2_2nn3pdmFPii")
 
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. More...
 
uint32_t GetPlayDiary (PlayDiary *outPlayDiaries, uint32_t userId, uint32_t amount) asm("GetPlayDiary__Q2_2nn3pdmFPQ3_2nn3pdm9PlayDiaryiT2")
 Gets an array of PlayDiary entries. More...
 
uint32_t GetPlayEventMaxLength (uint32_t *outMaxLength) asm("GetPlayEventMaxLength__Q2_2nn3pdmFPi")
 The max amount of PlayEvent that can be written into the save. More...
 
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. More...
 
uint32_t GetPlayLogMaxLength (uint32_t *outMaxLength) asm("GetPlayLogMaxLength__Q2_2nn3pdmFPi")
 The max amount of PlayLog that can be written into the save. More...
 
uint32_t GetPlayLogLength (uint32_t *outLength, uint32_t userId) asm("GetPlayLogLength__Q2_2nn3pdmFPii")
 Gets the amount of an users PlayLog entries. More...
 
uint32_t GetPlayLogStart (uint32_t *outStart, uint32_t userId) asm("GetPlayLogStart__Q2_2nn3pdmFPii")
 
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. More...
 
uint32_t GetPlayLog (PlayLog *outPlayLogs, uint32_t userId, uint32_t amount) asm("GetPlayLog__Q2_2nn3pdmFPQ3_2nn3pdm7PlayLogiT2")
 Gets an array of PlayLog entries. More...
 
uint32_t GetPlayStatsMaxLength (uint32_t *outMaxLength) asm("GetPlayStatsMaxLength__Q2_2nn3pdmFPi")
 The max amount of PlayStats that can be written into the save. More...
 
uint32_t GetPlayStatsLength (uint32_t *outLength, uint32_t userId) asm("GetPlayStatsLength__Q2_2nn3pdmFPii")
 Gets the amount of an users PlayStats entries. More...
 
uint32_t GetPlayStatsOfTitleId (PlayStats *outPlayStats, uint32_t userId, uint64_t titleId) asm("GetPlayStatsOfTitleId__Q2_2nn3pdmFPQ3_2nn3pdm9PlayStatsiUL")
 Gets PlayLog entry of a Title ID. More...
 
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. More...
 
uint32_t GetPlayStats (PlayStats *outPlayStats, uint32_t userId, uint32_t amount) asm("GetPlayStats__Q2_2nn3pdmFPQ3_2nn3pdm9PlayStatsiT2")
 Gets an array of PlayStats entries. More...
 
void NotifySetTimeBeginEvent () asm("NotifySetTimeBeginEvent__Q2_2nn3pdmFv")
 
void NotifySetTimeEndEvent () asm("NotifySetTimeEndEvent__Q2_2nn3pdmFv")
 

Data Structure Documentation

◆ nn::pdm::PlayDiary

struct nn::pdm::PlayDiary

Stores PlayData for each Day.

Definition at line 30 of file pdm_cpp.h.

Data Fields
uint64_t title_id Title ID of the title.
uint32_t playtime Playtime in Minutes.
uint16_t date Date in days since 01/01/2000.
PlayDiaryFlags flags flags PlayDiaryFlags

◆ nn::pdm::PlayStats

struct nn::pdm::PlayStats

Stores total stats.

Definition at line 47 of file pdm_cpp.h.

Data Fields
uint64_t title_id Title ID of the title.
uint32_t playtime Total Playtime in minutes.
uint16_t times_played Total amount of times played.
uint16_t first_time_played Date when the title was first played in days since 01/01/2000.
uint16_t last_time_played Date when the title was last played in days since 01/01/2000.

◆ nn::pdm::PlayEvent

struct nn::pdm::PlayEvent

Unknown.

Definition at line 70 of file pdm_cpp.h.

Data Fields
uint64_t title_id

◆ nn::pdm::PlayLog

struct nn::pdm::PlayLog

Unknown.

Definition at line 78 of file pdm_cpp.h.

Data Fields
uint64_t title_id

Typedef Documentation

◆ PlayDiaryFlags

Flags for PlayDiary.

Enumeration Type Documentation

◆ PlayDiaryFlags

enum PlayDiaryFlags : uint16_t

Flags for PlayDiary.

Enumerator
PLAYDIARY_FLAG_DEFAULT 
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.

PLAYDIARY_FLAG_UNKNOWN_0A00 

Definition at line 18 of file pdm_cpp.h.

Function Documentation

◆ Initialize()

uint32_t nn::pdm::Initialize ( )

Initializes PDM.

Needs to be called before using other functions-

Returns
0 on success.

◆ Finalize()

void nn::pdm::Finalize ( )

Finalize PDM.

◆ CloseAllFiles()

void nn::pdm::CloseAllFiles ( )

Close all opened PDM Files.

◆ Convert()

uint32_t nn::pdm::Convert ( uint32_t  userId)

Convert an users PDM Save to a newer save version.

Returns
0 on success.

◆ WaitForConvertDone()

uint32_t nn::pdm::WaitForConvertDone ( )

Wait until convert is done.

Returns
0 on success.

◆ GetPlayDiaryMaxLength()

uint32_t nn::pdm::GetPlayDiaryMaxLength ( uint32_t *  outMaxLength)

The max amount of PlayDiary that can be written into the save.

Parameters
outMaxLengthA pointer to write the size to. Must not be NULL.
Returns
0 on success.

◆ GetPlayDiaryLength()

uint32_t nn::pdm::GetPlayDiaryLength ( uint32_t *  outLength,
uint32_t  userId 
)

Gets the amount of an users PlayDiary entries.

Parameters
outLengthA pointer to write the size to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
Returns
0 on success.

◆ GetPlayDiaryStart()

uint32_t nn::pdm::GetPlayDiaryStart ( uint32_t *  outStart,
uint32_t  userId 
)
Parameters
outStartA pointer to write the start to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
Returns
0 on success.

◆ GetPlayDiary() [1/2]

uint32_t nn::pdm::GetPlayDiary ( uint32_t *  outAmount,
PlayDiary outPlayDiaries,
uint32_t  userId,
uint32_t  amount 
)

Gets an array of PlayDiary entries.

Parameters
outAmountA pointer to write the amount of entries that have been written to the array. Must not be NULL. May be smaller than the amount passed to the function.
outPlayDiariesA pointer to write an array of PlayDiary to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
amountThe max amount of entries to be written to the array
Returns
0 on success.

◆ GetPlayDiary() [2/2]

uint32_t nn::pdm::GetPlayDiary ( PlayDiary outPlayDiaries,
uint32_t  userId,
uint32_t  amount 
)

Gets an array of PlayDiary entries.

Parameters
outPlayDiariesA pointer to write an array of PlayDiary to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
amountThe max amount of entries to be written to the array
Returns
Either the amount of entries that have been written to the array or 0xFFFFFF on error. May be smaller than the amount passed to the function.

◆ GetPlayEventMaxLength()

uint32_t nn::pdm::GetPlayEventMaxLength ( uint32_t *  outMaxLength)

The max amount of PlayEvent that can be written into the save.

Parameters
outMaxLengthA pointer to write the size to. Must not be NULL.
Returns
0 on success.

◆ GetPlayEvent()

uint32_t nn::pdm::GetPlayEvent ( uint32_t *  outAmount,
PlayEvent outPlayEvents,
uint32_t  userId,
uint32_t  amount 
)

Gets an array of PlayEvent entries.

Parameters
outAmountA pointer to write the amount of entries that have been written to the array. Must not be NULL. May be smaller than the amount passed to the function.
outPlayEventsA pointer to write an array of PlayEvent to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
amountThe max amount of entries to be written to the array
Returns
0 on success.

◆ GetPlayLogMaxLength()

uint32_t nn::pdm::GetPlayLogMaxLength ( uint32_t *  outMaxLength)

The max amount of PlayLog that can be written into the save.

Parameters
outMaxLengthA pointer to write the size to. Must not be NULL.
Returns
0 on success.

◆ GetPlayLogLength()

uint32_t nn::pdm::GetPlayLogLength ( uint32_t *  outLength,
uint32_t  userId 
)

Gets the amount of an users PlayLog entries.

Parameters
outLengthA pointer to write the size to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
Returns
0 on success.

◆ GetPlayLogStart()

uint32_t nn::pdm::GetPlayLogStart ( uint32_t *  outStart,
uint32_t  userId 
)
Parameters
outStartA pointer to write the start to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
Returns
0 on success.

◆ GetPlayLog() [1/2]

uint32_t nn::pdm::GetPlayLog ( uint32_t *  outAmount,
PlayLog outPlayLogs,
uint32_t  userId,
uint32_t  amount 
)

Gets an array of PlayLog entries.

Parameters
outAmountA pointer to write the amount of entries that have been written to the array. Must not be NULL. May be smaller than the amount passed to the function.
outPlayLogsA pointer to write an array of PlayLog to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
amountThe max amount of entries to be written to the array
Returns
0 on success.

◆ GetPlayLog() [2/2]

uint32_t nn::pdm::GetPlayLog ( PlayLog outPlayLogs,
uint32_t  userId,
uint32_t  amount 
)

Gets an array of PlayLog entries.

Parameters
outPlayLogsA pointer to write an array of PlayLog to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
amountThe max amount of entries to be written to the array
Returns
Either the amount of entries that have been written to the array or 0xFFFFFF on error. May be smaller than the amount passed to the function.

◆ GetPlayStatsMaxLength()

uint32_t nn::pdm::GetPlayStatsMaxLength ( uint32_t *  outMaxLength)

The max amount of PlayStats that can be written into the save.

Parameters
outMaxLengthA pointer to write the size to. Must not be NULL.
Returns
0 on success.

◆ GetPlayStatsLength()

uint32_t nn::pdm::GetPlayStatsLength ( uint32_t *  outLength,
uint32_t  userId 
)

Gets the amount of an users PlayStats entries.

Parameters
outLengthA pointer to write the size to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
Returns
0 on success.

◆ GetPlayStatsOfTitleId()

uint32_t nn::pdm::GetPlayStatsOfTitleId ( PlayStats outPlayStats,
uint32_t  userId,
uint64_t  titleId 
)

Gets PlayLog entry of a Title ID.

Parameters
outPlayStatsA pointer to write a PlayLog to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
titleIdThe titleId of the PlayLog
Returns
0 on success

◆ GetPlayStats() [1/2]

uint32_t nn::pdm::GetPlayStats ( uint32_t *  outAmount,
PlayStats outPlayStats,
uint32_t  userId,
uint32_t  amount 
)

Gets an array of PlayStats entries.

Parameters
outAmountA pointer to write the amount of entries that have been written to the array. Must not be NULL. May be smaller than the amount passed to the function.
outPlayStatsA pointer to write an array of PlayStats to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
amountThe max amount of entries to be written to the array
Returns
0 on success.

◆ GetPlayStats() [2/2]

uint32_t nn::pdm::GetPlayStats ( PlayStats outPlayStats,
uint32_t  userId,
uint32_t  amount 
)

Gets an array of PlayStats entries.

Parameters
outPlayStatsA pointer to write an array of PlayStats to. Must not be NULL.
userIdA user ID from 1-12 to indicate the User
amountThe max amount of entries to be written to the array
Returns
Either the amount of entries that have been written to the array or 0xFFFFFF on error. May be smaller than the amount passed to the function.

◆ NotifySetTimeBeginEvent()

void nn::pdm::NotifySetTimeBeginEvent ( )

◆ NotifySetTimeEndEvent()

void nn::pdm::NotifySetTimeEndEvent ( )