Compare commits
3 Commits
cleanup/se
...
cleanup/nw
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c45fddea5 | ||
|
|
3e279ef189 | ||
|
|
32417fe8a2 |
@@ -205,7 +205,7 @@ typedef struct _ziUwdNode {
|
|||||||
|
|
||||||
struct __zi8_work_data_s {
|
struct __zi8_work_data_s {
|
||||||
ziU8 unk_0x00;
|
ziU8 unk_0x00;
|
||||||
ziU8 unk_0x01;
|
ziU8 countOnly; // 0x01
|
||||||
ziU8 unk_0x02[2];
|
ziU8 unk_0x02[2];
|
||||||
ziLanguageEntry* langEntries; // 0x04
|
ziLanguageEntry* langEntries; // 0x04
|
||||||
ziU8 unk_0x08;
|
ziU8 unk_0x08;
|
||||||
@@ -283,7 +283,7 @@ struct __zi8_work_data_s {
|
|||||||
ziU16 unk_0x17EA;
|
ziU16 unk_0x17EA;
|
||||||
ziU8 unk_0x17EC;
|
ziU8 unk_0x17EC;
|
||||||
ziU8 unk_0x17ED[3];
|
ziU8 unk_0x17ED[3];
|
||||||
ziU8* unk_0x17F0;
|
ziU8* dawgGroup; // 0x17F0
|
||||||
ziWChar unk_0x17F4[0x40]; // 0x17F4..0x1874
|
ziWChar unk_0x17F4[0x40]; // 0x17F4..0x1874
|
||||||
ziU16 unk_0x1874;
|
ziU16 unk_0x1874;
|
||||||
ziU8 unk_0x1876;
|
ziU8 unk_0x1876;
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
|
|||||||
} else {
|
} else {
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
ZI_WORK->unk_0x17EC = 0;
|
ZI_WORK->unk_0x17EC = 0;
|
||||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
|
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
|
||||||
} else if (ZI_WORK->unk_0x17EC != 0) {
|
} else if (ZI_WORK->unk_0x17EC != 0) {
|
||||||
Zi8LogError(100, ZI_WORK);
|
Zi8LogError(100, ZI_WORK);
|
||||||
goto finish_match;
|
goto finish_match;
|
||||||
@@ -316,30 +316,30 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
|
|||||||
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||||
mode, status, reservedMode, 0, acceptPrefix, ZI_WORK);
|
mode, status, reservedMode, 0, acceptPrefix, ZI_WORK);
|
||||||
} else {
|
} else {
|
||||||
while (ZI_WORK->unk_0x17F0 != 0) {
|
while (ZI_WORK->dawgGroup != 0) {
|
||||||
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||||
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
|
mode, status, reservedMode, ZI_WORK->dawgGroup,
|
||||||
acceptPrefix, ZI_WORK);
|
acceptPrefix, ZI_WORK);
|
||||||
if ((ziU8)result != 0) break;
|
if ((ziU8)result != 0) break;
|
||||||
status = 0;
|
status = 0;
|
||||||
if (count <= 1 && language == 0x36) break;
|
if (count <= 1 && language == 0x36) break;
|
||||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
|
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((ziU8)result == 0 && status == 0 && mode == 1 && count == 1 && capacity >= 1) {
|
if ((ziU8)result == 0 && status == 0 && mode == 1 && count == 1 && capacity >= 1) {
|
||||||
mode = 0;
|
mode = 0;
|
||||||
ZI_WORK->unk_0x17EC = 1;
|
ZI_WORK->unk_0x17EC = 1;
|
||||||
if (tableSize != 0) {
|
if (tableSize != 0) {
|
||||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
|
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
|
||||||
while (ZI_WORK->unk_0x17F0 != 0) {
|
while (ZI_WORK->dawgGroup != 0) {
|
||||||
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||||
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
|
mode, status, reservedMode, ZI_WORK->dawgGroup,
|
||||||
acceptPrefix, ZI_WORK) != 0) {
|
acceptPrefix, ZI_WORK) != 0) {
|
||||||
*output = *elements;
|
*output = *elements;
|
||||||
result = 1;
|
result = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
|
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||||
|
|||||||
@@ -339,11 +339,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
|||||||
if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) {
|
if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) {
|
||||||
switch (parameters->language) {
|
switch (parameters->language) {
|
||||||
case 1:
|
case 1:
|
||||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
|
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||||
switch(ZI_WORK->unk_0x00) {
|
switch(ZI_WORK->unk_0x00) {
|
||||||
case '\0':
|
case '\0':
|
||||||
if (parameters->elements[0] == 0xEF04) {
|
if (parameters->elements[0] == 0xEF04) {
|
||||||
ZI_WORK->unk_0x01 = options->countOnly;
|
ZI_WORK->countOnly = options->countOnly;
|
||||||
ZI_WORK->unk_0x00 = '\x01';
|
ZI_WORK->unk_0x00 = '\x01';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -400,11 +400,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
|||||||
break;
|
break;
|
||||||
case 0x11:
|
case 0x11:
|
||||||
default:
|
default:
|
||||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
|
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||||
switch(ZI_WORK->unk_0x00) {
|
switch(ZI_WORK->unk_0x00) {
|
||||||
case '\0':
|
case '\0':
|
||||||
if (parameters->elements[0] == 0xEFF2) {
|
if (parameters->elements[0] == 0xEFF2) {
|
||||||
ZI_WORK->unk_0x01 = options->countOnly;
|
ZI_WORK->countOnly = options->countOnly;
|
||||||
ZI_WORK->unk_0x00 = '\x01';
|
ZI_WORK->unk_0x00 = '\x01';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ typedef struct NWC24MsgObjPrivate {
|
|||||||
u32 tag; // 0x14
|
u32 tag; // 0x14
|
||||||
u32 ledPattern; // 0x18
|
u32 ledPattern; // 0x18
|
||||||
#if defined(NWC24_MBOX_CTRL) || defined(NWC24_MSG_COMMIT)
|
#if defined(NWC24_MBOX_CTRL) || defined(NWC24_MSG_COMMIT)
|
||||||
u32 unk_0x1C;
|
u32 crc; // 0x1C
|
||||||
#endif
|
#endif
|
||||||
#if defined(NWC24_MBOX_CTRL) || defined(NWC24_MSG_COMMIT)
|
#if defined(NWC24_MBOX_CTRL) || defined(NWC24_MSG_COMMIT)
|
||||||
union {
|
union {
|
||||||
|
|||||||
@@ -782,7 +782,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms
|
|||||||
duplicateOffset = offset;
|
duplicateOffset = offset;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (msg->unk_0x1C != 0 && entry->crc == msg->unk_0x1C && entry->type == msg->type && entry->length == msg->length &&
|
if (msg->crc != 0 && entry->crc == msg->crc && entry->type == msg->type && entry->length == msg->length &&
|
||||||
entry->flags == msg->unk_0x10 && (s32)entry->date == (s32)msg->date) {
|
entry->flags == msg->unk_0x10 && (s32)entry->date == (s32)msg->date) {
|
||||||
duplicateId = entry->msgId;
|
duplicateId = entry->msgId;
|
||||||
duplicateOffset = offset;
|
duplicateOffset = offset;
|
||||||
@@ -959,7 +959,7 @@ static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entr
|
|||||||
entry->flags = msg->unk_0x10;
|
entry->flags = msg->unk_0x10;
|
||||||
entry->tag = msg->tag;
|
entry->tag = msg->tag;
|
||||||
entry->ledPattern = msg->ledPattern;
|
entry->ledPattern = msg->ledPattern;
|
||||||
entry->crc = msg->unk_0x1C;
|
entry->crc = msg->crc;
|
||||||
entry->fromIdHigh = msg->fromIdHigh;
|
entry->fromIdHigh = msg->fromIdHigh;
|
||||||
entry->fromIdLow = msg->fromIdLow;
|
entry->fromIdLow = msg->fromIdLow;
|
||||||
entry->date = msg->date;
|
entry->date = msg->date;
|
||||||
@@ -1006,7 +1006,7 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
|
|||||||
msg->unk_0x10 = entry->flags;
|
msg->unk_0x10 = entry->flags;
|
||||||
msg->tag = entry->tag;
|
msg->tag = entry->tag;
|
||||||
msg->ledPattern = entry->ledPattern;
|
msg->ledPattern = entry->ledPattern;
|
||||||
msg->unk_0x1C = entry->crc;
|
msg->crc = entry->crc;
|
||||||
msg->fromIdHigh = entry->fromIdHigh;
|
msg->fromIdHigh = entry->fromIdHigh;
|
||||||
msg->fromIdLow = entry->fromIdLow;
|
msg->fromIdLow = entry->fromIdLow;
|
||||||
msg->date = entry->date;
|
msg->date = entry->date;
|
||||||
|
|||||||
Reference in New Issue
Block a user