Compare commits

...

1 Commits

Author SHA1 Message Date
coah
0ef894701d cleanup(eZiText): rename work unk_0x1764 to groupPtr
Cursor into DAWG group table (from group / Zi8GetTableAddress).
2026-10-02 14:06:41 -05:00
2 changed files with 14 additions and 14 deletions

View File

@@ -277,7 +277,7 @@ struct __zi8_work_data_s {
ziU8 unk_0x1420[4]; ziU8 unk_0x1420[4];
zi8DawgCtx dawgCtx; // 0x1424 zi8DawgCtx dawgCtx; // 0x1424
ziU8 unk_0x1760[4]; // 0x1760 ziU8 unk_0x1760[4]; // 0x1760
ziU8* unk_0x1764; // 0x1764 ziU8* groupPtr; // 0x1764
ziU8 unk_0x1768; ziU8 unk_0x1768;
ziU8 unk_0x1769[0x81]; ziU8 unk_0x1769[0x81];
ziU16 unk_0x17EA; ziU16 unk_0x17EA;

View File

@@ -184,36 +184,36 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
result = 0; result = 0;
if (status == 0) { if (status == 0) {
ZI_WORK->unk_0x1764 = (ziU8*)group; ZI_WORK->groupPtr = (ziU8*)group;
if (ZI_WORK->unk_0x1764 == 0) { if (ZI_WORK->groupPtr == 0) {
if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) { if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) {
ZI_WORK->unk_0x1764 = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK)); ZI_WORK->groupPtr = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
} }
} }
if (ZI_WORK->unk_0x1764 != 0) { if (ZI_WORK->groupPtr != 0) {
for (; (*ZI_WORK->unk_0x1764 != 0xff && ((groupIndex & 0xff) != 0)); for (; (*ZI_WORK->groupPtr != 0xff && ((groupIndex & 0xff) != 0));
groupIndex = groupIndex - 1) { groupIndex = groupIndex - 1) {
while (*ZI_WORK->unk_0x1764 != 0xff) { while (*ZI_WORK->groupPtr != 0xff) {
ZI_WORK->unk_0x1764 += 2; ZI_WORK->groupPtr += 2;
} }
ZI_WORK->unk_0x1764++; ZI_WORK->groupPtr++;
} }
} }
} }
if (ZI_WORK->unk_0x1764 == 0) { if (ZI_WORK->groupPtr == 0) {
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,capacity & 0xffff, result = Zi8MatchROMdata0(elements,count,language & 0xff,output,capacity & 0xffff,
mode & 0xff,status & 0xff,0,1,acceptPrefix,0,&ZI_WORK->dawgCtx, mode & 0xff,status & 0xff,0,1,acceptPrefix,0,&ZI_WORK->dawgCtx,
ZI_WORK->unk_0x1760,ZI_WORK); ZI_WORK->unk_0x1760,ZI_WORK);
} }
else { else {
while (*ZI_WORK->unk_0x1764 != 0xff) { while (*ZI_WORK->groupPtr != 0xff) {
result = Zi8MatchROMdata0(elements,count,language & 0xff,output, result = Zi8MatchROMdata0(elements,count,language & 0xff,output,
capacity & 0xffff,mode & 0xff,status & 0xff, capacity & 0xffff,mode & 0xff,status & 0xff,
*ZI_WORK->unk_0x1764, *ZI_WORK->groupPtr,
ZI_WORK->unk_0x1764[1],acceptPrefix,0, ZI_WORK->groupPtr[1],acceptPrefix,0,
&ZI_WORK->dawgCtx,ZI_WORK->unk_0x1760,ZI_WORK); &ZI_WORK->dawgCtx,ZI_WORK->unk_0x1760,ZI_WORK);
if ((result & 0xff) != 0) break; if ((result & 0xff) != 0) break;
ZI_WORK->unk_0x1764 += 2; ZI_WORK->groupPtr += 2;
status = 0; status = 0;
} }
} }