Compare commits
39 Commits
agent/w092
...
agent/w092
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
574944349c | ||
|
|
eee97b5612 | ||
|
|
ab962e442f | ||
|
|
33647df7dd | ||
|
|
b38d82bc89 | ||
|
|
c521f2acc9 | ||
|
|
9de0675732 | ||
|
|
96d4aaabca | ||
|
|
f4c1b7346f | ||
|
|
7e377c0310 | ||
|
|
2a9b2964fb | ||
|
|
66b49f9fdb | ||
|
|
d1dd7c227b | ||
|
|
385c3b9da9 | ||
|
|
13d3e82cc4 | ||
|
|
ba8ff95bae | ||
|
|
c4958c6d09 | ||
|
|
9ed2f96bc9 | ||
|
|
ad4af23bad | ||
|
|
33653f444e | ||
|
|
402b285d96 | ||
|
|
33325978c8 | ||
|
|
96c74f4910 | ||
|
|
e5714bb327 | ||
|
|
8e254f1c88 | ||
|
|
313e396989 | ||
|
|
f98e550b24 | ||
|
|
7f8b4c8a4f | ||
|
|
6806dc1926 | ||
|
|
f0f1462ff4 | ||
|
|
9347e0b1c3 | ||
|
|
341ce036f5 | ||
|
|
53be96c012 | ||
|
|
a4e7841498 | ||
|
|
fb81577a0f | ||
|
|
258f4a6f91 | ||
|
|
b719ba47a5 | ||
|
|
094cfd811e | ||
|
|
c98c2010b2 |
@@ -4558,44 +4558,44 @@ __ct__Q33ipl5scene15SDChannelSelectFPQ23EGG4Heap = .text:0x813DAB08; // type:fun
|
||||
__dt__Q33ipl5scene15SDChannelSelectFv = .text:0x813DAE7C; // type:function size:0x5C
|
||||
prepare__Q33ipl5scene15SDChannelSelectFv = .text:0x813DAED8; // type:function size:0xA8
|
||||
create__Q33ipl5scene15SDChannelSelectFv = .text:0x813DAF80; // type:function size:0x248
|
||||
iplSDChannelSelect_813DB1C8 = .text:0x813DB1C8; // type:function size:0x44
|
||||
iplSDChannelSelect_813DB20C = .text:0x813DB20C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DB254 = .text:0x813DB254; // type:function size:0xB4
|
||||
iplSDChannelSelect_813DB308 = .text:0x813DB308; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB364 = .text:0x813DB364; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB3C0 = .text:0x813DB3C0; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB41C = .text:0x813DB41C; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB478 = .text:0x813DB478; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB4D4 = .text:0x813DB4D4; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB530 = .text:0x813DB530; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DB58C = .text:0x813DB58C; // type:function size:0x60
|
||||
iplSDChannelSelect_813DB5EC = .text:0x813DB5EC; // type:function size:0x60
|
||||
iplSDChannelSelect_813DB64C = .text:0x813DB64C; // type:function size:0x40
|
||||
iplSDChannelSelect_813DB68C = .text:0x813DB68C; // type:function size:0x40
|
||||
iplSDChannelSelect_813DB6CC = .text:0x813DB6CC; // type:function size:0x518
|
||||
iplSDChannelSelect_813DBBE4 = .text:0x813DBBE4; // type:function size:0xB0
|
||||
iplSDChannelSelect_813DBC94 = .text:0x813DBC94; // type:function size:0xB8
|
||||
iplSDChannelSelect_813DBD4C = .text:0x813DBD4C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DBD94 = .text:0x813DBD94; // type:function size:0xD8
|
||||
iplSDChannelSelect_813DBE6C = .text:0x813DBE6C; // type:function size:0x28
|
||||
iplSDChannelSelect_813DBE94 = .text:0x813DBE94; // type:function size:0x124
|
||||
iplSDChannelSelect_813DBFB8 = .text:0x813DBFB8; // type:function size:0x28
|
||||
iplSDChannelSelect_813DBFE0 = .text:0x813DBFE0; // type:function size:0x2AC
|
||||
iplSDChannelSelect_813DC28C = .text:0x813DC28C; // type:function size:0x64
|
||||
iplSDChannelSelect_813DC2F0 = .text:0x813DC2F0; // type:function size:0x1B0
|
||||
iplSDChannelSelect_813DC4A0 = .text:0x813DC4A0; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DC4FC = .text:0x813DC4FC; // type:function size:0x78
|
||||
iplSDChannelSelect_813DC574 = .text:0x813DC574; // type:function size:0x80
|
||||
iplSDChannelSelect_813DC5F4 = .text:0x813DC5F4; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC63C = .text:0x813DC63C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC684 = .text:0x813DC684; // type:function size:0x90
|
||||
iplSDChannelSelect_813DC714 = .text:0x813DC714; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC75C = .text:0x813DC75C; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC7A4 = .text:0x813DC7A4; // type:function size:0x48
|
||||
iplSDChannelSelect_813DC7EC = .text:0x813DC7EC; // type:function size:0x14C
|
||||
iplSDChannelSelect_813DC938 = .text:0x813DC938; // type:function size:0x18C
|
||||
iplSDChannelSelect_813DCAC4 = .text:0x813DCAC4; // type:function size:0x42C
|
||||
iplSDChannelSelect_813DCEF0 = .text:0x813DCEF0; // type:function size:0x24
|
||||
enqueueStartNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB1C8; // type:function size:0x44
|
||||
enqueueFinishNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB20C; // type:function size:0x48
|
||||
enqueueNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB254; // type:function size:0xB4
|
||||
enqueueLoadNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB308; // type:function size:0x5C
|
||||
enqueuePageNotice__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB364; // type:function size:0x5C
|
||||
enqueueResultNotice__Q33ipl5scene15SDChannelSelectFUl = .text:0x813DB3C0; // type:function size:0x5C
|
||||
enqueueChannelNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB41C; // type:function size:0x5C
|
||||
enqueueMoveNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB478; // type:function size:0x5C
|
||||
enqueueStateNotice__Q33ipl5scene15SDChannelSelectFUlUlUlUl = .text:0x813DB4D4; // type:function size:0x5C
|
||||
enqueueErrorNotice__Q33ipl5scene15SDChannelSelectFUlUl = .text:0x813DB530; // type:function size:0x5C
|
||||
enqueueCommandNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB58C; // type:function size:0x60
|
||||
enqueueDeleteNotice__Q33ipl5scene15SDChannelSelectFUlUlUl = .text:0x813DB5EC; // type:function size:0x60
|
||||
clearCommandQueue__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB64C; // type:function size:0x40
|
||||
clearNoticeQueue__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB68C; // type:function size:0x40
|
||||
processWorkerCommands__Q33ipl5scene15SDChannelSelectFv = .text:0x813DB6CC; // type:function size:0x518
|
||||
handleWorkerStartup__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBBE4; // type:function size:0xB0
|
||||
handleNandTitleCount__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBC94; // type:function size:0xB8
|
||||
handleNandTitleUsageComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBD4C; // type:function size:0x48
|
||||
handleNandTitleUsage__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBD94; // type:function size:0xD8
|
||||
compareTitleUsage__Q33ipl5scene15SDChannelSelectFPCvPCv = .text:0x813DBE6C; // type:function size:0x28
|
||||
handleSDTitleList__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBE94; // type:function size:0x124
|
||||
compareTitleInfo__Q33ipl5scene15SDChannelSelectFPCvPCv = .text:0x813DBFB8; // type:function size:0x28
|
||||
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv = .text:0x813DBFE0; // type:function size:0x2AC
|
||||
handleSDMountComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC28C; // type:function size:0x64
|
||||
handleSDChannelUpdateComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC2F0; // type:function size:0x1B0
|
||||
handleSDCardReady__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC4A0; // type:function size:0x5C
|
||||
handleCardCommand__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC4FC; // type:function size:0x78
|
||||
handleCopyComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC574; // type:function size:0x80
|
||||
handleSDLocationUpdateComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC5F4; // type:function size:0x48
|
||||
handleSDLocationReadComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC63C; // type:function size:0x48
|
||||
handleMoveComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC684; // type:function size:0x90
|
||||
handleBackupFitComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC714; // type:function size:0x48
|
||||
handleNandSDCleanupComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC75C; // type:function size:0x48
|
||||
handleSDDeleteComplete__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC7A4; // type:function size:0x48
|
||||
updateChannelNotices__Q33ipl5scene15SDChannelSelectFii = .text:0x813DC7EC; // type:function size:0x14C
|
||||
processWorkerState__Q33ipl5scene15SDChannelSelectFv = .text:0x813DC938; // type:function size:0x18C
|
||||
updateDialogAnimation__Q33ipl5scene15SDChannelSelectFv = .text:0x813DCAC4; // type:function size:0x42C
|
||||
setDialogMessage__Q33ipl5scene15SDChannelSelectFUlUl = .text:0x813DCEF0; // type:function size:0x24
|
||||
iplSDChannelSelect_813DCF14 = .text:0x813DCF14; // type:function size:0xCC
|
||||
iplSDChannelSelect_813DCFE0 = .text:0x813DCFE0; // type:function size:0xCC
|
||||
iplSDChannelSelect_813DD0AC = .text:0x813DD0AC; // type:function size:0x194
|
||||
@@ -4619,31 +4619,31 @@ initCalcFadeout__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE24C; // type:fun
|
||||
calcFadeout__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE2EC; // type:function size:0x50
|
||||
draw__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE33C; // type:function size:0x38C
|
||||
destroy__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE6C8; // type:function size:0x334
|
||||
iplSDChannelSelect_813DE9FC = .text:0x813DE9FC; // type:function size:0x440
|
||||
iplSDChannelSelect_813DEE3C = .text:0x813DEE3C; // type:function size:0x5C
|
||||
iplSDChannelSelect_813DEE98 = .text:0x813DEE98; // type:function size:0x78
|
||||
iplSDChannelSelect_813DEF10 = .text:0x813DEF10; // type:function size:0x58
|
||||
createBaseLayout__Q33ipl5scene15SDChannelSelectFv = .text:0x813DE9FC; // type:function size:0x440
|
||||
updateChannelObjects__Q33ipl5scene15SDChannelSelectFv = .text:0x813DEE3C; // type:function size:0x5C
|
||||
updateChannelObject__Q33ipl5scene15SDChannelSelectFPQ33ipl5scene12SDChannelObj = .text:0x813DEE98; // type:function size:0x78
|
||||
calcChannelObjects__Q33ipl5scene15SDChannelSelectFv = .text:0x813DEF10; // type:function size:0x58
|
||||
iplSDChannelSelect_813DEF68 = .text:0x813DEF68; // type:function size:0x27C
|
||||
iplSDChannelSelect_813DF1E4 = .text:0x813DF1E4; // type:function size:0x14
|
||||
iplSDChannelSelect_813DF1F8 = .text:0x813DF1F8; // type:function size:0xB0
|
||||
drawChannelObjects__Q33ipl5scene15SDChannelSelectFv = .text:0x813DF1F8; // type:function size:0xB0
|
||||
iplSDChannelSelect_813DF2A8 = .text:0x813DF2A8; // type:function size:0x138
|
||||
iplSDChannelSelect_813DF3E0 = .text:0x813DF3E0; // type:function size:0x1C
|
||||
iplSDChannelSelect_813DF3FC = .text:0x813DF3FC; // type:function size:0x110
|
||||
iplSDChannelSelect_813DF50C = .text:0x813DF50C; // type:function size:0x4C
|
||||
iplSDChannelSelect_813DF558 = .text:0x813DF558; // type:function size:0x178
|
||||
iplSDChannelSelect_813DF6D0 = .text:0x813DF6D0; // type:function size:0x164
|
||||
iplSDChannelSelect_813DF834 = .text:0x813DF834; // type:function size:0x110
|
||||
iplSDChannelSelect_813DF944 = .text:0x813DF944; // type:function size:0x84
|
||||
iplSDChannelSelect_813DF9C8 = .text:0x813DF9C8; // type:function size:0xF8
|
||||
iplSDChannelSelect_813DFAC0 = .text:0x813DFAC0; // type:function size:0xFC
|
||||
iplSDChannelSelect_813DFBBC = .text:0x813DFBBC; // type:function size:0xE4
|
||||
iplSDChannelSelect_813DFCA0 = .text:0x813DFCA0; // type:function size:0x50
|
||||
createChannelList__Q33ipl5scene15SDChannelSelectFib = .text:0x813DF834; // type:function size:0x110
|
||||
createChannelObject__Q33ipl5scene15SDChannelSelectFii = .text:0x813DF944; // type:function size:0x84
|
||||
destroyUnusedChannelObjects__Q33ipl5scene15SDChannelSelectFiPQ33ipl5scene12SDChannelObj = .text:0x813DF9C8; // type:function size:0xF8
|
||||
refreshChannelList__Q33ipl5scene15SDChannelSelectFv = .text:0x813DFAC0; // type:function size:0xFC
|
||||
refreshAfterSDTitleList__Q33ipl5scene15SDChannelSelectFv = .text:0x813DFBBC; // type:function size:0xE4
|
||||
destroyChannelObject__Q33ipl5scene15SDChannelSelectFPQ33ipl5scene12SDChannelObj = .text:0x813DFCA0; // type:function size:0x50
|
||||
iplSDChannelSelect_813DFCF0 = .text:0x813DFCF0; // type:function size:0x74
|
||||
iplSDChannelSelect_813DFD64 = .text:0x813DFD64; // type:function size:0x154
|
||||
iplSDChannelSelect_813DFEB8 = .text:0x813DFEB8; // type:function size:0x74
|
||||
findChannelObject__Q33ipl5scene15SDChannelSelectCFii = .text:0x813DFEB8; // type:function size:0x74
|
||||
iplSDChannelSelect_813DFF2C = .text:0x813DFF2C; // type:function size:0x1C0
|
||||
iplSDChannelSelect_813E00EC = .text:0x813E00EC; // type:function size:0x140
|
||||
iplSDChannelSelect_813E022C = .text:0x813E022C; // type:function size:0x68
|
||||
hasChannelObject__Q33ipl5scene15SDChannelSelectCFii = .text:0x813E00EC; // type:function size:0x140
|
||||
isChannelInCalc__Q33ipl5scene15SDChannelSelectCFiii = .text:0x813E022C; // type:function size:0x68
|
||||
iplSDChannelSelect_813E0294 = .text:0x813E0294; // type:function size:0x104
|
||||
iplSDChannelSelect_813E0398 = .text:0x813E0398; // type:function size:0x18
|
||||
iplSDChannelSelect_813E03B0 = .text:0x813E03B0; // type:function size:0xA0
|
||||
@@ -4651,13 +4651,13 @@ iplSDChannelSelect_813E0450 = .text:0x813E0450; // type:function size:0xEC
|
||||
iplSDChannelSelect_813E053C = .text:0x813E053C; // type:function size:0x84
|
||||
iplSDChannelSelect_813E05C0 = .text:0x813E05C0; // type:function size:0x64
|
||||
iplSDChannelSelect_813E0624 = .text:0x813E0624; // type:function size:0xB4
|
||||
iplSDChannelSelect_813E06D8 = .text:0x813E06D8; // type:function size:0xAC
|
||||
iplSDChannelSelect_813E0784 = .text:0x813E0784; // type:function size:0x30
|
||||
iplSDChannelSelect_813E07B4 = .text:0x813E07B4; // type:function size:0x30
|
||||
iplSDChannelSelect_813E07E4 = .text:0x813E07E4; // type:function size:0x64
|
||||
getChannelBasePane__Q33ipl5scene15SDChannelSelectCFiii = .text:0x813E06D8; // type:function size:0xAC
|
||||
getCenterChannelPane__Q33ipl5scene15SDChannelSelectCFi = .text:0x813E0784; // type:function size:0x30
|
||||
getChannelPane__Q33ipl5scene15SDChannelSelectCFi = .text:0x813E07B4; // type:function size:0x30
|
||||
getChannelPanePosition__Q33ipl5scene15SDChannelSelectFPQ33ipl5scene15SDChannelSelecti = .text:0x813E07E4; // type:function size:0x64
|
||||
iplSDChannelSelect_813E0848 = .text:0x813E0848; // type:function size:0x3A4
|
||||
iplSDChannelSelect_813E0BEC = .text:0x813E0BEC; // type:function size:0x294
|
||||
iplSDChannelSelect_813E0E80 = .text:0x813E0E80; // type:function size:0x60
|
||||
calcPageAnimations__Q33ipl5scene15SDChannelSelectFv = .text:0x813E0E80; // type:function size:0x60
|
||||
iplSDChannelSelect_813E0EE0 = .text:0x813E0EE0; // type:function size:0x26C
|
||||
iplSDChannelSelect_813E114C = .text:0x813E114C; // type:function size:0x78
|
||||
iplSDChannelSelect_813E11C4 = .text:0x813E11C4; // type:function size:0x3A4
|
||||
@@ -4678,10 +4678,10 @@ iplSDChannelSelect_813E2750 = .text:0x813E2750; // type:function size:0x164
|
||||
iplSDChannelSelect_813E28B4 = .text:0x813E28B4; // type:function size:0x2A0
|
||||
iplSDChannelSelect_813E2B54 = .text:0x813E2B54; // type:function size:0x240
|
||||
startResetting__Q33ipl5scene15SDChannelSelectFv = .text:0x813E2D94; // type:function size:0x44
|
||||
iplSDChannelSelect_813E2DD8 = .text:0x813E2DD8; // type:function size:0x4C
|
||||
iplSDChannelSelect_813E2E24 = .text:0x813E2E24; // type:function size:0x80
|
||||
iplSDChannelSelect_813E2EA4 = .text:0x813E2EA4; // type:function size:0x4C
|
||||
iplSDChannelSelect_813E2EF0 = .text:0x813E2EF0; // type:function size:0x34
|
||||
pop__Q33ipl5scene26SDChannelSelectNoticeQueueFv = .text:0x813E2DD8; // type:function size:0x4C
|
||||
push__Q33ipl5scene27SDChannelSelectCommandQueueFRCQ33ipl5scene22SDChannelSelectCommand = .text:0x813E2E24; // type:function size:0x80
|
||||
pop__Q33ipl5scene27SDChannelSelectCommandQueueFv = .text:0x813E2EA4; // type:function size:0x4C
|
||||
copyFrom__Q33ipl5scene22SDChannelSelectCommandFRCQ33ipl5scene22SDChannelSelectCommand = .text:0x813E2EF0; // type:function size:0x34
|
||||
@20@__dt__Q33ipl5scene15SDChannelSelectFv = .text:0x813E2F24; // type:function size:0x8
|
||||
__ct__Q33ipl5scene12SDChannelObjFPQ23EGG4Heapii = .text:0x813E2F2C; // type:function size:0x130
|
||||
__dt__Q33ipl5scene12SDChannelObjFv = .text:0x813E305C; // type:function size:0xA8
|
||||
@@ -4837,56 +4837,56 @@ onEvent__Q33ipl5scene22SDMenuEventHandlerBaseFUlUlPv = .text:0x813EB51C; // type
|
||||
onEventDerived__Q33ipl5scene22SDMenuEventHandlerBaseFUlUlPCQ33ipl10controller9Interface = .text:0x813EB5E8; // type:function size:0x4
|
||||
__ct__Q33ipl5scene8SDMemoryFv = .text:0x813EB5EC; // type:function size:0x48
|
||||
__dt__Q33ipl5scene8SDMemoryFv = .text:0x813EB634; // type:function size:0x5C
|
||||
iplSDMemory_813EB690 = .text:0x813EB690; // type:function size:0x10A0
|
||||
iplSDMemory_813EC730 = .text:0x813EC730; // type:function size:0xD4
|
||||
iplSDMemory_813EC804 = .text:0x813EC804; // type:function size:0x144
|
||||
iplSDMemory_813EC948 = .text:0x813EC948; // type:function size:0x20
|
||||
iplSDMemory_813EC968 = .text:0x813EC968; // type:function size:0x84
|
||||
iplSDMemory_813EC9EC = .text:0x813EC9EC; // type:function size:0x9C
|
||||
iplSDMemory_813ECA88 = .text:0x813ECA88; // type:function size:0x74
|
||||
iplSDMemory_813ECAFC = .text:0x813ECAFC; // type:function size:0x74
|
||||
iplSDMemory_813ECB70 = .text:0x813ECB70; // type:function size:0x78
|
||||
iplSDMemory_813ECBE8 = .text:0x813ECBE8; // type:function size:0x78
|
||||
iplSDMemory_813ECC60 = .text:0x813ECC60; // type:function size:0x160
|
||||
iplSDMemory_813ECDC0 = .text:0x813ECDC0; // type:function size:0x60
|
||||
iplSDMemory_813ECE20 = .text:0x813ECE20; // type:function size:0x60
|
||||
iplSDMemory_813ECE80 = .text:0x813ECE80; // type:function size:0x64
|
||||
iplSDMemory_813ECEE4 = .text:0x813ECEE4; // type:function size:0x64
|
||||
iplSDMemory_813ECF48 = .text:0x813ECF48; // type:function size:0x13C
|
||||
iplSDMemory_813ED084 = .text:0x813ED084; // type:function size:0x268
|
||||
iplSDMemory_813ED2EC = .text:0x813ED2EC; // type:function size:0x4CC
|
||||
iplSDMemory_813ED7B8 = .text:0x813ED7B8; // type:function size:0xA4
|
||||
iplSDMemory_813ED85C = .text:0x813ED85C; // type:function size:0xC4
|
||||
iplSDMemory_813ED920 = .text:0x813ED920; // type:function size:0x124
|
||||
iplSDMemory_813EDA44 = .text:0x813EDA44; // type:function size:0x110
|
||||
iplSDMemory_813EDB54 = .text:0x813EDB54; // type:function size:0x78
|
||||
iplSDMemory_813EDBCC = .text:0x813EDBCC; // type:function size:0xC0
|
||||
iplSDMemory_813EDC8C = .text:0x813EDC8C; // type:function size:0x278
|
||||
iplSDMemory_813EDF04 = .text:0x813EDF04; // type:function size:0xA4
|
||||
iplSDMemory_813EDFA8 = .text:0x813EDFA8; // type:function size:0x130
|
||||
iplSDMemory_813EE0D8 = .text:0x813EE0D8; // type:function size:0xE0
|
||||
iplSDMemory_813EE1B8 = .text:0x813EE1B8; // type:function size:0x1A0
|
||||
create__Q33ipl5scene8SDMemoryFPQ23EGG4HeapPQ33ipl4nand10LayoutFilePQ33ipl5scene17NandSDCardManager = .text:0x813EB690; // type:function size:0x10A0
|
||||
setTitleLists__Q33ipl5scene8SDMemoryFRCQ43ipl5scene8SDMemory10TitleRangeRCQ43ipl5scene8SDMemory10TitleRange = .text:0x813EC730; // type:function size:0xD4
|
||||
setScrollLimit__Q33ipl5scene8SDMemoryFv = .text:0x813EC804; // type:function size:0x144
|
||||
init__Q33ipl7utility8ScrollerFv = .text:0x813EC948; // type:function size:0x20
|
||||
resetScrollArrows__Q33ipl5scene8SDMemoryFv = .text:0x813EC968; // type:function size:0x84
|
||||
updateScrollArrows__Q33ipl5scene8SDMemoryFUlUlUlUl = .text:0x813EC9EC; // type:function size:0x9C
|
||||
showDownArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECA88; // type:function size:0x74
|
||||
showUpArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECAFC; // type:function size:0x74
|
||||
hideDownArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECB70; // type:function size:0x78
|
||||
hideUpArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECBE8; // type:function size:0x78
|
||||
updateSideArrows__Q33ipl5scene8SDMemoryFv = .text:0x813ECC60; // type:function size:0x160
|
||||
showLeftArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECDC0; // type:function size:0x60
|
||||
showRightArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECE20; // type:function size:0x60
|
||||
hideLeftArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECE80; // type:function size:0x64
|
||||
hideRightArrow__Q33ipl5scene8SDMemoryFv = .text:0x813ECEE4; // type:function size:0x64
|
||||
resetDialogPaneAnimations__Q33ipl5scene8SDMemoryFv = .text:0x813ECF48; // type:function size:0x13C
|
||||
calc__Q33ipl5scene8SDMemoryFv = .text:0x813ED084; // type:function size:0x268
|
||||
updateState__Q33ipl5scene8SDMemoryFv = .text:0x813ED2EC; // type:function size:0x4CC
|
||||
onDialogState0__Q33ipl5scene8SDMemoryFv = .text:0x813ED7B8; // type:function size:0xA4
|
||||
onDialogState2__Q33ipl5scene8SDMemoryFv = .text:0x813ED85C; // type:function size:0xC4
|
||||
onDialogState3__Q33ipl5scene8SDMemoryFv = .text:0x813ED920; // type:function size:0x124
|
||||
onDialogState4__Q33ipl5scene8SDMemoryFv = .text:0x813EDA44; // type:function size:0x110
|
||||
onDialogState6__Q33ipl5scene8SDMemoryFv = .text:0x813EDB54; // type:function size:0x78
|
||||
onDialogState7__Q33ipl5scene8SDMemoryFv = .text:0x813EDBCC; // type:function size:0xC0
|
||||
onDialogState8__Q33ipl5scene8SDMemoryFv = .text:0x813EDC8C; // type:function size:0x278
|
||||
onDialogState9__Q33ipl5scene8SDMemoryFv = .text:0x813EDF04; // type:function size:0xA4
|
||||
onDialogState10__Q33ipl5scene8SDMemoryFv = .text:0x813EDFA8; // type:function size:0x130
|
||||
onDialogState11__Q33ipl5scene8SDMemoryFv = .text:0x813EE0D8; // type:function size:0xE0
|
||||
onDialogState12__Q33ipl5scene8SDMemoryFv = .text:0x813EE1B8; // type:function size:0x1A0
|
||||
iplSDMemory_813EE358 = .text:0x813EE358; // type:function size:0x44
|
||||
iplSDMemory_813EE39C = .text:0x813EE39C; // type:function size:0xEC
|
||||
iplSDMemory_813EE488 = .text:0x813EE488; // type:function size:0x1C4
|
||||
iplSDMemory_813EE64C = .text:0x813EE64C; // type:function size:0x12C
|
||||
iplSDMemory_813EE778 = .text:0x813EE778; // type:function size:0xA0
|
||||
iplSDMemory_813EE818 = .text:0x813EE818; // type:function size:0x128
|
||||
iplSDMemory_813EE940 = .text:0x813EE940; // type:function size:0xE8
|
||||
iplSDMemory_813EEA28 = .text:0x813EEA28; // type:function size:0x84
|
||||
iplSDMemory_813EEAAC = .text:0x813EEAAC; // type:function size:0xE8
|
||||
iplSDMemory_813EEB94 = .text:0x813EEB94; // type:function size:0x148
|
||||
iplSDMemory_813EECDC = .text:0x813EECDC; // type:function size:0x11C
|
||||
iplSDMemory_813EEDF8 = .text:0x813EEDF8; // type:function size:0x78
|
||||
iplSDMemory_813EEE70 = .text:0x813EEE70; // type:function size:0xC0
|
||||
onDialogState13__Q33ipl5scene8SDMemoryFv = .text:0x813EE39C; // type:function size:0xEC
|
||||
onDialogState14__Q33ipl5scene8SDMemoryFv = .text:0x813EE488; // type:function size:0x1C4
|
||||
onDialogState15__Q33ipl5scene8SDMemoryFv = .text:0x813EE64C; // type:function size:0x12C
|
||||
onDialogState16__Q33ipl5scene8SDMemoryFv = .text:0x813EE778; // type:function size:0xA0
|
||||
onDialogState17__Q33ipl5scene8SDMemoryFv = .text:0x813EE818; // type:function size:0x128
|
||||
onDialogState18__Q33ipl5scene8SDMemoryFv = .text:0x813EE940; // type:function size:0xE8
|
||||
onDialogState19__Q33ipl5scene8SDMemoryFv = .text:0x813EEA28; // type:function size:0x84
|
||||
onDialogState20__Q33ipl5scene8SDMemoryFv = .text:0x813EEAAC; // type:function size:0xE8
|
||||
onDialogState21__Q33ipl5scene8SDMemoryFv = .text:0x813EEB94; // type:function size:0x148
|
||||
onDialogState22__Q33ipl5scene8SDMemoryFv = .text:0x813EECDC; // type:function size:0x11C
|
||||
onDialogState23__Q33ipl5scene8SDMemoryFv = .text:0x813EEDF8; // type:function size:0x78
|
||||
onDialogState24__Q33ipl5scene8SDMemoryFv = .text:0x813EEE70; // type:function size:0xC0
|
||||
iplSDMemory_813EEF30 = .text:0x813EEF30; // type:function size:0x88
|
||||
iplSDMemory_813EEFB8 = .text:0x813EEFB8; // type:function size:0x70C
|
||||
iplSDMemory_813EF6C4 = .text:0x813EF6C4; // type:function size:0x14
|
||||
writeFourFlagBytes__Q23ipl5sceneFPUcUcUcUcUc = .text:0x813EF6C4; // type:function size:0x14
|
||||
iplSDMemory_813EF6D8 = .text:0x813EF6D8; // type:function size:0x48
|
||||
GetBeginIter__Q34nw4r2ut28LinkList<Q34nw4r3lyt4Pane,4>Fv = .text:0x813EF720; // type:function size:0x8
|
||||
iplSDMemory_813EF728 = .text:0x813EF728; // type:function size:0x8
|
||||
__ne__Q24nw4r2utFQ44nw4r2ut28LinkList<Q34nw4r3lyt4Pane,4>8IteratorQ44nw4r2ut28LinkList<Q34nw4r3lyt4Pane,4>8Iterator = .text:0x813EF730; // type:function size:0x18
|
||||
iplSDMemory_813EF748 = .text:0x813EF748; // type:function size:0x74
|
||||
getControlPaneIndex__Q33ipl5scene8SDMemoryFPCc = .text:0x813EF748; // type:function size:0x74
|
||||
iplSDMemory_813EF7BC = .text:0x813EF7BC; // type:function size:0x128
|
||||
iplSDMemory_813EF8E4 = .text:0x813EF8E4; // type:function size:0xF0
|
||||
iplSDMemory_813EF9D4 = .text:0x813EF9D4; // type:function size:0x120
|
||||
|
||||
10
configure.py
10
configure.py
@@ -624,8 +624,8 @@ config.libs = [
|
||||
Object(Matching, "system/rvl_dec.c"),
|
||||
Object(Matching, "system/RIPL_BoardRecord.c"),
|
||||
Object(Matching, "system/iplSystem.cpp"),
|
||||
Object(NonMatching, "system/iplController.cpp"),
|
||||
Object(NonMatching, "system/iplControllerManager.cpp"),
|
||||
Object(Matching, "system/iplController.cpp"),
|
||||
Object(Matching, "system/iplControllerManager.cpp"),
|
||||
Object(Matching, "system/iplChannelManager.cpp"),
|
||||
Object(Matching, "system/iplChannelScriptManager.cpp"),
|
||||
Object(Matching, "system/iplNand.cpp"),
|
||||
@@ -1041,7 +1041,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
RevoEXLib("net", [
|
||||
Object(NonMatching, "net/nettime.c"),
|
||||
Object(Matching, "net/nettime.c"),
|
||||
Object(Matching, "net/crc.c"),
|
||||
Object(NonMatching, "net/md5.c"),
|
||||
Object(NonMatching, "net/sha1.c"),
|
||||
@@ -1707,7 +1707,7 @@ config.libs = [
|
||||
Object(NonMatching, "fa/pf_volume.c"),
|
||||
Object(NonMatching, "fa/pf_volume_apiadd.c"),
|
||||
Object(NonMatching, "fa/pf_cp932.c"),
|
||||
Object(NonMatching, "fa/pf_api_util.c"),
|
||||
Object(Matching, "fa/pf_api_util.c"),
|
||||
Object(NonMatching, "fa/pf_attach.c"),
|
||||
Object(NonMatching, "fa/pf_buffering.c"),
|
||||
Object(NonMatching, "fa/pf_cdelete.c"),
|
||||
@@ -1774,7 +1774,7 @@ config.libs = [
|
||||
Object(NonMatching, "fa/pf_unmount.c"),
|
||||
Object(NonMatching, "fa/pf_unregctx.c"),
|
||||
Object(NonMatching, "fa/pf_xdivide.c"),
|
||||
Object(NonMatching, "fa/pf_w_api_util.c"),
|
||||
Object(Matching, "fa/pf_w_api_util.c"),
|
||||
Object(NonMatching, "fa/pf_w_cdelete.c"),
|
||||
Object(NonMatching, "fa/pf_w_chdir.c"),
|
||||
Object(NonMatching, "fa/pf_w_chdmod.c"),
|
||||
|
||||
@@ -180,7 +180,11 @@ namespace ipl {
|
||||
|
||||
/*** TODO: These always generate a weak. Try and make them not do that. ***/
|
||||
const nw4r::ut::Rect getTextDrawRect(const nw4r::lyt::TextBox* textBox) const { return textBox->GetTextDrawRect(mDrawInfo); }
|
||||
#ifdef IPL_SDMEMORY_GET_TEXT_DRAW_RECT_OUT_OF_LINE
|
||||
const nw4r::ut::Rect getTextDrawRect(const char* paneName) const;
|
||||
#else
|
||||
const nw4r::ut::Rect getTextDrawRect(const char* paneName) const { return getTextDrawRect(nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mLayout.GetRootPane()->FindPaneByName(paneName))); }
|
||||
#endif
|
||||
|
||||
const nw4r::ut::Rect getPaneRect(nw4r::lyt::Pane* pane) const { return pane->GetPaneRect(mDrawInfo); }
|
||||
const nw4r::ut::Rect getPaneRect(const char* paneName) const { return getPaneRect(mLayout.GetRootPane()->FindPaneByName(paneName)); }
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace ipl {
|
||||
y = r.y;
|
||||
z = 0.0f;
|
||||
}
|
||||
#ifdef IPL_ADDRESS_EDIT_CPP
|
||||
#if defined(IPL_ADDRESS_EDIT_CPP) || defined(IPL_SD_CHANNEL_SELECT_CPP)
|
||||
VEC3(f32 fx, f32 fy, f32 fz);
|
||||
#else
|
||||
VEC3(f32 fx, f32 fy, f32 fz) {
|
||||
|
||||
@@ -114,6 +114,8 @@ namespace ipl {
|
||||
void setName(const wchar_t* value);
|
||||
void setEMail(const wchar_t* value);
|
||||
void setWiiNo(const wchar_t* value);
|
||||
BOOL isDupCode() const;
|
||||
BOOL isMyCode() const;
|
||||
|
||||
wchar_t mValue[0x102];
|
||||
wchar_t mName[0x0c];
|
||||
@@ -121,6 +123,7 @@ namespace ipl {
|
||||
bool mbValidMail;
|
||||
bool mbNameNotEmpty;
|
||||
bool mbHasWiiNo;
|
||||
AddressEdit* mpCallbackOwner;
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -144,7 +147,6 @@ namespace ipl {
|
||||
TextBalloon* mpBalloon;
|
||||
nand::LayoutFile* mpBalloonFile;
|
||||
String mString;
|
||||
AddressEdit* mpCallbackOwner;
|
||||
bool mbParentalOK;
|
||||
nigaoe::Object* mpNigaoe;
|
||||
RFLCreateID mCreateID;
|
||||
|
||||
116
include/scene/sdChannelMemory/iplSDMemory.h
Normal file
116
include/scene/sdChannelMemory/iplSDMemory.h
Normal file
@@ -0,0 +1,116 @@
|
||||
#ifndef IPL_SCENE_SD_MEMORY_H
|
||||
#define IPL_SCENE_SD_MEMORY_H
|
||||
|
||||
#include <revolution.h>
|
||||
|
||||
#include "layout/iplLayout.h"
|
||||
#include "layout/iplGuiManager.h"
|
||||
#include "scene/board/iplFocusObject.h"
|
||||
#include "scene/channelEdit/iplNandSDCardManager.h"
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
class SDMemory {
|
||||
public:
|
||||
struct TitleRange {
|
||||
s32 mByteSize;
|
||||
u32 mCount;
|
||||
};
|
||||
|
||||
SDMemory();
|
||||
~SDMemory();
|
||||
|
||||
void create(EGG::Heap* heap, nand::LayoutFile* layoutFile, NandSDCardManager* manager);
|
||||
void setTitleLists(const TitleRange& nandTitles, const TitleRange& sdTitles);
|
||||
bool calc();
|
||||
void setScrollLimit();
|
||||
void updateSideArrows();
|
||||
void resetScrollArrows();
|
||||
void updateScrollArrows(u32 previousDownEnd, u32 previousUpEnd, u32 downEnd, u32 upEnd);
|
||||
void showDownArrow();
|
||||
void showUpArrow();
|
||||
void hideDownArrow();
|
||||
void hideUpArrow();
|
||||
void showLeftArrow();
|
||||
void showRightArrow();
|
||||
void hideLeftArrow();
|
||||
void hideRightArrow();
|
||||
|
||||
private:
|
||||
s32 updateState();
|
||||
void onDialogState0();
|
||||
void onDialogState2();
|
||||
bool onDialogState3();
|
||||
void onDialogState4();
|
||||
void onDialogState6();
|
||||
void onDialogState7();
|
||||
void onDialogState8();
|
||||
void onDialogState9();
|
||||
void onDialogState10();
|
||||
void onDialogState11();
|
||||
void onDialogState12();
|
||||
void onDialogState13();
|
||||
void onDialogState14();
|
||||
void onDialogState15();
|
||||
void onDialogState16();
|
||||
void onDialogState17();
|
||||
void onDialogState18();
|
||||
void onDialogState19();
|
||||
bool onDialogState20();
|
||||
void onDialogState21();
|
||||
bool onDialogState22();
|
||||
void onDialogState23();
|
||||
bool onDialogState24();
|
||||
void resetDialogPaneAnimations();
|
||||
s32 getControlPaneIndex(const char* paneName);
|
||||
|
||||
layout::Object* mpMainLayout;
|
||||
layout::Object* mpTitleLayout;
|
||||
layout::Object* mpDialogLayout;
|
||||
layout::Object* mpProgressLayout;
|
||||
gui::PaneManager* mpPaneManagers[3];
|
||||
s32 mDialogState;
|
||||
s32 mProcessState;
|
||||
s32 mDisplayMode;
|
||||
s32 mMessageId;
|
||||
u32 mErrorCode;
|
||||
u32 mPanelStates[3];
|
||||
u32 mTitlePanelStates[5];
|
||||
u32 mPanelAnimationStates[4];
|
||||
NandSDCardManager* mpNandSDCardManager;
|
||||
TitleRange mNandTitleRange;
|
||||
TitleRange mSDTitleRange;
|
||||
u32 mTitleCount;
|
||||
u32 mCurrentTitle;
|
||||
u32 mTitleFlags;
|
||||
ESTitleId mTitleIds[96];
|
||||
wchar_t mTitleNames[96][21];
|
||||
u32 mTitleNameCount;
|
||||
u32 mNandTitleNameCount;
|
||||
ESTitleId mNandTitleIds[96];
|
||||
u32 mNandTitleCount;
|
||||
u32 mSDTitleCount;
|
||||
ESTitleId mSDTitleIds[96];
|
||||
wchar_t mCurrentTitleName[0x840];
|
||||
u8 mTransferFlags[4];
|
||||
u32 mTransferStatus;
|
||||
u64 mTransferStartTime;
|
||||
s32 mTransferFrame;
|
||||
struct TitleListState {
|
||||
ESTitleId* mpTitles;
|
||||
u32 mCount;
|
||||
ESTitleId* mpSecondaryTitles;
|
||||
u32 mSecondaryCount;
|
||||
ESTitleId* mpNames;
|
||||
u32 mNameCount;
|
||||
} mTitleListState;
|
||||
scroller mScroller;
|
||||
s32 mButtonState;
|
||||
u8 mControllerFlags[4];
|
||||
u32 mFinalState[3];
|
||||
u8 mFinalFlags[4];
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
#endif
|
||||
@@ -1,18 +1,297 @@
|
||||
#ifndef IPL_SCENE_SD_CHANNEL_SELECT_H
|
||||
#define IPL_SCENE_SD_CHANNEL_SELECT_H
|
||||
|
||||
#include "iplSceneHeader.h"
|
||||
#include "iplSceneUIHeader.h"
|
||||
|
||||
#include "math/iplInterporation.h"
|
||||
#include "scene/sdButton/iplSDButton.h"
|
||||
#include "system/iplChannelRsoThread.h"
|
||||
#include "system/iplNandSDWorker.h"
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
FADER_SCENE_CLASS(SDChannelSelect) {
|
||||
class SDChannelObj {
|
||||
public:
|
||||
SDChannelSelect(EGG::Heap * heap);
|
||||
SDChannelObj(EGG::Heap* heap, int page, int index);
|
||||
~SDChannelObj();
|
||||
|
||||
EGG::Heap* getHeap() const { return mpHeap; }
|
||||
int getPage() const { return mPage; }
|
||||
int getIndex() const { return mIndex; }
|
||||
|
||||
private:
|
||||
u8 unk_0x58[0x728];
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
friend class SDChannelSelect;
|
||||
|
||||
#endif // IPL_SCENE_SD_CHANNEL_SELECT_H
|
||||
nw4r::ut::Link mListLink;
|
||||
EGG::ExpHeap* mpDialogHeap;
|
||||
EGG::ExpHeap* mpChannelHeap;
|
||||
EGG::Heap* mpHeap;
|
||||
u32 mState;
|
||||
int mPage;
|
||||
int mIndex;
|
||||
nand::LayoutFile* mpLayoutFile;
|
||||
nw4r::lyt::Pane* mpPane;
|
||||
layout::Animator* mpPaneAnimator;
|
||||
layout::Object* mpBaseLayout;
|
||||
layout::Animator* mpBaseAnimator;
|
||||
layout::Object* mpPageLayout;
|
||||
layout::Animator* mpPageAnimators[3];
|
||||
int mPageAnimation;
|
||||
int mPageAnimationFrame;
|
||||
layout::Object* mpDialogLayout;
|
||||
layout::Animator* mpDialogAnimator;
|
||||
int mDialogState;
|
||||
int mDialogFrame;
|
||||
int mDialogTimer;
|
||||
int mAnimationState;
|
||||
nw4r::lyt::Group* mpNewMessageGroup;
|
||||
int mNewMessageCount;
|
||||
u8 mbNewMessageGroupActive;
|
||||
int mNewMessageState;
|
||||
int mNewMessageFrame;
|
||||
f32 mOffsetX;
|
||||
f32 mOffsetY;
|
||||
f32 mAspectRatioScale;
|
||||
int mStateFlags;
|
||||
void* mpThumbnailData;
|
||||
NandSDWorker::SDAppMetaEntry mAppMeta;
|
||||
};
|
||||
extern "C" void iplSDChannelObj_813E3104(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E311C(SDChannelObj* channel, EGG::ExpHeap* firstHeap,
|
||||
EGG::ExpHeap* secondHeap);
|
||||
extern "C" void iplSDChannelObj_813E322C(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E3178(SDChannelObj* channel, nw4r::lyt::Pane* pane);
|
||||
extern "C" void iplSDChannelObj_813E3180(SDChannelObj* channel, nand::LayoutFile* layoutFile);
|
||||
extern "C" void iplSDChannelObj_813E3304(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E330C(SDChannelObj* channel);
|
||||
extern "C" void* iplSDChannelObj_813E3128(SDChannelObj* channel);
|
||||
extern "C" bool iplSDChannelObj_813E3330(SDChannelObj* channel);
|
||||
|
||||
union SDChannelSelectCommandArguments {
|
||||
u32 values[3];
|
||||
NandSDWorker::AppBlocksInfo* appBlocks[3];
|
||||
NandSDWorker::TitleIdList* titleLists[3];
|
||||
void* pointers[3];
|
||||
};
|
||||
|
||||
struct SDChannelSelectCommand {
|
||||
u32 type;
|
||||
u64 titleId;
|
||||
SDChannelSelectCommandArguments arguments;
|
||||
|
||||
void copyFrom(const SDChannelSelectCommand& other);
|
||||
};
|
||||
|
||||
struct SDChannelSelectCommandQueue {
|
||||
SDChannelSelectCommand commands[4];
|
||||
int capacity;
|
||||
int count;
|
||||
int readIndex;
|
||||
int writeIndex;
|
||||
|
||||
SDChannelSelectCommandQueue(u32 capacity, u32 count, u32 readIndex, u32 writeIndex)
|
||||
: capacity(capacity), count(count), readIndex(readIndex), writeIndex(writeIndex) {
|
||||
}
|
||||
|
||||
bool push(const SDChannelSelectCommand& command);
|
||||
bool pop();
|
||||
};
|
||||
|
||||
struct SDChannelSelectTitleInfo {
|
||||
ESTitleId32 titleId;
|
||||
bool used;
|
||||
};
|
||||
|
||||
struct SDChannelSelectNoticeQueue {
|
||||
SDChannelSelectCommand notices[42];
|
||||
int capacity;
|
||||
int count;
|
||||
int readIndex;
|
||||
int writeIndex;
|
||||
|
||||
SDChannelSelectNoticeQueue(u32 capacity, u32 count, u32 readIndex, u32 writeIndex)
|
||||
: capacity(capacity), count(count), readIndex(readIndex), writeIndex(writeIndex) {
|
||||
}
|
||||
|
||||
bool pop();
|
||||
};
|
||||
|
||||
FADER_SCENE_CLASS(SDChannelSelect) {
|
||||
public:
|
||||
enum {
|
||||
PAGE_COUNT = 5,
|
||||
};
|
||||
|
||||
SDChannelSelect(EGG::Heap* heap);
|
||||
virtual ~SDChannelSelect();
|
||||
|
||||
virtual BOOL isResetProcessDone();
|
||||
virtual void startResetting();
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void draw();
|
||||
virtual void destroy();
|
||||
virtual void initCalcFadeout();
|
||||
virtual void calcCommon();
|
||||
virtual FaderSceneCommand calcFadein();
|
||||
virtual FaderSceneCommand calcNormal();
|
||||
virtual FaderSceneCommand calcFadeout();
|
||||
|
||||
static const char* mscChannelPaneNames[PAGE_COUNT][MAX_CHANNEL_INDEX];
|
||||
static const char* mscBasePaneNames[PAGE_COUNT];
|
||||
static const char* mscPicturePaneNames[PAGE_COUNT];
|
||||
static const char* mscEdgePaneNames[PAGE_COUNT];
|
||||
static const char* mscClockPaneNames[3];
|
||||
static const char* mscMaskPaneName;
|
||||
|
||||
private:
|
||||
void enqueueStartNotice();
|
||||
bool enqueueFinishNotice();
|
||||
bool enqueueNotice(u32 highTitleId, u32 lowTitleId, u32 result);
|
||||
bool enqueueLoadNotice();
|
||||
bool enqueuePageNotice();
|
||||
bool enqueueResultNotice(u32 result);
|
||||
bool enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value);
|
||||
bool enqueueMoveNotice(u32 controller, u32 page, u32 index);
|
||||
bool enqueueStateNotice(u32 controller, u32 page, u32 index, u32 state);
|
||||
bool enqueueErrorNotice(u32 page, u32 index);
|
||||
bool enqueueCommandNotice(u32 page, u32 index, u32 command);
|
||||
bool enqueueDeleteNotice(u32 controller, u32 page, u32 index);
|
||||
void clearCommandQueue();
|
||||
void clearNoticeQueue();
|
||||
void calcChannelObjects();
|
||||
void updateChannelObjects();
|
||||
void updateChannelObject(SDChannelObj* channel);
|
||||
void drawChannelObjects();
|
||||
bool isChannelInCalc(int page, int index, int currentPage) const;
|
||||
nw4r::lyt::Pane* getChannelBasePane(int page, int index, int currentPage) const;
|
||||
nw4r::lyt::Pane* getCenterChannelPane(int index) const;
|
||||
nw4r::lyt::Pane* getChannelPane(int index) const;
|
||||
static math::VEC3 getChannelPanePosition(SDChannelSelect* scene, int index);
|
||||
void calcPageAnimations();
|
||||
void updateArrowVisibility();
|
||||
void processWorkerState();
|
||||
void updateDialogAnimation();
|
||||
void processWorkerCommands();
|
||||
void handleWorkerStartup();
|
||||
void handleNandTitleCount();
|
||||
void handleNandTitleUsage();
|
||||
void handleNandTitleUsageComplete();
|
||||
void handleSDTitleList();
|
||||
void handleSDTitleListResult();
|
||||
void refreshAfterSDTitleList();
|
||||
void handleSDChannelUpdateComplete();
|
||||
void updateChannelNotices(int pageOffset, int index);
|
||||
void handleSDMountComplete();
|
||||
void handleCopyComplete();
|
||||
void handleDeleteComplete();
|
||||
void handleMoveComplete();
|
||||
void handleStorageCheckComplete();
|
||||
void handleCardCommand();
|
||||
void handleSDCardReady();
|
||||
void handleSDLocationUpdateComplete();
|
||||
void handleSDLocationReadComplete();
|
||||
void handleBackupFitComplete();
|
||||
void handleNandSDCleanupComplete();
|
||||
void handleSDDeleteComplete();
|
||||
bool setDialogMessage(u32 state, u32 message);
|
||||
static int compareTitleUsage(const void* lhs, const void* rhs);
|
||||
static int compareTitleInfo(const void* lhs, const void* rhs);
|
||||
void createChannelList(int page, bool force);
|
||||
void destroyChannelObject(SDChannelObj* channel);
|
||||
void destroyUnusedChannelObjects(int currentPage, SDChannelObj* keepChannel);
|
||||
void refreshChannelList();
|
||||
bool hasChannelObject(int page, int index) const;
|
||||
SDChannelObj* findChannelObject(int page, int index) const;
|
||||
void createChannelObject(int page, int index);
|
||||
void createBaseLayout();
|
||||
void updateNoCardLayouts();
|
||||
void createChannelThumbnails();
|
||||
|
||||
nw4r::ut::List mChannelObjects;
|
||||
nand::LayoutFile* mpLayoutFile;
|
||||
layout::Object* mpLayout;
|
||||
math::HermiteIntp<math::VEC3>* mpPageAnimations[4];
|
||||
gui::PaneManager* mpPaneManager;
|
||||
layout::Object* mpNoCardLayout;
|
||||
layout::Object* mpPageLayouts[3];
|
||||
layout::Object* mpDialogLayout;
|
||||
SDButtonEventHandlerBase* mpButtonEventHandler;
|
||||
int mState;
|
||||
int mCurrentPage;
|
||||
int mPageCount;
|
||||
int mCurrentChannelIndex;
|
||||
f32 mThumbOffsetX;
|
||||
f32 mThumbOffsetY;
|
||||
nw4r::math::VEC3 mPosition;
|
||||
math::VEC2 mScale;
|
||||
f32 mAspectRatioScale;
|
||||
bool mbLeftArrowVisible;
|
||||
bool mbRightArrowVisible;
|
||||
u8 mArrowState;
|
||||
u8 mNoCardState;
|
||||
EGG::UnitHeap* mpLayoutHeap;
|
||||
EGG::ExpHeap* mpDialogHeap;
|
||||
EGG::ExpHeap* mpChannelHeap;
|
||||
EGG::ExpHeap* mpThumbnailHeap;
|
||||
nw4r::math::VEC2 mPointerPosition;
|
||||
int mControllerChannel;
|
||||
int mSourcePage;
|
||||
int mSourceIndex;
|
||||
int mDestinationPage;
|
||||
int mDestinationIndex;
|
||||
int mPendingPage;
|
||||
int mPendingIndex;
|
||||
int mMoveState;
|
||||
bool mbButtonEnabled;
|
||||
bool mbDialogActive;
|
||||
u16 mInputFlags;
|
||||
SDChannelObj* mpCurrentChannel;
|
||||
layout::Object* mpStateLayout;
|
||||
layout::Object* mpHelpLayout;
|
||||
EGG::ExpHeap* mpRsoHeap;
|
||||
channel::RsoThread* mpRsoThread;
|
||||
u32 mCommandQueueState;
|
||||
SDChannelSelectCommandQueue mCommandQueue;
|
||||
SDChannelSelectNoticeQueue mNoticeQueue;
|
||||
int mCurrentSDState;
|
||||
int mPreviousSDState;
|
||||
int mWorkerState;
|
||||
int mWorkerCommand;
|
||||
EGG::Heap* mpWorkerHeap;
|
||||
EGG::Heap* mpThumbnailWorkHeap;
|
||||
NandSDWorker* mpSDWorker;
|
||||
ESTitleId32* mpSDTitleIds;
|
||||
SDChannelSelectTitleInfo* mpSDTitleInfo;
|
||||
NandSDWorker::TitleUsage* mpNandTitleInfo;
|
||||
u32 mFirstTitleCount;
|
||||
u32 mSecondTitleCount;
|
||||
SDChannelObj* mpCurrentLoadedChannel;
|
||||
u32 mSDTitleCount;
|
||||
u32 mNandTitleCount;
|
||||
u32* mpChannelTitleIds;
|
||||
u32 mPendingOperation;
|
||||
int mLastOperation;
|
||||
layout::Object* mpErrorLayout;
|
||||
layout::Object* mpPointerLayout;
|
||||
layout::Object* mpHelpButtonLayout;
|
||||
int mOperationResult;
|
||||
u8 mbShowNoCardMessage;
|
||||
u8 mbOperationActive;
|
||||
u8 mbSDCardBroken;
|
||||
u32 mOperationState;
|
||||
u32 mDialogState;
|
||||
nand::File* mpSaveDataFile;
|
||||
u32 mAnimationState;
|
||||
u32 mAnimationTarget;
|
||||
OSTime mOperationStartTime;
|
||||
nand::File* mpCorruptIconFile;
|
||||
u8 mbHazardTitleFound;
|
||||
u8 mbChannelLimitReached;
|
||||
u8 mbInitialLoadComplete;
|
||||
u8 mbNeedsRefresh;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -63,10 +63,14 @@ namespace ipl {
|
||||
// clang-format on
|
||||
|
||||
#ifdef IPL_CONTROLLER_NATIVE_HIERARCHY
|
||||
#ifdef IPL_CONTROLLER_OUT_OF_LINE_INTERFACE
|
||||
#define IPL_CONTROLLER_DEFAULT_VIRTUAL(signature, implementation) virtual signature;
|
||||
#else
|
||||
#ifdef IPL_CONTROLLER_INLINE_INTERFACE
|
||||
#define IPL_CONTROLLER_DEFAULT_VIRTUAL(signature, implementation) virtual signature implementation
|
||||
#else
|
||||
#define IPL_CONTROLLER_DEFAULT_VIRTUAL(signature, implementation) virtual signature;
|
||||
#endif
|
||||
#endif
|
||||
class Interface {
|
||||
public:
|
||||
@@ -79,7 +83,7 @@ namespace ipl {
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int pinch() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int pinchTrg() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int pinchOffTrg() const, { return 0; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(int decide() const, { return 0; })
|
||||
virtual int decide() const = 0;
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(bool repeat(u32 button) const, { return false; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(BOOL rumble(int type = 0), { return FALSE; })
|
||||
IPL_CONTROLLER_DEFAULT_VIRTUAL(void cancelRumbling(), { })
|
||||
|
||||
@@ -118,6 +118,11 @@ namespace ipl {
|
||||
int getLastResult() { return mLastResult; }
|
||||
/** @return If the dialog is moving onto the next state. */
|
||||
bool doingNextState() { return mbNextState; }
|
||||
#ifdef IPL_SDMEMORY_DIALOG_STATE_ACCESSOR
|
||||
int getStateForSDMemory() const { return mState; }
|
||||
int getResultForSDMemory() const { return mResult; }
|
||||
void setTitleForSDMemory(const wchar_t* text) { set_title(text); }
|
||||
#endif
|
||||
|
||||
/*=================*/
|
||||
/* DIALOG BUTTON 0 */
|
||||
|
||||
@@ -50,6 +50,12 @@ namespace ipl {
|
||||
|
||||
int getPrevPage() { return mLastPrevPage; }
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_ACCESS
|
||||
int getLastSDPrevPage() { return mLastSDPrevPage; }
|
||||
void setLastSDPrevPage(int page) { mLastSDPrevPage = page; }
|
||||
BOOL didntGotoSDMenu() const { return mData.didntGotoSDMenu; }
|
||||
#endif
|
||||
|
||||
bool hasPhotoMP3Dummy() { return mbPhotoMP3; }
|
||||
bool hasPhoto2Title() { return mbPhoto2; }
|
||||
bool hasPhoto2DummyCheck() { return mbPhoto2Check; }
|
||||
|
||||
@@ -49,6 +49,9 @@ namespace ipl {
|
||||
public:
|
||||
Scroller();
|
||||
|
||||
#ifdef IPL_SDMEMORY_SCROLLER_INIT_OUT_OF_LINE
|
||||
void init();
|
||||
#else
|
||||
void init() {
|
||||
mState = 0;
|
||||
mScroll = 0.0f;
|
||||
@@ -56,6 +59,7 @@ namespace ipl {
|
||||
mUpLimit = 0.0f;
|
||||
mDownLimit = 0.0f;
|
||||
}
|
||||
#endif
|
||||
|
||||
void calc();
|
||||
f32 get() const;
|
||||
|
||||
@@ -88,7 +88,11 @@ namespace nw4r {
|
||||
PaneList& GetChildList() { return mChildList; }
|
||||
|
||||
const math::VEC3& GetTranslate() { return mTranslate; }
|
||||
#ifdef IPL_SDMEMORY_SET_TRANSLATE_OUT_OF_LINE
|
||||
void SetTranslate(const math::VEC3& translate);
|
||||
#else
|
||||
void SetTranslate(const math::VEC3& translate) { mTranslate = translate; }
|
||||
#endif
|
||||
void SetTranslate(const math::VEC2& translate) { SetTranslate(math::VEC3(translate.x, translate.y, 0.0f)); }
|
||||
|
||||
const math::VEC3& GetRotate() const { return mRotate; }
|
||||
|
||||
430
libs/RVL_SDK/include/private/fa/fa_local.h
Normal file
430
libs/RVL_SDK/include/private/fa/fa_local.h
Normal file
@@ -0,0 +1,430 @@
|
||||
#ifndef FA_LOCAL_H
|
||||
#define FA_LOCAL_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct PF_STR {
|
||||
const s8* p_head; // 0x00
|
||||
const s8* p_tail; // 0x04
|
||||
s8* p_local; // 0x08
|
||||
u32 code_mode; // 0x0C
|
||||
} PF_STR;
|
||||
|
||||
typedef struct PF_FILE_NAME_ITER {
|
||||
const s8* buf; // 0x00
|
||||
u32 field_04; // 0x04
|
||||
u32 kind; // 0x08
|
||||
u16 index; // 0x0C
|
||||
u16 pad_0E; // 0x0E
|
||||
} PF_FILE_NAME_ITER;
|
||||
|
||||
typedef struct PF_CHARCODE {
|
||||
s32 (*oem2unicode)(const s8*, u16*); // 0x00
|
||||
s32 (*unicode2oem)(const u16*, s8*); // 0x04
|
||||
s32 (*oem_char_width)(const s8*); // 0x08
|
||||
u32 (*is_oem_mb_char)(s8, u32); // 0x0C
|
||||
s32 (*unicode_char_width)(const u16*); // 0x10
|
||||
u32 (*is_unicode_mb_char)(u16, u32); // 0x14
|
||||
} PF_CHARCODE;
|
||||
|
||||
typedef enum {
|
||||
FAT_12 = 0,
|
||||
FAT_16 = 1,
|
||||
FAT_32 = 2,
|
||||
FAT_ERR = -1,
|
||||
} PF_FAT_TYPE;
|
||||
|
||||
typedef struct PF_BPB {
|
||||
u16 bytes_per_sector; // 0x00
|
||||
u16 num_reserved_sectors; // 0x02
|
||||
u16 num_root_dir_entries; // 0x04
|
||||
u8 sectors_per_cluster; // 0x06
|
||||
u8 num_FATs; // 0x07
|
||||
u32 total_sectors; // 0x08
|
||||
u32 sectors_per_FAT; // 0x0C
|
||||
u32 root_dir_cluster; // 0x10
|
||||
u16 fs_info_sector; // 0x14
|
||||
u16 backup_boot_sector; // 0x16
|
||||
u16 ext_flags; // 0x18
|
||||
u8 media; // 0x1A
|
||||
u8 pad_1B;
|
||||
PF_FAT_TYPE fat_type; // 0x1C
|
||||
u8 log2_bytes_per_sector; // 0x20
|
||||
u8 log2_sectors_per_cluster; // 0x21
|
||||
u8 num_active_FATs; // 0x22
|
||||
u8 pad_23;
|
||||
u16 num_root_dir_sectors; // 0x24
|
||||
u8 pad_26[2];
|
||||
u32 active_FAT_sector; // 0x28
|
||||
u32 first_root_dir_sector; // 0x2C
|
||||
u32 first_data_sector; // 0x30
|
||||
u32 num_clusters; // 0x34
|
||||
} PF_BPB;
|
||||
|
||||
typedef struct PF_DIR_ENT {
|
||||
u16 long_name[261]; // 0x00
|
||||
u8 num_entry_LFNs; // 0x20A
|
||||
u8 ordinal; // 0x20B
|
||||
u8 check_sum; // 0x20C
|
||||
u8 align_pad[1]; // 0x20D
|
||||
s8 short_name[13]; // 0x20E
|
||||
u8 small_letter_flag; // 0x21B
|
||||
u8 attr; // 0x21C
|
||||
u8 create_time_ms; // 0x21D
|
||||
u16 create_time; // 0x21E
|
||||
u16 create_date; // 0x220
|
||||
u16 access_date; // 0x222
|
||||
u16 modify_time; // 0x224
|
||||
u16 modify_date; // 0x226
|
||||
u32 file_size; // 0x228
|
||||
struct PF_VOLUME* p_vol; // 0x22C
|
||||
u32 path_len; // 0x230
|
||||
u32 start_cluster; // 0x234
|
||||
u32 entry_sector; // 0x238
|
||||
u16 entry_offset; // 0x23C
|
||||
u16 pad_23E;
|
||||
} PF_DIR_ENT;
|
||||
|
||||
typedef struct PF_CUR_DIR {
|
||||
u32 stat; // 0x00
|
||||
s32 context_id; // 0x04
|
||||
PF_DIR_ENT directory; // 0x08
|
||||
} PF_CUR_DIR;
|
||||
|
||||
typedef struct PF_LAST_CLUSTER {
|
||||
u32 num_last_cluster;
|
||||
u32 max_chain_index;
|
||||
} PF_LAST_CLUSTER;
|
||||
|
||||
typedef struct PF_FAT_LAST_ACCESS {
|
||||
u32 chain_index;
|
||||
u32 cluster;
|
||||
} PF_FAT_LAST_ACCESS;
|
||||
|
||||
typedef struct PF_CLUSTER_LINK {
|
||||
u32* buffer;
|
||||
u16 interval;
|
||||
u16 interval_offset;
|
||||
u32 position;
|
||||
u32 max_count;
|
||||
u32 save_index;
|
||||
} PF_CLUSTER_LINK;
|
||||
|
||||
typedef struct PF_FAT_HINT {
|
||||
u32 chain_index; // 0x00
|
||||
u32 cluster; // 0x04
|
||||
u32 start_cluster; // 0x08
|
||||
} PF_FAT_HINT;
|
||||
|
||||
typedef struct PF_FILE_HINT {
|
||||
u32 chain_index; // 0x00
|
||||
u32 cluster; // 0x04
|
||||
u32 start_cluster; // 0x08
|
||||
} PF_FILE_HINT;
|
||||
|
||||
typedef struct PF_FFD {
|
||||
u32 start_cluster;
|
||||
u32 field_04;
|
||||
u32* p_start_cluster;
|
||||
PF_LAST_CLUSTER last_cluster;
|
||||
PF_FAT_LAST_ACCESS last_access_cluster;
|
||||
PF_CLUSTER_LINK cluster_link;
|
||||
PF_FAT_HINT* p_hint;
|
||||
struct PF_VOLUME* p_vol;
|
||||
} PF_FFD;
|
||||
|
||||
typedef struct PF_CACHE_PAGE {
|
||||
u16 stat; // 0x00
|
||||
u16 option; // 0x02
|
||||
u8* buffer; // 0x04
|
||||
u8* p_buf; // 0x08
|
||||
u8* p_mod_sbuf; // 0x0C
|
||||
u8* p_mod_ebuf; // 0x10
|
||||
u32 size; // 0x14
|
||||
u32 sector; // 0x18
|
||||
void* signature; // 0x1C
|
||||
struct PF_CACHE_PAGE* p_next; // 0x20
|
||||
struct PF_CACHE_PAGE* p_prev; // 0x24
|
||||
} PF_CACHE_PAGE;
|
||||
|
||||
|
||||
typedef struct PF_ENT_ITER PF_ENT_ITER;
|
||||
|
||||
typedef struct PF_DIRENT {
|
||||
s8 lname[512]; // 0x00
|
||||
s8 name[13]; // 0x200
|
||||
} PF_DIRENT;
|
||||
|
||||
typedef struct PF_ENT_ITER {
|
||||
u8 pad_00[0x8];
|
||||
PF_FFD ffd; // 0x08
|
||||
u32 field_40; // 0x40
|
||||
u32 field_44; // 0x44
|
||||
u32 field_48; // 0x48
|
||||
u8 buf[0x24]; // 0x4C
|
||||
} PF_ENT_ITER;
|
||||
|
||||
|
||||
typedef struct PF_SDD {
|
||||
u32 stat; // 0x00
|
||||
u16 num_handlers; // 0x04
|
||||
u16 pad_06;
|
||||
PF_FFD ffd; // 0x08
|
||||
PF_DIR_ENT dir_entry; // 0x40
|
||||
} PF_SDD;
|
||||
|
||||
typedef struct PF_SDD_HANDLE {
|
||||
u32 stat; // 0x00
|
||||
u32 pad_4;
|
||||
PF_SDD* p_sdd; // 0x08
|
||||
u8 pad_C[0x24];
|
||||
} PF_SDD_HANDLE;
|
||||
|
||||
typedef struct PF_FILE PF_FILE;
|
||||
typedef struct PF_LOCK {
|
||||
u16 mode; // 0x00
|
||||
u16 count; // 0x02
|
||||
u32 wcount; // 0x04
|
||||
PF_FILE* owner; // 0x08
|
||||
s32 resource; // 0x0C
|
||||
} PF_LOCK;
|
||||
|
||||
typedef struct PF_SFD PF_SFD;
|
||||
struct PF_SFD {
|
||||
u32 stat; // 0x00
|
||||
PF_FFD ffd; // 0x04
|
||||
PF_DIR_ENT dir_entry; // 0x3C
|
||||
PF_LOCK lock; // 0x27C
|
||||
u8 pad_28C[0x0C]; // 0x28C
|
||||
u16 num_handlers; // 0x298
|
||||
u16 pad_29A;
|
||||
};
|
||||
|
||||
typedef struct PF_CURSOR {
|
||||
u32 position; // 0x00
|
||||
u32 sector; // 0x04
|
||||
u32 file_sector_index; // 0x08
|
||||
u16 offset_in_sector; // 0x0C
|
||||
u16 pad_0E;
|
||||
} PF_CURSOR;
|
||||
|
||||
typedef struct PF_FILE {
|
||||
u32 stat; // 0x00
|
||||
u32 open_mode; // 0x04
|
||||
PF_SFD* p_sfd; // 0x08
|
||||
PF_FILE_HINT hint; // 0x0C
|
||||
s32 last_error; // 0x18
|
||||
PF_CURSOR cursor; // 0x1C
|
||||
u16 lock_count; // 0x2C
|
||||
u16 pad_2E;
|
||||
} PF_FILE;
|
||||
|
||||
typedef struct PF_INFO {
|
||||
u32 file_size; // 0x00
|
||||
u32 io_pointer; // 0x04
|
||||
u32 empty_size; // 0x08
|
||||
u32 allocated_size; // 0x0C
|
||||
u32 lock_mode; // 0x10
|
||||
PF_FILE* lock_owner; // 0x14
|
||||
u32 lock_count; // 0x18
|
||||
u32 lock_tcount; // 0x1C
|
||||
u8 pad_20[0x14];
|
||||
u32 field_34; // 0x34
|
||||
} PF_INFO;
|
||||
|
||||
|
||||
|
||||
typedef struct PF_FSTAT {
|
||||
u32 file_size; // 0x00
|
||||
u16 create_time; // 0x04
|
||||
u16 modify_time; // 0x06
|
||||
u16 modify_date; // 0x08
|
||||
u16 create_date; // 0x0A
|
||||
u16 access_date; // 0x0C
|
||||
u16 create_time_ms; // 0x0E
|
||||
u8 attr; // 0x10
|
||||
} PF_FSTAT;
|
||||
|
||||
typedef struct PF_UDD {
|
||||
u32 stat; // 0x00
|
||||
PF_SDD* p_sdd; // 0x04
|
||||
PF_FILE_HINT hint; // 0x08
|
||||
u32 field_14; // 0x14
|
||||
u32 field_18; // 0x18
|
||||
u32 field_1C; // 0x1C
|
||||
} PF_UDD;
|
||||
|
||||
|
||||
typedef struct PF_VOLUME {
|
||||
PF_BPB bpb; // 0x00
|
||||
u32 num_free_clusters; // 0x38
|
||||
u32 last_free_cluster; // 0x3C
|
||||
PF_SFD file_handle[5]; // 0x40
|
||||
PF_SDD_HANDLE dir_handle[5]; // 0xD4C
|
||||
PF_SDD sdds[3]; // 0xE3C
|
||||
PF_UDD udds[3]; // 0x15BC
|
||||
s32 num_open_files; // 0x161C
|
||||
u32 num_open_dirs; // 0x1620
|
||||
u32 buffer_mode; // 0x1624
|
||||
u16 cache_max_fat; // 0x1628
|
||||
u16 cache_max_data; // 0x162A
|
||||
u8 pad_162C[0x10];
|
||||
u32 fat_buffer_size; // 0x163C
|
||||
u32 data_buffer_size; // 0x1640
|
||||
void* cache_signature; // 0x1644
|
||||
s8 label[12]; // 0x1648
|
||||
PF_CUR_DIR current_dir[4]; // 0x1654
|
||||
u32 tail_size; // 0x1F74
|
||||
u8 tail_area[4]; // 0x1F78
|
||||
u32* p_tail_buf; // 0x1F7C
|
||||
s32 last_error; // 0x1F80
|
||||
s32 last_driver_error; // 0x1F84
|
||||
u32 file_config; // 0x1F88
|
||||
u16 flags; // 0x1F8C
|
||||
s8 drv_char; // 0x1F8E
|
||||
u8 pad_1F8F;
|
||||
u16 fsi_flag; // 0x1F90
|
||||
u8 pad_1F92[2];
|
||||
u16 clst_flag; // 0x1F94
|
||||
u16 clst_interval; // 0x1F96
|
||||
u32* clst_buffer; // 0x1F98
|
||||
u32 clst_link_max; // 0x1F9C
|
||||
#define clst_buf clst_buffer
|
||||
#define clst_count clst_link_max
|
||||
void* p_part; // 0x1FA0
|
||||
s32 (*p_callback)(s32); // 0x1FA4
|
||||
const u8* format_param; // 0x1FA8
|
||||
} PF_VOLUME;
|
||||
|
||||
typedef struct PF_CONTEXT {
|
||||
u32 stat; // 0x00
|
||||
s32 context_id; // 0x04
|
||||
} PF_CONTEXT;
|
||||
|
||||
typedef struct PF_CUR_VOLUME {
|
||||
u32 stat; // 0x00
|
||||
s32 context_id; // 0x04
|
||||
PF_VOLUME* p_vol; // 0x08
|
||||
} PF_CUR_VOLUME;
|
||||
|
||||
typedef struct PF_DTA {
|
||||
void* file; // 0x00
|
||||
void* dir; // 0x04
|
||||
PF_VOLUME* vol; // 0x08
|
||||
u32 parent_start_cluster; // 0x0C
|
||||
u32 parent_pos; // 0x10
|
||||
u32 status; // 0x14
|
||||
u8 num_entry_LFNs; // 0x18
|
||||
u8 ordinal; // 0x19
|
||||
u8 check_sum; // 0x1A
|
||||
u8 attr; // 0x1B
|
||||
s8 reg_exp[520]; // 0x1C
|
||||
u16 time; // 0x224
|
||||
u16 date; // 0x226
|
||||
u32 file_size; // 0x228
|
||||
u8 attribute; // 0x22C
|
||||
s8 file_name[13]; // 0x22D
|
||||
s8 long_name[520]; // 0x23A
|
||||
u8 pad_442[2];
|
||||
u16 reg_expW[260]; // 0x444
|
||||
u16 file_nameW[13]; // 0x64C
|
||||
u16 long_nameW[260]; // 0x666
|
||||
} PF_DTA;
|
||||
|
||||
/* pf_vol_set global; offsets verified against base object */
|
||||
typedef struct PF_VOLUME_SET {
|
||||
PF_CUR_VOLUME current_vol[4]; // 0x00
|
||||
s32 num_attached_volumes; // 0x30
|
||||
s32 num_mounted_volumes; // 0x34
|
||||
u32 config; // 0x38
|
||||
u32 pad_3C; // 0x3C
|
||||
s32 last_error; // 0x40
|
||||
s32 last_driver_error; // 0x44
|
||||
PF_CHARCODE codeset; // 0x48
|
||||
u32 setting; // 0x60
|
||||
u8 pad_64[0x0C]; // 0x64
|
||||
PF_CONTEXT context[3]; // 0x70
|
||||
PF_VOLUME volumes[26]; // 0x88
|
||||
} PF_VOLUME_SET;
|
||||
|
||||
extern PF_VOLUME_SET pf_vol_set;
|
||||
|
||||
/* pf_str.c */
|
||||
void PFSTR_SetCodeMode(PF_STR* p_str, u32 code_mode);
|
||||
u32 PFSTR_GetCodeMode(PF_STR* p_str);
|
||||
s8* PFSTR_GetStrPos(PF_STR* p_str, u32 target);
|
||||
void PFSTR_MoveStrPos(PF_STR* p_str, s16 num_char);
|
||||
s32 PFSTR_InitStr(PF_STR* p_str, const s8* s, u32 code_mode);
|
||||
u16 PFSTR_StrLen(PF_STR* p_str);
|
||||
u16 PFSTR_StrNumChar(PF_STR* p_str, u32 target);
|
||||
s32 PFSTR_StrCmp(const PF_STR* p_str, const s8* s);
|
||||
s32 PFSTR_StrNCmp(PF_STR* p_str, const s8* s, u32 target, s16 offset, u16 num);
|
||||
void PFSTR_ToUpperNStr(PF_STR* p_str, u16 num, s8* dest);
|
||||
|
||||
/* pf_clib.c */
|
||||
s32 pf_strcmp(const s8* s1, const s8* s2);
|
||||
s32 pf_strncmp(const s8* s1, const s8* s2, u32 n);
|
||||
s8* pf_strcpy(s8* dst, const s8* src);
|
||||
u32 pf_strlen(const s8* s);
|
||||
s32 pf_toupper(s32 c);
|
||||
s32 pf_w_strcmp(const u16* s1, const u16* s2);
|
||||
s32 pf_w_strncmp(const u16* s1, const u16* s2, u32 n);
|
||||
u16* pf_w_strcpy(u16* dst, const u16* src);
|
||||
u32 pf_w_strlen(const u16* s);
|
||||
|
||||
/* pf_code.c */
|
||||
void PFCODE_Divide_Width(s32 width, s16* oem_width, s16* uni_width);
|
||||
#define PF_CODE_C_TO_WC(x0, x1) ((u16)(((u8)(x0) << 8) + (u8)(x1)))
|
||||
#define PF_CODE_C_TO_WC_ARR(x, i) PF_CODE_C_TO_WC(x[i], x[i + 1])
|
||||
|
||||
extern const u8 pf_valid_fn_char[96];
|
||||
|
||||
/* pf_service.c */
|
||||
u16 PF_GET_LE_U16(const u8* p);
|
||||
|
||||
/* pf_volume.c */
|
||||
PF_VOLUME* PFVOL_GetCurrentVolume(void);
|
||||
PF_VOLUME* PFVOL_GetVolumeFromDrvChar(s8 drv_char);
|
||||
|
||||
#define PF_IS_PATH_SEPERATOR(s, t, i) ((PFSTR_StrNCmp(s, (const s8*)"\\", t, i, 1) == 0 || PFSTR_StrNCmp(s, (const s8*)"/", t, i, 1) == 0))
|
||||
#define PF_IS_PATH_NULL(s, t, i) (PFSTR_StrNCmp(s, (const s8*)"\0", t, i, 1) == 0)
|
||||
#define PF_IS_PATH_NOT_NULL(s, t, i) (PFSTR_StrNCmp(s, (const s8*)"\0", t, i, 1) != 0)
|
||||
|
||||
/* pf_path.c */
|
||||
void PFPATH_InitTokenOfPath(PF_STR* p_str, s8* path, u32 code_mode);
|
||||
s32 PFPATH_GetNextTokenOfPath(PF_STR* p_str, u32 wildcard);
|
||||
s32 PFPATH_DoSplitPath(PF_STR* p_path, PF_STR* p_dir_path, PF_STR* p_filename, u32 wildcard);
|
||||
s32 PFPATH_SplitPath(PF_STR* p_path, PF_STR* p_dir_path, PF_STR* p_filename);
|
||||
s32 PFPATH_SplitPathPattern(PF_STR* p_path, PF_STR* p_dir_path, PF_STR* p_pattern);
|
||||
PF_VOLUME* PFPATH_GetVolumeFromPath(PF_STR* p_path);
|
||||
u32 PFPATH_MatchFileNameWithPattern(const s8* file_name, PF_STR* p_pattern, u32 is_long_name);
|
||||
s32 PFPATH_cmpNameUni(const u16* p_name, PF_STR* sPattern);
|
||||
s32 PFPATH_cmpNameImpl(const s8* p_name, const s8* p_pattern, u32* p_flag);
|
||||
s32 PFPATH_cmpName(const s8* sShort, PF_STR* p_pattern, u32 is_short_search);
|
||||
s32 PFPATH_cmpTailSFN(const s8* sfn_name, const s8* pattern);
|
||||
s32 PFPATH_putShortName(u8* pDirEntry, const s8* short_name, u8 attr);
|
||||
s32 PFPATH_getShortName(s8* short_name, const u8* pDirEntry, u8 attr);
|
||||
void PFPATH_getLongNameformShortName(s8* short_name, s8* long_name, u8 flag);
|
||||
u32 PFPATH_GetLengthFromShortname(const s8* sSrc);
|
||||
u32 PFPATH_GetLengthFromUnicode(const u16* sSrc);
|
||||
s32 PFPATH_transformFromUnicodeToNormal(s8* sDest, const u16* sSrc);
|
||||
s32 PFPATH_transformInUnicode(u16* sDestStr, const s8* sSrcStr);
|
||||
u32 PFPATH_parseShortName(s8* pDest, PF_STR* p_pattern);
|
||||
s32 PFPATH_parseShortNameNumeric(s8* p_char, u32 count);
|
||||
void PFPATH_SetSearchPattern(s8* p_buf_local, u16* p_buf_unicode, PF_STR* p_pattern);
|
||||
u32 PFPATH_CheckExtShortNameSignature(PF_STR* p_str);
|
||||
u32 PFPATH_CheckExtShortName(PF_STR* p_str, u32 target, u32 wildcard);
|
||||
u32 PFPATH_GetExtShortNameIndex(PF_STR* p_str, u32* p_index);
|
||||
s32 PFPATH_AdjustExtShortName(s8* pName, u32 position);
|
||||
u16 PFPATH_GetNextCharOfPattern(PF_STR* p_pattern, u32 name_kind);
|
||||
u32 PFPATH_DoMatchFileNameWithPattern(u16 c_name, PF_FILE_NAME_ITER* p_name, u16 c_pat, PF_STR* p_pattern, u32 name_kind);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1601
libs/RVL_SDK/src/fa/driver/sd_drv.c
Normal file
1601
libs/RVL_SDK/src/fa/driver/sd_drv.c
Normal file
File diff suppressed because it is too large
Load Diff
495
libs/RVL_SDK/src/fa/pdm_partition.c
Normal file
495
libs/RVL_SDK/src/fa/pdm_partition.c
Normal file
@@ -0,0 +1,495 @@
|
||||
#include <revolution/types.h>
|
||||
|
||||
typedef struct PDM_DISK {
|
||||
u8 pad_00[0x18];
|
||||
u32 num_sectors; // +0x18
|
||||
u8 pad_1C[0x8];
|
||||
} PDM_DISK;
|
||||
|
||||
typedef struct PDM_PARTITION PDM_PARTITION;
|
||||
|
||||
typedef void (*PDM_PART_CALLBACK)(PDM_PARTITION* p_part);
|
||||
|
||||
struct PDM_PARTITION {
|
||||
u32 stat; // +0x00
|
||||
PDM_DISK* p_disk; // +0x04
|
||||
u32 part_no; // +0x08
|
||||
u32 start_sector; // +0x0C
|
||||
u32 num_sectors; // +0x10
|
||||
s32 driver_error_code; // +0x14
|
||||
u32 field_18; // +0x18
|
||||
u32 field_1C; // +0x1C
|
||||
PDM_PART_CALLBACK callback[2]; // +0x20, +0x24
|
||||
};
|
||||
|
||||
typedef struct PDM_DISK_SET {
|
||||
u16 num_partition; // +0x00
|
||||
u8 pad_02[0x4E2]; // +0x02
|
||||
PDM_PARTITION part_table[0x1A]; // +0x4E4
|
||||
} PDM_DISK_SET;
|
||||
|
||||
extern PDM_DISK_SET pdm_disk_set;
|
||||
|
||||
extern s32 pdm_disk_set_disk(PDM_DISK* p_disk, PDM_PARTITION* p_part);
|
||||
extern s32 pdm_disk_init(PDM_DISK* p_disk);
|
||||
extern s32 pdm_disk_mount(PDM_DISK* p_disk);
|
||||
extern s32 pdm_disk_unmount(PDM_DISK* p_disk, u32 force);
|
||||
extern s32 pdm_disk_format(PDM_DISK* p_disk, u8* param);
|
||||
extern s32 pdm_disk_finalize(PDM_DISK* p_disk);
|
||||
extern s32 pdm_disk_get_media_bps(PDM_DISK* p_disk, u16* p_bps);
|
||||
extern s32 pdm_disk_get_media_attribute(PDM_DISK* p_disk);
|
||||
extern s32 pdm_disk_physical_read(PDM_DISK* p_disk, u8* buf, u32 sector, u32 num_sector, u16 bps, u32* p_num_success);
|
||||
extern s32 pdm_disk_physical_write(PDM_DISK* p_disk, const u8* buf, u32 sector, u32 num_sector, u16 bps, u32* p_num_success);
|
||||
|
||||
s32 pdm_part_is_master_boot_sector(const u8* p_sector, u32 num_sector, u32* p_is_mbr) {
|
||||
u32 start_sector[4];
|
||||
u32 sector_num[4];
|
||||
u32* p_start;
|
||||
u32* p_num;
|
||||
const u8* pe;
|
||||
s16 i;
|
||||
|
||||
*p_is_mbr = 0;
|
||||
if (p_sector[0x1FE] != 0x55 || p_sector[0x1FF] != 0xAA) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
pe = p_sector;
|
||||
p_start = start_sector;
|
||||
p_num = sector_num;
|
||||
for (i = 0; i < 4; i++) {
|
||||
*p_start = 0;
|
||||
*p_start = (pe[0x1C9] * 0x1000000 + pe[0x1C7] * 0x100) + (pe[0x1C8] * 0x10000 + pe[0x1C6]);
|
||||
*p_num = (pe[0x1CD] * 0x1000000 + pe[0x1CB] * 0x100) + (pe[0x1CC] * 0x10000 + pe[0x1CA]);
|
||||
if (*p_start != 0 && *p_num != 0) {
|
||||
if (i == 0) {
|
||||
*p_is_mbr = 1;
|
||||
}
|
||||
} else {
|
||||
if (i == 0) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
p_num++;
|
||||
pe += 0x10;
|
||||
p_start++;
|
||||
}
|
||||
|
||||
p_num = sector_num;
|
||||
p_start = start_sector;
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (*p_start + *p_num > num_sector) {
|
||||
if (i == 0) {
|
||||
*p_is_mbr = 0;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
p_start++;
|
||||
p_num++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_is_boot_sector(const u8* p_sector) {
|
||||
u16 bps;
|
||||
s32 is_boot;
|
||||
|
||||
is_boot = 1;
|
||||
if (!((p_sector[0] == 0xEB && p_sector[2] == 0x90) || p_sector[0] == 0xE9)) {
|
||||
is_boot = 0;
|
||||
}
|
||||
if (!(p_sector[0x1FE] == 0x55 && p_sector[0x1FF] == 0xAA)) {
|
||||
is_boot = 0;
|
||||
}
|
||||
if ((u32)&p_sector[0xB] & 1) {
|
||||
bps = p_sector[0xB] | p_sector[0xC] << 8;
|
||||
} else {
|
||||
u16 tmp;
|
||||
tmp = *(u16*)&p_sector[0xC];
|
||||
bps = ((tmp >> 8) & 0xFF) | ((tmp << 8) & 0xFF00);
|
||||
}
|
||||
if (bps != 0x200 && bps != 0x400 && bps != 0x800 && bps != 0x1000) {
|
||||
is_boot = 0;
|
||||
}
|
||||
if (p_sector[0xD] != 1 && p_sector[0xD] != 2 && p_sector[0xD] != 4 && p_sector[0xD] != 8 &&
|
||||
p_sector[0xD] != 0x10 && p_sector[0xD] != 0x20 && p_sector[0xD] != 0x40 && p_sector[0xD] != 0x80) {
|
||||
is_boot = 0;
|
||||
}
|
||||
if (p_sector[0x15] != 0xF0 && p_sector[0x15] != 0xF8 && p_sector[0x15] != 0xF9 && p_sector[0x15] != 0xFA &&
|
||||
p_sector[0x15] != 0xFB && p_sector[0x15] != 0xFC && p_sector[0x15] != 0xFD && p_sector[0x15] != 0xFE &&
|
||||
p_sector[0x15] != 0xFF) {
|
||||
is_boot = 0;
|
||||
}
|
||||
return is_boot;
|
||||
}
|
||||
|
||||
s32 pdm_part_get_start_sector(PDM_PARTITION* p_part) {
|
||||
u8 buf[0x200] ATTRIBUTE_ALIGN(32);
|
||||
u32 num_success;
|
||||
u32 is_mbr;
|
||||
u32 start_sector[4];
|
||||
u32 sector_num[4];
|
||||
u32 rel_sector;
|
||||
u32 rel_num;
|
||||
u32 rel_start;
|
||||
u32 rel_cnt;
|
||||
u32 base;
|
||||
u32 part_no;
|
||||
u32 cnt;
|
||||
u16 i;
|
||||
u16 j;
|
||||
s32 err;
|
||||
|
||||
cnt = 0;
|
||||
p_part->start_sector = 0;
|
||||
part_no = p_part->part_no;
|
||||
p_part->num_sectors = p_part->p_disk->num_sectors;
|
||||
|
||||
err = pdm_disk_physical_read(p_part->p_disk, buf, 0, 1, 0x200, &num_success);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
|
||||
pdm_part_is_master_boot_sector(buf, p_part->p_disk->num_sectors, &is_mbr);
|
||||
if (is_mbr != 0) {
|
||||
start_sector[0] = buf[0x1C6] + buf[0x1C7] * 0x100 + buf[0x1C8] * 0x10000 + buf[0x1C9] * 0x1000000;
|
||||
sector_num[0] = buf[0x1CA] + buf[0x1CB] * 0x100 + buf[0x1CC] * 0x10000 + buf[0x1CD] * 0x1000000;
|
||||
start_sector[1] = buf[0x1D6] + buf[0x1D7] * 0x100 + buf[0x1D8] * 0x10000 + buf[0x1D9] * 0x1000000;
|
||||
sector_num[1] = buf[0x1DA] + buf[0x1DB] * 0x100 + buf[0x1DC] * 0x10000 + buf[0x1DD] * 0x1000000;
|
||||
start_sector[2] = buf[0x1E6] + buf[0x1E7] * 0x100 + buf[0x1E8] * 0x10000 + buf[0x1E9] * 0x1000000;
|
||||
sector_num[2] = buf[0x1EA] + buf[0x1EB] * 0x100 + buf[0x1EC] * 0x10000 + buf[0x1ED] * 0x1000000;
|
||||
start_sector[3] = buf[0x1F6] + buf[0x1F7] * 0x100 + buf[0x1F8] * 0x10000 + buf[0x1F9] * 0x1000000;
|
||||
sector_num[3] = buf[0x1FA] + buf[0x1FB] * 0x100 + buf[0x1FC] * 0x10000 + buf[0x1FD] * 0x1000000;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
rel_start = start_sector[i];
|
||||
rel_cnt = sector_num[i];
|
||||
if (rel_start == 0 || rel_cnt == 0) {
|
||||
return 7;
|
||||
}
|
||||
err = pdm_disk_physical_read(p_part->p_disk, buf, rel_start, 1, 0x200, &num_success);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
pdm_part_is_master_boot_sector(buf, p_part->p_disk->num_sectors, &is_mbr);
|
||||
if (is_mbr != 0) {
|
||||
base = start_sector[i];
|
||||
rel_sector = base;
|
||||
for (j = 0; j < 2; j++) {
|
||||
if (j == 0) {
|
||||
rel_sector = rel_sector + (buf[0x1C8] * 0x10000 + buf[0x1C6]) +
|
||||
(buf[0x1C9] * 0x1000000 + buf[0x1C7] * 0x100);
|
||||
rel_num = buf[0x1CC] * 0x10000 + buf[0x1CA] + buf[0x1CD] * 0x1000000 + buf[0x1CB] * 0x100;
|
||||
err = pdm_disk_physical_read(p_part->p_disk, buf, rel_sector, 1, 0x200, &num_success);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
if (part_no == cnt) {
|
||||
p_part->start_sector = rel_sector;
|
||||
p_part->num_sectors = rel_num;
|
||||
return 0;
|
||||
}
|
||||
cnt++;
|
||||
} else {
|
||||
rel_sector = base + (buf[0x1D8] * 0x10000 + buf[0x1D6]) +
|
||||
(buf[0x1D9] * 0x1000000 + buf[0x1D7] * 0x100);
|
||||
rel_num = buf[0x1DC] * 0x10000 + buf[0x1DA] + buf[0x1DD] * 0x1000000 + buf[0x1DB] * 0x100;
|
||||
if (rel_sector == 0 || rel_num == 0) {
|
||||
break;
|
||||
}
|
||||
err = pdm_disk_physical_read(p_part->p_disk, buf, rel_sector, 1, 0x200, &num_success);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
pdm_part_is_master_boot_sector(buf, p_part->p_disk->num_sectors, &is_mbr);
|
||||
if (is_mbr == 0) {
|
||||
break;
|
||||
}
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (part_no == cnt) {
|
||||
p_part->start_sector = rel_start;
|
||||
p_part->num_sectors = rel_cnt;
|
||||
return 0;
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (part_no >= 2) {
|
||||
return 7;
|
||||
}
|
||||
p_part->start_sector = 0;
|
||||
p_part->num_sectors = p_part->p_disk->num_sectors;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 pdm_part_chg_ltop(PDM_PARTITION* p_part, u32 lsector, u16 lbps) {
|
||||
u16 bps;
|
||||
u32 shift;
|
||||
u32 offset;
|
||||
|
||||
pdm_disk_get_media_bps(p_part->p_disk, &bps);
|
||||
if (lbps == bps) {
|
||||
return lsector + p_part->start_sector;
|
||||
}
|
||||
shift = (u32)bps >> 9;
|
||||
offset = p_part->start_sector;
|
||||
if (shift == 2) {
|
||||
offset <<= 1;
|
||||
} else if (shift == 4) {
|
||||
offset <<= 2;
|
||||
} else if (shift == 8) {
|
||||
offset <<= 3;
|
||||
}
|
||||
shift = (u32)lbps >> 9;
|
||||
if (shift == 2) {
|
||||
offset >>= 1;
|
||||
} else if (shift == 4) {
|
||||
offset >>= 2;
|
||||
} else if (shift == 8) {
|
||||
offset >>= 3;
|
||||
}
|
||||
return lsector + offset;
|
||||
}
|
||||
|
||||
s32 pdm_part_get_partition(PDM_DISK* p_disk, u32 part_no, PDM_PARTITION** pp_part) {
|
||||
PDM_PARTITION* p_part;
|
||||
u16 i;
|
||||
s32 err;
|
||||
|
||||
*pp_part = NULL;
|
||||
if (pdm_disk_set.num_partition >= 0x1A) {
|
||||
return 0xA;
|
||||
}
|
||||
for (i = 0; i < 0x1A; i++) {
|
||||
if (!(pdm_disk_set.part_table[i].stat & 1)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 0x1A) {
|
||||
return 0xA;
|
||||
}
|
||||
err = pdm_disk_set_disk(p_disk, &pdm_disk_set.part_table[i]);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
pdm_disk_set.num_partition += 1;
|
||||
pdm_disk_set.part_table[i].stat |= 1;
|
||||
pdm_disk_set.part_table[i].p_disk = p_disk;
|
||||
pdm_disk_set.part_table[i].part_no = part_no;
|
||||
*pp_part = &pdm_disk_set.part_table[i];
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_release_partition(PDM_PARTITION* p_part) {
|
||||
p_part->stat &= ~1;
|
||||
pdm_disk_set.num_partition -= 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_is_attached_partition(PDM_PARTITION* p_part) {
|
||||
return (p_part->stat & 4) >> 2;
|
||||
}
|
||||
|
||||
void pdm_part_set_driver_error_code(PDM_PARTITION* p_part, s32 error_code) {
|
||||
p_part->driver_error_code = error_code;
|
||||
}
|
||||
|
||||
s32 pdm_part_get_driver_error_code(PDM_PARTITION* p_part) {
|
||||
return p_part->driver_error_code;
|
||||
}
|
||||
|
||||
s32 pdm_part_get_media_attribute(PDM_PARTITION* p_part) {
|
||||
s32 err;
|
||||
|
||||
err = pdm_disk_get_media_attribute(p_part->p_disk);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_init(PDM_PARTITION* p_part) {
|
||||
s32 err;
|
||||
|
||||
if ((p_part->stat & 4) == 0) {
|
||||
err = pdm_disk_set_disk(p_part->p_disk, p_part);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
err = pdm_disk_init(p_part->p_disk);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
return 0xB;
|
||||
}
|
||||
p_part->stat |= 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_mount(PDM_PARTITION* p_part) {
|
||||
s32 err;
|
||||
|
||||
if ((p_part->stat & 8) == 0) {
|
||||
err = pdm_disk_set_disk(p_part->p_disk, p_part);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
err = pdm_disk_mount(p_part->p_disk);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
err = pdm_part_get_start_sector(p_part);
|
||||
if (err != 0) {
|
||||
pdm_disk_unmount(p_part->p_disk, 0);
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
return 0xC;
|
||||
}
|
||||
p_part->stat = (p_part->stat & ~2) | 8;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_format(PDM_PARTITION* p_part, u8* param) {
|
||||
s32 err;
|
||||
|
||||
err = pdm_disk_set_disk(p_part->p_disk, p_part);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
err = pdm_disk_format(p_part->p_disk, param);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_logical_read(PDM_PARTITION* p_part, u8* buf, u32 lsector, u32 num_sector, u16 lbps, u32* p_num_success) {
|
||||
s32 err;
|
||||
|
||||
if ((p_part->stat & 8) != 8 || (p_part->stat & 2) == 2) {
|
||||
return 0xF;
|
||||
}
|
||||
err = pdm_disk_set_disk(p_part->p_disk, p_part);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
if (p_part->num_sectors <= lsector) {
|
||||
return 0x12;
|
||||
}
|
||||
if (p_part->num_sectors < lsector + num_sector) {
|
||||
num_sector -= lsector + num_sector - p_part->num_sectors;
|
||||
}
|
||||
err = pdm_disk_physical_read(p_part->p_disk, buf, pdm_part_chg_ltop(p_part, lsector, lbps), num_sector, lbps, p_num_success);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_logical_write(PDM_PARTITION* p_part, const u8* buf, u32 lsector, u32 num_sector, u16 lbps, u32* p_num_success) {
|
||||
s32 err;
|
||||
|
||||
if ((p_part->stat & 8) != 8 || (p_part->stat & 2) == 2) {
|
||||
return 0xF;
|
||||
}
|
||||
err = pdm_disk_set_disk(p_part->p_disk, p_part);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
if (p_part->num_sectors <= lsector) {
|
||||
return 0x12;
|
||||
}
|
||||
if (p_part->num_sectors < lsector + num_sector) {
|
||||
num_sector -= lsector + num_sector - p_part->num_sectors;
|
||||
}
|
||||
err = pdm_disk_physical_write(p_part->p_disk, buf, pdm_part_chg_ltop(p_part, lsector, lbps), num_sector, lbps, p_num_success);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_unmount(PDM_PARTITION* p_part, u32 force) {
|
||||
s32 err;
|
||||
s32 err2;
|
||||
|
||||
err = 0;
|
||||
if ((p_part->stat & 8) != 0) {
|
||||
err2 = pdm_disk_set_disk(p_part->p_disk, p_part);
|
||||
if (err2 != 0) {
|
||||
return err2;
|
||||
}
|
||||
err2 = pdm_disk_unmount(p_part->p_disk, force);
|
||||
if (err2 != 0) {
|
||||
err = err2;
|
||||
}
|
||||
} else {
|
||||
err = 0xE;
|
||||
}
|
||||
if (err == 0 || force == 1) {
|
||||
p_part->stat &= ~2;
|
||||
p_part->stat &= ~8;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
s32 pdm_part_finalize(PDM_PARTITION* p_part) {
|
||||
s32 err;
|
||||
|
||||
if ((p_part->stat & 4) != 0) {
|
||||
err = pdm_disk_set_disk(p_part->p_disk, p_part);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
err = pdm_disk_finalize(p_part->p_disk);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
return 0xD;
|
||||
}
|
||||
p_part->stat &= ~4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_register_callback(PDM_PARTITION* p_part, PDM_PART_CALLBACK* callback) {
|
||||
p_part->callback[0] = callback[0];
|
||||
p_part->callback[1] = callback[1];
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pdm_part_unregister_callback(PDM_PARTITION* p_part) {
|
||||
p_part->callback[0] = NULL;
|
||||
p_part->callback[1] = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pdm_part_set_change_media_state(PDM_DISK* p_disk, s32 state) {
|
||||
PDM_PARTITION* p_part;
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < 0x1A; i++) {
|
||||
p_part = &pdm_disk_set.part_table[i];
|
||||
if (!(pdm_disk_set.part_table[i].stat & 1)) {
|
||||
continue;
|
||||
}
|
||||
if (pdm_disk_set.part_table[i].p_disk != p_disk) {
|
||||
continue;
|
||||
}
|
||||
pdm_disk_set.part_table[i].stat |= 2;
|
||||
if (state == 0 && pdm_disk_set.part_table[i].callback[1] != NULL) {
|
||||
pdm_disk_set.part_table[i].callback[1](p_part);
|
||||
} else {
|
||||
if (pdm_disk_set.part_table[i].callback[0] != NULL) {
|
||||
pdm_disk_set.part_table[i].callback[0](p_part);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
127
libs/RVL_SDK/src/fa/pf_api_util.c
Normal file
127
libs/RVL_SDK/src/fa/pf_api_util.c
Normal file
@@ -0,0 +1,127 @@
|
||||
#include <revolution/fa/types.h>
|
||||
#include <revolution/types.h>
|
||||
|
||||
static s32 pf_error_to_api_error[] = {FA_ERR_SUCCESS, FA_ERR_EINVAL, FA_ERR_EINVAL, FA_ERR_ENOENT, FA_ERR_EBUSY, FA_ERR_ENOTEMPTY, FA_ERR_ENOSPC,
|
||||
FA_ERR_ENOEXEC, FA_ERR_EEXIST, FA_ERR_ENOEXEC, FA_ERR_EINVAL, FA_ERR_EWRTPROTECT, FA_ERR_ENOSYS, FA_ERR_ENOEXEC,
|
||||
FA_ERR_ENOEXEC, FA_ERR_ENOEXEC, FA_ERR_EACCES, FA_ERR_EIO, FA_ERR_ENOEXEC, FA_ERR_EACCES, FA_ERR_ENOENT,
|
||||
FA_ERR_ENFILE, FA_ERR_EMFILE, FA_ERR_EISDIR, FA_ERR_EACCES, FA_ERR_EPERM, FA_ERR_ENOEXEC, FA_ERR_ENOEXEC,
|
||||
FA_ERR_ENOEXEC, FA_ERR_ENOEXEC, FA_ERR_ENOMEM, FA_ERR_EINVAL, FA_ERR_EINVAL, FA_ERR_ENOEXEC, FA_ERR_ENOENT,
|
||||
FA_ERR_ENOEXEC, FA_ERR_ENOEXEC, FA_ERR_EFBIG, FA_ERR_EBADF, FA_ERR_ENOLCK};
|
||||
|
||||
s32 PFAPI_ParseOpenModeString(const char* mode_str) {
|
||||
s32 open_mode = 0;
|
||||
u32 i = 0;
|
||||
|
||||
if (mode_str == NULL) {
|
||||
open_mode = 10;
|
||||
return open_mode;
|
||||
}
|
||||
|
||||
switch (mode_str[i++]) {
|
||||
case 'r': {
|
||||
open_mode = 2;
|
||||
break;
|
||||
}
|
||||
case 'w': {
|
||||
open_mode = 1;
|
||||
break;
|
||||
}
|
||||
case 'a': {
|
||||
open_mode = 4;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode_str[i] == 'b') {
|
||||
i++;
|
||||
}
|
||||
switch (mode_str[i++]) {
|
||||
case 0: {
|
||||
return open_mode;
|
||||
}
|
||||
case 't':
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
case '+': {
|
||||
switch (mode_str[i]) {
|
||||
case 0: {
|
||||
return open_mode | 8;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertError(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (err == -1) {
|
||||
return -1;
|
||||
}
|
||||
if (err > 0 && err < 0xA0) {
|
||||
return pf_error_to_api_error[err];
|
||||
}
|
||||
if (err == 0x1000) {
|
||||
err = FA_ERR_EIO;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertDriverError(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (err <= 0) {
|
||||
return err;
|
||||
}
|
||||
if ((u32)err < 0xA0) {
|
||||
err = 1;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertReturnValue(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertReturnValue4feof(s32 err) {
|
||||
if (err == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void* PFAPI_convertReturnValue2NULL(s32 err, void* p_stream) {
|
||||
void* ret;
|
||||
if (err) {
|
||||
ret = NULL;
|
||||
} else {
|
||||
ret = p_stream;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 PFAPI_convertReturnValue4unmount(s32 err) {
|
||||
if (err == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (err == 1) {
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
2186
libs/RVL_SDK/src/fa/pf_dir.c
Normal file
2186
libs/RVL_SDK/src/fa/pf_dir.c
Normal file
File diff suppressed because it is too large
Load Diff
1649
libs/RVL_SDK/src/fa/pf_fat.c
Normal file
1649
libs/RVL_SDK/src/fa/pf_fat.c
Normal file
File diff suppressed because it is too large
Load Diff
2016
libs/RVL_SDK/src/fa/pf_file.c
Normal file
2016
libs/RVL_SDK/src/fa/pf_file.c
Normal file
File diff suppressed because it is too large
Load Diff
1068
libs/RVL_SDK/src/fa/pf_path.c
Normal file
1068
libs/RVL_SDK/src/fa/pf_path.c
Normal file
File diff suppressed because it is too large
Load Diff
2549
libs/RVL_SDK/src/fa/pf_volume.c
Normal file
2549
libs/RVL_SDK/src/fa/pf_volume.c
Normal file
File diff suppressed because it is too large
Load Diff
53
libs/RVL_SDK/src/fa/pf_w_api_util.c
Normal file
53
libs/RVL_SDK/src/fa/pf_w_api_util.c
Normal file
@@ -0,0 +1,53 @@
|
||||
#include <revolution/types.h>
|
||||
|
||||
s32 PFWAPI_ParseOpenModeString(const unsigned short* mode_str) {
|
||||
s32 open_mode = 0;
|
||||
u32 i = 0;
|
||||
|
||||
if (mode_str == NULL) {
|
||||
open_mode = 10;
|
||||
return open_mode;
|
||||
}
|
||||
|
||||
switch (mode_str[i++]) {
|
||||
case 'r': {
|
||||
open_mode = 2;
|
||||
break;
|
||||
}
|
||||
case 'w': {
|
||||
open_mode = 1;
|
||||
break;
|
||||
}
|
||||
case 'a': {
|
||||
open_mode = 4;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode_str[i] == 'b') {
|
||||
i++;
|
||||
}
|
||||
switch (mode_str[i++]) {
|
||||
case 0: {
|
||||
return open_mode;
|
||||
}
|
||||
case 't':
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
case '+': {
|
||||
switch (mode_str[i]) {
|
||||
case 0: {
|
||||
return open_mode | 8;
|
||||
}
|
||||
default: {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
1824
libs/RVL_SDK/src/kpad/KPAD.c
Normal file
1824
libs/RVL_SDK/src/kpad/KPAD.c
Normal file
File diff suppressed because it is too large
Load Diff
3519
libs/RVL_SDK/src/wad/wad.c
Normal file
3519
libs/RVL_SDK/src/wad/wad.c
Normal file
File diff suppressed because it is too large
Load Diff
33
libs/RevoEX/src/net/nettime.c
Normal file
33
libs/RevoEX/src/net/nettime.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <revolution/net.h>
|
||||
|
||||
#include <private/nwc24.h>
|
||||
#include <private/os.h>
|
||||
|
||||
#include <revolution/NWC24.h>
|
||||
#include <revolution/OS.h>
|
||||
|
||||
NWC24Err NWC24iEpochSecondsToDate(NWC24Date* date, OSTime time);
|
||||
NWC24Err NWC24iDateToOSCalendarTime(OSCalendarTime* cal, const NWC24Date* date);
|
||||
|
||||
BOOL NETGetUniversalCalendar(OSCalendarTime* pTime) {
|
||||
static s64 whenCached = 0;
|
||||
NWC24Date date;
|
||||
s64 universalTime;
|
||||
|
||||
if (whenCached == 0 ||
|
||||
whenCached + OSSecondsToTicks(60) < __OSGetSystemTime()) {
|
||||
|
||||
NWC24iSynchronizeRtcCounter(FALSE);
|
||||
whenCached = __OSGetSystemTime();
|
||||
}
|
||||
|
||||
if (NWC24iGetUniversalTime(&universalTime) >= 0 &&
|
||||
NWC24iEpochSecondsToDate(&date, universalTime) >= 0 &&
|
||||
NWC24iDateToOSCalendarTime(pTime, &date) >= 0) {
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
OSTicksToCalendarTime(OSGetTime(), pTime);
|
||||
return FALSE;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
857
src/scene/sdChannelMemory/iplSDMemory.cpp
Normal file
857
src/scene/sdChannelMemory/iplSDMemory.cpp
Normal file
@@ -0,0 +1,857 @@
|
||||
#define IPL_SDMEMORY_SCROLLER_INIT_OUT_OF_LINE
|
||||
#define IPL_SDMEMORY_SET_TRANSLATE_OUT_OF_LINE
|
||||
#define IPL_SDMEMORY_DIALOG_STATE_ACCESSOR
|
||||
#define IPL_SDMEMORY_GET_TEXT_DRAW_RECT_OUT_OF_LINE
|
||||
#include "scene/sdChannelMemory/iplSDMemory.h"
|
||||
#undef IPL_SDMEMORY_DIALOG_STATE_ACCESSOR
|
||||
#undef IPL_SDMEMORY_SET_TRANSLATE_OUT_OF_LINE
|
||||
#undef IPL_SDMEMORY_SCROLLER_INIT_OUT_OF_LINE
|
||||
#undef IPL_SDMEMORY_GET_TEXT_DRAW_RECT_OUT_OF_LINE
|
||||
|
||||
#include "system/iplSystem.h"
|
||||
#include "sound/iplSound.h"
|
||||
#include "utility/iplLayout.h"
|
||||
#include <revolution/os/OSTime.h>
|
||||
|
||||
extern "C" bool iplSDChannelSelect_813DDB74(ipl::scene::NandSDCardManager* manager,
|
||||
ipl::scene::SDMemory::TitleRange* nandTitles,
|
||||
ipl::scene::SDMemory::TitleRange* sdTitles,
|
||||
ESTitleId* titleIds, wchar_t* titleNames, u32* titleCount,
|
||||
s32 state);
|
||||
extern "C" bool iplSDChannelSelect_813DB5EC(ipl::scene::NandSDCardManager* manager,
|
||||
const ESTitleId* titleEntry, ESTitleId titleId);
|
||||
extern "C" bool iplSDChannelSelect_813DB4D4(ipl::scene::NandSDCardManager* manager,
|
||||
const ESTitleId* titleEntry, ESTitleId titleId, u32 flags);
|
||||
|
||||
namespace ipl {
|
||||
namespace utility {
|
||||
void Scroller::init() {
|
||||
mState = 0;
|
||||
mScroll = 0.0f;
|
||||
unk_0x3C = 0.0f;
|
||||
mUpLimit = 0.0f;
|
||||
mDownLimit = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
namespace scene {
|
||||
static const char* const sControlPaneNames[] = {
|
||||
"A", "B", "B_BtnA",
|
||||
};
|
||||
|
||||
static const char* const sTitlePaneNames[] = {"A", "B", "B_BtnA", "C", "D"};
|
||||
static const char* const sAdditionalTitlePaneNames[] = {"B_00", "C_00", "D_00", "B_BtnA"};
|
||||
static const char* const sDialogPaneNames[] = {"B_ArwR", "B_ArwL", "B_CalExit", "B_CalExit_00"};
|
||||
|
||||
SDMemory::SDMemory() : mScroller() {}
|
||||
|
||||
SDMemory::~SDMemory() {}
|
||||
|
||||
void SDMemory::create(EGG::Heap* heap, nand::LayoutFile* layoutFile, NandSDCardManager* manager) {
|
||||
mpNandSDCardManager = manager;
|
||||
|
||||
mpMainLayout = new (heap) layout::Object(heap, layoutFile, "arc", "mn_DialogWindow_ChChange_a.brlyt");
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_DialogIn.brlan", "G_InOut", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_DialogOut.brlan", "G_InOut", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_FocusBtn_on.brlan", "G_FocusBtnA", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_FocusBtn_off.brlan", "G_FocusBtnA", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_SelectBtn_Ac.brlan", "G_SelectBtnA", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_BtnA_Rollover.brlan", "G_BtnA", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_BtnA_Rollout.brlan", "G_BtnA", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_BtnA_On.brlan", "G_BtnA", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_BtnB_Rollover.brlan", "G_BtnB", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_BtnB_Rollout.brlan", "G_BtnB", false, true);
|
||||
mpMainLayout->bindToGroup("mn_DialogWindow_ChChange_a_BtnB_On.brlan", "G_BtnB", false, true);
|
||||
mpMainLayout->finishBinding();
|
||||
mpMainLayout->getAnim(0)->initAnmFrame();
|
||||
mpMainLayout->getAnim(2)->initAnmFrame();
|
||||
mpMainLayout->getAnim(5)->initAnmFrame();
|
||||
mpMainLayout->getAnim(8)->initAnmFrame();
|
||||
|
||||
nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("T_Dialog_00"));
|
||||
textBox->SetString(System::getMessage(0xB0));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("TextBox_05"));
|
||||
textBox->SetString(System::getMessage(0xBB));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("TextBox_06"));
|
||||
textBox->SetString(System::getMessage(0xBC));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpMainLayout->FindPaneByName("T_BtnA"));
|
||||
textBox->SetString(System::getMessage(0x25));
|
||||
|
||||
mpTitleLayout = new (heap) layout::Object(heap, layoutFile, "arc", "mn_DialogWindow_ChChange_b.brlyt");
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_DialogIn.brlan", "G_InOut", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_DialogOut.brlan", "G_InOut", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_FocusBtn_on.brlan", "G_FocusBtnA", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_FocusBtn_off.brlan", "G_FocusBtnA", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_SelectBtn_Ac.brlan", "G_SelectBtnA", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnA_Rollover.brlan", "G_BtnA", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnA_Rollout.brlan", "G_BtnA", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnA_On.brlan", "G_BtnA", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnB_Rollover.brlan", "G_BtnB", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnB_Rollout.brlan", "G_BtnB", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnB_On.brlan", "G_BtnB", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnC_Rollover.brlan", "G_BtnC", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnC_Rollout.brlan", "G_BtnC", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnC_On.brlan", "G_BtnC", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnD_Rollover.brlan", "G_BtnD", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnD_Rollout.brlan", "G_BtnD", false, true);
|
||||
mpTitleLayout->bindToGroup("mn_DialogWindow_ChChange_b_BtnD_On.brlan", "G_BtnD", false, true);
|
||||
mpTitleLayout->finishBinding();
|
||||
mpTitleLayout->getAnim(0)->initAnmFrame();
|
||||
mpTitleLayout->getAnim(2)->initAnmFrame();
|
||||
mpTitleLayout->getAnim(5)->initAnmFrame();
|
||||
mpTitleLayout->getAnim(8)->initAnmFrame();
|
||||
mpTitleLayout->getAnim(11)->initAnmFrame();
|
||||
mpTitleLayout->getAnim(14)->initAnmFrame();
|
||||
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("T_Dialog"));
|
||||
textBox->SetString(System::getMessage(0xB6));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_00"));
|
||||
textBox->SetString(System::getMessage(0xB7));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_01"));
|
||||
textBox->SetString(System::getMessage(0xB8));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_02"));
|
||||
textBox->SetString(System::getMessage(0xB9));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_03"));
|
||||
textBox->SetString(System::getMessage(0xBA));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("T_Dialog_00"));
|
||||
textBox->SetString(System::getMessage(0xB6));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_05"));
|
||||
textBox->SetString(System::getMessage(0xB8));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_06"));
|
||||
textBox->SetString(System::getMessage(0xB9));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpTitleLayout->FindPaneByName("TextBox_07"));
|
||||
textBox->SetString(System::getMessage(0xBA));
|
||||
|
||||
mpDialogLayout = new (heap) layout::Object(heap, layoutFile, "arc", "mn_DialogWindow_ChChange_c.brlyt");
|
||||
static_cast<nw4r::lyt::TextBox*>(mpDialogLayout->FindPaneByName("T_Letter"))->AllocStringBuffer(0x840);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Dialog_FadeIn.brlan", "G_Fede", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Dialog_FadeOut.brlan", "G_Fede", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Back_RollOver.brlan", "G_Back_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Back_Rollout.brlan", "G_Back_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Back_On.brlan", "G_Back_Ac", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Move_RollOver.brlan", "G_Move_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Move_Rollout.brlan", "G_Move_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Move_On.brlan", "G_Move_Ac", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_FocusOn.brlan", "G_ArwL_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_FocusOff.brlan", "G_ArwL_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Select.brlan", "G_ArwL_Ac", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_FocusOn.brlan", "G_ArwR_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_FocusOff.brlan", "G_ArwR_Focus", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Select.brlan", "G_ArwR_Ac", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Appear.brlan", "G_ArwL_End", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Lost.brlan", "G_ArwL_End", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Appear.brlan", "G_ArwR_End", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Lost.brlan", "G_ArwR_End", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_Loop.brlan", "G_ArwRoop", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_HDActionStart.brlan", "G_ArwL_HDAc", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_HDActionEnd.brlan", "G_ArwL_HDAc", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_HDActionStart.brlan", "G_ArwR_HDAc", false, true);
|
||||
mpDialogLayout->bindToGroup("mn_DialogWindow_ChChange_c_HDActionEnd.brlan", "G_ArwR_HDAc", false, true);
|
||||
mpDialogLayout->finishBinding();
|
||||
mpDialogLayout->getAnim(0)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(2)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(5)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(11)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(8)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(18)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(18)->initFrame();
|
||||
mpDialogLayout->getAnim(18)->restart();
|
||||
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpDialogLayout->FindPaneByName("T_CalExit"));
|
||||
textBox->SetString(System::getMessage(0xA5));
|
||||
textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpDialogLayout->FindPaneByName("T_CalExit_00"));
|
||||
textBox->SetString(System::getMessage(0xC4));
|
||||
|
||||
mpProgressLayout = new (heap) layout::Object(heap, layoutFile, "arc", "mn_DialogWindow_Background.brlyt");
|
||||
mpProgressLayout->bindToGroup("mn_DialogWindow_Background_DialogIn.brlan", "G_InOut", false, true);
|
||||
mpProgressLayout->bindToGroup("mn_DialogWindow_Background_DialogOut.brlan", "G_InOut", false, true);
|
||||
mpProgressLayout->finishBinding();
|
||||
mpProgressLayout->getAnim(0)->initAnmFrame();
|
||||
|
||||
}
|
||||
|
||||
void SDMemory::setTitleLists(const TitleRange& nandTitles, const TitleRange& sdTitles) {
|
||||
mNandTitleRange = nandTitles;
|
||||
mSDTitleRange = sdTitles;
|
||||
mTransferFlags[0] = 1;
|
||||
mDialogState = 0;
|
||||
mpMainLayout->getAnim(0)->initAnmFrame();
|
||||
mpMainLayout->getAnim(0)->play();
|
||||
mpProgressLayout->getAnim(0)->initAnmFrame();
|
||||
mpProgressLayout->getAnim(0)->play();
|
||||
snd::getSystem()->startSE("WIPL_SE_INFO_WINDOW");
|
||||
mTransferFlags[1] = 1;
|
||||
mErrorCode = 0;
|
||||
}
|
||||
|
||||
void SDMemory::setScrollLimit() {
|
||||
nw4r::lyt::Pane* headerPane = mpDialogLayout->FindPaneByName("N_Header");
|
||||
nw4r::lyt::Pane* buttonPane = mpDialogLayout->FindPaneByName("T_BtnA");
|
||||
nw4r::lyt::Pane* footerPane = mpDialogLayout->FindPaneByName("N_Footer");
|
||||
|
||||
nw4r::ut::Rect projection;
|
||||
System::getProjectionRect(&projection);
|
||||
|
||||
f32 itemCount = static_cast<f32>(mButtonState);
|
||||
f32 buttonHeight = buttonPane->GetSize().height;
|
||||
f32 headerHeight = headerPane->GetSize().height;
|
||||
f32 footerHeight = footerPane->GetSize().height;
|
||||
f32 contentHeight = headerHeight + footerHeight;
|
||||
f32 itemHeight = itemCount * buttonHeight;
|
||||
f32 contentHeightWithItems = itemHeight + contentHeight;
|
||||
f32 downLimit = contentHeightWithItems - projection.GetHeight() + 1.0f;
|
||||
if (downLimit < 0.0f) {
|
||||
downLimit = 0.0f;
|
||||
}
|
||||
|
||||
mScroller.init();
|
||||
mScroller.setDownLimit(downLimit);
|
||||
}
|
||||
|
||||
void SDMemory::updateSideArrows() {
|
||||
controller::Interface* masterController = System::getMasterController();
|
||||
|
||||
if (mScroller.getBInst().isActive() ? false : true) {
|
||||
if (masterController->down(controller::BTN_UP)) {
|
||||
showLeftArrow();
|
||||
}
|
||||
if (!masterController->down(controller::BTN_UP)) {
|
||||
hideLeftArrow();
|
||||
}
|
||||
if (masterController->down(controller::BTN_DOWN)) {
|
||||
showRightArrow();
|
||||
}
|
||||
if (!masterController->down(controller::BTN_DOWN)) {
|
||||
hideRightArrow();
|
||||
}
|
||||
} else {
|
||||
if (mScroller.getBInst().isUp()) {
|
||||
showLeftArrow();
|
||||
}
|
||||
if (!mScroller.getBInst().isUp()) {
|
||||
hideLeftArrow();
|
||||
}
|
||||
if (mScroller.getBInst().isDown()) {
|
||||
showRightArrow();
|
||||
}
|
||||
if (!mScroller.getBInst().isDown()) {
|
||||
hideRightArrow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::resetScrollArrows() {
|
||||
mControllerFlags[0] = 0;
|
||||
mControllerFlags[1] = 0;
|
||||
mControllerFlags[2] = 0;
|
||||
mControllerFlags[3] = 0;
|
||||
mpDialogLayout->getAnim(16)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(14)->initAnmFrame();
|
||||
if (!mScroller.isDownEnd()) {
|
||||
showUpArrow();
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::updateScrollArrows(u32 previousDownEnd, u32 previousUpEnd, u32 downEnd, u32 upEnd) {
|
||||
if (previousDownEnd != 1 && downEnd == 1) {
|
||||
hideDownArrow();
|
||||
}
|
||||
if (previousDownEnd == 1 && downEnd != 1) {
|
||||
showDownArrow();
|
||||
}
|
||||
if (previousUpEnd != 1 && upEnd == 1) {
|
||||
hideUpArrow();
|
||||
}
|
||||
if (previousUpEnd == 1 && upEnd != 1) {
|
||||
showUpArrow();
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::showDownArrow() {
|
||||
if (mControllerFlags[0] == 0) {
|
||||
layout::Animator* initAnimation = mpDialogLayout->getAnim(16);
|
||||
initAnimation->initAnmFrame();
|
||||
layout::Animator* playAnimation = mpDialogLayout->getAnim(16);
|
||||
playAnimation->initFrame();
|
||||
playAnimation->restart();
|
||||
mControllerFlags[0] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::showUpArrow() {
|
||||
if (mControllerFlags[1] == 0) {
|
||||
layout::Animator* initAnimation = mpDialogLayout->getAnim(14);
|
||||
initAnimation->initAnmFrame();
|
||||
layout::Animator* playAnimation = mpDialogLayout->getAnim(14);
|
||||
playAnimation->initFrame();
|
||||
playAnimation->restart();
|
||||
mControllerFlags[1] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::hideDownArrow() {
|
||||
if (mControllerFlags[0] != 0) {
|
||||
layout::Animator* initAnimation = mpDialogLayout->getAnim(17);
|
||||
initAnimation->initAnmFrame();
|
||||
layout::Animator* playAnimation = mpDialogLayout->getAnim(17);
|
||||
playAnimation->initFrame();
|
||||
playAnimation->restart();
|
||||
mControllerFlags[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::hideUpArrow() {
|
||||
if (mControllerFlags[1] != 0) {
|
||||
layout::Animator* initAnimation = mpDialogLayout->getAnim(15);
|
||||
initAnimation->initAnmFrame();
|
||||
layout::Animator* playAnimation = mpDialogLayout->getAnim(15);
|
||||
playAnimation->initFrame();
|
||||
playAnimation->restart();
|
||||
mControllerFlags[1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::showLeftArrow() {
|
||||
if (mControllerFlags[2] == 0) {
|
||||
layout::Animator* animation = mpDialogLayout->getAnim(19);
|
||||
animation->initFrame();
|
||||
animation->restart();
|
||||
mControllerFlags[2] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::showRightArrow() {
|
||||
if (mControllerFlags[3] == 0) {
|
||||
layout::Animator* animation = mpDialogLayout->getAnim(21);
|
||||
animation->initFrame();
|
||||
animation->restart();
|
||||
mControllerFlags[3] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::hideLeftArrow() {
|
||||
if (mControllerFlags[2] != 0) {
|
||||
layout::Animator* animation = mpDialogLayout->getAnim(20);
|
||||
animation->initFrame();
|
||||
animation->restart();
|
||||
mControllerFlags[2] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::hideRightArrow() {
|
||||
if (mControllerFlags[3] != 0) {
|
||||
layout::Animator* animation = mpDialogLayout->getAnim(22);
|
||||
animation->initFrame();
|
||||
animation->restart();
|
||||
mControllerFlags[3] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::resetDialogPaneAnimations() {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (mPanelAnimationStates[i] != 0) {
|
||||
mPanelAnimationStates[i] = 0;
|
||||
nw4r::lyt::Pane* pane = mpDialogLayout->FindPaneByName(sDialogPaneNames[i]);
|
||||
mpPaneManagers[2]->initPane(pane);
|
||||
|
||||
layout::Animator* animation = NULL;
|
||||
switch (i) {
|
||||
case 2:
|
||||
animation = mpDialogLayout->getAnim(3);
|
||||
break;
|
||||
case 3:
|
||||
animation = mpDialogLayout->getAnim(6);
|
||||
break;
|
||||
case 0:
|
||||
animation = mpDialogLayout->getAnim(12);
|
||||
break;
|
||||
case 1:
|
||||
animation = mpDialogLayout->getAnim(9);
|
||||
break;
|
||||
}
|
||||
|
||||
if (animation != NULL) {
|
||||
animation->initAnmFrame();
|
||||
animation->initFrame();
|
||||
animation->restart();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SDMemory::calc() {
|
||||
bool result = false;
|
||||
s32 stateResult = updateState();
|
||||
if (stateResult == 0) {
|
||||
if (mScroller.calc(mDialogState == 10) == TRUE) {
|
||||
resetDialogPaneAnimations();
|
||||
}
|
||||
|
||||
nw4r::math::VEC3 translation(0.0f, mScroller.get(), 0.0f);
|
||||
mpDialogLayout->FindPaneByName("N_Memo")->SetTranslate(translation);
|
||||
|
||||
switch (mDialogState) {
|
||||
case 0:
|
||||
onDialogState0();
|
||||
break;
|
||||
case 1:
|
||||
mpPaneManagers[0]->update();
|
||||
mpPaneManagers[0]->calc();
|
||||
break;
|
||||
case 2:
|
||||
onDialogState2();
|
||||
break;
|
||||
case 3:
|
||||
result = onDialogState3();
|
||||
break;
|
||||
case 4:
|
||||
onDialogState4();
|
||||
break;
|
||||
case 5:
|
||||
mpPaneManagers[1]->update();
|
||||
mpPaneManagers[1]->calc();
|
||||
break;
|
||||
case 6:
|
||||
onDialogState6();
|
||||
break;
|
||||
case 7:
|
||||
onDialogState7();
|
||||
break;
|
||||
case 8:
|
||||
onDialogState8();
|
||||
break;
|
||||
case 9:
|
||||
onDialogState9();
|
||||
break;
|
||||
case 10:
|
||||
onDialogState10();
|
||||
break;
|
||||
case 11:
|
||||
onDialogState11();
|
||||
break;
|
||||
case 12:
|
||||
onDialogState12();
|
||||
break;
|
||||
case 13:
|
||||
onDialogState13();
|
||||
break;
|
||||
case 14:
|
||||
onDialogState14();
|
||||
break;
|
||||
case 15:
|
||||
onDialogState15();
|
||||
break;
|
||||
case 16:
|
||||
onDialogState16();
|
||||
break;
|
||||
case 17:
|
||||
onDialogState17();
|
||||
break;
|
||||
case 18:
|
||||
onDialogState18();
|
||||
break;
|
||||
case 19:
|
||||
onDialogState19();
|
||||
break;
|
||||
case 20:
|
||||
result = onDialogState20();
|
||||
break;
|
||||
case 21:
|
||||
onDialogState21();
|
||||
break;
|
||||
case 22:
|
||||
result = onDialogState22();
|
||||
break;
|
||||
case 23:
|
||||
onDialogState23();
|
||||
break;
|
||||
case 24:
|
||||
result = onDialogState24();
|
||||
break;
|
||||
case 25:
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
mpMainLayout->calc();
|
||||
mpTitleLayout->calc();
|
||||
mpDialogLayout->calc();
|
||||
mpProgressLayout->calc();
|
||||
|
||||
return stateResult == 2 ? true : result;
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState0() {
|
||||
if (!mpMainLayout->isPlaying(-1)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mPanelStates[i] = 0;
|
||||
nw4r::lyt::Pane* pane = mpMainLayout->FindPaneByName(sControlPaneNames[i]);
|
||||
mpPaneManagers[0]->initPane(pane);
|
||||
}
|
||||
|
||||
mDialogState = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState2() {
|
||||
if (!mpMainLayout->isPlaying(-1)) {
|
||||
mpMainLayout->getAnim(1)->initAnmFrame();
|
||||
mpMainLayout->getAnim(1)->play();
|
||||
|
||||
if (mProcessState == 2) {
|
||||
mpProgressLayout->getAnim(1)->initAnmFrame();
|
||||
mpProgressLayout->getAnim(1)->play();
|
||||
mTransferFlags[1] = 0;
|
||||
}
|
||||
|
||||
mDialogState = 3;
|
||||
}
|
||||
}
|
||||
|
||||
bool SDMemory::onDialogState3() {
|
||||
if (!mpMainLayout->isPlaying(-1)) {
|
||||
switch (mProcessState) {
|
||||
case 0:
|
||||
if (iplSDChannelSelect_813DDB74(mpNandSDCardManager, &mNandTitleRange, &mSDTitleRange,
|
||||
mTitleIds, &mTitleNames[0][0], &mTitleCount, 2)) {
|
||||
mDialogState = 4;
|
||||
mpTitleLayout->getAnim(0)->initAnmFrame();
|
||||
mpTitleLayout->getAnim(0)->play();
|
||||
snd::getSystem()->startSE("WIPL_SE_INFO_WINDOW");
|
||||
} else {
|
||||
mDialogState = 21;
|
||||
mMessageId = 0xB4;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
mDialogState = 21;
|
||||
mMessageId = 0xB3;
|
||||
break;
|
||||
case 2:
|
||||
mDialogState = 25;
|
||||
mErrorCode = 3;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState4() {
|
||||
if (!mpTitleLayout->isPlaying(-1)) {
|
||||
if (mDisplayMode == 4) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
mTitlePanelStates[i] = 0;
|
||||
mpPaneManagers[1]->initPane(mpTitleLayout->GetRootPane()->FindPaneByName(sTitlePaneNames[i], true));
|
||||
}
|
||||
} else {
|
||||
for (int i = 1; i < 5; i++) {
|
||||
mTitlePanelStates[i] = 0;
|
||||
mpPaneManagers[1]->initPane(mpTitleLayout->GetRootPane()->FindPaneByName(sAdditionalTitlePaneNames[i - 1], true));
|
||||
}
|
||||
}
|
||||
|
||||
mDialogState = 5;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState6() {
|
||||
if (!mpTitleLayout->isPlaying(-1)) {
|
||||
mDialogState = 7;
|
||||
mpTitleLayout->getAnim(1)->initAnmFrame();
|
||||
mpTitleLayout->getAnim(1)->play();
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState8() {
|
||||
if (System::getDialog()->getStateForSDMemory() == 2) {
|
||||
if (mTransferStartTime == 0) {
|
||||
mTransferStartTime = OSGetTime();
|
||||
}
|
||||
|
||||
if (!mpNandSDCardManager->getWorker()->is_working() &&
|
||||
OSGetTime() - mTransferStartTime > OS_TIMER_CLOCK) {
|
||||
System::getDialog()->terminate();
|
||||
}
|
||||
}
|
||||
|
||||
if (System::getDialog()->getLastResult() != -1) {
|
||||
if (mpNandSDCardManager->getWorker()->get_async_result() == 0) {
|
||||
mNandTitleCount = mTitleListState.mSecondaryCount;
|
||||
mTitleNameCount = mTitleListState.mNameCount;
|
||||
} else {
|
||||
mNandTitleCount = 0;
|
||||
mTitleNameCount = 0;
|
||||
}
|
||||
|
||||
mDialogState = 9;
|
||||
layout::Animator* animation = mpMainLayout->getAnim(0);
|
||||
animation->initFrame();
|
||||
animation->restart();
|
||||
|
||||
nw4r::lyt::Pane* headerPane = mpMainLayout->FindPaneByName("T_Header");
|
||||
static_cast<nw4r::lyt::TextBox*>(headerPane)->SetString(System::getMessage(0xBE), 0);
|
||||
|
||||
mButtonState = 0;
|
||||
nw4r::lyt::Pane* titlePane = mpMainLayout->FindPaneByName("N_Body");
|
||||
nw4r::lyt::Pane* bodyPane = mpMainLayout->FindPaneByName("T_Letter");
|
||||
bodyPane->SetAlpha(0xFF);
|
||||
|
||||
for (u32 i = 0; i < mTitleCount; i++) {
|
||||
utility::layout::set_string(bodyPane, mTitleNames[i]);
|
||||
nw4r::ut::Rect textRect = mpMainLayout->getTextDrawRect("T_Letter");
|
||||
f32 lineCount = -(textRect.bottom - textRect.top) / titlePane->GetSize().height;
|
||||
mButtonState += static_cast<s32>(ceil(lineCount));
|
||||
}
|
||||
|
||||
setScrollLimit();
|
||||
resetScrollArrows();
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState7() {
|
||||
if (!mpTitleLayout->isPlaying(-1)) {
|
||||
switch (mProcessState) {
|
||||
case 4:
|
||||
mDialogState = 0;
|
||||
mpMainLayout->getAnim(0)->play();
|
||||
snd::getSystem()->startSE("WIPL_SE_BT_TARGETTING");
|
||||
break;
|
||||
default:
|
||||
mTransferStartTime = 0;
|
||||
mTransferFrame = 0;
|
||||
System::getDialog()->callBtn0NoShade(0xCC, 0, true);
|
||||
mDialogState = 8;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SDMemory::onDialogState9() {
|
||||
if (!mpDialogLayout->isPlaying(0)) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
mPanelAnimationStates[i] = 0;
|
||||
nw4r::lyt::Pane* pane = mpDialogLayout->FindPaneByName(sDialogPaneNames[i]);
|
||||
mpPaneManagers[2]->initPane(pane);
|
||||
}
|
||||
|
||||
mDialogState = 10;
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState10() {
|
||||
controller::Interface* masterController = System::getMasterController();
|
||||
if (mScroller.isActive()) {
|
||||
updateSideArrows();
|
||||
if (mScroller.getBInst().isActive() ? false : true) {
|
||||
if (masterController->down(controller::BTN_UP)) {
|
||||
mScroller.scrollUpByCon();
|
||||
} else if (masterController->down(controller::BTN_DOWN)) {
|
||||
mScroller.scrollDownByCon();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool previousDownEnd = !!mControllerFlags[0];
|
||||
bool previousUpEnd = !!mControllerFlags[1];
|
||||
updateScrollArrows(previousDownEnd, previousUpEnd, mScroller.isUpEnd(), mScroller.isDownEnd());
|
||||
|
||||
if (mScroller.getBInst().isActive() ? false : true) {
|
||||
mpPaneManagers[2]->update();
|
||||
}
|
||||
mpPaneManagers[2]->calc();
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState11() {
|
||||
if (!mpDialogLayout->isPlaying(4) && !mpDialogLayout->isPlaying(7)) {
|
||||
if (mProcessState < 4 && mProcessState >= 2) {
|
||||
mDialogState = 12;
|
||||
mpDialogLayout->getAnim(1)->initAnmFrame();
|
||||
mpDialogLayout->getAnim(1)->play();
|
||||
|
||||
if (mControllerFlags[0] != 0) {
|
||||
hideDownArrow();
|
||||
}
|
||||
if (mControllerFlags[1] != 0) {
|
||||
hideUpArrow();
|
||||
}
|
||||
} else {
|
||||
mDialogState = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState16() {
|
||||
if (mTitleCount > mCurrentTitle && System::isReceiveScheduleStopped()) {
|
||||
const ESTitleId* titleEntry = &mTitleIds[mCurrentTitle];
|
||||
if (iplSDChannelSelect_813DB4D4(mpNandSDCardManager, titleEntry, *titleEntry, 0)) {
|
||||
mDialogState = 16;
|
||||
} else {
|
||||
System::getDialog()->terminate();
|
||||
mDialogState = 20;
|
||||
mErrorCode = 1;
|
||||
mMessageId = 0xAE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState18() {
|
||||
if (System::getDialog()->getStateForSDMemory() == 2) {
|
||||
mCurrentTitleName[0] = L'\0';
|
||||
const wchar_t* message = System::getMessage(0xB1);
|
||||
const wchar_t* titleName = mTitleNames[mCurrentTitle];
|
||||
swprintf(mCurrentTitleName, 0x107f, L"%ls\n%ls", titleName, message);
|
||||
System::getDialog()->setTitleForSDMemory(mCurrentTitleName);
|
||||
|
||||
const ESTitleId* titleEntry = &mTitleIds[mCurrentTitle];
|
||||
const ESTitleId titleId = *titleEntry;
|
||||
if (iplSDChannelSelect_813DB5EC(mpNandSDCardManager, titleEntry, titleId)) {
|
||||
mDialogState = 18;
|
||||
} else {
|
||||
System::getDialog()->terminate();
|
||||
mDialogState = 20;
|
||||
mErrorCode = 1;
|
||||
mMessageId = 0xAE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState19() {
|
||||
if (!mpNandSDCardManager->getWorker()->is_working()) {
|
||||
if (mpNandSDCardManager->getWorker()->get_async_result() == 0) {
|
||||
mDialogState = 13;
|
||||
} else {
|
||||
System::getDialog()->terminate();
|
||||
mDialogState = 20;
|
||||
mErrorCode = 1;
|
||||
mMessageId = 0xAE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SDMemory::onDialogState20() {
|
||||
DialogWindow* dialog = System::getDialog();
|
||||
if (dialog->getStateForSDMemory() == 4 && mTransferFlags[1] && mErrorCode == 0) {
|
||||
mTransferFlags[1] = 0;
|
||||
mpProgressLayout->getAnim(1)->initAnmFrame();
|
||||
mpProgressLayout->getAnim(1)->play();
|
||||
}
|
||||
|
||||
if (System::getDialog()->getLastResult() != -1) {
|
||||
if (mErrorCode == 0) {
|
||||
mTransferFlags[0] = 1;
|
||||
mDialogState = 25;
|
||||
return true;
|
||||
}
|
||||
|
||||
mDialogState = 23;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState21() {
|
||||
const wchar_t* message = System::getMessage(mMessageId);
|
||||
const wchar_t* blockCountMarker = wcsstr(message, L"***\n");
|
||||
wchar_t* format = new (System::getMem2App(), -32) wchar_t[0x400];
|
||||
wchar_t* dialogMessage = new (System::getMem2App(), -32) wchar_t[0x400];
|
||||
|
||||
if (blockCountMarker != NULL && message != NULL) {
|
||||
format[0] = L'\0';
|
||||
wcsncat(format, message, static_cast<u32>(blockCountMarker - message) >> 1);
|
||||
wcscat(format, L"%d");
|
||||
wcscat(format, blockCountMarker + 4);
|
||||
|
||||
s32 blocks = mNandTitleRange.mByteSize / 0x20000;
|
||||
if (mNandTitleRange.mByteSize % 0x20000 != 0) {
|
||||
blocks++;
|
||||
}
|
||||
|
||||
swprintf(dialogMessage, 0x3ff, format, blocks);
|
||||
}
|
||||
|
||||
System::getDialog()->callBtn2NoShade(dialogMessage, 0xC8, 0xA5, false);
|
||||
mDialogState = 22;
|
||||
|
||||
delete[] format;
|
||||
delete[] dialogMessage;
|
||||
}
|
||||
|
||||
bool SDMemory::onDialogState22() {
|
||||
DialogWindow* dialog = System::getDialog();
|
||||
if (dialog->getStateForSDMemory() == 3 && dialog->getResultForSDMemory() == 1) {
|
||||
mpProgressLayout->getAnim(1)->initAnmFrame();
|
||||
mpProgressLayout->getAnim(1)->play();
|
||||
mTransferFlags[1] = 0;
|
||||
}
|
||||
|
||||
if (System::getDialog()->getLastResult() != -1) {
|
||||
if (System::getDialog()->getLastResult() == 1) {
|
||||
mErrorCode = 4;
|
||||
mDialogState = 25;
|
||||
return true;
|
||||
}
|
||||
|
||||
mpMainLayout->getAnim(0)->initAnmFrame();
|
||||
mpMainLayout->getAnim(0)->play();
|
||||
snd::getSystem()->startSE("WIPL_SE_CANCEL");
|
||||
mDialogState = 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void SDMemory::onDialogState23() {
|
||||
switch (mMessageId) {
|
||||
case 0xBF:
|
||||
case 0xB5:
|
||||
System::getDialog()->callBtn1NoShade(mMessageId, 0xA5);
|
||||
break;
|
||||
default:
|
||||
System::getDialog()->callBtn1NoShade(mMessageId, 0x2E);
|
||||
break;
|
||||
}
|
||||
|
||||
mDialogState = 24;
|
||||
}
|
||||
|
||||
bool SDMemory::onDialogState24() {
|
||||
if (System::getDialog()->getStateForSDMemory() == 3) {
|
||||
mpProgressLayout->getAnim(1)->initAnmFrame();
|
||||
mpProgressLayout->getAnim(1)->play();
|
||||
mTransferFlags[1] = 0;
|
||||
}
|
||||
|
||||
if (System::getDialog()->getLastResult() != -1) {
|
||||
mTransferFlags[0] = 1;
|
||||
System::getHomeButtonMenu()->enable();
|
||||
mDialogState = 25;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 SDMemory::getControlPaneIndex(const char* paneName) {
|
||||
s32 paneIndex = -1;
|
||||
for (s32 i = 0; i < 3; i++) {
|
||||
if (strcmp(paneName, sControlPaneNames[i]) == 0) {
|
||||
paneIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return paneIndex;
|
||||
}
|
||||
|
||||
void writeFourFlagBytes(u8* flags, u8 first, u8 second, u8 third, u8 fourth) {
|
||||
flags[0] = first;
|
||||
flags[1] = second;
|
||||
flags[2] = third;
|
||||
flags[3] = fourth;
|
||||
}
|
||||
}
|
||||
}
|
||||
1708
src/scene/sdChannelSelect/iplSDChannelSelect.cpp
Normal file
1708
src/scene/sdChannelSelect/iplSDChannelSelect.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,9 @@
|
||||
|
||||
#define IPL_CONTROLLER_NATIVE_HIERARCHY
|
||||
#define IPL_CONTROLLER_INLINE_INTERFACE
|
||||
#define IPL_CONTROLLER_OUT_OF_LINE_INTERFACE
|
||||
#include "system/iplController.h"
|
||||
#undef IPL_CONTROLLER_OUT_OF_LINE_INTERFACE
|
||||
#undef IPL_CONTROLLER_INLINE_INTERFACE
|
||||
#undef IPL_CONTROLLER_NATIVE_HIERARCHY
|
||||
#include "system/iplSystem.h"
|
||||
@@ -91,6 +93,21 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
}
|
||||
bool ipl::controller::Interface::isValidBtn() const {
|
||||
return false;
|
||||
}
|
||||
bool ipl::controller::Interface::downTrg(u32 button) const {
|
||||
return false;
|
||||
}
|
||||
int ipl::controller::Interface::pinch() const {
|
||||
return 0;
|
||||
}
|
||||
bool ipl::controller::Interface::down(u32 button) const {
|
||||
return false;
|
||||
}
|
||||
KPADStatus* ipl::controller::Interface::getKPADStatus() const {
|
||||
return NULL;
|
||||
}
|
||||
int ipl::controller::Base::decide() const {
|
||||
return unk_0x08 == 5;
|
||||
}
|
||||
@@ -325,9 +342,15 @@ namespace ipl {
|
||||
bool ipl::controller::Master::upTrg(u32 button) const {
|
||||
return call(button, kUpTrgMember);
|
||||
}
|
||||
bool ipl::controller::Interface::upTrg(u32 button) const {
|
||||
return false;
|
||||
}
|
||||
bool ipl::controller::Master::repeat(u32 button) const {
|
||||
return call(button, kRepeatMember);
|
||||
}
|
||||
bool ipl::controller::Interface::repeat(u32 button) const {
|
||||
return false;
|
||||
}
|
||||
int ipl::controller::Master::decide() const {
|
||||
bool current = false;
|
||||
bool ret = false;
|
||||
@@ -365,6 +388,71 @@ void ipl::controller::Master::setForceInvalid(bool flag) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
void ipl::controller::Interface::read() {}
|
||||
int ipl::controller::Interface::getSubStickY() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getSubStickX() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getMainStickY() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getMainStickX() const {
|
||||
return 0;
|
||||
}
|
||||
bool ipl::controller::Interface::isValidDpd() const {
|
||||
return false;
|
||||
}
|
||||
PADStatus* ipl::controller::Interface::getPADStatus() const {
|
||||
return NULL;
|
||||
}
|
||||
f32 ipl::controller::Interface::getDpdDistance() const {
|
||||
return 0.0f;
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Interface::getHorizon() const {
|
||||
return ipl::math::VEC2(0.0f, 0.0f);
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Interface::getDpdProjectionPos() const {
|
||||
return ipl::math::VEC2(0.0f, 0.0f);
|
||||
}
|
||||
ipl::math::VEC2 ipl::controller::Interface::getDpdPos() const {
|
||||
return ipl::math::VEC2(0.0f, 0.0f);
|
||||
}
|
||||
int ipl::controller::Interface::getClassicReleaseFlag() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getClassicTrigFlag() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getClassicHoldFlag() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getReleaseFlag() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getTrigFlag() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getHoldFlag() const {
|
||||
return 0;
|
||||
}
|
||||
void ipl::controller::Interface::cancelRumbling() {}
|
||||
BOOL ipl::controller::Interface::rumble(int type) {
|
||||
return FALSE;
|
||||
}
|
||||
int ipl::controller::Interface::pinchOffTrg() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::pinchTrg() const {
|
||||
return 0;
|
||||
}
|
||||
int ipl::controller::Interface::getChannel() const {
|
||||
return -1;
|
||||
}
|
||||
int ipl::controller::Interface::getType() const {
|
||||
return -1;
|
||||
}
|
||||
void ipl::controller::Base::setForceInvalid(bool flag) {
|
||||
unk_0x1C = flag;
|
||||
}
|
||||
|
||||
@@ -98,11 +98,7 @@ namespace ipl {
|
||||
probe_valid:
|
||||
{
|
||||
s32 read = KPADRead(chan, &mKPADStatus[chan], 1);
|
||||
if (read > 0) {
|
||||
if (mKPADStatus[chan].wpad_err == -4 || deviceType == 0xfd) {
|
||||
goto store_null;
|
||||
}
|
||||
|
||||
if (read > 0 && mKPADStatus[chan].wpad_err != -4 && deviceType != 0xfd) {
|
||||
mInvalidCount[chan] = 0;
|
||||
if (mKPADStatus[chan].wpad_err == -7 || deviceType == 0 || deviceType == 0xfb ||
|
||||
deviceType == 0xfc || deviceType == 0xff) {
|
||||
@@ -120,7 +116,10 @@ namespace ipl {
|
||||
} else {
|
||||
mControllers[chan] = NULL;
|
||||
}
|
||||
} else if (read == 0) {
|
||||
} else {
|
||||
if (read != 0) {
|
||||
goto store_null;
|
||||
}
|
||||
mInvalidCount[chan]++;
|
||||
if (mInvalidCount[chan] > 0x3c) {
|
||||
mInvalidCount[chan] = 0x3c;
|
||||
@@ -129,8 +128,6 @@ namespace ipl {
|
||||
}
|
||||
mControllers[chan] = NULL;
|
||||
}
|
||||
} else {
|
||||
goto store_null;
|
||||
}
|
||||
}
|
||||
goto channel_done;
|
||||
|
||||
Reference in New Issue
Block a user