Compare commits
15 Commits
cleanup/ez
...
cleanup/co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b8d11475d | ||
|
|
413c779180 | ||
|
|
f9ecefa6a2 | ||
|
|
320700d49b | ||
|
|
c52153e9f7 | ||
|
|
899438ff02 | ||
|
|
8476c93f00 | ||
|
|
9b375e1e50 | ||
|
|
73795cb3fb | ||
|
|
0c780f6d1f | ||
|
|
63f4c7aeab | ||
|
|
282ddd99b7 | ||
|
|
c7d0f8f01b | ||
|
|
414b553743 | ||
|
|
da96c27969 |
@@ -62,17 +62,17 @@ namespace ipl {
|
||||
void start_left_event(const char* paneName);
|
||||
void start_trig_event(const char* paneName);
|
||||
|
||||
typedef struct Unk {
|
||||
typedef struct CmdEntry {
|
||||
int command; // 0x00
|
||||
u32 msgID; // 0x04
|
||||
} Unk;
|
||||
} CmdEntry;
|
||||
|
||||
Unk unk_0x64[64];
|
||||
CmdEntry mCmdQueue[64];
|
||||
|
||||
int unk_0x264;
|
||||
int unk_0x268;
|
||||
int unk_0x26C;
|
||||
int unk_0x270;
|
||||
int mQueueCapacity;
|
||||
int mQueueCount;
|
||||
int mQueueRead;
|
||||
int mQueueWrite;
|
||||
|
||||
int mSettingArg; // 0x274
|
||||
|
||||
|
||||
@@ -118,26 +118,26 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &status;
|
||||
}
|
||||
|
||||
Base(int chan, int type, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = type;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
}
|
||||
|
||||
@@ -152,15 +152,15 @@ namespace ipl {
|
||||
|
||||
protected:
|
||||
u8 mButton;
|
||||
u32 unk_0x08;
|
||||
u32 mDecideHoldCount;
|
||||
OSTick mLastRumbleTime;
|
||||
s32 mRumbleType;
|
||||
u32 mChan;
|
||||
u32 mType;
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D;
|
||||
u8 unk_0x1E;
|
||||
KPADStatus* unk_0x20;
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinch;
|
||||
u8 mbPrevPinch;
|
||||
KPADStatus* mpStatus;
|
||||
};
|
||||
|
||||
class Revolution : public Base {
|
||||
@@ -206,8 +206,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const;
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursor;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Master : public Interface {
|
||||
@@ -264,18 +264,18 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& arg1) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
|
||||
KPADEnableDPD(chan);
|
||||
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &arg1;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &arg1;
|
||||
}
|
||||
|
||||
virtual ~Base(); // 0x08
|
||||
@@ -326,15 +326,15 @@ namespace ipl {
|
||||
|
||||
// protected:
|
||||
u8 mButton; // 0x4
|
||||
u32 unk_0x08; // 0x8
|
||||
u32 mDecideHoldCount; // 0x8
|
||||
OSTick mLastRumbleTime; // 0xC
|
||||
s32 mRumbleType; // 0x10
|
||||
u32 mChan; // 0x14
|
||||
u32 mType; // 0x18
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D; // 0x1D
|
||||
u8 unk_0x1E; // 0x1E
|
||||
KPADStatus* unk_0x20; // 0x20
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinch; // 0x1D
|
||||
u8 mbPrevPinch; // 0x1E
|
||||
KPADStatus* mpStatus; // 0x20
|
||||
};
|
||||
|
||||
class Interface : public Base {
|
||||
@@ -446,8 +446,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const; // 0x8C
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursor;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Manager {
|
||||
|
||||
@@ -60,9 +60,9 @@ namespace ipl {
|
||||
|
||||
int mMessageID; // 0x08
|
||||
|
||||
int unk_0x0C;
|
||||
int unk_0x10;
|
||||
char unk_0x14[4];
|
||||
int mArg2;
|
||||
int mArg3;
|
||||
char mArg1[4];
|
||||
|
||||
u8* mpArcData; // 0x18
|
||||
u32 mArcSize; // 0x1C
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace ipl {
|
||||
|
||||
bool received() { return mbReviecedMsg; }
|
||||
void prepNextReceive() { mbReviecedMsg = false; }
|
||||
volatile bool isUnk0xA31() { return unk_0xA31 == false; }
|
||||
volatile bool isReceivingIdle() { return mbReceiving == false; }
|
||||
|
||||
BOOL isAppDlEnableLock(u32 appId) {
|
||||
utility::autoMutexLock lock(mAutoLock);
|
||||
@@ -175,9 +175,9 @@ namespace ipl {
|
||||
OSMutex mAutoLock; // 0xA18
|
||||
|
||||
bool mbReviecedMsg;
|
||||
bool unk_0xA31;
|
||||
bool mbReceiving;
|
||||
bool mbReceivePaused; // 0xA32
|
||||
bool unk_0xA33;
|
||||
bool mbNewTitleTblReady;
|
||||
|
||||
static Arg smArg;
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ struct __zi8_work_data_s {
|
||||
ziLanguageEntry* langEntries; // 0x04
|
||||
ziU8 unk_0x08;
|
||||
ziU8 unk_0x09;
|
||||
ziU8 unk_0x0A;
|
||||
ziU8 maxWordLength;
|
||||
ziU8 unk_0x0B;
|
||||
ziU32 unk_0x0C;
|
||||
ziU32 unk_0x10;
|
||||
@@ -267,20 +267,20 @@ struct __zi8_work_data_s {
|
||||
ziU8 unk_0x140C[4];
|
||||
ziU32 formats; // 0x1410
|
||||
ziU8 unk_0x1414[4];
|
||||
ziU8 unk_0x1418;
|
||||
ziU8 formatCount;
|
||||
ziU8 unk_0x1419;
|
||||
ziU16 capacity; // 0x141A
|
||||
ziU8 unk_0x141C;
|
||||
ziU8 unk_0x141D;
|
||||
ziU8 unk_0x141E;
|
||||
ziU8 graphTableId; // 0x141E
|
||||
ziU8 maxCnt; // 0x141F
|
||||
ziU8 unk_0x1420[4];
|
||||
zi8DawgCtx dawgCtx; // 0x1424
|
||||
ziU8 unk_0x1760[4]; // 0x1760
|
||||
ziU8* unk_0x1764; // 0x1764
|
||||
ziU8* groupPtr; // 0x1764
|
||||
ziU8 unk_0x1768;
|
||||
ziU8 unk_0x1769[0x81];
|
||||
ziU16 unk_0x17EA;
|
||||
ziU16 matchOffset; // 0x17EA
|
||||
ziU8 unk_0x17EC;
|
||||
ziU8 unk_0x17ED[3];
|
||||
ziU8* dawgGroup; // 0x17F0
|
||||
|
||||
@@ -39,10 +39,10 @@ ziU32 Zi8MatchROMdata0(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
}
|
||||
if (mode == 1) acceptPrefix = 0;
|
||||
} else {
|
||||
if (ZI_WORK->unk_0x141E != 0 && graphTable == 0xc &&
|
||||
Zi8GetTableSize(language, ZI_WORK->unk_0x141E, ZI_WORK) != 0) {
|
||||
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->unk_0x141E, ZI_WORK);
|
||||
keyTable = ZI_WORK->unk_0x141E + 1;
|
||||
if (ZI_WORK->graphTableId != 0 && graphTable == 0xc &&
|
||||
Zi8GetTableSize(language, ZI_WORK->graphTableId, ZI_WORK) != 0) {
|
||||
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->graphTableId, ZI_WORK);
|
||||
keyTable = ZI_WORK->graphTableId + 1;
|
||||
} else {
|
||||
if (Zi8GetTableSize(language, graphTable, ZI_WORK) == 0) {
|
||||
Zi8LogError(0x961, ZI_WORK);
|
||||
@@ -184,36 +184,36 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
|
||||
|
||||
result = 0;
|
||||
if (status == 0) {
|
||||
ZI_WORK->unk_0x1764 = (ziU8*)group;
|
||||
if (ZI_WORK->unk_0x1764 == 0) {
|
||||
ZI_WORK->groupPtr = (ziU8*)group;
|
||||
if (ZI_WORK->groupPtr == 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) {
|
||||
for (; (*ZI_WORK->unk_0x1764 != 0xff && ((groupIndex & 0xff) != 0));
|
||||
if (ZI_WORK->groupPtr != 0) {
|
||||
for (; (*ZI_WORK->groupPtr != 0xff && ((groupIndex & 0xff) != 0));
|
||||
groupIndex = groupIndex - 1) {
|
||||
while (*ZI_WORK->unk_0x1764 != 0xff) {
|
||||
ZI_WORK->unk_0x1764 += 2;
|
||||
while (*ZI_WORK->groupPtr != 0xff) {
|
||||
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,
|
||||
mode & 0xff,status & 0xff,0,1,acceptPrefix,0,&ZI_WORK->dawgCtx,
|
||||
ZI_WORK->unk_0x1760,ZI_WORK);
|
||||
}
|
||||
else {
|
||||
while (*ZI_WORK->unk_0x1764 != 0xff) {
|
||||
while (*ZI_WORK->groupPtr != 0xff) {
|
||||
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,
|
||||
capacity & 0xffff,mode & 0xff,status & 0xff,
|
||||
*ZI_WORK->unk_0x1764,
|
||||
ZI_WORK->unk_0x1764[1],acceptPrefix,0,
|
||||
*ZI_WORK->groupPtr,
|
||||
ZI_WORK->groupPtr[1],acceptPrefix,0,
|
||||
&ZI_WORK->dawgCtx,ZI_WORK->unk_0x1760,ZI_WORK);
|
||||
if ((result & 0xff) != 0) break;
|
||||
ZI_WORK->unk_0x1764 += 2;
|
||||
ZI_WORK->groupPtr += 2;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
@@ -230,31 +230,31 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
if (reservedMode != 0) return 0;
|
||||
if (status == 0) {
|
||||
ZI_WORK->unk_0x1768 = 0;
|
||||
ZI_WORK->unk_0x17EA = 0;
|
||||
ZI_WORK->matchOffset = 0;
|
||||
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->unk_0x141C != 0) {
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
} else {
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
}
|
||||
}
|
||||
search_segment:
|
||||
ZI_WORK->maxCnt = 1;
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
|
||||
count - ZI_WORK->unk_0x17EA, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
|
||||
count - ZI_WORK->matchOffset, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
mode, status, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) {
|
||||
for (index = (ziU8)(ZI_WORK->unk_0x17EA + result); index != 0; index--) {
|
||||
for (index = (ziU8)(ZI_WORK->matchOffset + result); index != 0; index--) {
|
||||
output[index - 1] = ZI_WORK->unk_0x17F4[index - 1];
|
||||
}
|
||||
result = (ziU8)(result + ZI_WORK->unk_0x17EA);
|
||||
result = (ziU8)(result + ZI_WORK->matchOffset);
|
||||
} else {
|
||||
if (status != 0 || count == 1) goto finish_segments;
|
||||
if (mode == 1 && ZI_WORK->unk_0x1768 == 0 &&
|
||||
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
|
||||
count - ZI_WORK->unk_0x17EA, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
|
||||
count - ZI_WORK->matchOffset, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
0, status, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK) != 0) goto finish_segments;
|
||||
if ((Zi8GetTableCount(language, 0x1f, ZI_WORK) & 4) == 0) {
|
||||
@@ -264,23 +264,23 @@ search_segment:
|
||||
}
|
||||
if (ZI_WORK->maxCnt > capacity) goto finish_segments;
|
||||
for (index = ZI_WORK->maxCnt; index != 0; index--) {
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA, index, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset, index, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
1, 0, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) {
|
||||
ZI_WORK->unk_0x17EA += (ziU8)result;
|
||||
if (ZI_WORK->unk_0x17EA == count) return 0;
|
||||
ZI_WORK->matchOffset += (ziU8)result;
|
||||
if (ZI_WORK->matchOffset == count) return 0;
|
||||
ZI_WORK->unk_0x1768++;
|
||||
status = 0;
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
if (ZI_WORK->dawgCtx.key == 0 && language == 10) {
|
||||
for (index = 0; index < ZI_WORK->unk_0x17EA; index++) {
|
||||
for (index = 0; index < ZI_WORK->matchOffset; index++) {
|
||||
switch (ZI_WORK->unk_0x17F4[index]) {
|
||||
case 0x61:
|
||||
case 0x6f:
|
||||
case 0x75:
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
goto search_segment;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ ziBool Zi8ZHsetZYfuzzyPairs(ziFuzzyZYPairs pairs ZI_NEED_WORK) {
|
||||
ziBool Zi8SetLatinSearchOrder(ziU8* searchArray, ziU8 searchSize ZI_NEED_WORK) {
|
||||
if (searchArray == 0 || *searchArray == 0) {
|
||||
ZI_WORK->formats = (ziU32)Zi8SOdefaultArray;
|
||||
ZI_WORK->unk_0x1418 = 9;
|
||||
ZI_WORK->formatCount = 9;
|
||||
} else {
|
||||
ZI_WORK->formats = (ziU32)searchArray;
|
||||
ZI_WORK->unk_0x1418 = searchSize;
|
||||
ZI_WORK->formatCount = searchSize;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
length = length - parameters->firstCandidate;
|
||||
if (countOnly != 0) {
|
||||
parameters->letters = length;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
|
||||
@@ -175,7 +175,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
current = signatures.first;
|
||||
length = signatures.length;
|
||||
}
|
||||
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
|
||||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
|
||||
length = parameters->elementCount;
|
||||
@@ -185,7 +185,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
if (parameters->letters == 2) {
|
||||
current = signatures.second;
|
||||
length = secondLength;
|
||||
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
|
||||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
|
||||
length = parameters->elementCount;
|
||||
@@ -194,7 +194,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
*output++ = 0;
|
||||
}
|
||||
*output++ = 0;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ static ziBool Zi8ZhSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED_WO
|
||||
length = length - parameters->firstCandidate;
|
||||
if (countOnly != 0) {
|
||||
parameters->letters = length;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
|
||||
@@ -493,8 +493,8 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
ZI_WORK->subLanguage = parameters->subLanguage;
|
||||
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1,ZI_WORK) & 2;
|
||||
options->maxCount = ZI_WORK->unk_0x10;
|
||||
options->maxWordLength = ZI_WORK->unk_0x0A;
|
||||
ZI_WORK->unk_0x0A = -1;
|
||||
options->maxWordLength = ZI_WORK->maxWordLength;
|
||||
ZI_WORK->maxWordLength = -1;
|
||||
if ((ziU8)Zi8LangSupported(parameters->language,ZI_WORK) == 0) {
|
||||
Zi8LogError(0x163,ZI_WORK);
|
||||
return 0;
|
||||
@@ -711,6 +711,6 @@ void Zi8Memcpy(ziU8* destination, ziU8* source, ziS32 count) {
|
||||
}
|
||||
|
||||
ziBool Zi8SetMaxWordLength(ziU8 length ZI_NEED_WORK) {
|
||||
ZI_WORK->unk_0x0A = length;
|
||||
ZI_WORK->maxWordLength = length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
|
||||
Zi8Memset(__zi8_work_data, 0, 0x1B44);
|
||||
ZI_WORK->unk_0x08 = 1;
|
||||
ZI_WORK->unk_0x09 = 1;
|
||||
ZI_WORK->unk_0x0A = 0xFF;
|
||||
ZI_WORK->maxWordLength = 0xFF;
|
||||
ZI_WORK->unk_0x10 = 0x64;
|
||||
*(ziU16*)&ZI_WORK->unk_0x0C = 0xFFFF;
|
||||
ZI_WORK->separator = 0x20;
|
||||
|
||||
@@ -46,7 +46,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
ziU8* data;
|
||||
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
|
||||
ziU32 savedFormats = ZI_WORK->formats;
|
||||
ziU8 savedCount = ZI_WORK->unk_0x1418;
|
||||
ziU8 savedCount = ZI_WORK->formatCount;
|
||||
ziSearchState search = {0};
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
if (word == 0 || *word == 0) {
|
||||
@@ -75,20 +75,20 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
request.firstCandidate = 0;
|
||||
ZI_WORK->formats = (ziU32)formats;
|
||||
if (ZI_WORK->unk_0x1C[0] == 2) {
|
||||
ZI_WORK->unk_0x1418 = 0;
|
||||
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 1;
|
||||
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->unk_0x1418++] = 2;
|
||||
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->unk_0x1418++] = 3;
|
||||
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->unk_0x1418++] = 4;
|
||||
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->unk_0x1418++] = 5;
|
||||
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->unk_0x1418++] = 6;
|
||||
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->unk_0x1418++] = 7;
|
||||
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->unk_0x1418++] = 8;
|
||||
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->unk_0x1418 = 2;
|
||||
else ZI_WORK->unk_0x1418 = 1;
|
||||
ZI_WORK->formatCount = 0;
|
||||
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->formatCount++] = 1;
|
||||
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 2;
|
||||
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->formatCount++] = 3;
|
||||
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->formatCount++] = 4;
|
||||
if (ZI_WORK->unk_0x09 & 1) formats[ZI_WORK->formatCount++] = 5;
|
||||
if (ZI_WORK->unk_0x09 & 4) formats[ZI_WORK->formatCount++] = 6;
|
||||
if (ZI_WORK->unk_0x09 & 2) formats[ZI_WORK->formatCount++] = 7;
|
||||
if (ZI_WORK->unk_0x09 & 8) formats[ZI_WORK->formatCount++] = 8;
|
||||
} else if (ZI_WORK->unk_0x1C[0] != 0) ZI_WORK->formatCount = 2;
|
||||
else ZI_WORK->formatCount = 1;
|
||||
count = Zi8GetCandidatesOrCount(&request, &search, __zi8_work_data);
|
||||
ZI_WORK->formats = savedFormats;
|
||||
ZI_WORK->unk_0x1418 = savedCount;
|
||||
ZI_WORK->formatCount = savedCount;
|
||||
if (count != 0) return 1;
|
||||
}
|
||||
if (language != 1) {
|
||||
|
||||
@@ -19,7 +19,7 @@ typedef struct _CDBRecordFile {
|
||||
#else
|
||||
u8 unk_0x00[0x1C - 0x00];
|
||||
#endif
|
||||
int unk_0x1C;
|
||||
int allocFlag; // 0x1C
|
||||
CDBAttr attr; // 0x20
|
||||
CDBBridgeFile bridgeFile; // 0x42C
|
||||
u8 unk_0x434[0x438 - 0x434];
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef struct NWC24MsgObjPrivate {
|
||||
#ifdef NWC24_MSG_READ
|
||||
u32 headerSize;
|
||||
#elif defined(NWC24_MBOX_CTRL) || defined(NWC24_MSG_COMMIT)
|
||||
u32 flags; // 0x10
|
||||
u32 headerSize; // 0x10
|
||||
#else
|
||||
u8 unk_0x10[0x4];
|
||||
#endif
|
||||
@@ -46,8 +46,8 @@ typedef struct NWC24MsgObjPrivate {
|
||||
#endif
|
||||
u32 date; // 0x28
|
||||
u32 receivedDate; // 0x2C
|
||||
NWC24Data unk_0x30;
|
||||
NWC24Data unk_0x38;
|
||||
NWC24Data fromData; // 0x30
|
||||
NWC24Data toData; // 0x38
|
||||
NWC24Data subject; // 0x40
|
||||
NWC24Data text; // 0x48
|
||||
NWC24Data unk_0x50;
|
||||
@@ -73,7 +73,7 @@ typedef struct NWC24MsgObjPrivate {
|
||||
};
|
||||
u32 raw;
|
||||
} msgBoardFlags; // 0xCC
|
||||
NWC24Data unk_0xD0;
|
||||
NWC24Data extraData; // 0xD0
|
||||
NWC24Data faceData; // 0xD8
|
||||
NWC24Data altName; // 0xE0
|
||||
u32 textSize; // 0xE4
|
||||
|
||||
@@ -26,9 +26,9 @@ extern struct NWC24Work {
|
||||
|
||||
u8 configData[1024]; // 0x1300
|
||||
|
||||
u8 unk_0x1700[128]; // 0x1700
|
||||
u8 unk_0x1780[128]; // 0x1780
|
||||
u8 unk_0x1800[256]; // 0x1800
|
||||
u8 sendMbcHeader[128]; // 0x1700
|
||||
u8 recvMbcHeader[128]; // 0x1780
|
||||
u8 mbcEntry[256]; // 0x1800
|
||||
u8 base64Work[256]; // 0x1900
|
||||
u8 unk_0x1A00[4096]; // 0x1A00
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ void CDBRecordInstanceInit(CDBRecordFile* recordFile, CDBRecord* record, int typ
|
||||
OSLockMutex((OSMutex*)recordFile);
|
||||
recordFile->used = 1;
|
||||
OSUnlockMutex((OSMutex*)recordFile);
|
||||
recordFile->unk_0x1C = type;
|
||||
recordFile->allocFlag = type;
|
||||
recordFile->database = record->unk_0x00;
|
||||
CDBAttrInit(&recordFile->attr);
|
||||
CDBRecordKeyCopy(&recordFile->key, &record->key);
|
||||
@@ -310,7 +310,7 @@ CDBErr CDBRecordWrite_(CDBRecord* record, void* buffer, u32 size) {
|
||||
CDBReportError("can't write data in the record; the record is closed\n");
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
if ((recordFile->unk_0x1C & 2) == 0) {
|
||||
if ((recordFile->allocFlag & 2) == 0) {
|
||||
CDBReportError("can't write data in the record; the record is opened as READONLY\n");
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
@@ -687,7 +687,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
if ((s32)recordFile == 0) {
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
if (recordFile->unk_0x1C == 1) {
|
||||
if (recordFile->allocFlag == 1) {
|
||||
return CDB_ERROR_26;
|
||||
}
|
||||
if ((s32)buffer == 0) {
|
||||
@@ -699,7 +699,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
tempFile = record->file;
|
||||
if ((s32)tempFile == 0) {
|
||||
result = CDB_ERROR_27;
|
||||
} else if (tempFile->unk_0x1C == 1) {
|
||||
} else if (tempFile->allocFlag == 1) {
|
||||
result = CDB_ERROR_26;
|
||||
} else {
|
||||
CDBAttrSetWiiId(&tempFile->attr, CDBGetWiiId());
|
||||
@@ -713,7 +713,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
CDBErr result;
|
||||
if ((s32)record->file == 0) {
|
||||
result = CDB_ERROR_27;
|
||||
} else if (((CDBRecordFile*)record->file)->unk_0x1C == 1) {
|
||||
} else if (((CDBRecordFile*)record->file)->allocFlag == 1) {
|
||||
result = CDB_ERROR_26;
|
||||
} else {
|
||||
CDBAttrInitIV(&((CDBRecordFile*)record->file)->attr);
|
||||
@@ -727,7 +727,7 @@ CDBErr CDBRecordEncrypt(CDBRecord* record, void* buffer, CDBRecordKey* key, u32
|
||||
CDBErr result;
|
||||
if ((s32)record->file == 0) {
|
||||
result = CDB_ERROR_27;
|
||||
} else if (((CDBRecordFile*)record->file)->unk_0x1C == 1) {
|
||||
} else if (((CDBRecordFile*)record->file)->allocFlag == 1) {
|
||||
result = CDB_ERROR_26;
|
||||
} else {
|
||||
CDBAttrSetKeyStr(&((CDBRecordFile*)record->file)->attr, key);
|
||||
|
||||
@@ -265,7 +265,7 @@ CDBErr CDBRecordFree(CDBRecord* record) {
|
||||
OSLockMutex((OSMutex*)recordFile);
|
||||
*(u32*)&recordFile->unk_0x00[0x18] = 0;
|
||||
OSUnlockMutex((OSMutex*)recordFile);
|
||||
recordFile->unk_0x1C = 0;
|
||||
recordFile->allocFlag = 0;
|
||||
record->file = NULL;
|
||||
OSUnlockMutex(&s_mutex);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ NWC24Err NWC24GetMsgObj(NWC24MsgObj* msg, NWC24MBoxType type, u32 id) {
|
||||
u32 count = 0;
|
||||
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
|
||||
return NWC24_ERR_LIB_NOT_OPENED;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
memset(entry, 0, sizeof(*entry));
|
||||
if (id == 0)
|
||||
return NWC24_ERR_HIDDEN;
|
||||
@@ -251,7 +251,7 @@ NWC24Err NWC24GetMsgIdList(NWC24MBoxType type, u32* ids, u32 maxLength) {
|
||||
MBCEntry* entry;
|
||||
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
|
||||
return NWC24_ERR_LIB_NOT_OPENED;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
err = GetCachedMBCHeader(type, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -307,11 +307,11 @@ NWC24Err NWC24iOpenMBox(void) {
|
||||
NWC24File recvFile, sendFile;
|
||||
char* path = NWC24WorkP->pathWork;
|
||||
NWC24Err err;
|
||||
Mail_memset(NWC24WorkP->unk_0x1700, 0, 128);
|
||||
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
|
||||
err = GetCachedMBCHeader(NWC24_MBOX_TYPE_SEND, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
|
||||
Mail_memset(NWC24WorkP->recvMbcHeader, 0, 128);
|
||||
err = GetCachedMBCHeader(NWC24_MBOX_TYPE_RECV, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -340,11 +340,11 @@ NWC24Err NWC24iInitMBox(void) {
|
||||
NWC24File recvFile, sendFile;
|
||||
NWC24Err recvResult, sendResult, err, sendStatus;
|
||||
char* path = NWC24WorkP->pathWork;
|
||||
Mail_memset(NWC24WorkP->unk_0x1700, 0, 128);
|
||||
Mail_memset(NWC24WorkP->sendMbcHeader, 0, 128);
|
||||
sendResult = CreateCtrlFile(NWC24_MBOX_TYPE_SEND, FALSE);
|
||||
if (sendResult < 0)
|
||||
return sendResult;
|
||||
Mail_memset(NWC24WorkP->unk_0x1780, 0, 128);
|
||||
Mail_memset(NWC24WorkP->recvMbcHeader, 0, 128);
|
||||
recvResult = CreateCtrlFile(NWC24_MBOX_TYPE_RECV, FALSE);
|
||||
if (recvResult < 0)
|
||||
return recvResult;
|
||||
@@ -616,11 +616,11 @@ static NWC24Err CreateCtrlFile(NWC24MBoxType type, BOOL force) {
|
||||
err = MakeCtrlPath(path, type);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
if (type == NWC24_MBOX_TYPE_SEND)
|
||||
header = (MBCHeader*)NWC24WorkP->unk_0x1700;
|
||||
header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
|
||||
else if (type == NWC24_MBOX_TYPE_RECV)
|
||||
header = (MBCHeader*)NWC24WorkP->unk_0x1780;
|
||||
header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
|
||||
else
|
||||
return NWC24_ERR_INVALID_VALUE;
|
||||
result = err;
|
||||
@@ -676,7 +676,7 @@ static NWC24Err DeleteMsg(NWC24MBoxType type, u32 id, BOOL protect) {
|
||||
NWC24Err err, deleteResult, closeResult;
|
||||
if (!NWC24IsMsgLibOpened() && !NWC24IsMsgLibOpenedByTool())
|
||||
return NWC24_ERR_LIB_NOT_OPENED;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
err = GetCachedMBCHeader(type, &header);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -754,7 +754,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms
|
||||
NWC24Err clearResult, deleteResult;
|
||||
if (type == NWC24_MBOX_TYPE_SEND)
|
||||
return NWC24_OK;
|
||||
entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
for (offset = 128; offset < header->fileSize; offset += 128) {
|
||||
if (count >= header->numMessages)
|
||||
break;
|
||||
@@ -783,7 +783,7 @@ static NWC24Err DuplicationCheck(MBCHeader* header, const NWC24MsgObjPrivate* ms
|
||||
continue;
|
||||
}
|
||||
if (msg->unk_0x1C != 0 && entry->crc == msg->unk_0x1C && entry->type == msg->type && entry->length == msg->length &&
|
||||
entry->flags == msg->flags && (s32)entry->date == (s32)msg->date) {
|
||||
entry->flags == msg->headerSize && (s32)entry->date == (s32)msg->date) {
|
||||
duplicateId = entry->msgId;
|
||||
duplicateOffset = offset;
|
||||
continue;
|
||||
@@ -809,9 +809,9 @@ static NWC24Err GetCachedMBCHeader(NWC24MBoxType type, MBCHeader** header) {
|
||||
char* path;
|
||||
NWC24Err err = NWC24_OK, closeResult;
|
||||
if (type == NWC24_MBOX_TYPE_SEND)
|
||||
*header = (MBCHeader*)NWC24WorkP->unk_0x1700;
|
||||
*header = (MBCHeader*)NWC24WorkP->sendMbcHeader;
|
||||
else if (type == NWC24_MBOX_TYPE_RECV)
|
||||
*header = (MBCHeader*)NWC24WorkP->unk_0x1780;
|
||||
*header = (MBCHeader*)NWC24WorkP->recvMbcHeader;
|
||||
else {
|
||||
*header = NULL;
|
||||
return NWC24_ERR_INVALID_VALUE;
|
||||
@@ -874,7 +874,7 @@ static NWC24Err InitMBCHeader(MBCHeader* header, NWC24MBoxType type) {
|
||||
|
||||
static NWC24Err AddMBCEntry(MBCHeader* header, const NWC24MsgObjPrivate* msg, NWC24File* file) {
|
||||
u32 offset = header->freeOffset;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
u32 next;
|
||||
NWC24Err err;
|
||||
if (offset == 0)
|
||||
@@ -906,7 +906,7 @@ static NWC24Err AddMBCEntry(MBCHeader* header, const NWC24MsgObjPrivate* msg, NW
|
||||
}
|
||||
|
||||
static NWC24Err ClearMBCEntry(MBCHeader* header, NWC24File* file, u32 offset) {
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->unk_0x1800;
|
||||
MBCEntry* entry = (MBCEntry*)NWC24WorkP->mbcEntry;
|
||||
NWC24Err err = NWC24FSeek(file, offset, NWC24_SEEK_BEG);
|
||||
if (err != NWC24_OK)
|
||||
return err;
|
||||
@@ -947,8 +947,8 @@ static NWC24Err MountVFMBox(NWC24MBoxType type) {
|
||||
}
|
||||
|
||||
static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entry) {
|
||||
u32 field1 = ((u32)msg->unk_0x30.ptr & 0xFFFFF) | (msg->unk_0x30.size << 20);
|
||||
u32 field2 = ((u32)msg->unk_0x38.ptr & 0xFFFFF) | (msg->unk_0x38.size << 20);
|
||||
u32 field1 = ((u32)msg->fromData.ptr & 0xFFFFF) | (msg->fromData.size << 20);
|
||||
u32 field2 = ((u32)msg->toData.ptr & 0xFFFFF) | (msg->toData.size << 20);
|
||||
u32 field3 = ((u32)msg->subject.ptr & 0xFFFFF) | (msg->subject.size << 20);
|
||||
u32 field4 = ((u32)msg->unk_0x50.ptr & 0xFFFFF) | (msg->unk_0x50.size << 20);
|
||||
u32 field5 = ((u32)msg->unk_0x58.ptr & 0xFFFFF) | (msg->unk_0x58.size << 20);
|
||||
@@ -956,7 +956,7 @@ static NWC24Err CopyMsgObjToMBCFmt(const NWC24MsgObjPrivate* msg, MBCEntry* entr
|
||||
entry->type = msg->type;
|
||||
entry->length = msg->length;
|
||||
entry->appId = msg->appId;
|
||||
entry->flags = msg->flags;
|
||||
entry->flags = msg->headerSize;
|
||||
entry->tag = msg->tag;
|
||||
entry->ledPattern = msg->ledPattern;
|
||||
entry->crc = msg->unk_0x1C;
|
||||
@@ -1003,7 +1003,7 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
|
||||
msg->type = entry->type;
|
||||
msg->length = entry->length;
|
||||
msg->appId = entry->appId;
|
||||
msg->flags = entry->flags;
|
||||
msg->headerSize = entry->flags;
|
||||
msg->tag = entry->tag;
|
||||
msg->ledPattern = entry->ledPattern;
|
||||
msg->unk_0x1C = entry->crc;
|
||||
@@ -1019,10 +1019,10 @@ static NWC24Err CopyMsgObjToPrvFmt(const MBCEntry* entry, NWC24MsgObjPrivate* ms
|
||||
msg->textSize = entry->textSize;
|
||||
msg->dwcId = entry->dwcId;
|
||||
msg->iconNew = entry->iconNew;
|
||||
msg->unk_0x30.ptr = (void*)offset1;
|
||||
msg->unk_0x30.size = size1;
|
||||
msg->unk_0x38.ptr = (void*)offset2;
|
||||
msg->unk_0x38.size = size2;
|
||||
msg->fromData.ptr = (void*)offset1;
|
||||
msg->fromData.size = size1;
|
||||
msg->toData.ptr = (void*)offset2;
|
||||
msg->toData.size = size2;
|
||||
msg->subject.ptr = (void*)offset3;
|
||||
msg->subject.size = size3;
|
||||
msg->unk_0x50.ptr = (void*)offset4;
|
||||
|
||||
@@ -243,11 +243,11 @@ static inline NWC24Err WriteMBDelayField(NWC24MsgObjPrivate* msg) {
|
||||
|
||||
static inline NWC24Err WriteExtraFields(NWC24MsgObjPrivate* msg) {
|
||||
NWC24Err err;
|
||||
if (msg->unk_0xD0.size == 0)
|
||||
if (msg->extraData.size == 0)
|
||||
return NWC24_OK;
|
||||
err = NWC24FWrite(msg->unk_0xD0.ptr, msg->unk_0xD0.size, m_pFile);
|
||||
err = NWC24FWrite(msg->extraData.ptr, msg->extraData.size, m_pFile);
|
||||
if (err == NWC24_OK)
|
||||
msg->length += msg->unk_0xD0.size;
|
||||
msg->length += msg->extraData.size;
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
|
||||
}
|
||||
CHECK_WRITE(WriteString(msg, buffer));
|
||||
if (msg->type & 0x10000) {
|
||||
msg->flags = msg->length;
|
||||
msg->headerSize = msg->length;
|
||||
buffer = NWC24WorkP->stringWork;
|
||||
Mail_memset(buffer, 0, 1024);
|
||||
Mail_sprintf(buffer, "\r\n--%s", MultiPartDivider);
|
||||
@@ -339,7 +339,7 @@ static NWC24Err NWC24CommitMsgInternal(NWC24MsgObjPrivate* msg, NWC24MBoxType ty
|
||||
}
|
||||
CHECK_WRITE(WriteContentTypeField(msg));
|
||||
if (!(msg->type & 0x10000))
|
||||
msg->flags = msg->length;
|
||||
msg->headerSize = msg->length;
|
||||
text.ptr = (const void*)msg->length;
|
||||
{ NWC24Err textResult = WritePlainText(msg);
|
||||
err = textResult == NWC24_ERR_NULL ? NWC24_OK : textResult; }
|
||||
@@ -577,7 +577,7 @@ static NWC24Err WriteFromField(NWC24MsgObjPrivate* msg) {
|
||||
Mail_memset(buffer, 0, 1024);
|
||||
Mail_strncat(buffer, "From: ", 1022);
|
||||
address = buffer + 6;
|
||||
msg->unk_0x30.ptr = (const void*)(msg->length + 6);
|
||||
msg->fromData.ptr = (const void*)(msg->length + 6);
|
||||
type = 1;
|
||||
if (msg->type & 0x100000)
|
||||
type = 2;
|
||||
@@ -596,7 +596,7 @@ static NWC24Err WriteFromField(NWC24MsgObjPrivate* msg) {
|
||||
err = NWC24FWrite(NWC24WorkP->stringWork, total, m_pFile);
|
||||
if (err == NWC24_OK) {
|
||||
msg->length += total;
|
||||
msg->unk_0x30.size = msg->length - (u32)msg->unk_0x30.ptr - 2;
|
||||
msg->fromData.size = msg->length - (u32)msg->fromData.ptr - 2;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
@@ -612,7 +612,7 @@ static NWC24Err WriteToField(NWC24MsgObjPrivate* msg) {
|
||||
cursor += 4;
|
||||
index = 0;
|
||||
total = 4;
|
||||
msg->unk_0x38.ptr = (const void*)(msg->length + 4);
|
||||
msg->toData.ptr = (const void*)(msg->length + 4);
|
||||
remaining = 1018;
|
||||
for (; index < msg->numTo; ++index) {
|
||||
err = SynthesizeAddrStr(&msg->toAddrs[index], msg->type, cursor, remaining, &length);
|
||||
@@ -641,7 +641,7 @@ static NWC24Err WriteToField(NWC24MsgObjPrivate* msg) {
|
||||
err = NWC24FWrite(NWC24WorkP->stringWork, total + 2, m_pFile);
|
||||
if (err == NWC24_OK) {
|
||||
msg->length += total + 2;
|
||||
msg->unk_0x38.size = msg->length - (u32)msg->unk_0x38.ptr - 2;
|
||||
msg->toData.size = msg->length - (u32)msg->toData.ptr - 2;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
|
||||
@@ -73,11 +73,11 @@ NWC24Err NWC24InitMsgObj(NWC24MsgObj* msg, NWC24MsgType type) {
|
||||
msgObj->attachedType[i] = NWC24_TEXT_PLAIN;
|
||||
}
|
||||
|
||||
NWC24Data_Init(&msgObj->unk_0x30);
|
||||
NWC24Data_Init(&msgObj->unk_0x38);
|
||||
NWC24Data_Init(&msgObj->fromData);
|
||||
NWC24Data_Init(&msgObj->toData);
|
||||
NWC24Data_Init(&msgObj->unk_0x50);
|
||||
NWC24Data_Init(&msgObj->unk_0x58);
|
||||
NWC24Data_Init(&msgObj->unk_0xD0);
|
||||
NWC24Data_Init(&msgObj->extraData);
|
||||
NWC24Data_Init(&msgObj->faceData);
|
||||
NWC24Data_Init(&msgObj->altName);
|
||||
|
||||
|
||||
@@ -289,7 +289,7 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
|
||||
default:
|
||||
return result;
|
||||
}
|
||||
if (privateMsg->unk_0x30.size == 0)
|
||||
if (privateMsg->fromData.size == 0)
|
||||
return NWC24_ERR_NULL;
|
||||
result = NWC24iMBoxOpenStoredMsg(type, privateMsg->msgId, &file);
|
||||
switch (result) {
|
||||
@@ -300,9 +300,9 @@ NWC24Err NWC24ReadMsgFromAddr(const NWC24MsgObj* msg, char* address, u32 capacit
|
||||
}
|
||||
result = NWC24FStreamInit(&stream, &file, 0, privateMsg->length, buffer, 1024);
|
||||
if (result == NWC24_OK) {
|
||||
result = NWC24FStreamSeek(&stream, (u32)privateMsg->unk_0x30.ptr);
|
||||
result = NWC24FStreamSeek(&stream, (u32)privateMsg->fromData.ptr);
|
||||
if (result == NWC24_OK)
|
||||
result = NWC24iExtractAddrSpec(&stream, privateMsg->unk_0x30.size, 0, address, capacity);
|
||||
result = NWC24iExtractAddrSpec(&stream, privateMsg->fromData.size, 0, address, capacity);
|
||||
}
|
||||
closeResult = NWC24iMBoxCloseMsg(&file);
|
||||
if (result != NWC24_OK)
|
||||
|
||||
@@ -648,7 +648,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped()) {
|
||||
if (System::getNwc24Manager() && !System::getNwc24Manager()->isUnk0xA31()) {
|
||||
if (System::getNwc24Manager() && !System::getNwc24Manager()->isReceivingIdle()) {
|
||||
goto scn_continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ FaderSceneCommand SDChannelTitle::calcFadeout() {
|
||||
mWpadStopTick = OSGetTick();
|
||||
}
|
||||
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN && System::isReceiveScheduleStopped() &&
|
||||
(!System::getNwc24Manager() || System::getNwc24Manager()->isUnk0xA31())) {
|
||||
(!System::getNwc24Manager() || System::getNwc24Manager()->isReceivingIdle())) {
|
||||
OSReport("NWC24 Scheduler stopped.\n");
|
||||
NandSDWorker* worker = mpChannelSelect->getWorker();
|
||||
if (mNextScene == 17) {
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace ipl {
|
||||
// clang-format on
|
||||
|
||||
SettingButton::SettingButton(EGG::Heap* heap, int arg) : FaderSceneBase(heap), ::gui::EventHandler() {
|
||||
unk_0x264 = 64;
|
||||
unk_0x268 = 0;
|
||||
unk_0x26C = 0;
|
||||
unk_0x270 = 0;
|
||||
mQueueCapacity = 64;
|
||||
mQueueCount = 0;
|
||||
mQueueRead = 0;
|
||||
mQueueWrite = 0;
|
||||
mSettingArg = arg;
|
||||
mpLayout = NULL;
|
||||
mpLayoutFile = NULL;
|
||||
@@ -81,9 +81,9 @@ namespace ipl {
|
||||
|
||||
FaderSceneCommand SettingButton::calcNormal() {
|
||||
if (!mpLayout->getAnim(ANIM_ALPHA_IN)->isPlaying() && !mpLayout->getAnim(ANIM_ALPHA_OUT)->isPlaying() &&
|
||||
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && unk_0x268 != 0) {
|
||||
Unk unk = unk_0x64[unk_0x26C];
|
||||
switch (unk.command) {
|
||||
!mpLayout->getAnim(ANIM_BTN_FLASH)->isPlaying() && mQueueCount != 0) {
|
||||
CmdEntry entry = mCmdQueue[mQueueRead];
|
||||
switch (entry.command) {
|
||||
case CMD_SHOW_BTN: {
|
||||
showBtn();
|
||||
break;
|
||||
@@ -93,16 +93,16 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case CMD_SET_TEXT: {
|
||||
setText(unk.msgID);
|
||||
setText(entry.msgID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (unk_0x268 != 0) {
|
||||
if (++unk_0x26C >= unk_0x264) {
|
||||
unk_0x26C = 0;
|
||||
if (mQueueCount != 0) {
|
||||
if (++mQueueRead >= mQueueCapacity) {
|
||||
mQueueRead = 0;
|
||||
}
|
||||
unk_0x268--;
|
||||
mQueueCount--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,16 +225,16 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void SettingButton::reserve(int command, u32 msgId) {
|
||||
if (unk_0x264 != unk_0x268) {
|
||||
int unk = unk_0x270;
|
||||
unk_0x64[unk].command = command;
|
||||
unk_0x64[unk].msgID = msgId;
|
||||
unk_0x270++;
|
||||
if (mQueueCapacity != mQueueCount) {
|
||||
int writeIdx = mQueueWrite;
|
||||
mCmdQueue[writeIdx].command = command;
|
||||
mCmdQueue[writeIdx].msgID = msgId;
|
||||
mQueueWrite++;
|
||||
|
||||
if (unk_0x270 >= unk_0x264) {
|
||||
unk_0x270 = 0;
|
||||
if (mQueueWrite >= mQueueCapacity) {
|
||||
mQueueWrite = 0;
|
||||
}
|
||||
unk_0x268++;
|
||||
mQueueCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,17 +46,17 @@ namespace ipl {
|
||||
}
|
||||
if (mButton != 0) {
|
||||
if (down(BTN_INTERACT)) {
|
||||
unk_0x08++;
|
||||
mDecideHoldCount++;
|
||||
} else {
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mButton = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
}
|
||||
} else {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
}
|
||||
|
||||
switch (mRumbleType) {
|
||||
@@ -109,7 +109,7 @@ namespace ipl {
|
||||
return NULL;
|
||||
}
|
||||
int ipl::controller::Base::decide() const {
|
||||
return unk_0x08 == 5;
|
||||
return mDecideHoldCount == 5;
|
||||
}
|
||||
int ipl::controller::Base::rumble(int type) {
|
||||
int ret = FALSE;
|
||||
@@ -130,44 +130,44 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Revolution::read() {
|
||||
if (!isValidDpd()) {
|
||||
unk_0x20->pos.y = 1.0f / 0.0f;
|
||||
unk_0x20->pos.x = 1.0f / 0.0f;
|
||||
unk_0x20->speed = 0.0f;
|
||||
unk_0x20->vec.y = 0.0f;
|
||||
unk_0x20->vec.x = 0.0f;
|
||||
mpStatus->pos.y = 1.0f / 0.0f;
|
||||
mpStatus->pos.x = 1.0f / 0.0f;
|
||||
mpStatus->speed = 0.0f;
|
||||
mpStatus->vec.y = 0.0f;
|
||||
mpStatus->vec.x = 0.0f;
|
||||
}
|
||||
|
||||
unk_0x1E = unk_0x1D;
|
||||
mbPrevPinch = mbPinch;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x1E == 0) {
|
||||
if (mbPrevPinch == 0) {
|
||||
if (down(0x800) && down(0x400)) {
|
||||
unk_0x1D = 1;
|
||||
mbPinch = 1;
|
||||
}
|
||||
} else if (!down(0x800) || !down(0x400)) {
|
||||
unk_0x1D = 0;
|
||||
mbPinch = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x1D = 0;
|
||||
mbPinch = 0;
|
||||
}
|
||||
|
||||
Base::read();
|
||||
}
|
||||
bool ipl::controller::Revolution::isValidDpd() const {
|
||||
if (unk_0x1C != 0) {
|
||||
if (mbForceInvalid != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (unk_0x20->wpad_err == 0 || unk_0x20->wpad_err == -7) && unk_0x20->dpd_valid_fg != 0;
|
||||
return (mpStatus->wpad_err == 0 || mpStatus->wpad_err == -7) && mpStatus->dpd_valid_fg != 0;
|
||||
}
|
||||
bool ipl::controller::Revolution::isValidBtn() const {
|
||||
u8 val = unk_0x20->wpad_err;
|
||||
u8 val = mpStatus->wpad_err;
|
||||
|
||||
return (u8)(val + 7) <= 7 && ((1 << (val + 7)) & 0xA1) != 0;
|
||||
}
|
||||
bool ipl::controller::Revolution::down(u32 mButton) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x20->hold & (mButton & 0xFFFF)) {
|
||||
if (mpStatus->hold & (mButton & 0xFFFF)) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ namespace ipl {
|
||||
ipl::math::VEC2 ipl::controller::Revolution::getDpdProjectionPos() const {
|
||||
math::VEC2 ret;
|
||||
Vec2 dest;
|
||||
Vec2 src = {unk_0x20->pos.x, unk_0x20->pos.y};
|
||||
Vec2 src = {mpStatus->pos.x, mpStatus->pos.y};
|
||||
nw4r::ut::Rect nw4r_rect; // constructor shouldn't be inlined
|
||||
Rect kpad_rect;
|
||||
|
||||
@@ -216,9 +216,9 @@ namespace ipl {
|
||||
y = fy;
|
||||
}
|
||||
ipl::controller::Classic::Classic(int arg0, KPADStatus& arg1) : Revolution(arg0, arg1) {
|
||||
unk_0x24.x = 0.01f;
|
||||
unk_0x24.y = 0.01f;
|
||||
unk_0x2C = 0;
|
||||
mClassicCursor.x = 0.01f;
|
||||
mClassicCursor.y = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
ipl::controller::Base::~Base() {
|
||||
}
|
||||
@@ -230,32 +230,32 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Classic::read() {
|
||||
if (!Revolution::isValidDpd()) {
|
||||
math::VEC2 lstick(unk_0x20->ex_status.cl.lstick.x, unk_0x20->ex_status.cl.lstick.y);
|
||||
math::VEC2 lstick(mpStatus->ex_status.cl.lstick.x, mpStatus->ex_status.cl.lstick.y);
|
||||
|
||||
if (lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f) {
|
||||
unk_0x24.x = math::abs_clamp(unk_0x24.x + unk_0x20->ex_status.cl.lstick.x * 0.05f, 1.8f);
|
||||
unk_0x24.y = math::abs_clamp(unk_0x24.y - unk_0x20->ex_status.cl.lstick.y * 0.05f, 1.2f);
|
||||
mClassicCursor.x = math::abs_clamp(mClassicCursor.x + mpStatus->ex_status.cl.lstick.x * 0.05f, 1.8f);
|
||||
mClassicCursor.y = math::abs_clamp(mClassicCursor.y - mpStatus->ex_status.cl.lstick.y * 0.05f, 1.2f);
|
||||
}
|
||||
|
||||
math::VEC2 rstick = math::VEC2(unk_0x20->ex_status.cl.rstick.x, unk_0x20->ex_status.cl.rstick.y);
|
||||
math::VEC2 rstick = math::VEC2(mpStatus->ex_status.cl.rstick.x, mpStatus->ex_status.cl.rstick.y);
|
||||
if (getClassicHoldFlag() != 0 || lstick.x * lstick.x + lstick.y * lstick.y > 0.0036f ||
|
||||
rstick.x * rstick.x + rstick.y * rstick.y > 0.0036f) {
|
||||
unk_0x2C = 180;
|
||||
mClassicCursorTimer = 180;
|
||||
}
|
||||
|
||||
if (--unk_0x2C < 0) {
|
||||
unk_0x2C = 0;
|
||||
if (--mClassicCursorTimer < 0) {
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
} else {
|
||||
unk_0x24.y = 0.01f;
|
||||
unk_0x24.x = 0.01f;
|
||||
unk_0x2C = 0;
|
||||
mClassicCursor.y = 0.01f;
|
||||
mClassicCursor.x = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
|
||||
Revolution::read();
|
||||
}
|
||||
int ipl::controller::Classic::getClassicHoldFlag() const {
|
||||
return unk_0x20->ex_status.cl.hold;
|
||||
return mpStatus->ex_status.cl.hold;
|
||||
}
|
||||
template <>
|
||||
f32 ipl::math::abs_clamp<f32>(const f32& x, const f32& y) {
|
||||
@@ -270,7 +270,7 @@ namespace ipl {
|
||||
ipl::math::VEC2 ipl::controller::Classic::getHorizon() const {
|
||||
math::VEC2 ret;
|
||||
if (Revolution::isValidDpd()) {
|
||||
ret.set(unk_0x20->horizon.x, unk_0x20->horizon.y);
|
||||
ret.set(mpStatus->horizon.x, mpStatus->horizon.y);
|
||||
} else {
|
||||
ret.x = 1.0f;
|
||||
ret.y = -0.2679492f;
|
||||
@@ -280,9 +280,9 @@ namespace ipl {
|
||||
ipl::math::VEC2 ipl::controller::Classic::getDpdPos() const {
|
||||
math::VEC2 ret;
|
||||
if (Revolution::isValidDpd()) {
|
||||
ret.set(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
} else if (unk_0x2C != 0) {
|
||||
ret = unk_0x24;
|
||||
ret.set(mpStatus->pos.x, mpStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursor;
|
||||
} else {
|
||||
ret.x = (1.0f / 0.0f);
|
||||
ret.y = (1.0f / 0.0f);
|
||||
@@ -296,9 +296,9 @@ namespace ipl {
|
||||
ipl::math::VEC2 ipl::controller::Classic::getDpdProjectionPos() const {
|
||||
math::VEC2 ret;
|
||||
if (Revolution::isValidDpd()) {
|
||||
ret.set(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
} else if (unk_0x2C != 0) {
|
||||
ret = unk_0x24;
|
||||
ret.set(mpStatus->pos.x, mpStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursor;
|
||||
} else {
|
||||
ret.set(1.0f / 0.0f, 1.0f / 0.0f);
|
||||
}
|
||||
@@ -454,7 +454,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
return -1;
|
||||
}
|
||||
void ipl::controller::Base::setForceInvalid(bool flag) {
|
||||
unk_0x1C = flag;
|
||||
mbForceInvalid = flag;
|
||||
}
|
||||
int ipl::controller::Base::getType() const {
|
||||
return mType;
|
||||
@@ -463,65 +463,65 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
return mChan;
|
||||
}
|
||||
KPADStatus* ipl::controller::Revolution::getKPADStatus() const {
|
||||
return unk_0x20;
|
||||
return mpStatus;
|
||||
}
|
||||
f32 ipl::controller::Revolution::getDpdDistance() const {
|
||||
return unk_0x20->dist;
|
||||
return mpStatus->dist;
|
||||
}
|
||||
int ipl::controller::Revolution::getReleaseFlag() const {
|
||||
return unk_0x20->release;
|
||||
return mpStatus->release;
|
||||
}
|
||||
int ipl::controller::Revolution::getTrigFlag() const {
|
||||
return unk_0x20->trig;
|
||||
return mpStatus->trig;
|
||||
}
|
||||
int ipl::controller::Revolution::getHoldFlag() const {
|
||||
return unk_0x20->hold;
|
||||
return mpStatus->hold;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchOffTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D == 0 && unk_0x1E != 0) {
|
||||
if (isValidBtn() && mbPinch == 0 && mbPrevPinch != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinch() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D != 0) {
|
||||
if (isValidBtn() && mbPinch != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && unk_0x1D != 0 && unk_0x1E == 0) {
|
||||
if (isValidBtn() && mbPinch != 0 && mbPrevPinch == 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
bool ipl::controller::Revolution::repeat(u32 button) const {
|
||||
return down(button) && (unk_0x20->hold & 0x80000000) != 0;
|
||||
return down(button) && (mpStatus->hold & 0x80000000) != 0;
|
||||
}
|
||||
BOOL ipl::controller::Classic::isValidDpdClassic() const {
|
||||
return unk_0x2C != 0;
|
||||
return mClassicCursorTimer != 0;
|
||||
}
|
||||
bool ipl::controller::Classic::isValidDpd() const {
|
||||
if (unk_0x1C != 0) {
|
||||
if (mbForceInvalid != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (Revolution::isValidDpd() != 0) || (unk_0x2C != 0);
|
||||
return (Revolution::isValidDpd() != 0) || (mClassicCursorTimer != 0);
|
||||
}
|
||||
int ipl::controller::Classic::getClassicReleaseFlag() const {
|
||||
return unk_0x20->ex_status.cl.release;
|
||||
return mpStatus->ex_status.cl.release;
|
||||
}
|
||||
int ipl::controller::Classic::getClassicTrigFlag() const {
|
||||
return unk_0x20->ex_status.cl.trig;
|
||||
return mpStatus->ex_status.cl.trig;
|
||||
}
|
||||
bool ipl::controller::Classic::upTrg(u32 button) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
bool pressed = true;
|
||||
KPADStatus* status = unk_0x20;
|
||||
KPADStatus* status = mpStatus;
|
||||
if ((status->release & (button & 0xFFFF)) == 0) {
|
||||
if ((status->ex_status.cl.release & (button >> 16)) == 0) {
|
||||
pressed = false;
|
||||
@@ -537,7 +537,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
bool pressed = true;
|
||||
KPADStatus* status = unk_0x20;
|
||||
KPADStatus* status = mpStatus;
|
||||
if ((status->trig & (button & 0xFFFF)) == 0) {
|
||||
if ((status->ex_status.cl.trig & (button >> 16)) == 0) {
|
||||
pressed = false;
|
||||
@@ -553,8 +553,8 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
bool pressed = true;
|
||||
if ((unk_0x20->hold & (button & 0xFFFF)) == 0) {
|
||||
if ((unk_0x20->ex_status.cl.hold & (button >> 16)) == 0) {
|
||||
if ((mpStatus->hold & (button & 0xFFFF)) == 0) {
|
||||
if ((mpStatus->ex_status.cl.hold & (button >> 16)) == 0) {
|
||||
pressed = false;
|
||||
}
|
||||
}
|
||||
@@ -565,15 +565,15 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
return ret;
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Revolution::getHorizon() const {
|
||||
return math::VEC2(unk_0x20->horizon.x, unk_0x20->horizon.y);
|
||||
return math::VEC2(mpStatus->horizon.x, mpStatus->horizon.y);
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Revolution::getDpdPos() const {
|
||||
return math::VEC2(unk_0x20->pos.x, unk_0x20->pos.y);
|
||||
return math::VEC2(mpStatus->pos.x, mpStatus->pos.y);
|
||||
}
|
||||
bool ipl::controller::Revolution::upTrg(u32 button) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x20->release & (button & 0xFFFF)) {
|
||||
if (mpStatus->release & (button & 0xFFFF)) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
bool ipl::controller::Revolution::downTrg(u32 button) const {
|
||||
bool ret = false;
|
||||
if (isValidBtn()) {
|
||||
if (unk_0x20->trig & (button & 0xFFFF)) {
|
||||
if (mpStatus->trig & (button & 0xFFFF)) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,9 +152,9 @@ namespace ipl {
|
||||
}
|
||||
|
||||
Revolution::Revolution(int chan, int type, KPADStatus& status) : Base(chan, type, status) {
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &status;
|
||||
}
|
||||
|
||||
Interface* Manager::getMasterController() {
|
||||
|
||||
@@ -43,13 +43,13 @@ namespace ipl {
|
||||
mMessageID = msgId;
|
||||
|
||||
// Debug related? (seems to be incomplete; unused)
|
||||
unk_0x0C = arg2;
|
||||
unk_0x10 = arg3;
|
||||
mArg2 = arg2;
|
||||
mArg3 = arg3;
|
||||
if (arg1) {
|
||||
strncpy(unk_0x14, arg1, sizeof(unk_0x14));
|
||||
unk_0x14[sizeof(unk_0x14) - 1] = 0;
|
||||
strncpy(mArg1, arg1, sizeof(mArg1));
|
||||
mArg1[sizeof(mArg1) - 1] = 0;
|
||||
} else {
|
||||
memset(unk_0x14, 0, sizeof(unk_0x14));
|
||||
memset(mArg1, 0, sizeof(mArg1));
|
||||
}
|
||||
|
||||
curThread = OSGetCurrentThread();
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace ipl {
|
||||
(((mLastError > NWC24_ERR_FILE_OPEN || mLastError < NWC24_ERR_FILE_OTHER) && mLastError != NWC24_ERR_NAND_CORRUPT) && \
|
||||
(mLastError != NWC24_ERR_FILE_EXISTS && mLastError != NWC24_ERR_INTERNAL_VF && mLastError != NWC24_ERR_FILE_BROKEN))
|
||||
|
||||
Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), unk_0xA31(false), mbReceivePaused(false), unk_0xA33(false) {
|
||||
Manager::Manager(EGG::Heap* heap) : mbReviecedMsg(false), mbReceiving(false), mbReceivePaused(false), mbNewTitleTblReady(false) {
|
||||
OSInitMutex(&mLock);
|
||||
OSInitMutex(&mAutoLock);
|
||||
|
||||
@@ -526,7 +526,7 @@ namespace ipl {
|
||||
return;
|
||||
}
|
||||
|
||||
unk_0xA31 = true;
|
||||
mbReceiving = true;
|
||||
|
||||
NWC24UserId myUserId;
|
||||
getMyUserId(&myUserId);
|
||||
@@ -910,8 +910,8 @@ namespace ipl {
|
||||
|
||||
close();
|
||||
|
||||
unk_0xA33 = true;
|
||||
unk_0xA31 = false;
|
||||
mbNewTitleTblReady = true;
|
||||
mbReceiving = false;
|
||||
}
|
||||
|
||||
void Manager::addDlTask() {
|
||||
@@ -996,7 +996,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
BOOL Manager::getNewTitleTbl(u32* titleTbl) const {
|
||||
if (!unk_0xA33) {
|
||||
if (!mbNewTitleTblReady) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace ipl {
|
||||
if (System::getPostmanManager()->IsUnknown() ||
|
||||
(System::getSceneManager() != NULL && System::getScene(SCENE_ADDRESS) != NULL)) {
|
||||
if (System::getNwc24Manager() != NULL && !System::isNandFull()) {
|
||||
if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isUnk0xA31()) {
|
||||
if (System::createdAfterAndLibMgr() && !System::getNwc24Manager()->isReceivingIdle()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user