Compare commits
180 Commits
agent/w092
...
cleanup/cd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abf047831a | ||
|
|
17be3b014b | ||
|
|
0d9d3d1081 | ||
|
|
196b14aa58 | ||
|
|
1dde229702 | ||
|
|
94c03497ff | ||
|
|
e9dd012c09 | ||
|
|
90e7b0ff2c | ||
|
|
f7ec594202 | ||
|
|
ceefb50e42 | ||
|
|
5d1a8bd697 | ||
|
|
c42fb1fe71 | ||
|
|
8e96e8a722 | ||
|
|
854cc579df | ||
|
|
26a36e2964 | ||
|
|
8729671a43 | ||
|
|
08f5f08a13 | ||
|
|
893afc25b4 | ||
|
|
dee9f9d8ea | ||
|
|
728bfa984b | ||
|
|
921234fdac | ||
|
|
9d6f9dce74 | ||
|
|
f1bcb9d78c | ||
|
|
efda1f0093 | ||
|
|
115bc95101 | ||
|
|
cbac1eda5a | ||
|
|
f0de86aa16 | ||
|
|
215f40f835 | ||
|
|
5b364355cd | ||
|
|
ea8e69528f | ||
|
|
2a5fbdb4b9 | ||
|
|
dd3cd80d9b | ||
|
|
3cbe527d23 | ||
|
|
3ab6d87c3d | ||
|
|
40653c3c02 | ||
|
|
f0829ff810 | ||
|
|
ffdd7b58e0 | ||
|
|
1a0f83a156 | ||
|
|
a3d088e4d3 | ||
|
|
3b90bd66c6 | ||
|
|
b395269be6 | ||
|
|
60bc67e097 | ||
|
|
4e8223f3d4 | ||
|
|
3f36d5f4cc | ||
|
|
1f0dc64062 | ||
|
|
5db0cd6086 | ||
|
|
54b44a3534 | ||
|
|
1493baaba0 | ||
|
|
22dd088277 | ||
|
|
1bbc40cb3b | ||
|
|
e6bf9cc669 | ||
|
|
ffd9cc4a69 | ||
|
|
eb8f78788d | ||
|
|
889823ed67 | ||
|
|
7dea4122fc | ||
|
|
1802d45758 | ||
|
|
130cc9e88e | ||
|
|
a801d1c5d6 | ||
|
|
8ab07fbb20 | ||
|
|
f68fcc0f9b | ||
|
|
5ad481ae40 | ||
|
|
713951c551 | ||
|
|
b47507aa3f | ||
|
|
01a73b600f | ||
|
|
83b577cf62 | ||
|
|
f67990d237 | ||
|
|
ad85ad1537 | ||
|
|
f32665703f | ||
|
|
e062e1c669 | ||
|
|
76a60f8c1a | ||
|
|
63579601e2 | ||
|
|
e46bac9a1b | ||
|
|
1f224c53c1 | ||
|
|
30e2147479 | ||
|
|
6ffcbf8f46 | ||
|
|
47add32987 | ||
|
|
e0ea552982 | ||
|
|
c7949ac4f0 | ||
|
|
e697514b7b | ||
|
|
32c3f7f2cd | ||
|
|
1618565c1d | ||
|
|
6040414eec | ||
|
|
08acc800f1 | ||
|
|
0703b62968 | ||
|
|
86c3cacc2d | ||
|
|
f7e6fc5387 | ||
|
|
dfbb774ce4 | ||
|
|
9b69048f06 | ||
|
|
602b10ed43 | ||
|
|
f0a91338f4 | ||
|
|
ff568a273c | ||
|
|
9f6ef656fd | ||
|
|
9d2f607b3f | ||
|
|
c836ab8bae | ||
|
|
b889c52efc | ||
|
|
282c29b2c7 | ||
|
|
27e37fd7ee | ||
|
|
00051c32c6 | ||
|
|
80fecf3aa3 | ||
|
|
37724c57d6 | ||
|
|
1a32db7bdc | ||
|
|
2aab31c1f9 | ||
|
|
24c84f5bfc | ||
|
|
73de5786da | ||
|
|
3abcd34252 | ||
|
|
5c20a11fa8 | ||
|
|
f85a98a6e3 | ||
|
|
137ee3242a | ||
|
|
2368a9a774 | ||
|
|
90399bb6cf | ||
|
|
fc831357ea | ||
|
|
e2191ae933 | ||
|
|
7d77c095c0 | ||
|
|
db8ff7e141 | ||
|
|
2cb6c2dfae | ||
|
|
6f96235605 | ||
|
|
367b042e63 | ||
|
|
feb7ba400d | ||
|
|
20f4af8beb | ||
|
|
dca6cd9aef | ||
|
|
a0700bf908 | ||
|
|
de058b4298 | ||
|
|
c5468cbe50 | ||
|
|
62591733eb | ||
|
|
e2488b073a | ||
|
|
9a8de22195 | ||
|
|
a6bf0e5f4f | ||
|
|
d434f5b897 | ||
|
|
0adc759b42 | ||
|
|
9c55b47c1d | ||
|
|
081329daa8 | ||
|
|
a348c9777a | ||
|
|
d5204f5c62 | ||
|
|
cedc1f1390 | ||
|
|
ff0cce33f6 | ||
|
|
2beeb23a47 | ||
|
|
35d9ed53b1 | ||
|
|
015d50906c | ||
|
|
348da5bd89 | ||
|
|
cdceb82200 | ||
|
|
1b56ea5051 | ||
|
|
3946983f96 | ||
|
|
85d75cd0cf | ||
|
|
af39f2678f | ||
|
|
d613662c54 | ||
|
|
0e6e235004 | ||
|
|
020e1b6f0b | ||
|
|
3440aab039 | ||
|
|
dab806eaa2 | ||
|
|
f4fd16f88f | ||
|
|
3d8de1a356 | ||
|
|
8e43db0528 | ||
|
|
21c9b95b1b | ||
|
|
d4bdd3462c | ||
|
|
f7d81a0196 | ||
|
|
4f35874d02 | ||
|
|
0a5cbaf78e | ||
|
|
6e7c016ae3 | ||
|
|
e60306db62 | ||
|
|
5d0ced6a15 | ||
|
|
858a507ddf | ||
|
|
ce424f1a3e | ||
|
|
bcb37e07ef | ||
|
|
11094c638a | ||
|
|
cb49bde9c6 | ||
|
|
df9fd72e87 | ||
|
|
0c554a1602 | ||
|
|
f00336cc8b | ||
|
|
842bbc6942 | ||
|
|
ab01520044 | ||
|
|
5f948d3f3a | ||
|
|
699f844395 | ||
|
|
3afb9d8425 | ||
|
|
72c3f4ba2d | ||
|
|
905c45b998 | ||
|
|
5a849425b1 | ||
|
|
fd11ddb195 | ||
|
|
d9b51418b9 | ||
|
|
87e7ab6922 | ||
|
|
d186251506 |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.09% | 86.63% | 60.56% | 91.10% |
|
||||
| 99.38% | 87.96% | 62.33% | 92.07% |
|
||||
|
||||
units 910/1027 complete, functions 12153/12563 matched.
|
||||
units 919/1027 complete, functions 12224/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 -->
|
||||
|
||||
@@ -804,14 +804,14 @@ src/scene/sdChannelSelect/iplSDChannelObj.cpp:
|
||||
.rodata start:0x81610608 end:0x81610918
|
||||
.data start:0x81654B38 end:0x81654F98
|
||||
.sdata2 start:0x81694B18 end:0x81694B60
|
||||
.sdata start:0x81696DD0 end:0x81696E40
|
||||
.sdata start:0x81696DD0 end:0x81696E30
|
||||
|
||||
src/scene/sdChannelTitle/iplSDChannelTitle.cpp:
|
||||
.text start:0x813E4BBC end:0x813E947C
|
||||
.rodata start:0x81610918 end:0x81610948
|
||||
.data start:0x81654F98 end:0x81655638
|
||||
.sdata2 start:0x81694B60 end:0x81694B88
|
||||
.sdata start:0x81696E40 end:0x81696EF0
|
||||
.sdata start:0x81696E30 end:0x81696EF0
|
||||
|
||||
src/scene/sdButton/iplSDButton.cpp:
|
||||
.text start:0x813E947C end:0x813EA88C
|
||||
@@ -1054,7 +1054,7 @@ src/keyboard/tiNw4rManager.cpp:
|
||||
.data start:0x8165F818 end:0x8165F8F0
|
||||
.sdata2 start:0x81694E10 end:0x81694E28
|
||||
|
||||
src/keyboard/tiManager.cpp:
|
||||
src/keyboard/tiKeyboard.cpp:
|
||||
.text start:0x81437558 end:0x81439608
|
||||
.ctors start:0x8160D208 end:0x8160D20C
|
||||
.data start:0x8165F8F0 end:0x81660378
|
||||
@@ -1111,7 +1111,7 @@ src/keyboard/MyTiInputForm.cpp:
|
||||
|
||||
src/keyboard/MyTiLetterForm.cpp:
|
||||
.text start:0x81444730 end:0x814454D8
|
||||
.rodata start:0x816168B8 end:0x81616B88
|
||||
.rodata start:0x816168B8 end:0x81616BC8
|
||||
.data start:0x81668860 end:0x81668CD8
|
||||
.sdata2 start:0x81694EB0 end:0x81694ED0
|
||||
.sdata start:0x81697528 end:0x81697570
|
||||
@@ -1138,7 +1138,7 @@ src/keyboard/tiHKBManager.cpp:
|
||||
src/keyboard/tiHwKeyboard.cpp:
|
||||
.bss start:0x810C8940 end:0x810C8950
|
||||
.text start:0x81448AA4 end:0x81449C98
|
||||
.rodata start:0x81616B88 end:0x81616C78
|
||||
.rodata start:0x81616BC8 end:0x81616C78
|
||||
.data start:0x81668EF8 end:0x81669018
|
||||
.sdata2 start:0x81694EF8 end:0x81694F08
|
||||
.sdata start:0x81697570 end:0x81697578
|
||||
@@ -1405,7 +1405,7 @@ libs/RVLMiddleware/eZiText/src/clib/zikorean.c:
|
||||
extab start:0x81330748 end:0x81330760
|
||||
extabindex start:0x8133147C end:0x813314A0
|
||||
.text start:0x814813FC end:0x81482840
|
||||
.data start:0x8166B2B0 end:0x8166B3D0
|
||||
.data start:0x8166B2B0 end:0x8166B3A8
|
||||
|
||||
libs/RVLMiddleware/eZiText/src/clib/ziswordw.c:
|
||||
extab start:0x81330760 end:0x81330770
|
||||
@@ -1417,6 +1417,7 @@ libs/RVLMiddleware/eZiText/src/clib/zkokeyp.c:
|
||||
extab start:0x81330770 end:0x813307A8
|
||||
extabindex start:0x813314B8 end:0x8133150C
|
||||
.text start:0x8148302C end:0x8148447C
|
||||
.data start:0x8166B3A8 end:0x8166B3D0
|
||||
|
||||
libs/RVLMiddleware/eZiText/src/clib/zierror.c:
|
||||
.text start:0x8148447C end:0x81484484
|
||||
@@ -4192,11 +4193,11 @@ libs/RVL_SDK/src/fa/driver/nand_drv.c:
|
||||
.sbss start:0x816996C0 end:0x816996E0
|
||||
|
||||
libs/RVL_SDK/src/fa/driver/sd_drv.c:
|
||||
.bss start:0x811AF460 end:0x811AF6C0
|
||||
.bss start:0x811AF460 end:0x811AF6C0 align:32
|
||||
.text start:0x815EA41C end:0x815ED20C
|
||||
.rodata start:0x816329E8 end:0x81632B58
|
||||
.data start:0x81690D18 end:0x81691728
|
||||
.sbss start:0x816996E0 end:0x81699708
|
||||
.sbss start:0x816996E0 end:0x81699708 align:32
|
||||
|
||||
libs/RVL_SDK/src/fa/driver/pfd_cmn.c:
|
||||
.text start:0x815ED20C end:0x815ED324
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
16
configure.py
16
configure.py
@@ -812,8 +812,8 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("memoryCard", [
|
||||
Object(NonMatching, "scene/memoryCard/iplMemoryCard.cpp"),
|
||||
Object(NonMatching, "scene/memoryCard/iplMemoryCardBase.cpp"),
|
||||
Object(Matching, "scene/memoryCard/iplMemoryCard.cpp"),
|
||||
Object(Matching, "scene/memoryCard/iplMemoryCardBase.cpp"),
|
||||
Object(NonMatching, "scene/memoryCard/iplMemoryCardManager.cpp"),
|
||||
Object(Matching, "scene/memoryCard/iplGCSaveData.cpp"),
|
||||
Object(NonMatching, "scene/memoryCard/iplGCWindow.cpp"),
|
||||
@@ -918,9 +918,9 @@ config.libs = [
|
||||
Object(NonMatching, "keyboard/tiString.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiAtokString.cpp", extra_cflags=["-O4,p"]), # for 4.3J
|
||||
Object(NonMatching, "keyboard/tiZiString.cpp", extra_cflags=["-O4,p"]), # for 4.3U and 4.3E
|
||||
Object(NonMatching, "keyboard/tiTextDrawer.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiTextDrawer.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiNw4rManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiKeyboard.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiUtil.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiCpData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
|
||||
Object(Matching, "keyboard/tiSwData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
|
||||
@@ -929,7 +929,7 @@ config.libs = [
|
||||
Object(Matching, "keyboard/tiTextInputBase.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/MyTiManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/MyTiInputForm.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/MyTiLetterForm.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiLetterForm.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiBg.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiDebug.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiGUIManager.cpp", extra_cflags=["-O4,p"]),
|
||||
@@ -987,7 +987,7 @@ config.libs = [
|
||||
Object(NonMatching, "clib/zi8alpha.c"),
|
||||
Object(Matching, "clib/zi8alts.c"),
|
||||
Object(NonMatching, "clib/zi8cgetc.c"),
|
||||
Object(NonMatching, "clib/zi8cinfo.c"),
|
||||
Object(Matching, "clib/zi8cinfo.c"),
|
||||
Object(Matching, "clib/zi8copy.c"),
|
||||
Object(NonMatching, "clib/zi8dawg.c"),
|
||||
Object(Matching, "clib/zi8getc.c"),
|
||||
@@ -1004,7 +1004,7 @@ config.libs = [
|
||||
Object(Matching, "clib/zi8ver.c"),
|
||||
Object(Matching, "clib/zi8ZHuwd.c"),
|
||||
Object(NonMatching, "clib/zidawg1.c"),
|
||||
Object(NonMatching, "clib/zikorean.c"),
|
||||
Object(Matching, "clib/zikorean.c"),
|
||||
Object(NonMatching, "clib/ziswordw.c"),
|
||||
Object(NonMatching, "clib/zkokeyp.c"),
|
||||
Object(Matching, "clib/zierror.c"),
|
||||
@@ -1853,7 +1853,7 @@ config.libs = [
|
||||
|
||||
Object(Matching, "fa/kernel/pfk_api.c"),
|
||||
|
||||
Object(NonMatching, "fa/driver/nand_drv.c"),
|
||||
Object(Matching, "fa/driver/nand_drv.c"),
|
||||
Object(NonMatching, "fa/driver/sd_drv.c"),
|
||||
Object(Matching, "fa/driver/pfd_cmn.c"),
|
||||
Object(Matching, "fa/driver/msc_drv.c"),
|
||||
|
||||
@@ -96,7 +96,7 @@ CHANSVmNativeClass* CHANSVmAddNativeClass(CHANSVm* vm, const char* clsName, CHAN
|
||||
/*** CHANS Image ***/
|
||||
/************************/
|
||||
|
||||
typedef vmBoolInt (*CHANSVmImageCtorCallback)(CHANSVm* vm);
|
||||
typedef vmBoolInt (*CHANSVmImageCtorCallback)(CHANSVm* vm, vmPtr data);
|
||||
typedef vmPtr (*CHANSVmImageAllocatorCallback)(CHANSVm* vm, u32 size);
|
||||
|
||||
void CHANSVmImageRegisterAllocator(CHANSVmImageAllocatorCallback allocCb, CHANSVmImageCtorCallback ctorCb);
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace homebutton {
|
||||
|
||||
private:
|
||||
static bool sBatteryFlag[WPAD_MAX_CONTROLLERS];
|
||||
static bool lbl_816989BC[WPAD_MAX_CONTROLLERS];
|
||||
static bool sAlarmCreated[WPAD_MAX_CONTROLLERS];
|
||||
|
||||
static OSAlarm sAlarm[WPAD_MAX_CONTROLLERS];
|
||||
static OSAlarm sAlarmSoundOff[WPAD_MAX_CONTROLLERS];
|
||||
|
||||
@@ -35,8 +35,8 @@ namespace ext_ead {
|
||||
|
||||
class SurfaceManager {
|
||||
public:
|
||||
static void CreateManager(int rectW0, int rectH0, int rectW1, int rectH1, void* mem1Buf, u32 mem1BufSize, void* mem2Buf, u32 mem2BufSize,
|
||||
void* libBuf, const char* param_10);
|
||||
static void CreateManager(int surfaceW, int surfaceH, int browserW, int browserH, void* mem1Buf, u32 mem1BufSize, void* mem2Buf, u32 mem2BufSize,
|
||||
void* libBuf, const char* arcPath);
|
||||
static void DisposeManager();
|
||||
|
||||
static void RegisterArcFile(void* fileBuf);
|
||||
|
||||
@@ -187,7 +187,19 @@ namespace textinput {
|
||||
void SetFocusedText(s32 pane) { mnFocusedIdx = pane; }
|
||||
s32 GetFocusedText() { return mnFocusedIdx; }
|
||||
f32 GetWidthScale_() const { return 608.0f / mfScreenWidth; }
|
||||
#ifdef TI_CANDIDATEBOX_IMPLEMENTATION
|
||||
f32 GetMargin_() const {
|
||||
f32 margin;
|
||||
if (mfScreenWidth > 700.0f) {
|
||||
margin = 10.0f;
|
||||
} else {
|
||||
margin = 20.0f;
|
||||
}
|
||||
return margin;
|
||||
}
|
||||
#else
|
||||
f32 GetMargin_() const { return mfScreenWidth > 700.0f ? 10.0f : 20.0f; }
|
||||
#endif
|
||||
s32 GetNextPageIdx_(s32 page) const;
|
||||
s32 GetPrevPageIdx_(s32 page) const;
|
||||
s32 GetDispNum() const;
|
||||
|
||||
@@ -133,7 +133,11 @@ namespace textinput {
|
||||
friend class Base;
|
||||
public:
|
||||
RowInfoManager(u16 maxLength) : mpInfo(NULL), mMaxLength(maxLength), mpAllocator(NULL) {}
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
void init() __attribute__((never_inline));
|
||||
#else
|
||||
void init();
|
||||
#endif
|
||||
~RowInfoManager();
|
||||
#endif
|
||||
private:
|
||||
@@ -145,7 +149,7 @@ namespace textinput {
|
||||
#ifdef TISIGNWINDOW_IMPLEMENTATION
|
||||
bool isAtokActive() const;
|
||||
#endif
|
||||
#ifdef MYTILETTERFORM_IMPLEMENTATION
|
||||
#if defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void init();
|
||||
virtual void onCommand(INPUT_COMMAND command, void* data);
|
||||
@@ -384,7 +388,7 @@ namespace textinput {
|
||||
virtual void setRootPaneScaleFor16x9();
|
||||
virtual void setRootPaneScaleFor4x3();
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual void onSE(sound::SE seId);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -135,8 +135,13 @@ namespace textinput {
|
||||
virtual keyboard::cellphonetype::LayoutByNW4R* getCellPhoneKeyboard() { return mpCellPhoneKeyboard; }
|
||||
virtual const keyboard::cellphonetype::LayoutByNW4R* getCellPhoneKeyboard() const { return mpCellPhoneKeyboard; }
|
||||
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
virtual void* getSignKeyboard();
|
||||
virtual const void* getSignKeyboard() const;
|
||||
#else
|
||||
virtual void* getSignKeyboard() { return mpSignWindow; }
|
||||
virtual const void* getSignKeyboard() const { return mpSignWindow; }
|
||||
#endif
|
||||
|
||||
virtual candidatebox::LayoutByNW4R* getCandidateBox() { return mpCandidateBox; }
|
||||
virtual const candidatebox::LayoutByNW4R* getCandidateBox() const { return mpCandidateBox; }
|
||||
@@ -144,8 +149,13 @@ namespace textinput {
|
||||
virtual toolbar::LayoutByNW4R* getToolBar() { return mpToolBar; }
|
||||
virtual const toolbar::LayoutByNW4R* getToolBar() const { return mpToolBar; }
|
||||
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
virtual void* getPredictLanguageSelectDialog();
|
||||
virtual const void* getPredictLanguageSelectDialog() const;
|
||||
#else
|
||||
virtual void* getPredictLanguageSelectDialog() { return mpPredictLanguageDialog; }
|
||||
virtual const void* getPredictLanguageSelectDialog() const { return mpPredictLanguageDialog; }
|
||||
#endif
|
||||
|
||||
virtual inputform::EditBuffer* createEditBuffer();
|
||||
virtual keyboard::hwkey::HWKeyboard* createHWKeyboard();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <nw4r/ut/CharWriter.h>
|
||||
#include <nw4r/ut/Rect.h>
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace textinput {
|
||||
} CursorPos;
|
||||
|
||||
typedef struct DrawInfo {
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
nw4r::ut::Rect rect;
|
||||
wchar_t character;
|
||||
#else
|
||||
@@ -94,7 +94,7 @@ namespace textinput {
|
||||
virtual u32 getEndPos() const;
|
||||
|
||||
// todo
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual void setDrawModifyScopeLine(s32 startLine, s32 endLine);
|
||||
virtual void setDrawCacheScopeLine(s32 startLine, s32 endLine);
|
||||
virtual void modifyCursorCache(s32 line, u32 position, f32 x, f32 y, f32 width, f32 height);
|
||||
@@ -103,12 +103,12 @@ namespace textinput {
|
||||
virtual void setDrawCacheScopeLine();
|
||||
virtual void modifyCursorCache();
|
||||
#endif
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual bool isEnableCursorCache() const;
|
||||
#else
|
||||
virtual void isEnableCursorCache();
|
||||
#endif
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual u32 getDrawModifyStartLine() const;
|
||||
virtual u32 getDrawModifyEndLine() const;
|
||||
#else
|
||||
|
||||
@@ -20,7 +20,11 @@ namespace gui {
|
||||
class Manager;
|
||||
class EventHandler;
|
||||
|
||||
#if defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
class __declspec(novtable) Interface {
|
||||
#else
|
||||
class Interface {
|
||||
#endif
|
||||
public:
|
||||
virtual void create() {} // 0x08 (0x02)
|
||||
|
||||
@@ -30,14 +34,14 @@ namespace gui {
|
||||
virtual void draw(Mtx& mtx) {} // 0x14 (0x05)
|
||||
virtual void draw() {} // 0x18 (0x06)
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~Interface(); // 0x1C (0x07)
|
||||
#else
|
||||
virtual ~Interface() {} // 0x1C (0x07)
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_WINDOW_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
class __declspec(novtable) EventHandler {
|
||||
#else
|
||||
class EventHandler {
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace ipl {
|
||||
mbDisableCon(bDisableCon) {}
|
||||
#endif
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
#if defined(IPL_CHANNEL_TITLE_NOVTABLE) || defined(IPL_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~PaneManager();
|
||||
#else
|
||||
virtual ~PaneManager() {}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace ipl {
|
||||
HermiteIntp() {}
|
||||
virtual ~HermiteIntp();
|
||||
|
||||
void init(const T& start, const T& end, f32 maxFrame, f32 param_5, f32 param_6, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f);
|
||||
void init(const T& start, const T& end, f32 maxFrame, f32 startTangent, f32 endTangent, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f);
|
||||
|
||||
T get() const {
|
||||
f32 var_f27 = mFrame;
|
||||
@@ -81,11 +81,11 @@ namespace ipl {
|
||||
(mEnd * ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27)))));
|
||||
r +=
|
||||
(unkVal0 *
|
||||
(mStartTangent *
|
||||
(var_f27 +
|
||||
((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (2.0f * var_f27 * var_f27))))) +
|
||||
(unkVal1 * ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(mEndTangent * ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (var_f27 * var_f27))));
|
||||
|
||||
return r;
|
||||
@@ -101,7 +101,7 @@ namespace ipl {
|
||||
f32 temp_f4 = var_f27 * var_f27;
|
||||
f32 temp_f7 = var_f28 * (var_f28 * (var_f27 * temp_f4));
|
||||
f32 temp_f3 =
|
||||
(unkVal0 * (var_f27 + (temp_f7 - (var_f28 * (2.0f * var_f27 * var_f27))))) + (unkVal1 * (temp_f7 - (var_f28 * temp_f4)));
|
||||
(mStartTangent * (var_f27 + (temp_f7 - (var_f28 * (2.0f * var_f27 * var_f27))))) + (mEndTangent * (temp_f7 - (var_f28 * temp_f4)));
|
||||
r = r + temp_f3;
|
||||
return r;*/
|
||||
}
|
||||
@@ -109,8 +109,8 @@ namespace ipl {
|
||||
protected:
|
||||
T mStart;
|
||||
T mEnd;
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
f32 mStartTangent;
|
||||
f32 mEndTangent;
|
||||
};
|
||||
|
||||
template <>
|
||||
@@ -119,7 +119,7 @@ namespace ipl {
|
||||
HermiteIntp() {}
|
||||
virtual ~HermiteIntp();
|
||||
|
||||
void init(const f32& start, const f32& end, f32 maxFrame, f32 param_5, f32 param_6, int playback = ANIM_TYPE_FORWARD,
|
||||
void init(const f32& start, const f32& end, f32 maxFrame, f32 startTangent, f32 endTangent, int playback = ANIM_TYPE_FORWARD,
|
||||
f32 speed = 1.0f);
|
||||
|
||||
f32 get() const {
|
||||
@@ -132,10 +132,10 @@ namespace ipl {
|
||||
(mEnd * ((var_f28 * (var_f28 * (var_f28 * (var_f27 * (2.0f * var_f27 * var_f27))))) -
|
||||
(var_f28 * (var_f28 * (3.0f * var_f27 * var_f27)))));
|
||||
r +=
|
||||
(unkVal0 *
|
||||
(mStartTangent *
|
||||
(var_f27 + ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (2.0f * var_f27 * var_f27))))) +
|
||||
(unkVal1 * ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(mEndTangent * ((var_f28 * (var_f28 * (var_f27 * (var_f27 * var_f27)))) -
|
||||
(var_f28 * (var_f27 * var_f27))));
|
||||
|
||||
return r;
|
||||
@@ -144,8 +144,8 @@ namespace ipl {
|
||||
protected:
|
||||
f32 mStart;
|
||||
f32 mEnd;
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
f32 mStartTangent;
|
||||
f32 mEndTangent;
|
||||
};
|
||||
|
||||
#pragma dont_instantiate HermiteIntp<float>
|
||||
@@ -155,12 +155,12 @@ namespace ipl {
|
||||
public:
|
||||
HermiteIntp() {}
|
||||
|
||||
void init(const T& start, const T& end, f32 maxFrame, f32 param_5, f32 param_6, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f) {
|
||||
void init(const T& start, const T& end, f32 maxFrame, f32 startTangent, f32 endTangent, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f) {
|
||||
mStart = start;
|
||||
mEnd = end;
|
||||
utility::FrameController::init(playback, maxFrame, 0.0f, speed);
|
||||
unkVal0 = param_5;
|
||||
unkVal1 = param_6;
|
||||
mStartTangent = startTangent;
|
||||
mEndTangent = endTangent;
|
||||
}
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_CPP
|
||||
@@ -176,9 +176,9 @@ namespace ipl {
|
||||
inverseDuration * (inverseDuration * (3.0f * frame * frame))));
|
||||
f32 frameSquared = frame * frame;
|
||||
f32 cubic = inverseDuration * (inverseDuration * (frame * frameSquared));
|
||||
f32 tangent = unkVal0 * (frame + (cubic -
|
||||
f32 tangent = mStartTangent * (frame + (cubic -
|
||||
inverseDuration * (2.0f * frame * frame))) +
|
||||
unkVal1 * (cubic - inverseDuration * frameSquared);
|
||||
mEndTangent * (cubic - inverseDuration * frameSquared);
|
||||
result.x += tangent;
|
||||
result.y += tangent;
|
||||
result.z += tangent;
|
||||
@@ -196,7 +196,7 @@ namespace ipl {
|
||||
f32 temp_f4 = var_f27 * var_f27;
|
||||
f32 temp_f7 = var_f28 * (var_f28 * (var_f27 * temp_f4));
|
||||
f32 temp_f3 =
|
||||
(unkVal0 * (var_f27 + (temp_f7 - (var_f28 * (2.0f * var_f27 * var_f27))))) + (unkVal1 * (temp_f7 - (var_f28 * temp_f4)));
|
||||
(mStartTangent * (var_f27 + (temp_f7 - (var_f28 * (2.0f * var_f27 * var_f27))))) + (mEndTangent * (temp_f7 - (var_f28 * temp_f4)));
|
||||
|
||||
r = r + temp_f3;
|
||||
|
||||
@@ -213,15 +213,15 @@ namespace ipl {
|
||||
f32 temp_f4 = var_f27 * var_f27;
|
||||
f32 temp_f7 = var_f28 * (var_f28 * (var_f27 * temp_f4));
|
||||
f32 temp_f3 =
|
||||
(unkVal0 * (var_f27 + (temp_f7 - (var_f28 * (2.0f * var_f27 * var_f27))))) + (unkVal1 * (temp_f7 - (var_f28 * temp_f4)));
|
||||
(mStartTangent * (var_f27 + (temp_f7 - (var_f28 * (2.0f * var_f27 * var_f27))))) + (mEndTangent * (temp_f7 - (var_f28 * temp_f4)));
|
||||
r = r + temp_f3;
|
||||
return r;*/
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
f32 mStartTangent;
|
||||
f32 mEndTangent;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace ipl {
|
||||
public:
|
||||
HermiteIntp() {}
|
||||
virtual ~HermiteIntp();
|
||||
void init(const VEC3& start, const VEC3& end, f32 maxFrame, f32 param_5, f32 param_6, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f);
|
||||
void init(const VEC3& start, const VEC3& end, f32 maxFrame, f32 startTangent, f32 endTangent, int playback = ANIM_TYPE_FORWARD, f32 speed = 1.0f);
|
||||
VEC3 get() const {
|
||||
f32 frame = mFrame;
|
||||
f32 inverseDuration = 1.0f / mMaxFrame;
|
||||
@@ -249,9 +249,9 @@ namespace ipl {
|
||||
inverseDuration * (inverseDuration * (3.0f * frame * frame))));
|
||||
f32 frameSquared = frame * frame;
|
||||
f32 cubic = inverseDuration * (inverseDuration * (frame * frameSquared));
|
||||
f32 tangent = unkVal0 * (frame + (cubic -
|
||||
f32 tangent = mStartTangent * (frame + (cubic -
|
||||
inverseDuration * (2.0f * frame * frame))) +
|
||||
unkVal1 * (cubic - inverseDuration * frameSquared);
|
||||
mEndTangent * (cubic - inverseDuration * frameSquared);
|
||||
result.x += tangent;
|
||||
result.y += tangent;
|
||||
result.z += tangent;
|
||||
@@ -260,8 +260,8 @@ namespace ipl {
|
||||
protected:
|
||||
VEC3 mStart;
|
||||
VEC3 mEnd;
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
f32 mStartTangent;
|
||||
f32 mEndTangent;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -293,8 +293,8 @@ namespace ipl {
|
||||
LOCKED_DIALOG_ANIM_MAX,
|
||||
};
|
||||
|
||||
static void iplChannelTitle_813BA684(void* work);
|
||||
static void iplChannelTitle_813BA784(void* work);
|
||||
static void markTmdReadyTask(void* work);
|
||||
static void deleteTmpTitleContentTask(void* work);
|
||||
static void getTmdTask(void* work);
|
||||
static void getTicketLimitTask(void* work);
|
||||
static BOOL isTimeLimitedTicket(ESTicketView * ticket, u32* remainTime = NULL);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
class GCWindow : public MemoryBase, public MemCardEventHandler {
|
||||
class GCWindow : public MemoryBase, public MemCardEventListener {
|
||||
#ifdef IPL_MEMORY_CARD_CPP
|
||||
friend class MemoryCard;
|
||||
#endif
|
||||
@@ -48,6 +48,25 @@ private:
|
||||
void set_texture(const char*, const GXTexObj&);
|
||||
public:
|
||||
virtual void onMemEvent(long, u8);
|
||||
#ifdef IPL_GC_WINDOW_CPP
|
||||
virtual void on_wait_anim() = 0;
|
||||
virtual void on_exit() = 0;
|
||||
virtual void on_error() = 0;
|
||||
virtual void on_format() = 0;
|
||||
virtual void on_dialog_result() = 0;
|
||||
virtual void on_select_in() = 0;
|
||||
virtual void on_message_done() = 0;
|
||||
virtual void on_button_trig() = 0;
|
||||
#else
|
||||
virtual void on_wait_anim();
|
||||
virtual void on_exit();
|
||||
virtual void on_error();
|
||||
virtual void on_format();
|
||||
virtual void on_dialog_result();
|
||||
virtual void on_select_in();
|
||||
virtual void on_message_done();
|
||||
virtual void on_button_trig();
|
||||
#endif
|
||||
bool isProcess();
|
||||
void stop_wait_anim();
|
||||
|
||||
|
||||
@@ -12,13 +12,61 @@
|
||||
|
||||
namespace ipl {
|
||||
namespace scene {
|
||||
class MemCardEventHandler {
|
||||
class __declspec(novtable) MemCardEventListener {
|
||||
public:
|
||||
MemCardEventListener() {}
|
||||
|
||||
virtual ~MemCardEventListener() {}
|
||||
|
||||
virtual void onMemEvent(long event, u8 slot);
|
||||
};
|
||||
|
||||
class MemCardEventHandler : public MemCardEventListener {
|
||||
public:
|
||||
MemCardEventHandler() {}
|
||||
|
||||
virtual ~MemCardEventHandler();
|
||||
|
||||
virtual void onMemEvent(long event, u8 slot);
|
||||
|
||||
virtual void onMount(u8 slot) = 0;
|
||||
virtual void onUnmount(u8 slot) = 0;
|
||||
virtual void onAttach(u8 slot) = 0;
|
||||
virtual void onDetach(u8 slot) = 0;
|
||||
virtual void onCheck(u8 slot) = 0;
|
||||
virtual void onFormat(u8 slot) = 0;
|
||||
virtual void onRepair(u8 slot) = 0;
|
||||
virtual void onRead(u8 slot) = 0;
|
||||
virtual void onWrite(u8 slot) = 0;
|
||||
virtual void onOpen(u8 slot) = 0;
|
||||
virtual void onClose(u8 slot) = 0;
|
||||
virtual void onCreate(u8 slot) = 0;
|
||||
virtual void onDelete(u8 slot) = 0;
|
||||
virtual void onCopy(u8 slot) = 0;
|
||||
virtual void onMove(u8 slot) = 0;
|
||||
virtual void onRename(u8 slot) = 0;
|
||||
virtual void onVerify(u8 slot) = 0;
|
||||
virtual void onCommit(u8 slot) = 0;
|
||||
virtual void onProbe(u8 slot) = 0;
|
||||
virtual void onMountAsync(u8 slot) = 0;
|
||||
virtual void onUnmountAsync(u8 slot) = 0;
|
||||
virtual void onCheckAsync(u8 slot) = 0;
|
||||
virtual void onFormatAsync(u8 slot) = 0;
|
||||
virtual void onReadAsync(u8 slot) = 0;
|
||||
virtual void onWriteAsync(u8 slot) = 0;
|
||||
virtual void onCreateAsync(u8 slot) = 0;
|
||||
virtual void onDeleteAsync(u8 slot) = 0;
|
||||
virtual void onCopyAsync(u8 slot) = 0;
|
||||
virtual void onMoveAsync(u8 slot) = 0;
|
||||
virtual void onRenameAsync(u8 slot) = 0;
|
||||
virtual void onVerifyAsync(u8 slot) = 0;
|
||||
virtual void onCommitAsync(u8 slot) = 0;
|
||||
virtual void onProbeAsync(u8 slot) = 0;
|
||||
virtual void onFreeBlocks(u8 slot) = 0;
|
||||
virtual void onGetLength(u8 slot) = 0;
|
||||
virtual void onSetAttrib(u8 slot) = 0;
|
||||
virtual void onGetAttrib(u8 slot) = 0;
|
||||
virtual void onSlotStatus(u8 slot) = 0;
|
||||
};
|
||||
|
||||
typedef struct MCFile {
|
||||
@@ -56,6 +104,44 @@ namespace ipl {
|
||||
}
|
||||
virtual ~MemoryCardManager();
|
||||
|
||||
virtual void onMount(u8 slot) = 0;
|
||||
virtual void onUnmount(u8 slot) = 0;
|
||||
virtual void onAttach(u8 slot) = 0;
|
||||
virtual void onDetach(u8 slot) = 0;
|
||||
virtual void onCheck(u8 slot) = 0;
|
||||
virtual void onFormat(u8 slot) = 0;
|
||||
virtual void onRepair(u8 slot) = 0;
|
||||
virtual void onRead(u8 slot) = 0;
|
||||
virtual void onWrite(u8 slot) = 0;
|
||||
virtual void onOpen(u8 slot) = 0;
|
||||
virtual void onClose(u8 slot) = 0;
|
||||
virtual void onCreate(u8 slot) = 0;
|
||||
virtual void onDelete(u8 slot) = 0;
|
||||
virtual void onCopy(u8 slot) = 0;
|
||||
virtual void onMove(u8 slot) = 0;
|
||||
virtual void onRename(u8 slot) = 0;
|
||||
virtual void onVerify(u8 slot) = 0;
|
||||
virtual void onCommit(u8 slot) = 0;
|
||||
virtual void onProbe(u8 slot) = 0;
|
||||
virtual void onMountAsync(u8 slot) = 0;
|
||||
virtual void onUnmountAsync(u8 slot) = 0;
|
||||
virtual void onCheckAsync(u8 slot) = 0;
|
||||
virtual void onFormatAsync(u8 slot) = 0;
|
||||
virtual void onReadAsync(u8 slot) = 0;
|
||||
virtual void onWriteAsync(u8 slot) = 0;
|
||||
virtual void onCreateAsync(u8 slot) = 0;
|
||||
virtual void onDeleteAsync(u8 slot) = 0;
|
||||
virtual void onCopyAsync(u8 slot) = 0;
|
||||
virtual void onMoveAsync(u8 slot) = 0;
|
||||
virtual void onRenameAsync(u8 slot) = 0;
|
||||
virtual void onVerifyAsync(u8 slot) = 0;
|
||||
virtual void onCommitAsync(u8 slot) = 0;
|
||||
virtual void onProbeAsync(u8 slot) = 0;
|
||||
virtual void onFreeBlocks(u8 slot) = 0;
|
||||
virtual void onGetLength(u8 slot) = 0;
|
||||
virtual void onSetAttrib(u8 slot) = 0;
|
||||
virtual void onGetAttrib(u8 slot) = 0;
|
||||
|
||||
void calc();
|
||||
|
||||
bool isSlotReady(u8 slot);
|
||||
@@ -96,7 +182,7 @@ namespace ipl {
|
||||
u16 getFreeBlocks(u8 slot);
|
||||
#endif
|
||||
|
||||
void setEventHandler(MemCardEventHandler* eventHandler) {
|
||||
void setEventHandler(MemCardEventListener* eventHandler) {
|
||||
mpEventHandler = eventHandler;
|
||||
}
|
||||
|
||||
@@ -107,7 +193,7 @@ namespace ipl {
|
||||
s32 mLastResult; // 0x16930
|
||||
s32 mLastCmd; // 0x16934
|
||||
u32 unk_0x16938; // 0x16938
|
||||
MemCardEventHandler* mpEventHandler; // 0x1693C
|
||||
MemCardEventListener* mpEventHandler; // 0x1693C
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -81,22 +81,22 @@ namespace ipl {
|
||||
void* mpThumbnailData;
|
||||
NandSDWorker::SDAppMetaEntry mAppMeta;
|
||||
};
|
||||
extern "C" void iplSDChannelObj_813E3104(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E311C(SDChannelObj* channel, EGG::ExpHeap* firstHeap,
|
||||
extern "C" void iplSDChannelObj_activateIfIdle(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_setHeaps(SDChannelObj* channel, EGG::ExpHeap* firstHeap,
|
||||
EGG::ExpHeap* secondHeap);
|
||||
extern "C" void iplSDChannelObj_813E322C(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E32C8(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E34E0(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E3178(SDChannelObj* channel, nw4r::lyt::Pane* pane);
|
||||
extern "C" void iplSDChannelObj_813E3180(SDChannelObj* channel, nand::LayoutFile* layoutFile);
|
||||
extern "C" void iplSDChannelObj_813E3304(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E330C(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_813E3354(SDChannelObj* channel, int state);
|
||||
extern "C" void iplSDChannelObj_813E33EC(SDChannelObj* channel, int state);
|
||||
extern "C" void iplSDChannelObj_813E3480(SDChannelObj* channel, bool selected);
|
||||
extern "C" void iplSDChannelObj_813E34E8(SDChannelObj* channel, int enabled);
|
||||
extern "C" void* iplSDChannelObj_813E3128(SDChannelObj* channel);
|
||||
extern "C" bool iplSDChannelObj_813E3330(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_calc(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_drawBase(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_playPageHide(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_setPane(SDChannelObj* channel, nw4r::lyt::Pane* pane);
|
||||
extern "C" void iplSDChannelObj_setLayoutFile(SDChannelObj* channel, nand::LayoutFile* layoutFile);
|
||||
extern "C" void iplSDChannelObj_drawPage(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_drawDialog(SDChannelObj* channel);
|
||||
extern "C" void iplSDChannelObj_startAppear(SDChannelObj* channel, int state);
|
||||
extern "C" void iplSDChannelObj_startDisappear(SDChannelObj* channel, int state);
|
||||
extern "C" void iplSDChannelObj_setSelected(SDChannelObj* channel, bool selected);
|
||||
extern "C" void iplSDChannelObj_resetPageAnim(SDChannelObj* channel, int enabled);
|
||||
extern "C" void* iplSDChannelObj_getOrAllocThumbnailData(SDChannelObj* channel);
|
||||
extern "C" bool iplSDChannelObj_hasAppMeta(SDChannelObj* channel);
|
||||
|
||||
union SDChannelSelectCommandArguments {
|
||||
u32 values[3];
|
||||
@@ -395,9 +395,9 @@ namespace ipl {
|
||||
NandSDWorker* mpSDWorker;
|
||||
ESTitleId32* mpSDTitleIds;
|
||||
SDChannelSelectTitleInfo* mpSDTitleInfo;
|
||||
NandSDWorker::TitleUsage* mpNandTitleInfo;
|
||||
s32 mFirstTitleCount;
|
||||
s32 mSecondTitleCount;
|
||||
mutable NandSDWorker::TitleUsage* mpNandTitleInfo;
|
||||
mutable s32 mFirstTitleCount;
|
||||
mutable s32 mSecondTitleCount;
|
||||
SDChannelObj* mpCurrentLoadedChannel;
|
||||
u32 mSDTitleCount;
|
||||
u32 mNandTitleCount;
|
||||
|
||||
@@ -167,12 +167,12 @@ namespace ipl {
|
||||
|
||||
bool is_stopped_all_anm() const;
|
||||
|
||||
void fn_81409864();
|
||||
void calc_exit_sequence();
|
||||
|
||||
void fn_814098F4();
|
||||
void fn_unk_inline();
|
||||
void fn_81409988();
|
||||
void fn_814099EC();
|
||||
void prepare_exit_abort();
|
||||
void wait_decide_se();
|
||||
void start_exit_fade();
|
||||
void finish_exit_reboot();
|
||||
|
||||
int mState; // 0x60
|
||||
int mPrevState; // 0x64
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ipl {
|
||||
void stt_wait_fns_msg();
|
||||
void stt_wait_terminate();
|
||||
|
||||
int fn_8135B1C0();
|
||||
int getProgressPercent();
|
||||
|
||||
void error_handling();
|
||||
|
||||
|
||||
@@ -336,19 +336,19 @@ namespace ipl {
|
||||
|
||||
BOOL nand_error_handling(int code);
|
||||
|
||||
SEntry* fn_8133A4E0(ESTitleId titleId);
|
||||
u32 fn_8133A57C(ESTitleId titleId);
|
||||
u32 fn_8133A5B8(ESTitleId titleId);
|
||||
BOOL fn_8133A5F0(ESTitleId titleId);
|
||||
BOOL fn_8133A634(ESTitleId titleId);
|
||||
BOOL fn_8133A678(ESTitleId titleId);
|
||||
BOOL fn_8133A6B8(ESTitleId titleId);
|
||||
BOOL fn_8133A73C(ESTitleId titleId);
|
||||
nand::MetaFile* fn_8133A7A4(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::MetaFile* fn_8133A85C(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::SharedFile* fn_8133A924(EGG::Heap* heap, ESTitleId titleId);
|
||||
void fn_8133A9F0();
|
||||
void fn_8133AA50(ESTitleId titleId);
|
||||
SEntry* findEntryByTitleId(ESTitleId titleId);
|
||||
u32 getBannerCSIdx(ESTitleId titleId);
|
||||
u32 getSoundSize(ESTitleId titleId);
|
||||
BOOL needsNetSetting(ESTitleId titleId);
|
||||
BOOL usesAltSound(ESTitleId titleId);
|
||||
BOOL isMissingTicket(ESTitleId titleId);
|
||||
BOOL isNewsChannelV6Plus(ESTitleId titleId);
|
||||
BOOL isOperaChannel(ESTitleId titleId);
|
||||
nand::MetaFile* readBannerMetaAsync(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::MetaFile* readSoundMetaAsync(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::SharedFile* readBannerCSAsync(EGG::Heap* heap, ESTitleId titleId);
|
||||
void clearTmpChannel();
|
||||
void unloadBanner(ESTitleId titleId);
|
||||
|
||||
BOOL isReady() { return mState == FINISH; }
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace ipl {
|
||||
void read_sd_app_location_async(ESTitleId32* titleIds);
|
||||
void check_for_sd_app_to_nand_async(ESTitleId titleId, AppBlocksInfo* usedBlocks, AppBlocksInfo* freeBlocks);
|
||||
void check_backup_fits_async(TitleIdList* newTitles, TitleIdList* replacingTitles);
|
||||
void iplNandSD_81348EA8(void* ptrA, void* ptrB, void* ptrC);
|
||||
void check_sd_app_titles_async(void* ptrA, void* ptrB, void* ptrC);
|
||||
|
||||
void list_nand_apps_usage_async(void* ptrA, void* ptr);
|
||||
|
||||
@@ -514,7 +514,7 @@ namespace ipl {
|
||||
void do_check_for_sd_app_to_nand();
|
||||
void check_backup_fits();
|
||||
void do_list_nand_apps_usage();
|
||||
void do_unk_8134C838();
|
||||
void do_check_sd_app_titles();
|
||||
|
||||
void do_move_nand_app_to_sd();
|
||||
void do_move_sd_app_to_nand();
|
||||
|
||||
@@ -24,7 +24,19 @@ namespace ipl {
|
||||
class Manager;
|
||||
}
|
||||
namespace savedata {
|
||||
extern "C" BOOL iplSavedata_813597A0(void* manager, ESTitleId titleId);
|
||||
extern "C" BOOL isTitleCached(void* manager, ESTitleId titleId);
|
||||
|
||||
struct ChannelSlot {
|
||||
u8 valid; // 0x00 (primaryType)
|
||||
u8 pad[3]; // 0x01
|
||||
s32 titleId; // 0x04 (sceneID)
|
||||
u8 rest[8]; // 0x08
|
||||
};
|
||||
|
||||
struct ChannelPage {
|
||||
u8 pad[0x30];
|
||||
ChannelSlot slots[MAX_CHANNEL_INDEX]; // 0x30
|
||||
};
|
||||
|
||||
class Manager {
|
||||
public:
|
||||
@@ -87,7 +99,7 @@ namespace ipl {
|
||||
channel::SInfo& getChanInfo(int page, int index) { return mData.chanInfo[page][index]; }
|
||||
textinput::extend::savedata::MemoSetting getMemoSetting() { return mData.memoSetting; }
|
||||
|
||||
void iplSavedata_813596B8(ESTitleId titleId);
|
||||
void pushTitleCache(ESTitleId titleId);
|
||||
|
||||
private:
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_ACCESS
|
||||
@@ -184,7 +196,7 @@ namespace ipl {
|
||||
u8 unused_0x504[28];
|
||||
|
||||
friend class channel::Manager;
|
||||
friend BOOL iplSavedata_813597A0(void* manager, ESTitleId titleId);
|
||||
friend BOOL isTitleCached(void* manager, ESTitleId titleId);
|
||||
};
|
||||
} // namespace savedata
|
||||
} // namespace ipl
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace nw4r {
|
||||
Rect(f32 l, f32 t, f32 r, f32 b) : left(l), top(t), right(r), bottom(b) {}
|
||||
#endif
|
||||
|
||||
#ifndef IPL_CONTROLLER_TRIVIAL_RECT_DTOR
|
||||
#if !defined(IPL_CONTROLLER_TRIVIAL_RECT_DTOR) && !defined(IPL_MEMORYCARD_BASE_CPP)
|
||||
~Rect() {}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace nw4r {
|
||||
} // namespace detail
|
||||
|
||||
template <typename TDerived, typename TBase>
|
||||
#ifdef IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST
|
||||
#if defined(IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST) || defined(IPL_MEMORYCARD_BASE_CPP)
|
||||
TDerived DynamicCast(TBase* pPtr);
|
||||
#else
|
||||
inline TDerived DynamicCast(TBase* pPtr) {
|
||||
|
||||
@@ -301,9 +301,9 @@ namespace nw4r {
|
||||
}
|
||||
|
||||
if (error == OS_EXCEPTION_FLOATING_POINT_EXCEPTION) {
|
||||
u32 uVar1 = sException.FPCSR_COPY;
|
||||
uVar1 &= (((uVar1 & 0xf8) << 0x16) | 0x01f80700);
|
||||
if ((uVar1 & 0x20000000) != 0) {
|
||||
u32 fpcsr = sException.FPCSR_COPY;
|
||||
fpcsr &= (((fpcsr & 0xf8) << 0x16) | 0x01f80700);
|
||||
if ((fpcsr & 0x20000000) != 0) {
|
||||
Exception_Printf_(" FPE: Invalid operation\n");
|
||||
if ((sException.FPCSR_COPY & 0x1000000) != 0) {
|
||||
Exception_Printf_(" SNaN\n");
|
||||
@@ -333,16 +333,16 @@ namespace nw4r {
|
||||
Exception_Printf_(" Invalid integer convert\n");
|
||||
}
|
||||
}
|
||||
if ((uVar1 & 0x10000000) != 0) {
|
||||
if ((fpcsr & 0x10000000) != 0) {
|
||||
Exception_Printf_(" FPE: Overflow\n");
|
||||
}
|
||||
if ((uVar1 & 0x8000000) != 0) {
|
||||
if ((fpcsr & 0x8000000) != 0) {
|
||||
Exception_Printf_(" FPE: Underflow\n");
|
||||
}
|
||||
if ((uVar1 & 0x4000000) != 0) {
|
||||
if ((fpcsr & 0x4000000) != 0) {
|
||||
Exception_Printf_(" FPE: Zero division\n");
|
||||
}
|
||||
if ((uVar1 & 0x2000000) != 0) {
|
||||
if ((fpcsr & 0x2000000) != 0) {
|
||||
Exception_Printf_(" FPE: Inexact result\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#include <nw4r/db/assert.h>
|
||||
|
||||
extern "C" const u8 lbl_81695550 = 255;
|
||||
extern "C" const u8 lbl_81695551 = 255;
|
||||
extern "C" const u8 lbl_81695552 = 255;
|
||||
extern "C" const u8 lbl_81695553 = 0;
|
||||
extern "C" char lbl_816719DC[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
|
||||
extern "C" const u8 scLytFatalColorR = 255;
|
||||
extern "C" const u8 scLytFatalColorG = 255;
|
||||
extern "C" const u8 scLytFatalColorB = 255;
|
||||
extern "C" const u8 scLytFatalColorA = 0;
|
||||
extern "C" char scLytFatalMsg[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
|
||||
|
||||
#undef NW4R_ASSERT
|
||||
#define NW4R_ASSERT(x) \
|
||||
{ \
|
||||
if (!(x)) { \
|
||||
GXColor front = {*((volatile const u8*)&::lbl_81695550), *((volatile const u8*)&::lbl_81695551), \
|
||||
*((volatile const u8*)&::lbl_81695552), *((volatile const u8*)&::lbl_81695553)}; \
|
||||
GXColor front = {*((volatile const u8*)&::scLytFatalColorR), *((volatile const u8*)&::scLytFatalColorG), \
|
||||
*((volatile const u8*)&::scLytFatalColorB), *((volatile const u8*)&::scLytFatalColorA)}; \
|
||||
GXColor back = {0, 0, 0, 0}; \
|
||||
OSFatal((GXColor)front, (GXColor)back, ::lbl_816719DC); \
|
||||
OSFatal((GXColor)front, (GXColor)back, ::scLytFatalMsg); \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <tmc_jpeg_internal.h>
|
||||
|
||||
static s32 TMCJPEG_814EAF50(TMCCJPEGDecWork* work);
|
||||
static s32 TMCJPEG_814EB108(TMCCJPEGDecWork* work);
|
||||
static s32 refillJpegBufferAfterFF(TMCCJPEGDecWork* work);
|
||||
static s32 refillJpegBuffer(TMCCJPEGDecWork* work);
|
||||
|
||||
s32 TMCJPEGDEC_init_ptr_buff(TMCCJPEGDecWork* work, void* param) {
|
||||
u32 readSize;
|
||||
@@ -52,7 +52,7 @@ s32 TMCJPEGDEC_get_byte(u8* dst, TMCCJPEGDecWork* work) {
|
||||
|
||||
if (work->pBufCur >= work->pBufEnd) {
|
||||
if (work->remaining != 0) {
|
||||
s32 r = TMCJPEG_814EB108(work);
|
||||
s32 r = refillJpegBuffer(work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ s32 TMCJPEGDEC_get_byte(u8* dst, TMCCJPEGDecWork* work) {
|
||||
|
||||
if (cur >= work->pBufEnd) {
|
||||
if (work->remaining != 0) {
|
||||
s32 r = TMCJPEG_814EB108(work);
|
||||
s32 r = refillJpegBuffer(work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ s32 TMCJPEGDEC_get_wbyte(u16* dst, TMCCJPEGDecWork* work) {
|
||||
|
||||
if (work->pBufCur >= work->pBufEnd) {
|
||||
if (work->remaining != 0) {
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r < 0) {
|
||||
goto br;
|
||||
} else {
|
||||
@@ -119,7 +119,7 @@ s32 TMCJPEGDEC_get_wbyte(u16* dst, TMCCJPEGDecWork* work) {
|
||||
}
|
||||
|
||||
if (work->remaining != 0) {
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r >= 0) {
|
||||
goto o1;
|
||||
}
|
||||
@@ -144,7 +144,7 @@ p2:
|
||||
goto r2;
|
||||
}
|
||||
if (work->remaining != 0) {
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r < 0)
|
||||
goto ez;
|
||||
else {
|
||||
@@ -166,7 +166,7 @@ r2:
|
||||
}
|
||||
|
||||
if (work->remaining != 0) {
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r < 0)
|
||||
goto ez;
|
||||
else {
|
||||
@@ -193,7 +193,7 @@ s32 TMCJPEGDEC_get_sbyte(u8* dst, u32 count, TMCCJPEGDecWork* work) {
|
||||
for (i = 0; i < count; i++) {
|
||||
if (work->pBufCur >= work->pBufEnd) {
|
||||
if (work->remaining != 0) {
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r < 0) {
|
||||
goto copy_byte;
|
||||
} else {
|
||||
@@ -214,7 +214,7 @@ s32 TMCJPEGDEC_get_sbyte(u8* dst, u32 count, TMCCJPEGDecWork* work) {
|
||||
goto r0;
|
||||
}
|
||||
if (work->remaining != 0) {
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r >= 0) {
|
||||
goto r0;
|
||||
}
|
||||
@@ -251,7 +251,7 @@ lp:
|
||||
if (work->remaining == 0) {
|
||||
goto er1;
|
||||
}
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r >= 0) {
|
||||
goto lc;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ lc:
|
||||
if (work->remaining == 0) {
|
||||
goto er2;
|
||||
}
|
||||
r = TMCJPEG_814EB108(work);
|
||||
r = refillJpegBuffer(work);
|
||||
if (r >= 0) {
|
||||
goto ret0;
|
||||
}
|
||||
@@ -320,7 +320,7 @@ s32 TMCJPEGDEC_load_buff(TMCCJPEGDecWork* work) {
|
||||
if (work->remaining == 0) {
|
||||
break;
|
||||
}
|
||||
r = TMCJPEG_814EAF50(work);
|
||||
r = refillJpegBufferAfterFF(work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ s32 TMCJPEGDEC_load_buff(TMCCJPEGDecWork* work) {
|
||||
if (work->remaining == 0) {
|
||||
break;
|
||||
}
|
||||
r = TMCJPEG_814EAF50(work);
|
||||
r = refillJpegBufferAfterFF(work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -364,7 +364,7 @@ s32 TMCJPEGDEC_chk_possible_size(TMCCJPEGDecWork* work) {
|
||||
return work->pBufEnd - work->pBufCur;
|
||||
}
|
||||
|
||||
static s32 TMCJPEG_814EAF50(TMCCJPEGDecWork* work) {
|
||||
static s32 refillJpegBufferAfterFF(TMCCJPEGDecWork* work) {
|
||||
u8 marker;
|
||||
u32 readSize;
|
||||
u8* dest;
|
||||
@@ -410,7 +410,7 @@ static s32 TMCJPEG_814EAF50(TMCCJPEGDecWork* work) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static s32 TMCJPEG_814EB108(TMCCJPEGDecWork* work) {
|
||||
static s32 refillJpegBuffer(TMCCJPEGDecWork* work) {
|
||||
u8* end;
|
||||
u32 i, j;
|
||||
s32 readSize;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
extern void* memset(void* dest, s32 val, u32 count);
|
||||
|
||||
extern const u32 lbl_8161E080[64] = {
|
||||
extern const u32 scJpegAanScale[64] = {
|
||||
0x00000100, 0x000000B9, 0x000000C4, 0x000000DA, 0x00000100, 0x00000146, 0x000001D9, 0x000003A0, 0x000000B9, 0x00000085, 0x0000008D,
|
||||
0x0000009D, 0x000000B9, 0x000000EB, 0x00000155, 0x0000029D, 0x000000C4, 0x0000008D, 0x00000096, 0x000000A7, 0x000000C4, 0x000000F9,
|
||||
0x0000016A, 0x000002C6, 0x000000DA, 0x0000009D, 0x000000A7, 0x000000B9, 0x000000DA, 0x00000115, 0x00000192, 0x00000315, 0x00000100,
|
||||
@@ -1424,7 +1424,7 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
|
||||
s32 r;
|
||||
|
||||
d = tblCopy;
|
||||
*(CopyBlock64*)d = *(CopyBlock64*)lbl_8161E080;
|
||||
*(CopyBlock64*)d = *(CopyBlock64*)scJpegAanScale;
|
||||
|
||||
scaleInfo = (QuantizationTables*)&work->scaleFlag;
|
||||
|
||||
|
||||
@@ -142,6 +142,9 @@ typedef struct ziFuzzyZYPairs {
|
||||
int rANDn : 1;
|
||||
int bANDp : 1;
|
||||
int gANDk : 1;
|
||||
int dANDt : 1;
|
||||
|
||||
int reserved : 20;
|
||||
} ziFuzzyZYPairs;
|
||||
|
||||
typedef struct _ziGetParam {
|
||||
@@ -357,8 +360,8 @@ typedef struct ziMatchParam {
|
||||
ziWChar first2; // 0x68
|
||||
ziWChar comp; // 0x6A
|
||||
ziU8 nSeg; // 0x6C
|
||||
ziU8 segs1[0xC0]; // 0x6D
|
||||
ziU8 segsD[0xC0]; // 0x12D
|
||||
ziU8 segs1[16][12]; // 0x6D
|
||||
ziU8 segsD[16][12]; // 0x12D
|
||||
ziU8 pad_0x1ED; // 0x1ED
|
||||
} ziMatchParam;
|
||||
|
||||
|
||||
@@ -269,10 +269,10 @@ Zi8UInt Zi8SpellingZY(ziU16 *output,Zi8UInt key,ziU8 includeTone)
|
||||
|
||||
Zi8UInt Zi8SpellingPY(ziU16 *output,Zi8UInt key,ziU8 includeTone)
|
||||
{
|
||||
Zi8UInt length = 0;
|
||||
ziU16 initialIndex = (ziU16)(((key & 0xffff) >> 9) & 0x3f);
|
||||
ziU16 finalIndex = (ziU16)(((key & 0xffff) >> 3) & 0x3f);
|
||||
ziU16 tone = (ziU16)(key & 7);
|
||||
Zi8UInt length = 0;
|
||||
volatile ziU16 tone = (ziU16)(key & 7);
|
||||
|
||||
output[0] = zi8PYinitialSpelling[initialIndex][0];
|
||||
output[1] = zi8PYinitialSpelling[initialIndex][1];
|
||||
|
||||
@@ -1074,7 +1074,7 @@ filterVowelCandidate:
|
||||
(((ZiAlphaWork*)workData)->dictionaries[language] == 0)))))) {
|
||||
if (language != ((ZiAlphaWork*)workData)->language) break;
|
||||
index = ((ZiAlphaWork*)workData)->dictionaryKinds[dictionaryIndex + 1];
|
||||
if ((index == 0xc) || (((index < 0xc && (index < 9)) && (4 < index)))) {
|
||||
if (index == 0xc || (index < 9 && index >= 5)) {
|
||||
if (Zi8getKeyLayout(language,0xeff1,&punctuationBuffer[0],1,workData) == 0) {
|
||||
punctuationBuffer[0] = 0;
|
||||
}
|
||||
@@ -1116,15 +1116,15 @@ filterVowelCandidate:
|
||||
{
|
||||
prepareCandidate:
|
||||
if (((elementCount == 1) && (dictionaryKind != 10)) &&
|
||||
((0xeff0 < *wordCursor && (*wordCursor < 0xf011)))) {
|
||||
((*wordCursor >= 0xeff1 && *wordCursor <= 0xf010))) {
|
||||
punctuationCandidate = ZI8_TRUE;
|
||||
break;
|
||||
}
|
||||
wordCursor[wordLength] = 0;
|
||||
if (((exactLengthOnly != 0) && (elementCount != 0)) && ((int)elementCount < (int)wordLength))
|
||||
if (((exactLengthOnly != 0) && (elementCount != 0)) && ((int)wordLength > (int)elementCount))
|
||||
{
|
||||
wordLength = elementCount;
|
||||
wordCursor[elementCount] = 0;
|
||||
wordCursor[wordLength] = 0;
|
||||
}
|
||||
wordLength = (ziU16)Zi8DeTokenization(wordCursor,wordLength & 0xffff,wordCapacity & 0xffff,language);
|
||||
if (((phoneticInput) && ((unsigned int)parameters->elementCount < (wordLength & 0xff))) &&
|
||||
@@ -1151,7 +1151,7 @@ prepareCandidate:
|
||||
else {
|
||||
|
||||
if ((((keyLayoutCount == 0) || (((ZiAlphaOptions*)optionData)->lookupMode != '\0')) ||
|
||||
((int)(wordLength + prefixCount) < 2)) ||
|
||||
((int)(wordLength + prefixCount) <= 1)) ||
|
||||
(0x40 < (int)(wordLength + prefixCount))) goto emitCandidate;
|
||||
switch (dictionaryKind) {
|
||||
case 5:
|
||||
@@ -1161,13 +1161,14 @@ checkKeyLayout:
|
||||
keyLayoutCursor = keyLayout;
|
||||
candidateCharacterCount = wordLength + prefixCount;
|
||||
for (index = 0; (int)index < (int)(unsigned int)keyLayoutCount; index = index + 1) {
|
||||
if (*keyLayoutCursor >= candidateCharacterCount) {
|
||||
if (*keyLayoutCursor < candidateCharacterCount) {
|
||||
keyLayoutCursor = keyLayoutCursor + *keyLayoutCursor + 1;
|
||||
} else {
|
||||
if (*keyLayoutCursor++ > candidateCharacterCount) {
|
||||
index = (unsigned int)keyLayoutCount;
|
||||
}
|
||||
break;
|
||||
}
|
||||
keyLayoutCursor = keyLayoutCursor + *keyLayoutCursor + 1;
|
||||
}
|
||||
if ((int)index < (int)(unsigned int)keyLayoutCount) {
|
||||
for (elementIndex = 0; (int)elementIndex < (int)(unsigned int)candidateCharacterCount;
|
||||
@@ -1175,10 +1176,10 @@ checkKeyLayout:
|
||||
candidateBytes[elementIndex] = Zi8ConvertWC2UC(wordCursor[elementIndex - prefixCount],language,workData);
|
||||
}
|
||||
for (; (int)index < (int)(unsigned int)keyLayoutCount; index = index + 1) {
|
||||
for (elementIndex = 0;
|
||||
((int)elementIndex < (int)(unsigned int)candidateCharacterCount &&
|
||||
(candidateBytes[elementIndex] == keyLayoutCursor[elementIndex]));
|
||||
elementIndex = elementIndex + 1) {
|
||||
elementIndex = 0;
|
||||
while (elementIndex < candidateCharacterCount) {
|
||||
if (candidateBytes[elementIndex] != keyLayoutCursor[elementIndex]) break;
|
||||
elementIndex++;
|
||||
}
|
||||
if (elementIndex == candidateCharacterCount) {
|
||||
wordCursor[-prefixCount] = 0;
|
||||
@@ -1196,7 +1197,7 @@ emitCandidate:
|
||||
if (firstCandidate == 0) {
|
||||
if (((ZiAlphaOptions*)optionData)->countOnly != '\0') {
|
||||
if (((ZiAlphaOptions*)optionData)->suffixOnly != '\0') {
|
||||
if ((int)(wordLength + prefixCount) < (int)((ZiAlphaOptions*)optionData)->shortestWord) {
|
||||
if ((int)((ZiAlphaOptions*)optionData)->shortestWord > (int)(wordLength + prefixCount)) {
|
||||
((ZiAlphaOptions*)optionData)->shortestWord = wordLength + prefixCount;
|
||||
}
|
||||
if ((int)((ZiAlphaOptions*)optionData)->longestWord < (int)(wordLength + prefixCount)) {
|
||||
@@ -1223,23 +1224,17 @@ emitCandidate:
|
||||
} else {
|
||||
if (((((ZiAlphaWork*)workData)->suffixMode == '\0') && (wordCursor[1] == 0)) &&
|
||||
(candidateCount == 0)) {
|
||||
if ((*wordCursor < 0xeff1) || (0xf010 < *wordCursor)) {
|
||||
((ZiAlphaWork*)workData)->singleCharacter = *wordCursor;
|
||||
}
|
||||
else {
|
||||
if (*wordCursor >= 0xeff1 && *wordCursor <= 0xf010) {
|
||||
((ZiAlphaWork*)workData)->singleCharacter = 0;
|
||||
}
|
||||
}
|
||||
if (((dictionaryExact == 0) || (parameters->elementCount != ((ZiAlphaWork*)workData)->rememberedCount))
|
||||
|| ((parameters->maxCandidates != 1 &&
|
||||
((candidateCount != 0 || (parameters->firstCandidate != 0)))))) {
|
||||
if (((dictionaryExact == 0) && (parameters->elementCount == ((ZiAlphaWork*)workData)->rememberedCount))
|
||||
&& ((parameters->maxCandidates == 1 ||
|
||||
((candidateCount == 0 && (parameters->firstCandidate == 0)))))) {
|
||||
((ZiAlphaWork*)workData)->rememberedWord[0] = 0;
|
||||
else {
|
||||
((ZiAlphaWork*)workData)->singleCharacter = *wordCursor;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (dictionaryExact != 0 &&
|
||||
parameters->elementCount == ((ZiAlphaWork*)workData)->rememberedCount &&
|
||||
(parameters->maxCandidates == 1 ||
|
||||
(candidateCount == 0 && parameters->firstCandidate == 0))) {
|
||||
for (index = 0; (int)index < (int)prefixCount; index = index + 1) {
|
||||
((ZiAlphaWork*)workData)->rememberedWord[index]
|
||||
= wordCursor[index - prefixCount];
|
||||
@@ -1250,6 +1245,13 @@ emitCandidate:
|
||||
}
|
||||
((ZiAlphaWork*)workData)->rememberedWord[index + prefixCount] = 0;
|
||||
}
|
||||
else {
|
||||
if (((dictionaryExact == 0) && (parameters->elementCount == ((ZiAlphaWork*)workData)->rememberedCount))
|
||||
&& ((parameters->maxCandidates == 1 ||
|
||||
((candidateCount == 0 && (parameters->firstCandidate == 0)))))) {
|
||||
((ZiAlphaWork*)workData)->rememberedWord[0] = 0;
|
||||
}
|
||||
}
|
||||
if ((((ZiAlphaWork*)workData)->suffixMode == '\0') &&
|
||||
((((((dictionaryKind == 1 && ((((ZiAlphaWork*)workData)->dictionaryFlags & 1) != 0)) ||
|
||||
((dictionaryKind == 3 && ((((ZiAlphaWork*)workData)->dictionaryFlags & 2) != 0)))) ||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -643,7 +643,7 @@ ziU32 Zi8GetSInfo(ziU8* strokes, ziU8* extraStrokes, ziWChar* outputBuffer, ziU8
|
||||
{
|
||||
int strokeIndex;
|
||||
int outputCount;
|
||||
int extraCount;
|
||||
volatile int extraCount;
|
||||
|
||||
outputCount = 0;
|
||||
Zi8LogError(100, work);
|
||||
@@ -660,8 +660,7 @@ ziU32 Zi8GetSInfo(ziU8* strokes, ziU8* extraStrokes, ziWChar* outputBuffer, ziU8
|
||||
goto lowStroke;
|
||||
}
|
||||
badStroke:
|
||||
outputCount--;
|
||||
outputBuffer[(ziU8)outputCount] = 0;
|
||||
outputBuffer[(ziU8)--outputCount] = 0;
|
||||
return outputCount;
|
||||
lowStroke:
|
||||
outputBuffer[(ziU8)outputCount] = zi8StrokeCode(strokes[strokeIndex] & 0xf, work);
|
||||
|
||||
@@ -89,7 +89,12 @@ ziU32 Zi8MatchPUDdata_ZHS(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar*
|
||||
ZI_WORK->unk_0x310 = (ziU32)table + section->offset[0] * 0x100 + section->offset[1];
|
||||
ZI_WORK->unk_0x318 = 0;
|
||||
}
|
||||
while ((entry = (ziU8*)ZI_WORK->unk_0x310) != 0) {
|
||||
for (;;) {
|
||||
entry = (ziU8*)ZI_WORK->unk_0x310;
|
||||
if (entry == 0) {
|
||||
Zi8LogError(0x4B3, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
while ((ziS32)ZI_WORK->unk_0x318 < (ziS32)ZI_WORK->unk_0x314) {
|
||||
word = entry + 1;
|
||||
wordSize = *entry;
|
||||
@@ -158,8 +163,6 @@ next:
|
||||
fallback = 1;
|
||||
ZI_WORK->unk_0x318 = 0;
|
||||
}
|
||||
Zi8LogError(0x4B3, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
ziU32 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* output, ziU16 capacity, ziU8 complete, ziU8 continuation ZI_NEED_WORK) {
|
||||
ziU32 result;
|
||||
@@ -167,11 +170,12 @@ ziU32 Zi8MatchPUDdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* out
|
||||
for (;;) {
|
||||
result = Zi8_8147FD7C(pattern, length, language, output, capacity, complete, continuation, __zi8_work_data);
|
||||
if ((ziU8)result != 0) break;
|
||||
if ((ZI_WORK->pudCount = ZI_WORK->pudCount + 1) > 16) {
|
||||
if (++ZI_WORK->pudCount <= 16) {
|
||||
continuation = 0;
|
||||
} else {
|
||||
ZI_WORK->pudCount = 1;
|
||||
break;
|
||||
}
|
||||
continuation = 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
|
||||
if (candidate->length == length) {
|
||||
position = 0;
|
||||
while (position < length) {
|
||||
if ((ziU8)candidate->text[position] != (ziU8)word->text[position]) break;
|
||||
if (candidate->text[position] != word->text[position]) break;
|
||||
position++;
|
||||
}
|
||||
if (position == length) {
|
||||
@@ -56,8 +56,7 @@ ziBool Zi8_81480224(ziUserWord* word ZI_NEED_WORK) {
|
||||
previous = current;
|
||||
current = current->next;
|
||||
}
|
||||
length = ZI_WORK->uwdCount;
|
||||
ZI_WORK->uwdCount = length + 1;
|
||||
length = ZI_WORK->uwdCount++;
|
||||
added = &ZI_WORK->uwdNodes[length];
|
||||
if (previous == 0) {
|
||||
ZI_WORK->uwdList = added;
|
||||
@@ -91,8 +90,11 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
|
||||
ziWChar folded;
|
||||
int fallback = 0;
|
||||
int visited = 0;
|
||||
int position, prefixLength, previousOffset;
|
||||
ziU32 size, entryLanguage, entryLength;
|
||||
int prefixLength;
|
||||
int position, previousOffset;
|
||||
ziU32 size;
|
||||
ziU8 entryLanguage;
|
||||
ziU32 entryLength;
|
||||
ziU8* cursor;
|
||||
ziU8* begin;
|
||||
ziU8* boundary;
|
||||
@@ -103,18 +105,33 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
|
||||
ziUserDictionary* dictionary;
|
||||
int firstSegment;
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
if (!(ZI_WORK->unk_0x138 < 3 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
|
||||
if (!(ZI_WORK->unk_0x138 <= 2 && ZI_WORK->unk_0x138 != 0 && ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1] != 0)) {
|
||||
Zi8ReplaceLastError(0x19C, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
dictionary = ZI_WORK->unk_0x130[ZI_WORK->unk_0x138 - 1];
|
||||
if (continuation == 0) {
|
||||
if (continuation != 0) {
|
||||
result = Zi8_814803F4(__zi8_work_data);
|
||||
entryLength = 0;
|
||||
if (result != 0) {
|
||||
entryLanguage = result->language;
|
||||
entryLength = result->length;
|
||||
if (entryLength >= capacity) {
|
||||
Zi8_8148047C(__zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
for (position = 0; position < (ziS32)entryLength; position++) output[position] = Zi8ConvertUC2WC(result->text[position], entryLanguage, __zi8_work_data);
|
||||
}
|
||||
return entryLength;
|
||||
}
|
||||
{
|
||||
Zi8_8148047C(__zi8_work_data);
|
||||
ZI_WORK->unk_0x13C = 0;
|
||||
if (currentWord == 0 || currentLength == 0 || currentWord[currentLength - 1] != 0x20) ZI_WORK->unk_0x140 = 0;
|
||||
else {
|
||||
prefixLength = 0;
|
||||
for (position = currentLength - 2; position >= 0 && currentWord[position] != 0x20; position--) prefixLength++;
|
||||
for (position = currentLength - 2; currentWord[position] != 0x20 && position >= 0; position--) prefixLength++;
|
||||
position++;
|
||||
if (prefixLength == 0 || prefixLength > 63) ZI_WORK->unk_0x140 = 0;
|
||||
else {
|
||||
ZI_WORK->unk_0x140 = 1;
|
||||
@@ -123,7 +140,7 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
|
||||
ZI_WORK->unk_0x141[1] = language;
|
||||
ZI_WORK->unk_0x141[2] = prefixLength;
|
||||
previousOffset = 4;
|
||||
for (; ++position, prefixLength > 0; prefixLength--) {
|
||||
for (; prefixLength > 0; prefixLength--, position++) {
|
||||
folded = currentWord[position];
|
||||
ZI_WORK->unk_0x141[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
|
||||
ZI_WORK->unk_0x184[previousOffset] = 0;
|
||||
@@ -131,12 +148,10 @@ ziU8 Zi8MatchUWDdata(ziWChar* pattern, ziU8 length, ziWChar* currentWord, ziU16
|
||||
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data)) Zi8ChangeCharCase(0, &folded, language, __zi8_work_data);
|
||||
ZI_WORK->unk_0x184[previousOffset] = Zi8ConvertWC2UC(folded, language, __zi8_work_data);
|
||||
}
|
||||
if (ZI_WORK->unk_0x141[previousOffset] == 0) {
|
||||
if (ZI_WORK->unk_0x141[previousOffset++] == 0) {
|
||||
ZI_WORK->unk_0x140 = 0;
|
||||
previousOffset++;
|
||||
break;
|
||||
}
|
||||
previousOffset++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,7 +161,8 @@ rescan:
|
||||
boundary = (ziU8*)dictionary + dictionary->boundary + 7;
|
||||
end = (ziU8*)dictionary + dictionary->end + 7;
|
||||
cursor = begin;
|
||||
firstSegment = begin < boundary;
|
||||
if (begin < boundary) firstSegment = 1;
|
||||
else firstSegment = 0;
|
||||
while (firstSegment ? cursor < boundary : cursor < end) {
|
||||
size = *cursor;
|
||||
candidate = (ziUserWord*)cursor;
|
||||
@@ -185,7 +201,7 @@ next:
|
||||
visited = 0;
|
||||
goto rescan;
|
||||
}
|
||||
if (complete != 0 && length == 1) {
|
||||
if (complete == 1 && length != 0 && continuation == 0) {
|
||||
complete = 0;
|
||||
fallback = 1;
|
||||
visited = 0;
|
||||
|
||||
@@ -22,7 +22,8 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
|
||||
node += offset;
|
||||
if (((ziU32)header & 2) != 0) {
|
||||
if ((*(ziU8*)node & 0x80) != 0) {
|
||||
offset = *((ziU8*)node + 2) + ((*(ziU8*)node & 0x7f) * 0x10000 + ((ziU32)*((ziU8*)node + 1) & 0xffff) * 0x100 + 0x8000);
|
||||
offset = (*(ziU8*)node & 0x7f) * 0x10000 + ((ziU32)*((ziU8*)node + 1) & 0xffff) * 0x100 + 0x8000;
|
||||
offset += *((ziU8*)node + 2);
|
||||
} else {
|
||||
offset = ((ziU32)*(ziU8*)node & 0xffff) * 0x100;
|
||||
offset += (ziU32)*((ziU8*)node + 1);
|
||||
@@ -43,7 +44,7 @@ ziU32 ZiDAWGGetChild(ziU32 node) {
|
||||
|
||||
ziU8* ZiDAWGGetSibling(ziU8* node) {
|
||||
ziU16 header;
|
||||
ziU8* cursor;
|
||||
ziU8* cursor = node;
|
||||
ziS32 depth;
|
||||
ziS32 offset;
|
||||
|
||||
@@ -53,29 +54,29 @@ ziU8* ZiDAWGGetSibling(ziU8* node) {
|
||||
if ((header & 4) == 0) {
|
||||
node = 0;
|
||||
} else {
|
||||
cursor = node;
|
||||
if ((header & 8) != 0) {
|
||||
if ((node[0] & 0xf) == 0xf) {
|
||||
cursor = node + 2;
|
||||
node += 2;
|
||||
} else {
|
||||
cursor = node + 1;
|
||||
node += 1;
|
||||
}
|
||||
|
||||
if ((header & 2) != 0) {
|
||||
if ((*cursor & 0x80) == 0) {
|
||||
cursor += 2;
|
||||
if ((*node & 0x80) == 0) {
|
||||
node += 2;
|
||||
} else {
|
||||
cursor += 3;
|
||||
node += 3;
|
||||
}
|
||||
}
|
||||
|
||||
if ((*cursor & 0x80) == 0) {
|
||||
node += (ziU32)cursor[1] + (ziU32)*cursor * 0x100;
|
||||
if ((*node & 0x80) != 0) {
|
||||
node += (*node & 0x7f) * 0x10000 + (ziU32)node[1] * 0x100 +
|
||||
(ziU32)node[2] + 0x8000;
|
||||
} else {
|
||||
node += (*cursor & 0x7f) * 0x10000 + (ziU32)cursor[1] * 0x100 +
|
||||
0x8000 + (ziU32)cursor[2];
|
||||
node += (ziU16)*node * 0x100 + (ziU32)node[1];
|
||||
}
|
||||
} else {
|
||||
cursor = node;
|
||||
do {
|
||||
header = nodeHeaderTable[cursor[0] >> 4];
|
||||
if ((cursor[0] & 0xf) == 0xf) {
|
||||
@@ -89,24 +90,24 @@ ziU8* ZiDAWGGetSibling(ziU8* node) {
|
||||
if ((header & 1) != 0) {
|
||||
if ((header & 2) == 0) {
|
||||
depth++;
|
||||
} else if ((*cursor & 0x80) == 0) {
|
||||
cursor += 2;
|
||||
offset += 2;
|
||||
} else {
|
||||
} else if ((*cursor & 0x80) != 0) {
|
||||
cursor += 3;
|
||||
offset += 3;
|
||||
} else {
|
||||
cursor += 2;
|
||||
offset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
if ((header & 4) == 0) {
|
||||
depth--;
|
||||
} else if ((header & 8) != 0) {
|
||||
if ((*cursor & 0x80) == 0) {
|
||||
cursor += 2;
|
||||
offset += 2;
|
||||
} else {
|
||||
if ((*cursor & 0x80) != 0) {
|
||||
cursor += 3;
|
||||
offset += 3;
|
||||
} else {
|
||||
cursor += 2;
|
||||
offset += 2;
|
||||
}
|
||||
depth--;
|
||||
}
|
||||
@@ -163,16 +164,10 @@ ziU32 ZiDAWGGetGraphInfo(zi8DawgCtx* context, ziU8* entry, ziU16* keys) {
|
||||
result = 0;
|
||||
pair = (((ziU16)entry[0] << 8) + entry[1]);
|
||||
if (pair != 0) {
|
||||
goto graph_invalid;
|
||||
return 0;
|
||||
}
|
||||
pair = (((ziU16)entry[2] << 8) + entry[3]);
|
||||
if (pair == 0) {
|
||||
goto graph_valid;
|
||||
}
|
||||
graph_invalid:
|
||||
result = 0;
|
||||
goto graph_done;
|
||||
graph_valid:
|
||||
end = (ziU32)(entry + (((ziU16)entry[4] << 8) + entry[5] + 1) * 10);
|
||||
entry += 10;
|
||||
depth = 0;
|
||||
@@ -182,19 +177,18 @@ graph_valid:
|
||||
}
|
||||
|
||||
while (1) {
|
||||
if (*keys == (ziU16)(entry[3] + ((ziU16)entry[2] << 8))) {
|
||||
if (*keys == (ziS32)(entry[3] + ((ziU16)entry[2] << 8))) {
|
||||
break;
|
||||
}
|
||||
entry += (entry[1] + ((ziU16)entry[0] << 8)) * 10 + 10;
|
||||
if ((end <= (ziU32)entry) ||
|
||||
(*keys == (ziU16)(entry[3] + ((ziU16)entry[2] << 8)))) {
|
||||
if (((ziU32)entry >= end) ||
|
||||
(*keys == (ziS32)(entry[3] + ((ziU16)entry[2] << 8)))) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (end <= (ziU32)entry) {
|
||||
result = 0;
|
||||
break;
|
||||
if ((ziU32)entry >= end) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
result = graph + (ziU32)entry[4] * 0x10000 + ((ziU16)entry[5] << 8) +
|
||||
@@ -215,8 +209,7 @@ graph_valid:
|
||||
depth++;
|
||||
keys++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
graph_done:
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
ziU32 Zi8GetTableAddress(ziU8 lang, ziU8 tableIdx, ziPtr workData);
|
||||
ziU16 Zi8GetTableCount(ziU8 lang, ziU8 tableIdx, ziPtr workData);
|
||||
|
||||
ziU8 Zi8_814813FC(ziWChar character, ziU8* result, ziU16* index, ziPtr workData) {
|
||||
ziU8 Zi8LookupKoreanChar(ziWChar character, ziU8* result, ziU16* index, ziPtr workData) {
|
||||
ziU16 i;
|
||||
ziU8* table;
|
||||
|
||||
@@ -23,7 +23,7 @@ ziU8 Zi8_814813FC(ziWChar character, ziU8* result, ziU16* index, ziPtr workData)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData);
|
||||
ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData);
|
||||
|
||||
ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
|
||||
ziPtr workData) {
|
||||
@@ -97,9 +97,9 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
|
||||
|
||||
result = 0;
|
||||
for (currentCharacter = 0; currentCharacter < state.elementIndex; currentCharacter++) {
|
||||
if (Zi8_814813FC(buffer[currentCharacter], &state.characterIndex,
|
||||
if (Zi8LookupKoreanChar(buffer[currentCharacter], &state.characterIndex,
|
||||
&state.inputIndex, workData) != 0) {
|
||||
state.matched = Zi8_81481E6C(&state.nextIndex,
|
||||
state.matched = Zi8MatchKoreanSequence(&state.nextIndex,
|
||||
buffer + currentCharacter + 1,
|
||||
state.characterIndex,
|
||||
(state.elementIndex - currentCharacter) - 1,
|
||||
@@ -235,7 +235,7 @@ ziU32 Zi8GetKoreanCandidates(ziGetParam* params, ziU8* argument,
|
||||
return result;
|
||||
}
|
||||
|
||||
ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData) {
|
||||
ziU8 Zi8MatchKoreanSequence(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPtr workData) {
|
||||
ziU16 nestedScratch;
|
||||
ziU16 nestedIndexStorage;
|
||||
ziU16 index1;
|
||||
@@ -375,8 +375,8 @@ ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPt
|
||||
}
|
||||
if ((index3 >= tableCount) || (firstCharacter != (table + index3 * 4)[2]) ||
|
||||
(input[1] != (table + index3 * 4)[1]) || (input[0] != table[index3 * 4])) {
|
||||
if ((Zi8_814813FC(input[1], &mappedCharacter, &nestedScratch, workData) != 0) &&
|
||||
(Zi8_81481E6C(&nestedIndexStorage, input + 2, mappedCharacter, 1, workData) != 0)) {
|
||||
if ((Zi8LookupKoreanChar(input[1], &mappedCharacter, &nestedScratch, workData) != 0) &&
|
||||
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 2, mappedCharacter, 1, workData) != 0)) {
|
||||
*resultIndex = index1;
|
||||
return 1;
|
||||
}
|
||||
@@ -397,8 +397,8 @@ ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPt
|
||||
if ((index4 >= tableCount) || (firstCharacter != (table + index4 * 4)[3]) ||
|
||||
(input[2] != (table + index4 * 4)[2]) || (input[1] != (table + index4 * 4)[1]) ||
|
||||
(input[0] != table[index4 * 4])) {
|
||||
if ((Zi8_814813FC(input[2], &mappedCharacter, &nestedScratch, workData) != 0) &&
|
||||
(Zi8_81481E6C(&nestedIndexStorage, input + 3, mappedCharacter, 1, workData) != 0)) {
|
||||
if ((Zi8LookupKoreanChar(input[2], &mappedCharacter, &nestedScratch, workData) != 0) &&
|
||||
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 3, mappedCharacter, 1, workData) != 0)) {
|
||||
*resultIndex = index2;
|
||||
return 2;
|
||||
}
|
||||
@@ -409,8 +409,8 @@ ziU8 Zi8_81481E6C(ziU16* resultIndex, ziU16* input, ziU8 type, ziU16 count, ziPt
|
||||
*resultIndex = index4;
|
||||
return 4;
|
||||
}
|
||||
if ((Zi8_814813FC(input[3], &mappedCharacter, &nestedScratch, workData) != 0) &&
|
||||
(Zi8_81481E6C(&nestedIndexStorage, input + 4, mappedCharacter, 1, workData) != 0)) {
|
||||
if ((Zi8LookupKoreanChar(input[3], &mappedCharacter, &nestedScratch, workData) != 0) &&
|
||||
(Zi8MatchKoreanSequence(&nestedIndexStorage, input + 4, mappedCharacter, 1, workData) != 0)) {
|
||||
*resultIndex = index3;
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ typedef struct ziUserKeys {
|
||||
typedef struct ziChineseEntry {
|
||||
ziU8 data[9];
|
||||
ziU8 offsetHigh;
|
||||
ziU16 offsetLow;
|
||||
ziU8 offsetLow[2];
|
||||
} ziChineseEntry;
|
||||
|
||||
ziU8 Zi8GetCandidatesOrCount(ziGetParam*, ziSearchState* ZI_NEED_WORK);
|
||||
@@ -26,19 +26,22 @@ ziPtr Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
|
||||
ziU16 Zi8Uni2Ord(ziWChar ZI_NEED_WORK);
|
||||
|
||||
ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
ziU8 remaining, group;
|
||||
ziU16 value = 0;
|
||||
int count;
|
||||
int offset;
|
||||
ziU8 group;
|
||||
ziU8 remaining;
|
||||
ziU16 value;
|
||||
ziWChar* cursor;
|
||||
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
|
||||
ziSearchState search;
|
||||
ziGetParam request;
|
||||
ziWChar ordinals[65];
|
||||
ziU32 savedFormats = ZI_WORK->unk_0x1410;
|
||||
ziU8 savedCount = ZI_WORK->unk_0x1418;
|
||||
int length, count, offset;
|
||||
int length;
|
||||
int unmatched;
|
||||
ziChineseEntry* entry;
|
||||
ziU8* data;
|
||||
ziU8 formats[8] = {1, 5, 0, 0, 0, 0, 0, 0};
|
||||
ziU32 savedFormats = ZI_WORK->unk_0x1410;
|
||||
ziU8 savedCount = ZI_WORK->unk_0x1418;
|
||||
search.flags = 0;
|
||||
search.word = 0;
|
||||
search.length = 0;
|
||||
@@ -52,7 +55,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
}
|
||||
if (language != 1) {
|
||||
for (length = 0; word[length] != 0; length++) {
|
||||
if (word[length] > 0xEFF0 || length == 64) return 0;
|
||||
if (word[length] >= 0xEFF1 || length == 64) return 0;
|
||||
}
|
||||
((ziU8*)&search.length)[0] = length;
|
||||
((ziU8*)&search.flags)[2] = 1;
|
||||
@@ -91,21 +94,34 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
if (language == 1) {
|
||||
length = 0;
|
||||
do {
|
||||
if (word[length] == 0) {
|
||||
count = length - 1;
|
||||
ordinals[length] = Zi8Uni2Ord(word[length], __zi8_work_data);
|
||||
if (ordinals[length] == 0xFFFF) return 0;
|
||||
length++;
|
||||
if (length == 64) return 0;
|
||||
} while (word[length] != 0);
|
||||
{
|
||||
if (length == 1) return 1;
|
||||
count = --length;
|
||||
ordinals[count] |= 0x8000;
|
||||
ZI_WORK->unk_0x16 = Zi8GetFormatVersion(1, __zi8_work_data) & 2;
|
||||
entry = (ziChineseEntry*)Zi8GetTableAddress(1, 0, __zi8_work_data) + ordinals[0];
|
||||
data = (ziU8*)Zi8GetTableAddress(1, 1, __zi8_work_data) + ((entry->offsetHigh & 15) << 16 | entry->offsetLow);
|
||||
data = (ziU8*)Zi8GetTableAddress(1, 1, __zi8_work_data) + ((entry->offsetHigh & 15) << 16 | ((entry->offsetLow[0] << 8) | entry->offsetLow[1]));
|
||||
if (ZI_WORK->unk_0x16 != 0) {
|
||||
group = *data & 7;
|
||||
if (group == 5) offset = 4;
|
||||
else if (group < 5) {
|
||||
if (group == 2) offset = 2;
|
||||
else if (group < 2) offset = 1;
|
||||
else offset = 3;
|
||||
} else offset = 1;
|
||||
switch (*data & 7) {
|
||||
case 2:
|
||||
offset = 2;
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
offset = 3;
|
||||
break;
|
||||
case 5:
|
||||
offset = 4;
|
||||
break;
|
||||
default:
|
||||
offset = 1;
|
||||
break;
|
||||
}
|
||||
data += offset;
|
||||
}
|
||||
if ((*data & 0x80) == 0) return 0;
|
||||
@@ -134,11 +150,7 @@ ziBool Zi8IsWordW(ziWChar* word, ziU8 language ZI_NEED_WORK) {
|
||||
}
|
||||
Zi8LogError(0x2BD, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
ordinals[length] = Zi8Uni2Ord(word[length], __zi8_work_data);
|
||||
if (ordinals[length] == 0xFFFF) return 0;
|
||||
length++;
|
||||
} while (length != 64);
|
||||
}
|
||||
} else Zi8ReplaceLastError(0x26C, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
@@ -156,10 +168,9 @@ ziWChar Zi8ConvertUC2UserKey(ziChar character, ziU8 language ZI_NEED_WORK) {
|
||||
}
|
||||
}
|
||||
found:
|
||||
if (key < 32) {
|
||||
if (key == 0) return 0xEFFA;
|
||||
if (key >= 1 && key <= 9) return key + 0xEFF0;
|
||||
if (key <= 31) return key + 0xEFF1;
|
||||
}
|
||||
if (key >= 32) return 0;
|
||||
if (key == 0) return 0xEFFA;
|
||||
if (key >= 1 && key <= 9) return key + 0xEFF0;
|
||||
if (key <= 31) return key + 0xEFF1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ ziU16 Zi8GetTableCount(ziU8 language, ziU8 tableIndex, ziPtr __zi8_work_data);
|
||||
ziU32 Zi8GetTableAddress(ziU8 language, ziU8 tableIndex, ziPtr __zi8_work_data);
|
||||
ziU8 Zi8getKeyLayout(ziU8 language, ziWChar key, ziWChar* chars, ziU8 mode, ziPtr __zi8_work_data);
|
||||
|
||||
ziBool Zi8_81484484(ziWChar character, ziWChar* output, ziPtr __zi8_work_data) {
|
||||
ziBool Zi8MapKeyCode(ziWChar character, ziWChar* output, ziPtr __zi8_work_data) {
|
||||
if (character == 0xeffa) {
|
||||
*output = 0;
|
||||
} else if ((character >= 0xeff1) && (character <= 0xeff9)) {
|
||||
@@ -44,13 +44,12 @@ static ziU8 ziNumKeysWithChars(ziU8 language, ziPtr __zi8_work_data) {
|
||||
}
|
||||
|
||||
ziBool Zi8getKeyLayout(ziU8 language, ziWChar key, ziWChar* chars, ziU8 mode, ziPtr __zi8_work_data) {
|
||||
ziU8 numKeys;
|
||||
ziU16 tableCount;
|
||||
ziU8 numKeys;
|
||||
ziU8* dataAddress;
|
||||
ziUserKeyMap* customTable;
|
||||
ziU32 totalCharacters;
|
||||
ziU16 charCount;
|
||||
ziU32 keyIndex;
|
||||
ziU16 keyIndex;
|
||||
ziWChar* keyChars;
|
||||
|
||||
dataAddress = 0;
|
||||
@@ -59,7 +58,7 @@ ziBool Zi8getKeyLayout(ziU8 language, ziWChar key, ziWChar* chars, ziU8 mode, zi
|
||||
*chars = 0;
|
||||
if (ZI_WORK->userKeys[language] != 0) {
|
||||
customTable = ZI_WORK->userKeys[language];
|
||||
if (!Zi8_81484484(key, &key, __zi8_work_data)) {
|
||||
if (!Zi8MapKeyCode(key, &key, __zi8_work_data)) {
|
||||
return 0;
|
||||
}
|
||||
keyChars = customTable->lower[key];
|
||||
@@ -88,20 +87,20 @@ tables_ready:
|
||||
Zi8ReplaceLastError(0x962, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
if (!Zi8_81484484(key, &key, __zi8_work_data) || (key >= numKeys)) {
|
||||
if (!Zi8MapKeyCode(key, &key, __zi8_work_data) || (key >= numKeys)) {
|
||||
Zi8ReplaceLastError(300, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
totalCharacters = 0;
|
||||
keyIndex = totalCharacters;
|
||||
tableCount = 0;
|
||||
keyIndex = tableCount;
|
||||
for (; (ziU16)keyIndex < key; keyIndex++) {
|
||||
totalCharacters += dataAddress[(ziU16)keyIndex];
|
||||
tableCount += dataAddress[(ziU16)keyIndex];
|
||||
}
|
||||
if ((charCount = (ziU8)dataAddress[key]) == 0) {
|
||||
return 0;
|
||||
}
|
||||
dataAddress = dataAddress + numKeys + ((totalCharacters & 0xffff) * 2);
|
||||
dataAddress = dataAddress + numKeys + (tableCount * 2);
|
||||
keyIndex = 0;
|
||||
for (; (ziU16)keyIndex < charCount; keyIndex++) {
|
||||
chars[(ziU16)keyIndex] = (ziU16)dataAddress[(ziU16)keyIndex * 2] |
|
||||
|
||||
@@ -23,48 +23,60 @@ ziU8 Zi8DetachOEMdata(ziU8 id ZI_NEED_WORK) {
|
||||
}
|
||||
ziU8 Zi8MatchOEMdata(ziWChar* pattern, ziU8 length, ziU8 language, ziWChar* word, ziU16 capacity, ziBool complete, ziBool continuation ZI_NEED_WORK) {
|
||||
ziWChar folded;
|
||||
ziU8 fallback = 0;
|
||||
ziU32 index;
|
||||
ziS32 index;
|
||||
ziU32 position;
|
||||
ziU32 fallback = 0;
|
||||
if (!continuation) ZI_WORK->oemIdx = 0;
|
||||
index = ZI_WORK->oemIdx;
|
||||
if ((ziS32)index >= ZI_WORK->oemLen || ZI_WORK->oemMatch == 0) goto noMatch;
|
||||
if ((ziS32)index >= ZI_WORK->oemLen) goto failed;
|
||||
if (ZI_WORK->oemMatch == 0) goto failed;
|
||||
capacity--;
|
||||
if (length >= capacity) goto noMatch;
|
||||
word[capacity] = 0;
|
||||
word[length] = complete ? 1 : 0;
|
||||
for (;;) {
|
||||
if ((ziS32)index >= ZI_WORK->oemLen || !ZI_WORK->oemMatch(index, word, capacity, ZI_WORK->oemData)) {
|
||||
if (length != 1 || !complete || continuation) goto noMatch;
|
||||
complete = 0;
|
||||
fallback = 1;
|
||||
index = 0;
|
||||
continue;
|
||||
}
|
||||
position = 0;
|
||||
if ((complete && word[length] == 0) || (!complete && word[length] != 0)) {
|
||||
for (; (ziS32)position < length; position++) {
|
||||
if (pattern[position] < 0xEFF1 || pattern[position] > 0xF37F) {
|
||||
if (word[position] != pattern[position]) {
|
||||
if (!ZI_WORK->unk_0x1F || language == 1) break;
|
||||
folded = pattern[position];
|
||||
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data) || folded != word[position]) break;
|
||||
}
|
||||
} else if (pattern[position] != Zi8ConvertWC2Key(word[position], language, __zi8_work_data)) break;
|
||||
}
|
||||
}
|
||||
if ((ziS32)position >= length) {
|
||||
if (fallback) {
|
||||
*word = *pattern;
|
||||
return 1;
|
||||
}
|
||||
ZI_WORK->oemIdx = index + 1;
|
||||
while (word[position] != 0) position++;
|
||||
return position;
|
||||
}
|
||||
word[length] = complete ? 1 : 0;
|
||||
index++;
|
||||
if ((ziS32)length >= (ziS32)capacity) {
|
||||
failed:
|
||||
return 0;
|
||||
}
|
||||
noMatch:
|
||||
word[capacity] = 0;
|
||||
if (complete) word[length] = 1; else word[length] = 0;
|
||||
goto matchRetry;
|
||||
posEntry:
|
||||
position = 0;
|
||||
if ((complete && word[length] == 0) || (!complete && word[length] != 0)) {
|
||||
for (; (ziS32)position < length; position++) {
|
||||
if (pattern[position] >= 0xEFF1 && pattern[position] <= 0xF37F) {
|
||||
if (pattern[position] == Zi8ConvertWC2Key(word[position], language, __zi8_work_data)) continue;
|
||||
break;
|
||||
} else if (word[position] != pattern[position]) {
|
||||
if (!ZI_WORK->unk_0x1F || language == 1) break;
|
||||
folded = pattern[position];
|
||||
if (!Zi8ChangeCharCase(1, &folded, language, __zi8_work_data) || folded != word[position]) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((ziS32)position < length) {
|
||||
if (complete) word[length] = 1; else word[length] = 0;
|
||||
index++;
|
||||
if ((ziS32)index >= ZI_WORK->oemLen) goto oemFailed;
|
||||
goto matchRetry;
|
||||
}
|
||||
if (fallback) {
|
||||
index = 0;
|
||||
*word = *pattern;
|
||||
return 1;
|
||||
}
|
||||
index++;
|
||||
ZI_WORK->oemIdx = index;
|
||||
while (word[position] != 0) position++;
|
||||
return position;
|
||||
matchRetry:
|
||||
if ((ziS32)index >= ZI_WORK->oemLen) goto oemFailed;
|
||||
if (!ZI_WORK->oemMatch(index, word, capacity, ZI_WORK->oemData)) goto oemFailed;
|
||||
goto posEntry;
|
||||
oemFailed:
|
||||
if (length != 1 || !complete || continuation) goto tail0;
|
||||
complete = 0;
|
||||
fallback = 1;
|
||||
index = 0;
|
||||
goto matchRetry;
|
||||
tail0:
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ void bta_dm_signal_strength(tBTA_DM_MSG *p_data);
|
||||
|
||||
void bta_dm_acl_change(tBTA_DM_MSG *p_data);
|
||||
|
||||
BOOLEAN bta_sys_check_compress(int, UINT8 app_id, BD_ADDR peer_addr);
|
||||
BOOLEAN bta_sys_check_compress(int id, UINT8 app_id, BD_ADDR peer_addr);
|
||||
|
||||
void bta_dm_keep_acl(tBTA_DM_MSG *p_data);
|
||||
void bta_dm_immediate_disable(void);
|
||||
|
||||
@@ -151,7 +151,7 @@ UINT8 L2CA_SetTraceLevel(UINT8 new_level);
|
||||
UINT8 L2CA_SetDesireRole(UINT8 new_role);
|
||||
BOOLEAN L2CA_SetAclPriority(BD_ADDR bd_addr, UINT8 priority);
|
||||
void L2CA_SetCompression(UINT16 local_cid, UINT8 pe_type, UINT8 mem_level,
|
||||
UINT8 wbits, UINT8 direction, UINT8 param_6,
|
||||
UINT8 wbits, UINT8 direction, UINT8 config,
|
||||
UINT8 enable);
|
||||
void L2CA_RegisterCompression(tL2CA_COMPRESS_CB *, signed);
|
||||
UINT8 L2CA_Flush(UINT16 cid);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
s32 uhf_ker_create_sem(u32 param_1, int param_2);
|
||||
s32 uhf_ker_create_sem(u32 initCount, int flags);
|
||||
s32 uhf_ker_delete_sem(int sem);
|
||||
|
||||
s32 uhf_ker_get_sem(int sem);
|
||||
|
||||
@@ -62,9 +62,9 @@ typedef struct CXUncompContextHuffman {
|
||||
CXHuffmanDecodeTableEntry decodeTableData[0x200]; // 0x20
|
||||
} CXUncompContextHuffman;
|
||||
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* param_2);
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* param_2);
|
||||
void CXInitUncompContextHuffman(CXUncompContextHuffman* context, u8* param_2);
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* data);
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* data);
|
||||
void CXInitUncompContextHuffman(CXUncompContextHuffman* context, u8* data);
|
||||
|
||||
CXStreamingResult CXReadUncompRL(CXUncompContextRL* context, const void* src, u32 size);
|
||||
CXStreamingResult CXReadUncompLZ(CXUncompContextLZ* context, const void* src, u32 size);
|
||||
|
||||
@@ -68,7 +68,7 @@ void KPADInit();
|
||||
s32 KPADRead(s32 chan, KPADStatus* status, u32 length);
|
||||
|
||||
void KPADSetSensorHeight(s32 chan, f32 sensorHeight);
|
||||
void KPADGetProjectionPos(Vec2* dest, Vec2* src, const Rect* param_3, f32 param_4);
|
||||
void KPADGetProjectionPos(Vec2* dest, Vec2* src, const Rect* rect, f32 scale);
|
||||
|
||||
void KPADSetPosParam(s32 chan, f32 x, f32 y);
|
||||
void KPADSetBtnRepeat(s32 chan, f32, f32);
|
||||
|
||||
@@ -40,7 +40,7 @@ ISD_Error ISD_ProbeCard(u32 slot);
|
||||
ISD_Error ISD_MountCard(u32 slot, SDDev** dev);
|
||||
ISD_Error ISD_UnmountCard(SDDev* dev);
|
||||
|
||||
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 param_2, u32* param_3, u32 param_4) NO_INLINE;
|
||||
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 reg, u32* outValue, u32 size) NO_INLINE;
|
||||
|
||||
ISD_Error ISD_ReadBlock(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize);
|
||||
ISD_Error ISD_WriteBlock(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize);
|
||||
|
||||
@@ -33,8 +33,8 @@ typedef struct USBKBDCmdLEDAsync {
|
||||
|
||||
USBKBDErr USBKBDInitialize(USBKBDAttachCallback attachCb, USBKBDDetachCallback detachCb);
|
||||
|
||||
USBKBDErr USBKBDSetLED(u32, u8, USBKBDCmdLED* cmd);
|
||||
USBKBDErr USBKBDSetLEDAsync(u32, u8, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg);
|
||||
USBKBDErr USBKBDSetLED(u32 device, u8 ledBits, USBKBDCmdLED* cmd);
|
||||
USBKBDErr USBKBDSetLEDAsync(u32 device, u8 ledBits, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg);
|
||||
|
||||
USBKBDErr USBKBDRegisterEventCallback(USBKBDEventCallback cb);
|
||||
|
||||
|
||||
@@ -80,11 +80,11 @@ typedef struct {
|
||||
typedef void (*WADProcessCallback)(u32 completed, u32 total, BOOL done);
|
||||
|
||||
s32 WADGetTitleVersionEx(char* path, ESTitleId* titleId, u16* titleVersion, WADLocation location, u32 offset);
|
||||
s32 WADBackupEx(u64 titleId, u32 param_2, MEMAllocator* allocator, char* path, u32* sizeOut, WADLocation location, u32 param_7,
|
||||
WADProcessCallback processCB);
|
||||
s32 WADBackupEx(u64 titleId, u32 flags, MEMAllocator* allocator, char* path, u32* sizeOut, WADLocation location, u32 offset,
|
||||
WADProcessCallback processCallback);
|
||||
|
||||
s32 WADImportGetBlocks(char* path, MEMAllocator* allocator, WADLocation location, u32 offset, u32 param_5, WADBlocks* blocks, u32* param_7);
|
||||
s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 param_4, u32 param_5, WADProcessCallback processCB);
|
||||
s32 WADImportGetBlocks(char* path, MEMAllocator* allocator, WADLocation location, u32 offset, u32 flags, WADBlocks* blocks, u32* fileListOut);
|
||||
s32 WADImportEx(char* path, MEMAllocator* allocator, WADLocation location, u32 offset, u32 flags, WADProcessCallback processCallback);
|
||||
|
||||
s32 WADGetInstalledVersion(ESTitleId titleID, u16* version);
|
||||
|
||||
|
||||
@@ -1376,7 +1376,7 @@ static void bta_dm_link_quality_cback(tBTM_LINK_QUALITY_RESULTS *p_result)
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN bta_sys_check_compress(int param_1, UINT8 app_id, BD_ADDR peer_addr)
|
||||
BOOLEAN bta_sys_check_compress(int id, UINT8 app_id, BD_ADDR peer_addr)
|
||||
{
|
||||
BOOLEAN status = FALSE;
|
||||
int i;
|
||||
@@ -1399,8 +1399,8 @@ BOOLEAN bta_sys_check_compress(int param_1, UINT8 app_id, BD_ADDR peer_addr)
|
||||
}
|
||||
|
||||
static BOOLEAN bta_dm_l2cap_server_compress_cback(
|
||||
BD_ADDR peer_addr, int param_2, int param_3, int param_4,
|
||||
int param_5, int param_6, int param_7, UINT8 **p_mem_pool,
|
||||
BD_ADDR peer_addr, int pe_type, int mem_level, int wbits,
|
||||
int direction, int config, int enable, UINT8 **p_mem_pool,
|
||||
UINT32 *mem_pool_size)
|
||||
{
|
||||
BOOLEAN status = FALSE;
|
||||
|
||||
@@ -22,7 +22,7 @@ void bte_hcisu_send(HC_BT_HDR *p_msg, UINT16 event)
|
||||
GKI_freebuf(p_msg);
|
||||
}
|
||||
|
||||
void bte_hcisu_task(int param_1)
|
||||
void bte_hcisu_task(int unused)
|
||||
{
|
||||
if (p_hcisu_if)
|
||||
{
|
||||
|
||||
@@ -152,11 +152,11 @@ void BTA_CleanUp(tBTA_APP_INFO_CBACK *p_cb)
|
||||
GKI_shutdown();
|
||||
}
|
||||
|
||||
void bta_usb_close_evt(INT8 param_1)
|
||||
void bta_usb_close_evt(INT8 status)
|
||||
{
|
||||
if (_bte_app_info)
|
||||
{
|
||||
if (param_1 >= 0)
|
||||
if (status >= 0)
|
||||
(*_bte_app_info)(0);
|
||||
else
|
||||
(*_bte_app_info)(1);
|
||||
|
||||
@@ -113,20 +113,20 @@ static UINT16 const hcisu_msg_evt_table[] =
|
||||
MSG_HC_TO_STACK_HCI_EVT,
|
||||
};
|
||||
|
||||
void hcisu_h2_usb_cback(UINT8 param_1, INT8 param_2)
|
||||
void hcisu_h2_usb_cback(UINT8 event, INT8 status)
|
||||
{
|
||||
switch (param_1)
|
||||
switch (event)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case 4:
|
||||
bta_usb_close_evt(param_2);
|
||||
bta_usb_close_evt(status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb)
|
||||
UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb)
|
||||
{
|
||||
UINT16 bytes_read = 0;
|
||||
UINT8 byte;
|
||||
@@ -138,7 +138,7 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb)
|
||||
if (p_cb->at_0x1e != 2)
|
||||
return 0;
|
||||
|
||||
r27 = param_1 + 1;
|
||||
r27 = pipe + 1;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
@@ -148,36 +148,36 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb)
|
||||
++bytes_read;
|
||||
msg_received = FALSE;
|
||||
|
||||
switch (p_cb->at_0x1a[param_1])
|
||||
switch (p_cb->at_0x1a[pipe])
|
||||
{
|
||||
case 0:
|
||||
if (r27 == 1)
|
||||
{
|
||||
p_cb->at_0x00[param_1] = GKI_getpoolbuf(GKI_POOL_ID_2);
|
||||
p_cb->at_0x14[param_1] = 4;
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2);
|
||||
p_cb->at_0x14[pipe] = 4;
|
||||
}
|
||||
else if (r27 == 2)
|
||||
{
|
||||
p_cb->at_0x00[param_1] = GKI_getpoolbuf(GKI_POOL_ID_3);
|
||||
p_cb->at_0x14[param_1] = 2;
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3);
|
||||
p_cb->at_0x14[pipe] = 2;
|
||||
}
|
||||
else if (r27 == 3)
|
||||
{
|
||||
p_cb->at_0x00[param_1] = GKI_getpoolbuf(GKI_POOL_ID_1);
|
||||
p_cb->at_0x14[param_1] = 3;
|
||||
p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1);
|
||||
p_cb->at_0x14[pipe] = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (p_cb->at_0x00[param_1])
|
||||
if (p_cb->at_0x00[pipe])
|
||||
{
|
||||
p_cb->at_0x00[param_1]->len = 0;
|
||||
p_cb->at_0x00[param_1]->event =
|
||||
hcisu_msg_evt_table[p_cb->at_0x14[param_1] - 1];
|
||||
p_cb->at_0x00[param_1]->offset = 0;
|
||||
p_cb->at_0x1a[param_1] = 1;
|
||||
p_cb->at_0x00[pipe]->len = 0;
|
||||
p_cb->at_0x00[pipe]->event =
|
||||
hcisu_msg_evt_table[p_cb->at_0x14[pipe] - 1];
|
||||
p_cb->at_0x00[pipe]->offset = 0;
|
||||
p_cb->at_0x1a[pipe] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -185,54 +185,54 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb)
|
||||
"HCIS: Unable to allocate buffer for incoming HCI "
|
||||
"message.");
|
||||
|
||||
p_cb->at_0x1a[param_1] = 2;
|
||||
p_cb->at_0x1a[pipe] = 2;
|
||||
}
|
||||
|
||||
p_cb->at_0x0c[param_1] =
|
||||
hcisu_preamble_table[p_cb->at_0x14[param_1] - 1];
|
||||
p_cb->at_0x0c[pipe] =
|
||||
hcisu_preamble_table[p_cb->at_0x14[pipe] - 1];
|
||||
|
||||
/* fallthrough */
|
||||
|
||||
case 1:
|
||||
*((UINT8 *)(p_cb->at_0x00[param_1] + 1)
|
||||
+ p_cb->at_0x00[param_1]->len++) = byte;
|
||||
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len++) = byte;
|
||||
|
||||
--p_cb->at_0x0c[param_1];
|
||||
--p_cb->at_0x0c[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[param_1] == 0)
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
{
|
||||
msg_len = byte;
|
||||
|
||||
if (p_cb->at_0x14[param_1] == 2)
|
||||
if (p_cb->at_0x14[pipe] == 2)
|
||||
{
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[param_1];
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
|
||||
|
||||
if ((p_cb->at_0x00[param_1] =
|
||||
if ((p_cb->at_0x00[pipe] =
|
||||
(HC_BT_HDR *)l2cap_link_chk_pkt_start(
|
||||
(BT_HDR *)p_cb->at_0x00[param_1]))
|
||||
(BT_HDR *)p_cb->at_0x00[pipe]))
|
||||
== 0)
|
||||
{
|
||||
p_cb->at_0x0c[param_1] = msg_len;
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
|
||||
if (msg_len == 0)
|
||||
p_cb->at_0x1a[param_1] = 0;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
else
|
||||
p_cb->at_0x1a[param_1] = 4;
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
p_cb->at_0x0c[param_1] = msg_len;
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
|
||||
if (sizeof(HC_BT_HDR)
|
||||
+ hcisu_preamble_table[p_cb->at_0x14[param_1] - 1]
|
||||
+ hcisu_preamble_table[p_cb->at_0x14[pipe] - 1]
|
||||
+ msg_len
|
||||
> GKI_get_buf_size(p_cb->at_0x00[param_1]))
|
||||
> GKI_get_buf_size(p_cb->at_0x00[pipe]))
|
||||
{
|
||||
GKI_freebuf(p_cb->at_0x00[param_1]);
|
||||
p_cb->at_0x00[param_1] = NULL;
|
||||
p_cb->at_0x1a[param_1] = 4;
|
||||
GKI_freebuf(p_cb->at_0x00[pipe]);
|
||||
p_cb->at_0x00[pipe] = NULL;
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
|
||||
BT_TRACE(HCI, ERROR,
|
||||
"HCIS: Invalid length for incoming HCI message.");
|
||||
@@ -242,85 +242,85 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb)
|
||||
|
||||
if (msg_len != 0)
|
||||
{
|
||||
p_cb->at_0x1a[param_1] = 3;
|
||||
p_cb->at_0x1a[pipe] = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_received = TRUE;
|
||||
p_cb->at_0x1a[param_1] = 0;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
p_cb->at_0x17[param_1] = byte;
|
||||
p_cb->at_0x17[pipe] = byte;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
--p_cb->at_0x0c[param_1];
|
||||
--p_cb->at_0x0c[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[param_1] == 0)
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
{
|
||||
msg_len = byte;
|
||||
|
||||
if (p_cb->at_0x14[param_1] == 2)
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[param_1];
|
||||
if (p_cb->at_0x14[pipe] == 2)
|
||||
msg_len = (msg_len << 8) + p_cb->at_0x17[pipe];
|
||||
|
||||
p_cb->at_0x0c[param_1] = msg_len;
|
||||
p_cb->at_0x1a[param_1] = 4;
|
||||
p_cb->at_0x0c[pipe] = msg_len;
|
||||
p_cb->at_0x1a[pipe] = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
p_cb->at_0x17[param_1] = byte;
|
||||
p_cb->at_0x17[pipe] = byte;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
*((UINT8 *)(p_cb->at_0x00[param_1] + 1)
|
||||
+ p_cb->at_0x00[param_1]->len++) = byte;
|
||||
*((UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len++) = byte;
|
||||
|
||||
--p_cb->at_0x0c[param_1];
|
||||
--p_cb->at_0x0c[pipe];
|
||||
|
||||
len = UUSB_Read(param_1 + 1,
|
||||
(UINT8 *)(p_cb->at_0x00[param_1] + 1)
|
||||
+ p_cb->at_0x00[param_1]->len,
|
||||
p_cb->at_0x0c[param_1]);
|
||||
len = UUSB_Read(pipe + 1,
|
||||
(UINT8 *)(p_cb->at_0x00[pipe] + 1)
|
||||
+ p_cb->at_0x00[pipe]->len,
|
||||
p_cb->at_0x0c[pipe]);
|
||||
|
||||
p_cb->at_0x00[param_1]->len += len;
|
||||
p_cb->at_0x0c[param_1] -= len;
|
||||
p_cb->at_0x00[pipe]->len += len;
|
||||
p_cb->at_0x0c[pipe] -= len;
|
||||
bytes_read += len;
|
||||
|
||||
if (p_cb->at_0x0c[param_1] == 0)
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
{
|
||||
if (p_cb->at_0x14[param_1] == 2
|
||||
if (p_cb->at_0x14[pipe] == 2
|
||||
&& l2cap_link_chk_pkt_end() == 0)
|
||||
{
|
||||
p_cb->at_0x1a[param_1] = 0;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg_received = TRUE;
|
||||
p_cb->at_0x1a[param_1] = 0;
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
--p_cb->at_0x0c[param_1];
|
||||
--p_cb->at_0x0c[pipe];
|
||||
|
||||
if (p_cb->at_0x0c[param_1] == 0)
|
||||
p_cb->at_0x1a[param_1] = 0;
|
||||
if (p_cb->at_0x0c[pipe] == 0)
|
||||
p_cb->at_0x1a[pipe] = 0;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (msg_received)
|
||||
{
|
||||
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[param_1]);
|
||||
p_cb->at_0x00[param_1] = NULL;
|
||||
GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[pipe]);
|
||||
p_cb->at_0x00[pipe] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ void hcisu_h2_send_msg(tHCISU_H2_CB *p_cb, HC_BT_HDR *p_msg)
|
||||
hcisu_h2_send_msg_now(p_cb, p_msg);
|
||||
}
|
||||
|
||||
void hcisu_h2_init(UINT8 param_1, UINT8 param_2, UINT16 param_3)
|
||||
void hcisu_h2_init(UINT8 taskId, UINT8 mbox, UINT16 bufSize)
|
||||
{
|
||||
hcisu_h2_cb.at_0x1e = 0;
|
||||
|
||||
@@ -411,9 +411,9 @@ void hcisu_h2_init(UINT8 param_1, UINT8 param_2, UINT16 param_3)
|
||||
hcisu_h2_cb.at_0x1a[1] = 0;
|
||||
hcisu_h2_cb.at_0x1a[2] = 0;
|
||||
|
||||
hcisu_h2_cb.at_0x1f = param_1;
|
||||
hcisu_h2_cb.at_0x20 = param_2;
|
||||
hcisu_h2_cb.at_0x12 = param_3;
|
||||
hcisu_h2_cb.at_0x1f = taskId;
|
||||
hcisu_h2_cb.at_0x20 = mbox;
|
||||
hcisu_h2_cb.at_0x12 = bufSize;
|
||||
}
|
||||
|
||||
BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg)
|
||||
|
||||
@@ -478,7 +478,7 @@ BOOLEAN L2CA_SetAclPriority(BD_ADDR bd_addr, UINT8 priority)
|
||||
}
|
||||
|
||||
void L2CA_SetCompression(UINT16 local_cid, UINT8 pe_type, UINT8 mem_level,
|
||||
UINT8 wbits, UINT8 direction, UINT8 param_6,
|
||||
UINT8 wbits, UINT8 direction, UINT8 config,
|
||||
UINT8 enable)
|
||||
{
|
||||
tL2C_LCB *p_lcb;
|
||||
@@ -506,7 +506,7 @@ void L2CA_SetCompression(UINT16 local_cid, UINT8 pe_type, UINT8 mem_level,
|
||||
}
|
||||
}
|
||||
|
||||
void L2CA_RegisterCompression(tL2CA_COMPRESS_CB *param_1, int param_2)
|
||||
void L2CA_RegisterCompression(tL2CA_COMPRESS_CB *p_callback, int unused)
|
||||
{
|
||||
#if 0
|
||||
/* ... */
|
||||
|
||||
@@ -565,7 +565,7 @@ void UUSB_Open(tUUSB *uusb, tUUSB_CBACK *cback)
|
||||
(void)uusb;
|
||||
}
|
||||
|
||||
UINT16 UUSB_Read(UINT8 param_1, void *param_2, UINT16 param_3)
|
||||
UINT16 UUSB_Read(UINT8 pipe, void *buf, UINT16 len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -580,7 +580,7 @@ int UUSB_WriteBuf(/* ... */)
|
||||
return 0;
|
||||
}
|
||||
|
||||
UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4)
|
||||
UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused)
|
||||
{
|
||||
short sp18 = 0;
|
||||
IOSError ret = 0;
|
||||
@@ -591,7 +591,7 @@ UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4)
|
||||
if (usb.state != 2)
|
||||
return 0;
|
||||
|
||||
switch (param_1)
|
||||
switch (pipe)
|
||||
{
|
||||
case 0:
|
||||
p_buf = GKI_getpoolbuf(usb.cmd_buffer_pool);
|
||||
@@ -656,7 +656,7 @@ UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4)
|
||||
memcpy(p_buffer, p_data, len);
|
||||
|
||||
if (len > 190)
|
||||
UUSBDBG(" woah ! thats pretty Big ! :%d", param_3);
|
||||
UUSBDBG(" woah ! thats pretty Big ! :%d", len);
|
||||
|
||||
if (usb.at_0x38 < 5 && usb.bulk_buffer_q.count == 0)
|
||||
{
|
||||
@@ -696,7 +696,7 @@ UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4)
|
||||
break;
|
||||
}
|
||||
|
||||
(void)param_4;
|
||||
(void)unused;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
char lbl_81693350[0xd0] = {
|
||||
char scCntCacheStrs[0xd0] = {
|
||||
0x3c, 0x3c, 0x20, 0x52, 0x56, 0x4c, 0x5f, 0x53, 0x44, 0x4b, 0x20, 0x2d, 0x20, 0x43, 0x4e, 0x54,
|
||||
0x43, 0x41, 0x43, 0x48, 0x45, 0x20, 0x09, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x62,
|
||||
0x75, 0x69, 0x6c, 0x64, 0x3a, 0x20, 0x41, 0x70, 0x72, 0x20, 0x32, 0x30, 0x20, 0x32, 0x30, 0x31,
|
||||
@@ -22,12 +22,12 @@ char lbl_81693350[0xd0] = {
|
||||
0x74, 0x20, 0x00, 0x00, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x00,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00
|
||||
};
|
||||
char lbl_81693420[0x16] = {
|
||||
char scCntCacheTitleDataFmt[0x16] = {
|
||||
0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x2f, 0x25, 0x30, 0x38, 0x78, 0x2f, 0x25, 0x30, 0x38, 0x78,
|
||||
0x2f, 0x64, 0x61, 0x74, 0x61, 0x00,
|
||||
};
|
||||
const char* __CNTCACHEVersion = lbl_81693350;
|
||||
char lbl_816985DC[3] = {0x20, 0x0a, 0x00};
|
||||
const char* __CNTCACHEVersion = scCntCacheStrs;
|
||||
char scCntCacheSpaceNl[3] = {0x20, 0x0a, 0x00};
|
||||
|
||||
extern void _savegpr_23();
|
||||
extern void _restgpr_23();
|
||||
@@ -72,9 +72,9 @@ asm void CNTCACHEClear() {
|
||||
mr r11, r12
|
||||
stw r0, 4(r12)
|
||||
bl _savegpr_23
|
||||
lis r30, lbl_81693350@ha
|
||||
lis r30, scCntCacheStrs@ha
|
||||
lis r3, _CNTCACHEMutex@ha
|
||||
addi r30, r30, lbl_81693350@l
|
||||
addi r30, r30, scCntCacheStrs@l
|
||||
li r29, 0
|
||||
addi r3, r3, _CNTCACHEMutex@l
|
||||
bl OSLockMutex
|
||||
@@ -146,7 +146,7 @@ L_184:
|
||||
stb r31, 0(r4)
|
||||
subf r23, r24, r4
|
||||
mr r3, r24
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
cmpwi r3, 0
|
||||
mr r29, r3
|
||||
@@ -246,7 +246,7 @@ asm void _CNTCACHEDeleteTitle() {
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
@@ -284,7 +284,7 @@ L_350:
|
||||
bl ES_DeleteTitleContent
|
||||
L_364:
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
L_370:
|
||||
cmpwi r3, 0
|
||||
@@ -305,10 +305,10 @@ asm int _CNTCACHEIsTitleRemovable(ESTitleId titleId) {
|
||||
subfic r11, r11, -0x2100
|
||||
stwux r1, r1, r11
|
||||
mflr r0
|
||||
lis r5, lbl_81693420@ha
|
||||
lis r5, scCntCacheTitleDataFmt@ha
|
||||
stw r0, 4(r12)
|
||||
li r0, 1
|
||||
addi r5, r5, lbl_81693420@l
|
||||
addi r5, r5, scCntCacheTitleDataFmt@l
|
||||
stw r31, -4(r12)
|
||||
stw r30, -8(r12)
|
||||
mr r30, r3
|
||||
@@ -403,7 +403,7 @@ asm void _CNTCACHEDeleteContent() {
|
||||
stw r0, 4(r12)
|
||||
bl _savegpr_26
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
li r31, 0
|
||||
li r4, 0
|
||||
@@ -441,10 +441,10 @@ asm void _CNTCACHEDeleteContent() {
|
||||
rlwinm. r0, r3, 0, 0x1b, 0x1b
|
||||
beq L_6f0
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
li r26, 1
|
||||
lis r27, lbl_81693420@ha
|
||||
lis r27, scCntCacheTitleDataFmt@ha
|
||||
b L_6e8
|
||||
L_5b0:
|
||||
stw r31, errno(r0)
|
||||
@@ -488,7 +488,7 @@ L_5e8:
|
||||
li r0, -1
|
||||
stw r26, 0x20(r1)
|
||||
addi r3, r1, 0x40
|
||||
addi r5, r27, lbl_81693420@l
|
||||
addi r5, r27, scCntCacheTitleDataFmt@l
|
||||
stw r26, 0x24(r1)
|
||||
and r6, r30, r0
|
||||
and r7, r29, r0
|
||||
@@ -529,7 +529,7 @@ L_6d4:
|
||||
bdnz L_5e8
|
||||
L_6dc:
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
L_6e8:
|
||||
cmpwi r3, 0
|
||||
|
||||
@@ -221,11 +221,11 @@ CXSecureResult CXSecureUncompressLZ(const void* src, u32 length, void* dst) {
|
||||
return CX_SECURE_ERR_OK;
|
||||
}
|
||||
|
||||
BOOL CXiVerifyHuffmanTable_(const void* param_1, u8 param_2) {
|
||||
const u8* a = param_1;
|
||||
BOOL CXiVerifyHuffmanTable_(const void* table, u8 bitSize) {
|
||||
const u8* a = table;
|
||||
const u8* b = a + 1;
|
||||
u32 c = *a;
|
||||
const u8* d = (u8*)param_1 + ((c + 1) << 1);
|
||||
const u8* d = (u8*)table + ((c + 1) << 1);
|
||||
|
||||
u8 e[sizeof(u8) * 0x40];
|
||||
u32 i;
|
||||
@@ -233,7 +233,7 @@ BOOL CXiVerifyHuffmanTable_(const void* param_1, u8 param_2) {
|
||||
e[i] = 0;
|
||||
}
|
||||
|
||||
if (param_2 == 4 && c >= 16) {
|
||||
if (bitSize == 4 && c >= 16) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
static inline int CXiReadHeader(u8*, int*, const u8*, int, int);
|
||||
static inline CXHuffmanDecodeTableEntry* GetNextNode(CXHuffmanDecodeTableEntry*, int);
|
||||
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* param_2) {
|
||||
context->unk_0x00 = param_2;
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* data) {
|
||||
context->unk_0x00 = data;
|
||||
context->unk_0x04 = 0;
|
||||
context->unk_0x0e = 0;
|
||||
context->unk_0x0C = 0;
|
||||
@@ -13,8 +13,8 @@ void CXInitUncompContextRL(CXUncompContextRL* context, u8* param_2) {
|
||||
context->size = 0;
|
||||
}
|
||||
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* param_2) {
|
||||
context->unk_0x00 = param_2;
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* data) {
|
||||
context->unk_0x00 = data;
|
||||
context->unk_0x04 = 0;
|
||||
context->unk_0x11 = 0;
|
||||
context->unk_0x12 = 0;
|
||||
@@ -125,7 +125,7 @@ CXStreamingResult CXReadUncompRL(CXUncompContextRL* context, const void* src, u3
|
||||
return CX_STREAMING_ERR_OK;
|
||||
}
|
||||
|
||||
static int CXiReadHeader(u8* pHdrLen, int* pOutLen, const u8* pSrc, int srcSize, int param_5) {
|
||||
static int CXiReadHeader(u8* pHdrLen, int* pOutLen, const u8* pSrc, int srcSize, int maxOutLen) {
|
||||
int bytesParsed = 0;
|
||||
|
||||
while (*pHdrLen) {
|
||||
@@ -150,8 +150,8 @@ static int CXiReadHeader(u8* pHdrLen, int* pOutLen, const u8* pSrc, int srcSize,
|
||||
}
|
||||
}
|
||||
|
||||
if (param_5 > 0 && param_5 < *pOutLen) {
|
||||
*pOutLen = param_5;
|
||||
if (maxOutLen > 0 && maxOutLen < *pOutLen) {
|
||||
*pOutLen = maxOutLen;
|
||||
}
|
||||
|
||||
return bytesParsed;
|
||||
|
||||
@@ -24,9 +24,9 @@ char NAND_Org_Path[64];
|
||||
NAND_DISK_INFO nanddisk_info[23];
|
||||
NAND_SEMAPHORE csem;
|
||||
NAND_SEMAPHORE osem;
|
||||
s32 Nanddisk_Internal_Info_Init;
|
||||
s32 NAND_Init;
|
||||
s32 fa_nanad_semid;
|
||||
s32 Nanddisk_Internal_Info_Init = 0;
|
||||
s32 NAND_Init = 0;
|
||||
s32 fa_nanad_semid = 0;
|
||||
|
||||
static inline s32 find_disk(PDM_DISK* disk, NAND_DISK_INFO** result) {
|
||||
NAND_DISK_INFO* info;
|
||||
|
||||
@@ -291,7 +291,7 @@ s32 pfd_st_removal_callback(s32 status, void* data) {
|
||||
return 0;
|
||||
}
|
||||
g_pfd_sddrv_info.media_inserted = 0;
|
||||
if (pfd_sddrv_device(&g_pfd_sddrv_info) != 0) {
|
||||
if (g_pfd_sddrv_info.media_inserted == 0 && pfd_sddrv_device(&g_pfd_sddrv_info) != 0) {
|
||||
g_event = 1;
|
||||
result = ISD_RegisterDeviceIntrHandler(g_pfd_sddrv_info.device, (SDDevIntrCallback)pfd_st_inter_callback, &g_event);
|
||||
if (result != 0) {
|
||||
@@ -554,7 +554,7 @@ s32 pfd_sddrv_get_disk_info(FADisk* disk, FADiskInfo* disk_info) {
|
||||
disk_info->heads = 0;
|
||||
disk_info->sectorsPerTrack = 0;
|
||||
disk_info->formatParam = 0;
|
||||
return result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 pfd_sddrv_init_drv_tbl(FADiskTbl* disk_table, u32 extended) {
|
||||
|
||||
@@ -654,7 +654,7 @@ pf_s32 PFENT_MakeRootDir(PF_VOLUME* p_vol) {
|
||||
return 7;
|
||||
}
|
||||
{
|
||||
static pf_u8 default_volume_label[16] = "NO NAME ";
|
||||
static pf_u8 default_volume_label[12] = "NO NAME ";
|
||||
PFDRV_LoadVolumeLabelFromBuf(p_vol, default_volume_label);
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -1180,20 +1180,24 @@ s32 PFFAT_GetClusterSpecified(PFFAT_FFD* file, u32 chainIndex,
|
||||
s32 PFFAT_GetClusterAllocated(PFFAT_FFD* file, u32 chainIndex,
|
||||
u32 numClusters, u32* cluster)
|
||||
{
|
||||
u32* start;
|
||||
PF_VOLUME* vol;
|
||||
PFFAT_HINT* hint;
|
||||
u32 fatType;
|
||||
u32 locateStart;
|
||||
u32 locateEnd;
|
||||
s32 error;
|
||||
|
||||
fatType = file->p_vol->bpb.fat_type;
|
||||
start = file->p_start_cluster;
|
||||
vol = file->p_vol;
|
||||
fatType = vol->bpb.fat_type;
|
||||
hint = file->p_hint;
|
||||
if (*file->p_start_cluster == 1) {
|
||||
if (*start == 1) {
|
||||
if (fatType <= FAT_16) {
|
||||
*cluster = -1;
|
||||
return 0;
|
||||
}
|
||||
*file->p_start_cluster = file->p_vol->bpb.root_dir_cluster;
|
||||
*start = vol->bpb.root_dir_cluster;
|
||||
}
|
||||
*cluster = -1;
|
||||
error = find_cluster_in_chain(file, chainIndex, 2, numClusters, 1, cluster);
|
||||
|
||||
@@ -120,13 +120,13 @@ pf_s32 VFiPFFAT12_WriteFATEntry(PF_VOLUME* p_vol, pf_u16 cluster, pf_u16 value)
|
||||
}
|
||||
|
||||
pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 value, PF_CACHE_PAGE* p_page) {
|
||||
pf_s32 err;
|
||||
pf_u32 next_sector;
|
||||
pf_u32 offset_in_sector;
|
||||
pf_u16 current_fat;
|
||||
pf_s32 fat_offset;
|
||||
pf_u32 fat_sector;
|
||||
pf_s32 result;
|
||||
pf_u32 next_sector;
|
||||
pf_s32 err;
|
||||
fat_offset = (pf_u16)(cluster + (cluster >> 1));
|
||||
fat_sector = (pf_u16)(p_vol->bpb.active_FAT_sector + (fat_offset >> p_vol->bpb.log2_bytes_per_sector));
|
||||
offset_in_sector = fat_offset & (p_vol->bpb.bytes_per_sector - 1);
|
||||
@@ -153,7 +153,7 @@ pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 val
|
||||
p_page->sector = next_sector;
|
||||
p_page->p_buf[0] = value >> 4;
|
||||
} else {
|
||||
((pf_u16)offset_in_sector + p_page->p_buf)[1] = value >> 4;
|
||||
*(p_page->p_buf + ((pf_u16)offset_in_sector + 1)) = value >> 4;
|
||||
}
|
||||
} else {
|
||||
p_page->p_buf[(pf_u16)offset_in_sector] = value;
|
||||
@@ -165,7 +165,7 @@ pf_s32 PFFAT12_WriteFATEntryWithBuf(PF_VOLUME* p_vol, pf_s16 cluster, pf_u16 val
|
||||
p_page->sector = next_sector;
|
||||
p_page->p_buf[0] = (p_page->p_buf[0] & 0xF0) | ((pf_u8)(value >> 8));
|
||||
} else {
|
||||
((pf_u16)offset_in_sector + p_page->p_buf)[1] = (((pf_u16)offset_in_sector + p_page->p_buf)[1] & 0xF0) | ((pf_u8)(value >> 8));
|
||||
*(p_page->p_buf + ((pf_u16)offset_in_sector + 1)) = (*(p_page->p_buf + ((pf_u16)offset_in_sector + 1)) & 0xF0) | ((pf_u8)(value >> 8));
|
||||
}
|
||||
}
|
||||
if (err != 0) { result = err; }
|
||||
|
||||
@@ -851,15 +851,15 @@ USBKBDErr KBDSetModState(u32 channel, u32 value) {
|
||||
}
|
||||
|
||||
u16 KBDTranslateHidCode(u32 keyCode, u32 modifiers, s32 country) {
|
||||
KBDKeyMap* map;
|
||||
u16* table;
|
||||
u32 keyIndex;
|
||||
u16 entry;
|
||||
s32 mask;
|
||||
u16* table;
|
||||
u16 activeFlag;
|
||||
u16 entry;
|
||||
KBDKeyMap* map;
|
||||
s32 offset;
|
||||
s32 group;
|
||||
u32 shiftFlag;
|
||||
u16 activeFlag;
|
||||
u32 keyIndex;
|
||||
|
||||
if (kbdInitialized == FALSE) {
|
||||
return 0xFFFF;
|
||||
@@ -920,9 +920,9 @@ u16 KBDTranslateHidCode(u32 keyCode, u32 modifiers, s32 country) {
|
||||
shiftFlag <<= offset;
|
||||
activeFlag = shiftFlag;
|
||||
|
||||
if (mask == 0 && (activeFlag & entry) != 0) {
|
||||
if (mask == 0 && (entry & activeFlag) != 0) {
|
||||
offset = offset ^ ((modifiers >> 9) & 1);
|
||||
} else if (mask == 0x8000 && (activeFlag & entry) != 0) {
|
||||
} else if (mask == 0x8000 && (entry & activeFlag) != 0) {
|
||||
u32 numLockShift = 0;
|
||||
if ((s32)(modifiers & 0x100) == 0x100 && offset == 0) {
|
||||
numLockShift = 1;
|
||||
|
||||
@@ -267,6 +267,14 @@ void KPADSetPosParam(s32 chan, f32 x, f32 y) {
|
||||
kpad->posParamY = y;
|
||||
}
|
||||
|
||||
extern const f32 sensorIntervalConversion;
|
||||
|
||||
static inline f32 object_interval_distance(f32 interval) {
|
||||
return interval / sensorIntervalConversion;
|
||||
}
|
||||
|
||||
const f32 sensorIntervalConversion = 0.383864f;
|
||||
|
||||
static void reset_kpad(KPADInside* kpad) {
|
||||
f32 upperY;
|
||||
f32 distanceValue;
|
||||
@@ -1570,7 +1578,7 @@ void KPADInit(void) {
|
||||
objectInterval = kp_obj_interval;
|
||||
enabled = OSDisableInterrupts();
|
||||
kp_obj_interval = objectInterval;
|
||||
distanceValue = objectInterval / 0.383864f;
|
||||
distanceValue = object_interval_distance(objectInterval);
|
||||
kp_err_dist_min = distanceValue;
|
||||
kp_dist_vv1 = distanceValue;
|
||||
OSRestoreInterrupts(enabled);
|
||||
@@ -1607,8 +1615,8 @@ static void KPADiSamplingCallback(s32 chan) {
|
||||
u32 device;
|
||||
if (WPADProbe(chan, &device) != -1) {
|
||||
u8 index = kpad->ringIndex;
|
||||
KPADSample* status;
|
||||
u32 tier;
|
||||
KPADSample* status;
|
||||
u32 enabled;
|
||||
u32 tableIndex;
|
||||
if (index >= 16) {
|
||||
|
||||
@@ -367,7 +367,8 @@ static s32 __nupGetServerInfo(char* serverAddress, char* messageId, unsigned lon
|
||||
} else {
|
||||
snprintf(endpoint, endpointSize, "https://%s/nus/services/NetUpdateSOAP", serverAddress);
|
||||
requestSize = strlen(messageId) + strlen(productArea);
|
||||
requestSize += strlen(countryCode) + 0x449;
|
||||
unsigned long countryLength = strlen(countryCode);
|
||||
requestSize += countryLength + 0x449;
|
||||
if (auditData != 0) {
|
||||
requestSize += strlen(auditData);
|
||||
}
|
||||
@@ -1173,8 +1174,8 @@ static inline s32 __nupGetBoot2Version(u16* version) {
|
||||
s32 result = ES_GetBoot2Version(&bootVersion);
|
||||
if (result == 0) {
|
||||
u16 checkedVersion = bootVersion;
|
||||
*version = checkedVersion;
|
||||
result = checkedVersion == bootVersion ? result : -0x1389;
|
||||
if (checkedVersion != bootVersion) { result = -0x1389; }
|
||||
if (checkedVersion == bootVersion) { *version = checkedVersion; }
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1224,11 +1225,11 @@ static inline void __nupSetStatus(NUPContextInfo* context, s32 status) {
|
||||
extern "C" void* __nupOp(void* argument) {
|
||||
u8* response = 0;
|
||||
ESTmdView* tmdView = 0;
|
||||
char* auditData = 0;
|
||||
u32 needsAudit;
|
||||
u32 currentDeviceId;
|
||||
u32 needsAudit;
|
||||
char* auditData = 0;
|
||||
s32 result;
|
||||
u16 serverBootVersion = 0;
|
||||
u16 serverBootVersion;
|
||||
u16 bootTitleVersion;
|
||||
u16 systemMenuVersion;
|
||||
ESTitleId currentTitleId;
|
||||
@@ -1349,12 +1350,11 @@ extern "C" void* __nupOp(void* argument) {
|
||||
OSUnlockMutex(&context->mutex);
|
||||
for (i = 0; i < context->titleCount; i++) {
|
||||
NUPTitleInfo* title = &context->titles[i];
|
||||
ESTitleId titleId = title->titleId;
|
||||
if (titleId == 0x0000000100000001ULL) {
|
||||
if (context->titles[i].titleId == 0x0000000100000001ULL) {
|
||||
bootTitle = title;
|
||||
} else if (titleId == 0x0000000100000002ULL) {
|
||||
} else if (context->titles[i].titleId == 0x0000000100000002ULL) {
|
||||
menuTitle = title;
|
||||
} else if (titleId == currentTitleId) {
|
||||
} else if (context->titles[i].titleId == currentTitleId) {
|
||||
systemTitle = title;
|
||||
}
|
||||
if (bootTitle != 0 && menuTitle != 0 && systemTitle != 0) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#define SD_SLOT_PATH_LENGTH 32
|
||||
|
||||
char lbl_81691748[] = " +++ SD RESET Failed: %d +++\n\0"
|
||||
char __sdPathData[] = " +++ SD RESET Failed: %d +++\n\0"
|
||||
"/dev/sdio/slot0\0/dev/sdio/slot1\0/dev/sdio/slotw";
|
||||
|
||||
typedef void (*SDCallbackFunc)(s32, void*);
|
||||
@@ -55,17 +55,17 @@ enum {
|
||||
|
||||
static IOSFd sduOpenFD(u32 slot);
|
||||
|
||||
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
|
||||
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
|
||||
void* cb, void* cbArg);
|
||||
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
|
||||
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
|
||||
void* cb, void* cbArg);
|
||||
|
||||
static ISD_Error sduDatabuswidth(SDDev* dev, u32 buswidth);
|
||||
static ISD_Error sduGetSCR(SDDev* dev, u32* data) NO_INLINE;
|
||||
static ISD_Error sduGetOCR(SDDev* dev, u32* data);
|
||||
extern ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6);
|
||||
extern ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6);
|
||||
ISD_Error ISD_GetCardSize(SDDev* dev, u32* param_2, u32* param_3, u32* param_4);
|
||||
extern ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg);
|
||||
extern ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg);
|
||||
ISD_Error ISD_GetCardSize(SDDev* dev, u32* outSize, u32* outSize2, u32* outSectorSize);
|
||||
|
||||
IOSError __sdCb(s32 result, void* arg) {
|
||||
__sdCbArg* data = (__sdCbArg*)arg;
|
||||
@@ -73,7 +73,7 @@ IOSError __sdCb(s32 result, void* arg) {
|
||||
switch (data->unk_0x0C) {
|
||||
case 4: {
|
||||
if (result != 0) {
|
||||
OSReport(lbl_81691748, result);
|
||||
OSReport(__sdPathData, result);
|
||||
data->dev->SDDevRca = 0;
|
||||
} else {
|
||||
if (data->dev != NULL) {
|
||||
@@ -106,33 +106,33 @@ IOSError __sdCb(s32 result, void* arg) {
|
||||
return result;
|
||||
}
|
||||
|
||||
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 param_2, u32* param_3, u32 param_4) {
|
||||
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 reg, u32* outValue, u32 size) {
|
||||
IOSError ret;
|
||||
|
||||
if (__sdHeapId[0] < 0) {
|
||||
return SD_ERROR_FATAL;
|
||||
}
|
||||
|
||||
__sdReg[0] = param_2;
|
||||
__sdReg[3] = param_4;
|
||||
__sdReg[0] = reg;
|
||||
__sdReg[3] = size;
|
||||
__sdReg[4] = 0;
|
||||
|
||||
if (param_3 != NULL) {
|
||||
if (outValue != NULL) {
|
||||
ret = IOS_Ioctl(dev->SDDevFd, SD_IOCTL_2, __sdReg, 0x18, __sdCmdBuffer, 4);
|
||||
if (ret != IPC_RESULT_OK) {
|
||||
return SD_ERROR_FATAL;
|
||||
}
|
||||
*param_3 = *__sdCmdBuffer;
|
||||
*outValue = *__sdCmdBuffer;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return SD_ERROR_FATAL;
|
||||
}
|
||||
|
||||
ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* param_2) {
|
||||
ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* status) {
|
||||
IOSError ret = SD_ERROR_FATAL;
|
||||
|
||||
if (__sdHeapId[0] >= 0 && param_2 != NULL) {
|
||||
if (__sdHeapId[0] >= 0 && status != NULL) {
|
||||
OSLockMutex(&__reqMutex);
|
||||
|
||||
if (__sdReq != 0) {
|
||||
@@ -145,7 +145,7 @@ ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* param_2) {
|
||||
if (ret != IPC_RESULT_OK) {
|
||||
__sdReq = 0;
|
||||
} else {
|
||||
*param_2 = *__sdCmdBuffer;
|
||||
*status = *__sdCmdBuffer;
|
||||
__sdReq = 0;
|
||||
}
|
||||
}
|
||||
@@ -154,13 +154,13 @@ ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* param_2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
|
||||
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
|
||||
void* cb, void* cbArg) {
|
||||
IOSError ret;
|
||||
u32 readCount, writeCount;
|
||||
u32* sdCmd;
|
||||
|
||||
if (param_9 != 0) {
|
||||
if (dma != 0) {
|
||||
readCount = 2;
|
||||
writeCount = 1;
|
||||
} else {
|
||||
@@ -216,7 +216,7 @@ static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
|
||||
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
|
||||
void* cb, void* cbArg) {
|
||||
ISD_Error ret;
|
||||
u32* sdCmd;
|
||||
@@ -232,7 +232,7 @@ static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg,
|
||||
sdCmd[6] = buffer;
|
||||
sdCmd[4] = blockCount;
|
||||
sdCmd[5] = sectorSize;
|
||||
sdCmd[7] = param_9;
|
||||
sdCmd[7] = dma;
|
||||
|
||||
if (resp != NULL) {
|
||||
if (cb != NULL) {
|
||||
@@ -365,7 +365,7 @@ ISD_Error ISD_WriteMultiBlock(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSi
|
||||
return ISD_WriteMultiBlockAsync(dev, offset, cmdResp, cmdRespSize, 0, 0);
|
||||
}
|
||||
|
||||
ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6) {
|
||||
ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg) {
|
||||
ISD_Error ret;
|
||||
u32 status;
|
||||
|
||||
@@ -435,12 +435,12 @@ ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRe
|
||||
|
||||
DCInvalidateRange(cmdResp, cmdRespSize << 9);
|
||||
|
||||
ret = sduCommandv(dev->SDDevFd, 0x12, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)param_5, (void*)param_6);
|
||||
ret = sduCommandv(dev->SDDevFd, 0x12, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)callback, (void*)callbackArg);
|
||||
if (ret != IPC_RESULT_OK) {
|
||||
__sdReq = 0;
|
||||
}
|
||||
|
||||
if (param_5 == 0) {
|
||||
if (callback == 0) {
|
||||
__sdReq = 0;
|
||||
}
|
||||
}
|
||||
@@ -449,7 +449,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6) {
|
||||
ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg) {
|
||||
ISD_Error ret;
|
||||
u32 status;
|
||||
|
||||
@@ -519,12 +519,12 @@ ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdR
|
||||
|
||||
DCFlushRange(cmdResp, cmdRespSize << 9);
|
||||
|
||||
ret = sduCommand(dev->SDDevFd, 0x19, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)param_5, (void*)param_6);
|
||||
ret = sduCommand(dev->SDDevFd, 0x19, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)callback, (void*)callbackArg);
|
||||
if (ret != IPC_RESULT_OK) {
|
||||
__sdReq = 0;
|
||||
}
|
||||
|
||||
if (param_5 == 0) {
|
||||
if (callback == 0) {
|
||||
__sdReq = 0;
|
||||
}
|
||||
}
|
||||
@@ -570,7 +570,7 @@ ISD_Error ISD_UnmountCard(SDDev* dev) {
|
||||
|
||||
ISD_Error ISD_InitCard() {
|
||||
static u8* lo;
|
||||
char* paths = lbl_81691748;
|
||||
char* paths = __sdPathData;
|
||||
ISD_Error ret = SD_ERROR_SUCCESS;
|
||||
BOOL enabled;
|
||||
|
||||
@@ -782,7 +782,7 @@ static ISD_Error sduGetOCR(SDDev* dev, u32* data) {
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
asm ISD_Error ISD_GetCardSize(register SDDev* dev, register u32* param_2, register u32* param_3, register u32* param_4) {
|
||||
asm ISD_Error ISD_GetCardSize(register SDDev* dev, register u32* outSize, register u32* outSize2, register u32* outSectorSize) {
|
||||
nofralloc
|
||||
|
||||
stwu r1, -0x30(r1)
|
||||
@@ -859,13 +859,13 @@ ISD_GetCardSize_store:
|
||||
stw r5, 0x18(r28)
|
||||
stw r0, 0x1c(r28)
|
||||
stw r3, 0x20(r28)
|
||||
beq ISD_GetCardSize_no_param2
|
||||
beq ISD_GetCardSize_no_outSize
|
||||
stw r3, 0(r29)
|
||||
ISD_GetCardSize_no_param2:
|
||||
ISD_GetCardSize_no_outSize:
|
||||
cmpwi r30, 0
|
||||
beq ISD_GetCardSize_no_param3
|
||||
beq ISD_GetCardSize_no_outSize2
|
||||
stw r3, 0(r30)
|
||||
ISD_GetCardSize_no_param3:
|
||||
ISD_GetCardSize_no_outSize2:
|
||||
cmpwi r31, 0
|
||||
beq ISD_GetCardSize_success_return
|
||||
li r0, 0x200
|
||||
@@ -884,7 +884,7 @@ ISD_GetCardSize_return:
|
||||
blr
|
||||
}
|
||||
#else
|
||||
ISD_Error ISD_GetCardSize(SDDev* dev, u32* param_2, u32* param_3, u32* param_4) {
|
||||
ISD_Error ISD_GetCardSize(SDDev* dev, u32* outSize, u32* outSize2, u32* outSectorSize) {
|
||||
ISD_Error ret;
|
||||
u32 out0;
|
||||
u32 out1;
|
||||
@@ -915,14 +915,14 @@ ISD_Error ISD_GetCardSize(SDDev* dev, u32* param_2, u32* param_3, u32* param_4)
|
||||
dev->SDSectorNum = out1;
|
||||
dev->SDDevSize = out2;
|
||||
|
||||
if (param_2 != NULL) {
|
||||
*param_2 = out2;
|
||||
if (outSize != NULL) {
|
||||
*outSize = out2;
|
||||
}
|
||||
if (param_3 != NULL) {
|
||||
*param_3 = out2;
|
||||
if (outSize2 != NULL) {
|
||||
*outSize2 = out2;
|
||||
}
|
||||
if (param_4 != NULL) {
|
||||
*param_4 = 512;
|
||||
if (outSectorSize != NULL) {
|
||||
*outSectorSize = 512;
|
||||
}
|
||||
|
||||
return SD_ERROR_SUCCESS;
|
||||
|
||||
@@ -34,13 +34,13 @@ static void uhf_ker_sem_inline_1() {
|
||||
}
|
||||
}
|
||||
|
||||
s32 uhf_ker_create_sem(u32 param_1, int param_2) {
|
||||
s32 uhf_ker_create_sem(u32 initCount, int flags) {
|
||||
int i, k;
|
||||
|
||||
if (param_1 != 0 && param_1 != 1) {
|
||||
if (initCount != 0 && initCount != 1) {
|
||||
return -5;
|
||||
}
|
||||
if (param_2 != 0) {
|
||||
if (flags != 0) {
|
||||
return -5;
|
||||
}
|
||||
|
||||
@@ -60,13 +60,13 @@ s32 uhf_ker_create_sem(u32 param_1, int param_2) {
|
||||
OSInitSemaphore(&st_uhf_ker_sem[i], 1);
|
||||
sem = &st_uhf_ker_sem[i];
|
||||
|
||||
for (k = (int)(1 - param_1); k > 0; k--) {
|
||||
for (k = (int)(1 - initCount); k > 0; k--) {
|
||||
OSWaitSemaphore((OSSemaphore*)sem);
|
||||
}
|
||||
|
||||
st_uhs_ker_sem_mng.entries[i].sem = sem;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x04 = param_1;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x08 = param_2;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x04 = initCount;
|
||||
st_uhs_ker_sem_mng.entries[i].unk_0x08 = flags;
|
||||
st_uhs_ker_sem_mng.unk_0x90++;
|
||||
|
||||
uhf_ker_sem_inline_1();
|
||||
|
||||
@@ -96,13 +96,13 @@ USBKBDErr USBKBDInitialize(USBKBDAttachCallback attachCb, USBKBDDetachCallback d
|
||||
return USB_KBD_ERR_OK;
|
||||
}
|
||||
|
||||
USBKBDErr USBKBDSetLED(u32 param_1, u8 param_2, USBKBDCmdLED* cmd) {
|
||||
USBKBDErr USBKBDSetLED(u32 device, u8 ledBits, USBKBDCmdLED* cmd) {
|
||||
if (usbKbdFd < 0) {
|
||||
return USB_KBD_ERR_NOT_INIT;
|
||||
}
|
||||
|
||||
cmd->unk_0x04 = param_2;
|
||||
cmd->unk_0x00 = param_1;
|
||||
cmd->unk_0x04 = ledBits;
|
||||
cmd->unk_0x00 = device;
|
||||
|
||||
return IOS_Write(usbKbdFd, cmd, sizeof(USBKBDCmdLED)) != IPC_RESULT_OK ? USB_KBD_ERR_FATAL : USB_KBD_ERR_OK;
|
||||
}
|
||||
@@ -114,12 +114,12 @@ static IOSError usbKbdSetLEDHandler(IOSError error, void* arg) {
|
||||
return IPC_RESULT_OK;
|
||||
}
|
||||
|
||||
USBKBDErr USBKBDSetLEDAsync(u32 param_1, u8 param_2, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg) {
|
||||
USBKBDErr USBKBDSetLEDAsync(u32 device, u8 ledBits, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg) {
|
||||
if (usbKbdFd < 0) {
|
||||
return USB_KBD_ERR_NOT_INIT;
|
||||
}
|
||||
cmd->base.unk_0x00 = param_1;
|
||||
cmd->base.unk_0x04 = param_2;
|
||||
cmd->base.unk_0x00 = device;
|
||||
cmd->base.unk_0x04 = ledBits;
|
||||
cmd->cb = cb;
|
||||
cmd->cbArg = cbArg;
|
||||
|
||||
|
||||
@@ -2947,6 +2947,7 @@ static s32 WAD_815C43E0(WADHashThreadArgs* args) {
|
||||
|
||||
static s32 _WADHash(WADStream* stream, u32 offset, u32 size, void* context, void* buffer,
|
||||
u32 chunkSize, void* secondBuffer, void* threadStack, u32 threadStackSize) {
|
||||
OSMutex* mutex;
|
||||
s32 result;
|
||||
u32 completed = 0;
|
||||
void* readBuffer;
|
||||
@@ -3005,7 +3006,6 @@ static s32 _WADHash(WADStream* stream, u32 offset, u32 size, void* context, void
|
||||
OSResumeThread(&thread);
|
||||
bufferIndex = 0;
|
||||
while (size != 0 && transfer.error == 0) {
|
||||
OSMutex* mutex;
|
||||
readSize = size > chunkSize ? chunkSize : size;
|
||||
mutex = &transfer.mutex[bufferIndex];
|
||||
OSLockMutex(mutex);
|
||||
@@ -3019,11 +3019,10 @@ static s32 _WADHash(WADStream* stream, u32 offset, u32 size, void* context, void
|
||||
readBuffer = transfer.buffers[bufferIndex];
|
||||
result = WADReadStream(stream, &readBuffer, readSize, offset + completed);
|
||||
if ((u32)result != readSize) {
|
||||
OSMutex* otherMutex = &transfer.mutex[bufferIndex ^ 1];
|
||||
OSLockMutex(otherMutex);
|
||||
OSLockMutex(&transfer.mutex[bufferIndex ^ 1]);
|
||||
OSCancelThread(&thread);
|
||||
OSJoinThread(&thread, 0);
|
||||
OSUnlockMutex(otherMutex);
|
||||
OSUnlockMutex(&transfer.mutex[bufferIndex ^ 1]);
|
||||
OSUnlockMutex(mutex);
|
||||
result = -3005;
|
||||
goto done;
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#define DPD_CONFIG2_SIZE 2
|
||||
#define SPK_CONFIG_SIZE 7
|
||||
|
||||
char lbl_81687720[] = "<< RVL_SDK - WPAD \trelease build: Apr 20 2010 11:20:55 (0x4199_60831) >>";
|
||||
const char* __WPADVersion = lbl_81687720;
|
||||
char scWpadVersionStr[] = "<< RVL_SDK - WPAD \trelease build: Apr 20 2010 11:20:55 (0x4199_60831) >>";
|
||||
const char* __WPADVersion = scWpadVersionStr;
|
||||
|
||||
WPADStorage _wpd;
|
||||
WPADCB* _wpdcb[WPAD_MAX_CONTROLLERS];
|
||||
@@ -617,7 +617,7 @@ static void __reconnect(BOOL exec) {
|
||||
WUDShutdown(exec);
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
char lbl_81687810[0x58] = "Reconnect Start!!\n\0\0\0\0\0\0"
|
||||
char scWpadManageStrs[0x58] = "Reconnect Start!!\n\0\0\0\0\0\0"
|
||||
"Check the update of WiFi using channel\n\0"
|
||||
"WiFi uses channel = %d\n";
|
||||
extern void _savegpr_19();
|
||||
@@ -629,8 +629,8 @@ static asm void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
stw r0, 0x164(r1)
|
||||
addi r11, r1, 0x160
|
||||
bl _savegpr_19
|
||||
lis r28, lbl_81687720@ha
|
||||
addi r28, r28, lbl_81687720@l
|
||||
lis r28, scWpadVersionStr@ha
|
||||
addi r28, r28, scWpadVersionStr@l
|
||||
bl WUDGetStatus
|
||||
cmpwi r3, 0x3
|
||||
beq WPADiManageHandler_8AC8
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
extern const char lbl_816979E8[8] = "/\0\0\0\0\0\0\0";
|
||||
#pragma pop
|
||||
char CDBFSPathSeparator = '/';
|
||||
|
||||
void CDBFSConcatenatePath(char* path, const char* concatPath) {
|
||||
strcat(path, lbl_816979E8);
|
||||
strcat(path, &CDBFSPathSeparator);
|
||||
strcat(path, concatPath);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <private/nhttp.h>
|
||||
|
||||
const char NHTTPi_strMultipartBound[] = STR_POSTBOUND;
|
||||
const char NHTTPi_strMultipartBound[24] = STR_POSTBOUND;
|
||||
|
||||
void* NHTTPi_alloc(u32 size, int align);
|
||||
void NHTTPi_free(void* ptr);
|
||||
|
||||
@@ -371,9 +371,9 @@ static BOOL NHTTPi_RecvProxyConnectHeader(NHTTPThreadContext* context)
|
||||
response->httpStatus = NHTTPi_strToInt(header + 9, 3);
|
||||
if (NHTTPi_strnicmp(header, "HTTP/", 5) == 0 && header[8] == ' '
|
||||
&& response->httpStatus == 200) accepted = TRUE;
|
||||
ended = FALSE;
|
||||
cursor = header;
|
||||
index = 0;
|
||||
ended = FALSE;
|
||||
while (index < used)
|
||||
{
|
||||
if (index > 1 && cursor[-1] == '\r' && *cursor == '\r') ended = TRUE;
|
||||
|
||||
@@ -55,7 +55,13 @@ static s32 ConnectionStarted(NHTTPConnectionInfo* handle) {
|
||||
void* system=NHTTPi_GetSystemInfoP();
|
||||
void* mutex=NHTTPi_GetMutexInfoP(system);
|
||||
NHTTPConnectionInfo* connection=NHTTPi_GetConnection(mutex,handle);
|
||||
return connection ? connection->started : -1;
|
||||
s32 started;
|
||||
if (connection == NULL) {
|
||||
started = -1;
|
||||
} else {
|
||||
started = connection->started;
|
||||
}
|
||||
return started;
|
||||
}
|
||||
|
||||
static s32 ConnectionState(NHTTPConnectionInfo* handle) {
|
||||
|
||||
@@ -347,6 +347,10 @@ NWC24Err NWC24SetDlPriority(NWC24DlTask* dlTask, u8 dlPriority) {
|
||||
|
||||
|
||||
|
||||
static inline void ReadDlTaskIdentifier(const NWC24DlTask* dlTask, u16* identifier) {
|
||||
*identifier = ((const DlTaskData*)dlTask)->id;
|
||||
}
|
||||
|
||||
static inline NWC24Err SetDlTaskNextTime(NWC24DlTask* dlTask, OSTime time) {
|
||||
NWC24Work* work = NWC24WorkP;
|
||||
DlTaskListHeader* header = work != NULL ? (DlTaskListHeader*)work->dlHead : NULL;
|
||||
@@ -358,7 +362,7 @@ static inline NWC24Err SetDlTaskNextTime(NWC24DlTask* dlTask, OSTime time) {
|
||||
else if (task->id != 0xffff && task->id >= header->maxTaskCount) { result = NWC24_ERR_INVALID_VALUE; }
|
||||
else { result = NWC24_OK; }
|
||||
if (result != NWC24_OK) { return result; }
|
||||
taskId = task->id;
|
||||
ReadDlTaskIdentifier(dlTask, &taskId);
|
||||
if (taskId == 0xffff) { return NWC24_ERR_FAILED; }
|
||||
time /= 60;
|
||||
header = work != NULL ? (DlTaskListHeader*)work->dlHead : NULL;
|
||||
@@ -421,7 +425,7 @@ NWC24Err NWC24SetDlInterval(NWC24DlTask* dlTask, u16 dlInterval) {
|
||||
}
|
||||
}
|
||||
if (result == NWC24_OK) {
|
||||
taskId = task->id;
|
||||
ReadDlTaskIdentifier(dlTask, &taskId);
|
||||
if (taskId != 0xffff) {
|
||||
nextTime /= 60;
|
||||
if (work != NULL) {
|
||||
@@ -543,12 +547,12 @@ NWC24Err NWC24DumpDlTask(NWC24DlTask* dlTask) {
|
||||
}
|
||||
|
||||
NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
|
||||
NWC24Err result;
|
||||
DlTaskListHeader* entriesHeader;
|
||||
NWC24Work* work;
|
||||
u16 taskId;
|
||||
u16 maxTaskCount;
|
||||
DlTaskListHeader* header;
|
||||
DlTaskListHeader* entriesHeader;
|
||||
NWC24Err result;
|
||||
|
||||
if (NWC24WorkP != NULL) {
|
||||
header = (DlTaskListHeader*)NWC24WorkP->dlHead;
|
||||
@@ -580,7 +584,7 @@ NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
|
||||
}
|
||||
|
||||
entriesHeader = (DlTaskListHeader*)work->dlHead;
|
||||
do {
|
||||
while (taskId < (work == NULL ? (DlTaskListHeader*)NULL : entriesHeader)->maxTaskCount) {
|
||||
header = work != NULL ? entriesHeader : NULL;
|
||||
if (taskId >= header->maxTaskCount || taskId == 0xffff) {
|
||||
result = NWC24_ERR_INVALID_VALUE;
|
||||
@@ -594,20 +598,20 @@ NWC24Err NWC24IterateDlTask(NWC24DlId* dlIterateId, BOOL begin) {
|
||||
return NWC24_OK;
|
||||
}
|
||||
taskId++;
|
||||
} while (taskId < (work != NULL ? entriesHeader : (DlTaskListHeader*)NULL)->maxTaskCount);
|
||||
}
|
||||
return NWC24_ERR_DONE;
|
||||
}
|
||||
|
||||
NWC24Err NWC24IterateDlTaskEx(NWC24DlIterateWork* dlIterateWork, NWC24DlId* dlIterateId) {
|
||||
DlTaskIterationState* state = (DlTaskIterationState*)dlIterateWork;
|
||||
s32 (*getValue)(NWC24DlId);
|
||||
NWC24DlId taskId;
|
||||
s32 value;
|
||||
BOOL descending;
|
||||
BOOL passesSelected;
|
||||
BOOL bestCandidate;
|
||||
NWC24Err result;
|
||||
BOOL found = FALSE;
|
||||
s32 (*getValue)(NWC24DlId);
|
||||
NWC24Err result;
|
||||
|
||||
if (state->valid == 0) {
|
||||
return NWC24_ERR_INVALID_VALUE;
|
||||
@@ -635,8 +639,8 @@ NWC24Err NWC24IterateDlTaskEx(NWC24DlIterateWork* dlIterateWork, NWC24DlId* dlIt
|
||||
if (value == state->comparisonValue && (s32)state->comparisonId < (s32)taskId) {
|
||||
*dlIterateId = taskId;
|
||||
state->comparisonValue = value;
|
||||
state->selectedValue = value;
|
||||
state->comparisonId = taskId;
|
||||
state->selectedValue = value;
|
||||
return NWC24_OK;
|
||||
}
|
||||
result = NWC24IterateDlTask(&taskId, FALSE);
|
||||
@@ -714,6 +718,16 @@ static inline NWC24Err CheckDlTaskRetry(NWC24DlTask* dlTask, u8 retryCount) {
|
||||
if ((retryMask & (1 << retryCount)) == 0) { return NWC24_ERR_DISABLED; }
|
||||
return NWC24_OK;
|
||||
}
|
||||
static inline NWC24Err UpdateDlTaskAccessTime(NWC24DlTask* dlTask) {
|
||||
OSTime universalTime;
|
||||
NWC24Err result = NWC24iGetUniversalTime(&universalTime);
|
||||
if (result >= NWC24_OK) {
|
||||
result = SetDlTaskAccessTime(dlTask, universalTime);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
NWC24Err NWC24UpdateDlTask(NWC24DlTask* dlTask) {
|
||||
DlTaskData* task = (DlTaskData*)dlTask;
|
||||
DlTaskListHeader* header;
|
||||
@@ -725,11 +739,7 @@ NWC24Err NWC24UpdateDlTask(NWC24DlTask* dlTask) {
|
||||
if (result != NWC24_OK) { return result; }
|
||||
taskId = task->id;
|
||||
if (taskId == 0xffff || taskId >= GetCachedDlHeader()->maxTaskCount) { return NWC24_ERR_INVALID_VALUE; }
|
||||
result = NWC24iGetUniversalTime(&universalTime);
|
||||
if (result >= NWC24_OK) {
|
||||
result = SetDlTaskAccessTime(dlTask, universalTime);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
}
|
||||
result = UpdateDlTaskAccessTime(dlTask);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
result = ValidateDlTask(dlTask, TRUE);
|
||||
if (result == NWC24_OK) {
|
||||
@@ -778,23 +788,26 @@ NWC24Err NWC24AddDlTask(NWC24DlTask* dlTask) {
|
||||
result = CheckDlTaskListHeader(header);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
result = AddTaskInternal(dlTask, GetCachedDlHeader()->taskCount, GetCachedDlHeader()->maxTaskCount);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
universalTime = 0;
|
||||
result = NWC24iGetUniversalTime(&universalTime);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
{
|
||||
s32 intervalSeconds;
|
||||
s64 nextTime;
|
||||
intervalSeconds = ((DlTaskData*)dlTask)->interval * 60;
|
||||
nextTime = universalTime + intervalSeconds;
|
||||
return SetDlTaskNextTime(dlTask, nextTime);
|
||||
if (result >= NWC24_OK) {
|
||||
universalTime = 0;
|
||||
result = NWC24iGetUniversalTime(&universalTime);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
{
|
||||
s32 intervalSeconds;
|
||||
s64 nextTime;
|
||||
intervalSeconds = ((DlTaskData*)dlTask)->interval * 60;
|
||||
nextTime = universalTime + intervalSeconds;
|
||||
return SetDlTaskNextTime(dlTask, nextTime);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
NWC24Err NWC24GetDlTask(NWC24DlTask* dlTask, NWC24DlId dlId) {
|
||||
DlTaskListHeader* header;
|
||||
NWC24File file;
|
||||
DlTaskData* task = (DlTaskData*)dlTask;
|
||||
NWC24Err result;
|
||||
NWC24Err operationResult;
|
||||
|
||||
@@ -847,7 +860,7 @@ NWC24Err NWC24GetDlTask(NWC24DlTask* dlTask, NWC24DlId dlId) {
|
||||
if (operationResult < NWC24_OK) {
|
||||
result = operationResult;
|
||||
} else {
|
||||
operationResult = NWC24FRead(dlTask, 0x200, &file);
|
||||
operationResult = NWC24FRead(task, 0x200, &file);
|
||||
result = NWC24_OK;
|
||||
if (operationResult < NWC24_OK) {
|
||||
result = operationResult;
|
||||
@@ -860,44 +873,48 @@ NWC24Err NWC24GetDlTask(NWC24DlTask* dlTask, NWC24DlId dlId) {
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
static inline NWC24Err InitDlIteration(DlTaskIterationState* state, u32 sortMode) {
|
||||
memset(state, 0, sizeof(*state));
|
||||
state->comparisonValue = 0x7fffffff;
|
||||
state->selectedValue = (s32)0x80000001;
|
||||
state->sortMode = sortMode;
|
||||
state->comparisonId = 0xffffffff;
|
||||
state->initialized = 1;
|
||||
state->valid = 1;
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
NWC24Err NWC24PurgeOldestDlTask() {
|
||||
DlTaskIterationState state;
|
||||
NWC24File file;
|
||||
NWC24DlTask task;
|
||||
DlTaskListHeader* header;
|
||||
NWC24DlId taskId;
|
||||
NWC24DlTask* taskPointer;
|
||||
NWC24DlId selectedId;
|
||||
NWC24DlTask* taskPointer;
|
||||
NWC24Err result;
|
||||
NWC24Err closeResult;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
state.sortMode = 0;
|
||||
state.comparisonValue = 0x7fffffff;
|
||||
state.selectedValue = (s32)0x80000001;
|
||||
state.comparisonId = 0xffffffff;
|
||||
state.initialized = 1;
|
||||
state.valid = 1;
|
||||
result = InitDlIteration(&state, 0);
|
||||
if (result < NWC24_OK) { return NWC24_OK; }
|
||||
|
||||
result = NWC24IterateDlTaskEx((NWC24DlIterateWork*)&state, &taskId);
|
||||
while (result == NWC24_OK) {
|
||||
while ((result = NWC24IterateDlTaskEx((NWC24DlIterateWork*)&state, &taskId)) == NWC24_OK) {
|
||||
header = GetCachedDlHeader();
|
||||
if (taskId >= header->taskCount) { break; }
|
||||
result = NWC24IterateDlTaskEx((NWC24DlIterateWork*)&state, &taskId);
|
||||
}
|
||||
|
||||
if (result == NWC24_ERR_DONE) {
|
||||
return NWC24_ERR_FAILED;
|
||||
if (result >= NWC24_OK) {
|
||||
taskPointer = &task;
|
||||
selectedId = taskId;
|
||||
result = ReadDlTaskInline(taskPointer, selectedId);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
taskPointer = &task;
|
||||
result = RemoveDlTask(taskPointer);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
} else if (result == NWC24_ERR_DONE) {
|
||||
result = NWC24_ERR_FAILED;
|
||||
}
|
||||
if (result < NWC24_OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
taskPointer = &task;
|
||||
selectedId = taskId;
|
||||
result = ReadDlTaskInline(taskPointer, selectedId);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
return RemoveDlTask(taskPointer);
|
||||
return result;
|
||||
}
|
||||
NWC24Err NWC24ManageDlTaskListForMenu() {
|
||||
NWC24DlTask task;
|
||||
@@ -912,7 +929,9 @@ NWC24Err NWC24ManageDlTaskListForMenu() {
|
||||
result = ReadDlTaskInline(taskPointer, 2);
|
||||
if (result == NWC24_ERR_NOT_FOUND) { return NWC24_OK; }
|
||||
if (result < NWC24_OK) { return result; }
|
||||
return RemoveDlTask(&task);
|
||||
taskPointer = &task;
|
||||
result = RemoveDlTask(taskPointer);
|
||||
return result;
|
||||
}
|
||||
|
||||
NWC24Err NWC24GetDlOptOutFlags(NWC24DlTask* dlTask, u8* dlOptOutFlags) {
|
||||
@@ -1014,9 +1033,7 @@ NWC24Err NWC24ExtendDlTaskList(u32 num) {
|
||||
result = WriteDlHeader(&file);
|
||||
closeList:
|
||||
closeResult = NWC24FClose(&file);
|
||||
if (result != NWC24_OK) {
|
||||
closeResult = result;
|
||||
}
|
||||
closeResult = result != NWC24_OK ? result : closeResult;
|
||||
result = NWC24iLoadDlHeader();
|
||||
if (closeResult != NWC24_OK) {
|
||||
result = closeResult;
|
||||
@@ -1215,13 +1232,16 @@ static inline NWC24Err ValidateDlTaskUrl(NWC24DlTask* dlTask) {
|
||||
DlTaskListHeader* header = GetCachedDlHeader();
|
||||
NWC24Err result;
|
||||
if (task->id >= header->maxTaskCount && task->id != 0xffff) { return NWC24_ERR_INVALID_VALUE; }
|
||||
result = NWC24iCheckStringLength(task->url, 7, 0x100);
|
||||
if (result >= NWC24_OK) {
|
||||
if (strncmp(task->url, "http://", 7) != 0 && strncmp(task->url, "https://", 8) != 0) { result = NWC24_ERR_FORMAT; }
|
||||
else { result = NWC24_OK; }
|
||||
{
|
||||
const char* url = task->url;
|
||||
result = NWC24iCheckStringLength(url, 7, 0x100);
|
||||
if (result >= NWC24_OK) {
|
||||
if (strncmp(url, "http://", 7) != 0 && strncmp(url, "https://", 8) != 0) { result = NWC24_ERR_FORMAT; }
|
||||
else { result = NWC24_OK; }
|
||||
}
|
||||
if (result < NWC24_OK) { return result; }
|
||||
return NWC24_OK;
|
||||
}
|
||||
if (result < NWC24_OK) { return result; }
|
||||
return NWC24_OK;
|
||||
}
|
||||
|
||||
static inline NWC24Err FindFreeDlTask(NWC24DlTask* dlTask, u16 taskCount, u16 maxTaskCount) {
|
||||
@@ -1251,11 +1271,7 @@ static inline NWC24Err UpdateDlTaskInline(NWC24DlTask* dlTask) {
|
||||
if (result != NWC24_OK) { return result; }
|
||||
taskId = task->id;
|
||||
if (taskId == 0xffff || taskId >= GetCachedDlHeader()->maxTaskCount) { return NWC24_ERR_INVALID_VALUE; }
|
||||
result = NWC24iGetUniversalTime(&universalTime);
|
||||
if (result >= NWC24_OK) {
|
||||
result = SetDlTaskAccessTime(dlTask, universalTime);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
}
|
||||
result = UpdateDlTaskAccessTime(dlTask);
|
||||
if (result < NWC24_OK) { return result; }
|
||||
result = ValidateDlTask(dlTask, TRUE);
|
||||
if (result == NWC24_OK) {
|
||||
@@ -1263,9 +1279,7 @@ static inline NWC24Err UpdateDlTaskInline(NWC24DlTask* dlTask) {
|
||||
task->unknown_0x1a = 0;
|
||||
}
|
||||
if (task->retryEnabled == 1) {
|
||||
for (;;) {
|
||||
result = CheckDlTaskRetry(dlTask, task->retryCount);
|
||||
if (result != NWC24_ERR_DISABLED) { break; }
|
||||
while ((result = CheckDlTaskRetry(dlTask, task->retryCount)) == NWC24_ERR_DISABLED) {
|
||||
task->retryCount = (task->retryCount + 1) & 0x1f;
|
||||
}
|
||||
if (result < NWC24_OK) { return result; }
|
||||
|
||||
@@ -18,10 +18,8 @@ enum {
|
||||
#define FRIEND_LIST_MAGIC 'WcFl'
|
||||
#define FRIEND_LIST_VERSION 2
|
||||
|
||||
const char lbl_8166E160[26] __attribute__((section(".data"), aligned(8))) = "/shared2/wc24/nwc24fl.bin";
|
||||
void* const lbl_8166E160_pad __attribute__((section(".data"))) = (void*)0;
|
||||
static const char* FLFilePath = lbl_8166E160;
|
||||
const u32 FLFilePath_pad __attribute__((section(".sdata"), aligned(1))) = 0;
|
||||
char scNwc24FlPath[] = "/shared2/wc24/nwc24fl.bin";
|
||||
static const char* FLFilePath = scNwc24FlPath;
|
||||
|
||||
const char g_SpecialsChars[16] = { '(', ')', '<', '>', '[', ']', ':', ';', '\\', ',', '"' };
|
||||
|
||||
|
||||
@@ -198,8 +198,10 @@ int SOShutdown(int socket, int how) {
|
||||
}
|
||||
|
||||
int SOPoll(SOPollFD* fds, unsigned int count, s64 timeout) {
|
||||
s32 size;
|
||||
s32 bytes;
|
||||
s32 result;
|
||||
s32 rm;
|
||||
s32 result,bytes,size;
|
||||
PollRequest* request;
|
||||
SOPollFD* reply;
|
||||
if((result=SOiPrepare(NULL,&rm))==0) {
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
const u8 lbl_81695060 = 0;
|
||||
const u8 lbl_81695061 = 0x0F;
|
||||
const u8 lbl_81695062 = 0xAC;
|
||||
const u8 scRsnOui0 = 0;
|
||||
const u8 scRsnOui1 = 0x0F;
|
||||
const u8 scRsnOui2 = 0xAC;
|
||||
const u8 lbl_81695063 = 0;
|
||||
const u8 lbl_81695064 = 0;
|
||||
const u8 lbl_81695065 = 0x50;
|
||||
const u8 lbl_81695066 = 0xF2;
|
||||
const u8 scWpaOui0 = 0;
|
||||
const u8 scWpaOui1 = 0x50;
|
||||
const u8 scWpaOui2 = 0xF2;
|
||||
const u8 lbl_81695067 = 0;
|
||||
#pragma pop
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
const u8 lbl_81697D70 = 0;
|
||||
const u8 lbl_81697D71 = 0x50;
|
||||
const u8 lbl_81697D72 = 0xF2;
|
||||
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;
|
||||
@@ -31,15 +31,15 @@ const u8 lbl_81697D76 = 0;
|
||||
const u8 lbl_81697D77 = 0;
|
||||
#pragma pop
|
||||
|
||||
#define lbl_81695060 (*((volatile const u8*)&lbl_81695060))
|
||||
#define lbl_81695061 (*((volatile const u8*)&lbl_81695061))
|
||||
#define lbl_81695062 (*((volatile const u8*)&lbl_81695062))
|
||||
#define lbl_81695064 (*((volatile const u8*)&lbl_81695064))
|
||||
#define lbl_81695065 (*((volatile const u8*)&lbl_81695065))
|
||||
#define lbl_81695066 (*((volatile const u8*)&lbl_81695066))
|
||||
#define lbl_81697D70 (*((volatile const u8*)&lbl_81697D70))
|
||||
#define lbl_81697D71 (*((volatile const u8*)&lbl_81697D71))
|
||||
#define lbl_81697D72 (*((volatile const u8*)&lbl_81697D72))
|
||||
#define scRsnOui0 (*((volatile const u8*)&scRsnOui0))
|
||||
#define scRsnOui1 (*((volatile const u8*)&scRsnOui1))
|
||||
#define scRsnOui2 (*((volatile const u8*)&scRsnOui2))
|
||||
#define scWpaOui0 (*((volatile const u8*)&scWpaOui0))
|
||||
#define scWpaOui1 (*((volatile const u8*)&scWpaOui1))
|
||||
#define scWpaOui2 (*((volatile const u8*)&scWpaOui2))
|
||||
#define scWpaFindOui0 (*((volatile const u8*)&scWpaFindOui0))
|
||||
#define scWpaFindOui1 (*((volatile const u8*)&scWpaFindOui1))
|
||||
#define scWpaFindOui2 (*((volatile const u8*)&scWpaFindOui2))
|
||||
extern void _savegpr_21();
|
||||
extern void _restgpr_21();
|
||||
|
||||
@@ -175,9 +175,9 @@ s32 WDGetPrivacyMode(WDBssDesc* bssDesc) {
|
||||
if (WDFindInformationElement((WDInfoElement**)&ieData, &ieLength, bssDesc, 0x30)) {
|
||||
u8 data[WD_VENDOR_LENGTH];
|
||||
|
||||
data[0] = lbl_81695060;
|
||||
data[1] = lbl_81695061;
|
||||
data[2] = lbl_81695062;
|
||||
data[0] = scRsnOui0;
|
||||
data[1] = scRsnOui1;
|
||||
data[2] = scRsnOui2;
|
||||
memcpy(readIE, ieData, sizeof(WDVendorInfoElement) + 2);
|
||||
if (memcmp(&readIE[2], data, WD_VENDOR_LENGTH) == 0) {
|
||||
if ((s32)readIE[5] == 3) {
|
||||
@@ -218,15 +218,15 @@ privacy_second: {
|
||||
u8 data[WD_VENDOR_LENGTH];
|
||||
u8 findData[WD_VENDOR_LENGTH];
|
||||
|
||||
findData[0] = lbl_81697D70;
|
||||
findData[1] = lbl_81697D71;
|
||||
findData[2] = lbl_81697D72;
|
||||
findData[0] = scWpaFindOui0;
|
||||
findData[1] = scWpaFindOui1;
|
||||
findData[2] = scWpaFindOui2;
|
||||
if (!WDiFindVendorSpecificIE(&ieData, &ieLength, bssDesc, 0xDD, findData, 1)) {
|
||||
goto privacy_fallback;
|
||||
}
|
||||
data[0] = lbl_81695064;
|
||||
data[1] = lbl_81695065;
|
||||
data[2] = lbl_81695066;
|
||||
data[0] = scWpaOui0;
|
||||
data[1] = scWpaOui1;
|
||||
data[2] = scWpaOui2;
|
||||
|
||||
{
|
||||
memcpy(readIE, ieData, sizeof(WDVendorInfoElement));
|
||||
|
||||
@@ -313,18 +313,18 @@ asm void __div2u() {
|
||||
cmpwi r3, 0x0
|
||||
cntlzw r0, r3
|
||||
cntlzw r9, r4
|
||||
bne L_815F9538
|
||||
bne __div2u_L_815F9538
|
||||
addi r0, r9, 0x20
|
||||
L_815F9538:
|
||||
__div2u_L_815F9538:
|
||||
cmpwi r5, 0x0
|
||||
cntlzw r9, r5
|
||||
cntlzw r10, r6
|
||||
bne L_815F954C
|
||||
bne __div2u_L_815F954C
|
||||
addi r9, r10, 0x20
|
||||
L_815F954C:
|
||||
__div2u_L_815F954C:
|
||||
cmpw r0, r9
|
||||
subfic r10, r0, 0x40
|
||||
bgt L_815F9604
|
||||
bgt __div2u_L_815F9604
|
||||
addi r9, r9, 0x1
|
||||
subfic r9, r9, 0x40
|
||||
add r0, r0, r9
|
||||
@@ -332,49 +332,49 @@ L_815F954C:
|
||||
mtctr r9
|
||||
cmpwi r9, 0x20
|
||||
subi r7, r9, 0x20
|
||||
blt L_815F9584
|
||||
blt __div2u_L_815F9584
|
||||
srw r8, r3, r7
|
||||
li r7, 0x0
|
||||
b L_815F9598
|
||||
L_815F9584:
|
||||
b __div2u_L_815F9598
|
||||
__div2u_L_815F9584:
|
||||
srw r8, r4, r9
|
||||
subfic r7, r9, 0x20
|
||||
slw r7, r3, r7
|
||||
or r8, r8, r7
|
||||
srw r7, r3, r9
|
||||
L_815F9598:
|
||||
__div2u_L_815F9598:
|
||||
cmpwi r0, 0x20
|
||||
subic r9, r0, 0x20
|
||||
blt L_815F95B0
|
||||
blt __div2u_L_815F95B0
|
||||
slw r3, r4, r9
|
||||
li r4, 0x0
|
||||
b L_815F95C4
|
||||
L_815F95B0:
|
||||
b __div2u_L_815F95C4
|
||||
__div2u_L_815F95B0:
|
||||
slw r3, r3, r0
|
||||
subfic r9, r0, 0x20
|
||||
srw r9, r4, r9
|
||||
or r3, r3, r9
|
||||
slw r4, r4, r0
|
||||
L_815F95C4:
|
||||
__div2u_L_815F95C4:
|
||||
li r10, -0x1
|
||||
addic r7, r7, 0x0
|
||||
L_815F95CC:
|
||||
__div2u_L_815F95CC:
|
||||
adde r4, r4, r4
|
||||
adde r3, r3, r3
|
||||
adde r8, r8, r8
|
||||
adde r7, r7, r7
|
||||
subfc r0, r6, r8
|
||||
subfe. r9, r5, r7
|
||||
blt L_815F95F4
|
||||
blt __div2u_L_815F95F4
|
||||
mr r8, r0
|
||||
mr r7, r9
|
||||
addic r0, r10, 0x1
|
||||
L_815F95F4:
|
||||
bdnz L_815F95CC
|
||||
__div2u_L_815F95F4:
|
||||
bdnz __div2u_L_815F95CC
|
||||
adde r4, r4, r4
|
||||
adde r3, r3, r3
|
||||
blr
|
||||
L_815F9604:
|
||||
__div2u_L_815F9604:
|
||||
li r4, 0x0
|
||||
li r3, 0x0
|
||||
blr
|
||||
@@ -385,32 +385,32 @@ asm void __div2i() {
|
||||
#ifdef __MWERKS__
|
||||
stwu r1, -0x10(r1)
|
||||
clrrwi. r9, r3, 31
|
||||
beq L_815F9624
|
||||
beq __div2i_L_815F9624
|
||||
subfic r4, r4, 0x0
|
||||
subfze r3, r3
|
||||
L_815F9624:
|
||||
__div2i_L_815F9624:
|
||||
stw r9, 0x8(r1)
|
||||
clrrwi. r10, r5, 31
|
||||
beq L_815F9638
|
||||
beq __div2i_L_815F9638
|
||||
subfic r6, r6, 0x0
|
||||
subfze r5, r5
|
||||
L_815F9638:
|
||||
__div2i_L_815F9638:
|
||||
stw r10, 0xc(r1)
|
||||
cmpwi r3, 0x0
|
||||
cntlzw r0, r3
|
||||
cntlzw r9, r4
|
||||
bne L_815F9650
|
||||
bne __div2i_L_815F9650
|
||||
addi r0, r9, 0x20
|
||||
L_815F9650:
|
||||
__div2i_L_815F9650:
|
||||
cmpwi r5, 0x0
|
||||
cntlzw r9, r5
|
||||
cntlzw r10, r6
|
||||
bne L_815F9664
|
||||
bne __div2i_L_815F9664
|
||||
addi r9, r10, 0x20
|
||||
L_815F9664:
|
||||
__div2i_L_815F9664:
|
||||
cmpw r0, r9
|
||||
subfic r10, r0, 0x40
|
||||
bgt L_815F9738
|
||||
bgt __div2i_L_815F9738
|
||||
addi r9, r9, 0x1
|
||||
subfic r9, r9, 0x40
|
||||
add r0, r0, r9
|
||||
@@ -418,60 +418,60 @@ L_815F9664:
|
||||
mtctr r9
|
||||
cmpwi r9, 0x20
|
||||
subi r7, r9, 0x20
|
||||
blt L_815F969C
|
||||
blt __div2i_L_815F969C
|
||||
srw r8, r3, r7
|
||||
li r7, 0x0
|
||||
b L_815F96B0
|
||||
L_815F969C:
|
||||
b __div2i_L_815F96B0
|
||||
__div2i_L_815F969C:
|
||||
srw r8, r4, r9
|
||||
subfic r7, r9, 0x20
|
||||
slw r7, r3, r7
|
||||
or r8, r8, r7
|
||||
srw r7, r3, r9
|
||||
L_815F96B0:
|
||||
__div2i_L_815F96B0:
|
||||
cmpwi r0, 0x20
|
||||
subic r9, r0, 0x20
|
||||
blt L_815F96C8
|
||||
blt __div2i_L_815F96C8
|
||||
slw r3, r4, r9
|
||||
li r4, 0x0
|
||||
b L_815F96DC
|
||||
L_815F96C8:
|
||||
b __div2i_L_815F96DC
|
||||
__div2i_L_815F96C8:
|
||||
slw r3, r3, r0
|
||||
subfic r9, r0, 0x20
|
||||
srw r9, r4, r9
|
||||
or r3, r3, r9
|
||||
slw r4, r4, r0
|
||||
L_815F96DC:
|
||||
__div2i_L_815F96DC:
|
||||
li r10, -0x1
|
||||
addic r7, r7, 0x0
|
||||
L_815F96E4:
|
||||
__div2i_L_815F96E4:
|
||||
adde r4, r4, r4
|
||||
adde r3, r3, r3
|
||||
adde r8, r8, r8
|
||||
adde r7, r7, r7
|
||||
subfc r0, r6, r8
|
||||
subfe. r9, r5, r7
|
||||
blt L_815F970C
|
||||
blt __div2i_L_815F970C
|
||||
mr r8, r0
|
||||
mr r7, r9
|
||||
addic r0, r10, 0x1
|
||||
L_815F970C:
|
||||
bdnz L_815F96E4
|
||||
__div2i_L_815F970C:
|
||||
bdnz __div2i_L_815F96E4
|
||||
adde r4, r4, r4
|
||||
adde r3, r3, r3
|
||||
lwz r9, 0x8(r1)
|
||||
lwz r10, 0xc(r1)
|
||||
xor. r7, r9, r10
|
||||
beq L_815F9734
|
||||
beq __div2i_L_815F9734
|
||||
cmpwi r9, 0x0
|
||||
subfic r4, r4, 0x0
|
||||
subfze r3, r3
|
||||
L_815F9734:
|
||||
b L_815F9740
|
||||
L_815F9738:
|
||||
__div2i_L_815F9734:
|
||||
b __div2i_L_815F9740
|
||||
__div2i_L_815F9738:
|
||||
li r4, 0x0
|
||||
li r3, 0x0
|
||||
L_815F9740:
|
||||
__div2i_L_815F9740:
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
#endif
|
||||
@@ -482,18 +482,18 @@ asm void __mod2u() {
|
||||
cmpwi r3, 0x0
|
||||
cntlzw r0, r3
|
||||
cntlzw r9, r4
|
||||
bne L_815F975C
|
||||
bne __mod2u_L_815F975C
|
||||
addi r0, r9, 0x20
|
||||
L_815F975C:
|
||||
__mod2u_L_815F975C:
|
||||
cmpwi r5, 0x0
|
||||
cntlzw r9, r5
|
||||
cntlzw r10, r6
|
||||
bne L_815F9770
|
||||
bne __mod2u_L_815F9770
|
||||
addi r9, r10, 0x20
|
||||
L_815F9770:
|
||||
__mod2u_L_815F9770:
|
||||
cmpw r0, r9
|
||||
subfic r10, r0, 0x40
|
||||
bgt L_815F9828
|
||||
bgt __mod2u_L_815F9828
|
||||
addi r9, r9, 0x1
|
||||
subfic r9, r9, 0x40
|
||||
add r0, r0, r9
|
||||
@@ -501,49 +501,49 @@ L_815F9770:
|
||||
mtctr r9
|
||||
cmpwi r9, 0x20
|
||||
subi r7, r9, 0x20
|
||||
blt L_815F97A8
|
||||
blt __mod2u_L_815F97A8
|
||||
srw r8, r3, r7
|
||||
li r7, 0x0
|
||||
b L_815F97BC
|
||||
L_815F97A8:
|
||||
b __mod2u_L_815F97BC
|
||||
__mod2u_L_815F97A8:
|
||||
srw r8, r4, r9
|
||||
subfic r7, r9, 0x20
|
||||
slw r7, r3, r7
|
||||
or r8, r8, r7
|
||||
srw r7, r3, r9
|
||||
L_815F97BC:
|
||||
__mod2u_L_815F97BC:
|
||||
cmpwi r0, 0x20
|
||||
subic r9, r0, 0x20
|
||||
blt L_815F97D4
|
||||
blt __mod2u_L_815F97D4
|
||||
slw r3, r4, r9
|
||||
li r4, 0x0
|
||||
b L_815F97E8
|
||||
L_815F97D4:
|
||||
b __mod2u_L_815F97E8
|
||||
__mod2u_L_815F97D4:
|
||||
slw r3, r3, r0
|
||||
subfic r9, r0, 0x20
|
||||
srw r9, r4, r9
|
||||
or r3, r3, r9
|
||||
slw r4, r4, r0
|
||||
L_815F97E8:
|
||||
__mod2u_L_815F97E8:
|
||||
li r10, -0x1
|
||||
addic r7, r7, 0x0
|
||||
L_815F97F0:
|
||||
__mod2u_L_815F97F0:
|
||||
adde r4, r4, r4
|
||||
adde r3, r3, r3
|
||||
adde r8, r8, r8
|
||||
adde r7, r7, r7
|
||||
subfc r0, r6, r8
|
||||
subfe. r9, r5, r7
|
||||
blt L_815F9818
|
||||
blt __mod2u_L_815F9818
|
||||
mr r8, r0
|
||||
mr r7, r9
|
||||
addic r0, r10, 0x1
|
||||
L_815F9818:
|
||||
bdnz L_815F97F0
|
||||
__mod2u_L_815F9818:
|
||||
bdnz __mod2u_L_815F97F0
|
||||
mr r4, r8
|
||||
mr r3, r7
|
||||
blr
|
||||
L_815F9828:
|
||||
__mod2u_L_815F9828:
|
||||
blr
|
||||
#endif
|
||||
}
|
||||
@@ -551,30 +551,30 @@ L_815F9828:
|
||||
asm void __mod2i() {
|
||||
#ifdef __MWERKS__
|
||||
cmpwi cr7, r3, 0x0
|
||||
bge cr7, L_815F983C
|
||||
bge cr7, __mod2i_L_815F983C
|
||||
subfic r4, r4, 0x0
|
||||
subfze r3, r3
|
||||
L_815F983C:
|
||||
__mod2i_L_815F983C:
|
||||
cmpwi r5, 0x0
|
||||
bge L_815F984C
|
||||
bge __mod2i_L_815F984C
|
||||
subfic r6, r6, 0x0
|
||||
subfze r5, r5
|
||||
L_815F984C:
|
||||
__mod2i_L_815F984C:
|
||||
cmpwi r3, 0x0
|
||||
cntlzw r0, r3
|
||||
cntlzw r9, r4
|
||||
bne L_815F9860
|
||||
bne __mod2i_L_815F9860
|
||||
addi r0, r9, 0x20
|
||||
L_815F9860:
|
||||
__mod2i_L_815F9860:
|
||||
cmpwi r5, 0x0
|
||||
cntlzw r9, r5
|
||||
cntlzw r10, r6
|
||||
bne L_815F9874
|
||||
bne __mod2i_L_815F9874
|
||||
addi r9, r10, 0x20
|
||||
L_815F9874:
|
||||
__mod2i_L_815F9874:
|
||||
cmpw r0, r9
|
||||
subfic r10, r0, 0x40
|
||||
bgt L_815F9928
|
||||
bgt __mod2i_L_815F9928
|
||||
addi r9, r9, 0x1
|
||||
subfic r9, r9, 0x40
|
||||
add r0, r0, r9
|
||||
@@ -582,52 +582,52 @@ L_815F9874:
|
||||
mtctr r9
|
||||
cmpwi r9, 0x20
|
||||
subi r7, r9, 0x20
|
||||
blt L_815F98AC
|
||||
blt __mod2i_L_815F98AC
|
||||
srw r8, r3, r7
|
||||
li r7, 0x0
|
||||
b L_815F98C0
|
||||
L_815F98AC:
|
||||
b __mod2i_L_815F98C0
|
||||
__mod2i_L_815F98AC:
|
||||
srw r8, r4, r9
|
||||
subfic r7, r9, 0x20
|
||||
slw r7, r3, r7
|
||||
or r8, r8, r7
|
||||
srw r7, r3, r9
|
||||
L_815F98C0:
|
||||
__mod2i_L_815F98C0:
|
||||
cmpwi r0, 0x20
|
||||
subic r9, r0, 0x20
|
||||
blt L_815F98D8
|
||||
blt __mod2i_L_815F98D8
|
||||
slw r3, r4, r9
|
||||
li r4, 0x0
|
||||
b L_815F98EC
|
||||
L_815F98D8:
|
||||
b __mod2i_L_815F98EC
|
||||
__mod2i_L_815F98D8:
|
||||
slw r3, r3, r0
|
||||
subfic r9, r0, 0x20
|
||||
srw r9, r4, r9
|
||||
or r3, r3, r9
|
||||
slw r4, r4, r0
|
||||
L_815F98EC:
|
||||
__mod2i_L_815F98EC:
|
||||
li r10, -0x1
|
||||
addic r7, r7, 0x0
|
||||
L_815F98F4:
|
||||
__mod2i_L_815F98F4:
|
||||
adde r4, r4, r4
|
||||
adde r3, r3, r3
|
||||
adde r8, r8, r8
|
||||
adde r7, r7, r7
|
||||
subfc r0, r6, r8
|
||||
subfe. r9, r5, r7
|
||||
blt L_815F991C
|
||||
blt __mod2i_L_815F991C
|
||||
mr r8, r0
|
||||
mr r7, r9
|
||||
addic r0, r10, 0x1
|
||||
L_815F991C:
|
||||
bdnz L_815F98F4
|
||||
__mod2i_L_815F991C:
|
||||
bdnz __mod2i_L_815F98F4
|
||||
mr r4, r8
|
||||
mr r3, r7
|
||||
L_815F9928:
|
||||
bge cr7, L_815F9934
|
||||
__mod2i_L_815F9928:
|
||||
bge cr7, __mod2i_L_815F9934
|
||||
subfic r4, r4, 0x0
|
||||
subfze r3, r3
|
||||
L_815F9934:
|
||||
__mod2i_L_815F9934:
|
||||
blr
|
||||
#endif
|
||||
}
|
||||
@@ -668,9 +668,9 @@ asm void __shr2i() {
|
||||
slw r10, r3, r8
|
||||
or r4, r4, r10
|
||||
sraw r10, r3, r9
|
||||
ble L_815F99A0
|
||||
ble __shr2i_L_815F99A0
|
||||
or r4, r4, r10
|
||||
L_815F99A0:
|
||||
__shr2i_L_815F99A0:
|
||||
sraw r3, r3, r5
|
||||
blr
|
||||
#endif
|
||||
@@ -680,13 +680,13 @@ asm void __cvt_sll_dbl() {
|
||||
#ifdef __MWERKS__
|
||||
stwu r1, -0x10(r1)
|
||||
clrrwi. r5, r3, 31
|
||||
beq L_815F99BC
|
||||
beq __cvt_sll_dbl_L_815F99BC
|
||||
subfic r4, r4, 0x0
|
||||
subfze r3, r3
|
||||
L_815F99BC:
|
||||
__cvt_sll_dbl_L_815F99BC:
|
||||
or. r7, r3, r4
|
||||
li r6, 0x0
|
||||
beq L_815F9A44
|
||||
beq __cvt_sll_dbl_L_815F9A44
|
||||
cntlzw r7, r3
|
||||
cntlzw r8, r4
|
||||
extlwi r9, r7, 5, 26
|
||||
@@ -705,22 +705,22 @@ L_815F99BC:
|
||||
clrlwi r7, r4, 21
|
||||
cmpwi r7, 0x400
|
||||
addi r6, r6, 0x43e
|
||||
blt L_815F9A2C
|
||||
bgt L_815F9A20
|
||||
blt __cvt_sll_dbl_L_815F9A2C
|
||||
bgt __cvt_sll_dbl_L_815F9A20
|
||||
rlwinm. r7, r4, 0, 20, 20
|
||||
beq L_815F9A2C
|
||||
L_815F9A20:
|
||||
beq __cvt_sll_dbl_L_815F9A2C
|
||||
__cvt_sll_dbl_L_815F9A20:
|
||||
addic r4, r4, 0x800
|
||||
addze r3, r3
|
||||
addze r6, r6
|
||||
L_815F9A2C:
|
||||
__cvt_sll_dbl_L_815F9A2C:
|
||||
rotrwi r4, r4, 11
|
||||
rlwimi r4, r3, 21, 0, 10
|
||||
extrwi r3, r3, 20, 1
|
||||
slwi r6, r6, 20
|
||||
or r3, r6, r3
|
||||
or r3, r5, r3
|
||||
L_815F9A44:
|
||||
__cvt_sll_dbl_L_815F9A44:
|
||||
stw r3, 0x8(r1)
|
||||
stw r4, 0xc(r1)
|
||||
lfd f1, 0x8(r1)
|
||||
@@ -734,7 +734,7 @@ asm void __cvt_ull_dbl() {
|
||||
stwu r1, -0x10(r1)
|
||||
or. r7, r3, r4
|
||||
li r6, 0x0
|
||||
beq L_815F9AE0
|
||||
beq __cvt_ull_dbl_L_815F9AE0
|
||||
cntlzw r7, r3
|
||||
cntlzw r8, r4
|
||||
extlwi r9, r7, 5, 26
|
||||
@@ -753,21 +753,21 @@ asm void __cvt_ull_dbl() {
|
||||
clrlwi r7, r4, 21
|
||||
cmpwi r7, 0x400
|
||||
addi r6, r6, 0x43e
|
||||
blt L_815F9ACC
|
||||
bgt L_815F9AC0
|
||||
blt __cvt_ull_dbl_L_815F9ACC
|
||||
bgt __cvt_ull_dbl_L_815F9AC0
|
||||
rlwinm. r7, r4, 0, 20, 20
|
||||
beq L_815F9ACC
|
||||
L_815F9AC0:
|
||||
beq __cvt_ull_dbl_L_815F9ACC
|
||||
__cvt_ull_dbl_L_815F9AC0:
|
||||
addic r4, r4, 0x800
|
||||
addze r3, r3
|
||||
addze r6, r6
|
||||
L_815F9ACC:
|
||||
__cvt_ull_dbl_L_815F9ACC:
|
||||
rotrwi r4, r4, 11
|
||||
rlwimi r4, r3, 21, 0, 10
|
||||
extrwi r3, r3, 20, 1
|
||||
slwi r6, r6, 20
|
||||
or r3, r6, r3
|
||||
L_815F9AE0:
|
||||
__cvt_ull_dbl_L_815F9AE0:
|
||||
stw r3, 0x8(r1)
|
||||
stw r4, 0xc(r1)
|
||||
lfd f1, 0x8(r1)
|
||||
@@ -781,7 +781,7 @@ asm void __cvt_ull_flt() {
|
||||
stwu r1, -0x10(r1)
|
||||
or. r7, r3, r4
|
||||
li r6, 0x0
|
||||
beq L_815F9B7C
|
||||
beq __cvt_ull_flt_L_815F9B7C
|
||||
cntlzw r7, r3
|
||||
cntlzw r8, r4
|
||||
extlwi r9, r7, 5, 26
|
||||
@@ -800,21 +800,21 @@ asm void __cvt_ull_flt() {
|
||||
clrlwi r7, r4, 21
|
||||
cmpwi r7, 0x400
|
||||
addi r6, r6, 0x43e
|
||||
blt L_815F9B68
|
||||
bgt L_815F9B5C
|
||||
blt __cvt_ull_flt_L_815F9B68
|
||||
bgt __cvt_ull_flt_L_815F9B5C
|
||||
rlwinm. r7, r4, 0, 20, 20
|
||||
beq L_815F9B68
|
||||
L_815F9B5C:
|
||||
beq __cvt_ull_flt_L_815F9B68
|
||||
__cvt_ull_flt_L_815F9B5C:
|
||||
addic r4, r4, 0x800
|
||||
addze r3, r3
|
||||
addze r6, r6
|
||||
L_815F9B68:
|
||||
__cvt_ull_flt_L_815F9B68:
|
||||
rotrwi r4, r4, 11
|
||||
rlwimi r4, r3, 21, 0, 10
|
||||
extrwi r3, r3, 20, 1
|
||||
slwi r6, r6, 20
|
||||
or r3, r6, r3
|
||||
L_815F9B7C:
|
||||
__cvt_ull_flt_L_815F9B7C:
|
||||
stw r3, 0x8(r1)
|
||||
stw r4, 0xc(r1)
|
||||
lfd f1, 0x8(r1)
|
||||
@@ -832,17 +832,17 @@ asm void __cvt_dbl_usll() {
|
||||
lwz r4, 0xc(r1)
|
||||
extrwi r5, r3, 11, 1
|
||||
cmplwi r5, 0x3ff
|
||||
bge L_815F9BBC
|
||||
bge __cvt_dbl_usll_L_815F9BBC
|
||||
li r3, 0x0
|
||||
li r4, 0x0
|
||||
b L_815F9C58
|
||||
L_815F9BBC:
|
||||
b __cvt_dbl_usll_L_815F9C58
|
||||
__cvt_dbl_usll_L_815F9BBC:
|
||||
mr r6, r3
|
||||
clrlwi r3, r3, 12
|
||||
oris r3, r3, 0x10
|
||||
subi r5, r5, 0x433
|
||||
cmpwi r5, 0x0
|
||||
bge L_815F9BFC
|
||||
bge __cvt_dbl_usll_L_815F9BFC
|
||||
neg r5, r5
|
||||
subfic r8, r5, 0x20
|
||||
subic r9, r5, 0x20
|
||||
@@ -852,21 +852,21 @@ L_815F9BBC:
|
||||
srw r10, r3, r9
|
||||
or r4, r4, r10
|
||||
srw r3, r3, r5
|
||||
b L_815F9C48
|
||||
L_815F9BFC:
|
||||
b __cvt_dbl_usll_L_815F9C48
|
||||
__cvt_dbl_usll_L_815F9BFC:
|
||||
cmpwi r5, 0xa
|
||||
ble+ L_815F9C28
|
||||
ble+ __cvt_dbl_usll_L_815F9C28
|
||||
clrrwi. r6, r6, 31
|
||||
beq L_815F9C18
|
||||
beq __cvt_dbl_usll_L_815F9C18
|
||||
lis r3, 0x8000
|
||||
li r4, 0x0
|
||||
b L_815F9C58
|
||||
L_815F9C18:
|
||||
b __cvt_dbl_usll_L_815F9C58
|
||||
__cvt_dbl_usll_L_815F9C18:
|
||||
lis r3, 0x7fff
|
||||
ori r3, r3, 0xffff
|
||||
li r4, -0x1
|
||||
b L_815F9C58
|
||||
L_815F9C28:
|
||||
b __cvt_dbl_usll_L_815F9C58
|
||||
__cvt_dbl_usll_L_815F9C28:
|
||||
subfic r8, r5, 0x20
|
||||
subic r9, r5, 0x20
|
||||
slw r3, r3, r5
|
||||
@@ -875,12 +875,12 @@ L_815F9C28:
|
||||
slw r10, r4, r9
|
||||
or r3, r3, r10
|
||||
slw r4, r4, r5
|
||||
L_815F9C48:
|
||||
__cvt_dbl_usll_L_815F9C48:
|
||||
clrrwi. r6, r6, 31
|
||||
beq L_815F9C58
|
||||
beq __cvt_dbl_usll_L_815F9C58
|
||||
subfic r4, r4, 0x0
|
||||
subfze r3, r3
|
||||
L_815F9C58:
|
||||
__cvt_dbl_usll_L_815F9C58:
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
#endif
|
||||
@@ -894,19 +894,19 @@ asm void __cvt_dbl_ull() {
|
||||
lwz r4, 0xc(r1)
|
||||
extrwi r5, r3, 11, 1
|
||||
cmplwi r5, 0x3ff
|
||||
bge L_815F9C88
|
||||
L_815F9C7C:
|
||||
bge __cvt_dbl_ull_L_815F9C88
|
||||
__cvt_dbl_ull_L_815F9C7C:
|
||||
li r3, 0x0
|
||||
li r4, 0x0
|
||||
b L_815F9D00
|
||||
L_815F9C88:
|
||||
b __cvt_dbl_ull_L_815F9D00
|
||||
__cvt_dbl_ull_L_815F9C88:
|
||||
clrrwi. r6, r3, 31
|
||||
bne L_815F9C7C
|
||||
bne __cvt_dbl_ull_L_815F9C7C
|
||||
clrlwi r3, r3, 12
|
||||
oris r3, r3, 0x10
|
||||
subi r5, r5, 0x433
|
||||
cmpwi r5, 0x0
|
||||
bge L_815F9CCC
|
||||
bge __cvt_dbl_ull_L_815F9CCC
|
||||
neg r5, r5
|
||||
subfic r8, r5, 0x20
|
||||
subic r9, r5, 0x20
|
||||
@@ -916,14 +916,14 @@ L_815F9C88:
|
||||
srw r10, r3, r9
|
||||
or r4, r4, r10
|
||||
srw r3, r3, r5
|
||||
b L_815F9D00
|
||||
L_815F9CCC:
|
||||
b __cvt_dbl_ull_L_815F9D00
|
||||
__cvt_dbl_ull_L_815F9CCC:
|
||||
cmpwi r5, 0xb
|
||||
ble+ L_815F9CE0
|
||||
ble+ __cvt_dbl_ull_L_815F9CE0
|
||||
li r3, -0x1
|
||||
li r4, -0x1
|
||||
b L_815F9D00
|
||||
L_815F9CE0:
|
||||
b __cvt_dbl_ull_L_815F9D00
|
||||
__cvt_dbl_ull_L_815F9CE0:
|
||||
subfic r8, r5, 0x20
|
||||
subic r9, r5, 0x20
|
||||
slw r3, r3, r5
|
||||
@@ -932,7 +932,7 @@ L_815F9CE0:
|
||||
slw r10, r4, r9
|
||||
or r3, r3, r10
|
||||
slw r4, r4, r5
|
||||
L_815F9D00:
|
||||
__cvt_dbl_ull_L_815F9D00:
|
||||
addi r1, r1, 0x10
|
||||
blr
|
||||
#endif
|
||||
|
||||
208
sol-high-attempts.jsonl
Normal file
208
sol-high-attempts.jsonl
Normal file
File diff suppressed because one or more lines are too long
47
sol-high-results.txt
Normal file
47
sol-high-results.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
Final matching audit
|
||||
|
||||
src/scene/sdChannelSelect/iplSDChannelSelect: exact 114/129 -> 116/129; objdiff code 25472 -> 26472/33828; data 224 -> 224/2960
|
||||
|
||||
create__Q33ipl5scene15SDChannelSelectFv | objdiff 97.73972% | 145/146 instructions; BS2 loop uses different retained manager/string bases | 7 distinct source attempts, 6 compiled
|
||||
handleSDTitleListResult__Q33ipl5scene15SDChannelSelectFv | objdiff 99.15205% | 170/171 instructions; timer branch form and loop register selection | 5 distinct source attempts, 5 compiled
|
||||
collectTitlesByUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.81188% | 101/101 instructions; count increment and threshold loads scheduled differently | 7 distinct source attempts, 7 compiled
|
||||
collectTitlesFromNandUsage__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.833336% | 102/102 instructions; count increment and threshold loads scheduled differently | 7 distinct source attempts, 7 compiled
|
||||
collectTitlesByChannelOrder__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.29365% | 126/126 instructions; title registers, indexed operand order, threshold-load scheduling | 7 distinct source attempts, 7 compiled
|
||||
collectTitlesBySpecialChannels__Q33ipl5scene15SDChannelSelectFPClPClPUxPcPUl | objdiff 97.55125% | 361/361 instructions; four count-increment/threshold-load schedules | 7 distinct source attempts, 7 compiled
|
||||
flushSaveDataAndMountSD__Q33ipl5scene15SDChannelSelectFv | objdiff 99.65714% | 35/35 instructions; heap and save-manager loads occur in reversed order | 3 distinct source attempts, 3 compiled
|
||||
calcCommon__Q33ipl5scene15SDChannelSelectFv | objdiff 99.07407% | 109/108 instructions; target omits setup of the second event-handler argument | 3 distinct source attempts, 3 compiled
|
||||
drawChannelTransitionObjects__Q33ipl5scene15SDChannelSelectFv | objdiff 95.35849% | 153/159 instructions; state-range branches, switch lowering, and register selection | 7 distinct source attempts, 7 compiled
|
||||
initializeNormalPage__Q33ipl5scene15SDChannelSelectFv | objdiff 98.93617% | 95/94 instructions; target omits setup of the second event-handler argument | 3 distinct source attempts, 3 compiled
|
||||
selectChannel__Q33ipl5scene15SDChannelSelectFii | objdiff 98.305084% | 60/59 instructions; target omits setup of the second event-handler argument | 3 distinct source attempts, 3 compiled
|
||||
setChannelScissor__Q33ipl5scene15SDChannelSelectCFPCQ33ipl5scene12SDChannelObj | objdiff 93.4721% | 233/233 instructions; floating-point evaluation order and register allocation | 3 distinct source attempts, 3 compiled
|
||||
onEventDerived__Q43ipl5scene32@unnamed@iplSDChannelSelect_cpp@33SDChannelSelectButtonEventHandlerFUlUlPCQ33ipl10controller9Interface | objdiff 98.541664% | 144/144 instructions; event branch form and opt-out argument setup | 6 distinct source attempts, 4 compiled
|
||||
|
||||
src/keyboard/tiCandidateBox: exact 103/112 -> 104/112; objdiff code 17212 -> 17996/24000; data 1132 -> 1132/4652
|
||||
|
||||
create__Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | objdiff 92.71023% | 351/352 instructions; inlined initialization loop and retained pane-name addresses | 4 distinct source attempts, 4 compiled
|
||||
createAnmPane___Q39textinput12candidatebox12LayoutByNW4RFP12MEMAllocator | objdiff 96.56481% | 214/216 instructions; inlined constructor/vtable lifetime and register selection | 3 distinct source attempts, 3 compiled
|
||||
CalcPaneLocate___Q39textinput12candidatebox10UITextAreaFv | objdiff 99.78161% | 435/435 instructions; 18 floating-point register differences | 7 distinct source attempts, 7 compiled
|
||||
GetNextPageIdx___Q39textinput12candidatebox10UITextAreaCFl | objdiff 100.0% | 130/130 instructions; eight unresolved SDA21 base-register fields; C conversion left 12 register differences and was restored to preserve baseline objdiff 100% | 10 distinct source attempts, 10 compiled
|
||||
GetPrevPageIdx___Q39textinput12candidatebox10UITextAreaCFl | objdiff 99.57365% | 129/129 instructions; 11 floating-point register differences | 11 distinct source attempts, 11 compiled
|
||||
StartScroll__Q39textinput12candidatebox10UITextAreaFl | objdiff 99.78378% | 185/185 instructions; eight floating-point register differences | 12 distinct source attempts, 12 compiled
|
||||
StartScrollToIdx__Q39textinput12candidatebox10UITextAreaFl | objdiff 99.809784% | 184/184 instructions; seven floating-point register differences | 12 distinct source attempts, 12 compiled
|
||||
onGUIEvent__Q39textinput12candidatebox10UITextAreaFRQ39textinput3gui13PaneComponentUlPQ49textinput11nw4rmanager14TiEventHandler5Input | objdiff 100.0% | 450/450 instructions; objdiff 100%; gate misnormalizes two CR1 branches using the CR operand instead of the branch destination | 3 distinct source attempts, 3 compiled
|
||||
|
||||
src/keyboard/tiCellPhone: exact 83/86 -> 83/86; objdiff code 12824 -> 12824/19028; data 3860 -> 3860/3860
|
||||
|
||||
onKey__Q49textinput8keyboard13cellphonetype4BaseFUlPv | objdiff 99.67009% | 682/682 instructions; 37 register differences across inlined lookup scopes | 7 distinct source attempts, 7 compiled
|
||||
create__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFP12MEMAllocator | objdiff 99.8949% | 333/333 instructions; seven register differences in the toggle animation loop | 10 distinct source attempts, 9 compiled
|
||||
init__Q49textinput8keyboard13cellphonetype12LayoutByNW4RFv | objdiff 98.52612% | 536/536 instructions; 155 register differences; same frame and operation sequence; no tested lifetime/declaration change fixed allocation | 6 distinct source attempts, 6 compiled
|
||||
|
||||
Open-function audit: 24 functions; minimum 3 source attempts each.
|
||||
No shared keyboard headers were edited. No configuration or target symbol sizes were edited.
|
||||
The 83/86 CellPhone instruction-exact count did not improve. Its create fuzzy score improved from 99.81982% to 99.8949%.
|
||||
CandidateBox has two objdiff-100 functions excluded by the raw instruction gate: GetNextPageIdx and onGUIEvent. Raw relocation fields and CR1 branch normalization account for that discrepancy; no gate tools were changed.
|
||||
String pools remain identical. Object data percentages are partial in SDChannelSelect and CandidateBox; this run does not claim unit completion.
|
||||
Writing skill applied: unslop.
|
||||
|
||||
Final full gate: GATE PASS
|
||||
Regressions vs baseline: 0
|
||||
Forbidden patterns: 0
|
||||
Readability warnings: 0
|
||||
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d
|
||||
@@ -20,14 +20,14 @@ void VoiceCallback(void* _voice) {
|
||||
}
|
||||
|
||||
inline u8* getCurrAddr(VoiceInfo* voice) {
|
||||
AXPB* iVar4 = &voice->getAXVPB()->pb;
|
||||
AXPB* pb = &voice->getAXVPB()->pb;
|
||||
nw4r::ut::AutoInterruptLock lock;
|
||||
if (iVar4 == NULL) {
|
||||
if (pb == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
u16 addrHi = iVar4->addr.currentAddressHi;
|
||||
u16 addrLo = iVar4->addr.currentAddressLo;
|
||||
u16 addrHi = pb->addr.currentAddressHi;
|
||||
u16 addrLo = pb->addr.currentAddressLo;
|
||||
return (u8*)((addrHi << 16) + addrLo);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,19 @@
|
||||
#include <revolution/gx/GXStruct.h>
|
||||
#include <revolution/os/OSError.h>
|
||||
|
||||
extern "C" const char lbl_8166A6E3[];
|
||||
extern "C" const u8 lbl_81697844;
|
||||
extern "C" const u8 lbl_81697845;
|
||||
extern "C" const u8 lbl_81697846;
|
||||
extern "C" const u8 lbl_81697847;
|
||||
extern "C" const char scCsFatalMsg[];
|
||||
extern "C" const u8 scCsFatalColorR;
|
||||
extern "C" const u8 scCsFatalColorG;
|
||||
extern "C" const u8 scCsFatalColorB;
|
||||
extern "C" const u8 scCsFatalColorA;
|
||||
|
||||
#define NW4R_DB_ASSERT_H
|
||||
#define NW4R_ASSERT(x) \
|
||||
{ \
|
||||
if (!(x)) { \
|
||||
GXColor front = {lbl_81697844, lbl_81697845, lbl_81697846, lbl_81697847}; \
|
||||
GXColor front = {scCsFatalColorR, scCsFatalColorG, scCsFatalColorB, scCsFatalColorA}; \
|
||||
GXColor back = {0, 0, 0, 0}; \
|
||||
OSFatal((GXColor)front, (GXColor)back, lbl_8166A6E3); \
|
||||
OSFatal((GXColor)front, (GXColor)back, scCsFatalMsg); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ extern "C" const u8 lbl_81697847;
|
||||
|
||||
#include "math/iplMathTypes.h"
|
||||
|
||||
extern "C" const f32 lbl_81694FC0 = 0.0f;
|
||||
extern "C" const f32 scCsZeroF = 0.0f;
|
||||
|
||||
extern "C" nw4r::ut::Color GetTextColor__Q34nw4r3lyt7TextBoxCFUl(const nw4r::lyt::TextBox*, u32);
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace ipl {
|
||||
nw4r::math::VEC2 scale;
|
||||
scale.x = pane->GetScale().x;
|
||||
scale.y = pane->GetScale().y;
|
||||
result = vec3::_ctor(VmInst, VmReturnObj, scale.x, scale.y, lbl_81694FC0) == TRUE;
|
||||
result = vec3::_ctor(VmInst, VmReturnObj, scale.x, scale.y, scCsZeroF) == TRUE;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -514,7 +514,7 @@ namespace ipl {
|
||||
nw4r::math::VEC3 get_vec_(CHANSVm* vm) {
|
||||
u32 argc = CHANSVmGetArgc(vm);
|
||||
CHANSVmObjHdr* arg = CHANSVmGetArg(vm, 0);
|
||||
nw4r::math::VEC3 out(lbl_81694FC0, lbl_81694FC0, lbl_81694FC0);
|
||||
nw4r::math::VEC3 out(scCsZeroF, scCsZeroF, scCsZeroF);
|
||||
if (argc == 1 && util::is_valid_class(arg, "VEC3")) {
|
||||
f32* src = static_cast<f32*>(*arg->value.ptr_v);
|
||||
out.x = src[0];
|
||||
@@ -540,7 +540,7 @@ namespace ipl {
|
||||
nw4r::lyt::Size get_size_(CHANSVm* vm) {
|
||||
u32 argc = CHANSVmGetArgc(vm);
|
||||
CHANSVmObjHdr* arg = CHANSVmGetArg(vm, 0);
|
||||
nw4r::lyt::Size out(lbl_81694FC0, lbl_81694FC0);
|
||||
nw4r::lyt::Size out(scCsZeroF, scCsZeroF);
|
||||
if (argc == 1 && util::is_valid_class(arg, "Size")) {
|
||||
f32* src = static_cast<f32*>(*arg->value.ptr_v);
|
||||
out.width = src[0];
|
||||
@@ -622,15 +622,15 @@ namespace ipl {
|
||||
namespace pane {
|
||||
#pragma push
|
||||
#pragma section const_type ".data"
|
||||
extern "C" const char lbl_8166A6E3[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
|
||||
extern "C" const char scCsFatalMsg[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
|
||||
#pragma pop
|
||||
|
||||
#pragma push
|
||||
#pragma section data_type ".sdata"
|
||||
extern "C" __declspec(section ".sdata") const u8 lbl_81697844 = 0xff;
|
||||
extern "C" __declspec(section ".sdata") const u8 lbl_81697845 = 0xff;
|
||||
extern "C" __declspec(section ".sdata") const u8 lbl_81697846 = 0xff;
|
||||
extern "C" __declspec(section ".sdata") const u8 lbl_81697847 = 0;
|
||||
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorR = 0xff;
|
||||
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorG = 0xff;
|
||||
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorB = 0xff;
|
||||
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorA = 0;
|
||||
#pragma pop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ extern "C" void __dt__Q34nw4r3snd11SoundHandleFv(nw4r::snd::SoundHandle*, int);
|
||||
|
||||
namespace homebutton {
|
||||
bool Controller::sBatteryFlag[WPAD_MAX_CONTROLLERS];
|
||||
bool Controller::lbl_816989BC[WPAD_MAX_CONTROLLERS];
|
||||
bool Controller::sAlarmCreated[WPAD_MAX_CONTROLLERS];
|
||||
|
||||
OSAlarm Controller::sAlarm[WPAD_MAX_CONTROLLERS];
|
||||
OSAlarm Controller::sAlarmSoundOff[WPAD_MAX_CONTROLLERS];
|
||||
@@ -83,10 +83,10 @@ namespace homebutton {
|
||||
if (chan < WPAD_MAX_CONTROLLERS) {
|
||||
sBatteryFlag[chan] = false;
|
||||
OSReport("Create %d\n", chan);
|
||||
if (!lbl_816989BC[chan]) {
|
||||
if (!sAlarmCreated[chan]) {
|
||||
OSCreateAlarm(&sAlarm[chan]);
|
||||
OSCreateAlarm(&sAlarmSoundOff[chan]);
|
||||
lbl_816989BC[chan] = true;
|
||||
sAlarmCreated[chan] = true;
|
||||
}
|
||||
sThis[chan] = this;
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace ext_ead {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" char lbl_816962F8[] = "ERROR?\n";
|
||||
extern "C" char lbl_81643B40[] = " TextureBuffer_ %d:%d ptr:%p\n";
|
||||
extern "C" char lbl_81643B5E[] = "INFO: cannot create browser window\n";
|
||||
extern "C" char scWwwErrorQ[] = "ERROR?\n";
|
||||
extern "C" char scWwwTexBufFmt[] = " TextureBuffer_ %d:%d ptr:%p\n";
|
||||
extern "C" char scWwwNoBrowserWin[] = "INFO: cannot create browser window\n";
|
||||
|
||||
#define OSReport(...) OSReport(lbl_816962F8)
|
||||
#define OSReport(...) OSReport(scWwwErrorQ)
|
||||
#include "iplwww/www_window.h"
|
||||
#undef OSReport
|
||||
|
||||
@@ -76,12 +76,12 @@ namespace ext_ead {
|
||||
memset(mTexBufArr[i][j], 0, texBufSize);
|
||||
DCStoreRange(mTexBufArr[i][j], texBufSize);
|
||||
|
||||
print::IPLWWWReport(print::WWW_DEBUG, lbl_81643B40, j, i, mTexBufArr[i][j]);
|
||||
print::IPLWWWReport(print::WWW_DEBUG, scWwwTexBufFmt, j, i, mTexBufArr[i][j]);
|
||||
}
|
||||
}
|
||||
|
||||
if (WWWCreateBrowserWindow(mpBrowserThread->GetHandle(), &mpWwwWindow, 0)) {
|
||||
print::IPLWWWReport(print::WWW_WARNING, lbl_81643B5E);
|
||||
print::IPLWWWReport(print::WWW_WARNING, scWwwNoBrowserWin);
|
||||
return NULL;
|
||||
} else {
|
||||
WWWRect rect = {0, 0, 0, 0};
|
||||
|
||||
@@ -20,6 +20,16 @@ protected:
|
||||
namespace extend {
|
||||
namespace memo {
|
||||
|
||||
class EventHandler : public inputform::EventHandler {
|
||||
public:
|
||||
EventHandler(InputForm* form) : inputform::EventHandler(form), mpMemoForm(form) {}
|
||||
virtual ~EventHandler() {}
|
||||
virtual void onTiEvent(gui::PaneComponent*, u32, Input*);
|
||||
private:
|
||||
InputForm* mpMemoForm;
|
||||
};
|
||||
|
||||
|
||||
class AnmPane : public nw4rmanager::AnmPane {
|
||||
protected:
|
||||
AnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
@@ -28,8 +38,8 @@ public:
|
||||
virtual ~AnmPane();
|
||||
virtual void init();
|
||||
virtual void changeAnimation(u32 id);
|
||||
virtual u32 getState();
|
||||
virtual u32 getKeyType() const;
|
||||
virtual u32 getState();
|
||||
protected:
|
||||
u32 meState;
|
||||
u32 meKeyType;
|
||||
@@ -49,13 +59,6 @@ public:
|
||||
virtual void onAnmEvent(AnmPaneEvent event);
|
||||
};
|
||||
|
||||
class SimpleAnmPane : public nw4rmanager::AnmPane {
|
||||
public:
|
||||
SimpleAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : nw4rmanager::AnmPane(pane, observer) {}
|
||||
virtual ~SimpleAnmPane() {}
|
||||
virtual void init();
|
||||
virtual void changeAnimation(u32 id);
|
||||
};
|
||||
|
||||
class ScrollButton {
|
||||
public:
|
||||
@@ -74,15 +77,16 @@ private:
|
||||
bool mbRightPressed;
|
||||
};
|
||||
|
||||
class EventHandler : public inputform::EventHandler {
|
||||
|
||||
class SimpleAnmPane : public nw4rmanager::AnmPane {
|
||||
public:
|
||||
EventHandler(InputForm* form) : inputform::EventHandler(form), mpMemoForm(form) {}
|
||||
virtual ~EventHandler() {}
|
||||
virtual void onTiEvent(gui::PaneComponent*, u32, Input*);
|
||||
private:
|
||||
InputForm* mpMemoForm;
|
||||
SimpleAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : nw4rmanager::AnmPane(pane, observer) {}
|
||||
virtual ~SimpleAnmPane() {}
|
||||
virtual void init();
|
||||
virtual void changeAnimation(u32 id);
|
||||
};
|
||||
|
||||
|
||||
static const char* scPaneName[] = {
|
||||
"N_Header", "N_Body", "B_Body", "N_Footer", "Nigaoe",
|
||||
"T_Nigaoe", "B_Nigaoe", "T_Letter", "T_TouchLetter"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define TI_CANDIDATEBOX_IMPLEMENTATION
|
||||
#include "keyboard/tiCandidateBox.h"
|
||||
|
||||
#include "keyboard/tiManager.h"
|
||||
@@ -20,22 +21,22 @@ namespace textinput {
|
||||
|
||||
#pragma push
|
||||
#pragma section const_type ".data"
|
||||
extern "C" const char lbl_8165D2D0[15] = "T_prdc_Text_00";
|
||||
extern "C" const char lbl_8165D2E0[17] = "P_prdc_scrl_Left";
|
||||
extern "C" const char scT_prdc_Text_00[15] = "T_prdc_Text_00";
|
||||
extern "C" const char scP_prdc_scrl_Left[17] = "P_prdc_scrl_Left";
|
||||
#pragma pop
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
extern "C" const char* lbl_816973C0 = lbl_8165D2D0;
|
||||
extern "C" const char* lbl_816973C4 = lbl_8165D2E0;
|
||||
extern "C" const wchar_t lbl_816973C8[4] = {0, 0, 0, 1};
|
||||
extern "C" const char lbl_816973D0[8] = "P_OnBtn";
|
||||
extern "C" const char lbl_816973D8[8] = "B_OnBtn";
|
||||
extern "C" const char* scCommonTextAnimName = scT_prdc_Text_00;
|
||||
extern "C" const char* scCommonScrollAnimName = scP_prdc_scrl_Left;
|
||||
extern "C" const wchar_t scEmptyWChars[4] = {0, 0, 0, 1};
|
||||
extern "C" const char scP_OnBtn[8] = "P_OnBtn";
|
||||
extern "C" const char scB_OnBtn[8] = "B_OnBtn";
|
||||
#pragma pop
|
||||
|
||||
|
||||
#define COMMON_TEXT_ANIM lbl_816973C0
|
||||
#define COMMON_SCROLL_ANIM lbl_816973C4
|
||||
#define COMMON_TEXT_ANIM scCommonTextAnimName
|
||||
#define COMMON_SCROLL_ANIM scCommonScrollAnimName
|
||||
|
||||
// name made up, no dwarf (?)
|
||||
struct AnimationFile {
|
||||
@@ -76,7 +77,7 @@ namespace textinput {
|
||||
char tail[12];
|
||||
};
|
||||
|
||||
extern "C" const CandidatePaneData lbl_8165D2F8 __attribute__((aligned(8))) = {{
|
||||
extern "C" const CandidatePaneData scCandidatePaneData __attribute__((aligned(8))) = {{
|
||||
{KT_CandidateText, "N_predictInput", 1, NULL, {&csAninationFile[0]}},
|
||||
{KT_ScrollButton,
|
||||
"P_prdc_scrl_Left",
|
||||
@@ -211,7 +212,7 @@ namespace textinput {
|
||||
|
||||
#pragma push
|
||||
#pragma section const_type ".data"
|
||||
extern "C" const char lbl_8165D984[132] =
|
||||
extern "C" const char scPaneNameTable[132] =
|
||||
"B_OffBtn\0\0\0"
|
||||
"P_JPOffBtn\0"
|
||||
"P_CNOffBtn\0"
|
||||
@@ -221,10 +222,10 @@ namespace textinput {
|
||||
"B_prdc_scrl_Rght\0\0\0"
|
||||
"P_prdc_scrl_Rght\0\0\0"
|
||||
"\0\0\0";
|
||||
extern "C" char lbl_8165DA08[16] = "W_predictWindow";
|
||||
extern "C" const char lbl_8165DA18[15] = "N_predictInput";
|
||||
extern "C" const char lbl_8165DA28[13] = "W_OnOff_Area";
|
||||
extern "C" const char lbl_8165DA38[13] = "N_prdc_Texts";
|
||||
extern "C" char scW_predictWindow[16] = "W_predictWindow";
|
||||
extern "C" const char scN_predictInput[15] = "N_predictInput";
|
||||
extern "C" const char scW_OnOff_Area[13] = "W_OnOff_Area";
|
||||
extern "C" const char scN_prdc_Texts[13] = "N_prdc_Texts";
|
||||
#pragma pop
|
||||
|
||||
void CandidateBoxCaller::Candidates::addCandidate(const wchar_t* wcString) {
|
||||
@@ -397,19 +398,20 @@ namespace textinput {
|
||||
mTextArea.Init();
|
||||
mOnOffButton.Create(this);
|
||||
mOnOffButton.Init();
|
||||
const char* paneNames = lbl_8165D984;
|
||||
const char* paneNames = scPaneNameTable;
|
||||
mLeftScroll.Create(this, paneNames + 68, paneNames + 48);
|
||||
mRightScroll.Create(this, paneNames + 108, paneNames + 88);
|
||||
mLeftScroll.Init();
|
||||
mRightScroll.Init();
|
||||
mTextWindow.Create(this, lbl_8165DA08);
|
||||
mTextWindow.Create(this, scW_predictWindow);
|
||||
init();
|
||||
}
|
||||
|
||||
void LayoutByNW4R::createAnmPane_(MEMAllocator* allocator) {
|
||||
for (u16 i = 0; i < ARRAY_LENGTH(lbl_8165D2F8.panes); i++) {
|
||||
CandidateTextAnmPane* pane = NULL;
|
||||
const PaneToAnimation& p = lbl_8165D2F8.panes[i];
|
||||
CandidateTextAnmPane* pane;
|
||||
for (u16 i = 0; i < ARRAY_LENGTH(scCandidatePaneData.panes); i++) {
|
||||
pane = NULL;
|
||||
const PaneToAnimation& p = scCandidatePaneData.panes[i];
|
||||
switch (p.type) {
|
||||
case KT_ScrollButton: {
|
||||
void* pBtnBuf = MEMAllocFromAllocator(allocator, sizeof(CandidateScrollAnmPane));
|
||||
@@ -452,7 +454,7 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void LayoutByNW4R::init() {
|
||||
searchAnmPane(lbl_8165DA18)->changeAnimation(ANM_Normal);
|
||||
searchAnmPane(scN_predictInput)->changeAnimation(ANM_Normal);
|
||||
Base::setInvalid(false);
|
||||
setActive(true);
|
||||
setOnOff(false);
|
||||
@@ -465,7 +467,7 @@ namespace textinput {
|
||||
mpLayout->CalculateMtx(mDrawInfo);
|
||||
if (meLanguage == KR) {
|
||||
mTextWindow.SetVisible(false);
|
||||
getPane(lbl_8165DA28)->SetVisible(false);
|
||||
getPane(scW_OnOff_Area)->SetVisible(false);
|
||||
} else if (meLanguage == CN) {
|
||||
setOnOff(true);
|
||||
mTextWindow.SetVisible(true);
|
||||
@@ -475,16 +477,16 @@ namespace textinput {
|
||||
} else {
|
||||
mTextWindow.ChangeAnimation(ANM_Normal);
|
||||
}
|
||||
getPane(lbl_8165DA28)->SetVisible(false);
|
||||
getPane(scW_OnOff_Area)->SetVisible(false);
|
||||
} else {
|
||||
getPane(lbl_8165DA28)->SetVisible(true);
|
||||
getPane(scW_OnOff_Area)->SetVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
void LayoutByNW4R::draw() {
|
||||
getPane(lbl_8165DA38)->SetVisible(false);
|
||||
getPane(scN_prdc_Texts)->SetVisible(false);
|
||||
nw4rmanager::Layout::draw();
|
||||
getPane(lbl_8165DA38)->SetVisible(true);
|
||||
getPane(scN_prdc_Texts)->SetVisible(true);
|
||||
if (!isInvalid()) {
|
||||
mTextArea.Draw(mDrawInfo);
|
||||
}
|
||||
@@ -494,8 +496,8 @@ namespace textinput {
|
||||
nw4rmanager::Layout::calc();
|
||||
mTextArea.Calc();
|
||||
if (mbAnimOn) {
|
||||
getPane(lbl_8165DA38)->Animate(0);
|
||||
getPane(lbl_8165DA38)->CalculateMtx(mDrawInfo);
|
||||
getPane(scN_prdc_Texts)->Animate(0);
|
||||
getPane(scN_prdc_Texts)->CalculateMtx(mDrawInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -503,7 +505,7 @@ namespace textinput {
|
||||
Base::setLanguage(language);
|
||||
init();
|
||||
// Maybe inlines, maybe not
|
||||
nw4r::math::VEC3 pos = searchAnmPane(lbl_8165DA08)->getPane()->GetTranslate();
|
||||
nw4r::math::VEC3 pos = searchAnmPane(scW_predictWindow)->getPane()->GetTranslate();
|
||||
if (meLanguage == CN || meLanguage == KR) {
|
||||
Base::checkValidation();
|
||||
// Potentially an inline
|
||||
@@ -518,7 +520,7 @@ namespace textinput {
|
||||
pos.x = 202.0f;
|
||||
}
|
||||
|
||||
searchAnmPane(lbl_8165DA08)->getPane()->SetTranslate(pos);
|
||||
searchAnmPane(scW_predictWindow)->getPane()->SetTranslate(pos);
|
||||
if (meLanguage == CN) {
|
||||
mTextArea.ApplyFontScale(1.2f);
|
||||
} else if (meLanguage == KR) {
|
||||
@@ -529,10 +531,10 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void LayoutByNW4R::onOnOffButton(bool arg) {
|
||||
const char* base = lbl_8165D2D0;
|
||||
const char* base = scT_prdc_Text_00;
|
||||
mTextWindow.TurnOnOff(!isOn());
|
||||
if (isOn()) {
|
||||
searchAnmPane(lbl_816973D0)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
searchAnmPane(scP_OnBtn)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
if (arg) {
|
||||
mpEventObserver->onSE(sound::SE_PREDICT_OFF);
|
||||
}
|
||||
@@ -586,7 +588,7 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void LayoutByNW4R::startTurnOn(bool on) {
|
||||
const char* base = lbl_8165D2D0;
|
||||
const char* base = scT_prdc_Text_00;
|
||||
if (isInScroll()) {
|
||||
return;
|
||||
}
|
||||
@@ -594,7 +596,7 @@ namespace textinput {
|
||||
mTextWindow.TurnOnOff(on);
|
||||
|
||||
if (!on) {
|
||||
searchAnmPane(lbl_816973D0)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
searchAnmPane(scP_OnBtn)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
mpEventObserver->onSE(sound::SE_PREDICT_OFF);
|
||||
} else {
|
||||
searchAnmPane(base + 0x6a8)->onAnmEvent(nw4rmanager::AnmPane::PE_0);
|
||||
@@ -635,7 +637,7 @@ namespace textinput {
|
||||
current = reinterpret_cast<CandidateBoxCaller::Candidates*>(reinterpret_cast<u8*>(current) + sizeof(current->szwcPredicted[0]));
|
||||
}
|
||||
}
|
||||
gui::PaneComponent* p = mpPaneManager->searchPaneComponent(isOn() ? lbl_816973D8 : lbl_8165D984);
|
||||
gui::PaneComponent* p = mpPaneManager->searchPaneComponent(isOn() ? scB_OnBtn : scPaneNameTable);
|
||||
if (p != NULL) {
|
||||
p->lockInitialize(true);
|
||||
}
|
||||
@@ -704,8 +706,8 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void LayoutByNW4R::cancelStateFocusIn() {
|
||||
const PaneToAnimation* pane = lbl_8165D2F8.panes;
|
||||
for (int i = 0; i < ARRAY_LENGTH(lbl_8165D2F8.panes); i++) {
|
||||
const PaneToAnimation* pane = scCandidatePaneData.panes;
|
||||
for (int i = 0; i < ARRAY_LENGTH(scCandidatePaneData.panes); i++) {
|
||||
CandidateTextAnmPane* p = static_cast<CandidateTextAnmPane*>(searchAnmPane(pane->paneName));
|
||||
if (p != NULL) {
|
||||
switch (p->getKeyType()) {
|
||||
@@ -763,7 +765,7 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void LayoutByNW4R::onEvent(UIObj* obj, u32 id, void* data) {
|
||||
const char* base = lbl_8165D2D0;
|
||||
const char* base = scT_prdc_Text_00;
|
||||
int tmp;
|
||||
|
||||
switch (id) {
|
||||
@@ -994,7 +996,7 @@ namespace textinput {
|
||||
void UITextArea::Create(nw4rmanager::Layout* layout) {
|
||||
// These could have been static...
|
||||
const char* textPanes[NUM_PANES] = {
|
||||
lbl_8165D2D0, "T_prdc_Text_01", "T_prdc_Text_02", "T_prdc_Text_03", "T_prdc_Text_04", "T_prdc_Text_05", "T_prdc_Text_06",
|
||||
scT_prdc_Text_00, "T_prdc_Text_01", "T_prdc_Text_02", "T_prdc_Text_03", "T_prdc_Text_04", "T_prdc_Text_05", "T_prdc_Text_06",
|
||||
"T_prdc_Text_07", "T_prdc_Text_08", "T_prdc_Text_09", "T_prdc_Text_10", "T_prdc_Text_11", "T_prdc_Text_12", "T_prdc_Text_13",
|
||||
"T_prdc_Text_14", "T_prdc_Text_15", "T_prdc_Text_16", "T_prdc_Text_17", "T_prdc_Text_18", "T_prdc_Text_19",
|
||||
};
|
||||
@@ -1013,7 +1015,7 @@ namespace textinput {
|
||||
mpBoundingPane[i]->setListener(this);
|
||||
}
|
||||
mpTextAreaPane = mgr->searchPaneComponent("N_prdcTextArea");
|
||||
mpTextsPane = mgr->searchPaneComponent(lbl_8165DA38);
|
||||
mpTextsPane = mgr->searchPaneComponent(scN_prdc_Texts);
|
||||
mSize = mpTextBoxPane[0]->getTextPane()->GetFontSize();
|
||||
mpTextAreaPane->setListener(this);
|
||||
}
|
||||
@@ -1021,7 +1023,7 @@ namespace textinput {
|
||||
|
||||
void UITextArea::Init() {
|
||||
for (u32 i = 0; i < NUM_PANES; i++) {
|
||||
mpTextBoxPane[i]->getTextPane()->SetString(const_cast<const wchar_t*>(lbl_816973C8), 0);
|
||||
mpTextBoxPane[i]->getTextPane()->SetString(const_cast<const wchar_t*>(scEmptyWChars), 0);
|
||||
mpBoundingPane[i]->setTriggerTarget(true);
|
||||
}
|
||||
mfTextWidth = 0.0f;
|
||||
@@ -1052,9 +1054,11 @@ namespace textinput {
|
||||
f32 fontSizeWidth = pTextBox->GetFontSize().width;
|
||||
f32 charSpace = pTextBox->GetCharSpace();
|
||||
f32 acc = 0.0f;
|
||||
for (int i = 0; text[i] != L'\0'; i++) {
|
||||
const wchar_t* character = text;
|
||||
while (*character != L'\0') {
|
||||
acc += charSpace;
|
||||
acc += f->GetCharWidth(text[i]);
|
||||
acc += f->GetCharWidth(*character);
|
||||
++character;
|
||||
}
|
||||
return acc * (fontSizeWidth / f->GetWidth()) + 0.01f;
|
||||
}
|
||||
@@ -1206,7 +1210,7 @@ namespace textinput {
|
||||
|
||||
void UITextArea::Clear() {
|
||||
for (u32 i = 0; i < NUM_PANES; i++) {
|
||||
mpTextBoxPane[i]->getTextPane()->SetString(const_cast<const wchar_t*>(lbl_816973C8), 0);
|
||||
mpTextBoxPane[i]->getTextPane()->SetString(const_cast<const wchar_t*>(scEmptyWChars), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1237,7 +1241,7 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void UITextArea::Draw(const nw4r::lyt::DrawInfo& drawInfo) {
|
||||
// NONMATCHING
|
||||
textdrawer::Base::ViewPort viewport;
|
||||
s32 selected = GetSelectedPaneIdx();
|
||||
if (!IsScrolling()) {
|
||||
for (u32 i = 0; i < NUM_PANES; i++) {
|
||||
@@ -1247,31 +1251,26 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
|
||||
struct {
|
||||
f32 left;
|
||||
f32 width;
|
||||
} scissor;
|
||||
nw4r::ut::Rect r = mpTextAreaPane->getPane()->GetPaneRect(drawInfo);
|
||||
// TODO - These vectors are zero-initialized using GPRs first...
|
||||
Vec v1 = {0, 0, 0};
|
||||
Vec v2 = {0, 0, 0};
|
||||
v1.x = r.left;
|
||||
v1.y = r.top;
|
||||
Vec v2 = {0, 0, 0};
|
||||
v2.x = r.right;
|
||||
v2.y = r.bottom;
|
||||
MTXMultVec(mpTextAreaPane->getTextPane()->GetGlobalMtx(), &v1, &v1);
|
||||
MTXMultVec(mpTextAreaPane->getTextPane()->GetGlobalMtx(), &v2, &v2);
|
||||
u32 left, top, wd, ht;
|
||||
GXGetScissor(&left, &top, &wd, &ht);
|
||||
// TODO - These floats need to be stored to the stack
|
||||
f32 scale = 640.0f / mfScreenWidth;
|
||||
scissor.left = v1.x + mfScreenWidth / 2.0f;
|
||||
scissor.left += scissor.left * (scale - 1.0f);
|
||||
scissor.width = scale * (v2.x - v1.x);
|
||||
GXSetScissor(scissor.left, top, scissor.width, ht);
|
||||
viewport.xOrig = v1.x + mfScreenWidth / 2.0f;
|
||||
viewport.xOrig += viewport.xOrig * (scale - 1.0f);
|
||||
viewport.wd = scale * (v2.x - v1.x);
|
||||
GXSetScissor(viewport.xOrig, top, viewport.wd, ht);
|
||||
mpTextsPane->getPane()->Draw(drawInfo);
|
||||
if (!IsScrolling()) {
|
||||
GXSetScissor(left, top, (scissor.width + scissor.left) - left, ht);
|
||||
GXSetScissor(left, top, (viewport.wd + viewport.xOrig) - left, ht);
|
||||
for (u32 i = 0; i < NUM_PANES; i++) {
|
||||
if (i == selected || mpTextAnmPane[i]->getState() == ANM_FocusOut) {
|
||||
mpTextBoxPane[i]->getPane()->SetVisible(true);
|
||||
@@ -1282,153 +1281,28 @@ namespace textinput {
|
||||
GXSetScissor(left, top, wd, ht);
|
||||
}
|
||||
|
||||
extern "C" asm void GetNextPageIdx___Q39textinput12candidatebox10UITextAreaCFl() {
|
||||
nofralloc
|
||||
stwu r1, -0xc0(r1)
|
||||
mflr r0
|
||||
stw r0, 0xc4(r1)
|
||||
stfd f31, 0xb0(r1)
|
||||
psq_st f31, 0xb8(r1), 0, 0
|
||||
stfd f30, 0xa0(r1)
|
||||
psq_st f30, 0xa8(r1), 0, 0
|
||||
stfd f29, 0x90(r1)
|
||||
psq_st f29, 0x98(r1), 0, 0
|
||||
stfd f28, 0x80(r1)
|
||||
psq_st f28, 0x88(r1), 0, 0
|
||||
stfd f27, 0x70(r1)
|
||||
psq_st f27, 0x78(r1), 0, 0
|
||||
stfd f26, 0x60(r1)
|
||||
psq_st f26, 0x68(r1), 0, 0
|
||||
stfd f25, 0x50(r1)
|
||||
psq_st f25, 0x58(r1), 0, 0
|
||||
stfd f24, 0x40(r1)
|
||||
psq_st f24, 0x48(r1), 0, 0
|
||||
stfd f23, 0x30(r1)
|
||||
psq_st f23, 0x38(r1), 0, 0
|
||||
addi r11, r1, 0x30
|
||||
bl _savegpr_24
|
||||
lfs f0, lbl_81694DA8(r2)
|
||||
mr r24, r3
|
||||
lfs f1, 0x1fc(r3)
|
||||
mr r25, r4
|
||||
lwz r5, 0xd8(r3)
|
||||
fdivs f25, f0, f1
|
||||
lfs f0, lbl_81694DB4(r2)
|
||||
lwz r5, 0x9c(r5)
|
||||
lwz r3, 0x38(r3)
|
||||
lfs f31, 0x4c(r5)
|
||||
lwz r27, 0x9c(r3)
|
||||
fcmpo cr0, f1, f0
|
||||
ble GetNextPageIdx_L1
|
||||
lfs f28, lbl_81694DAC(r2)
|
||||
b GetNextPageIdx_L2
|
||||
GetNextPageIdx_L1:
|
||||
lfs f28, lbl_81694DB0(r2)
|
||||
GetNextPageIdx_L2:
|
||||
fneg f23, f28
|
||||
lfd f29, lbl_81694DC8(r2)
|
||||
lfs f30, lbl_81694DBC(r2)
|
||||
mr r26, r25
|
||||
slwi r28, r4, 7
|
||||
lis r31, 0x4330
|
||||
b GetNextPageIdx_L3
|
||||
GetNextPageIdx_L4:
|
||||
lwz r0, 0x1e8(r24)
|
||||
cmpw r26, r0
|
||||
bne GetNextPageIdx_L5
|
||||
li r3, -1
|
||||
b GetNextPageIdx_L6
|
||||
GetNextPageIdx_L5:
|
||||
lwz r0, 0x204(r24)
|
||||
add r0, r0, r28
|
||||
addic. r30, r0, 4
|
||||
bne GetNextPageIdx_L7
|
||||
lfs f0, lbl_81694D90(r2)
|
||||
b GetNextPageIdx_L8
|
||||
GetNextPageIdx_L7:
|
||||
mr r3, r27
|
||||
bl GetFont__Q34nw4r3lyt8TextBoxCFv
|
||||
lfs f26, 0xe4(r27)
|
||||
mr r29, r3
|
||||
lfs f24, 0xf0(r27)
|
||||
lfs f27, lbl_81694D90(r2)
|
||||
b GetNextPageIdx_L9
|
||||
GetNextPageIdx_L10:
|
||||
lwz r12, 0(r29)
|
||||
fadds f27, f27, f24
|
||||
mr r3, r29
|
||||
lwz r12, 0x48(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
xoris r0, r3, 0x8000
|
||||
stw r31, 8(r1)
|
||||
addi r30, r30, 2
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f0, f0, f29
|
||||
fadds f27, f27, f0
|
||||
GetNextPageIdx_L9:
|
||||
lhz r4, 0(r30)
|
||||
cmpwi r4, 0
|
||||
bne GetNextPageIdx_L10
|
||||
lwz r12, 0(r29)
|
||||
mr r3, r29
|
||||
lwz r12, 0xc(r12)
|
||||
mtctr r12
|
||||
bctrl
|
||||
xoris r0, r3, 0x8000
|
||||
stw r31, 8(r1)
|
||||
stw r0, 0xc(r1)
|
||||
lfd f0, 8(r1)
|
||||
fsubs f0, f0, f29
|
||||
fdivs f0, f26, f0
|
||||
fmuls f0, f27, f0
|
||||
fadds f0, f30, f0
|
||||
GetNextPageIdx_L8:
|
||||
fmuls f0, f0, f25
|
||||
addi r28, r28, 0x80
|
||||
addi r26, r26, 1
|
||||
fadds f0, f28, f0
|
||||
fadds f23, f23, f0
|
||||
GetNextPageIdx_L3:
|
||||
fcmpo cr0, f23, f31
|
||||
cror 2, 0, 2
|
||||
beq GetNextPageIdx_L4
|
||||
addi r0, r26, -1
|
||||
cmpw r0, r25
|
||||
bne GetNextPageIdx_L11
|
||||
addi r26, r26, 1
|
||||
GetNextPageIdx_L11:
|
||||
addi r3, r26, -1
|
||||
GetNextPageIdx_L6:
|
||||
psq_l f31, 0xb8(r1), 0, 0
|
||||
lfd f31, 0xb0(r1)
|
||||
psq_l f30, 0xa8(r1), 0, 0
|
||||
lfd f30, 0xa0(r1)
|
||||
psq_l f29, 0x98(r1), 0, 0
|
||||
lfd f29, 0x90(r1)
|
||||
psq_l f28, 0x88(r1), 0, 0
|
||||
lfd f28, 0x80(r1)
|
||||
psq_l f27, 0x78(r1), 0, 0
|
||||
lfd f27, 0x70(r1)
|
||||
psq_l f26, 0x68(r1), 0, 0
|
||||
lfd f26, 0x60(r1)
|
||||
psq_l f25, 0x58(r1), 0, 0
|
||||
lfd f25, 0x50(r1)
|
||||
psq_l f24, 0x48(r1), 0, 0
|
||||
lfd f24, 0x40(r1)
|
||||
psq_l f23, 0x38(r1), 0, 0
|
||||
addi r11, r1, 0x30
|
||||
lfd f23, 0x30(r1)
|
||||
bl _restgpr_24
|
||||
lwz r0, 0xc4(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0xc0
|
||||
blr
|
||||
s32 UITextArea::GetNextPageIdx_(s32 idx) const {
|
||||
f32 areaPaneWidth = mpTextAreaPane->getPane()->GetSize().width;
|
||||
nw4r::lyt::TextBox* textBox = mpTextBoxPane[0]->getTextPane();
|
||||
f32 widthScale = GetWidthScale_();
|
||||
f32 margin = GetMargin_();
|
||||
f32 xOffset = -margin;
|
||||
s32 candidateIndex = idx;
|
||||
while (xOffset <= areaPaneWidth) {
|
||||
if (candidateIndex == mnCandidateNum) {
|
||||
return -1;
|
||||
}
|
||||
f32 textWidth = calcStringWidth(mpCandidates->szwcPredicted[candidateIndex], textBox);
|
||||
xOffset += margin + textWidth * widthScale;
|
||||
++candidateIndex;
|
||||
}
|
||||
if (candidateIndex - 1 == idx) {
|
||||
++candidateIndex;
|
||||
}
|
||||
return candidateIndex - 1;
|
||||
}
|
||||
|
||||
s32 UITextArea::GetPrevPageIdx_(s32 idx) const {
|
||||
// NONMATCHING - only regswaps, hopefully
|
||||
f32 areaPaneWidth = mpTextAreaPane->getPane()->GetSize().width;
|
||||
|
||||
nw4r::lyt::TextBox* textBox = mpTextBoxPane[0]->getTextPane();
|
||||
@@ -1452,7 +1326,6 @@ namespace textinput {
|
||||
}
|
||||
|
||||
void UITextArea::StartScroll(s32 steps) {
|
||||
// NONMATCHING - only regswaps, hopefully
|
||||
f32 acc = 0.0f;
|
||||
f32 widthScale = GetWidthScale_();
|
||||
f32 margin = GetMargin_();
|
||||
@@ -1470,7 +1343,7 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
|
||||
mScrollAnimation.startAnm(this, 0.0f, -acc, 15.0f, this);
|
||||
mScrollAnimation.startAnm(this, 0.0f, -acc, 15.0f, reinterpret_cast<void*>(steps));
|
||||
}
|
||||
|
||||
void UITextArea::StartScrollToIdx(s32 idx) {
|
||||
@@ -1620,7 +1493,7 @@ namespace textinput {
|
||||
if (mgr()->isInScroll() && event != 1 && event != 0) {
|
||||
return;
|
||||
}
|
||||
if (!mgr()->searchAnmPane(lbl_8165DA08)->isInAnimation() || event == 1) {
|
||||
if (!mgr()->searchAnmPane(scW_predictWindow)->isInAnimation() || event == 1) {
|
||||
if (!mgr()->isInvalid()) {
|
||||
switch (event) {
|
||||
case 4:
|
||||
@@ -1772,7 +1645,7 @@ namespace textinput {
|
||||
if (mgr()->isInScroll() && event != 1 && event != 0) {
|
||||
return;
|
||||
}
|
||||
if (!mgr()->searchAnmPane(lbl_8165DA08)->isInAnimation() || event == 1) {
|
||||
if (!mgr()->searchAnmPane(scW_predictWindow)->isInAnimation() || event == 1) {
|
||||
if (!mgr()->isInvalid()) {
|
||||
switch (event) {
|
||||
case 4:
|
||||
@@ -1818,15 +1691,15 @@ namespace textinput {
|
||||
mpOnPictPane = mgr->searchPaneComponent("P_OnBtn");
|
||||
mpOnBoundPane = mgr->searchPaneComponent("B_OnBtn");
|
||||
mpOnAnmPane = static_cast<OnOffAnmPane*>(layout->searchAnmPane("P_OnBtn"));
|
||||
mpOffPictPane = mgr->searchPaneComponent(lbl_8165D2F8.tail);
|
||||
mpOffBoundPane = mgr->searchPaneComponent(lbl_8165D984);
|
||||
mpOffAnmPane = static_cast<OnOffAnmPane*>(layout->searchAnmPane(lbl_8165D2F8.tail));
|
||||
mpOffPictPane = mgr->searchPaneComponent(scCandidatePaneData.tail);
|
||||
mpOffBoundPane = mgr->searchPaneComponent(scPaneNameTable);
|
||||
mpOffAnmPane = static_cast<OnOffAnmPane*>(layout->searchAnmPane(scCandidatePaneData.tail));
|
||||
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(lbl_8165D2F8.tail)->GetMaterial()->GetTexture(&mOffTexDefault, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(lbl_8165D984 + 12)->GetMaterial()->GetTexture(&mOffTexJP, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(lbl_8165D984 + 24)->GetMaterial()->GetTexture(&mOffTexCN, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(lbl_816973D0)->GetMaterial()->GetTexture(&mOnTexDefault, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(lbl_8165D984 + 36)->GetMaterial()->GetTexture(&mOnTexCN, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(scCandidatePaneData.tail)->GetMaterial()->GetTexture(&mOffTexDefault, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(scPaneNameTable + 12)->GetMaterial()->GetTexture(&mOffTexJP, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(scPaneNameTable + 24)->GetMaterial()->GetTexture(&mOffTexCN, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(scP_OnBtn)->GetMaterial()->GetTexture(&mOnTexDefault, 0);
|
||||
layout->getLayout()->GetRootPane()->FindPaneByName(scPaneNameTable + 36)->GetMaterial()->GetTexture(&mOnTexCN, 0);
|
||||
|
||||
mpOffBoundPane->setListener(this);
|
||||
mpOnBoundPane->setListener(this);
|
||||
@@ -1883,7 +1756,7 @@ namespace textinput {
|
||||
if (mgr()->isInScroll() && event != 1 && event != 0) {
|
||||
return;
|
||||
}
|
||||
if (!mgr()->searchAnmPane(lbl_8165DA08)->isInAnimation() || event == 1) {
|
||||
if (!mgr()->searchAnmPane(scW_predictWindow)->isInAnimation() || event == 1) {
|
||||
OnOffAnmPane* p;
|
||||
if (&component == mpOnBoundPane) {
|
||||
p = mpOnAnmPane;
|
||||
|
||||
@@ -606,8 +606,9 @@ namespace textinput {
|
||||
CellPhoneAnmPane* pane = new (MEMAllocFromAllocator(allocator, sizeof(CellPhoneAnmPane)))
|
||||
CellPhoneAnmPane(getPane(csPaneNameNormalAnimationKey[i].name), NULL);
|
||||
nw4r::ut::List_Append(&mAnmPanes, pane);
|
||||
const char* animationKey;
|
||||
const PaneNameToAnimationKey& paneName = csPaneNameNormalAnimationKey[i];
|
||||
const char* animationKey = paneName.animationKey;
|
||||
animationKey = paneName.animationKey;
|
||||
|
||||
for (u16 j = 0; j < 5; ++j) {
|
||||
void* resource = mpMultiArcResourceAccessor->GetResource(0, csAninationFileForControlKey[j].filename);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
namespace textinput {
|
||||
namespace gui {
|
||||
extern "C" void drawLine___Q29textinput3guiFfffffUcR8_GXColor();
|
||||
extern "C" const f32 lbl_81694EE8;
|
||||
extern "C" const f32 scGuiZeroF;
|
||||
|
||||
void drawLine_(f32 x0, f32 y0, f32 x1, f32 y1, f32 z, u8 width, GXColor& color) {
|
||||
GXClearVtxDesc();
|
||||
@@ -31,7 +31,7 @@ namespace textinput {
|
||||
GXSetBlendMode(GX_BM_NONE, GX_BL_ZERO, GX_BL_ZERO, GX_LO_NOOP);
|
||||
|
||||
Mtx mtx;
|
||||
MTXTrans(mtx, lbl_81694EE8, lbl_81694EE8, lbl_81694EE8);
|
||||
MTXTrans(mtx, scGuiZeroF, scGuiZeroF, scGuiZeroF);
|
||||
GXLoadPosMtxImm(mtx, 0);
|
||||
|
||||
GXSetLineWidth(width, GX_TO_ZERO);
|
||||
@@ -334,7 +334,7 @@ namespace textinput {
|
||||
MTXInverse(mpPane->GetGlobalMtx(), globalMtx);
|
||||
|
||||
nw4r::math::VEC3 pos;
|
||||
MTXMultVec(globalMtx, nw4r::math::VEC3(x, y, lbl_81694EE8), pos);
|
||||
MTXMultVec(globalMtx, nw4r::math::VEC3(x, y, scGuiZeroF), pos);
|
||||
|
||||
nw4r::ut::Rect rect = mpPane->GetPaneRect(*drawInfo);
|
||||
|
||||
@@ -348,12 +348,12 @@ namespace textinput {
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
extern "C" const f32 lbl_81694EE8 = 0.0f;
|
||||
extern "C" const u8 lbl_81694EEC = 0xFF;
|
||||
extern "C" const u8 lbl_81694EED = 0x00;
|
||||
extern "C" const u8 lbl_81694EEE = 0x00;
|
||||
extern "C" const u8 lbl_81694EEF = 0xFF;
|
||||
extern "C" const f32 lbl_81694EF0 = 0.5f;
|
||||
extern "C" const f32 scGuiZeroF = 0.0f;
|
||||
extern "C" const u8 scGuiLineColorR = 0xFF;
|
||||
extern "C" const u8 scGuiLineColorG = 0x00;
|
||||
extern "C" const u8 scGuiLineColorB = 0x00;
|
||||
extern "C" const u8 scGuiLineColorA = 0xFF;
|
||||
extern "C" const f32 scGuiHalfF = 0.5f;
|
||||
#pragma pop
|
||||
|
||||
extern "C" asm void draw__Q39textinput3gui13PaneComponentFv() {
|
||||
@@ -376,15 +376,15 @@ namespace textinput {
|
||||
beq pane_component_draw_done
|
||||
lwz r5, 0x9c(r31)
|
||||
mr r3, r31
|
||||
lbz r7, lbl_81694EEC
|
||||
lbz r7, scGuiLineColorR
|
||||
li r4, 0
|
||||
lfs f1, 0x4c(r5)
|
||||
lfs f0, 0x50(r5)
|
||||
lfs f31, 0x90(r5)
|
||||
lfs f30, 0xa0(r5)
|
||||
lbz r6, lbl_81694EED
|
||||
lbz r5, lbl_81694EEE
|
||||
lbz r0, lbl_81694EEF
|
||||
lbz r6, scGuiLineColorG
|
||||
lbz r5, scGuiLineColorB
|
||||
lbz r0, scGuiLineColorA
|
||||
stb r7, 8(r1)
|
||||
stb r6, 9(r1)
|
||||
stb r5, 0xa(r1)
|
||||
@@ -402,13 +402,13 @@ namespace textinput {
|
||||
stb r3, 8(r1)
|
||||
stb r0, 0xa(r1)
|
||||
pane_component_draw_lines:
|
||||
lfs f1, lbl_81694EF0
|
||||
lfs f1, scGuiHalfF
|
||||
addi r4, r1, 8
|
||||
lfs f0, 0x14(r1)
|
||||
li r3, 8
|
||||
lfs f2, 0x10(r1)
|
||||
fmuls f0, f0, f1
|
||||
lfs f5, lbl_81694EE8
|
||||
lfs f5, scGuiZeroF
|
||||
fmuls f3, f2, f1
|
||||
fsubs f2, f30, f0
|
||||
fsubs f1, f31, f3
|
||||
@@ -417,24 +417,24 @@ namespace textinput {
|
||||
bl drawLine___Q29textinput3guiFfffffUcR8_GXColor
|
||||
lfs f1, 0x10(r1)
|
||||
addi r4, r1, 8
|
||||
lfs f2, lbl_81694EF0
|
||||
lfs f2, scGuiHalfF
|
||||
li r3, 8
|
||||
lfs f0, 0x14(r1)
|
||||
fmuls f1, f1, f2
|
||||
lfs f5, lbl_81694EE8
|
||||
lfs f5, scGuiZeroF
|
||||
fmuls f0, f0, f2
|
||||
fadds f1, f31, f1
|
||||
fsubs f2, f30, f0
|
||||
fadds f4, f30, f0
|
||||
fmr f3, f1
|
||||
bl drawLine___Q29textinput3guiFfffffUcR8_GXColor
|
||||
lfs f1, lbl_81694EF0
|
||||
lfs f1, scGuiHalfF
|
||||
addi r4, r1, 8
|
||||
lfs f0, 0x14(r1)
|
||||
li r3, 8
|
||||
lfs f2, 0x10(r1)
|
||||
fmuls f0, f0, f1
|
||||
lfs f5, lbl_81694EE8
|
||||
lfs f5, scGuiZeroF
|
||||
fmuls f3, f2, f1
|
||||
fadds f2, f30, f0
|
||||
fadds f1, f31, f3
|
||||
@@ -443,11 +443,11 @@ namespace textinput {
|
||||
bl drawLine___Q29textinput3guiFfffffUcR8_GXColor
|
||||
lfs f1, 0x10(r1)
|
||||
addi r4, r1, 8
|
||||
lfs f2, lbl_81694EF0
|
||||
lfs f2, scGuiHalfF
|
||||
li r3, 8
|
||||
lfs f0, 0x14(r1)
|
||||
fmuls f1, f1, f2
|
||||
lfs f5, lbl_81694EE8
|
||||
lfs f5, scGuiZeroF
|
||||
fmuls f0, f0, f2
|
||||
fsubs f1, f31, f1
|
||||
fadds f2, f30, f0
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
#include "keyboard/tiHKBManager.h"
|
||||
#include "keyboard/tiLayoutGather.h"
|
||||
|
||||
extern const u8 lbl_81616BD8[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00};
|
||||
extern const u8 lbl_81616BE4[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00};
|
||||
extern "C" void SetCountry__Q39textinput5input10HKBManagerFUc();
|
||||
extern "C" textinput::input::HKBManager sInstance__Q39textinput5input10HKBManager;
|
||||
extern "C" void convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw();
|
||||
@@ -21,7 +19,7 @@ extern "C" void updateFromReceiver__Q29textinput13CommandSenderFUlPv();
|
||||
#pragma push
|
||||
#pragma section const_type ".data"
|
||||
typedef void (*KeyboardDataFunction)();
|
||||
extern "C" KeyboardDataFunction const jumptable_81668EF8[0x3f] = {
|
||||
extern "C" KeyboardDataFunction const scHwKeyboardConvertWCCodeJumpTable[0x3f] = {
|
||||
reinterpret_cast<KeyboardDataFunction>(reinterpret_cast<u32>(convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw) + 0x00000158),
|
||||
reinterpret_cast<KeyboardDataFunction>(reinterpret_cast<u32>(convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw) + 0x000001d8),
|
||||
reinterpret_cast<KeyboardDataFunction>(reinterpret_cast<u32>(convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw) + 0x000001f0),
|
||||
@@ -528,20 +526,6 @@ extern const u8 controlKeys[];
|
||||
return false;
|
||||
}
|
||||
|
||||
const u8 controlKeys[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, 0x0a, 0x03,
|
||||
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
|
||||
0x00, 0x04, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a,
|
||||
0x2b, 0x2c, 0x19, 0x1a, 0x1b, 0x13, 0x15, 0x17, 0x14, 0x16, 0x18, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0f, 0x0e,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x07, 0x0b,
|
||||
0x06, 0x05, 0x07, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
bool HWKeyboard::updateTappingShift_(input::HKBManager& hkbManager) {
|
||||
hkbManager.GetModifierState();
|
||||
input::HKBManager::KeySet currentKeySet;
|
||||
@@ -635,20 +619,38 @@ const u8 controlKeys[] = {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" const u8 scCountryMap_EU[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00};
|
||||
extern "C" const u8 scCountryMap_NonEU[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00};
|
||||
|
||||
const u8 controlKeys[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, 0x0a, 0x03,
|
||||
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
|
||||
0x00, 0x04, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a,
|
||||
0x2b, 0x2c, 0x19, 0x1a, 0x1b, 0x13, 0x15, 0x17, 0x14, 0x16, 0x18, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0f, 0x0e,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x07, 0x0b,
|
||||
0x06, 0x05, 0x07, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
extern "C" asm void setLanguage__Q49textinput8keyboard5hwkey10HWKeyboardFQ29textinput11DestinationQ29textinput8Language() {
|
||||
nofralloc
|
||||
cmpwi r4, 2
|
||||
bne setLanguage_L1
|
||||
lis r4, lbl_81616BD8@ha
|
||||
lis r4, scCountryMap_EU@ha
|
||||
lis r3, sInstance__Q39textinput5input10HKBManager@ha
|
||||
addi r4, r4, lbl_81616BD8@l
|
||||
addi r4, r4, scCountryMap_EU@l
|
||||
lbzx r4, r4, r5
|
||||
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
|
||||
b SetCountry__Q39textinput5input10HKBManagerFUc
|
||||
setLanguage_L1:
|
||||
lis r4, lbl_81616BE4@ha
|
||||
lis r4, scCountryMap_NonEU@ha
|
||||
lis r3, sInstance__Q39textinput5input10HKBManager@ha
|
||||
addi r4, r4, lbl_81616BE4@l
|
||||
addi r4, r4, scCountryMap_NonEU@l
|
||||
lbzx r4, r4, r5
|
||||
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
|
||||
b SetCountry__Q39textinput5input10HKBManagerFUc
|
||||
@@ -735,9 +737,9 @@ const u8 controlKeys[] = {
|
||||
addi r0, r31, -0x21
|
||||
cmplwi r0, 0x3e
|
||||
bgt convertWCCode_HWKeyboard_L1
|
||||
lis r3, jumptable_81668EF8@ha
|
||||
lis r3, scHwKeyboardConvertWCCodeJumpTable@ha
|
||||
slwi r0, r0, 2
|
||||
addi r3, r3, jumptable_81668EF8@l
|
||||
addi r3, r3, scHwKeyboardConvertWCCodeJumpTable@l
|
||||
lwzx r3, r3, r0
|
||||
mtctr r3
|
||||
bctr
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -312,6 +312,10 @@ void Manager::SetFont(nw4r::lyt::FontRefLink* link) {
|
||||
if (mpInputForm) mpInputForm->nw4r::ut::CharWriter::SetFont(*font);
|
||||
if (mpCellPhoneKeyboard) static_cast<nw4rmanager::Layout&>(*mpCellPhoneKeyboard).SetFontForce(font);
|
||||
}
|
||||
void* Manager::getPredictLanguageSelectDialog() { return mpPredictLanguageDialog; }
|
||||
const void* Manager::getPredictLanguageSelectDialog() const { return mpPredictLanguageDialog; }
|
||||
void* Manager::getSignKeyboard() { return mpSignWindow; }
|
||||
const void* Manager::getSignKeyboard() const { return mpSignWindow; }
|
||||
void Manager::setDefaultPredictionJP(int count, const char** predictions) {
|
||||
static_cast<tistring::WithAtok*>(getInputForm()->getAtokString())->setDefaultPrediction(count, predictions);
|
||||
}
|
||||
@@ -274,7 +274,7 @@ namespace textinput {
|
||||
xOffset *= scale - 1.0f;
|
||||
viewport[0] = left + xOffset;
|
||||
f32 height = (mProjectionRect.bottom -
|
||||
mProjectionRect.top) * 0.5f;
|
||||
mProjectionRect.top) / 2.0f;
|
||||
viewport[1] = rect.bottom + height;
|
||||
viewport[2] = scale * (100.0f + (rect.right - rect.left));
|
||||
viewport[3] = rect.top - rect.bottom;
|
||||
|
||||
@@ -557,10 +557,11 @@ void WithZi::setCurrentWord(const wchar_t* word) {
|
||||
LatestWord[1] = 0;
|
||||
return;
|
||||
}
|
||||
mbContextChanged = 1;
|
||||
wchar_t* currentWord;
|
||||
const wchar_t* source;
|
||||
u32 length;
|
||||
s32 copied;
|
||||
mbContextChanged = 1;
|
||||
length = 0;
|
||||
currentWord = reinterpret_cast<wchar_t*>(LatestWord);
|
||||
for (; *currentWord != 0 && *currentWord != 0x20;
|
||||
@@ -571,14 +572,10 @@ void WithZi::setCurrentWord(const wchar_t* word) {
|
||||
}
|
||||
}
|
||||
copied = 0;
|
||||
const wchar_t* source = word;
|
||||
u32 destinationOffset = length;
|
||||
source = word;
|
||||
for (; *source != 0 && length < 0x3f;) {
|
||||
wchar_t character = word[copied];
|
||||
++length;
|
||||
LatestWord[length++] = word[copied++];
|
||||
++source;
|
||||
++copied;
|
||||
LatestWord[destinationOffset++] = character;
|
||||
}
|
||||
LatestWord[length] = 0;
|
||||
mCurrentWordLength = copied;
|
||||
|
||||
@@ -327,15 +327,20 @@ namespace ipl {
|
||||
mpDialogLayout->calc();
|
||||
}
|
||||
|
||||
static inline math::VEC2 scaledPageOffset(f32 scale) {
|
||||
math::VEC2 result;
|
||||
result.y = sPageOffset.y * scale;
|
||||
result.x = sPageOffset.x * scale;
|
||||
return result;
|
||||
}
|
||||
|
||||
void Address::draw() {
|
||||
if (System::getSceneManager()->onDrawLayer(DRAW_LAYER_2)) {
|
||||
utility::Graphics::setOrtho(0);
|
||||
|
||||
nw4r::lyt::Pane* pane = mpLayout->FindPaneByName("N_note_a");
|
||||
for (int i = mNextPageNum; i >= 1; i--) {
|
||||
math::VEC2 trans;
|
||||
trans.y = sPageOffset.y * i;
|
||||
trans.x = sPageOffset.x * i;
|
||||
math::VEC2 trans = scaledPageOffset(i);
|
||||
pane->SetTranslate(trans);
|
||||
pane->CalculateMtx(*mpLayout->getDrawInfo());
|
||||
mpLayout->draw(pane);
|
||||
@@ -536,11 +541,16 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
static inline nw4r::math::_VEC2 negativeOffset(const nw4r::math::_VEC2& value) {
|
||||
f32 negativeY = -value.y;
|
||||
f32 negativeX = -value.x;
|
||||
nw4r::math::_VEC2 result = {negativeX, negativeY};
|
||||
return result;
|
||||
}
|
||||
|
||||
void Address::stt_cover_backward() {
|
||||
if (!mpLayout->getAnim(4)->isPlaying()) {
|
||||
math::VEC2 offset;
|
||||
offset.x = -sPageOffset.x;
|
||||
offset.y = -sPageOffset.y;
|
||||
math::VEC2 offset = negativeOffset(sPageOffset);
|
||||
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
|
||||
mbCover = true;
|
||||
mNextPageNum++;
|
||||
@@ -582,10 +592,20 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
static inline nw4r::math::_VEC2 previousPageOffset() {
|
||||
f32 negativeY = -sPageOffset.y;
|
||||
f32 negativeX = -sPageOffset.x;
|
||||
nw4r::math::_VEC2 result;
|
||||
result.y = negativeY;
|
||||
result.x = negativeX;
|
||||
return result;
|
||||
}
|
||||
|
||||
void Address::stt_backward() {
|
||||
if (!mpLayout->getAnim(5)->isPlaying()) {
|
||||
mNextPageNum++;
|
||||
add_translate(mpLayout->FindPaneByName("N_note_base"), -sPageOffset);
|
||||
math::VEC2 offset = previousPageOffset();
|
||||
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
|
||||
set_page_text("T_nmbr_b", mPage + 1);
|
||||
|
||||
for (u32 i = 0; i < BTN_MAX; i++) {
|
||||
@@ -602,9 +622,17 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
static inline nw4r::math::VEC2 loopPageOffset() {
|
||||
nw4r::math::VEC2 result;
|
||||
result.y = -sPageOffset.y;
|
||||
result.x = -sPageOffset.x;
|
||||
return result;
|
||||
}
|
||||
|
||||
void Address::stt_loop_forward() {
|
||||
if (!mpLayout->getAnim(4)->isPlaying()) {
|
||||
add_translate(mpLayout->FindPaneByName("N_note_base"), -sPageOffset * PAGE_MAX);
|
||||
math::VEC2 offset = loopPageOffset() * PAGE_MAX;
|
||||
add_translate(mpLayout->FindPaneByName("N_note_base"), offset);
|
||||
set_page_text("T_nmbr_b", mPage + 1);
|
||||
reset_gui(false);
|
||||
|
||||
|
||||
@@ -621,28 +621,28 @@ namespace ipl {
|
||||
void BoardObject::set_thumb_text(const char* paneName, const wchar_t* thumbText) {
|
||||
nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName(paneName));
|
||||
|
||||
wchar_t local_28[THUMB_TEXT_LENGTH + 3 /* "..." */ + 1 /* NULL */] = L"";
|
||||
memset(local_28, 0, sizeof(local_28));
|
||||
wchar_t truncatedThumb[THUMB_TEXT_LENGTH + 3 /* "..." */ + 1 /* NULL */] = L"";
|
||||
memset(truncatedThumb, 0, sizeof(truncatedThumb));
|
||||
|
||||
if (thumbText != NULL) {
|
||||
for (int i = 0; i < THUMB_TEXT_LENGTH + 1 && thumbText[i] != (u16)'\n'; i++) {
|
||||
local_28[i] = thumbText[i];
|
||||
truncatedThumb[i] = thumbText[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (System::getRegion() == SC_PRODUCT_AREA_JPN) {
|
||||
if (local_28[THUMB_TEXT_LENGTH] != 0) {
|
||||
local_28[THUMB_TEXT_LENGTH + 0] = L'…';
|
||||
if (truncatedThumb[THUMB_TEXT_LENGTH] != 0) {
|
||||
truncatedThumb[THUMB_TEXT_LENGTH + 0] = L'…';
|
||||
}
|
||||
} else {
|
||||
if (local_28[THUMB_TEXT_LENGTH] != 0) {
|
||||
local_28[THUMB_TEXT_LENGTH + 2] = '.';
|
||||
local_28[THUMB_TEXT_LENGTH + 1] = '.';
|
||||
local_28[THUMB_TEXT_LENGTH + 0] = '.';
|
||||
if (truncatedThumb[THUMB_TEXT_LENGTH] != 0) {
|
||||
truncatedThumb[THUMB_TEXT_LENGTH + 2] = '.';
|
||||
truncatedThumb[THUMB_TEXT_LENGTH + 1] = '.';
|
||||
truncatedThumb[THUMB_TEXT_LENGTH + 0] = '.';
|
||||
}
|
||||
}
|
||||
|
||||
textBox->SetString(local_28);
|
||||
textBox->SetString(truncatedThumb);
|
||||
}
|
||||
|
||||
void BoardObject::update(int chan) {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#include "iplSystem.h"
|
||||
|
||||
__declspec(section ".sdata") extern char lbl_816966F9[];
|
||||
extern char lbl_816967B5[];
|
||||
__declspec(section ".sdata") extern char scPaneName_B_Stop[];
|
||||
extern char scPaneName_T_Stop[];
|
||||
extern "C" BOOL push_button_queue(void*, const void*);
|
||||
|
||||
namespace ipl {
|
||||
@@ -877,7 +877,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void OptOutButton::setText(u32 msgId) {
|
||||
nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName(lbl_816967B5));
|
||||
nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName(scPaneName_T_Stop));
|
||||
textBox->SetString(System::getMessage(msgId));
|
||||
}
|
||||
|
||||
@@ -890,7 +890,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void OptOutButton::start_point_event(const char* paneName, controller::Interface* con) {
|
||||
if (strcmp(paneName, lbl_816966F9) == 0) {
|
||||
if (strcmp(paneName, scPaneName_B_Stop) == 0) {
|
||||
if (mbHovered == FALSE) {
|
||||
// Play hover in animation
|
||||
mpLayout->getAnim(ANIM_OPT_OUT_FOCUS_IN)->play();
|
||||
@@ -906,7 +906,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
void OptOutButton::start_left_event(const char* paneName) {
|
||||
if (strcmp(paneName, lbl_816966F9) == 0) {
|
||||
if (strcmp(paneName, scPaneName_B_Stop) == 0) {
|
||||
if (mbHovered == TRUE) {
|
||||
mpLayout->getAnim(ANIM_OPT_OUT_FOCUS_OUT)->play();
|
||||
}
|
||||
@@ -1005,4 +1005,4 @@ namespace ipl {
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
char lbl_816967B5[] = "T_Stop";
|
||||
char scPaneName_T_Stop[] = "T_Stop";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user