Compare commits
26 Commits
cleanup/ru
...
cleanup/sd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d533bf988a | ||
|
|
f533c9f0f5 | ||
|
|
1366528dd6 | ||
|
|
bd27e72a48 | ||
|
|
08c53bbe23 | ||
|
|
483005a940 | ||
|
|
b18d01602a | ||
|
|
e38a4cebfe | ||
|
|
81dc9d2b3d | ||
|
|
f645518810 | ||
|
|
51713e735e | ||
|
|
ca998ad7cf | ||
|
|
486c20c623 | ||
|
|
6adb0dc52e | ||
|
|
c9f64372cf | ||
|
|
9f4a70db74 | ||
|
|
e305e6047c | ||
|
|
df48bc9f76 | ||
|
|
3bd814f042 | ||
|
|
51b78ed7da | ||
|
|
3eb5d8faee | ||
|
|
d99950fc88 | ||
|
|
98d03059bd | ||
|
|
830e2f3920 | ||
|
|
c1b00d8a14 | ||
|
|
9acdd7f8dc |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.38% | 87.96% | 62.33% | 92.07% |
|
||||
| 99.38% | 88.00% | 62.37% | 92.07% |
|
||||
|
||||
units 919/1027 complete, functions 12224/12563 matched.
|
||||
units 920/1027 complete, functions 12226/12563 matched.
|
||||
|
||||
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
|
||||
<!-- progress:end -->
|
||||
|
||||
@@ -29,8 +29,8 @@ force_active:
|
||||
- strspn
|
||||
- strcspn
|
||||
- padding__Q23ipl5scene
|
||||
- lbl_81695063
|
||||
- lbl_81695067
|
||||
- scRsnOuiPad
|
||||
- scWpaOuiPad
|
||||
- __vt__Q49textinput6extend4memo19NigaoeEventObserver
|
||||
|
||||
# textinput::toolbar::csPaneToAnimation points one past the end of csAninationFile.
|
||||
|
||||
@@ -81,8 +81,8 @@ usbapStack = .bss:0x810BC460; // type:object size:0x1000
|
||||
usbapMessageQ = .bss:0x810BD460; // type:object size:0x20
|
||||
usbapNickname = .bss:0x810BD480; // type:object size:0x18
|
||||
m_allocator__Q23ipl5scene = .bss:0x810BD498; // type:object size:0x10
|
||||
AOSS_810BD4A8 = .bss:0x810BD4A8; // type:object size:0x160 data:byte
|
||||
AOSS_810BD608 = .bss:0x810BD608; // type:object size:0x7C8 data:4byte
|
||||
AOSSi_NcdIfConfig = .bss:0x810BD4A8; // type:object size:0x160 data:byte
|
||||
AOSSi_NcdIpConfig = .bss:0x810BD608; // type:object size:0x7C8 data:4byte
|
||||
RakuRakuThread_810BDDD0 = .bss:0x810BDDD0; // type:object size:0x10
|
||||
RakuRakuThread_810BDDE0 = .bss:0x810BDDE0; // type:object size:0xF4 data:4byte
|
||||
RakuRakuThread_810BDED4 = .bss:0x810BDED4; // type:object size:0x24
|
||||
@@ -4290,7 +4290,7 @@ __dt__Q43ipl5scene10MemoryBase9AnmButtonFv = .text:0x813CCF34; // type:function
|
||||
__dt__Q43ipl5scene10MemoryBase6ButtonFv = .text:0x813CCF74; // type:function size:0x40
|
||||
__dt__Q43ipl5scene10MemoryBase3AnmFv = .text:0x813CCFB4; // type:function size:0x40
|
||||
__dt__Q33ipl5scene15MemoryBaseEventFv = .text:0x813CCFF4; // type:function size:0x40
|
||||
iplMemoryCardManager_813CD034 = .text:0x813CD034; // type:function size:0x78
|
||||
compareMemoryCardSortEntries = .text:0x813CD034; // type:function size:0x78
|
||||
calc__Q33ipl5scene17MemoryCardManagerFv = .text:0x813CD0AC; // type:function size:0x4C
|
||||
isSlotReady__Q33ipl5scene17MemoryCardManagerFUc = .text:0x813CD0F8; // type:function size:0x44
|
||||
isSlotNoCard__Q33ipl5scene17MemoryCardManagerFUc = .text:0x813CD13C; // type:function size:0x40
|
||||
@@ -4399,31 +4399,31 @@ getCardSlotState__Q23ipl10memorycardFv = .text:0x813D2024; // type:function size
|
||||
getCardLastSrcSlot__Q23ipl10memorycardFv = .text:0x813D202C; // type:function size:0x10
|
||||
getCardLastSendCmd__Q23ipl10memorycardFv = .text:0x813D203C; // type:function size:0x10
|
||||
getCardLastCMDFCmdResult__Q23ipl10memorycardFv = .text:0x813D204C; // type:function size:0x10
|
||||
CardSequence_813D205C = .text:0x813D205C; // type:function size:0x44
|
||||
sendCardUnmountCmd = .text:0x813D205C; // type:function size:0x44
|
||||
sendCardFormatCmd__Q23ipl10memorycardFUc = .text:0x813D20A0; // type:function size:0x50
|
||||
sendCardCopyCmd__Q23ipl10memorycardFUcs = .text:0x813D20F0; // type:function size:0x54
|
||||
sendCardMoveCmd__Q23ipl10memorycardFUcs = .text:0x813D2144; // type:function size:0x54
|
||||
sendCardDeleteCmd__Q23ipl10memorycardFUcs = .text:0x813D2198; // type:function size:0x54
|
||||
sendCardThreadStopCmd__Q23ipl10memorycardFv = .text:0x813D21EC; // type:function size:0x40
|
||||
CardSequence_813D222C = .text:0x813D222C; // type:function size:0x110
|
||||
CardSequence_813D233C = .text:0x813D233C; // type:function size:0x9C
|
||||
pollCardSlot = .text:0x813D222C; // type:function size:0x110
|
||||
mapCardErrorCode = .text:0x813D233C; // type:function size:0x9C
|
||||
probeCard__Q23ipl10memorycardFv = .text:0x813D23D8; // type:function size:0x288
|
||||
initCardThread__Q23ipl10memorycardFv = .text:0x813D2660; // type:function size:0x29C
|
||||
shutdownCardThread__Q23ipl10memorycardFv = .text:0x813D28FC; // type:function size:0x148
|
||||
getIconStateArray__Q23ipl10memorycardFv = .text:0x813D2A44; // type:function size:0x10
|
||||
getIconComment__Q23ipl10memorycardFUcs = .text:0x813D2A54; // type:function size:0x20
|
||||
CardSequence_813D2A74 = .text:0x813D2A74; // type:function size:0xCC
|
||||
CardSequence_813D2B40 = .text:0x813D2B40; // type:function size:0x14C
|
||||
CardSequence_813D2C8C = .text:0x813D2C8C; // type:function size:0x4B4
|
||||
CardSequence_813D3140 = .text:0x813D3140; // type:function size:0xCC
|
||||
CardSequence_813D320C = .text:0x813D320C; // type:function size:0x9C
|
||||
CardSequence_813D32A8 = .text:0x813D32A8; // type:function size:0xD8
|
||||
CardSequence_813D3380 = .text:0x813D3380; // type:function size:0x58
|
||||
CardSequence_813D33D8 = .text:0x813D33D8; // type:function size:0x4C
|
||||
CardSequence_813D3424 = .text:0x813D3424; // type:function size:0x800
|
||||
CardSequence_813D3C24 = .text:0x813D3C24; // type:function size:0x14
|
||||
CardSequence_813D3C38 = .text:0x813D3C38; // type:function size:0xDC
|
||||
CardSequence_813D3D14 = .text:0x813D3D14; // type:function size:0x980
|
||||
clearCardFileEntry = .text:0x813D2A74; // type:function size:0xCC
|
||||
refreshCardSlotInfo = .text:0x813D2B40; // type:function size:0x14C
|
||||
cardThreadMain = .text:0x813D2C8C; // type:function size:0x4B4
|
||||
markAllCardFilesDirty = .text:0x813D3140; // type:function size:0xCC
|
||||
handleCardMountResult = .text:0x813D320C; // type:function size:0x9C
|
||||
reportCardThreadError = .text:0x813D32A8; // type:function size:0xD8
|
||||
sendCardSlotState = .text:0x813D3380; // type:function size:0x58
|
||||
clearAllCardFileEntries = .text:0x813D33D8; // type:function size:0x4C
|
||||
loadCardFileIcons = .text:0x813D3424; // type:function size:0x800
|
||||
clearCardWritePending = .text:0x813D3C24; // type:function size:0x14
|
||||
checkCardFileDuplicate = .text:0x813D3C38; // type:function size:0xDC
|
||||
runCardMoveOrCopy = .text:0x813D3D14; // type:function size:0x980
|
||||
IPLContestInitialize = .text:0x813D4694; // type:function size:0xBC
|
||||
IPLContestStart = .text:0x813D4750; // type:function size:0x14
|
||||
IPLContestProcess = .text:0x813D4764; // type:function size:0x6E8
|
||||
@@ -4866,7 +4866,7 @@ onDialogState9__Q33ipl5scene8SDMemoryFv = .text:0x813EDF04; // type:function siz
|
||||
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_containsTitleId = .text:0x813EE358; // type:function size:0x44
|
||||
onDialogState13__Q33ipl5scene8SDMemoryFv = .text:0x813EE39C; // type:function size:0xEC
|
||||
onDialogState14__Q33ipl5scene8SDMemoryFv = .text:0x813EE488; // type:function size:0x1C4
|
||||
onDialogState15__Q33ipl5scene8SDMemoryFv = .text:0x813EE64C; // type:function size:0x12C
|
||||
@@ -5133,11 +5133,11 @@ cancel__Q33ipl5scene10AOSSThreadFv = .text:0x813FCE20; // type:function size:0x5
|
||||
finish__Q33ipl5scene10AOSSThreadFP13NCDAossConfigPi = .text:0x813FCE70; // type:function size:0x2FC
|
||||
printInfo__Q33ipl5scene10AOSSThreadFv = .text:0x813FD16C; // type:function size:0x4
|
||||
AOSSi_Cancel = .text:0x813FD170; // type:function size:0xC
|
||||
AOSS_813FD17C = .text:0x813FD17C; // type:function size:0x10
|
||||
AOSS_813FD18C = .text:0x813FD18C; // type:function size:0x88
|
||||
AOSSi_SleepAlarmHandler = .text:0x813FD17C; // type:function size:0x10
|
||||
AOSSi_SleepMs = .text:0x813FD18C; // type:function size:0x88
|
||||
AOSSi_Alloc = .text:0x813FD214; // type:function size:0x24
|
||||
AOSSi_Free = .text:0x813FD238; // type:function size:0x24
|
||||
AOSS_813FD25C = .text:0x813FD25C; // type:function size:0x2C
|
||||
AOSSi_StoreIpv4Octets = .text:0x813FD25C; // type:function size:0x2C
|
||||
AOSSi_SetNCDIPAddr = .text:0x813FD288; // type:function size:0x7C
|
||||
AOSSi_InitLocal = .text:0x813FD304; // type:function size:0x68
|
||||
AOSSi_EndLocal = .text:0x813FD36C; // type:function size:0x34
|
||||
@@ -5168,7 +5168,7 @@ AOSS_814001B4 = .text:0x814001B4; // type:function size:0x13C
|
||||
AOSS_814002F0 = .text:0x814002F0; // type:function size:0x1E0
|
||||
AOSS_814004D0 = .text:0x814004D0; // type:function size:0x1D4
|
||||
AOSS_814006A4 = .text:0x814006A4; // type:function size:0x18C
|
||||
AOSS_81400830 = .text:0x81400830; // type:function size:0x504
|
||||
AOSSDecryptMessage = .text:0x81400830; // type:function size:0x504
|
||||
AOSS_81400D34 = .text:0x81400D34; // type:function size:0xD8
|
||||
AOSS_81400E0C = .text:0x81400E0C; // type:function size:0x2F8
|
||||
AOSS_81401104 = .text:0x81401104; // type:function size:0x180
|
||||
@@ -5176,11 +5176,11 @@ AOSS_81401284 = .text:0x81401284; // type:function size:0x128
|
||||
AOSS_814013AC = .text:0x814013AC; // type:function size:0x1C8
|
||||
AOSS_81401574 = .text:0x81401574; // type:function size:0x204
|
||||
AOSS_81401778 = .text:0x81401778; // type:function size:0x444
|
||||
AOSS_81401BBC = .text:0x81401BBC; // type:function size:0xE0
|
||||
AOSS_81401C9C = .text:0x81401C9C; // type:function size:0x124
|
||||
AOSS_81401DC0 = .text:0x81401DC0; // type:function size:0xC0
|
||||
AOSS_81401E80 = .text:0x81401E80; // type:function size:0x24C
|
||||
AOSS_814020CC = .text:0x814020CC; // type:function size:0xF0
|
||||
AOSSBuildInterfaceOption = .text:0x81401BBC; // type:function size:0xE0
|
||||
AOSSInitKeySchedule = .text:0x81401C9C; // type:function size:0x124
|
||||
AOSSInitCrc32Table = .text:0x81401DC0; // type:function size:0xC0
|
||||
AOSSXorBufferWithKey = .text:0x81401E80; // type:function size:0x24C
|
||||
AOSSConnectAndAwaitHost = .text:0x814020CC; // type:function size:0xF0
|
||||
ATERM_814021BC = .text:0x814021BC; // type:function size:0x268
|
||||
ATERM_81402424 = .text:0x81402424; // type:function size:0x348
|
||||
ATERM_8140276C = .text:0x8140276C; // type:function size:0x2B8
|
||||
@@ -6670,19 +6670,19 @@ CHANSVmStrCpyToU16FromU8 = .text:0x8144B058; // type:function size:0x34
|
||||
CHANSVmStrCpyToU8FromU16 = .text:0x8144B08C; // type:function size:0x44
|
||||
CHANSVmStrCpyToU8FromStringObject = .text:0x8144B0D0; // type:function size:0xB4
|
||||
VmIsNan = .text:0x8144B184; // type:function size:0x54 scope:local
|
||||
CHANSVm_8144B1D8 = .text:0x8144B1D8; // type:function size:0x20 scope:local
|
||||
CHANSVmFloatSign = .text:0x8144B1D8; // type:function size:0x20 scope:local
|
||||
VmIntToFloat = .text:0x8144B1F8; // type:function size:0x50 scope:local
|
||||
CHANSVmParseInt = .text:0x8144B248; // type:function size:0xC4 scope:local
|
||||
CHANSVm_8144B30C = .text:0x8144B30C; // type:function size:0xAC scope:local
|
||||
CHANSVmConvertToIntFromFloat = .text:0x8144B30C; // type:function size:0xAC scope:local
|
||||
CHANSVmConvertToIntFromStr = .text:0x8144B3B8; // type:function size:0x70
|
||||
CHANSVmConvertToIntFromArray = .text:0x8144B428; // type:function size:0x8
|
||||
CHANSVm_8144B430 = .text:0x8144B430; // type:function size:0x40
|
||||
CHANSVm_8144B470 = .text:0x8144B470; // type:function size:0x64
|
||||
CHANSVm_8144B4D4 = .text:0x8144B4D4; // type:function size:0x14C
|
||||
CHANSVmConvertToFloatFromUndefined = .text:0x8144B430; // type:function size:0x40
|
||||
CHANSVmConvertToFloatFromInt = .text:0x8144B470; // type:function size:0x64
|
||||
CHANSVmConvertToFloatFromStr = .text:0x8144B4D4; // type:function size:0x14C
|
||||
CHANSVmConvertToStrFromUndefined = .text:0x8144B620; // type:function size:0xC
|
||||
CHANSVm_8144B62C = .text:0x8144B62C; // type:function size:0x58 scope:local
|
||||
CHANSVmFloatToWString = .text:0x8144B62C; // type:function size:0x58 scope:local
|
||||
CHANSVmConvertToStrFromInt = .text:0x8144B684; // type:function size:0xB0
|
||||
CHANSVm_8144B734 = .text:0x8144B734; // type:function size:0xDC
|
||||
CHANSVmConvertToStrFromFloat = .text:0x8144B734; // type:function size:0xDC
|
||||
CHANSVmConvertToStrFromArray = .text:0x8144B810; // type:function size:0x10
|
||||
CHANSVmConvertObjectTypeError = .text:0x8144B820; // type:function size:0x50
|
||||
CHANSVmGetEnumedType = .text:0x8144B870; // type:function size:0x6C scope:local
|
||||
@@ -6804,14 +6804,14 @@ VmStringSplice = .text:0x8144FDD8; // type:function size:0x1E4
|
||||
VmStringSplit = .text:0x8144FFBC; // type:function size:0x378
|
||||
VmStringToLowerCase = .text:0x81450334; // type:function size:0xB4
|
||||
VmStringToUpperCase = .text:0x814503E8; // type:function size:0xB4
|
||||
CHANSVm_8145049C = .text:0x8145049C; // type:function size:0x6BC
|
||||
CHANSVmFormatString = .text:0x8145049C; // type:function size:0x6BC
|
||||
VmStringFormat = .text:0x81450B58; // type:function size:0x4C
|
||||
VmGetStrFromObjHdr = .text:0x81450BA4; // type:function size:0x24
|
||||
VmGetIntFromObjHdr = .text:0x81450BC8; // type:function size:0x24
|
||||
VmBlobInitValue = .text:0x81450BEC; // type:function size:0x20 scope:local
|
||||
VmBlobCreateDirect = .text:0x81450C0C; // type:function size:0xAC scope:local
|
||||
VmBlobGetDataBufferDirect = .text:0x81450CB8; // type:function size:0x5C scope:local
|
||||
CHANSVm_81450D14 = .text:0x81450D14; // type:function size:0xB8
|
||||
CHANSVmBlobResolveOffset = .text:0x81450D14; // type:function size:0xB8
|
||||
VmBlobCtor = .text:0x81450DCC; // type:function size:0xA8 scope:local
|
||||
VmBlobDtor = .text:0x81450E74; // type:function size:0x28 scope:local
|
||||
VmBlobGetOffset = .text:0x81450E9C; // type:function size:0x68
|
||||
@@ -6820,8 +6820,8 @@ VmBlobSkip = .text:0x81450FC8; // type:function size:0xF0
|
||||
VmBlobGetLength = .text:0x814510B8; // type:function size:0x68
|
||||
VmBlobSetLength = .text:0x81451120; // type:function size:0xF8
|
||||
VmBlobFill = .text:0x81451218; // type:function size:0xFC
|
||||
CHANSVm_81451314 = .text:0x81451314; // type:function size:0x34
|
||||
CHANSVm_81451348 = .text:0x81451348; // type:function size:0x50
|
||||
CHANSVmBlobGetCount = .text:0x81451314; // type:function size:0x34
|
||||
CHANSVmBlobHasSpace = .text:0x81451348; // type:function size:0x50
|
||||
VmBlobGetString = .text:0x81451398; // type:function size:0xC8
|
||||
VmBlobSetString = .text:0x81451460; // type:function size:0x12C
|
||||
VmBlobGetWString = .text:0x8145158C; // type:function size:0xE0
|
||||
@@ -6857,7 +6857,7 @@ VmBlobSetS32 = .text:0x814532E4; // type:function size:0xD8
|
||||
VmBlobSetS64 = .text:0x814533BC; // type:function size:0xE4
|
||||
vmBlobParsePackFormatString = .text:0x814534A0; // type:function size:0x1D0
|
||||
VmBlobPackCommon = .text:0x81453670; // type:function size:0xA70 scope:local
|
||||
CHANSVm_814540E0 = .text:0x814540E0; // type:function size:0x6C
|
||||
CHANSVmMakeU64 = .text:0x814540E0; // type:function size:0x6C
|
||||
VmBlobCreate = .text:0x8145414C; // type:function size:0x8
|
||||
VmBlobPack = .text:0x81454154; // type:function size:0x8
|
||||
VmBlobUnpack = .text:0x8145415C; // type:function size:0x814
|
||||
@@ -6875,7 +6875,7 @@ CHANSVmGetFreeExeSize = .text:0x81455198; // type:function size:0x28
|
||||
CHANSVmAddExe = .text:0x814551C0; // type:function size:0x3F8
|
||||
VmOffsU32ToPtr = .text:0x814555B8; // type:function size:0x18 scope:local
|
||||
CHANSConvertModuleOfsToPtr = .text:0x814555D0; // type:function size:0x84
|
||||
CHANSVm_81455654 = .text:0x81455654; // type:function size:0x8C
|
||||
CHANSVmLookupScopedObject = .text:0x81455654; // type:function size:0x8C
|
||||
VmPushFuncReturnInfo = .text:0x814556E0; // type:function size:0x1AC scope:local
|
||||
VmReturnWithValue = .text:0x8145588C; // type:function size:0x1D4 scope:local
|
||||
CHANSVmLinkModules = .text:0x81455A60; // type:function size:0x2F4
|
||||
@@ -14198,7 +14198,7 @@ ca_ppki = .rodata:0x8162DBB8; // type:object size:0x400 noreloc
|
||||
ms_dpki = .rodata:0x8162DFB8; // type:object size:0x240 noreloc
|
||||
ms_ppki = .rodata:0x8162E1F8; // type:object size:0x240 noreloc
|
||||
@1272 = .rodata:0x8162E438; // type:object size:0x278 scope:local data:4byte
|
||||
pf_valid_fn_char = .rodata:0x8162E6B0; // type:object size:0x60 scope:local noreloc
|
||||
pf_valid_fn_char = .rodata:0x8162E6B0; // type:object size:0x60 noreloc
|
||||
fat_special_values = .rodata:0x8162E710; // type:object size:0x3C
|
||||
cp932_to_unicode = .rodata:0x8162E750; // type:object size:0x4272 data:2byte
|
||||
fa_nand_func = .rodata:0x816329C8; // type:object size:0x20
|
||||
@@ -20244,10 +20244,10 @@ lbl_81694654 = .sdata2:0x81694654; // type:object size:0x4 align:4 data:float
|
||||
@10044 = .sdata2:0x8169469C; // type:object size:0x4 scope:local align:4 data:float
|
||||
lbl_816946A0 = .sdata2:0x816946A0; // type:object size:0x4 align:4 data:float
|
||||
scSoundZeroF = .sdata2:0x816946A4; // type:object size:0x4 align:4 data:float
|
||||
lbl_816946A8 = .sdata2:0x816946A8; // type:object size:0x4 align:4 data:float
|
||||
lbl_816946AC = .sdata2:0x816946AC; // type:object size:0x4 align:4 data:float
|
||||
lbl_816946B0 = .sdata2:0x816946B0; // type:object size:0x4 align:4 data:float
|
||||
lbl_816946B4 = .sdata2:0x816946B4; // type:object size:0x4 align:4 data:float
|
||||
scSoundTwoF = .sdata2:0x816946A8; // type:object size:0x4 align:4 data:float
|
||||
scSoundOneF = .sdata2:0x816946AC; // type:object size:0x4 align:4 data:float
|
||||
scSoundThirtyF = .sdata2:0x816946B0; // type:object size:0x4 align:4 data:float
|
||||
scSoundSixtyF = .sdata2:0x816946B4; // type:object size:0x4 align:4 data:float
|
||||
lbl_816946B8 = .sdata2:0x816946B8; // type:object size:0x8 align:8 data:double
|
||||
lbl_816946C0 = .sdata2:0x816946C0; // type:object size:0x8 align:8 data:double
|
||||
lbl_816946C8 = .sdata2:0x816946C8; // type:object size:0x8 align:8 data:double
|
||||
@@ -23750,7 +23750,7 @@ flushFlag3in1 = .sbss:0x816991CC; // type:object size:0x4 scope:local data:4byte
|
||||
flushFlag = .sbss:0x816991D0; // type:object size:0x4 scope:local data:4byte
|
||||
retraceCount = .sbss:0x816991D4; // type:object size:0x4 scope:local data:4byte
|
||||
__i2c_ident_first = .sbss:0x816991D8; // type:object size:0x4 scope:local data:4byte
|
||||
Vdac_Flag_Changed = .sbss:0x816991E0; // type:object size:0x4 scope:local data:4byte
|
||||
Vdac_Flag_Changed = .sbss:0x816991E0; // type:object size:0x4 data:4byte
|
||||
__level = .sbss:0x816991E4; // type:object size:0x4 scope:local data:4byte
|
||||
__gamma = .sbss:0x816991E8; // type:object size:0x4 scope:local data:4byte
|
||||
__type = .sbss:0x816991EC; // type:object size:0x4 scope:local data:4byte
|
||||
@@ -24048,7 +24048,7 @@ g_detach_func = .sbss:0x8169970C; // type:object size:0x4 scope:local data:4byte
|
||||
st_uhs_msc_status = .sbss:0x81699710; // type:object size:0x4 scope:local data:4byte
|
||||
st_uhs_msc_msgid = .sbss:0x81699714; // type:object size:0x4 scope:local data:4byte
|
||||
st_uhs_msc_tskid = .sbss:0x81699718; // type:object size:0x4 scope:local data:4byte
|
||||
uhg_msc_memid = .sbss:0x8169971C; // type:object size:0x4 scope:local data:4byte
|
||||
uhg_msc_memid = .sbss:0x8169971C; // type:object size:0x4 data:4byte
|
||||
st_uhs_msc_blk_buf = .sbss:0x81699720; // type:object size:0x4 scope:local data:4byte
|
||||
__sdCardStatus = .sbss:0x81699728; // type:object size:0x4 scope:local data:4byte
|
||||
__sdReq = .sbss:0x8169972C; // type:object size:0x4 scope:local data:4byte
|
||||
|
||||
@@ -1063,7 +1063,7 @@ config.libs = [
|
||||
Object(NonMatching, "nhttp/NHTTP_socket_RVL.c"),
|
||||
Object(NonMatching, "nhttp/NHTTP_stdlib_RVL.c"),
|
||||
Object(NonMatching, "nhttp/NHTTP_thread.c"),
|
||||
Object(NonMatching, "nhttp/d_nhttp_private.c"),
|
||||
Object(Matching, "nhttp/d_nhttp_private.c"),
|
||||
Object(Matching, "nhttp/d_nhttp.c"),
|
||||
Object(Matching, "nhttp/d_nhttp_common.c"),
|
||||
]
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace ipl {
|
||||
WAIT_UNTIL_FADE_IN = 15
|
||||
};
|
||||
|
||||
TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const ipl::math::VEC3& unk2,
|
||||
f32 unk3 = 120.0f, f32 unk4 = 30.0f);
|
||||
TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const ipl::math::VEC3& initialPos,
|
||||
f32 margin16x9 = 120.0f, f32 margin4x3 = 30.0f);
|
||||
~TextBalloon();
|
||||
|
||||
void calc();
|
||||
@@ -31,7 +31,7 @@ namespace ipl {
|
||||
void fadeout();
|
||||
void fadeoutForce();
|
||||
|
||||
void setPos(const math::VEC3& pos, bool unk0, int unk1);
|
||||
void setPos(const math::VEC3& pos, bool use16x9X, int hAlign);
|
||||
void updatePos(const math::VEC3& pos);
|
||||
|
||||
void set_translate(const math::VEC3& trans);
|
||||
@@ -50,7 +50,7 @@ namespace ipl {
|
||||
|
||||
undefined4 unk_0x00;
|
||||
undefined4 unk_0x04;
|
||||
BOOL unk_0x08;
|
||||
BOOL mbWaitingFadeIn; // 0x08
|
||||
|
||||
layout::Object* mpLayout; // 0x0C
|
||||
|
||||
@@ -60,10 +60,10 @@ namespace ipl {
|
||||
|
||||
u32 mTextLen; // 0x18
|
||||
math::VEC3 mBalloonPos; // 0x1C
|
||||
undefined4 unk_0x28;
|
||||
undefined unk_0x2C;
|
||||
f32 unk_0x30;
|
||||
f32 unk_0x34;
|
||||
undefined4 mHAlign; // 0x28
|
||||
undefined mbUse16x9X; // 0x2C
|
||||
f32 mMargin16x9; // 0x30
|
||||
f32 mMargin4x3; // 0x34
|
||||
|
||||
int mWaitUntilFadeIn; // 0x38
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ typedef struct UHF_MSC_MESSAGE {
|
||||
} UHF_MSC_MESSAGE;
|
||||
|
||||
extern UHF_MSC_DEVICE uhg_msc_blk_device_tbl[8];
|
||||
extern s32 uhg_msc_memid_8169971C;
|
||||
extern s32 uhg_msc_memid;
|
||||
s32 uhf_ker_set_priority(s32 task_id, s32 priority);
|
||||
void* uhf_ker_get_memory_block(s32 pool, u32 size, u32 alignment);
|
||||
s32 uhf_ker_release_memory_block(s32 pool, void* block);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <private/fa/puh_msc.h>
|
||||
|
||||
s32 uhg_msc_memid_8169971C;
|
||||
s32 uhg_msc_memid;
|
||||
static s32 st_uhs_msc_tskid;
|
||||
static s32 st_uhs_msc_msgid;
|
||||
static s32 st_uhs_msc_status;
|
||||
@@ -47,13 +47,13 @@ static s32 _uhf_msc_api_send_message(UHF_MSC_PARAMETERS* parameters, u32 command
|
||||
s32 result = 0;
|
||||
s32 semaphore;
|
||||
UHF_MSC_MESSAGE* message;
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid_8169971C, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
if (message == NULL) {
|
||||
return -12;
|
||||
}
|
||||
semaphore = uhf_ker_create_sem(0, 0);
|
||||
if (semaphore <= 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
return -12;
|
||||
}
|
||||
message->command = command;
|
||||
@@ -61,7 +61,7 @@ static s32 _uhf_msc_api_send_message(UHF_MSC_PARAMETERS* parameters, u32 command
|
||||
message->result = &result;
|
||||
message->parameters = *parameters;
|
||||
if (uhf_ker_send_message(st_uhs_msc_msgid, message, 0) != 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
uhf_ker_delete_sem(semaphore);
|
||||
return -12;
|
||||
}
|
||||
|
||||
@@ -287,13 +287,13 @@ s32 _uhf_msc_blk_send_message(UHF_MSC_PARAMETERS* parameters, u32 command) {
|
||||
s32 semaphore;
|
||||
UHF_MSC_MESSAGE* message;
|
||||
s32 mailbox = uhf_msc_get_message_id();
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid_8169971C, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
if (message == NULL) {
|
||||
return -1;
|
||||
}
|
||||
semaphore = uhf_ker_create_sem(0, 0);
|
||||
if (semaphore <= 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
return -1;
|
||||
}
|
||||
message->command = command;
|
||||
@@ -301,7 +301,7 @@ s32 _uhf_msc_blk_send_message(UHF_MSC_PARAMETERS* parameters, u32 command) {
|
||||
message->result = &result;
|
||||
message->parameters = *parameters;
|
||||
if (uhf_ker_send_message(mailbox, message, 0) != 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
uhf_ker_delete_sem(semaphore);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <private/vf/PrFILE2/pf_types.h>
|
||||
|
||||
// clang-format off
|
||||
const pf_u8 pf_valid_fn_char_8162E6B0[96] = {
|
||||
const pf_u8 pf_valid_fn_char[96] = {
|
||||
1, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 1, 1, 3, 3, 0,
|
||||
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 1, 0, 1, 0, 0,
|
||||
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
|
||||
@@ -1282,11 +1282,13 @@ s32 PFFAT_GetSectorSpecified(PFFAT_FFD* file, u32 fileSectorIndex,
|
||||
|
||||
error = PFFAT_GetSector(file, fileSectorIndex, clusterIndex != 0, 0,
|
||||
sector);
|
||||
if (error != 0) {
|
||||
goto done;
|
||||
switch (error) {
|
||||
case 0:
|
||||
error = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
error = 0;
|
||||
done:
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ typedef struct PF_PATH_VOLUME_SET {
|
||||
} PF_PATH_VOLUME_SET;
|
||||
|
||||
extern PF_PATH_VOLUME_SET pf_vol_set;
|
||||
extern const pf_u8 pf_valid_fn_char_8162E6B0[96];
|
||||
extern const pf_u8 pf_valid_fn_char[96];
|
||||
extern void PFSTR_SetCodeMode(PF_STR*, pf_u32);
|
||||
extern pf_u32 PFSTR_GetCodeMode(PF_STR*);
|
||||
extern pf_s8* PFSTR_GetStrPos(PF_STR*, pf_u32);
|
||||
@@ -75,9 +75,9 @@ extern pf_u32 PFPATH_CheckExtShortNameSignature(PF_STR*);
|
||||
extern pf_u32 PFPATH_CheckExtShortName(PF_STR*, pf_u32, pf_bool);
|
||||
extern void PFCODE_Divide_Width(pf_s32, pf_s16*, pf_s16*);
|
||||
|
||||
#define VALID_PATH_CHAR(x, b) ((pf_u8)(x) >= 0x80 || ((pf_u8)(x) >= ' ' && (pf_valid_fn_char_8162E6B0[(pf_u8)(x) - ' '] & b)))
|
||||
#define VALID_PATH_CHAR(x, b) ((pf_u8)(x) >= 0x80 || ((pf_u8)(x) >= ' ' && (pf_valid_fn_char[(pf_u8)(x) - ' '] & b)))
|
||||
#define VALID_PATH_WCHAR(x, b) \
|
||||
((x) >= 0x80 || (pf_u8)(x) >= ' ' && ((pf_u8)(x) & 0xFF00) == 0 && (pf_valid_fn_char_8162E6B0[(pf_u8)((x & 0x00FF) - ' ')] & b))
|
||||
((x) >= 0x80 || (pf_u8)(x) >= ' ' && ((pf_u8)(x) & 0xFF00) == 0 && (pf_valid_fn_char[(pf_u8)((x & 0x00FF) - ' ')] & b))
|
||||
|
||||
pf_s32 PFPATH_DoSplitPath(PF_STR* p_path, PF_STR* p_dir_path, PF_STR* p_filename, pf_u32 wildcard) {
|
||||
pf_s8* p;
|
||||
|
||||
@@ -43,7 +43,7 @@ typedef struct __sdCbArg {
|
||||
SDCallbackFunc cb; // 0x00
|
||||
void* cbArg; // 0x04
|
||||
SDDev* dev; // 0x08
|
||||
u32 unk_0x0C;
|
||||
u32 cmd; // 0x0C
|
||||
u32 SDDevRca;
|
||||
u32* resp; // 0x14
|
||||
u8* SDSectorSize;
|
||||
@@ -70,7 +70,7 @@ ISD_Error ISD_GetCardSize(SDDev* dev, u32* outSize, u32* outSize2, u32* outSecto
|
||||
IOSError __sdCb(s32 result, void* arg) {
|
||||
__sdCbArg* data = (__sdCbArg*)arg;
|
||||
|
||||
switch (data->unk_0x0C) {
|
||||
switch (data->cmd) {
|
||||
case 4: {
|
||||
if (result != 0) {
|
||||
OSReport(__sdPathData, result);
|
||||
@@ -196,7 +196,7 @@ static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg,
|
||||
data->cb = cb;
|
||||
data->cbArg = cbArg;
|
||||
data->resp = resp;
|
||||
data->unk_0x0C = cmd;
|
||||
data->cmd = cmd;
|
||||
data->SDSectorSize = (u8*)sdCmd;
|
||||
|
||||
ret = IOS_IoctlvAsync(fd, 7, readCount, writeCount, __sdVect, __sdCb, data);
|
||||
@@ -243,7 +243,7 @@ static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg,
|
||||
data->cb = cb;
|
||||
data->cbArg = cbArg;
|
||||
data->resp = resp;
|
||||
data->unk_0x0C = cmd;
|
||||
data->cmd = cmd;
|
||||
data->SDDevRca = 1;
|
||||
data->SDSectorSize = (u8*)sdCmd;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
extern void SIRefreshSamplingRate(void);
|
||||
extern void VISetRGBModeImm(void);
|
||||
extern void __VISetRevolutionModeSimple(void);
|
||||
extern volatile u32 Vdac_Flag_Changed_816991E0;
|
||||
extern volatile u32 Vdac_Flag_Changed;
|
||||
extern void __VISetYUVSEL(u32 enable);
|
||||
extern void __VISetFilter4EURGB60(u32 enable);
|
||||
extern void __VISetCGMS(void);
|
||||
@@ -324,8 +324,8 @@ position_interrupt:
|
||||
}
|
||||
old_tvtype = currentTvType;
|
||||
if (flushFlag3in1 != 0) {
|
||||
while (Vdac_Flag_Changed_816991E0 != 0) {
|
||||
changeBit = 1U << (31 - __cntlzw(Vdac_Flag_Changed_816991E0));
|
||||
while (Vdac_Flag_Changed != 0) {
|
||||
changeBit = 1U << (31 - __cntlzw(Vdac_Flag_Changed));
|
||||
switch (changeBit) {
|
||||
case 1:
|
||||
__VISetCGMS();
|
||||
@@ -352,7 +352,7 @@ position_interrupt:
|
||||
__VISetRGBModeImm();
|
||||
break;
|
||||
}
|
||||
Vdac_Flag_Changed_816991E0 &= ~changeBit;
|
||||
Vdac_Flag_Changed &= ~changeBit;
|
||||
}
|
||||
flushFlag3in1 = 0;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ static s32 Vdac_Flag_Region;
|
||||
static s32 __type;
|
||||
static s32 __gamma;
|
||||
static s32 __level;
|
||||
volatile u32 Vdac_Flag_Changed_816991E0;
|
||||
volatile u32 Vdac_Flag_Changed;
|
||||
|
||||
static void __VISetCCSEL(u8 flag) {
|
||||
u8 data[2];
|
||||
@@ -339,7 +339,7 @@ void VISetCGMS(u8 wd0, u8 wd1, u8 wd2) {
|
||||
__wd0 = wd0;
|
||||
__wd1 = wd1;
|
||||
__wd2 = wd2;
|
||||
Vdac_Flag_Changed_816991E0 |= 1;
|
||||
Vdac_Flag_Changed |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ void VISetMacrovision(s32 type) {
|
||||
if ((__type != type) || (__tvType != tvFormat)) {
|
||||
__type = type;
|
||||
__tvType = tvFormat;
|
||||
Vdac_Flag_Changed_816991E0 |= 8;
|
||||
Vdac_Flag_Changed |= 8;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ void VISetTrapFilter(BOOL filter) {
|
||||
return;
|
||||
}
|
||||
__filter = filter;
|
||||
Vdac_Flag_Changed_816991E0 |= 0x20;
|
||||
Vdac_Flag_Changed |= 0x20;
|
||||
}
|
||||
|
||||
void __VISetRGBOverDrive(void) {
|
||||
@@ -468,7 +468,7 @@ void __VISetRGBOverDrive(void) {
|
||||
}
|
||||
|
||||
void VISetRGBModeImm(void) {
|
||||
Vdac_Flag_Changed_816991E0 |= 0x80;
|
||||
Vdac_Flag_Changed |= 0x80;
|
||||
}
|
||||
|
||||
void __VISetRGBModeImm(void) {
|
||||
@@ -520,34 +520,34 @@ void __VISetRevolutionMode(void) {
|
||||
__wd0 = 0;
|
||||
__wd1 = 0;
|
||||
__wd2 = 0;
|
||||
Vdac_Flag_Changed_816991E0 |= 1;
|
||||
Vdac_Flag_Changed |= 1;
|
||||
}
|
||||
if ((__gp1 != 0) || (__gp2 != 0) || (__gp3 != 0) || (__gp4 != 0)) {
|
||||
__gp1 = 0;
|
||||
__gp2 = 0;
|
||||
__gp3 = 0;
|
||||
__gp4 = 0;
|
||||
Vdac_Flag_Changed_816991E0 |= 2;
|
||||
Vdac_Flag_Changed |= 2;
|
||||
}
|
||||
if ((__cc1 != 0) || (__cc2 != 0) || (__cc3 != 0) || (__cc4 != 0)) {
|
||||
__cc1 = 0;
|
||||
__cc2 = 0;
|
||||
__cc3 = 0;
|
||||
__cc4 = 0;
|
||||
Vdac_Flag_Changed_816991E0 |= 4;
|
||||
Vdac_Flag_Changed |= 4;
|
||||
}
|
||||
VISetMacrovision(1);
|
||||
if (__filter != 0) {
|
||||
__filter = 0;
|
||||
Vdac_Flag_Changed_816991E0 |= 0x20;
|
||||
Vdac_Flag_Changed |= 0x20;
|
||||
}
|
||||
if (__level != 0) {
|
||||
__level = 0;
|
||||
Vdac_Flag_Changed_816991E0 |= 0x40;
|
||||
Vdac_Flag_Changed |= 0x40;
|
||||
}
|
||||
if (__gamma != 10) {
|
||||
__gamma = 10;
|
||||
Vdac_Flag_Changed_816991E0 |= 0x10;
|
||||
Vdac_Flag_Changed |= 0x10;
|
||||
}
|
||||
VIFlush();
|
||||
VIWaitForRetrace();
|
||||
@@ -588,7 +588,7 @@ void VISetWSS(u8 gp1, u8 gp2, u8 gp3, u8 gp4) {
|
||||
__gp2 = gp2;
|
||||
__gp3 = gp3;
|
||||
__gp4 = gp4;
|
||||
Vdac_Flag_Changed_816991E0 |= 2;
|
||||
Vdac_Flag_Changed |= 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -598,14 +598,14 @@ void VISetClosedCaption(u8 cc1, u8 cc2, u8 cc3, u8 cc4) {
|
||||
__cc2 = cc2;
|
||||
__cc3 = cc3;
|
||||
__cc4 = cc4;
|
||||
Vdac_Flag_Changed_816991E0 |= 4;
|
||||
Vdac_Flag_Changed |= 4;
|
||||
}
|
||||
}
|
||||
|
||||
void VISetRGBOverDrive(s32 level) {
|
||||
if (__level != level) {
|
||||
__level = level;
|
||||
Vdac_Flag_Changed_816991E0 |= 0x40;
|
||||
Vdac_Flag_Changed |= 0x40;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,22 +13,22 @@
|
||||
const u8 scRsnOui0 = 0;
|
||||
const u8 scRsnOui1 = 0x0F;
|
||||
const u8 scRsnOui2 = 0xAC;
|
||||
const u8 lbl_81695063 = 0;
|
||||
const u8 scRsnOuiPad = 0;
|
||||
const u8 scWpaOui0 = 0;
|
||||
const u8 scWpaOui1 = 0x50;
|
||||
const u8 scWpaOui2 = 0xF2;
|
||||
const u8 lbl_81695067 = 0;
|
||||
const u8 scWpaOuiPad = 0;
|
||||
#pragma pop
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
const u8 scWpaFindOui0 = 0;
|
||||
const u8 scWpaFindOui1 = 0x50;
|
||||
const u8 scWpaFindOui2 = 0xF2;
|
||||
const u8 lbl_81697D73 = 0;
|
||||
const u8 lbl_81697D74 = 0;
|
||||
const u8 lbl_81697D75 = 0;
|
||||
const u8 lbl_81697D76 = 0;
|
||||
const u8 lbl_81697D77 = 0;
|
||||
const u8 scWpaFindOuiPad0 = 0;
|
||||
const u8 scWpaFindOuiPad1 = 0;
|
||||
const u8 scWpaFindOuiPad2 = 0;
|
||||
const u8 scWpaFindOuiPad3 = 0;
|
||||
const u8 scWpaFindOuiPad4 = 0;
|
||||
#pragma pop
|
||||
|
||||
#define scRsnOui0 (*((volatile const u8*)&scRsnOui0))
|
||||
|
||||
@@ -604,7 +604,7 @@ vmBoolInt VmIsNan(vmFloat value) {
|
||||
return isnan(value) || value == VM_NAN;
|
||||
}
|
||||
|
||||
double CHANSVm_8144B1D8(double value) {
|
||||
double CHANSVmFloatSign(double value) {
|
||||
// Clamp to -1.0~1.0
|
||||
return value < 0.0 ? -1.0 : value > 0.0 ? 1.0 : value;
|
||||
}
|
||||
@@ -650,14 +650,14 @@ static s32 CHANSVmParseInt(CHANSVmObjHdr* obj, s32 base, u64* out) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
CHANSVmObjHdr* CHANSVm_8144B30C(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* object) {
|
||||
CHANSVmObjHdr* CHANSVmConvertToIntFromFloat(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* object) {
|
||||
// Convert to int from float
|
||||
CHANSVmObjHdr* newObj = CHANSVmNewObject(vm, vmFalse, vmNull, CHANS_VM_OBJ_TYPE_INTEGER, 0);
|
||||
if (newObj != vmNull) {
|
||||
if (VmIsNan(object->value.float_v)) {
|
||||
newObj->value.int_v = 0;
|
||||
} else {
|
||||
newObj->value.int_v = (u64)(CHANSVm_8144B1D8(object->value.float_v) * floor(fabs(object->value.float_v)));
|
||||
newObj->value.int_v = (u64)(CHANSVmFloatSign(object->value.float_v) * floor(fabs(object->value.float_v)));
|
||||
}
|
||||
}
|
||||
return newObj;
|
||||
@@ -675,7 +675,7 @@ CHANSVmObjHdr* CHANSVmConvertToIntFromArray(CHANSVm* vm, CHANSVmObjType type, CH
|
||||
return vmNull;
|
||||
}
|
||||
|
||||
CHANSVmObjHdr* CHANSVm_8144B430(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* object) {
|
||||
CHANSVmObjHdr* CHANSVmConvertToFloatFromUndefined(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* object) {
|
||||
CHANSVmObjHdr* result = CHANSVmNewObject(vm, vmFalse, vmNull, CHANS_VM_OBJ_TYPE_FLOAT, 0);
|
||||
if (result != vmNull) {
|
||||
result->value.float_v = VM_NAN;
|
||||
@@ -683,7 +683,7 @@ CHANSVmObjHdr* CHANSVm_8144B430(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr*
|
||||
return result;
|
||||
}
|
||||
|
||||
CHANSVmObjHdr* CHANSVm_8144B470(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* intObj) {
|
||||
CHANSVmObjHdr* CHANSVmConvertToFloatFromInt(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* intObj) {
|
||||
CHANSVmObjHdr* result = CHANSVmNewObject(vm, vmFalse, vmNull, CHANS_VM_OBJ_TYPE_FLOAT, 0);
|
||||
if (result != vmNull) {
|
||||
result->value.float_v = VmIntToFloat(intObj->value.int_v);
|
||||
@@ -771,7 +771,7 @@ static inline s32 CHANSVmParseFloat(CHANSVmObjHdr* obj, f64* out) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
CHANSVmObjHdr* CHANSVm_8144B4D4(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* object) {
|
||||
CHANSVmObjHdr* CHANSVmConvertToFloatFromStr(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* object) {
|
||||
// Convert string keyword into float value
|
||||
CHANSVmObjHdr* newObj = CHANSVmNewObject(vm, vmFalse, vmNull, CHANS_VM_OBJ_TYPE_FLOAT, 0);
|
||||
|
||||
@@ -785,7 +785,7 @@ CHANSVmObjHdr* CHANSVmConvertToStrFromUndefined(CHANSVm* vm, CHANSVmObjType type
|
||||
return (CHANSVmObjHdr*)CHANSVmConstStringObjectUndefined_;
|
||||
}
|
||||
|
||||
s32 CHANSVm_8144B62C(vmWString buf, u32 len, vmFloat val) NO_INLINE {
|
||||
s32 CHANSVmFloatToWString(vmWString buf, u32 len, vmFloat val) NO_INLINE {
|
||||
s32 result = snprintf((char*)buf, len / 2, scFloatPrintfFmt, val);
|
||||
CHANSVmStrCpyToU16FromU8(buf, (vmString)buf, result);
|
||||
return VM_STR_LENGTH(result);
|
||||
@@ -815,7 +815,7 @@ error:
|
||||
return vmNull;
|
||||
}
|
||||
|
||||
CHANSVmObjHdr* CHANSVm_8144B734(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* value) {
|
||||
CHANSVmObjHdr* CHANSVmConvertToStrFromFloat(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr* value) {
|
||||
const CHANSVmObjHdr* base;
|
||||
CHANSVmObjHdr* newObj;
|
||||
s32 result;
|
||||
@@ -835,7 +835,7 @@ CHANSVmObjHdr* CHANSVm_8144B734(CHANSVm* vm, CHANSVmObjType type, CHANSVmObjHdr*
|
||||
|
||||
newObj = CHANSVmNewObject(vm, vmFalse, vmNull, CHANS_VM_OBJ_TYPE_STRING, VM_STRING_SIZE);
|
||||
if (newObj != vmNull) {
|
||||
result = CHANSVm_8144B62C(newObj->value.wstring_v->spData, VM_STRING_SIZE, value->value.float_v);
|
||||
result = CHANSVmFloatToWString(newObj->value.wstring_v->spData, VM_STRING_SIZE, value->value.float_v);
|
||||
newObj->value.wstring_v->len = result;
|
||||
if (newObj->value.wstring_v->len == 0) {
|
||||
goto error;
|
||||
@@ -904,9 +904,9 @@ char scVmGetResultType[] = "VmGetResultType";
|
||||
// clang-format off
|
||||
const VmConvertEntry VmTypeConvertFuncTbl[] = {
|
||||
{vmNull, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVmConvertObjectTypeError, vmNull, CHANSVm_8144B30C, CHANSVmConvertToIntFromStr, CHANSVmConvertToIntFromArray, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVm_8144B430, CHANSVm_8144B470, vmNull, CHANSVm_8144B4D4, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVmConvertToStrFromUndefined, CHANSVmConvertToStrFromInt, CHANSVm_8144B734, vmNull, CHANSVmConvertToStrFromArray, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVmConvertObjectTypeError, vmNull, CHANSVmConvertToIntFromFloat, CHANSVmConvertToIntFromStr, CHANSVmConvertToIntFromArray, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVmConvertToFloatFromUndefined, CHANSVmConvertToFloatFromInt, vmNull, CHANSVmConvertToFloatFromStr, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVmConvertToStrFromUndefined, CHANSVmConvertToStrFromInt, CHANSVmConvertToStrFromFloat, vmNull, CHANSVmConvertToStrFromArray, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, vmNull, CHANSVmConvertObjectTypeError},
|
||||
{CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, CHANSVmConvertObjectTypeError, vmNull},
|
||||
};
|
||||
@@ -2183,7 +2183,7 @@ static u32 VmArrayJoinSub(CHANSVmObjHdr* obj, CHANSVmObjHdr* array, wchar_t* sep
|
||||
if (offset + 0x80 > bufSize) {
|
||||
goto error;
|
||||
}
|
||||
elemLen = CHANSVm_8144B62C((vmWString)((u8*)(*obj->value.ptr_v) + offset), 0x80, chunk->elements[countInChunk].value.float_v);
|
||||
elemLen = CHANSVmFloatToWString((vmWString)((u8*)(*obj->value.ptr_v) + offset), 0x80, chunk->elements[countInChunk].value.float_v);
|
||||
break;
|
||||
}
|
||||
case CHANS_VM_TYPE_ARRAY: {
|
||||
@@ -3400,7 +3400,7 @@ VmMethodDefine(String, ToUpperCase) {
|
||||
return vmFalse;
|
||||
}
|
||||
|
||||
CHANSVmObjHdr* CHANSVm_8145049C(CHANSVm* vm, CHANSVmObjHdr* obj, u32 arg) {
|
||||
CHANSVmObjHdr* CHANSVmFormatString(CHANSVm* vm, CHANSVmObjHdr* obj, u32 arg) {
|
||||
u8 pad0[8];
|
||||
u8 tempBuf[16];
|
||||
u8 fmtBufData[32];
|
||||
@@ -3745,7 +3745,7 @@ null_return:
|
||||
VmMethodDefine(String, Format) {
|
||||
u32 result;
|
||||
if (VmParentObj != vmNull && VmParentObj->type == CHANS_VM_TYPE_CLASS_REF) {
|
||||
result = (u32)CHANSVm_8145049C(VmInst, VmReturnObj, 0);
|
||||
result = (u32)CHANSVmFormatString(VmInst, VmReturnObj, 0);
|
||||
return result != 0;
|
||||
}
|
||||
return 0;
|
||||
@@ -3775,10 +3775,10 @@ int VmGetIntFromObjHdr(CHANSVmObjHdr* object) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 CHANSVm_81451314(BlobHeader* blob, CHANSVmObjHdr* ptr, u32 limit);
|
||||
BOOL CHANSVm_81451348(BlobHeader* blob, s64 size);
|
||||
u32 CHANSVmBlobGetCount(BlobHeader* blob, CHANSVmObjHdr* ptr, u32 limit);
|
||||
BOOL CHANSVmBlobHasSpace(BlobHeader* blob, s64 size);
|
||||
CHANSVmObjHdr* CHANSVmNewBlobObject(CHANSVm* VmInst, CHANSVmObjHdr* obj, u32 size, void* src, u32 count);
|
||||
static u64 CHANSVm_814540E0(u32 upper, u32 lower);
|
||||
static u64 CHANSVmMakeU64(u32 upper, u32 lower);
|
||||
|
||||
static void VmBlobInitValue(BlobHeader* blob, u32 size) {
|
||||
if (blob != vmNull) {
|
||||
@@ -3834,7 +3834,7 @@ static u8* VmBlobGetDataBufferDirect(CHANSVmObjHdr* obj) {
|
||||
return vmNull;
|
||||
}
|
||||
|
||||
BOOL CHANSVm_81450D14(BlobHeader* blob, s64 val, u32* out) {
|
||||
BOOL CHANSVmBlobResolveOffset(BlobHeader* blob, s64 val, u32* out) {
|
||||
s64 pos;
|
||||
|
||||
if (blob == vmNull) {
|
||||
@@ -3901,7 +3901,7 @@ VmMethodDefine(Blob, Seek) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (CHANSVm_81450D14(blob, val->value.int_v, &tmp)) {
|
||||
if (CHANSVmBlobResolveOffset(blob, val->value.int_v, &tmp)) {
|
||||
blob->offset = tmp;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -3988,9 +3988,9 @@ VmMethodDefine(Blob, Fill) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
count = blob != vmNull ? CHANSVm_81451314(blob, fill, blob->offset) : 0;
|
||||
count = blob != vmNull ? CHANSVmBlobGetCount(blob, fill, blob->offset) : 0;
|
||||
|
||||
if (CHANSVm_81451348(blob, count)) {
|
||||
if (CHANSVmBlobHasSpace(blob, count)) {
|
||||
memset(blob->pData + blob->offset, (u8)val->value.int_v, count);
|
||||
blob->offset += count;
|
||||
return 1;
|
||||
@@ -3999,7 +3999,7 @@ VmMethodDefine(Blob, Fill) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 CHANSVm_81451314(BlobHeader* blob, CHANSVmObjHdr* ptr, u32 limit) {
|
||||
u32 CHANSVmBlobGetCount(BlobHeader* blob, CHANSVmObjHdr* ptr, u32 limit) {
|
||||
if (ptr != vmNull) {
|
||||
return *(u32*)((u8*)ptr + 4);
|
||||
}
|
||||
@@ -4013,7 +4013,7 @@ u32 CHANSVm_81451314(BlobHeader* blob, CHANSVmObjHdr* ptr, u32 limit) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL CHANSVm_81451348(BlobHeader* blob, s64 size) {
|
||||
BOOL CHANSVmBlobHasSpace(BlobHeader* blob, s64 size) {
|
||||
u32 curOff = blob->offset;
|
||||
return size >= 0 && (s64)(blob->size - curOff) >= size;
|
||||
}
|
||||
@@ -4028,7 +4028,7 @@ VmMethodDefine(Blob, GetString) {
|
||||
}
|
||||
|
||||
size = (u32)arg->value.int_v;
|
||||
if (CHANSVm_81451348(blob, size)) {
|
||||
if (CHANSVmBlobHasSpace(blob, size)) {
|
||||
CHANSVmErr err = CHANSVmSetU16StringFromU8(VmInst, VmReturnObj, (char*)(blob->pData + blob->offset), size);
|
||||
blob->offset += size;
|
||||
return err == CHANS_VM_OK;
|
||||
@@ -4058,7 +4058,7 @@ VmMethodDefine(Blob, SetString) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CHANSVm_81451348(blob, size)) {
|
||||
if (CHANSVmBlobHasSpace(blob, size)) {
|
||||
memset(blob->pData + blob->offset, 0, size);
|
||||
CHANSVmStrCpyToU8FromU16(blob->pData + blob->offset, strData, charCount);
|
||||
blob->offset += size;
|
||||
@@ -4076,7 +4076,7 @@ VmMethodDefine(Blob, GetWString) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (CHANSVm_81451348(blob, VM_STR_LENGTH(arg->value.int_v))) {
|
||||
if (CHANSVmBlobHasSpace(blob, VM_STR_LENGTH(arg->value.int_v))) {
|
||||
CHANSVmErr err = CHANSVmSetU16String(VmInst, VmReturnObj, (wchar_t*)(blob->pData + blob->offset), (u32)arg->value.int_v << 1);
|
||||
u32 oldOffset = blob->offset;
|
||||
u64 length = VM_STR_LENGTH(arg->value.int_v);
|
||||
@@ -4113,7 +4113,7 @@ VmMethodDefine(Blob, SetWString) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CHANSVm_81451348(blob, size)) {
|
||||
if (CHANSVmBlobHasSpace(blob, size)) {
|
||||
memcpy(blob->pData + blob->offset, strData, strLen);
|
||||
if (strLen < size) {
|
||||
memset(blob->pData + blob->offset + strLen, 0, size - strLen);
|
||||
@@ -4184,8 +4184,8 @@ VmMethodDefine(Blob, CopyRangeFrom) {
|
||||
srcOff = 0;
|
||||
destOff = 0;
|
||||
|
||||
if (CHANSVm_81450D14(destBlob, destOffObj->value.int_v, &destOff) != 0 && CHANSVm_81450D14(srcBlob, srcOffObj->value.int_v, &srcOff) != 0) {
|
||||
count = CHANSVm_81451314(srcBlob, countObj, srcOff);
|
||||
if (CHANSVmBlobResolveOffset(destBlob, destOffObj->value.int_v, &destOff) != 0 && CHANSVmBlobResolveOffset(srcBlob, srcOffObj->value.int_v, &srcOff) != 0) {
|
||||
count = CHANSVmBlobGetCount(srcBlob, countObj, srcOff);
|
||||
{
|
||||
u32 destinationOffset = destOff;
|
||||
okFlag = (s64)count >= 0 && (s64)(destBlob->size - destinationOffset) >= (s64)count;
|
||||
@@ -4213,9 +4213,9 @@ VmMethodDefine(Blob, GetBlob) {
|
||||
if (blob == vmNull)
|
||||
return 0;
|
||||
|
||||
count = blob != vmNull ? CHANSVm_81451314(blob, arg, blob->offset) : 0;
|
||||
count = blob != vmNull ? CHANSVmBlobGetCount(blob, arg, blob->offset) : 0;
|
||||
|
||||
if (CHANSVm_81451348(blob, count)) {
|
||||
if (CHANSVmBlobHasSpace(blob, count)) {
|
||||
if (CHANSVmNewBlobObject(VmInst, VmReturnObj, count, blob->offset + blob->pData, count) != vmNull) {
|
||||
blob->offset += count;
|
||||
return 1;
|
||||
@@ -4262,7 +4262,7 @@ VmMethodDefine(Blob, SetBlob) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CHANSVm_81451348(destBlob, logicalSize)) {
|
||||
if (CHANSVmBlobHasSpace(destBlob, logicalSize)) {
|
||||
memmove(destBlob->pData + *(u32*)&destBlob->offset, srcBlob->pData + srcBlob->offset, copySize);
|
||||
if (copySize < logicalSize) {
|
||||
memset(destBlob->offset + destBlob->pData + copySize, 0, logicalSize - copySize);
|
||||
@@ -4284,9 +4284,9 @@ VmMethodDefine(Blob, GetHexString) {
|
||||
return vmFalse;
|
||||
}
|
||||
|
||||
count = blob != vmNull ? CHANSVm_81451314(blob, arg, blob->offset) : 0;
|
||||
count = blob != vmNull ? CHANSVmBlobGetCount(blob, arg, blob->offset) : 0;
|
||||
|
||||
if (CHANSVm_81451348(blob, count) && CHANSVmNewObject(VmInst, vmFalse, VmReturnObj, CHANS_VM_OBJ_TYPE_STRING, count * 4) != vmNull) {
|
||||
if (CHANSVmBlobHasSpace(blob, count) && CHANSVmNewObject(VmInst, vmFalse, VmReturnObj, CHANS_VM_OBJ_TYPE_STRING, count * 4) != vmNull) {
|
||||
wchar_t* dest = (wchar_t*)VmGetStrFromObjHdr(VmReturnObj);
|
||||
u8* src = blob->pData;
|
||||
u32 offset = blob->offset;
|
||||
@@ -4352,8 +4352,8 @@ VmMethodDefine(Blob, CalcRangeSHA1Digest) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (CHANSVm_81450D14(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVm_81451314(blob, arg1, offset);
|
||||
if (CHANSVmBlobResolveOffset(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVmBlobGetCount(blob, arg1, offset);
|
||||
|
||||
{
|
||||
u32 off = offset;
|
||||
@@ -4417,8 +4417,8 @@ VmMethodDefine(Blob, CalcRangeMD5Digest) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (CHANSVm_81450D14(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVm_81451314(blob, arg1, offset);
|
||||
if (CHANSVmBlobResolveOffset(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVmBlobGetCount(blob, arg1, offset);
|
||||
|
||||
{
|
||||
u32 off = offset;
|
||||
@@ -4464,8 +4464,8 @@ VmMethodDefine(Blob, CalcRangeCRC16) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (CHANSVm_81450D14(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVm_81451314(blob, arg1, offset);
|
||||
if (CHANSVmBlobResolveOffset(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVmBlobGetCount(blob, arg1, offset);
|
||||
{
|
||||
u32 off = offset;
|
||||
if (((s64)size >= 0LL && (s64)(blob->size - off) >= (s64)size) != vmFalse) {
|
||||
@@ -4500,8 +4500,8 @@ VmMethodDefine(Blob, CalcRangeCRC32) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (CHANSVm_81450D14(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVm_81451314(blob, arg1, offset);
|
||||
if (CHANSVmBlobResolveOffset(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVmBlobGetCount(blob, arg1, offset);
|
||||
{
|
||||
u32 off = offset;
|
||||
|
||||
@@ -4573,8 +4573,8 @@ VmMethodDefine(Blob, CalcRangeHMAC) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (CHANSVm_81450D14(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVm_81451314(blob, arg1, offset);
|
||||
if (CHANSVmBlobResolveOffset(blob, arg0->value.int_v, &offset) != 0) {
|
||||
size = CHANSVmBlobGetCount(blob, arg1, offset);
|
||||
off = offset;
|
||||
if (((s64)size >= 0LL && (s64)(blob->size - off) >= (s64)size) != vmFalse) {
|
||||
NETHMACContext ctx;
|
||||
@@ -5202,7 +5202,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
|
||||
copySize = paramValue;
|
||||
}
|
||||
|
||||
if (copySize < 0 || !CHANSVm_81451348(parentBlob, copySize)) {
|
||||
if (copySize < 0 || !CHANSVmBlobHasSpace(parentBlob, copySize)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5220,7 +5220,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
if (paramValue < 0 || !CHANSVm_81451348(parentBlob, paramValue)) {
|
||||
if (paramValue < 0 || !CHANSVmBlobHasSpace(parentBlob, paramValue)) {
|
||||
goto error;
|
||||
}
|
||||
if (paramValue > 0) {
|
||||
@@ -5247,7 +5247,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!CHANSVm_81451348(parentBlob, elemSize * count)) {
|
||||
if (!CHANSVmBlobHasSpace(parentBlob, elemSize * count)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5342,7 +5342,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
*(u64*)packBuf = CHANSVm_814540E0(packBuf[0], packBuf[1]);
|
||||
*(u64*)packBuf = CHANSVmMakeU64(packBuf[0], packBuf[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5379,7 +5379,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!CHANSVm_81451348(parentBlob, elemSize * count)) {
|
||||
if (!CHANSVmBlobHasSpace(parentBlob, elemSize * count)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5424,7 +5424,7 @@ static vmBoolInt VmBlobPackCommon(CHANSVm* VmInst, CHANSVmObjHdr* VmParentObj, C
|
||||
}
|
||||
|
||||
bufSize = (count + 1) / 2;
|
||||
if (!CHANSVm_81451348(parentBlob, bufSize)) {
|
||||
if (!CHANSVmBlobHasSpace(parentBlob, bufSize)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5472,7 +5472,7 @@ error:
|
||||
return vmFalse;
|
||||
}
|
||||
|
||||
static u64 CHANSVm_814540E0(u32 upper, u32 lower) {
|
||||
static u64 CHANSVmMakeU64(u32 upper, u32 lower) {
|
||||
// Read U64 and byte-swap
|
||||
u64 x = (u64)upper << 32 | lower;
|
||||
return x >> 56 & 0x00000000000000ffULL | x >> 40 & 0x000000000000ff00ULL | x >> 24 & 0x0000000000ff0000ULL | x >> 8 & 0x00000000ff000000ULL |
|
||||
@@ -5648,7 +5648,7 @@ VmMethodDefine(Blob, Unpack) {
|
||||
} else {
|
||||
count = outVal;
|
||||
}
|
||||
if (count < 0 || !CHANSVm_81451348(srcBlob, count)) {
|
||||
if (count < 0 || !CHANSVmBlobHasSpace(srcBlob, count)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5663,7 +5663,7 @@ VmMethodDefine(Blob, Unpack) {
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
if (outVal < 0 || !CHANSVm_81451348(srcBlob, outVal)) {
|
||||
if (outVal < 0 || !CHANSVmBlobHasSpace(srcBlob, outVal)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5682,7 +5682,7 @@ VmMethodDefine(Blob, Unpack) {
|
||||
} else {
|
||||
count = outVal;
|
||||
}
|
||||
if (count < 0 || !CHANSVm_81451348(srcBlob, outSize * count)) {
|
||||
if (count < 0 || !CHANSVmBlobHasSpace(srcBlob, outSize * count)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5710,7 +5710,7 @@ VmMethodDefine(Blob, Unpack) {
|
||||
break;
|
||||
}
|
||||
case 8: {
|
||||
unpackBuf.value = CHANSVm_814540E0(unpackBuf.words[0], unpackBuf.words[1]);
|
||||
unpackBuf.value = CHANSVmMakeU64(unpackBuf.words[0], unpackBuf.words[1]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -5794,7 +5794,7 @@ VmMethodDefine(Blob, Unpack) {
|
||||
}
|
||||
count = (srcBlob->size - srcBlob->offset) / outSize;
|
||||
}
|
||||
if ((s32)count < 0 || !CHANSVm_81451348(srcBlob, outSize * count)) {
|
||||
if ((s32)count < 0 || !CHANSVmBlobHasSpace(srcBlob, outSize * count)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -5845,7 +5845,7 @@ VmMethodDefine(Blob, Unpack) {
|
||||
}
|
||||
|
||||
bufSize = (s32)(count + 1) / 2;
|
||||
if (!CHANSVm_81451348(srcBlob, bufSize)) {
|
||||
if (!CHANSVmBlobHasSpace(srcBlob, bufSize)) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@@ -6466,7 +6466,7 @@ void CHANSConvertModuleOfsToPtr(CHANSVmModule* ptr) {
|
||||
VmOffsU32ToPtr((void**)&ptr->pLineTbl, ptr);
|
||||
}
|
||||
|
||||
static CHANSVmObjHdr* CHANSVm_81455654(CHANSVm* vm, s32 id) {
|
||||
static CHANSVmObjHdr* CHANSVmLookupScopedObject(CHANSVm* vm, s32 id) {
|
||||
CHANSVmObjHdr* data = vmNull;
|
||||
CHANSVmPrivate* pVm = (CHANSVmPrivate*)vm;
|
||||
CHANSVmExecutionCtx* ctx = pVm->pActiveCtx;
|
||||
@@ -6755,7 +6755,7 @@ static CHANSVmErr VmReturnWithValue(CHANSVm* vm, u32 val) {
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < pVm->pActiveCtx->pDbg->moduleCount; i++) {
|
||||
if (CHANSVmDeleteObject(vm, CHANSVm_81455654(vm, i)) != CHANS_VM_OK) {
|
||||
if (CHANSVmDeleteObject(vm, CHANSVmLookupScopedObject(vm, i)) != CHANS_VM_OK) {
|
||||
return CHANS_VM_ERR_RETURN;
|
||||
}
|
||||
}
|
||||
@@ -6873,7 +6873,7 @@ CHANSVmErr CHANSVmLinkModules(CHANSVm* vm, vmS32 unk0) {
|
||||
CHANSVmObjHdr* obj;
|
||||
if (idx >= module->moduleCount) {
|
||||
goto pass3_idx_err;
|
||||
} else if (obj = CHANSVm_81455654(vm, idx), obj == vmNull) {
|
||||
} else if (obj = CHANSVmLookupScopedObject(vm, idx), obj == vmNull) {
|
||||
goto pass3_obj_err;
|
||||
} else if (obj->type == CHANS_VM_OBJ_TYPE_BLANK) {
|
||||
goto pass3_success;
|
||||
@@ -7602,7 +7602,7 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
break;
|
||||
}
|
||||
case CHANS_VM_OBJ_TYPE_FLOAT: {
|
||||
invertedVal = (s64)(CHANSVm_8144B1D8(pAcc->value.float_v) * floor(fabs(pAcc->value.float_v)));
|
||||
invertedVal = (s64)(CHANSVmFloatSign(pAcc->value.float_v) * floor(fabs(pAcc->value.float_v)));
|
||||
break;
|
||||
}
|
||||
case CHANS_VM_OBJ_TYPE_STRING: {
|
||||
@@ -7818,7 +7818,7 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
result = CHANS_VM_ERR_GET_PROPERTY_NAME;
|
||||
arrayIdx = 0;
|
||||
imm16Val = VM_READ_BE_U16(operandBuf, 0);
|
||||
foundObj = CHANSVm_81455654(vm, imm16Val);
|
||||
foundObj = CHANSVmLookupScopedObject(vm, imm16Val);
|
||||
accumulator = &pVm->accumulator;
|
||||
if (foundObj != vmNull && accumulator->type == CHANS_VM_OBJ_TYPE_INTEGER &&
|
||||
(computedAddr = accumulator->value.data.len, (u64)accumulator->value.int_v <= ~1U)) {
|
||||
@@ -7954,7 +7954,7 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
if (operandBuf == vmNull) {
|
||||
return CHANS_VM_ERR_CODE_RANGE;
|
||||
}
|
||||
foundObj = CHANSVm_81455654(vm, (VM_READ_BE_U16(operandBuf, 0)) & 0x1FFF);
|
||||
foundObj = CHANSVmLookupScopedObject(vm, (VM_READ_BE_U16(operandBuf, 0)) & 0x1FFF);
|
||||
result = VmDeleteCommon(vm, foundObj);
|
||||
break;
|
||||
}
|
||||
@@ -7982,12 +7982,12 @@ CHANSVmErr CHANSVmStep(CHANSVm* vm, int stepCount) {
|
||||
imm16Val = (opcodeVal << 8 | operandBuf[1]) & 0x1FFF;
|
||||
switch (opcodeVal & CHANS_VM_OP_SYMBOL_STORE) {
|
||||
case 0: {
|
||||
foundObj = CHANSVm_81455654(vm, imm16Val);
|
||||
foundObj = CHANSVmLookupScopedObject(vm, imm16Val);
|
||||
result = VmStore(vm, &pVm->accumulator, foundObj);
|
||||
break;
|
||||
}
|
||||
case CHANS_VM_OP_SYMBOL_STORE: {
|
||||
foundObj = CHANSVm_81455654(vm, imm16Val);
|
||||
foundObj = CHANSVmLookupScopedObject(vm, imm16Val);
|
||||
result = VmStore(vm, foundObj, &pVm->accumulator);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,6 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
extern "C" const f32 lbl_81694D90;
|
||||
extern "C" const f32 lbl_81694DA8;
|
||||
extern "C" const f32 lbl_81694DAC;
|
||||
extern "C" const f32 lbl_81694DB0;
|
||||
extern "C" const f32 lbl_81694DB4;
|
||||
extern "C" const f32 lbl_81694DBC;
|
||||
extern "C" const double lbl_81694DC8;
|
||||
extern "C" void _savegpr_24();
|
||||
extern "C" void _restgpr_24();
|
||||
extern "C" void GetFont__Q34nw4r3lyt8TextBoxCFv();
|
||||
|
||||
@@ -2539,11 +2539,14 @@ namespace textinput {
|
||||
u32 koreanCode = code;
|
||||
if (caps)
|
||||
koreanCode = util::reverseLetterCaseW(koreanCode);
|
||||
u16 mapped;
|
||||
if (koreanCode >= L'a' && koreanCode <= L'z')
|
||||
koreanCode = KOREAN_LOWER[static_cast<u16>(koreanCode) - L'a'];
|
||||
mapped = KOREAN_LOWER[static_cast<u16>(koreanCode) - L'a'];
|
||||
else if (koreanCode >= L'A' && koreanCode <= L'Z')
|
||||
koreanCode = KOREAN_UPPER[static_cast<u16>(koreanCode) - L'A'];
|
||||
code = koreanCode;
|
||||
mapped = KOREAN_UPPER[static_cast<u16>(koreanCode) - L'A'];
|
||||
else
|
||||
mapped = koreanCode;
|
||||
code = mapped;
|
||||
}
|
||||
}
|
||||
animation = searchAnmPane(code);
|
||||
|
||||
@@ -486,12 +486,12 @@ namespace ipl {
|
||||
|
||||
void BoardObject::stt_stand() {
|
||||
f32 degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
|
||||
f32 dVar2 = nw4r::math::CosFIdx(degrees * 0.7111111f);
|
||||
f32 cosF = nw4r::math::CosFIdx(degrees * 0.7111111f);
|
||||
degrees = mStandData.unk_0x0C * 30.0f + 30.0f;
|
||||
f32 dVar3 = nw4r::math::SinFIdx(degrees * 0.7111111f);
|
||||
f32 sinF = nw4r::math::SinFIdx(degrees * 0.7111111f);
|
||||
|
||||
math::VEC2 standPos;
|
||||
__ct__Q33ipl4math4VEC2Fff(&standPos, dVar3 * 160.0f, dVar2 * 160.0f);
|
||||
__ct__Q33ipl4math4VEC2Fff(&standPos, sinF * 160.0f, cosF * 160.0f);
|
||||
mBoardPos = (((mStandData.pos * (f32)(10 - mStandData.unk_0x08)) + (standPos * mStandData.unk_0x08)) / 10.0f);
|
||||
|
||||
if ((mStandData.unk_0x08 += 1) > 10) {
|
||||
|
||||
@@ -313,7 +313,6 @@ namespace ipl {
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
extern "C" const f32 scDateZeroF = 0.0f;
|
||||
extern "C" const f32 lbl_816948F0;
|
||||
#pragma pop
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -45,7 +45,7 @@ struct CardThreadState {
|
||||
|
||||
MEMAllocator sAllocator_;
|
||||
static CardThreadState* sThread;
|
||||
extern "C" void* CardSequence_813D2C8C();
|
||||
extern "C" void* cardThreadMain();
|
||||
static char sCardSlotName[3] = "AB";
|
||||
|
||||
FileInfo* getCardDirState() {
|
||||
@@ -68,7 +68,7 @@ long getCardLastCMDFCmdResult() {
|
||||
return sThread->completionResult;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D205C(u8 slot) {
|
||||
extern "C" s32 sendCardUnmountCmd(u8 slot) {
|
||||
sThread->sourceSlot = slot;
|
||||
sThread->lastCommand = 9;
|
||||
sThread->lastResult = -21;
|
||||
@@ -114,12 +114,12 @@ void sendCardDeleteCmd(u8 slot, s16 fileNo) {
|
||||
}
|
||||
|
||||
void sendCardThreadStopCmd() NO_INLINE {
|
||||
CardSequence_813D205C(0);
|
||||
CardSequence_813D205C(1);
|
||||
sendCardUnmountCmd(0);
|
||||
sendCardUnmountCmd(1);
|
||||
OSSendMessage(&sThread->requests, (OSMessage)0xB, 0);
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D222C(u8 slot) {
|
||||
extern "C" void pollCardSlot(u8 slot) {
|
||||
s32 result;
|
||||
|
||||
if (sThread->valid == 1) {
|
||||
@@ -139,7 +139,7 @@ extern "C" void CardSequence_813D222C(u8 slot) {
|
||||
}
|
||||
}
|
||||
if (result == 0) {
|
||||
if (sThread->slots[slot].state > 2 && CardSequence_813D205C(slot)) {
|
||||
if (sThread->slots[slot].state > 2 && sendCardUnmountCmd(slot)) {
|
||||
sThread->slots[slot].changed = 0;
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ done:
|
||||
return;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D233C(s32 result) {
|
||||
extern "C" s32 mapCardErrorCode(s32 result) {
|
||||
switch (result) {
|
||||
case 0:
|
||||
return 0;
|
||||
@@ -186,8 +186,8 @@ extern "C" s32 CardSequence_813D233C(s32 result) {
|
||||
void probeCard() {
|
||||
OSMessage message;
|
||||
|
||||
CardSequence_813D222C(0);
|
||||
CardSequence_813D222C(1);
|
||||
pollCardSlot(0);
|
||||
pollCardSlot(1);
|
||||
while (OSReceiveMessage(&sThread->responses, &message, 0)) {
|
||||
s16 slot = (s16)(((u32)message >> 16) & 1);
|
||||
s8 command = (u8)(u32)message;
|
||||
@@ -251,9 +251,9 @@ checkCommand:
|
||||
break;
|
||||
}
|
||||
|
||||
sThread->lastResult = CardSequence_813D233C((s8)(((u32)message << 16) >> 24));
|
||||
sThread->lastResult = mapCardErrorCode((s8)(((u32)message << 16) >> 24));
|
||||
if ((s8)(u8)(u32)message != 0 && (s8)(u8)(u32)message != 9) {
|
||||
sThread->completionResult = CardSequence_813D233C((s8)(((u32)message << 16) >> 24));
|
||||
sThread->completionResult = mapCardErrorCode((s8)(((u32)message << 16) >> 24));
|
||||
if (sThread->sourceSlot != (s16)(((u32)message >> 16) & 1)) {
|
||||
sThread->destinationFileNo = (u32)message >> 24;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ void initCardThread() {
|
||||
|
||||
OSInitMessageQueue(&sThread->responses, sThread->responseMessages, 0x10);
|
||||
OSInitMessageQueue(&sThread->requests, sThread->requestMessages, 0x10);
|
||||
OSCreateThread(&sThread->thread, (void* (*)(void*))CardSequence_813D2C8C, 0,
|
||||
OSCreateThread(&sThread->thread, (void* (*)(void*))cardThreadMain, 0,
|
||||
sThread->stack + sizeof(sThread->stack), 0x8000, 0x11, 0);
|
||||
OSResumeThread(&sThread->thread);
|
||||
OSSendMessage(&sThread->requests, (OSMessage)10, 0);
|
||||
@@ -348,7 +348,7 @@ const char* getIconComment(u8 slot, s16 index) {
|
||||
return sThread->comments[slot][index];
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D2A74(s32 slot, s32 index) {
|
||||
extern "C" void clearCardFileEntry(s32 slot, s32 index) {
|
||||
BOOL interrupts = OSDisableInterrupts();
|
||||
sThread->files[slot][index].fileNo = 0;
|
||||
sThread->files[slot][index].size = 0;
|
||||
@@ -360,7 +360,7 @@ extern "C" void CardSequence_813D2A74(s32 slot, s32 index) {
|
||||
OSRestoreInterrupts(interrupts);
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D2B40(s32 slot) {
|
||||
extern "C" void refreshCardSlotInfo(s32 slot) {
|
||||
u16 memSize;
|
||||
u32 sectorSize;
|
||||
s32 freeBytes;
|
||||
@@ -391,12 +391,12 @@ extern "C" void CardSequence_813D2B40(s32 slot) {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D320C(s32 slot, s32 result);
|
||||
extern "C" s32 CardSequence_813D32A8(s32 slot, s32 state, s32 result);
|
||||
extern "C" void CardSequence_813D3380(s32 slot, s32 state, s32 fileNo);
|
||||
extern "C" void CardSequence_813D33D8(s32 slot);
|
||||
extern "C" s32 CardSequence_813D3424(s32 slot, s32 fileNo, CARDDir* dir);
|
||||
extern "C" void CardSequence_813D3D14(s32 slot, s16 fileNo, s32 command);
|
||||
extern "C" s32 handleCardMountResult(s32 slot, s32 result);
|
||||
extern "C" s32 reportCardThreadError(s32 slot, s32 state, s32 result);
|
||||
extern "C" void sendCardSlotState(s32 slot, s32 state, s32 fileNo);
|
||||
extern "C" void clearAllCardFileEntries(s32 slot);
|
||||
extern "C" s32 loadCardFileIcons(s32 slot, s32 fileNo, CARDDir* dir);
|
||||
extern "C" void runCardMoveOrCopy(s32 slot, s16 fileNo, s32 command);
|
||||
|
||||
static inline void sendValidityResponse(u32 command, u32 valid) {
|
||||
union {
|
||||
@@ -408,7 +408,7 @@ static inline void sendValidityResponse(u32 command, u32 valid) {
|
||||
OSSendMessage(&sThread->responses, (OSMessage)reply.value, 1);
|
||||
}
|
||||
|
||||
extern "C" void* CardSequence_813D2C8C() {
|
||||
extern "C" void* cardThreadMain() {
|
||||
struct CardThreadLocals {
|
||||
u8 compareName[6];
|
||||
u32 message;
|
||||
@@ -455,7 +455,7 @@ loopStart:
|
||||
command = (local.message >> 14) & 4;
|
||||
result = CARDMount(slot, sThread->mountBuffers[command / 4], 0);
|
||||
if (result < 0) {
|
||||
result = CardSequence_813D320C(slot, result);
|
||||
result = handleCardMountResult(slot, result);
|
||||
if (result != 0) {
|
||||
goto mountContinue;
|
||||
}
|
||||
@@ -467,11 +467,11 @@ loopStart:
|
||||
}
|
||||
|
||||
mountContinue:
|
||||
CardSequence_813D33D8(slot);
|
||||
clearAllCardFileEntries(slot);
|
||||
for (file = 0; file < 0x7F; ++file) {
|
||||
result = __CARDGetStatusEx(slot, (s16)file, &local.mountDir);
|
||||
if (result < 0) {
|
||||
result = CardSequence_813D320C(slot, result);
|
||||
result = handleCardMountResult(slot, result);
|
||||
if (result != 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -496,16 +496,16 @@ loopStart:
|
||||
goto mountError;
|
||||
}
|
||||
} else {
|
||||
result = CardSequence_813D3424(slot, (s16)file, &local.mountDir);
|
||||
result = loadCardFileIcons(slot, (s16)file, &local.mountDir);
|
||||
if (result < 0) {
|
||||
goto mountError;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CardSequence_813D2B40(slot);
|
||||
refreshCardSlotInfo(slot);
|
||||
sThread->mounted[command / 4] = 1;
|
||||
CardSequence_813D3380(slot, 0, 0);
|
||||
sendCardSlotState(slot, 0, 0);
|
||||
OSReport("Slot %c\n", sCardSlotName[slot]);
|
||||
for (listingFile = 0; listingFile < 0x7F; ++listingFile) {
|
||||
if (__CARDGetStatusEx(slot, (u16)listingFile, &local.listingDir) == 0) {
|
||||
@@ -519,30 +519,30 @@ loopStart:
|
||||
|
||||
mountError:
|
||||
OSReport("MountError\n");
|
||||
CardSequence_813D32A8(slot, 0, result);
|
||||
reportCardThreadError(slot, 0, result);
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
CardSequence_813D32A8((local.message >> 16) & 1, 9, -3);
|
||||
reportCardThreadError((local.message >> 16) & 1, 9, -3);
|
||||
break;
|
||||
case 1: {
|
||||
slot = (local.message >> 16) & 1;
|
||||
result = CARDFormat(slot);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, 1, result);
|
||||
reportCardThreadError(slot, 1, result);
|
||||
} else {
|
||||
sThread->mounted[slot] = 1;
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D3380(slot, 1, 0);
|
||||
refreshCardSlotInfo(slot);
|
||||
sendCardSlotState(slot, 1, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
CardSequence_813D3D14((local.message >> 16) & 1,
|
||||
runCardMoveOrCopy((local.message >> 16) & 1,
|
||||
(s16)(u8)(local.message >> 24), (s8)command);
|
||||
break;
|
||||
case 3:
|
||||
CardSequence_813D3D14((local.message >> 16) & 1,
|
||||
runCardMoveOrCopy((local.message >> 16) & 1,
|
||||
(s16)(u8)(local.message >> 24), (s8)command);
|
||||
break;
|
||||
case 4: {
|
||||
@@ -550,11 +550,11 @@ loopStart:
|
||||
fileNo = (s16)(local.message >> 24);
|
||||
result = CARDFastDelete(slot, fileNo);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, 4, result);
|
||||
reportCardThreadError(slot, 4, result);
|
||||
} else {
|
||||
CardSequence_813D2A74(slot, fileNo);
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D3380(slot, 4, (u8)fileNo);
|
||||
clearCardFileEntry(slot, fileNo);
|
||||
refreshCardSlotInfo(slot);
|
||||
sendCardSlotState(slot, 4, (u8)fileNo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -581,7 +581,7 @@ loopStart:
|
||||
++outerSlot;
|
||||
|
||||
} while (outerSlot < 2);
|
||||
CardSequence_813D3380(0, 0xC, 0);
|
||||
sendCardSlotState(0, 0xC, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -593,9 +593,9 @@ loopCheck:
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D3C38(s32 slot, s16 fileNo);
|
||||
extern "C" s32 checkCardFileDuplicate(s32 slot, s16 fileNo);
|
||||
|
||||
extern "C" void CardSequence_813D3140() {
|
||||
extern "C" void markAllCardFilesDirty() {
|
||||
u32 slot = 0;
|
||||
s32 fileNo;
|
||||
|
||||
@@ -607,7 +607,7 @@ extern "C" void CardSequence_813D3140() {
|
||||
sThread->files[slot][fileNo].unk_0x06 = 0;
|
||||
if (sThread->mounted[slot] != 0 &&
|
||||
sThread->mounted[slot ^ 1] != 0 &&
|
||||
CardSequence_813D3C38((u8)slot, (s16)fileNo) < 0) {
|
||||
checkCardFileDuplicate((u8)slot, (s16)fileNo) < 0) {
|
||||
sThread->files[slot][fileNo].unk_0x06 = flagValue;
|
||||
}
|
||||
++fileNo;
|
||||
@@ -618,7 +618,7 @@ extern "C" void CardSequence_813D3140() {
|
||||
} while ((s32)slot < 2);
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D320C(s32 slot, s32 result) {
|
||||
extern "C" s32 handleCardMountResult(s32 slot, s32 result) {
|
||||
if (result == -5) {
|
||||
goto reportError;
|
||||
}
|
||||
@@ -640,32 +640,32 @@ repairedCard:
|
||||
{
|
||||
result = CARDCheck(slot);
|
||||
if (result < 0) {
|
||||
return CardSequence_813D32A8(slot, 0, result);
|
||||
return reportCardThreadError(slot, 0, result);
|
||||
}
|
||||
OSReport("CardThread:Broken Card Repaired\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
reportError:
|
||||
return CardSequence_813D32A8(slot, 0, result);
|
||||
return reportCardThreadError(slot, 0, result);
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D32A8(s32 slot, s32 state, s32 result) {
|
||||
extern "C" s32 reportCardThreadError(s32 slot, s32 state, s32 result) {
|
||||
if (result != -7 && result != -27 && result != -8 && result != -9 &&
|
||||
(CardSequence_813D33D8(slot), result != -6) && result != -13) {
|
||||
(clearAllCardFileEntries(slot), result != -6) && result != -13) {
|
||||
OSReport("DEBUG: UnmountCard %d \n", slot);
|
||||
CARDUnmount(slot);
|
||||
sThread->mounted[slot & 0xFF] = 0;
|
||||
}
|
||||
OSReport("DEBUG: CardThread error %d %d\n", state, result);
|
||||
CardSequence_813D3140();
|
||||
markAllCardFilesDirty();
|
||||
OSSendMessage(&sThread->responses,
|
||||
(OSMessage)(((slot & 1) << 16) | ((result & 0xFF) << 8) | (state & 0xFF)), 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D3380(s32 slot, s32 state, s32 fileNo) {
|
||||
CardSequence_813D3140();
|
||||
extern "C" void sendCardSlotState(s32 slot, s32 state, s32 fileNo) {
|
||||
markAllCardFilesDirty();
|
||||
OSMessageQueue* queue = &sThread->responses;
|
||||
union CardThreadMessage {
|
||||
u32 value;
|
||||
@@ -683,15 +683,15 @@ extern "C" void CardSequence_813D3380(s32 slot, s32 state, s32 fileNo) {
|
||||
OSSendMessage(queue, (OSMessage)message.value, 1);
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D33D8(s32 slot) {
|
||||
extern "C" void clearAllCardFileEntries(s32 slot) {
|
||||
s32 file = 0;
|
||||
do {
|
||||
CardSequence_813D2A74(slot, (s16)file);
|
||||
clearCardFileEntry(slot, (s16)file);
|
||||
file = file + 1;
|
||||
} while (file < 0x7F);
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D3424(s32 slot, s32 fileNo, CARDDir* dir) {
|
||||
extern "C" s32 loadCardFileIcons(s32 slot, s32 fileNo, CARDDir* dir) {
|
||||
struct CardSequenceFileData {
|
||||
s32 commentSectorSize;
|
||||
s32 sectorSize;
|
||||
@@ -922,11 +922,11 @@ closeFileSuccess:
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D3C24(s32, s32) {
|
||||
extern "C" void clearCardWritePending(s32, s32) {
|
||||
sThread->writePending = 0;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D3C38(s32 slot, s16 fileNo) {
|
||||
extern "C" s32 checkCardFileDuplicate(s32 slot, s16 fileNo) {
|
||||
CARDDir sourceDir;
|
||||
CARDDir otherDir;
|
||||
s32 result = __CARDGetStatusEx(slot, fileNo, &sourceDir);
|
||||
@@ -950,7 +950,7 @@ extern "C" s32 CardSequence_813D3C38(s32 slot, s16 fileNo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D3D14(s32 slot, s16 fileNo, s32 command) {
|
||||
extern "C" void runCardMoveOrCopy(s32 slot, s16 fileNo, s32 command) {
|
||||
CARDDir createStatus;
|
||||
CARDDir checkedStatus;
|
||||
CARDDir ioStatus;
|
||||
@@ -970,10 +970,10 @@ extern "C" void CardSequence_813D3D14(s32 slot, s16 fileNo, s32 command) {
|
||||
s32 statusResult;
|
||||
s32 stage;
|
||||
|
||||
result = CardSequence_813D3C38(slot, fileNo);
|
||||
result = checkCardFileDuplicate(slot, fileNo);
|
||||
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, command, result);
|
||||
reportCardThreadError(slot, command, result);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -999,7 +999,7 @@ sectorSizeCheck:
|
||||
goto sectorSizeDone;
|
||||
}
|
||||
sectorSizeError:
|
||||
CardSequence_813D32A8(slot, command, sectorError);
|
||||
reportCardThreadError(slot, command, sectorError);
|
||||
goto finish;
|
||||
sectorSizeDone:
|
||||
;
|
||||
@@ -1023,7 +1023,7 @@ sectorSizeDone:
|
||||
result = CARDGetResultCode(slot);
|
||||
}
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, command, result);
|
||||
reportCardThreadError(slot, command, result);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -1056,7 +1056,7 @@ createDone:
|
||||
;
|
||||
}
|
||||
if (destinationFileNo < 0) {
|
||||
CardSequence_813D32A8(destinationSlot, command, destinationFileNo);
|
||||
reportCardThreadError(destinationSlot, command, destinationFileNo);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ createDone:
|
||||
sThread->writePending = 1;
|
||||
ioResult = CARDWriteAsync(&sThread->destinationFile,
|
||||
sThread->transferBuffer, size, offset,
|
||||
CardSequence_813D3C24);
|
||||
clearCardWritePending);
|
||||
if (ioResult < 0) {
|
||||
goto copyIoFailure;
|
||||
}
|
||||
@@ -1176,7 +1176,7 @@ copyIoDone:
|
||||
}
|
||||
} else {
|
||||
metadataCopied = TRUE;
|
||||
result = CardSequence_813D3424(destinationSlot, destinationFileNo,
|
||||
result = loadCardFileIcons(destinationSlot, destinationFileNo,
|
||||
&sourceStatus);
|
||||
if (result < 0) {
|
||||
OSReport("Can't read icon for move dstfile\n");
|
||||
@@ -1214,7 +1214,7 @@ copyIoDone:
|
||||
s32 setResult = result;
|
||||
if (result == -3) {
|
||||
CARDFastDelete(slot, fileNo);
|
||||
CardSequence_813D2A74(slot, fileNo);
|
||||
clearCardFileEntry(slot, fileNo);
|
||||
} else {
|
||||
s32 restoreResult = __CARDSetStatusEx(slot, fileNo, &moveStatus);
|
||||
if (restoreResult < 0) {
|
||||
@@ -1227,13 +1227,13 @@ copyIoDone:
|
||||
stage = 3;
|
||||
result = CARDFastDelete(slot, fileNo);
|
||||
if (result >= 0) {
|
||||
CardSequence_813D2A74(slot, fileNo);
|
||||
clearCardFileEntry(slot, fileNo);
|
||||
stage = 4;
|
||||
result = __CARDGetStatusEx(destinationSlot,
|
||||
destinationFileNo, &moveStatus);
|
||||
if (result >= 0) {
|
||||
stage = 5;
|
||||
if ((result = CardSequence_813D3424(
|
||||
if ((result = loadCardFileIcons(
|
||||
destinationSlot, destinationFileNo, &moveStatus)) < 0) {
|
||||
goto moveStatusError;
|
||||
}
|
||||
@@ -1270,10 +1270,10 @@ moveStatusDone:
|
||||
}
|
||||
|
||||
if (result >= 0) {
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D2B40(destinationSlot);
|
||||
CardSequence_813D3380(slot, 0, fileNo & 0xFF);
|
||||
CardSequence_813D3380(destinationSlot, command, destinationFileNo & 0xFF);
|
||||
refreshCardSlotInfo(slot);
|
||||
refreshCardSlotInfo(destinationSlot);
|
||||
sendCardSlotState(slot, 0, fileNo & 0xFF);
|
||||
sendCardSlotState(destinationSlot, command, destinationFileNo & 0xFF);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -1281,7 +1281,7 @@ cleanup:
|
||||
destinationSlot = slot ^ 1;
|
||||
result = CARDGetResultCode(destinationSlot);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(destinationSlot, command, result);
|
||||
reportCardThreadError(destinationSlot, command, result);
|
||||
} else {
|
||||
if (temporaryCreated && !metadataCopied) {
|
||||
CARDFastDelete(destinationSlot, destinationFileNo);
|
||||
@@ -1289,18 +1289,18 @@ cleanup:
|
||||
if (metadataCopied) {
|
||||
if (__CARDGetStatusEx(destinationSlot, destinationFileNo,
|
||||
&createStatus) == 0) {
|
||||
CardSequence_813D3424(destinationSlot, destinationFileNo, &createStatus);
|
||||
loadCardFileIcons(destinationSlot, destinationFileNo, &createStatus);
|
||||
}
|
||||
}
|
||||
CardSequence_813D2B40(destinationSlot);
|
||||
CardSequence_813D3380(destinationSlot, 0, fileNo & 0xFF);
|
||||
refreshCardSlotInfo(destinationSlot);
|
||||
sendCardSlotState(destinationSlot, 0, fileNo & 0xFF);
|
||||
}
|
||||
result = CARDGetResultCode(slot);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, command, result);
|
||||
reportCardThreadError(slot, command, result);
|
||||
} else {
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D3380(slot, 0, fileNo & 0xFF);
|
||||
refreshCardSlotInfo(slot);
|
||||
sendCardSlotState(slot, 0, fileNo & 0xFF);
|
||||
}
|
||||
|
||||
finish:
|
||||
|
||||
@@ -11,7 +11,7 @@ struct MemoryCardSortEntry {
|
||||
s64 key;
|
||||
};
|
||||
|
||||
extern "C" int iplMemoryCardManager_813CD034(const void* first, const void* second) {
|
||||
extern "C" int compareMemoryCardSortEntries(const void* first, const void* second) {
|
||||
const MemoryCardSortEntry* a = static_cast<const MemoryCardSortEntry*>(first);
|
||||
const MemoryCardSortEntry* b = static_cast<const MemoryCardSortEntry*>(second);
|
||||
s64 bKey = b->key;
|
||||
@@ -92,7 +92,7 @@ void MemoryCardManager::sort_file_array(u8 slot) {
|
||||
mFile[slot][file].unk_0x08 = 0;
|
||||
}
|
||||
}
|
||||
qsort(mFile[slot], 0x7f, sizeof(MCFile), iplMemoryCardManager_813CD034);
|
||||
qsort(mFile[slot], 0x7f, sizeof(MCFile), compareMemoryCardSortEntries);
|
||||
}
|
||||
|
||||
void MemoryCardManager::sendCardCmdMove(u8 slot, s16 index) {
|
||||
|
||||
@@ -934,7 +934,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" bool iplSDMemory_813EE358(const SDMemory* memory,
|
||||
extern "C" bool iplSDMemory_containsTitleId(const SDMemory* memory,
|
||||
ESTitleId titleId,
|
||||
const ESTitleId* titleIds, u32 titleCount) {
|
||||
for (u32 i = 0; i < titleCount; i++) {
|
||||
@@ -951,7 +951,7 @@ namespace ipl {
|
||||
s32 result = mpSDChannelSelect->getWorker()->get_async_result();
|
||||
if (result == 0) {
|
||||
ESTitleId titleId = mTitleIds[mCurrentTitle];
|
||||
if (iplSDMemory_813EE358(this, titleId,
|
||||
if (iplSDMemory_containsTitleId(this, titleId,
|
||||
mNandTitleIds, mNandTitleCount)) {
|
||||
mDialogState = 17;
|
||||
} else {
|
||||
@@ -984,8 +984,8 @@ namespace ipl {
|
||||
swprintf(mCurrentTitleName, 0x107f, L"%ls\n%ls", titleName, message);
|
||||
System::getDialog()->setTitleForSDMemory(mCurrentTitleName);
|
||||
|
||||
if (iplSDMemory_813EE358(this, mTitleIds[mCurrentTitle], mSDTitleIds, mTitleNameCount) ||
|
||||
iplSDMemory_813EE358(this, mTitleIds[mCurrentTitle], mNandTitleIds, mNandTitleCount)) {
|
||||
if (iplSDMemory_containsTitleId(this, mTitleIds[mCurrentTitle], mSDTitleIds, mTitleNameCount) ||
|
||||
iplSDMemory_containsTitleId(this, mTitleIds[mCurrentTitle], mNandTitleIds, mNandTitleCount)) {
|
||||
ESTitleId titleId = mTitleIds[mCurrentTitle];
|
||||
if (iplSDChannelSelect_813DB478(mpSDChannelSelect, titleId)) {
|
||||
mDialogState = 14;
|
||||
@@ -1064,7 +1064,7 @@ namespace ipl {
|
||||
mCurrentTitle++;
|
||||
if (mTitleCount > mCurrentTitle) {
|
||||
ESTitleId nextTitleId = mTitleIds[mCurrentTitle];
|
||||
if (iplSDMemory_813EE358(this, nextTitleId,
|
||||
if (iplSDMemory_containsTitleId(this, nextTitleId,
|
||||
mNandTitleIds, mNandTitleCount)) {
|
||||
mDialogState = 17;
|
||||
} else {
|
||||
|
||||
@@ -311,9 +311,9 @@ FaderSceneCommand SDChannelTitle::calcNormal() {
|
||||
case 18: if (SCCheckStatus() != 1) { mState = 21; } break;
|
||||
case 19: iplSDChannelTitle_startCopyProgress(this); break;
|
||||
case 20: iplSDChannelTitle_updateCopyPrepare(this); break;
|
||||
case 23: iplSDChannelTitle_updateMemoryCalc(this); break;
|
||||
case 21: iplSDChannelTitle_updateEnqueueNotice(this); break;
|
||||
case 22: iplSDChannelTitle_updateCopyProgress(this); break;
|
||||
case 23: iplSDChannelTitle_updateMemoryCalc(this); break;
|
||||
case 24: iplSDChannelTitle_loadTitleBanner(this); break;
|
||||
case 25: iplSDChannelTitle_updateBannerLoad(this); break;
|
||||
case 26: iplSDChannelTitle_showCopyError(this); break;
|
||||
|
||||
@@ -296,17 +296,17 @@ int AOSS_814001B4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
int AOSS_814002F0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestRecords* request);
|
||||
int AOSS_814004D0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestRecords* request);
|
||||
int AOSS_814006A4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestRecords* request);
|
||||
int AOSS_81400830(AOSSDecryptionMessage* message);
|
||||
int AOSSDecryptMessage(AOSSDecryptionMessage* message);
|
||||
int AOSS_81400D34(u16 command, const u8* manufacturerAddress);
|
||||
int AOSS_81401104(const AOSSOptionRecord* packet, AOSSStoredConfig* config);
|
||||
int AOSS_81401284(const AOSSOptionRecord* packet, AOSSStoredConfig* config);
|
||||
void AOSS_81401C9C(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength);
|
||||
void AOSS_81401DC0(u32 seed, u32* table);
|
||||
s16 AOSS_81401BBC(void* buffer);
|
||||
void AOSSInitKeySchedule(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength);
|
||||
void AOSSInitCrc32Table(u32 seed, u32* table);
|
||||
s16 AOSSBuildInterfaceOption(void* buffer);
|
||||
int AOSS_81401574(void* packet, AOSSRequestRecords* request, int socket);
|
||||
int AOSS_81401778(void* packet, void* request, int socket);
|
||||
int AOSS_81401E80(void* packet, s32 length, char* key, int keyLength);
|
||||
int AOSS_814020CC(void* settings, void* config);
|
||||
int AOSSXorBufferWithKey(void* packet, s32 length, char* key, int keyLength);
|
||||
int AOSSConnectAndAwaitHost(void* settings, void* config);
|
||||
int AOSS_81400E0C(const AOSSOptionRecord* packet, u8* settings);
|
||||
int AOSS_814013AC(int state, const AOSSReplyOption* response, int responseLength, void* config, void* networkData);
|
||||
|
||||
@@ -652,7 +652,7 @@ int AOSS_Init_old(AOSSInitInput* input)
|
||||
}
|
||||
goto finish_initialization;
|
||||
wait_for_initial_link:
|
||||
state = AOSS_814020CC(&settings,s_accessPointConfig);
|
||||
state = AOSSConnectAndAwaitHost(&settings,s_accessPointConfig);
|
||||
if (state == -1) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
@@ -860,7 +860,7 @@ request_socket_cleanup_complete:
|
||||
memset(s_accessPointConfig,0,0x58);
|
||||
initialWait = waitIntervals.limits.connection;
|
||||
for (waitAttempt = 0; waitAttempt < (short)initialWait; waitAttempt++) {
|
||||
requestResult = AOSS_814020CC(&settings,s_accessPointConfig);
|
||||
requestResult = AOSSConnectAndAwaitHost(&settings,s_accessPointConfig);
|
||||
if (requestResult == -1) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
@@ -969,7 +969,7 @@ request_socket_cleanup_complete:
|
||||
memset(s_responseBuffer,0,0x5dc);
|
||||
memcpy(messageIdentity,&requestRecords.records[2],8);
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
AOSS_81401E80(messageIdentity,8,s_manufacturer,manufacturerLength);
|
||||
AOSSXorBufferWithKey(messageIdentity,8,s_manufacturer,manufacturerLength);
|
||||
receivedLength = SOHtoNs(1);
|
||||
packetWords->initialLength = receivedLength;
|
||||
packetWords->initialType = 0;
|
||||
@@ -1206,7 +1206,7 @@ wait_for_packet:
|
||||
memset(s_accessPointConfig,0,0x58);
|
||||
initialWait = waitIntervals.limits.connection;
|
||||
for (waitAttempt = 0; waitAttempt < (short)initialWait; waitAttempt++) {
|
||||
state = AOSS_814020CC(&settings,s_accessPointConfig);
|
||||
state = AOSSConnectAndAwaitHost(&settings,s_accessPointConfig);
|
||||
if (state == -1) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
@@ -1611,7 +1611,7 @@ int AOSS_814001B4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
(*count)++;
|
||||
return state;
|
||||
}
|
||||
if (AOSS_81400830((AOSSDecryptionMessage*)&packet->message) > 0) {
|
||||
if (AOSSDecryptMessage((AOSSDecryptionMessage*)&packet->message) > 0) {
|
||||
(*count)++;
|
||||
return state;
|
||||
}
|
||||
@@ -1652,7 +1652,7 @@ int AOSS_814002F0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
reply = &packet->message.payload.reply;
|
||||
requestRecord = &request->records[0];
|
||||
AOSS_81401E80(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
AOSSXorBufferWithKey(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
compareResult = memcmp(requestRecord->address, packet->message.payload.manufacturerAddress, 6);
|
||||
if (compareResult != 0) {
|
||||
validationResult = -1;
|
||||
@@ -1724,7 +1724,7 @@ int AOSS_814004D0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
operationResult = 0;
|
||||
reply = &packet->message.payload.reply;
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
AOSS_81401E80(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
AOSSXorBufferWithKey(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
compareResult = memcmp(request->records[1].address,
|
||||
packet->message.payload.manufacturerAddress, 6);
|
||||
if (compareResult != 0) {
|
||||
@@ -1788,7 +1788,7 @@ int AOSS_814006A4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
|
||||
errorCode = 0;
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
AOSS_81401E80(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
AOSSXorBufferWithKey(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
compareResult = memcmp(request->records[2].address,
|
||||
packet->message.payload.manufacturerAddress, 6);
|
||||
if (compareResult != 0) {
|
||||
@@ -1828,7 +1828,7 @@ int AOSS_814006A4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
return result;
|
||||
}
|
||||
|
||||
int AOSS_81400830(AOSSDecryptionMessage* message) {
|
||||
int AOSSDecryptMessage(AOSSDecryptionMessage* message) {
|
||||
u32 checksum;
|
||||
u8 manufacturerAddress[8];
|
||||
AOSSKeySchedule schedule;
|
||||
@@ -1850,7 +1850,7 @@ int AOSS_81400830(AOSSDecryptionMessage* message) {
|
||||
int result;
|
||||
|
||||
memcpy(manufacturerAddress, message->manufacturerAddress, sizeof(manufacturerAddress));
|
||||
result = AOSS_81401E80(manufacturerAddress, sizeof(manufacturerAddress), s_manufacturer,
|
||||
result = AOSSXorBufferWithKey(manufacturerAddress, sizeof(manufacturerAddress), s_manufacturer,
|
||||
strlen(s_manufacturer));
|
||||
if (result == -1) {
|
||||
s_errorCode = 2;
|
||||
@@ -1886,7 +1886,7 @@ int AOSS_81400830(AOSSDecryptionMessage* message) {
|
||||
} else {
|
||||
memcpy(s_packetState.keyNonce, &encrypted->keyNonce, sizeof(encrypted->keyNonce));
|
||||
memcpy(s_packetState.keyAddress, s_accessPointName, sizeof(s_accessPointName));
|
||||
AOSS_81401C9C(&schedule, s_packetState.keyNonce,
|
||||
AOSSInitKeySchedule(&schedule, s_packetState.keyNonce,
|
||||
sizeof(s_packetState.keyNonce) + sizeof(s_packetState.keyAddress), dataLength);
|
||||
|
||||
outputCursor = decryptedData;
|
||||
@@ -1906,7 +1906,7 @@ int AOSS_81400830(AOSSDecryptionMessage* message) {
|
||||
}
|
||||
|
||||
crc = 0xffffffff;
|
||||
AOSS_81401DC0(0, s_crcTable);
|
||||
AOSSInitCrc32Table(0, s_crcTable);
|
||||
for (crcIndex = 0; crcIndex < (s32)dataLength; crcIndex++) {
|
||||
crc = (crc >> 8) ^ s_crcTable[(crc ^ decryptedData[crcIndex]) & 0xff];
|
||||
}
|
||||
@@ -2257,7 +2257,7 @@ int AOSS_81401574(void* packet, AOSSRequestRecords* request, int socket) {
|
||||
responsePayload = response->payload;
|
||||
memcpy(s_accessPointName, &request->records[0], 8);
|
||||
memcpy(accessPointName, s_accessPointName, 8);
|
||||
recordLength = AOSS_81401BBC(&requestRecord->record);
|
||||
recordLength = AOSSBuildInterfaceOption(&requestRecord->record);
|
||||
if (recordLength < 0) {
|
||||
s_errorCode = 3;
|
||||
if (requestRecord != 0) {
|
||||
@@ -2269,7 +2269,7 @@ int AOSS_81401574(void* packet, AOSSRequestRecords* request, int socket) {
|
||||
requestRecord->length = SOHtoNs(recordLength);
|
||||
requestLength = recordLength + 4;
|
||||
memcpy(responsePayload, requestRecord, requestLength);
|
||||
encryptionResult = AOSS_81401E80(accessPointName, 8, s_manufacturer, 6);
|
||||
encryptionResult = AOSSXorBufferWithKey(accessPointName, 8, s_manufacturer, 6);
|
||||
if (encryptionResult != 0) {
|
||||
s_errorCode = 2;
|
||||
if (requestRecord != 0) {
|
||||
@@ -2343,7 +2343,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
const u32* crcTable;
|
||||
sequence = 1;
|
||||
checksum = 0xffffffff;
|
||||
AOSS_81401DC0(0, s_crcTable);
|
||||
AOSSInitCrc32Table(0, s_crcTable);
|
||||
crcTable = s_crcTable;
|
||||
{
|
||||
u32 part;
|
||||
@@ -2361,7 +2361,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
memcpy(&payload->encrypted.key.nonce, &nonce, 2);
|
||||
memcpy(s_packetState.keyNonce, payload->encrypted.key.nonceBytes, 2);
|
||||
memcpy(s_packetState.keyAddress, s_accessPointName, 8);
|
||||
AOSS_81401C9C(&construction.schedule, s_packetState.keyNonce,
|
||||
AOSSInitKeySchedule(&construction.schedule, s_packetState.keyNonce,
|
||||
sizeof(s_packetState.keyNonce) + sizeof(s_packetState.keyAddress), 8);
|
||||
for (index = 0; index < 8; index++) {
|
||||
state = construction.schedule.bytes;
|
||||
@@ -2386,7 +2386,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
}
|
||||
|
||||
memcpy(construction.accessPointName, &requestRecords->records[1], 8);
|
||||
encryptionResult = AOSS_81401E80(construction.accessPointName, 8, s_manufacturer, 6);
|
||||
encryptionResult = AOSSXorBufferWithKey(construction.accessPointName, 8, s_manufacturer, 6);
|
||||
if (encryptionResult != 0) {
|
||||
s_errorCode = 2;
|
||||
return -1;
|
||||
@@ -2415,7 +2415,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
s16 AOSS_81401BBC(void* buffer) {
|
||||
s16 AOSSBuildInterfaceOption(void* buffer) {
|
||||
AOSSOptionRecord* record = (AOSSOptionRecord*)buffer;
|
||||
u32 optionValue;
|
||||
s16 dataLength;
|
||||
@@ -2439,7 +2439,7 @@ s16 AOSS_81401BBC(void* buffer) {
|
||||
return (s16)(dataLength + 10);
|
||||
}
|
||||
|
||||
void AOSS_81401C9C(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength) {
|
||||
void AOSSInitKeySchedule(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength) {
|
||||
u32 index = 0;
|
||||
u32 keyIndex;
|
||||
u32 swapIndex;
|
||||
@@ -2471,7 +2471,7 @@ void AOSS_81401C9C(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32
|
||||
}
|
||||
}
|
||||
|
||||
void AOSS_81401DC0(u32 seed, u32* table) {
|
||||
void AOSSInitCrc32Table(u32 seed, u32* table) {
|
||||
u32 index;
|
||||
u32 value;
|
||||
|
||||
@@ -2488,7 +2488,7 @@ void AOSS_81401DC0(u32 seed, u32* table) {
|
||||
}
|
||||
}
|
||||
|
||||
int AOSS_81401E80(void* packet, s32 length, char* key, int keyLength) {
|
||||
int AOSSXorBufferWithKey(void* packet, s32 length, char* key, int keyLength) {
|
||||
u8* temporaryHalf;
|
||||
s32 halfLength = length / 2;
|
||||
u8* packetHalf;
|
||||
@@ -2542,7 +2542,7 @@ int AOSS_81401E80(void* packet, s32 length, char* key, int keyLength) {
|
||||
return result;
|
||||
}
|
||||
|
||||
int AOSS_814020CC(void* settings, void* config) {
|
||||
int AOSSConnectAndAwaitHost(void* settings, void* config) {
|
||||
s32 connectionAttempts = 0;
|
||||
u32 ticksPerMillisecond;
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ static u8 secondaryDns[4];
|
||||
static void* (*allocateMemory)(u32, s32);
|
||||
static void (*releaseMemory)(u32, void*, s32);
|
||||
static void (*statusCallback)(void);
|
||||
static NCDIfConfig AOSS_810BD4A8;
|
||||
static NCDIpConfig AOSS_810BD608;
|
||||
static NCDIfConfig AOSSi_NcdIfConfig;
|
||||
static NCDIpConfig AOSSi_NcdIpConfig;
|
||||
|
||||
struct AOSSRate {
|
||||
u16 mask;
|
||||
@@ -60,11 +60,11 @@ void AOSSi_Cancel(void) {
|
||||
AOSSi_cancel_flag = 1;
|
||||
}
|
||||
|
||||
void AOSS_813FD17C(OSAlarm* alarm, OSContext* context) {
|
||||
void AOSSi_SleepAlarmHandler(OSAlarm* alarm, OSContext* context) {
|
||||
OSSendMessage((OSMessageQueue*)alarm->tag, NULL, 0);
|
||||
}
|
||||
|
||||
void AOSS_813FD18C(u32 milliseconds) {
|
||||
void AOSSi_SleepMs(u32 milliseconds) {
|
||||
OSMessage storage;
|
||||
OSMessage message;
|
||||
OSMessageQueue queue;
|
||||
@@ -72,7 +72,7 @@ void AOSS_813FD18C(u32 milliseconds) {
|
||||
OSInitMessageQueue(&queue, &storage, 1);
|
||||
OSCreateAlarm(&alarm);
|
||||
OSSetAlarmTag(&alarm, (u32)&queue);
|
||||
OSSetAlarm(&alarm, (u32)(milliseconds * (OS_TIMER_CLOCK / 1000)), AOSS_813FD17C);
|
||||
OSSetAlarm(&alarm, (u32)(milliseconds * (OS_TIMER_CLOCK / 1000)), AOSSi_SleepAlarmHandler);
|
||||
OSReceiveMessage(&queue, &message, 1);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void AOSSi_Free(void* block) {
|
||||
}
|
||||
}
|
||||
|
||||
void AOSS_813FD25C(u8* destination, u32 address) {
|
||||
void AOSSi_StoreIpv4Octets(u8* destination, u32 address) {
|
||||
int index;
|
||||
for (index = 0; index < 4; ++index) {
|
||||
*destination++ = address >> ((3 - index) * 8);
|
||||
@@ -97,11 +97,11 @@ void AOSS_813FD25C(u8* destination, u32 address) {
|
||||
}
|
||||
|
||||
int AOSSi_SetNCDIPAddr(u32 address, u32 netmask, u32 gateway, u32 dns1, u32 dns2) {
|
||||
AOSS_813FD25C(ipAddress, address);
|
||||
AOSS_813FD25C(ipNetmask, netmask);
|
||||
AOSS_813FD25C(ipGateway, gateway);
|
||||
AOSS_813FD25C(primaryDns, dns1);
|
||||
AOSS_813FD25C(secondaryDns, dns2);
|
||||
AOSSi_StoreIpv4Octets(ipAddress, address);
|
||||
AOSSi_StoreIpv4Octets(ipNetmask, netmask);
|
||||
AOSSi_StoreIpv4Octets(ipGateway, gateway);
|
||||
AOSSi_StoreIpv4Octets(primaryDns, dns1);
|
||||
AOSSi_StoreIpv4Octets(secondaryDns, dns2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ startup:
|
||||
goto unlock;
|
||||
}
|
||||
++startupRetries;
|
||||
AOSS_813FD18C(10);
|
||||
AOSSi_SleepMs(10);
|
||||
goto startup;
|
||||
}
|
||||
if (WD_GetInfo(&info) == 0) {
|
||||
@@ -231,7 +231,7 @@ startup:
|
||||
*output = list;
|
||||
break;
|
||||
}
|
||||
AOSS_813FD18C(100);
|
||||
AOSSi_SleepMs(100);
|
||||
}
|
||||
AOSSi_Free(buffer);
|
||||
}
|
||||
@@ -242,7 +242,7 @@ cleanup:
|
||||
goto unlock;
|
||||
}
|
||||
++cleanupRetries;
|
||||
AOSS_813FD18C(10);
|
||||
AOSSi_SleepMs(10);
|
||||
goto cleanup;
|
||||
}
|
||||
unlock:
|
||||
@@ -252,7 +252,7 @@ unlock:
|
||||
return -1;
|
||||
}
|
||||
++unlockRetries;
|
||||
AOSS_813FD18C(10);
|
||||
AOSSi_SleepMs(10);
|
||||
goto unlock;
|
||||
}
|
||||
return result;
|
||||
@@ -262,7 +262,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
|
||||
int retries = 0;
|
||||
int result = 0;
|
||||
WD_Info info ATTRIBUTE_ALIGN(32);
|
||||
NCDIfConfig* interfaceConfig = &AOSS_810BD4A8;
|
||||
NCDIfConfig* interfaceConfig = &AOSSi_NcdIfConfig;
|
||||
NCDIpConfig* ipConfig;
|
||||
memset(interfaceConfig, 0, sizeof(*interfaceConfig));
|
||||
interfaceConfig->selectedMedia = 1;
|
||||
@@ -288,7 +288,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
|
||||
}
|
||||
interfaceConfig->netif.wireless.config.manual.ssidLength = (u8)connection->ssidLength;
|
||||
memcpy(interfaceConfig->netif.wireless.config.manual.ssid, connection->ssid, connection->ssidLength);
|
||||
ipConfig = &AOSS_810BD608;
|
||||
ipConfig = &AOSSi_NcdIpConfig;
|
||||
memset(ipConfig, 0, sizeof(*ipConfig));
|
||||
ipConfig->adjust.maxTransferUnit = 1300;
|
||||
ipConfig->adjust.tcpRetransTimeout = 100;
|
||||
@@ -303,7 +303,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
|
||||
if (NCDSetIpConfig(ipConfig) != 0) {
|
||||
result = -1;
|
||||
}
|
||||
if (result == 0 && NCDSetIfConfig(&AOSS_810BD4A8) != 0) {
|
||||
if (result == 0 && NCDSetIfConfig(&AOSSi_NcdIfConfig) != 0) {
|
||||
result = -1;
|
||||
}
|
||||
if (result == 0) {
|
||||
@@ -317,7 +317,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
|
||||
break;
|
||||
}
|
||||
++retries;
|
||||
AOSS_813FD18C(10);
|
||||
AOSSi_SleepMs(10);
|
||||
}
|
||||
}
|
||||
if (result == 0) {
|
||||
@@ -335,7 +335,7 @@ int AOSSi_WLANConnect(struct AOSSConnection* connection, struct AOSSConnectionSt
|
||||
}
|
||||
|
||||
void AOSSi_Sleep(u32 milliseconds) {
|
||||
AOSS_813FD18C(milliseconds);
|
||||
AOSSi_SleepMs(milliseconds);
|
||||
}
|
||||
|
||||
int AOSSi_Status(void) {
|
||||
|
||||
@@ -64,6 +64,11 @@ namespace ipl {
|
||||
static s32 sAOSSState;
|
||||
static s32 sAOSSUnk;
|
||||
|
||||
struct AOSSStack {
|
||||
u32 storage[4080];
|
||||
u32 sentinel;
|
||||
};
|
||||
|
||||
class AOSSThread : public utility::ut_thread {
|
||||
public:
|
||||
AOSSThread(EGG::Heap* heap);
|
||||
@@ -84,7 +89,7 @@ namespace ipl {
|
||||
private:
|
||||
s32 mState; // 0x32C
|
||||
s32 mThreadPriority; // 0x330
|
||||
u8* mpStackBuffer; // 0x334
|
||||
AOSSStack* mpStack; // 0x334
|
||||
u8* mpHeapBuffer; // 0x338
|
||||
MEMHeapHandle mpExpHeap; // 0x33C
|
||||
AOSSConfig mAoss; // 0x340
|
||||
@@ -94,7 +99,7 @@ namespace ipl {
|
||||
mpExpHeap = NULL;
|
||||
sAOSSState = 0;
|
||||
mpHeapBuffer = (u8*)heap->alloc(0x40000, 0x20);
|
||||
mpStackBuffer = (u8*)heap->alloc(0x1000, 0x20);
|
||||
mpStack = (AOSSStack*)heap->alloc(0x1000, 0x20);
|
||||
}
|
||||
|
||||
void AOSSThread::destroy(int flag) {
|
||||
@@ -137,8 +142,8 @@ namespace ipl {
|
||||
mThreadPriority = OSGetThreadPriority(OSGetCurrentThread()) - 2;
|
||||
sAOSSState = 1;
|
||||
SOInit(&config);
|
||||
memset(mpStackBuffer, 0, 4);
|
||||
Create(mpStackBuffer, 0x1000, mThreadPriority, TRUE);
|
||||
memset(mpStack, 0, 4);
|
||||
Create(mpStack, 0x1000, mThreadPriority, TRUE);
|
||||
|
||||
OSRestoreInterrupts(level);
|
||||
return 1;
|
||||
@@ -178,7 +183,7 @@ namespace ipl {
|
||||
mAoss.unk_0x04 = 4;
|
||||
NETGetWirelessMacAddress(mAoss.mac);
|
||||
|
||||
*(u32*)(mpStackBuffer + 0x3FC0) = 0x97654321;
|
||||
mpStack->sentinel = 0x97654321;
|
||||
|
||||
mState = AOSSi_Init(&mAoss);
|
||||
AOSSi_EndLocal();
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
TextBalloon::TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const math::VEC3& unk2,
|
||||
f32 unk3, f32 unk4)
|
||||
: unk_0x08(FALSE), mpText(NULL), mTextLen(0), mBalloonPos(unk2), unk_0x28(0), unk_0x2C(1), unk_0x30(unk3), unk_0x34(unk4),
|
||||
TextBalloon::TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const math::VEC3& initialPos,
|
||||
f32 margin16x9, f32 margin4x3)
|
||||
: mbWaitingFadeIn(FALSE), mpText(NULL), mTextLen(0), mBalloonPos(initialPos), mHAlign(0), mbUse16x9X(1), mMargin16x9(margin16x9), mMargin4x3(margin4x3),
|
||||
mWaitUntilFadeIn(0) {
|
||||
mpLayout = new (heap, 4) layout::Object(heap, layoutFile, directory, fileName);
|
||||
mpLayout->bind("my_IplTopBalloon_a_BalloonInOut.brlan");
|
||||
@@ -31,7 +31,7 @@ namespace ipl {
|
||||
void TextBalloon::calc() {
|
||||
mpLayout->calc();
|
||||
|
||||
switch (unk_0x08) {
|
||||
switch (mbWaitingFadeIn) {
|
||||
case TRUE: {
|
||||
break;
|
||||
}
|
||||
@@ -73,7 +73,7 @@ namespace ipl {
|
||||
|
||||
balloonPane->SetVisible(false);
|
||||
|
||||
unk_0x08 = FALSE;
|
||||
mbWaitingFadeIn = FALSE;
|
||||
}
|
||||
|
||||
void TextBalloon::fadein() {
|
||||
@@ -81,7 +81,7 @@ namespace ipl {
|
||||
mpLayout->FindPaneByName("N_Balloon")->SetVisible(false);
|
||||
|
||||
mWaitUntilFadeIn = 0;
|
||||
unk_0x08 = TRUE;
|
||||
mbWaitingFadeIn = TRUE;
|
||||
|
||||
set_textbox(mpText);
|
||||
set_translate(mBalloonPos);
|
||||
@@ -91,17 +91,17 @@ namespace ipl {
|
||||
void TextBalloon::fadeinNoSetTextbox() {
|
||||
if (mpText != NULL) {
|
||||
mWaitUntilFadeIn = 0;
|
||||
unk_0x08 = TRUE;
|
||||
mbWaitingFadeIn = TRUE;
|
||||
|
||||
set_translate(mBalloonPos);
|
||||
}
|
||||
}
|
||||
|
||||
void TextBalloon::setPos(const math::VEC3& pos, bool unk0, int unk1) {
|
||||
void TextBalloon::setPos(const math::VEC3& pos, bool use16x9X, int hAlign) {
|
||||
mBalloonPos = pos;
|
||||
|
||||
unk_0x28 = unk1;
|
||||
unk_0x2C = unk0;
|
||||
mHAlign = hAlign;
|
||||
mbUse16x9X = use16x9X;
|
||||
|
||||
nw4r::ut::Rect proj16x9;
|
||||
nw4r::ut::Rect proj4x3;
|
||||
@@ -109,7 +109,7 @@ namespace ipl {
|
||||
System::getProjectionRect(&proj16x9);
|
||||
System::getProjectionRect4x3(&proj4x3);
|
||||
|
||||
if (unk_0x2C == 0) {
|
||||
if (mbUse16x9X == 0) {
|
||||
mBalloonPos.x *= proj4x3.GetWidth() / proj16x9.GetWidth();
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ namespace ipl {
|
||||
System::getProjectionRect(&proj16x9);
|
||||
System::getProjectionRect4x3(&proj4x3);
|
||||
|
||||
if (unk_0x2C == 0) {
|
||||
if (mbUse16x9X == 0) {
|
||||
mBalloonPos.x *= proj4x3.GetWidth() / proj16x9.GetWidth();
|
||||
}
|
||||
|
||||
@@ -133,27 +133,27 @@ namespace ipl {
|
||||
if (mWaitUntilFadeIn++ > WAIT_UNTIL_FADE_IN) {
|
||||
anm_fadein();
|
||||
snd::getSystem()->startSE("WIPL_SE_BALLOON");
|
||||
unk_0x08 = FALSE;
|
||||
mbWaitingFadeIn = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void TextBalloon::fadeout() {
|
||||
if (!unk_0x08) {
|
||||
if (!mbWaitingFadeIn) {
|
||||
mpLayout->setAnmType(ANIM_TYPE_BACKWARD);
|
||||
mpLayout->start();
|
||||
}
|
||||
unk_0x08 = FALSE;
|
||||
mbWaitingFadeIn = FALSE;
|
||||
}
|
||||
|
||||
void TextBalloon::fadeoutForce() {
|
||||
if (!unk_0x08) {
|
||||
if (!mbWaitingFadeIn) {
|
||||
if (mpLayout->getAnim()->getAnmType() == ANIM_TYPE_FORWARD) {
|
||||
mpLayout->getAnim()->setAnmType(ANIM_TYPE_BACKWARD);
|
||||
mpLayout->getAnim()->restart();
|
||||
}
|
||||
} else if (unk_0x08 == TRUE) {
|
||||
} else if (mbWaitingFadeIn == TRUE) {
|
||||
mWaitUntilFadeIn = 0;
|
||||
unk_0x08 = FALSE;
|
||||
mbWaitingFadeIn = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,9 +167,9 @@ namespace ipl {
|
||||
f32 temp0;
|
||||
|
||||
if (SCGetAspectRatio() == SC_ASPECT_RATIO_16x9) {
|
||||
temp0 = unk_0x30;
|
||||
temp0 = mMargin16x9;
|
||||
} else {
|
||||
temp0 = unk_0x34;
|
||||
temp0 = mMargin4x3;
|
||||
}
|
||||
|
||||
nw4r::lyt::Pane* balloonPane = mpLayout->FindPaneByName("N_Balloon");
|
||||
@@ -181,7 +181,7 @@ namespace ipl {
|
||||
System::getProjectionRect(&proj16x9);
|
||||
System::getProjectionRect4x3(&proj4x3);
|
||||
|
||||
switch (unk_0x28) {
|
||||
switch (mHAlign) {
|
||||
case 1: {
|
||||
temp1 = get_size("W_Base")->width / 2;
|
||||
break;
|
||||
@@ -192,7 +192,7 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
if (unk_0x2C == 0) {
|
||||
if (mbUse16x9X == 0) {
|
||||
temp1 *= proj4x3.GetWidth() / proj16x9.GetWidth();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ extern "C" {
|
||||
extern "C" void _seBlk__Q23ipl3snd();
|
||||
extern "C" nw4r::snd::SoundHandle* _mainBGMHandle__Q23ipl3snd;
|
||||
extern "C" const f32 scSoundZeroF;
|
||||
extern "C" const f32 lbl_816946AC;
|
||||
extern "C" const f32 lbl_816946A8;
|
||||
extern "C" const f32 lbl_816946B0;
|
||||
extern "C" const f32 lbl_816946B4;
|
||||
extern "C" const f32 scSoundOneF;
|
||||
extern "C" const f32 scSoundTwoF;
|
||||
extern "C" const f32 scSoundThirtyF;
|
||||
extern "C" const f32 scSoundSixtyF;
|
||||
extern "C" {
|
||||
void _savegpr_29();
|
||||
void pauseOffSE__Q33ipl3snd6SystemFv();
|
||||
@@ -500,21 +500,21 @@ namespace snd {
|
||||
if (block->handle.detail_GetAttachedSound() != NULL) {
|
||||
block->handle.detail_GetAttachedSound()->SetPan(pan);
|
||||
}
|
||||
f32 pitch = lbl_816946A8 * y / rect.right;
|
||||
if (lbl_816946AC < pitch) {
|
||||
pitch = lbl_816946AC;
|
||||
f32 pitch = scSoundTwoF * y / rect.right;
|
||||
if (scSoundOneF < pitch) {
|
||||
pitch = scSoundOneF;
|
||||
}
|
||||
if (block->handle.detail_GetAttachedSound() != NULL) {
|
||||
block->handle.detail_GetAttachedSound()->SetVolume(pitch, 0);
|
||||
}
|
||||
if (lbl_816946B0 < y) {
|
||||
f32 pitch2 = y / lbl_816946B0;
|
||||
if (scSoundThirtyF < y) {
|
||||
f32 pitch2 = y / scSoundThirtyF;
|
||||
if (block->handle.detail_GetAttachedSound() != NULL) {
|
||||
block->handle.detail_GetAttachedSound()->SetPitch(pitch2);
|
||||
}
|
||||
} else if (lbl_816946B4 < y) {
|
||||
} else if (scSoundSixtyF < y) {
|
||||
if (block->handle.detail_GetAttachedSound() != NULL) {
|
||||
block->handle.detail_GetAttachedSound()->SetPitch(lbl_816946A8);
|
||||
block->handle.detail_GetAttachedSound()->SetPitch(scSoundTwoF);
|
||||
}
|
||||
}
|
||||
return (int)block;
|
||||
|
||||
Reference in New Issue
Block a user