Compare commits
1 Commits
cleanup/ip
...
cleanup/co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b8d11475d |
@@ -185,8 +185,8 @@ namespace ipl {
|
||||
gui::PaneManager* mpGui; // 0x74
|
||||
|
||||
BOOL mbHovered[BTN_MAX]; // 0x78
|
||||
u32 mPendingSceneId;
|
||||
u32 mExitSeqStep;
|
||||
u32 unk_0x90;
|
||||
u32 unk_0x94;
|
||||
|
||||
static const char* smButtonName[BTN_MAX];
|
||||
};
|
||||
|
||||
@@ -365,8 +365,8 @@ namespace ipl {
|
||||
int getChJumpChanPage() { return mChJumpPage; }
|
||||
int getChJumpChanIndex() { return mChJumpIndex; }
|
||||
|
||||
void setDiskChannelReady(bool flag) { mbDiskChannelReady = flag; }
|
||||
bool isDiskChannelReady() { return mbDiskChannelReady; }
|
||||
void setUnk_0x1B81(bool flag) { unk_0x1B81 = flag; }
|
||||
bool isUnk_0x1B81() { return unk_0x1B81; }
|
||||
|
||||
void resetChJumpLoad() { mbLoadedChJump = false; }
|
||||
bool hasLoadedChJump() { return mbLoadedChJump; }
|
||||
@@ -399,7 +399,7 @@ namespace ipl {
|
||||
|
||||
int mBS2State; // 0x1B7C
|
||||
bool mbCanRefresh; // 0x1B80
|
||||
bool mbDiskChannelReady;
|
||||
bool unk_0x1B81;
|
||||
|
||||
u8* mpDiskIconBuf; // 0x1B84
|
||||
u8* mpDiskBannerBuf; // 0x1B88
|
||||
|
||||
@@ -125,9 +125,9 @@ namespace ipl {
|
||||
mType = 2;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &status;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &status;
|
||||
}
|
||||
|
||||
Base(int chan, int type, KPADStatus& status) {
|
||||
@@ -158,9 +158,9 @@ namespace ipl {
|
||||
u32 mChan;
|
||||
u32 mType;
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinching;
|
||||
u8 mbWasPinching;
|
||||
KPADStatus* mpKpadStatus;
|
||||
u8 mbPinch;
|
||||
u8 mbPrevPinch;
|
||||
KPADStatus* mpStatus;
|
||||
};
|
||||
|
||||
class Revolution : public Base {
|
||||
@@ -206,7 +206,7 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const;
|
||||
|
||||
private:
|
||||
math::VEC2 mClassicCursorPos;
|
||||
math::VEC2 mClassicCursor;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
@@ -273,9 +273,9 @@ namespace ipl {
|
||||
|
||||
KPADEnableDPD(chan);
|
||||
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &arg1;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &arg1;
|
||||
}
|
||||
|
||||
virtual ~Base(); // 0x08
|
||||
@@ -332,9 +332,9 @@ namespace ipl {
|
||||
u32 mChan; // 0x14
|
||||
u32 mType; // 0x18
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinching; // 0x1D
|
||||
u8 mbWasPinching; // 0x1E
|
||||
KPADStatus* mpKpadStatus; // 0x20
|
||||
u8 mbPinch; // 0x1D
|
||||
u8 mbPrevPinch; // 0x1E
|
||||
KPADStatus* mpStatus; // 0x20
|
||||
};
|
||||
|
||||
class Interface : public Base {
|
||||
@@ -446,7 +446,7 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const; // 0x8C
|
||||
|
||||
private:
|
||||
math::VEC2 mClassicCursorPos;
|
||||
math::VEC2 mClassicCursor;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ struct __zi8_work_data_s {
|
||||
struct {
|
||||
ziU32 msb : 1;
|
||||
} bits;
|
||||
} pyFuzzy; // 0x1B28
|
||||
} unk_0x1B28;
|
||||
union {
|
||||
ziU32 word;
|
||||
struct {
|
||||
|
||||
@@ -577,27 +577,27 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
|
||||
if (getMode == 1) {
|
||||
switch ((int)match.phon2[index] >> 9) {
|
||||
case 24: case 25:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->cANDch) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->cANDch) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 26: case 27:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->sANDsh) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->sANDsh) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 28: case 29:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->zANDzh) ordinalIndex = 0xFDFF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->zANDzh) ordinalIndex = 0xFDFF;
|
||||
break;
|
||||
case 56: case 59:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->fANDh) ordinalIndex = 0xF9FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->fANDh) ordinalIndex = 0xF9FF;
|
||||
break;
|
||||
case 38:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
break;
|
||||
case 43:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl && ((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xE1FF;
|
||||
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xF1FF;
|
||||
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl && ((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xE1FF;
|
||||
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
|
||||
else if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->nANDl) ordinalIndex = 0xE5FF;
|
||||
break;
|
||||
case 44:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->lANDr) ordinalIndex = 0xF1FF;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->lANDr) ordinalIndex = 0xF1FF;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -650,13 +650,13 @@ static int zi8InternalGetZH(ziGetParam* request, ZiChineseOptions* options, ziPt
|
||||
if (getMode == 1) {
|
||||
switch (match.phon2[index] & 0x1F0) {
|
||||
case 0x10: case 0x80: case 0x100:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->anANDang) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->anANDang) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
case 0x180:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->enANDeng) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->enANDeng) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
case 0x60:
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->pyFuzzy.word)->inANDing) ordinalIndex = 0xFFF7;
|
||||
if (((ziFuzzyPYPairs*)&((struct __zi8_work_data_s*)work)->unk_0x1B28.word)->inANDing) ordinalIndex = 0xFFF7;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -32,9 +32,9 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
|
||||
ziBool Zi8ZHsetPYfuzzyPairs(ziFuzzyPYPairs pairs ZI_NEED_WORK) {
|
||||
if (pairs.ziDefault) {
|
||||
ZI_WORK->pyFuzzy.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
|
||||
ZI_WORK->unk_0x1B28.word = *(const ziU32*)&Zi8PYdefaultFuzzyPairs;
|
||||
} else {
|
||||
ZI_WORK->pyFuzzy.word = *(ziU32*)&pairs;
|
||||
ZI_WORK->unk_0x1B28.word = *(ziU32*)&pairs;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ ziU8 Zi8InitializeDynamic(ziLanguageEntry* langEntries ZI_NEED_WORK) {
|
||||
ZADP_Zi8SetPDremoveOpt(1, ZI_WORK);
|
||||
ZI_WORK->unk_0x17 = 5;
|
||||
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1, ZI_WORK) & 2;
|
||||
ZI_WORK->pyFuzzy.bits.msb = 1;
|
||||
ZI_WORK->unk_0x1B28.bits.msb = 1;
|
||||
ZI_WORK->unk_0x1B2C.bits.msb = 1;
|
||||
zyFuzzy = ZI_WORK->unk_0x1B2C.word;
|
||||
pzyFuzzy = &zyFuzzy;
|
||||
Zi8ZHsetZYfuzzyPairs(pzyFuzzy, ZI_WORK);
|
||||
pyFuzzy = ZI_WORK->pyFuzzy.word;
|
||||
pyFuzzy = ZI_WORK->unk_0x1B28.word;
|
||||
ppyFuzzy = &pyFuzzy;
|
||||
Zi8ZHsetPYfuzzyPairs(ppyFuzzy, ZI_WORK);
|
||||
Zi8SetParentalControls(2, ZI_WORK);
|
||||
|
||||
@@ -171,7 +171,7 @@ typedef struct WPADExtConfig {
|
||||
|
||||
typedef struct WPADCB {
|
||||
WPADGameInfo gameInfo; // 0x00
|
||||
s32 gameInfoStatus[2]; // 0x38
|
||||
s32 unk_0x38[2];
|
||||
u8 rxBufMain[RX_BUFFER_SIZE]; // 0x40
|
||||
u8 rxBufs[2][RX_BUFFER_SIZE]; // 0xA0
|
||||
WPADCommandQueue stdCmdQueue; // 0x160
|
||||
|
||||
@@ -1298,8 +1298,8 @@ static void __ClearControlBlock(s32 chan) {
|
||||
memset(&p->decryptXorTable, 0, sizeof(p->decryptXorTable));
|
||||
memset(&p->gameInfo, 0, sizeof(WPADGameInfo));
|
||||
|
||||
p->gameInfoStatus[0] = -1;
|
||||
p->gameInfoStatus[1] = -1;
|
||||
p->unk_0x38[0] = -1;
|
||||
p->unk_0x38[1] = -1;
|
||||
|
||||
p->stdCmdQueue.buffer = p->stdCmdQueueList;
|
||||
p->stdCmdQueue.capacity = ARRAY_LENGTH(p->stdCmdQueueList);
|
||||
|
||||
@@ -547,9 +547,9 @@ static void getGameInfo(s32 chan, s32 result, u8 index) {
|
||||
|
||||
if (p_info->checksum == sum) {
|
||||
memcpy(&p_wpd->gameInfo, p_buf, sizeof(WPADMEMGameInfo));
|
||||
p_wpd->gameInfoStatus[index] = WPAD_ERR_NONE;
|
||||
p_wpd->unk_0x38[index] = WPAD_ERR_NONE;
|
||||
} else {
|
||||
p_wpd->gameInfoStatus[index] = WPAD_ERR_INVALID;
|
||||
p_wpd->unk_0x38[index] = WPAD_ERR_INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1844,7 +1844,7 @@ namespace ipl {
|
||||
initChanZoomParam(myVec, 1);
|
||||
setChanZoomOrtho();
|
||||
|
||||
if (System::getChannelManager()->isDiskChannelReady()) {
|
||||
if (System::getChannelManager()->isUnk_0x1B81()) {
|
||||
if (System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_RVL_GAME ||
|
||||
System::getBS2Manager()->getIPLState() == bs2::IPL_STATE_DISK_UPDATE) {
|
||||
if (mspDiskID != NULL) {
|
||||
@@ -1856,7 +1856,7 @@ namespace ipl {
|
||||
|
||||
if (strncmp(diskID, mspDiskID, 4) == 0) {
|
||||
if (strncmp(diskMaker, mspDiskMaker, 2) == 0) {
|
||||
System::getChannelManager()->setDiskChannelReady(false);
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace ipl {
|
||||
mpDiskBnrLayout->calc();
|
||||
} else {
|
||||
calcModuleChannel();
|
||||
System::getChannelManager()->setDiskChannelReady(false);
|
||||
System::getChannelManager()->setUnk_0x1B81(false);
|
||||
}
|
||||
|
||||
if ((mState == STATE_NORMAL || mState == STATE_WAIT_TMD || mState == STATE_PREPARE_BOOT || mState == STATE_BOOT_SCENE) && !unk_0x90 &&
|
||||
@@ -1220,7 +1220,7 @@ namespace ipl {
|
||||
#pragma ppc_iro_level 0
|
||||
void ChannelTitle::calcNormalParentalDialog() {
|
||||
if (mChanSceneID == SCENE_DISK_CHANNEL &&
|
||||
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady())) {
|
||||
(System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81())) {
|
||||
mParentalState = PARENTAL_STATE_FAILED;
|
||||
}
|
||||
|
||||
@@ -2064,7 +2064,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case DISK_STATE_WII_DISK_IDLE: {
|
||||
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isDiskChannelReady()) {
|
||||
if (BS2State != bs2::IPL_STATE_RVL_GAME || System::getChannelManager()->isUnk_0x1B81()) {
|
||||
mDiskState = DISK_STATE_EJECT;
|
||||
mpDiskBnrAnims[DISK_ANIM_GRP_ALL][DISK_ANIM_DISK_EJECT]->play();
|
||||
mpDiskBnrLayout->GetRootPane()->SetVisible(true);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace ipl {
|
||||
|
||||
SettingSelect::SettingSelect(EGG::Heap* heap, int arg)
|
||||
: Base(heap), ::gui::EventHandler(), mState(STATE_WAIT_BUTTON_FADE_IN), mPrevState(STATE_WAIT_BUTTON_FADE_IN), mSettingArg(arg),
|
||||
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), mPendingSceneId(0), mExitSeqStep(0) {
|
||||
mpLayout(NULL), mpLayoutFile(NULL), mpGui(NULL), unk_0x90(0), unk_0x94(0) {
|
||||
setSceneParentFlags(SCN_PARENTFLAG_CALC | SCN_PARENTFLAG_DRAW);
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace ipl {
|
||||
|
||||
void SettingSelect::stt_1st_fadeout() {
|
||||
if (is_stopped_all_anm()) {
|
||||
if (mPendingSceneId != 0) {
|
||||
if (unk_0x90 != 0) {
|
||||
System::getFader()->fadeOut();
|
||||
CHANGE_STATE(STATE_WAIT_BLACK_OUT);
|
||||
} else {
|
||||
@@ -247,7 +247,7 @@ namespace ipl {
|
||||
|
||||
void SettingSelect::stt_2nd_fadeout() {
|
||||
if (is_stopped_all_anm()) {
|
||||
if (mPendingSceneId != 0) {
|
||||
if (unk_0x90 != 0) {
|
||||
CHANGE_STATE(STATE_WAIT_CHILD);
|
||||
reset_gui();
|
||||
} else {
|
||||
@@ -309,7 +309,7 @@ namespace ipl {
|
||||
case STATE_1ST_NORMAL: {
|
||||
System::getChannelManager()->refreshAsync();
|
||||
System::getFader()->fadeOut();
|
||||
mPendingSceneId = SCENE_BOARD;
|
||||
unk_0x90 = 4;
|
||||
|
||||
reserveAllSceneDestruction(SCENE_BOARD, NULL);
|
||||
|
||||
@@ -369,8 +369,8 @@ namespace ipl {
|
||||
int backAnim = -1;
|
||||
int inAnim = -1;
|
||||
|
||||
switch (mPendingSceneId) {
|
||||
case SCENE_MEMORY: {
|
||||
switch (unk_0x90) {
|
||||
case 13: {
|
||||
#ifndef KOREAN_BUILD
|
||||
backAnim = ANIM_WII_SAVE_DATA_BACK;
|
||||
inAnim = ANIM_GC_SAVE_DATA_IN;
|
||||
@@ -380,12 +380,12 @@ namespace ipl {
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case SCENE_MEMORY_CARD: {
|
||||
case 14: {
|
||||
backAnim = ANIM_GC_SAVE_DATA_BACK;
|
||||
inAnim = ANIM_WII_SAVE_DATA_IN;
|
||||
break;
|
||||
}
|
||||
case SCENE_CHANNEL_EDIT: {
|
||||
case 12: {
|
||||
backAnim = ANIM_CHANNEL_BACK;
|
||||
inAnim = ANIM_SAVE_DATA_IN;
|
||||
if (mSettingArg == SettingSelectArg::ARG_START_SAVE_DATA) {
|
||||
@@ -404,14 +404,14 @@ namespace ipl {
|
||||
|
||||
void SettingSelect::stt_wait_child_anm() {
|
||||
if (is_stopped_all_anm()) {
|
||||
switch (mPendingSceneId) {
|
||||
case SCENE_CHANNEL_EDIT: {
|
||||
switch (unk_0x90) {
|
||||
case 12: {
|
||||
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
|
||||
CHANGE_STATE(STATE_2ND_NORMAL);
|
||||
break;
|
||||
}
|
||||
case SCENE_MEMORY:
|
||||
case SCENE_MEMORY_CARD: {
|
||||
case 13:
|
||||
case 14: {
|
||||
static_cast<SettingButton*>(System::getScene(SCENE_SETTING_BUTTON))->showWii();
|
||||
#ifndef KOREAN_BUILD
|
||||
CHANGE_STATE(STATE_3RD_NORMAL);
|
||||
@@ -422,7 +422,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
mPendingSceneId = 0;
|
||||
unk_0x90 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_SETTING: {
|
||||
mPendingSceneId = SCENE_SETTING;
|
||||
unk_0x90 = 18;
|
||||
flashAnim = ANIM_SETTING_FLASH;
|
||||
outAnim = ANIM_DATA_MANAGE_OUT;
|
||||
reserveAllSceneDestruction(SCENE_SETTING, (void*)Setting::ARG_NORMAL_PAGE);
|
||||
@@ -596,7 +596,7 @@ namespace ipl {
|
||||
}
|
||||
case BTN_SAVEDATA: {
|
||||
#ifdef KOREAN_BUILD
|
||||
mPendingSceneId = SCENE_MEMORY;
|
||||
unk_0x90 = 13;
|
||||
#endif
|
||||
flashAnim = ANIM_SAVE_DATA_FLASH;
|
||||
outAnim = ANIM_CHANNEL_OUT;
|
||||
@@ -611,7 +611,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_CHANNEL: {
|
||||
mPendingSceneId = SCENE_CHANNEL_EDIT;
|
||||
unk_0x90 = 12;
|
||||
flashAnim = ANIM_CHANNEL_FLASH;
|
||||
outAnim = ANIM_SAVE_DATA_OUT;
|
||||
createChildScene(SCENE_CHANNEL_EDIT, this, NULL);
|
||||
@@ -623,7 +623,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_WII_SAVE: {
|
||||
mPendingSceneId = SCENE_MEMORY;
|
||||
unk_0x90 = 13;
|
||||
flashAnim = ANIM_WII_SAVE_DATA_FLASH;
|
||||
outAnim = ANIM_GC_SAVE_DATA_OUT;
|
||||
createChildScene(SCENE_MEMORY, this, NULL);
|
||||
@@ -632,7 +632,7 @@ namespace ipl {
|
||||
break;
|
||||
}
|
||||
case BTN_GC_SAVE: {
|
||||
mPendingSceneId = SCENE_MEMORY_CARD;
|
||||
unk_0x90 = 14;
|
||||
flashAnim = ANIM_GC_SAVE_DATA_FLASH;
|
||||
outAnim = ANIM_WII_SAVE_DATA_OUT;
|
||||
createChildScene(SCENE_MEMORY_CARD, this, NULL);
|
||||
@@ -689,7 +689,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void SettingSelect::calc_exit_sequence() {
|
||||
switch (mExitSeqStep) {
|
||||
switch (unk_0x94) {
|
||||
case 0: {
|
||||
prepare_exit_abort();
|
||||
break;
|
||||
@@ -720,13 +720,13 @@ namespace ipl {
|
||||
|
||||
System::getBS2Manager()->abort();
|
||||
System::stopReceiveSchedule();
|
||||
mExitSeqStep = 1;
|
||||
unk_0x94 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SettingSelect::wait_decide_se() {
|
||||
if (!snd::getSystem()->isSEActive("WIPL_SE_DECIDE")) {
|
||||
mExitSeqStep = 2;
|
||||
unk_0x94 = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ namespace ipl {
|
||||
__WPADReconnect(TRUE);
|
||||
snd::getSystem()->stopAllSound(20);
|
||||
System::getFader()->fadeOut();
|
||||
mExitSeqStep = 3;
|
||||
unk_0x94 = 3;
|
||||
}
|
||||
|
||||
void SettingSelect::finish_exit_reboot() {
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace ipl {
|
||||
extern "C" const u32 scLangLookup__Q23ipl7channel[][16];
|
||||
|
||||
Manager::Manager(EGG::Heap* heap)
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), mbDiskChannelReady(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
|
||||
: mpHeap(heap), mState(INIT), mbCanRefresh(0), unk_0x1B81(false), mbSetDiskBannerInfo(false), mPrevNandResult(NAND_RESULT_OK),
|
||||
mbLoadedChJump(false) {
|
||||
mpLockedMsgFile = NULL;
|
||||
|
||||
@@ -951,7 +951,7 @@ namespace ipl {
|
||||
int state = System::getBS2Manager()->getIPLState();
|
||||
if (state == bs2::IPL_STATE_RVL_GAME && mBS2State != bs2::IPL_STATE_RVL_GAME) {
|
||||
mbSetDiskBannerInfo = setDiskBannerInfo(false);
|
||||
mbDiskChannelReady = true;
|
||||
unk_0x1B81 = true;
|
||||
} else if (state != bs2::IPL_STATE_RVL_GAME && state != mBS2State) {
|
||||
setDiskBannerInfo(true);
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ namespace ipl {
|
||||
ARCFileInfo readFile;
|
||||
|
||||
if (unk) {
|
||||
mbDiskChannelReady = false;
|
||||
unk_0x1B81 = false;
|
||||
}
|
||||
|
||||
int diskPage, diskIndex;
|
||||
|
||||
@@ -130,24 +130,24 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Revolution::read() {
|
||||
if (!isValidDpd()) {
|
||||
mpKpadStatus->pos.y = 1.0f / 0.0f;
|
||||
mpKpadStatus->pos.x = 1.0f / 0.0f;
|
||||
mpKpadStatus->speed = 0.0f;
|
||||
mpKpadStatus->vec.y = 0.0f;
|
||||
mpKpadStatus->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;
|
||||
}
|
||||
|
||||
mbWasPinching = mbPinching;
|
||||
mbPrevPinch = mbPinch;
|
||||
if (isValidBtn()) {
|
||||
if (mbWasPinching == 0) {
|
||||
if (mbPrevPinch == 0) {
|
||||
if (down(0x800) && down(0x400)) {
|
||||
mbPinching = 1;
|
||||
mbPinch = 1;
|
||||
}
|
||||
} else if (!down(0x800) || !down(0x400)) {
|
||||
mbPinching = 0;
|
||||
mbPinch = 0;
|
||||
}
|
||||
} else {
|
||||
mbPinching = 0;
|
||||
mbPinch = 0;
|
||||
}
|
||||
|
||||
Base::read();
|
||||
@@ -157,17 +157,17 @@ namespace ipl {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (mpKpadStatus->wpad_err == 0 || mpKpadStatus->wpad_err == -7) && mpKpadStatus->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 = mpKpadStatus->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 (mpKpadStatus->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 = {mpKpadStatus->pos.x, mpKpadStatus->pos.y};
|
||||
Vec2 src = {mpStatus->pos.x, mpStatus->pos.y};
|
||||
nw4r::ut::Rect nw4r_rect; // constructor shouldn't be inlined
|
||||
Rect kpad_rect;
|
||||
|
||||
@@ -216,8 +216,8 @@ namespace ipl {
|
||||
y = fy;
|
||||
}
|
||||
ipl::controller::Classic::Classic(int arg0, KPADStatus& arg1) : Revolution(arg0, arg1) {
|
||||
mClassicCursorPos.x = 0.01f;
|
||||
mClassicCursorPos.y = 0.01f;
|
||||
mClassicCursor.x = 0.01f;
|
||||
mClassicCursor.y = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
ipl::controller::Base::~Base() {
|
||||
@@ -230,14 +230,14 @@ namespace ipl {
|
||||
}
|
||||
void ipl::controller::Classic::read() {
|
||||
if (!Revolution::isValidDpd()) {
|
||||
math::VEC2 lstick(mpKpadStatus->ex_status.cl.lstick.x, mpKpadStatus->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) {
|
||||
mClassicCursorPos.x = math::abs_clamp(mClassicCursorPos.x + mpKpadStatus->ex_status.cl.lstick.x * 0.05f, 1.8f);
|
||||
mClassicCursorPos.y = math::abs_clamp(mClassicCursorPos.y - mpKpadStatus->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(mpKpadStatus->ex_status.cl.rstick.x, mpKpadStatus->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) {
|
||||
mClassicCursorTimer = 180;
|
||||
@@ -247,15 +247,15 @@ namespace ipl {
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
} else {
|
||||
mClassicCursorPos.y = 0.01f;
|
||||
mClassicCursorPos.x = 0.01f;
|
||||
mClassicCursor.y = 0.01f;
|
||||
mClassicCursor.x = 0.01f;
|
||||
mClassicCursorTimer = 0;
|
||||
}
|
||||
|
||||
Revolution::read();
|
||||
}
|
||||
int ipl::controller::Classic::getClassicHoldFlag() const {
|
||||
return mpKpadStatus->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(mpKpadStatus->horizon.x, mpKpadStatus->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(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
ret.set(mpStatus->pos.x, mpStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursorPos;
|
||||
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(mpKpadStatus->pos.x, mpKpadStatus->pos.y);
|
||||
ret.set(mpStatus->pos.x, mpStatus->pos.y);
|
||||
} else if (mClassicCursorTimer != 0) {
|
||||
ret = mClassicCursorPos;
|
||||
ret = mClassicCursor;
|
||||
} else {
|
||||
ret.set(1.0f / 0.0f, 1.0f / 0.0f);
|
||||
}
|
||||
@@ -463,43 +463,43 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
return mChan;
|
||||
}
|
||||
KPADStatus* ipl::controller::Revolution::getKPADStatus() const {
|
||||
return mpKpadStatus;
|
||||
return mpStatus;
|
||||
}
|
||||
f32 ipl::controller::Revolution::getDpdDistance() const {
|
||||
return mpKpadStatus->dist;
|
||||
return mpStatus->dist;
|
||||
}
|
||||
int ipl::controller::Revolution::getReleaseFlag() const {
|
||||
return mpKpadStatus->release;
|
||||
return mpStatus->release;
|
||||
}
|
||||
int ipl::controller::Revolution::getTrigFlag() const {
|
||||
return mpKpadStatus->trig;
|
||||
return mpStatus->trig;
|
||||
}
|
||||
int ipl::controller::Revolution::getHoldFlag() const {
|
||||
return mpKpadStatus->hold;
|
||||
return mpStatus->hold;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchOffTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && mbPinching == 0 && mbWasPinching != 0) {
|
||||
if (isValidBtn() && mbPinch == 0 && mbPrevPinch != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinch() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && mbPinching != 0) {
|
||||
if (isValidBtn() && mbPinch != 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
int ipl::controller::Revolution::pinchTrg() const {
|
||||
int ret = 0;
|
||||
if (isValidBtn() && mbPinching != 0 && mbWasPinching == 0) {
|
||||
if (isValidBtn() && mbPinch != 0 && mbPrevPinch == 0) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
bool ipl::controller::Revolution::repeat(u32 button) const {
|
||||
return down(button) && (mpKpadStatus->hold & 0x80000000) != 0;
|
||||
return down(button) && (mpStatus->hold & 0x80000000) != 0;
|
||||
}
|
||||
BOOL ipl::controller::Classic::isValidDpdClassic() const {
|
||||
return mClassicCursorTimer != 0;
|
||||
@@ -512,16 +512,16 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
return (Revolution::isValidDpd() != 0) || (mClassicCursorTimer != 0);
|
||||
}
|
||||
int ipl::controller::Classic::getClassicReleaseFlag() const {
|
||||
return mpKpadStatus->ex_status.cl.release;
|
||||
return mpStatus->ex_status.cl.release;
|
||||
}
|
||||
int ipl::controller::Classic::getClassicTrigFlag() const {
|
||||
return mpKpadStatus->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 = mpKpadStatus;
|
||||
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 = mpKpadStatus;
|
||||
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 ((mpKpadStatus->hold & (button & 0xFFFF)) == 0) {
|
||||
if ((mpKpadStatus->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(mpKpadStatus->horizon.x, mpKpadStatus->horizon.y);
|
||||
return math::VEC2(mpStatus->horizon.x, mpStatus->horizon.y);
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Revolution::getDpdPos() const {
|
||||
return math::VEC2(mpKpadStatus->pos.x, mpKpadStatus->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 (mpKpadStatus->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 (mpKpadStatus->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) {
|
||||
mbPinching = 0;
|
||||
mbWasPinching = 0;
|
||||
mpKpadStatus = &status;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &status;
|
||||
}
|
||||
|
||||
Interface* Manager::getMasterController() {
|
||||
|
||||
Reference in New Issue
Block a user