Compare commits

..

1 Commits

Author SHA1 Message Date
coah
c0bfe74e5a match(SaveDataManager): decompile getNumValidChannel
Exact match (23/23, diffs 0). DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.

Adds ChannelSlot/ChannelPage overlays (slots at +0x30, page stride 0xC0)
so the loop uses typed .valid/.titleId instead of raw byte loads.
2026-10-01 18:21:09 -05:00
7 changed files with 335 additions and 300 deletions

View File

@@ -4733,61 +4733,61 @@ calcFadeout__Q33ipl5scene14SDChannelTitleFv = .text:0x813E5B14; // type:function
draw__Q33ipl5scene14SDChannelTitleFv = .text:0x813E5F54; // type:function size:0x220
destroy__Q33ipl5scene14SDChannelTitleFv = .text:0x813E6174; // type:function size:0x17C
isResetAcceptable__Q33ipl5scene14SDChannelTitleFv = .text:0x813E62F0; // type:function size:0x1C
iplSDChannelTitle_rebuildBannerLayout = .text:0x813E630C; // type:function size:0x3C
iplSDChannelTitle_createBannerLayout = .text:0x813E6348; // type:function size:0xDC
iplSDChannelTitle_createIconLayout = .text:0x813E6424; // type:function size:0x1B0
iplSDChannelTitle_updateIdleState = .text:0x813E65D4; // type:function size:0x18C
iplSDChannelTitle_updateChangeState = .text:0x813E6760; // type:function size:0x20C
iplSDChannelTitle_updateChangeWait = .text:0x813E696C; // type:function size:0x48
iplSDChannelTitle_updateParentalResult = .text:0x813E69B4; // type:function size:0x1D4
iplSDChannelTitle_updateDialogResult = .text:0x813E6B88; // type:function size:0x144
iplSDChannelTitle_startCopyProgress = .text:0x813E6CCC; // type:function size:0x158
iplSDChannelTitle_updateCopyPrepare = .text:0x813E6E24; // type:function size:0x17C
iplSDChannelTitle_copyTitleRange = .text:0x813E6FA0; // type:function size:0x14
iplSDChannelTitle_updateMemoryCalc = .text:0x813E6FB4; // type:function size:0xC0
iplSDChannelTitle_updateCopyStart = .text:0x813E7074; // type:function size:0x130
iplSDChannelTitle_updateAfterClearTmp = .text:0x813E71A4; // type:function size:0xA8
iplSDChannelTitle_updateEnqueueNotice = .text:0x813E724C; // type:function size:0x6C
iplSDChannelTitle_updateCopyProgress = .text:0x813E72B8; // type:function size:0x160
iplSDChannelTitle_showCopyError = .text:0x813E7418; // type:function size:0x80
iplSDChannelTitle_updateCopyErrorDialog = .text:0x813E7498; // type:function size:0x54
iplSDChannelTitle_finishProgressHide = .text:0x813E74EC; // type:function size:0x12C
iplSDChannelTitle_returnToIdle = .text:0x813E7618; // type:function size:0xB0
iplSDChannelTitle_loadTitleBanner = .text:0x813E76C8; // type:function size:0xB8
iplSDChannelTitle_updateBannerLoad = .text:0x813E7780; // type:function size:0x80
iplSDChannelTitle_tryLaunchSelected = .text:0x813E7800; // type:function size:0x7C
iplSDChannelTitle_updateTmdReady = .text:0x813E787C; // type:function size:0x134
iplSDChannelTitle_startZoomFade = .text:0x813E79B0; // type:function size:0x68
iplSDChannelTitle_preparePageRestart = .text:0x813E7A18; // type:function size:0x118
iplSDChannelTitle_loadBannerScript = .text:0x813E7B30; // type:function size:0xDC
iplSDChannelTitle_updateScript = .text:0x813E7C0C; // type:function size:0x108
iplSDChannelTitle_updateScriptIdle = .text:0x813E7D14; // type:function size:0xBC
iplSDChannelTitle_updateScriptLoad = .text:0x813E7DD0; // type:function size:0x1E0
iplSDChannelTitle_destroyScript = .text:0x813E7FB0; // type:function size:0x84
iplSDChannelTitle_playBannerIntro = .text:0x813E8034; // type:function size:0x12C
iplSDChannelTitle_startBannerSound = .text:0x813E8160; // type:function size:0x9C
iplSDChannelTitle_bindBannerAnimations = .text:0x813E81FC; // type:function size:0x5C
iplSDChannelTitle_bindRsoAnimations = .text:0x813E8258; // type:function size:0x108
iplSDChannelTitle_bindBannerAnims = .text:0x813E8360; // type:function size:0x11C
iplSDChannelTitle_isNetworkAllowed = .text:0x813E847C; // type:function size:0x4C
iplSDChannelTitle_isParentalEnabled = .text:0x813E84C8; // type:function size:0x44
iplSDChannelTitle_openParentalDialog = .text:0x813E850C; // type:function size:0xB4
iplSDChannelTitle_setPageAndIndex = .text:0x813E85C0; // type:function size:0xE0
iplSDChannelTitle_beginLaunch = .text:0x813E86A0; // type:function size:0x38
iplSDChannelTitle_cleanupAndLeave = .text:0x813E86D8; // type:function size:0x1F4
iplSDChannelTitle_confirmLeaveToSettings = .text:0x813E88CC; // type:function size:0xD0
iplSDChannelTitle_prepareSceneExit = .text:0x813E899C; // type:function size:0x84
iplSDChannelTitle_flushSaveBeforeExit = .text:0x813E8A20; // type:function size:0x94
iplSDChannelTitle_rebootSystem = .text:0x813E8AB4; // type:function size:0x68
iplSDChannelTitle_isLaunchDelayDone = .text:0x813E8B1C; // type:function size:0x54
iplSDChannelTitle_setStartButtonPressed = .text:0x813E8B70; // type:function size:0x98
iplSDChannelTitle_drawDimOverlay = .text:0x813E8C08; // type:function size:0x10C
iplSDChannelTitle_setPaneMessage = .text:0x813E8D14; // type:function size:0xB8
iplSDChannelTitle_loadBannerMetaFiles = .text:0x813E8DCC; // type:function size:0xA4
iplSDChannelTitle_fetchTmdViewTask = .text:0x813E8E70; // type:function size:0x94
iplSDChannelTitle_passesParentalCheck = .text:0x813E8F04; // type:function size:0x100
iplSDChannelTitle_onTitlePaneEvent = .text:0x813E9004; // type:function size:0x2E8
iplSDChannelTitle_onTitleButtonEvent = .text:0x813E92EC; // type:function size:0x17C
iplSDChannelTitle_813E630C = .text:0x813E630C; // type:function size:0x3C
iplSDChannelTitle_813E6348 = .text:0x813E6348; // type:function size:0xDC
iplSDChannelTitle_813E6424 = .text:0x813E6424; // type:function size:0x1B0
iplSDChannelTitle_813E65D4 = .text:0x813E65D4; // type:function size:0x18C
iplSDChannelTitle_813E6760 = .text:0x813E6760; // type:function size:0x20C
iplSDChannelTitle_813E696C = .text:0x813E696C; // type:function size:0x48
iplSDChannelTitle_813E69B4 = .text:0x813E69B4; // type:function size:0x1D4
iplSDChannelTitle_813E6B88 = .text:0x813E6B88; // type:function size:0x144
iplSDChannelTitle_813E6CCC = .text:0x813E6CCC; // type:function size:0x158
iplSDChannelTitle_813E6E24 = .text:0x813E6E24; // type:function size:0x17C
iplSDChannelTitle_813E6FA0 = .text:0x813E6FA0; // type:function size:0x14
iplSDChannelTitle_813E6FB4 = .text:0x813E6FB4; // type:function size:0xC0
iplSDChannelTitle_813E7074 = .text:0x813E7074; // type:function size:0x130
iplSDChannelTitle_813E71A4 = .text:0x813E71A4; // type:function size:0xA8
iplSDChannelTitle_813E724C = .text:0x813E724C; // type:function size:0x6C
iplSDChannelTitle_813E72B8 = .text:0x813E72B8; // type:function size:0x160
iplSDChannelTitle_813E7418 = .text:0x813E7418; // type:function size:0x80
iplSDChannelTitle_813E7498 = .text:0x813E7498; // type:function size:0x54
iplSDChannelTitle_813E74EC = .text:0x813E74EC; // type:function size:0x12C
iplSDChannelTitle_813E7618 = .text:0x813E7618; // type:function size:0xB0
iplSDChannelTitle_813E76C8 = .text:0x813E76C8; // type:function size:0xB8
iplSDChannelTitle_813E7780 = .text:0x813E7780; // type:function size:0x80
iplSDChannelTitle_813E7800 = .text:0x813E7800; // type:function size:0x7C
iplSDChannelTitle_813E787C = .text:0x813E787C; // type:function size:0x134
iplSDChannelTitle_813E79B0 = .text:0x813E79B0; // type:function size:0x68
iplSDChannelTitle_813E7A18 = .text:0x813E7A18; // type:function size:0x118
iplSDChannelTitle_813E7B30 = .text:0x813E7B30; // type:function size:0xDC
iplSDChannelTitle_813E7C0C = .text:0x813E7C0C; // type:function size:0x108
iplSDChannelTitle_813E7D14 = .text:0x813E7D14; // type:function size:0xBC
iplSDChannelTitle_813E7DD0 = .text:0x813E7DD0; // type:function size:0x1E0
iplSDChannelTitle_813E7FB0 = .text:0x813E7FB0; // type:function size:0x84
iplSDChannelTitle_813E8034 = .text:0x813E8034; // type:function size:0x12C
iplSDChannelTitle_813E8160 = .text:0x813E8160; // type:function size:0x9C
iplSDChannelTitle_813E81FC = .text:0x813E81FC; // type:function size:0x5C
iplSDChannelTitle_813E8258 = .text:0x813E8258; // type:function size:0x108
iplSDChannelTitle_813E8360 = .text:0x813E8360; // type:function size:0x11C
iplSDChannelTitle_813E847C = .text:0x813E847C; // type:function size:0x4C
iplSDChannelTitle_813E84C8 = .text:0x813E84C8; // type:function size:0x44
iplSDChannelTitle_813E850C = .text:0x813E850C; // type:function size:0xB4
iplSDChannelTitle_813E85C0 = .text:0x813E85C0; // type:function size:0xE0
iplSDChannelTitle_813E86A0 = .text:0x813E86A0; // type:function size:0x38
iplSDChannelTitle_813E86D8 = .text:0x813E86D8; // type:function size:0x1F4
iplSDChannelTitle_813E88CC = .text:0x813E88CC; // type:function size:0xD0
iplSDChannelTitle_813E899C = .text:0x813E899C; // type:function size:0x84
iplSDChannelTitle_813E8A20 = .text:0x813E8A20; // type:function size:0x94
iplSDChannelTitle_813E8AB4 = .text:0x813E8AB4; // type:function size:0x68
iplSDChannelTitle_813E8B1C = .text:0x813E8B1C; // type:function size:0x54
iplSDChannelTitle_813E8B70 = .text:0x813E8B70; // type:function size:0x98
iplSDChannelTitle_813E8C08 = .text:0x813E8C08; // type:function size:0x10C
iplSDChannelTitle_813E8D14 = .text:0x813E8D14; // type:function size:0xB8
iplSDChannelTitle_813E8DCC = .text:0x813E8DCC; // type:function size:0xA4
iplSDChannelTitle_813E8E70 = .text:0x813E8E70; // type:function size:0x94
iplSDChannelTitle_813E8F04 = .text:0x813E8F04; // type:function size:0x100
iplSDChannelTitle_813E9004 = .text:0x813E9004; // type:function size:0x2E8
iplSDChannelTitle_813E92EC = .text:0x813E92EC; // type:function size:0x17C
startResetting__Q33ipl5scene14SDChannelTitleFv = .text:0x813E9468; // type:function size:0xC
@20@__dt__Q33ipl5scene14SDChannelTitleFv = .text:0x813E9474; // type:function size:0x8
__ct__Q33ipl5scene8SDButtonFPQ23EGG4Heap = .text:0x813E947C; // type:function size:0x9C
@@ -7270,9 +7270,9 @@ ZiDAWGgetEOWattribute = .text:0x81481098; // type:function size:0x30
ZiDAWGgetCHARattribute = .text:0x814810C8; // type:function size:0xF0
ZiDAWGGetGraph = .text:0x814811B8; // type:function size:0x2C
ZiDAWGGetGraphInfo = .text:0x814811E4; // type:function size:0x218
Zi8LookupKoreanChar = .text:0x814813FC; // type:function size:0xC4
Zi8_814813FC = .text:0x814813FC; // type:function size:0xC4
Zi8GetKoreanCandidates = .text:0x814814C0; // type:function size:0x9AC
Zi8MatchKoreanSequence = .text:0x81481E6C; // type:function size:0x9D4
Zi8_81481E6C = .text:0x81481E6C; // type:function size:0x9D4
Zi8IsWordW = .text:0x81482840; // type:function size:0x680
Zi8ConvertUC2UserKey = .text:0x81482EC0; // type:function size:0x16C
Zi8_8148302C = .text:0x8148302C; // type:function size:0xEC
@@ -17938,7 +17938,7 @@ __vt__Q39textinput3gui11PaneManager = .data:0x81668DD4; // type:object size:0x5C
__vt__Q39textinput3gui10GUIManager = .data:0x81668E30; // type:object size:0x48
__vt__Q39textinput3gui12GUIComponent = .data:0x81668E78; // type:object size:0x68
__vt__Q49textinput5input10HKBManager14KBDListenerOwn = .data:0x81668EE0; // type:object size:0x18
scHwKeyboardConvertWCCodeJumpTable = .data:0x81668EF8; // type:object size:0xFC scope:local
jumptable_81668EF8 = .data:0x81668EF8; // type:object size:0xFC scope:local
__vt__Q49textinput8keyboard5hwkey10HWKeyboard = .data:0x81668FF4; // type:object size:0x24
__vt__Q29textinput8TiLayout = .data:0x81669018; // type:object size:0x34
__vt__Q29textinput17AnimTransformPane = .data:0x81669050; // type:object size:0x20

View File

@@ -26,6 +26,18 @@ namespace ipl {
namespace savedata {
extern "C" BOOL isTitleCached(void* manager, ESTitleId titleId);
struct ChannelSlot {
u8 valid; // 0x00 (primaryType)
u8 pad[3]; // 0x01
s32 titleId; // 0x04 (sceneID)
u8 rest[8]; // 0x08
};
struct ChannelPage {
u8 pad[0x30];
ChannelSlot slots[MAX_CHANNEL_INDEX]; // 0x30
};
class Manager {
public:
Manager(EGG::Heap* heap);

View File

@@ -4,7 +4,7 @@
ziU32 Zi8GetTableAddress(ziU8 lang, ziU8 tableIdx, ziPtr workData);
ziU16 Zi8GetTableCount(ziU8 lang, ziU8 tableIdx, ziPtr workData);
ziU8 Zi8LookupKoreanChar(ziWChar character, ziU8* result, ziU16* index, ziPtr workData) {
ziU8 Zi8_814813FC(ziWChar character, ziU8* result, ziU16* index, ziPtr workData) {
ziU16 i;
ziU8* table;
@@ -23,7 +23,7 @@ ziU8 Zi8LookupKoreanChar(ziWChar character, ziU8* result, ziU16* index, ziPtr wo
return 0;
}
ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData);
ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData);
ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
ziPtr workData) {
@@ -97,9 +97,9 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
result = 0;
for (currentCharacter = 0; currentCharacter < state.elementIndex; currentCharacter++) {
if (Zi8LookupKoreanChar(buffer[currentCharacter], &state.characterIndex,
if (Zi8_814813FC(buffer[currentCharacter], &state.characterIndex,
&state.inputIndex, workData) != 0) {
state.matched = Zi8MatchKoreanSequence(&state.nextIndex,
state.matched = Zi8_81481E6C(&state.nextIndex,
buffer + currentCharacter + 1,
state.characterIndex,
(state.elementIndex - currentCharacter) - 1,
@@ -235,7 +235,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
return result;
}
ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData) {
ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData) {
ziU16 nestedScratch;
ziU16 nestedIndexStorage;
ziU16 index1;
@@ -375,8 +375,8 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
}
if ((index3 >= tableCount) || (firstCharacter != (table + index3 * 4)[2]) ||
(input[1] != (table + index3 * 4)[1]) || (input[0] != table[index3 * 4])) {
if ((Zi8LookupKoreanChar(input[1], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 2, mappedCharacter, 1, workData) != 0)) {
if ((Zi8_814813FC(input[1], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8_81481E6C(&nestedIndexStorage, input + 2, mappedCharacter, 1, workData) != 0)) {
*resultIndex = index1;
return 1;
}
@@ -397,8 +397,8 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
if ((index4 >= tableCount) || (firstCharacter != (table + index4 * 4)[3]) ||
(input[2] != (table + index4 * 4)[2]) || (input[1] != (table + index4 * 4)[1]) ||
(input[0] != table[index4 * 4])) {
if ((Zi8LookupKoreanChar(input[2], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 3, mappedCharacter, 1, workData) != 0)) {
if ((Zi8_814813FC(input[2], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8_81481E6C(&nestedIndexStorage, input + 3, mappedCharacter, 1, workData) != 0)) {
*resultIndex = index2;
return 2;
}
@@ -409,8 +409,8 @@ ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 c
*resultIndex = index4;
return 4;
}
if ((Zi8LookupKoreanChar(input[3], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 4, mappedCharacter, 1, workData) != 0)) {
if ((Zi8_814813FC(input[3], &mappedCharacter, &nestedScratch, workData) != 0) &&
(Zi8_81481E6C(&nestedIndexStorage, input + 4, mappedCharacter, 1, workData) != 0)) {
*resultIndex = index3;
return 3;
}

View File

@@ -91,7 +91,7 @@ extern CDBErr CDBDatabaseInit();
extern CDBErr CDBDatabaseOpen();
extern CDBErr CDBDatabaseClose();
extern CDBErr CDBDatabasePrivateCreateRecordAtOnce();
extern CDBErr CDBDatabaseCreateRecordAtOnce(CDBDatabase* database, CDBRecord* record, const char* typeStr, const char* fileTypeStr, u8* recordData, u32 recordDataSize);
extern CDBErr CDBDatabaseCreateRecordAtOnce();
extern CDBErr CDBDatabaseCreateRecordAtOnceEx();
extern CDBErr CDBDatabasePrivateCreateRecordAtOnceEx();
extern CDBErr CDBDatabasePrivateCreateRecordAtOnceEx_(CDBDatabase* database, CDBRecord* record, const char* typeStr, const char* fileTypeStr, int year, int month, int day, int hour, int min, int sec, u8* recordData, u32 recordDataSize, char* makerCode, char* gameCode);
@@ -206,19 +206,47 @@ CDBErr CDBDatabasePrivateCreateRecordAtOnce(CDBDatabase* database, CDBRecord* re
return result;
}
CDBErr CDBDatabaseCreateRecordAtOnce(CDBDatabase* database, CDBRecord* record, const char* typeStr, const char* fileTypeStr, u8* recordData, u32 recordDataSize) {
OSTime time;
u32 gameCode;
u16 makerCode;
CDBErr result;
makerCode = database->makerCode;
gameCode = database->gameCode;
time = OSGetTime();
CDBLock();
result = CDBDatabaseCreateRecordImAtOnce_(database, record, typeStr, fileTypeStr, time, gameCode, makerCode, recordData, recordDataSize);
CDBUnlock();
return result;
asm CDBErr CDBDatabaseCreateRecordAtOnce(CDBDatabase* database, CDBRecord* record, const char* typeStr, const char* fileTypeStr, u8* recordData, u32 recordDataSize) {
#ifdef __MWERKS__
nofralloc
stwu r1, -0x40(r1)
mflr r0
stw r0, 0x44(r1)
addi r11, r1, 0x40
bl _savegpr_22
lhz r28, 0x0(r3)
mr r22, r3
lwz r29, 0x4(r3)
mr r23, r4
mr r24, r5
mr r25, r6
mr r26, r7
mr r27, r8
bl OSGetTime
mr r30, r4
mr r31, r3
bl CDBLock
stw r26, 0x8(r1)
mr r3, r22
mr r4, r23
mr r5, r24
stw r27, 0xc(r1)
mr r6, r25
mr r8, r30
mr r7, r31
mr r9, r29
mr r10, r28
bl CDBDatabaseCreateRecordImAtOnce_
mr r28, r3
bl CDBUnlock
addi r11, r1, 0x40
mr r3, r28
bl _restgpr_22
lwz r0, 0x44(r1)
mtlr r0
addi r1, r1, 0x40
blr
#endif
}
CDBErr CDBDatabaseCreateRecordAtOnceEx(CDBDatabase* database, CDBRecord* record, const char* typeStr, const char* fileTypeStr, u8* recordData, u32 recordDataSize, int year, int month, int day, int hour, int min, int sec) {

View File

@@ -19,7 +19,7 @@ extern "C" void updateFromReceiver__Q29textinput13CommandSenderFUlPv();
#pragma push
#pragma section const_type ".data"
typedef void (*KeyboardDataFunction)();
extern "C" KeyboardDataFunction const scHwKeyboardConvertWCCodeJumpTable[0x3f] = {
extern "C" KeyboardDataFunction const jumptable_81668EF8[0x3f] = {
reinterpret_cast<KeyboardDataFunction>(reinterpret_cast<u32>(convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw) + 0x00000158),
reinterpret_cast<KeyboardDataFunction>(reinterpret_cast<u32>(convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw) + 0x000001d8),
reinterpret_cast<KeyboardDataFunction>(reinterpret_cast<u32>(convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw) + 0x000001f0),
@@ -737,9 +737,9 @@ const u8 controlKeys[] = {
addi r0, r31, -0x21
cmplwi r0, 0x3e
bgt convertWCCode_HWKeyboard_L1
lis r3, scHwKeyboardConvertWCCodeJumpTable@ha
lis r3, jumptable_81668EF8@ha
slwi r0, r0, 2
addi r3, r3, scHwKeyboardConvertWCCodeJumpTable@l
addi r3, r3, jumptable_81668EF8@l
lwzx r3, r3, r0
mtctr r3
bctr

View File

@@ -23,63 +23,63 @@ namespace scene {
class SDTitlePaneEventHandler;
class SDTitleButtonEventHandler;
extern "C" void iplSDChannelTitle_rebootSystem(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_drawDimOverlay(SDChannelTitle* scene, const nw4r::ut::Rect& bounds, GXColor color);
extern "C" void iplSDChannelTitle_bindBannerAnimations(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_createBannerLayout(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_createIconLayout(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_playBannerIntro(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_startBannerSound(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_bindBannerAnims(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_bindRsoAnimations(SDChannelTitle* scene, layout::Object* layout,
extern "C" void iplSDChannelTitle_813E8AB4(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8C08(SDChannelTitle* scene, const nw4r::ut::Rect& bounds, GXColor color);
extern "C" void iplSDChannelTitle_813E81FC(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E6348(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E6424(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8034(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8160(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8360(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8258(SDChannelTitle* scene, layout::Object* layout,
layout::Animator** animations, const char* prefix);
extern "C" void iplSDChannelTitle_updateScript(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateScriptIdle(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateScriptLoad(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_destroyScript(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7C0C(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7D14(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7DD0(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7FB0(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_rebuildBannerLayout(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateChangeWait(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateMemoryCalc(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateAfterClearTmp(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateEnqueueNotice(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_showCopyError(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateCopyErrorDialog(SDChannelTitle* scene);
extern "C" bool iplSDChannelTitle_startZoomFade(SDChannelTitle* scene);
extern "C" BOOL iplSDChannelTitle_isNetworkAllowed(SDChannelTitle*, ESTmdView*, ESTitleId titleId);
extern "C" BOOL iplSDChannelTitle_isParentalEnabled();
extern "C" void iplSDChannelTitle_beginLaunch(SDChannelTitle* scene, SDChannelObj* channel);
extern "C" void iplSDChannelTitle_prepareSceneExit(SDChannelTitle* scene, int nextScene);
extern "C" void iplSDChannelTitle_rebootSystem(SDChannelTitle*);
extern "C" bool iplSDChannelTitle_isLaunchDelayDone(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_setStartButtonPressed(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_drawDimOverlay(SDChannelTitle*, const nw4r::ut::Rect& bounds, GXColor color);
extern "C" void iplSDChannelTitle_setPaneMessage(SDChannelTitle*, nw4r::lyt::Pane* pane, u32 message, bool allocate);
extern "C" nand::LayoutFile* iplSDChannelTitle_loadBannerMetaFiles(SDChannelTitle*, ESTitleId title, nand::File** sound);
extern "C" void iplSDChannelTitle_fetchTmdViewTask(void* argument);
extern "C" BOOL iplSDChannelTitle_passesParentalCheck(SDChannelTitle* scene, ESTmdView* tmd);
extern "C" void iplSDChannelTitle_updateIdleState(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateChangeState(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateParentalResult(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateDialogResult(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_startCopyProgress(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateCopyPrepare(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateCopyStart(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateCopyProgress(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_finishProgressHide(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_returnToIdle(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_loadTitleBanner(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateBannerLoad(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_tryLaunchSelected(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_updateTmdReady(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_preparePageRestart(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_loadBannerScript(SDChannelTitle* scene, ESTitleId title);
extern "C" void iplSDChannelTitle_openParentalDialog(SDChannelTitle* scene, void* arguments);
extern "C" void iplSDChannelTitle_setPageAndIndex(SDChannelTitle* scene, int page, int index);
extern "C" void iplSDChannelTitle_cleanupAndLeave(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_confirmLeaveToSettings(SDChannelTitle* scene, bool settings);
extern "C" void iplSDChannelTitle_flushSaveBeforeExit(SDChannelTitle* scene, int nextScene);
extern "C" SDMemory::TitleRange* iplSDChannelTitle_copyTitleRange(SDMemory::TitleRange*, const SDMemory::TitleRange*);
extern "C" void iplSDChannelTitle_813E630C(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E696C(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E6FB4(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E71A4(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E724C(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7418(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7498(SDChannelTitle* scene);
extern "C" bool iplSDChannelTitle_813E79B0(SDChannelTitle* scene);
extern "C" BOOL iplSDChannelTitle_813E847C(SDChannelTitle*, ESTmdView*, ESTitleId titleId);
extern "C" BOOL iplSDChannelTitle_813E84C8();
extern "C" void iplSDChannelTitle_813E86A0(SDChannelTitle* scene, SDChannelObj* channel);
extern "C" void iplSDChannelTitle_813E899C(SDChannelTitle* scene, int nextScene);
extern "C" void iplSDChannelTitle_813E8AB4(SDChannelTitle*);
extern "C" bool iplSDChannelTitle_813E8B1C(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8B70(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8C08(SDChannelTitle*, const nw4r::ut::Rect& bounds, GXColor color);
extern "C" void iplSDChannelTitle_813E8D14(SDChannelTitle*, nw4r::lyt::Pane* pane, u32 message, bool allocate);
extern "C" nand::LayoutFile* iplSDChannelTitle_813E8DCC(SDChannelTitle*, ESTitleId title, nand::File** sound);
extern "C" void iplSDChannelTitle_813E8E70(void* argument);
extern "C" BOOL iplSDChannelTitle_813E8F04(SDChannelTitle* scene, ESTmdView* tmd);
extern "C" void iplSDChannelTitle_813E65D4(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E6760(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E69B4(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E6B88(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E6CCC(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E6E24(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7074(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E72B8(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E74EC(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7618(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E76C8(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7780(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7800(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E787C(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7A18(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E7B30(SDChannelTitle* scene, ESTitleId title);
extern "C" void iplSDChannelTitle_813E850C(SDChannelTitle* scene, void* arguments);
extern "C" void iplSDChannelTitle_813E85C0(SDChannelTitle* scene, int page, int index);
extern "C" void iplSDChannelTitle_813E86D8(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E88CC(SDChannelTitle* scene, bool settings);
extern "C" void iplSDChannelTitle_813E8A20(SDChannelTitle* scene, int nextScene);
extern "C" SDMemory::TitleRange* iplSDChannelTitle_813E6FA0(SDMemory::TitleRange*, const SDMemory::TitleRange*);
static inline void setMemoryTitleLists(SDMemory* memory, SDMemory::TitleRange sdRange,
SDMemory::TitleRange nandRange) {
@@ -136,9 +136,9 @@ public:
extern "C" void iplSDChannelObj_813E3580(layout::Object* layout);
extern "C" const wchar_t* iplSDChannelObj_813E4060(SDChannelObj* channel, int nameIndex);
extern "C" bool iplSDChannelTitle_startZoomFade(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_rebuildBannerLayout(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_setPaneMessage(SDChannelTitle* scene, nw4r::lyt::Pane* pane, u32 message, bool allocate);
extern "C" bool iplSDChannelTitle_813E79B0(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E630C(SDChannelTitle* scene);
extern "C" void iplSDChannelTitle_813E8D14(SDChannelTitle* scene, nw4r::lyt::Pane* pane, u32 message, bool allocate);
SDChannelTitle::SDChannelTitle(EGG::Heap* heap, SDChannelSelect* channelSelect)
: FaderSceneBase(heap), mState(0), mNextScene(0), mParentalResult(0),
@@ -194,8 +194,8 @@ void SDChannelTitle::create() {
}
}
}
iplSDChannelTitle_setPaneMessage(this, mpLayout->FindPaneByName(sTextNames[0]), 0xa2, true);
iplSDChannelTitle_setPaneMessage(this, mpLayout->FindPaneByName(sTextNames[1]), 2, true);
iplSDChannelTitle_813E8D14(this, mpLayout->FindPaneByName(sTextNames[0]), 0xa2, true);
iplSDChannelTitle_813E8D14(this, mpLayout->FindPaneByName(sTextNames[1]), 2, true);
mStartButtonState = 1;
mpButtonAnimations[0][0] = mpLayout->bindToGroup(sButtonAnimationNames[0], sButtonGroups[0], false, false);
mpButtonAnimations[0][1] = mpLayout->bindToGroup(sButtonAnimationNames[1], sButtonGroups[0], false, true);
@@ -223,7 +223,7 @@ void SDChannelTitle::create() {
mpProgressLayout->finishBinding();
nw4r::lyt::TextBox* comment = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpProgressLayout->FindPaneByName("T_Comment_02"));
comment->SetString(System::getMessage(0xad));
iplSDChannelTitle_rebuildBannerLayout(this);
iplSDChannelTitle_813E630C(this);
mpFade = new math::HermiteIntp<f32>();
static f32 fadeRange[2] = {0.0f, 255.0f};
mpFade->init(fadeRange[0], fadeRange[1], 28.0f, 0.0f, 0.0f);
@@ -241,7 +241,7 @@ void SDChannelTitle::create() {
mScriptDuration = duration;
mState = 2;
mScriptFrame = duration;
iplSDChannelTitle_startZoomFade(this);
iplSDChannelTitle_813E79B0(this);
mpScriptHeaps[0] = EGG::ExpHeap::create(0x80000, System::getMem2App(), 6);
mpScriptHeaps[1] = EGG::ExpHeap::create(0x80000, System::getMem2App(), 6);
mMemory.create(getSceneHeap(), mpLayoutFile, mpChannelSelect);
@@ -251,7 +251,7 @@ void SDChannelTitle::calcCommon() {
mpPaneManager->calc();
mpLayout->calc();
if (mScriptEnabled == 1) {
iplSDChannelTitle_updateScript(this);
iplSDChannelTitle_813E7C0C(this);
}
if ((mState == 1 || mState == 13 || static_cast<u32>(mState - 4) <= 1) &&
!mbBannerStarting && mpBannerAnimations[1] && !mpBannerAnimations[1]->isPlaying()) {
@@ -277,11 +277,11 @@ void SDChannelTitle::calcCommon() {
FaderSceneCommand SDChannelTitle::calcFadein() {
if (mState == 2) {
iplSDChannelTitle_startZoomFade(this);
iplSDChannelTitle_813E79B0(this);
return FADER_SCN_CONTINUE;
}
if (!mpFade->isPlaying()) {
iplSDChannelTitle_playBannerIntro(this);
iplSDChannelTitle_813E8034(this);
SDButton* button = static_cast<SDButton*>(System::getScene(0x24));
button->setEventHandler(mpButtonEventHandler, NULL);
button->animation(13);
@@ -296,37 +296,37 @@ FaderSceneCommand SDChannelTitle::calcFadein() {
FaderSceneCommand SDChannelTitle::calcNormal() {
switch (mState) {
case 1: iplSDChannelTitle_updateIdleState(this); break;
case 4: iplSDChannelTitle_flushSaveBeforeExit(this, mNextScene); mState = 5; break;
case 8: iplSDChannelTitle_updateChangeState(this); break;
case 9: iplSDChannelTitle_updateChangeWait(this); break;
case 10: iplSDChannelTitle_preparePageRestart(this); break;
case 11: iplSDChannelTitle_updateParentalResult(this); break;
case 12: iplSDChannelTitle_updateDialogResult(this); break;
case 13: iplSDChannelTitle_updateTmdReady(this); break;
case 1: iplSDChannelTitle_813E65D4(this); break;
case 4: iplSDChannelTitle_813E8A20(this, mNextScene); mState = 5; break;
case 8: iplSDChannelTitle_813E6760(this); break;
case 9: iplSDChannelTitle_813E696C(this); break;
case 10: iplSDChannelTitle_813E7A18(this); break;
case 11: iplSDChannelTitle_813E69B4(this); break;
case 12: iplSDChannelTitle_813E6B88(this); break;
case 13: iplSDChannelTitle_813E787C(this); break;
case 14: return FADER_SCN_CONTINUE;
case 15: iplSDChannelTitle_updateCopyStart(this); break;
case 16: iplSDChannelTitle_updateAfterClearTmp(this); break;
case 15: iplSDChannelTitle_813E7074(this); break;
case 16: iplSDChannelTitle_813E71A4(this); break;
case 17: SCSetTmpTitleID(mTitleId); SCFlushAsync(NULL); mState = 18; break;
case 18: if (SCCheckStatus() != 1) { mState = 21; } break;
case 19: iplSDChannelTitle_startCopyProgress(this); break;
case 20: iplSDChannelTitle_updateCopyPrepare(this); break;
case 21: iplSDChannelTitle_updateEnqueueNotice(this); break;
case 22: iplSDChannelTitle_updateCopyProgress(this); break;
case 23: iplSDChannelTitle_updateMemoryCalc(this); break;
case 24: iplSDChannelTitle_loadTitleBanner(this); break;
case 25: iplSDChannelTitle_updateBannerLoad(this); break;
case 26: iplSDChannelTitle_showCopyError(this); break;
case 27: iplSDChannelTitle_updateCopyErrorDialog(this); break;
case 28: iplSDChannelTitle_tryLaunchSelected(this); break;
case 29: iplSDChannelTitle_finishProgressHide(this); break;
case 30: iplSDChannelTitle_returnToIdle(this); break;
case 19: iplSDChannelTitle_813E6CCC(this); break;
case 20: iplSDChannelTitle_813E6E24(this); break;
case 21: iplSDChannelTitle_813E724C(this); break;
case 22: iplSDChannelTitle_813E72B8(this); break;
case 23: iplSDChannelTitle_813E6FB4(this); break;
case 24: iplSDChannelTitle_813E76C8(this); break;
case 25: iplSDChannelTitle_813E7780(this); break;
case 26: iplSDChannelTitle_813E7418(this); break;
case 27: iplSDChannelTitle_813E7498(this); break;
case 28: iplSDChannelTitle_813E7800(this); break;
case 29: iplSDChannelTitle_813E74EC(this); break;
case 30: iplSDChannelTitle_813E7618(this); break;
}
if (mState == 5) {
mbStopScript = true;
++mLaunchFrame;
System::getPointer()->setVisible(false);
return static_cast<FaderSceneCommand>(iplSDChannelTitle_isLaunchDelayDone(this));
return static_cast<FaderSceneCommand>(iplSDChannelTitle_813E8B1C(this));
}
if (mState == 6 || mState == 7 || mState == 31) {
mbStopScript = true;
@@ -360,7 +360,7 @@ FaderSceneCommand SDChannelTitle::calcFadeout() {
if (mNextScene == 17) {
if (!nandwall::checkNandCapacityAppBootable()) {
OSReport("Nand full! OSRebootSystem.\n");
iplSDChannelTitle_rebootSystem(this);
iplSDChannelTitle_813E8AB4(this);
}
while (WPADGetStatus() != 0 || System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_8 ||
!System::getSaveData()->isFinished(mpSaveFile) ||
@@ -369,7 +369,7 @@ FaderSceneCommand SDChannelTitle::calcFadeout() {
System::getBS2Manager()->update();
VIWaitForRetrace();
if (mScriptEnabled == 1) {
iplSDChannelTitle_updateScript(this);
iplSDChannelTitle_813E7C0C(this);
}
if (WPADGetStatus() != 0) {
OSReport("wait for WPAD\n");
@@ -454,7 +454,7 @@ void SDChannelTitle::draw() {
GXColor color = {255, 255, 255, static_cast<u8>(mpFade->get())};
utility::Graphics::drawTexture(bounds, mpScreenCapture->getGXTex(), color, 1);
GXColor mask = {0, 0, 0, static_cast<u8>(mpFade->get())};
iplSDChannelTitle_drawDimOverlay(this, bounds, mask);
iplSDChannelTitle_813E8C08(this, bounds, mask);
} else {
if (mpIconLayout) {
utility::Graphics::setOrthoProjection(0);
@@ -522,14 +522,14 @@ BOOL SDChannelTitle::isResetAcceptable() {
return FALSE;
}
extern "C" void iplSDChannelTitle_rebuildBannerLayout(SDChannelTitle* scene) {
iplSDChannelTitle_createBannerLayout(scene);
extern "C" void iplSDChannelTitle_813E630C(SDChannelTitle* scene) {
iplSDChannelTitle_813E6348(scene);
if (scene->mpBannerLayout) {
scene->mpBannerLayout->finishBinding();
}
}
extern "C" void iplSDChannelTitle_createBannerLayout(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E6348(SDChannelTitle* scene) {
if (scene->mpIconLayout) {
scene->mpIconLayout->destroyHeap();
scene->mpIconLayout = NULL;
@@ -538,17 +538,17 @@ extern "C" void iplSDChannelTitle_createBannerLayout(SDChannelTitle* scene) {
scene->mpBannerLayout = layout::Object::create(scene->mpBannerHeap, 0x40000,
scene->mpBannerFiles[scene->mLoadedIndex], "arc", "banner.brlyt");
iplSDChannelObj_813E3580(scene->mpBannerLayout);
iplSDChannelTitle_bindBannerAnimations(scene);
iplSDChannelTitle_813E81FC(scene);
} else {
scene->mpBannerLayout = NULL;
for (int index = 0; index < 3; ++index) {
scene->mpBannerAnimations[index] = NULL;
}
iplSDChannelTitle_createIconLayout(scene);
iplSDChannelTitle_813E6424(scene);
}
}
extern "C" void iplSDChannelTitle_createIconLayout(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E6424(SDChannelTitle* scene) {
SDChannelObj* channel = scene->mpChannelSelect->findChannelObject(scene->mPage, scene->mIndex);
if (channel) {
scene->mpIconLayout = layout::Object::create(scene->mpIconHeap, 0x8000,
@@ -570,7 +570,7 @@ extern "C" void iplSDChannelTitle_createIconLayout(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateIdleState(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E65D4(SDChannelTitle* scene) {
SDButton* button = static_cast<SDButton*>(System::getScene(0x24));
if (button && button->isActive()) {
button->update();
@@ -578,18 +578,18 @@ extern "C" void iplSDChannelTitle_updateIdleState(SDChannelTitle* scene) {
if (scene->mState == 1) {
if (static_cast<u32>(scene->mpChannelSelect->mCurrentSDState - 1) <= 1) {
scene->mState = 10;
iplSDChannelTitle_preparePageRestart(scene);
iplSDChannelTitle_813E7A18(scene);
} else {
controller::Interface* controller = System::getMasterController();
int page;
int index;
if (controller->down(0x30001000)) {
scene->mpChannelSelect->findAdjacentChannel(1, &page, &index);
iplSDChannelTitle_setPageAndIndex(scene, page, index);
iplSDChannelTitle_813E85C0(scene, page, index);
snd::getSystem()->startSE("WSD_SELECT");
} else if (controller->down(0x6000010)) {
scene->mpChannelSelect->findAdjacentChannel(0, &page, &index);
iplSDChannelTitle_setPageAndIndex(scene, page, index);
iplSDChannelTitle_813E85C0(scene, page, index);
snd::getSystem()->startSE("WSD_SELECT");
} else {
scene->mpPaneManager->update();
@@ -603,7 +603,7 @@ extern "C" void iplSDChannelTitle_updateIdleState(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateChangeState(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E6760(SDChannelTitle* scene) {
if (static_cast<u32>(scene->mpChannelSelect->mCurrentSDState - 1) <= 1) {
scene->mState = 1;
} else {
@@ -630,21 +630,21 @@ extern "C" void iplSDChannelTitle_updateChangeState(SDChannelTitle* scene) {
}
scene->mpSoundFiles[scene->mLoadedIndex] = NULL;
scene->mLoadedIndex = 1 - scene->mLoadedIndex;
iplSDChannelTitle_rebuildBannerLayout(scene);
iplSDChannelTitle_setStartButtonPressed(scene);
iplSDChannelTitle_813E630C(scene);
iplSDChannelTitle_813E8B70(scene);
scene->mState = 9;
}
}
}
extern "C" void iplSDChannelTitle_updateChangeWait(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E696C(SDChannelTitle* scene) {
if (++scene->mChangeFrame > 20) {
iplSDChannelTitle_playBannerIntro(scene);
iplSDChannelTitle_813E8034(scene);
scene->mState = 1;
}
}
extern "C" void iplSDChannelTitle_updateParentalResult(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E69B4(SDChannelTitle* scene) {
ParentalDialog* parental = static_cast<ParentalDialog*>(System::getScene(0x1b));
if (!parental && !System::getReservedScene()) {
if (scene->mParentalResult == 1) {
@@ -674,7 +674,7 @@ extern "C" void iplSDChannelTitle_updateParentalResult(SDChannelTitle* scene) {
switch (result) {
case 1:
if (!scene->mParentalResult) {
iplSDChannelTitle_prepareSceneExit(scene, scene->mNextScene);
iplSDChannelTitle_813E899C(scene, scene->mNextScene);
scene->mParentalResult = 1;
}
break;
@@ -688,7 +688,7 @@ extern "C" void iplSDChannelTitle_updateParentalResult(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateDialogResult(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E6B88(SDChannelTitle* scene) {
int result = System::getDialog()->getLastResult();
switch (result) {
case 2: {
@@ -708,8 +708,8 @@ extern "C" void iplSDChannelTitle_updateDialogResult(SDChannelTitle* scene) {
break;
}
case 1: {
if (iplSDChannelTitle_isParentalEnabled()) {
iplSDChannelTitle_openParentalDialog(scene, reinterpret_cast<void*>(1));
if (iplSDChannelTitle_813E84C8()) {
iplSDChannelTitle_813E850C(scene, reinterpret_cast<void*>(1));
} else {
scene->reserveAllSceneDestruction(0x12, reinterpret_cast<void*>(1));
scene->mState = 7;
@@ -719,7 +719,7 @@ extern "C" void iplSDChannelTitle_updateDialogResult(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_startCopyProgress(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E6CCC(SDChannelTitle* scene) {
if (scene->mpChannelSelect->getWorker()->is_working() || scene->mpProgressLayout->isPlaying(0) ||
scene->mpButtonAnimations[3][2]->isPlaying()) {
return;
@@ -747,7 +747,7 @@ extern "C" void iplSDChannelTitle_startCopyProgress(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateCopyPrepare(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E6E24(SDChannelTitle* scene) {
if (scene->mpChannelSelect->getWorker()->is_working() || scene->mpProgressLayout->isPlaying(1)) {
return;
}
@@ -762,9 +762,9 @@ extern "C" void iplSDChannelTitle_updateCopyPrepare(SDChannelTitle* scene) {
if (static_cast<u32>(scene->mTitleRange.mByteSize) < 0x3800000) {
nandRange.mByteSize = 0x3800000;
nandRange.mCount = scene->mTitleRange.mCount;
iplSDChannelTitle_copyTitleRange(&sdRange, &scene->mTitleRange);
iplSDChannelTitle_813E6FA0(&sdRange, &scene->mTitleRange);
} else {
iplSDChannelTitle_copyTitleRange(&nandRange, iplSDChannelTitle_copyTitleRange(&sdRange, &scene->mTitleRange));
iplSDChannelTitle_813E6FA0(&nandRange, iplSDChannelTitle_813E6FA0(&sdRange, &scene->mTitleRange));
}
SDMemory* memory = &scene->mMemory;
setMemoryTitleLists(memory, sdRange, nandRange);
@@ -786,7 +786,7 @@ extern "C" void iplSDChannelTitle_updateCopyPrepare(SDChannelTitle* scene) {
}
}
extern "C" SDMemory::TitleRange* iplSDChannelTitle_copyTitleRange(
extern "C" SDMemory::TitleRange* iplSDChannelTitle_813E6FA0(
SDMemory::TitleRange* target, const SDMemory::TitleRange* source) {
s32 bytes = source->mByteSize;
target->mCount = source->mCount;
@@ -794,7 +794,7 @@ extern "C" SDMemory::TitleRange* iplSDChannelTitle_copyTitleRange(
return target;
}
extern "C" void iplSDChannelTitle_updateMemoryCalc(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E6FB4(SDChannelTitle* scene) {
if (!scene->mMemory.calc()) {
return;
}
@@ -818,7 +818,7 @@ extern "C" void iplSDChannelTitle_updateMemoryCalc(SDChannelTitle* scene) {
scene->mState = 15;
}
extern "C" void iplSDChannelTitle_updateCopyStart(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7074(SDChannelTitle* scene) {
if (!scene->mpChannelSelect->getWorker()->is_working()) {
if (scene->mbCopiedTitle && !scene->mpProgressLayout->isPlaying(3)) {
scene->mpProgressLayout->getAnim(3)->play();
@@ -843,7 +843,7 @@ extern "C" void iplSDChannelTitle_updateCopyStart(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateAfterClearTmp(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E71A4(SDChannelTitle* scene) {
if (!scene->mpChannelSelect->getWorker()->is_working()) {
SCSetTmpTitleID(0);
System::getChannelManager()->clearTmpChannel();
@@ -862,7 +862,7 @@ extern "C" void iplSDChannelTitle_updateAfterClearTmp(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateEnqueueNotice(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E724C(SDChannelTitle* scene) {
if (!scene->mpChannelSelect->getWorker()->is_working()) {
if (scene->mpChannelSelect->enqueueResultNotice(static_cast<u32>(scene->mTitleId))) {
scene->mState = 22;
@@ -873,7 +873,7 @@ extern "C" void iplSDChannelTitle_updateEnqueueNotice(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateCopyProgress(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E72B8(SDChannelTitle* scene) {
scene->mpProgressLayout->getAnim(2)->initAnmFrame(NandSDWorker::getCompletionPct());
if (!scene->mpChannelSelect->getWorker()->is_working()) {
int result = scene->mpChannelSelect->getWorker()->get_async_result();
@@ -883,7 +883,7 @@ extern "C" void iplSDChannelTitle_updateCopyProgress(SDChannelTitle* scene) {
snd::getSystem()->stopSE(scene->mpCopySound, 0);
scene->mpCopySound = NULL;
snd::getSystem()->startSE("WIPL_SE_COPY_FINISH");
System::getTask1()->request(iplSDChannelTitle_fetchTmdViewTask, scene, NULL);
System::getTask1()->request(iplSDChannelTitle_813E8E70, scene, NULL);
scene->mState = 24;
} else {
SCSetTmpTitleID(0);
@@ -900,7 +900,7 @@ extern "C" void iplSDChannelTitle_updateCopyProgress(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_showCopyError(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7418(SDChannelTitle* scene) {
scene->mpProgressLayout->getAnim(3)->stop();
snd::getSystem()->stopSE(scene->mpCopySound, 0);
scene->mpCopySound = NULL;
@@ -908,13 +908,13 @@ extern "C" void iplSDChannelTitle_showCopyError(SDChannelTitle* scene) {
scene->mState = 27;
}
extern "C" void iplSDChannelTitle_updateCopyErrorDialog(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7498(SDChannelTitle* scene) {
if (SCCheckStatus() != 1 && System::getDialog()->getLastResult() != -1) {
scene->mState = 29;
}
}
extern "C" void iplSDChannelTitle_finishProgressHide(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E74EC(SDChannelTitle* scene) {
if (!scene->mpProgressLayout->isPlaying(1) && !scene->mpButtonAnimations[1][0]->isPlaying() &&
!scene->mpButtonAnimations[6][5]->isPlaying()) {
scene->mbResetAcceptable = true;
@@ -934,7 +934,7 @@ extern "C" void iplSDChannelTitle_finishProgressHide(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_returnToIdle(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7618(SDChannelTitle* scene) {
if (!scene->mpProgressLayout->isPlaying(1) && !scene->mpButtonAnimations[6][5]->isPlaying()) {
for (int button = 0; button < 2; ++button) {
scene->mHoverCounts[button] = 0;
@@ -944,11 +944,11 @@ extern "C" void iplSDChannelTitle_returnToIdle(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_loadTitleBanner(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E76C8(SDChannelTitle* scene) {
int page;
int index;
if (System::getChannelManager()->isLoadedTmp() || System::getChannelManager()->hasChannel(scene->mTitleId, &page, &index)) {
scene->mpBannerFiles[scene->mLoadedIndex] = iplSDChannelTitle_loadBannerMetaFiles(scene, scene->mTitleId,
scene->mpBannerFiles[scene->mLoadedIndex] = iplSDChannelTitle_813E8DCC(scene, scene->mTitleId,
&scene->mpSoundFiles[scene->mLoadedIndex]);
if (scene->mbCopiedTitle) {
scene->mState = 13;
@@ -958,44 +958,44 @@ extern "C" void iplSDChannelTitle_loadTitleBanner(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateBannerLoad(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7780(SDChannelTitle* scene) {
if (!scene->mpBannerFiles[scene->mLoadedIndex] || scene->mpBannerFiles[scene->mLoadedIndex]->isFinished()) {
iplSDChannelTitle_loadBannerScript(scene, scene->mTitleId);
iplSDChannelTitle_rebuildBannerLayout(scene);
iplSDChannelTitle_813E7B30(scene, scene->mTitleId);
iplSDChannelTitle_813E630C(scene);
scene->mState = 4;
iplSDChannelTitle_playBannerIntro(scene);
iplSDChannelTitle_813E8034(scene);
}
}
extern "C" void iplSDChannelTitle_tryLaunchSelected(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7800(SDChannelTitle* scene) {
if (static_cast<u32>(scene->mpChannelSelect->mCurrentSDState - 1) <= 1) {
scene->mState = 1;
} else {
SDChannelObj* channel = scene->mpChannelSelect->findChannelObject(scene->mPage, scene->mIndex);
if (iplSDChannelObj_813E3330(channel)) {
iplSDChannelTitle_beginLaunch(scene, channel);
iplSDChannelTitle_813E86A0(scene, channel);
}
}
}
extern "C" void iplSDChannelTitle_updateTmdReady(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E787C(SDChannelTitle* scene) {
if (scene->mbTmdReady) {
if (!System::getChannelManager()->isMissingTicket(scene->mTitleId) && !utility::ESMisc::CheckTmdCountryCode(scene->mpTmd)) {
System::getErrorHandler()->set(ErrorHandler::DEFAULT, 3, NULL, 0, -1);
}
scene->mMakerCode = scene->mpTmd->head.groupId;
if (!iplSDChannelTitle_isNetworkAllowed(scene, scene->mpTmd, scene->mTitleId)) {
iplSDChannelTitle_confirmLeaveToSettings(scene, false);
if (!iplSDChannelTitle_813E847C(scene, scene->mpTmd, scene->mTitleId)) {
iplSDChannelTitle_813E88CC(scene, false);
scene->mNextScene = 18;
} else if (iplSDChannelTitle_passesParentalCheck(scene, scene->mpTmd)) {
iplSDChannelTitle_prepareSceneExit(scene, scene->mNextScene);
} else if (iplSDChannelTitle_813E8F04(scene, scene->mpTmd)) {
iplSDChannelTitle_813E899C(scene, scene->mNextScene);
if (scene->mbCopiedTitle) {
scene->mState = 25;
} else {
scene->mState = 15;
}
} else {
iplSDChannelTitle_openParentalDialog(scene, NULL);
iplSDChannelTitle_813E850C(scene, NULL);
}
if (scene->mpTmd) {
scene->mpBannerHeap->free(scene->mpTmd);
@@ -1003,7 +1003,7 @@ extern "C" void iplSDChannelTitle_updateTmdReady(SDChannelTitle* scene) {
}
}
extern "C" bool iplSDChannelTitle_startZoomFade(SDChannelTitle* scene) {
extern "C" bool iplSDChannelTitle_813E79B0(SDChannelTitle* scene) {
if (!scene->mpChannelSelect->tellStartingZoomAnm()) {
return false;
}
@@ -1012,7 +1012,7 @@ extern "C" bool iplSDChannelTitle_startZoomFade(SDChannelTitle* scene) {
return true;
}
extern "C" void iplSDChannelTitle_preparePageRestart(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7A18(SDChannelTitle* scene) {
if (!scene->mScriptEnabled || scene->mScriptState == 4) {
if (scene->mpChannelSelect->prepareRestarting(scene->mPage)) {
scene->mpChannelSelect->startPageTransition(scene->mPage, scene->mIndex);
@@ -1034,7 +1034,7 @@ extern "C" void iplSDChannelTitle_preparePageRestart(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_loadBannerScript(SDChannelTitle* scene, ESTitleId title) {
extern "C" void iplSDChannelTitle_813E7B30(SDChannelTitle* scene, ESTitleId title) {
if (!System::isSafeMode()) {
if (scene->mScriptEnabled) {
delete scene->mpScriptFile;
@@ -1052,7 +1052,7 @@ extern "C" void iplSDChannelTitle_loadBannerScript(SDChannelTitle* scene, ESTitl
}
}
extern "C" void iplSDChannelTitle_updateScript(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7C0C(SDChannelTitle* scene) {
if (scene->mScriptEnabled != 1) {
return;
}
@@ -1061,16 +1061,16 @@ extern "C" void iplSDChannelTitle_updateScript(SDChannelTitle* scene) {
}
switch (scene->mScriptState) {
case 0:
iplSDChannelTitle_updateScriptIdle(scene);
iplSDChannelTitle_813E7D14(scene);
break;
case 1:
iplSDChannelTitle_updateScriptLoad(scene);
iplSDChannelTitle_813E7DD0(scene);
break;
case 2:
System::getCSManager()->calc();
if (scene->mpRsoThread->IsThreadTerminated()) {
if (System::getCSManager()->getAltSoundState() == 1) {
iplSDChannelTitle_startBannerSound(scene);
iplSDChannelTitle_813E8160(scene);
System::getCSManager()->setAltSoundState(0);
}
System::getCSManager()->finish();
@@ -1078,12 +1078,12 @@ extern "C" void iplSDChannelTitle_updateScript(SDChannelTitle* scene) {
}
break;
case 3:
iplSDChannelTitle_destroyScript(scene);
iplSDChannelTitle_813E7FB0(scene);
break;
}
}
extern "C" void iplSDChannelTitle_updateScriptIdle(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7D14(SDChannelTitle* scene) {
if (scene->mbStopScript) {
scene->mbStopScript = false;
scene->mScriptFrame = 0;
@@ -1101,7 +1101,7 @@ extern "C" void iplSDChannelTitle_updateScriptIdle(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_updateScriptLoad(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7DD0(SDChannelTitle* scene) {
if (!scene->mpScriptFile->isFinished()) {
return;
}
@@ -1132,7 +1132,7 @@ extern "C" void iplSDChannelTitle_updateScriptLoad(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_destroyScript(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E7FB0(SDChannelTitle* scene) {
scene->mbScriptFailed = true;
System::getCSManager()->destroy();
scene->mScriptFrame = 0;
@@ -1142,7 +1142,7 @@ extern "C" void iplSDChannelTitle_destroyScript(SDChannelTitle* scene) {
scene->mScriptState = 0;
}
extern "C" void iplSDChannelTitle_playBannerIntro(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E8034(SDChannelTitle* scene) {
if (scene->mpBannerAnimations[1]) {
scene->mpBannerAnimations[1]->play();
scene->mbBannerStarting = false;
@@ -1153,7 +1153,7 @@ extern "C" void iplSDChannelTitle_playBannerIntro(SDChannelTitle* scene) {
}
if (scene->mState != 6) {
if (!System::getChannelManager()->usesAltSound(scene->mTitleId) || !scene->mScriptEnabled) {
iplSDChannelTitle_startBannerSound(scene);
iplSDChannelTitle_813E8160(scene);
}
if (!scene->mpBannerLayout) {
scene->mpProgressLayout->getAnim(0)->initAnmFrame();
@@ -1163,7 +1163,7 @@ extern "C" void iplSDChannelTitle_playBannerIntro(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_startBannerSound(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E8160(SDChannelTitle* scene) {
if (scene->mpSoundFiles[scene->mLoadedIndex] && scene->mpSoundFiles[scene->mLoadedIndex]->checkData() == 1) {
void* sound = scene->mpSoundFiles[scene->mLoadedIndex]->getBuffer();
u32 size = System::getChannelManager()->getSoundSize(scene->mTitleId);
@@ -1171,15 +1171,15 @@ extern "C" void iplSDChannelTitle_startBannerSound(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_bindBannerAnimations(SDChannelTitle* scene) {
iplSDChannelTitle_bindBannerAnims(scene);
extern "C" void iplSDChannelTitle_813E81FC(SDChannelTitle* scene) {
iplSDChannelTitle_813E8360(scene);
if (scene->mScriptEnabled) {
memset(scene->mpScriptAnimations, 0, sizeof(scene->mpScriptAnimations));
iplSDChannelTitle_bindRsoAnimations(scene, scene->mpBannerLayout, scene->mpScriptAnimations, "banner");
iplSDChannelTitle_813E8258(scene, scene->mpBannerLayout, scene->mpScriptAnimations, "banner");
}
}
extern "C" void iplSDChannelTitle_bindRsoAnimations(SDChannelTitle*, layout::Object* layout,
extern "C" void iplSDChannelTitle_813E8258(SDChannelTitle*, layout::Object* layout,
layout::Animator** animations, const char* prefix) {
char groupName[8];
char animationName[20];
@@ -1203,7 +1203,7 @@ extern "C" void iplSDChannelTitle_bindRsoAnimations(SDChannelTitle*, layout::Obj
}
}
extern "C" void iplSDChannelTitle_bindBannerAnims(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E8360(SDChannelTitle* scene) {
for (int index = 0; index < 3; ++index) {
if (scene->mpBannerLayout->searchFile(sBannerAnimationNames[index])) {
if (index == 0) {
@@ -1226,14 +1226,14 @@ extern "C" void iplSDChannelTitle_bindBannerAnims(SDChannelTitle* scene) {
}
}
extern "C" BOOL iplSDChannelTitle_isNetworkAllowed(SDChannelTitle*, ESTmdView*, ESTitleId titleId) {
extern "C" BOOL iplSDChannelTitle_813E847C(SDChannelTitle*, ESTmdView*, ESTitleId titleId) {
if (!System::getChannelManager()->needsNetSetting(titleId) || ncd::NCDSetting::getConnectEnableFlag()) {
return TRUE;
}
return FALSE;
}
extern "C" BOOL iplSDChannelTitle_isParentalEnabled() {
extern "C" BOOL iplSDChannelTitle_813E84C8() {
SCParentalControlsInfo parental;
if (SCGetParentalControl(&parental) && (parental.enable & SC_PARENTAL_FLAG_ENABLED)) {
return TRUE;
@@ -1241,7 +1241,7 @@ extern "C" BOOL iplSDChannelTitle_isParentalEnabled() {
return FALSE;
}
extern "C" void iplSDChannelTitle_openParentalDialog(SDChannelTitle* scene, void* arguments) {
extern "C" void iplSDChannelTitle_813E850C(SDChannelTitle* scene, void* arguments) {
System::getHomeButtonMenu()->enable();
scene->mbResetAcceptable = true;
if (static_cast<SDButton*>(System::getScene(0x24))->isLeftArrowVisible()) {
@@ -1253,7 +1253,7 @@ extern "C" void iplSDChannelTitle_openParentalDialog(SDChannelTitle* scene, void
scene->mState = 11;
}
extern "C" void iplSDChannelTitle_setPageAndIndex(SDChannelTitle* scene, int page, int index) {
extern "C" void iplSDChannelTitle_813E85C0(SDChannelTitle* scene, int page, int index) {
SDChannelObj* keep = NULL;
if (scene->mpIconLayout) {
keep = scene->mpChannelSelect->findChannelObject(scene->mPage, scene->mIndex);
@@ -1265,13 +1265,13 @@ extern "C" void iplSDChannelTitle_setPageAndIndex(SDChannelTitle* scene, int pag
scene->mPosition.x = SDChannelSelect::getChannelPanePosition(scene->mpChannelSelect, scene->mIndex).x;
scene->mPosition.y = SDChannelSelect::getChannelPanePosition(scene->mpChannelSelect, scene->mIndex).y;
if (iplSDChannelObj_813E3330(channel)) {
iplSDChannelTitle_beginLaunch(scene, channel);
iplSDChannelTitle_813E86A0(scene, channel);
} else {
scene->mState = 28;
}
}
extern "C" void iplSDChannelTitle_beginLaunch(SDChannelTitle* scene, SDChannelObj* channel) {
extern "C" void iplSDChannelTitle_813E86A0(SDChannelTitle* scene, SDChannelObj* channel) {
scene->mTitleId = channel->mAppMeta.titleId;
if (scene->mScriptEnabled) {
scene->mbStopScript = true;
@@ -1280,7 +1280,7 @@ extern "C" void iplSDChannelTitle_beginLaunch(SDChannelTitle* scene, SDChannelOb
scene->mState = 8;
}
extern "C" void iplSDChannelTitle_cleanupAndLeave(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E86D8(SDChannelTitle* scene) {
scene->mParentalResult = 0;
scene->mbStartAnimation = false;
static_cast<SDButton*>(System::getScene(0x24))->animation(15);
@@ -1311,7 +1311,7 @@ extern "C" void iplSDChannelTitle_cleanupAndLeave(SDChannelTitle* scene) {
System::getHomeButtonMenu()->disable();
System::stopReceiveSchedule();
if (hasTitle || hasTemporaryTitle) {
System::getTask1()->request(iplSDChannelTitle_fetchTmdViewTask, scene, NULL);
System::getTask1()->request(iplSDChannelTitle_813E8E70, scene, NULL);
scene->mbCopiedTitle = false;
scene->mState = 13;
} else {
@@ -1322,7 +1322,7 @@ extern "C" void iplSDChannelTitle_cleanupAndLeave(SDChannelTitle* scene) {
}
}
extern "C" void iplSDChannelTitle_confirmLeaveToSettings(SDChannelTitle* scene, bool settings) {
extern "C" void iplSDChannelTitle_813E88CC(SDChannelTitle* scene, bool settings) {
if (settings) {
scene->reserveAllSceneDestruction(0x12, reinterpret_cast<void*>(1));
scene->mState = 7;
@@ -1338,7 +1338,7 @@ extern "C" void iplSDChannelTitle_confirmLeaveToSettings(SDChannelTitle* scene,
}
}
extern "C" void iplSDChannelTitle_prepareSceneExit(SDChannelTitle* scene, int nextScene) {
extern "C" void iplSDChannelTitle_813E899C(SDChannelTitle* scene, int nextScene) {
for (int index = 0; index < 4; ++index) {
controller::Interface* controller = System::getController(index);
if (controller) {
@@ -1351,7 +1351,7 @@ extern "C" void iplSDChannelTitle_prepareSceneExit(SDChannelTitle* scene, int ne
}
}
extern "C" void iplSDChannelTitle_flushSaveBeforeExit(SDChannelTitle* scene, int nextScene) {
extern "C" void iplSDChannelTitle_813E8A20(SDChannelTitle* scene, int nextScene) {
int page;
int index;
if (System::getChannelManager()->hasChannel(scene->mTitleId, &page, &index)) {
@@ -1363,7 +1363,7 @@ extern "C" void iplSDChannelTitle_flushSaveBeforeExit(SDChannelTitle* scene, int
__WPADReconnect(TRUE);
}
extern "C" void iplSDChannelTitle_rebootSystem(SDChannelTitle*) {
extern "C" void iplSDChannelTitle_813E8AB4(SDChannelTitle*) {
snd::getSystem()->stopAllSound(0);
snd::getSystem()->calc();
VISetBlack(TRUE);
@@ -1374,11 +1374,11 @@ extern "C" void iplSDChannelTitle_rebootSystem(SDChannelTitle*) {
OSRebootSystem();
}
extern "C" bool iplSDChannelTitle_isLaunchDelayDone(SDChannelTitle* scene) {
extern "C" bool iplSDChannelTitle_813E8B1C(SDChannelTitle* scene) {
return static_cast<u32>(120.0f / System::getAnimDelta()) < scene->mLaunchFrame;
}
extern "C" void iplSDChannelTitle_setStartButtonPressed(SDChannelTitle* scene) {
extern "C" void iplSDChannelTitle_813E8B70(SDChannelTitle* scene) {
if (!scene->mStartButtonState) {
scene->mpButtonAnimations[5][3]->stop();
scene->mpButtonAnimations[5][4]->play();
@@ -1388,7 +1388,7 @@ extern "C" void iplSDChannelTitle_setStartButtonPressed(SDChannelTitle* scene) {
scene->mStartButtonState = 1;
}
extern "C" void iplSDChannelTitle_drawDimOverlay(SDChannelTitle*, const nw4r::ut::Rect& bounds, GXColor color) {
extern "C" void iplSDChannelTitle_813E8C08(SDChannelTitle*, const nw4r::ut::Rect& bounds, GXColor color) {
nw4r::ut::Rect screen;
System::getProjectionRect(&screen);
nw4r::ut::Rect rectangles[4];
@@ -1413,7 +1413,7 @@ extern "C" void iplSDChannelTitle_drawDimOverlay(SDChannelTitle*, const nw4r::ut
}
}
extern "C" void iplSDChannelTitle_setPaneMessage(SDChannelTitle*, nw4r::lyt::Pane* pane, u32 message, bool allocate) {
extern "C" void iplSDChannelTitle_813E8D14(SDChannelTitle*, nw4r::lyt::Pane* pane, u32 message, bool allocate) {
wchar_t text[256];
wcsncpy(text, System::getMessage(message), 256);
text[255] = 0;
@@ -1425,13 +1425,13 @@ extern "C" void iplSDChannelTitle_setPaneMessage(SDChannelTitle*, nw4r::lyt::Pan
textBox->SetString(text);
}
extern "C" nand::LayoutFile* iplSDChannelTitle_loadBannerMetaFiles(SDChannelTitle*, ESTitleId title, nand::File** sound) {
extern "C" nand::LayoutFile* iplSDChannelTitle_813E8DCC(SDChannelTitle*, ESTitleId title, nand::File** sound) {
*sound = System::getChannelManager()->readSoundMetaAsync(System::getMem2App(), title);
nand::MetaFile* banner = System::getChannelManager()->readBannerMetaAsync(System::getMem2App(), title);
return new (System::getMem2App(), 4) nand::LayoutFile(banner, NULL);
}
extern "C" void iplSDChannelTitle_fetchTmdViewTask(void* argument) {
extern "C" void iplSDChannelTitle_813E8E70(void* argument) {
SDChannelTitle* scene = static_cast<SDChannelTitle*>(argument);
ESError result = utility::ESMisc::GetTmdView(scene->mpBannerHeap, scene->mTitleId, &scene->mpTmd);
if (result) {
@@ -1441,7 +1441,7 @@ extern "C" void iplSDChannelTitle_fetchTmdViewTask(void* argument) {
scene->mbTmdReady = true;
}
extern "C" BOOL iplSDChannelTitle_passesParentalCheck(SDChannelTitle* scene, ESTmdView* tmd) {
extern "C" BOOL iplSDChannelTitle_813E8F04(SDChannelTitle* scene, ESTmdView* tmd) {
if (!utility::ESMisc::__IsPCEnable()) {
return TRUE;
}
@@ -1467,7 +1467,7 @@ extern "C" BOOL iplSDChannelTitle_passesParentalCheck(SDChannelTitle* scene, EST
return TRUE;
}
extern "C" void iplSDChannelTitle_onTitlePaneEvent(SDTitlePaneEventHandler* handler, u32 component,
extern "C" void iplSDChannelTitle_813E9004(SDTitlePaneEventHandler* handler, u32 component,
u32 event, const controller::Interface* controller) {
const char* paneName = handler->getPane(component)->GetName();
switch (event) {
@@ -1477,12 +1477,12 @@ extern "C" void iplSDChannelTitle_onTitlePaneEvent(SDTitlePaneEventHandler* hand
handler->mpScene->mpButtonAnimations[2][2]->play();
snd::getSystem()->startSE("WIPL_SE_BT_PUSH");
handler->mpScene->mState = 10;
iplSDChannelTitle_preparePageRestart(handler->mpScene);
iplSDChannelTitle_813E7A18(handler->mpScene);
} else if (strcmp(paneName, sButtonNames[1]) == 0) {
if (handler->mpScene->mStartButtonState != 2) {
snd::getSystem()->startSE("WIPL_SE_GRAY_BUTTON");
} else {
iplSDChannelTitle_cleanupAndLeave(handler->mpScene);
iplSDChannelTitle_813E86D8(handler->mpScene);
handler->mpScene->mpButtonAnimations[3][2]->play();
snd::getSystem()->stopSE(handler->mpScene->mpSoundHandle, 30);
snd::getSystem()->startSE("WIPL_SE_DECIDE");
@@ -1526,7 +1526,7 @@ extern "C" void iplSDChannelTitle_onTitlePaneEvent(SDTitlePaneEventHandler* hand
}
}
extern "C" void iplSDChannelTitle_onTitleButtonEvent(SDTitleButtonEventHandler* handler, u32 component,
extern "C" void iplSDChannelTitle_813E92EC(SDTitleButtonEventHandler* handler, u32 component,
u32 event, const controller::Interface* controller) {
const char* name = handler->getPane(component)->GetName();
switch (event) {
@@ -1538,14 +1538,14 @@ extern "C" void iplSDChannelTitle_onTitleButtonEvent(SDTitleButtonEventHandler*
int index;
handler->mpScene->mpChannelSelect->findAdjacentChannel(1, &page, &index);
button->animation(7);
iplSDChannelTitle_setPageAndIndex(handler->mpScene, page, index);
iplSDChannelTitle_813E85C0(handler->mpScene, page, index);
snd::getSystem()->startSE("WSD_SELECT");
} else if (strcmp(name, SDButton::getButtonName(SDButton::BTN_ARROW_RIGHT)) == 0) {
int page;
int index;
handler->mpScene->mpChannelSelect->findAdjacentChannel(0, &page, &index);
button->animation(8);
iplSDChannelTitle_setPageAndIndex(handler->mpScene, page, index);
iplSDChannelTitle_813E85C0(handler->mpScene, page, index);
snd::getSystem()->startSE("WSD_SELECT");
}
}
@@ -1558,11 +1558,11 @@ void SDChannelTitle::startResetting() {
}
void SDTitleButtonEventHandler::onEventDerived(u32 component, u32 event, const controller::Interface* controller) {
iplSDChannelTitle_onTitleButtonEvent(this, component, event, controller);
iplSDChannelTitle_813E92EC(this, component, event, controller);
}
void SDTitlePaneEventHandler::onEvent(u32 component, u32 event, void* data) {
iplSDChannelTitle_onTitlePaneEvent(this, component, event, static_cast<const controller::Interface*>(data));
iplSDChannelTitle_813E9004(this, component, event, static_cast<const controller::Interface*>(data));
}
}

View File

@@ -230,34 +230,29 @@ namespace ipl {
blr
}
asm int Manager::getNumValidChannel() const {
nofralloc
li r9, 0
li r10, 0
li r4, 0
li r0, 0xc
getNumValidChannel_L1:
add r8, r3, r4
li r5, 0
mtctr r0
getNumValidChannel_L2:
add r7, r8, r5
lbz r6, 0x30(r7)
cmpwi r6, 0
beq getNumValidChannel_L3
lwz r6, 0x34(r7)
cmpwi r6, 0
beq getNumValidChannel_L3
addi r9, r9, 1
getNumValidChannel_L3:
addi r5, r5, 0x10
bdnz getNumValidChannel_L2
addi r10, r10, 1
addi r4, r4, 0xc0
cmpwi r10, 4
blt getNumValidChannel_L1
mr r3, r9
blr
int Manager::getNumValidChannel() const {
const ChannelSlot* q;
int dens = 12;
const ChannelPage* p;
int slot;
int count = 0;
int page;
u8 flag;
s32 val;
for (page = 0; page < 4; page++) {
p = (const ChannelPage*)((const u8*)this + page * 0xc0);
for (slot = 0; slot < dens; slot++) {
q = &p->slots[slot];
flag = q->valid;
if (flag != 0) {
val = q->titleId;
if (val != 0) {
count++;
}
}
}
}
return count;
}
BOOL Manager::isResetAcceptable() {