Match and link NWC24 manager #98

Merged
coah80 merged 1 commits from integrate/nwc24-manager-0922 into main 2026-09-22 04:32:04 +00:00
4 changed files with 10 additions and 9 deletions

View File

@@ -641,7 +641,7 @@ config.libs = [
Object(Matching, "system/iplCdbManager.cpp"),
Object(Matching, "system/iplCdbWrapper.cpp"),
Object(Matching, "system/iplPlayTimeLog.cpp"),
Object(Equivalent, "system/iplNwc24Manager.cpp"),
Object(Matching, "system/iplNwc24Manager.cpp"),
Object(Matching, "system/iplPointer.cpp"),
Object(Matching, "system/iplPointerCore.cpp"),
Object(Matching, "system/iplDialogWindow.cpp"),

View File

@@ -25,7 +25,7 @@ namespace ipl {
void closeDatabase();
BOOL createNewRecord(const char* recordName, const char* recordFileType, const OSCalendarTime* dateTime, u32* gameCode, u16* makerCode,
const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, u16 addrType, u16 noReplyFlag,
const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, NWC24FriendType addrType, u16 noReplyFlag,
const wchar_t* titleText, const wchar_t* bodyText, const void* faceData, const void** attachData, u32* attachSize,
RBRAttachmentType* attachType);

View File

@@ -38,7 +38,7 @@ namespace ipl {
}
BOOL Manager::createNewRecord(const char* recordName, const char* recordFileType, const OSCalendarTime* dateTime, u32* gameCode,
u16* makerCode, const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, u16 addrType,
u16* makerCode, const math::VEC2& recordPos, u32 recordFlags, const NWC24FriendAddr& addr, NWC24FriendType addrType,
u16 noReplyFlag, const wchar_t* titleText, const wchar_t* bodyText, const void* faceData,
const void** attachData, u32* attachSize, RBRAttachmentType* attachType) {
BOOL result = FALSE;

View File

@@ -559,7 +559,7 @@ namespace ipl {
memset(msgFriendName, 0, sizeof(msgFriendName));
// Get message data
NWC24MsgObj msgObj ALIGN32;
NWC24MsgObj msgObj ATTRIBUTE_ALIGN(16);
NWC24MsgType msgType;
if (!getMsgObj(&msgObj, NWC24_MBOX_TYPE_RECV, mMsgIdsTbl[i]) || !getMsgType(&msgObj, &msgType)) {
continue;
@@ -569,7 +569,7 @@ namespace ipl {
NWC24FriendAddr msgFriendAddr;
memset(&msgFriendAddr, 0, sizeof(msgFriendAddr));
u16 msgFriendType;
NWC24FriendType msgFriendType;
// Get friend data
if (msgType == NWC24_MSGTYPE_PUBLIC) {
@@ -579,7 +579,7 @@ namespace ipl {
}
msgFriendType = NWC24_FRIENDTYPE_EMAIL;
if (searchFriendInfo(&msgFriendAddr, &index)) {
NWC24FriendInfo friendInfo;
NWC24FriendInfo friendInfo ALIGN32;
readFriendInfo(&friendInfo, index);
wcsncpy(msgFriendName, (wchar_t*)friendInfo.attr.name, 12);
}
@@ -588,7 +588,7 @@ namespace ipl {
getMsgFromId(&msgObj, &msgFriendAddr.wiiId);
msgFriendType = msgFriendAddr.wiiId == myUserId ? NWC24_FRIENDTYPE_NONE : NWC24_FRIENDTYPE_WII;
if (searchFriendInfo(msgFriendAddr.wiiId, &index)) {
NWC24FriendInfo friendInfo;
NWC24FriendInfo friendInfo ALIGN32;
readFriendInfo(&friendInfo, index);
wcsncpy(msgFriendName, (wchar_t*)friendInfo.attr.name, 12);
}
@@ -596,6 +596,7 @@ namespace ipl {
// Get app and group ID
u32 msgAppId;
u16 msgOptOutAppId;
u16 msgGroupId;
getMsgAppId(&msgObj, &msgAppId);
getMsgGroupId(&msgObj, &msgGroupId);
@@ -613,9 +614,9 @@ namespace ipl {
// Get opt out flag (display "Opt Out" button)
BOOL msgMbOptOutFlag = FALSE;
u32 msgOptOutAppId = 0;
bool msgBoardUpdateSW = (result & (bool)msgMbUpdateSW);
result = readMsgMBOptOutFlag(&msgObj, &msgMbOptOutFlag, &msgOptOutAppId);
*(u32*)&msgOptOutAppId = 0;
result = readMsgMBOptOutFlag(&msgObj, &msgMbOptOutFlag, (u32*)&msgOptOutAppId);
if (!FILE_ERROR_OK) {
goto out;
}