Compare commits
580 Commits
agent/w092
...
cleanup/co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b8d11475d | ||
|
|
413c779180 | ||
|
|
f9ecefa6a2 | ||
|
|
320700d49b | ||
|
|
c52153e9f7 | ||
|
|
899438ff02 | ||
|
|
8476c93f00 | ||
|
|
9b375e1e50 | ||
|
|
73795cb3fb | ||
|
|
0c780f6d1f | ||
|
|
63f4c7aeab | ||
|
|
282ddd99b7 | ||
|
|
c7d0f8f01b | ||
|
|
414b553743 | ||
|
|
da96c27969 | ||
|
|
0a925c7053 | ||
|
|
c0126c37d4 | ||
|
|
fc2d150c6d | ||
|
|
7851b2b29f | ||
|
|
263411ccac | ||
|
|
09de907f0b | ||
|
|
4e3ab6eae5 | ||
|
|
99d6fe20a2 | ||
|
|
00013016df | ||
|
|
3e279ef189 | ||
|
|
32417fe8a2 | ||
|
|
2d9e3ee14a | ||
|
|
23db5e05e1 | ||
|
|
741c9263e3 | ||
|
|
29fe1efaf2 | ||
|
|
45aaeb16b2 | ||
|
|
e9114959c9 | ||
|
|
1f0eb50f01 | ||
|
|
d93fb2d5f8 | ||
|
|
27abfe81d9 | ||
|
|
bf6bc87fbd | ||
|
|
786a2dd3e8 | ||
|
|
bdd15186a7 | ||
|
|
40a2ea7e91 | ||
|
|
0b10215388 | ||
|
|
4e293a4223 | ||
|
|
d94df60412 | ||
|
|
daf04f1f26 | ||
|
|
1994d24f06 | ||
|
|
0d9b038782 | ||
|
|
ff90063ef9 | ||
|
|
c1183780c2 | ||
|
|
2050ad7616 | ||
|
|
9077ef8c7a | ||
|
|
bc303bc36e | ||
|
|
5518cb16fd | ||
|
|
0c06b01c8d | ||
|
|
adc15fdf6f | ||
|
|
dea64a8c9c | ||
|
|
3cde45682d | ||
|
|
ae7cf34cab | ||
|
|
91cc177cb7 | ||
|
|
ecee6f01e4 | ||
|
|
28d3333887 | ||
|
|
2119935c1d | ||
|
|
c7896c3802 | ||
|
|
68c4c9aeac | ||
|
|
1b942565f7 | ||
|
|
a9705fa1a3 | ||
|
|
e1f0ef93a5 | ||
|
|
adcd8ca586 | ||
|
|
76d72f06ce | ||
|
|
b0474b6eac | ||
|
|
9ce28d272f | ||
|
|
771208ab77 | ||
|
|
cee13c5a0b | ||
|
|
1c974dbd49 | ||
|
|
bac1e5427a | ||
|
|
b6687e9ff9 | ||
|
|
ff52d5235d | ||
|
|
7be7f1594e | ||
|
|
51b483cbb7 | ||
|
|
1bb1fb08be | ||
|
|
2f759f35f1 | ||
|
|
ed5c96bd85 | ||
|
|
3816427a3e | ||
|
|
2d0a4faa6f | ||
|
|
a61a7cf140 | ||
|
|
dce9e0732d | ||
|
|
8121c71188 | ||
|
|
d6997b0cb9 | ||
|
|
6b80fd87f5 | ||
|
|
8f920a08c2 | ||
|
|
9c81288c55 | ||
|
|
abb652bb85 | ||
|
|
b578087994 | ||
|
|
d542ace0ed | ||
|
|
d195c16c86 | ||
|
|
2daa6aedf6 | ||
|
|
9432f36a57 | ||
|
|
4f77bbd2ae | ||
|
|
9c6416820d | ||
|
|
4bfa1b6c4c | ||
|
|
cbed5f6d77 | ||
|
|
f8da383802 | ||
|
|
18786d6b7d | ||
|
|
e7e35742dd | ||
|
|
73a89b06e5 | ||
|
|
f0d938021e | ||
|
|
e9545f74d5 | ||
|
|
d0a9514c9b | ||
|
|
c653415d77 | ||
|
|
f98ffd0da3 | ||
|
|
c31af38e0e | ||
|
|
9aef037505 | ||
|
|
72cf3991b2 | ||
|
|
d8937f9e82 | ||
|
|
36d651fe72 | ||
|
|
e133119aa5 | ||
|
|
fa50eeea1a | ||
|
|
ae5f904c0b | ||
|
|
11f4b29c64 | ||
|
|
c7344eccc8 | ||
|
|
86cda2adbe | ||
|
|
0d1fa438ba | ||
|
|
343fa90f9b | ||
|
|
ed52b1987e | ||
|
|
00f44a924b | ||
|
|
d494f44516 | ||
|
|
5439b99f38 | ||
|
|
4ccc441d7e | ||
|
|
4264e5ff51 | ||
|
|
f182215e66 | ||
|
|
fe6a45c09a | ||
|
|
f07dd4a6ca | ||
|
|
65cd387bcb | ||
|
|
d0c3d43000 | ||
|
|
a2abf24854 | ||
|
|
1ce1b0458a | ||
|
|
0e37502750 | ||
|
|
78d6827757 | ||
|
|
b0fbec3f25 | ||
|
|
d34e09d5dc | ||
|
|
7cce8859c3 | ||
|
|
711ee737f9 | ||
|
|
82def66db6 | ||
|
|
2039813ccf | ||
|
|
eabfb0cde9 | ||
|
|
2cc9824045 | ||
|
|
6f90840464 | ||
|
|
0978b074b8 | ||
|
|
252e40e22f | ||
|
|
2230741db8 | ||
|
|
f3adacfe3d | ||
|
|
1cd71c6903 | ||
|
|
7b64914abb | ||
|
|
199de6f6c0 | ||
|
|
513c2a869e | ||
|
|
24b6645572 | ||
|
|
9536177edd | ||
|
|
81325e667c | ||
|
|
51d5dc519b | ||
|
|
b84b3c0d57 | ||
|
|
950bb0dda6 | ||
|
|
de05797e19 | ||
|
|
c70816c7e1 | ||
|
|
1d290fa12a | ||
|
|
6547b1fa10 | ||
|
|
3bdb663f09 | ||
|
|
8120309670 | ||
|
|
a4c84cbf53 | ||
|
|
6ebe56bc04 | ||
|
|
69c235ffc2 | ||
|
|
767f393bf9 | ||
|
|
6368cc44e9 | ||
|
|
7deffd048c | ||
|
|
4aaa362c5e | ||
|
|
5fe0a61af7 | ||
|
|
dbf6a1256e | ||
|
|
c6c0b145f8 | ||
|
|
b38c5653df | ||
|
|
d9cf3598fc | ||
|
|
c44fbd7209 | ||
|
|
f78a686e32 | ||
|
|
c9fb0697ca | ||
|
|
11df09974b | ||
|
|
a3b27c9ed0 | ||
|
|
91fd1dcb69 | ||
|
|
b02273897c | ||
|
|
249c129e67 | ||
|
|
9ef60d674d | ||
|
|
aa677ad520 | ||
|
|
cbf6363d0f | ||
|
|
c4857800df | ||
|
|
0dd0a6941a | ||
|
|
422a344b28 | ||
|
|
5543b7b720 | ||
|
|
5d63d15248 | ||
|
|
2f0f5a44c7 | ||
|
|
08923eda6c | ||
|
|
0c94076d99 | ||
|
|
0695760312 | ||
|
|
b3c23834a7 | ||
|
|
b145a74db1 | ||
|
|
b941fc6268 | ||
|
|
d5cd4ca777 | ||
|
|
5b7fb6f968 | ||
|
|
6fa90e5574 | ||
|
|
9702056bda | ||
|
|
dc40dd44bb | ||
|
|
32f358cd65 | ||
|
|
0cc4c57ecd | ||
|
|
a1d6b7d930 | ||
|
|
18e8dd2d07 | ||
|
|
09d3f9beef | ||
|
|
41adc87d89 | ||
|
|
d2ef39c441 | ||
|
|
1296031075 | ||
|
|
775167f4a5 | ||
|
|
547637bf79 | ||
|
|
2b1e29a746 | ||
|
|
394f6c2444 | ||
|
|
35e7147b97 | ||
|
|
ed3fad1bff | ||
|
|
f72e4281a8 | ||
|
|
f6fd278076 | ||
|
|
4b25950eeb | ||
|
|
dc5d3cf81b | ||
|
|
d54e4ba47a | ||
|
|
3f330a39ea | ||
|
|
85701c828f | ||
|
|
f37268de4f | ||
|
|
26afef0d00 | ||
|
|
ecd5e498b5 | ||
|
|
68e1ee3a35 | ||
|
|
bcb2ac0e37 | ||
|
|
00ff6ea6a0 | ||
|
|
eadb516be8 | ||
|
|
e3be21cd6c | ||
|
|
9eb08c48a7 | ||
|
|
456e9dbd2e | ||
|
|
4d08c3005b | ||
|
|
a16c5191f0 | ||
|
|
eecf16f01e | ||
|
|
73f5b332e2 | ||
|
|
3d97a4040f | ||
|
|
0b623f581b | ||
|
|
f4e539191d | ||
|
|
cb0716f7a5 | ||
|
|
d47d308721 | ||
|
|
1bf9ae4569 | ||
|
|
bab82c12dd | ||
|
|
ccca706770 | ||
|
|
a9833b51a2 | ||
|
|
76d8500dcf | ||
|
|
184bee0173 | ||
|
|
368a86cc6c | ||
|
|
9a7da62d3a | ||
|
|
b3c1300392 | ||
|
|
bd762fd162 | ||
|
|
f18d945894 | ||
|
|
bc505c3b8a | ||
|
|
a5f79b81fa | ||
|
|
137edaff42 | ||
|
|
4a7353ec73 | ||
|
|
618e713b53 | ||
|
|
3dcd723459 | ||
|
|
4ed63ff786 | ||
|
|
eb8b9b978d | ||
|
|
10e3f47e64 | ||
|
|
006457008c | ||
|
|
75677c746b | ||
|
|
ccbc04a997 | ||
|
|
da35a476bf | ||
|
|
589bee2b0d | ||
|
|
f36411d483 | ||
|
|
9a897b043b | ||
|
|
4d828ed557 | ||
|
|
f479546211 | ||
|
|
a6c7690eb0 | ||
|
|
54b82eb747 | ||
|
|
326273b619 | ||
|
|
31d0f12981 | ||
|
|
01fb2284c6 | ||
|
|
426555a34f | ||
|
|
9acff80781 | ||
|
|
3c9af06f34 | ||
|
|
824fe9fc0a | ||
|
|
34d6a62df3 | ||
|
|
f97f091472 | ||
|
|
6c042d2a06 | ||
|
|
53f70c85ce | ||
|
|
7a24a5c17e | ||
|
|
37c7c21953 | ||
|
|
a81b7c36fe | ||
|
|
d17ab22bf0 | ||
|
|
17407ed1cb | ||
|
|
199883f758 | ||
|
|
edfb253724 | ||
|
|
c8bb9f44da | ||
|
|
0d75b24a96 | ||
|
|
262996a0de | ||
|
|
f095c9ea12 | ||
|
|
f410332140 | ||
|
|
fed31b69b6 | ||
|
|
5ac1f65c4a | ||
|
|
d9fbf88fb8 | ||
|
|
a77ce293ce | ||
|
|
e5f4e0e1f4 | ||
|
|
c1cccf1c2c | ||
|
|
ded159048f | ||
|
|
0ec86e7985 | ||
|
|
30e1ef0938 | ||
|
|
9ff511afd7 | ||
|
|
2f206d7fe8 | ||
|
|
d6b044ff32 | ||
|
|
0e73a554de | ||
|
|
d4cdae2177 | ||
|
|
4b831f9ec0 | ||
|
|
fbecedd948 | ||
|
|
f533c9f0f5 | ||
|
|
1366528dd6 | ||
|
|
bd27e72a48 | ||
|
|
08c53bbe23 | ||
|
|
483005a940 | ||
|
|
b18d01602a | ||
|
|
e38a4cebfe | ||
|
|
81dc9d2b3d | ||
|
|
f645518810 | ||
|
|
51713e735e | ||
|
|
ca998ad7cf | ||
|
|
486c20c623 | ||
|
|
6adb0dc52e | ||
|
|
c9f64372cf | ||
|
|
9f4a70db74 | ||
|
|
e305e6047c | ||
|
|
df48bc9f76 | ||
|
|
3bd814f042 | ||
|
|
51b78ed7da | ||
|
|
3eb5d8faee | ||
|
|
d99950fc88 | ||
|
|
98d03059bd | ||
|
|
830e2f3920 | ||
|
|
c1b00d8a14 | ||
|
|
9acdd7f8dc | ||
|
|
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 | ||
|
|
cb58211725 | ||
|
|
2dbf80c418 | ||
|
|
faee1f779d | ||
|
|
a324e9a843 | ||
|
|
2bddfcde52 | ||
|
|
776b7981df | ||
|
|
539693c76a | ||
|
|
3134c4c05a | ||
|
|
d60d10868a | ||
|
|
735b0ab878 | ||
|
|
ea8d4d3b8a | ||
|
|
7329402a2c | ||
|
|
e46168062b | ||
|
|
b2074a70d7 | ||
|
|
98648d19bb | ||
|
|
d03219249b | ||
|
|
3c23585249 | ||
|
|
b4745ba2da | ||
|
|
fb3e7bd49a | ||
|
|
e34eac26ef | ||
|
|
565d039c01 | ||
|
|
46d7bc07cf | ||
|
|
6ec48a1b9a | ||
|
|
07b3a2b579 | ||
|
|
e1b46d09e8 | ||
|
|
a4d46cf340 | ||
|
|
46e8217f2f | ||
|
|
028e36cce2 | ||
|
|
6abc1f9bd8 | ||
|
|
b004e2be89 | ||
|
|
5c1794ef25 | ||
|
|
c393274640 | ||
|
|
3bfbb0c9c3 | ||
|
|
cdc22045a7 | ||
|
|
976fbeb804 | ||
|
|
725599dba0 | ||
|
|
4d0c9e70d6 | ||
|
|
131d8f743c | ||
|
|
23067a3477 | ||
|
|
c7958e9f67 | ||
|
|
d9ee532e07 | ||
|
|
1d5184b30e | ||
|
|
a27b6aa96e | ||
|
|
112149c8e5 | ||
|
|
45a6d499ec | ||
|
|
813110e681 | ||
|
|
f4a48bd996 | ||
|
|
f1590c832e | ||
|
|
d6cafeab4d | ||
|
|
c047b544c1 | ||
|
|
82dbaac35d | ||
|
|
e8d4107b11 | ||
|
|
1b96b3956b | ||
|
|
81c36c4db0 | ||
|
|
355564cd77 | ||
|
|
17b5d5946b | ||
|
|
ed5a62397d | ||
|
|
2a34d3703b | ||
|
|
3f5248be4c | ||
|
|
59e127f89a |
19
.github/workflows/readme-progress.yml
vendored
19
.github/workflows/readme-progress.yml
vendored
@@ -2,6 +2,8 @@ name: README progress
|
||||
|
||||
# runs on the self-hosted runner on cole's server so it doesn't use hosted minutes.
|
||||
# only push/schedule/manual triggers, never pull_request, so fork PRs can't reach this machine.
|
||||
# README progress is written inside each landing commit by the orchestrator, so this job never commits;
|
||||
# it only rebuilds and publishes the current numbers to the job summary.
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -15,7 +17,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
progress:
|
||||
@@ -48,15 +50,8 @@ jobs:
|
||||
- name: Report
|
||||
run: build/tools/objdiff-cli report generate -p . -o build/43U/report.json -f json
|
||||
|
||||
- name: Update README
|
||||
run: python3 tools/update_readme_progress.py build/43U/report.json README.md "$GITHUB_SHA"
|
||||
|
||||
- name: Commit
|
||||
- name: Summary
|
||||
run: |
|
||||
if git diff --quiet README.md; then exit 0; fi
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add README.md
|
||||
git commit -m "docs: update progress [skip ci]"
|
||||
git pull --rebase origin main || { git rebase --abort; echo "main moved, next run will update"; exit 0; }
|
||||
git push origin HEAD:main
|
||||
python3 tools/update_readme_progress.py build/43U/report.json README.md "$GITHUB_SHA"
|
||||
sed -n '/progress:start/,/progress:end/p' README.md >> "$GITHUB_STEP_SUMMARY"
|
||||
git checkout -- README.md
|
||||
|
||||
170
AGENTS.md
170
AGENTS.md
@@ -78,6 +78,12 @@ Helper tools live in `tools/decomp-assist/`:
|
||||
between your object and the original. This is the main iteration loop.
|
||||
- `disasm_fn.py <object> <symbol>` — disassembly with relocation-resolved call
|
||||
names, so you can see which real functions are being called.
|
||||
- `literal_reference_diff.py [unit ...]` — advisory check of actual narrow-string
|
||||
bytes passed at corresponding calls, including addresses derived from a shared
|
||||
data base. Defaults to functions scored 100% in the live report; use
|
||||
`--all-functions` to include other equal-sized functions. Inspect every
|
||||
candidate against the assembly. This does not follow mutable pointer globals,
|
||||
infer compiler aliases, or prove complete data matching; skips are reported.
|
||||
- `pool_diff.py` — diffs the string pool in `.data` between your object and the
|
||||
original, string by string. See below; this is the highest-signal tool.
|
||||
- `export_pyghidra.py` — regenerates `ghidra_decomp.txt`, decompiled C for the
|
||||
@@ -164,9 +170,8 @@ This repository targets only Wii Menu 4.3U. Do not configure or build 43E,
|
||||
43J, or 43K while doing matching work.
|
||||
|
||||
Most workers should pursue exact matching or safe linking; assign the remainder
|
||||
to decompilation. Keep up to 75 live workers when the runtime allows it, while
|
||||
reserving capacity for fixer and validation workers. Fill completed slots with
|
||||
disjoint tasks. Never duplicate a source file or function
|
||||
to decompilation. Keep every worker slot busy (currently four Codex slots; see
|
||||
"Orchestrator loop" below). Fill completed slots with disjoint tasks. Never duplicate a source file or function
|
||||
range. Workers return changed paths, exact objdiff measurements, and validation
|
||||
results. Fuzzy-only results are not accepted.
|
||||
|
||||
@@ -246,6 +251,12 @@ and merge the PR, fast-forward `origin/main`, and publish progress. If a
|
||||
candidate fails validation, return it to its worker; do not fix the candidate
|
||||
inline in the orchestrator.
|
||||
|
||||
Two exceptions, both set by the human: once a leaf has failed at `max` effort
|
||||
(see the effort scale below) the orchestrator itself takes a crack at it, and
|
||||
the orchestrator may finish PRs whose authors are gone (rebase, drop a
|
||||
forbidden pattern, close with evidence). Record every such attempt in the
|
||||
policy log, including the ones that fail.
|
||||
|
||||
A new thread must begin by reading this file, checking the live 43U report and
|
||||
remote branch, and dispatching the worker pool. The parent must not claim a
|
||||
match without fresh independent verification.
|
||||
@@ -320,6 +331,159 @@ Linked: <percent> | Fuzzy: <percent> | Data: <percent>
|
||||
Do not report stale values, unmerged PR results, or add other text to that
|
||||
update. Continue all required verification and coordination silently.
|
||||
|
||||
## Orchestrator loop (Claude orchestrator, Codex workers)
|
||||
|
||||
This is the loop currently in use. One Claude session is the orchestrator.
|
||||
It does not spawn Claude subagents. All decompilation work goes to Codex CLI
|
||||
workers running `gpt-6.1-sol`. The orchestrator assigns leaves, verifies,
|
||||
lands, reviews outside PRs, and only decompiles by hand in the cases listed
|
||||
under the ownership boundary above.
|
||||
|
||||
Only one orchestrator session may run at a time. If a second session resumes
|
||||
the same thread (for example, the same session opened in two windows), close
|
||||
one of them. Two orchestrators double-merge PRs and fight over the shared
|
||||
build tree.
|
||||
|
||||
### Worker slots and the effort scale
|
||||
|
||||
Run four worker slots, each in its own worktree on a fresh branch from
|
||||
`origin/main`. Every slot gets a disjoint set of three or four leaves (units),
|
||||
closest-to-matching first. A slot starts at `medium` (or `low`) reasoning
|
||||
effort and escalates only when a round produces no new exact function:
|
||||
|
||||
```
|
||||
low/medium -> high -> xhigh -> max -> orchestrator attempt -> parked
|
||||
```
|
||||
|
||||
A round that gains at least one exact function is landed, and the remaining
|
||||
functions go out again at the same effort or one step up. A set that fails at
|
||||
`max` goes to the orchestrator. If the orchestrator also fails, the function
|
||||
is parked as a compiler tie-break with its evidence. Fill freed slots from the
|
||||
live checklist right away; never leave a slot idle.
|
||||
|
||||
Before starting a function, a worker fetches `origin/main` and checks it is
|
||||
not already matched. Outside contributors land work in parallel, and
|
||||
duplicated matches waste a round.
|
||||
|
||||
### Silent mode for workers
|
||||
|
||||
Workers run unattended and must not talk. Every turn is tool calls only: no
|
||||
plans, no progress notes, no summaries. Progress goes into an attempts log
|
||||
file in `tools/decomp-assist/`. The only text message in a run is the final
|
||||
report, at most 8-15 short lines:
|
||||
|
||||
- exact functions per unit, before and after;
|
||||
- the final `GATE` line;
|
||||
- commit hashes;
|
||||
- a link to the attempts log.
|
||||
|
||||
Runs are audited for text messages, and any chatter is a contract
|
||||
violation. Workers also must not push, open PRs, merge, rebase, touch other
|
||||
worktrees, or spawn subagents.
|
||||
|
||||
Each worker prompt has this layout:
|
||||
|
||||
1. the `<task>` block (leaves, current exact counts, method, report format);
|
||||
2. the shared `common.md` block with `<silent_mode>`, `<forbidden>`,
|
||||
`<method>` and `<definition_of_done>`.
|
||||
|
||||
Resume a stalled worker on the same session with the failure evidence. Don't
|
||||
replace it with a fresh one.
|
||||
|
||||
### Gate, landing and review
|
||||
|
||||
- `gate.py <unit...>` is the acceptance check for workers and for outside
|
||||
PRs. It covers:
|
||||
- a full 4.3U build and the DOL SHA1;
|
||||
- per-unit objdiff and instruction-exact counts;
|
||||
- regressions against a baseline report of `origin/main`;
|
||||
- a net forbidden-pattern scan and a readability scan (auto-named
|
||||
identifiers, raw `*(T*)(p + N)` offset casts).
|
||||
- A function that disappears because it was renamed is not a regression,
|
||||
unless the unit's exact count, code or data also drops.
|
||||
- Landing a worker result builds a branch from `origin/main` with the
|
||||
worker's diff, gates it, pushes it, then opens and squash-merges a PR on
|
||||
the fork. After that it regenerates the checklist.
|
||||
- Never run two full builds in the same build tree at once.
|
||||
- Never land while the review queue is building. Both use the same
|
||||
verification worktree.
|
||||
|
||||
Outside PRs are reviewed by a daemon. It re-runs the gate on any open PR
|
||||
whose head commit changed since its last review. A PR is merged
|
||||
automatically only when all of these hold:
|
||||
|
||||
- the PR rebases cleanly;
|
||||
- the full build passes;
|
||||
- the DOL hash matches;
|
||||
- the gate passes, or its only failures are renamed-away functions;
|
||||
- the diff adds no forbidden pattern and no `.s` file.
|
||||
|
||||
Everything else is reviewed by hand:
|
||||
|
||||
- **Conflicts:** comment asking for a rebase.
|
||||
- **Forbidden patterns:** request changes with a concrete honest
|
||||
alternative.
|
||||
- **"Linking" by swapping in retail assembly or pinned labels:** close and
|
||||
explain.
|
||||
- **Proven split/ownership corrections** (relocation evidence, total data
|
||||
unchanged): merge even if one unit's numbers move to its neighbour.
|
||||
|
||||
Policy additions learned in this loop:
|
||||
|
||||
- Linking a unit by building the retail `.s` instead of its C/C++ is
|
||||
forbidden. "Linked" means the C/C++ itself compiles to the exact bytes.
|
||||
- Definition-level `volatile` (on the field or object declaration) is allowed
|
||||
when the target proves it, e.g. back-to-back reloads with no store in
|
||||
between. Check that it changes no other function in the units that use it.
|
||||
Use-site volatile casts and the `register` keyword stay forbidden.
|
||||
|
||||
### Handoff: where the loop lives
|
||||
|
||||
The loop's tools and state live outside the repository, in the author's
|
||||
workers directory `/mnt/drive2/projects/wii-ipl-workers` (`$W` below). A new
|
||||
orchestrator thread picks up from there.
|
||||
|
||||
Tools in `$W/_restore0928-tools/`:
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `gate.py <unit...> [--base origin/main] [--quick]` | the acceptance gate; `--quick` only skips the clean `rm -rf build/43U` |
|
||||
| `land.sh <name> <worktree> merge-base <unit...> <title>` | gate a worker's diff on a fresh branch, push, open and squash-merge the PR |
|
||||
| `luna.sh <worktree> <name> <prompt> <effort> [session]` | start (or resume) one Codex worker; run with `MODEL=gpt-6.1-sol CODEX_BIN=$W/_codex159/bin/codex` |
|
||||
| `reviewd.sh` | review daemon: queues every open PR whose head changed |
|
||||
| `revq.sh`, `automerge.py` | the daemon's gate runner and merge decision |
|
||||
| `checklist.py` | regenerates `$W/CHECKLIST.md` from a report |
|
||||
| `chatter.py <run-prefix>` | counts worker text messages for the silent-mode audit |
|
||||
| `baseline-<sha8>.json` | objdiff reports of past `origin/main` commits, used for regressions |
|
||||
|
||||
State:
|
||||
|
||||
- `$W/_luna-runs/prompts/`: worker prompts. `common.md` is shared; each
|
||||
task is `<name>.task.md`, and the launched prompt is `<name>.md` = task +
|
||||
common.
|
||||
- `$W/_luna-runs/<name>.<time>.jsonl` and `.last.md`: worker transcript and
|
||||
final report.
|
||||
- `$W/_luna-runs/effort-policy.txt`: the policy log. Records escalations,
|
||||
parked functions, and every orchestrator attempt with what was tried.
|
||||
- `$W/CHECKLIST.md`: units with non-exact code, worst first.
|
||||
- Worktrees: `verify-fix` is the only verification and landing tree;
|
||||
`sol-low`, `sol-med`, `sol-high` and `w0929-fix-board` are the four worker
|
||||
slots; `orch` is orchestrator scratch.
|
||||
- Logs: `/tmp/reviewd.log`, `/tmp/vfq.log` (current review batch) and
|
||||
`/tmp/automerge.log` (merge decisions). These are lost on reboot, which
|
||||
only means open PRs get reviewed again.
|
||||
- `/tmp/wii-git.lock`: every `git fetch` or checkout in a shared worktree
|
||||
runs under `flock` on this file, because worktrees share refs.
|
||||
|
||||
To pick up the loop:
|
||||
|
||||
1. Make sure no other orchestrator session is running.
|
||||
2. Check `pgrep -af "reviewd.sh|luna.sh|land.sh"` and restart the review
|
||||
daemon if it isn't running.
|
||||
3. Read the newest `.last.md` for each slot. Land gains, then relaunch the
|
||||
slot per the effort scale.
|
||||
4. Handle every `NEEDS REVIEW` line in `/tmp/automerge.log`.
|
||||
|
||||
## Goal completion contract
|
||||
|
||||
The decompilation loop does not stop after a successful wave, a convenient
|
||||
|
||||
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 98.27% | 85.37% | 59.71% | 90.53% |
|
||||
| 99.59% | 90.81% | 71.43% | 99.37% |
|
||||
|
||||
units 805/1027 complete, functions 12090/12563 matched.
|
||||
units 956/1027 complete, functions 12365/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 -->
|
||||
|
||||
@@ -11,6 +11,8 @@ splits: 'config/43U/splits.txt'
|
||||
ldscript_template: 'config/ldscript_ipl2.lcf'
|
||||
|
||||
force_active:
|
||||
- SOGetSockOpt
|
||||
- SOSetInterfaceOpt
|
||||
- fprintf
|
||||
- leap_days
|
||||
- __msl_time2tm
|
||||
@@ -29,8 +31,8 @@ force_active:
|
||||
- strspn
|
||||
- strcspn
|
||||
- padding__Q23ipl5scene
|
||||
- lbl_81695063
|
||||
- lbl_81695067
|
||||
- scRsnOuiPad
|
||||
- scWpaOuiPad
|
||||
- __vt__Q49textinput6extend4memo19NigaoeEventObserver
|
||||
|
||||
# textinput::toolbar::csPaneToAnimation points one past the end of csAninationFile.
|
||||
|
||||
@@ -688,13 +688,13 @@ src/scene/memoryCard/iplMemoryCard.cpp:
|
||||
.text start:0x813C9DCC end:0x813CC1FC
|
||||
.rodata start:0x81610368 end:0x81610480
|
||||
.data start:0x81651D30 end:0x81652640
|
||||
.sdata2 start:0x81694A68 end:0x81694A80
|
||||
.sdata2 start:0x81694A68 end:0x81694A78
|
||||
.sdata start:0x81696C78 end:0x81696CA0
|
||||
|
||||
src/scene/memoryCard/iplMemoryCardBase.cpp:
|
||||
.text start:0x813CC1FC end:0x813CD034
|
||||
.data start:0x81652640 end:0x816526D0
|
||||
.sdata2 start:0x81694A80 end:0x81694A88
|
||||
.sdata2 start:0x81694A78 end:0x81694A88
|
||||
|
||||
src/scene/memoryCard/iplMemoryCardManager.cpp:
|
||||
.text start:0x813CD034 end:0x813CE548
|
||||
@@ -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
|
||||
@@ -869,11 +869,12 @@ src/scene/setting/iplUSBAP.cpp:
|
||||
.bss start:0x810BC148 end:0x810BD498
|
||||
.text start:0x813FC520 end:0x813FC8FC
|
||||
.data start:0x81657B08 end:0x81657B18
|
||||
.sbss start:0x81698C08 end:0x81698C28
|
||||
.sbss start:0x81698C08 end:0x81698C20
|
||||
|
||||
src/scene/setting/iplUSBAPThread.cpp:
|
||||
.text start:0x813FC8FC end:0x813FCA0C
|
||||
.data start:0x81657B18 end:0x81657B60
|
||||
.sbss start:0x81698C20 end:0x81698C28
|
||||
|
||||
src/scene/setting/iplAOSSThread.cpp:
|
||||
.bss start:0x810BD498 end:0x810BD4A8
|
||||
@@ -1111,7 +1112,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 +1139,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 +1406,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 +1418,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
|
||||
@@ -3550,12 +3552,12 @@ libs/RVL_SDK/src/bte/l2c_csm.c:
|
||||
|
||||
libs/RVL_SDK/src/bte/l2c_link.c:
|
||||
.text start:0x815AC630 end:0x815AD7BC
|
||||
.data start:0x8168E930 end:0x8168EB68
|
||||
.data start:0x8168E930 end:0x8168EBA0
|
||||
|
||||
libs/RVL_SDK/src/bte/l2c_main.c:
|
||||
.bss start:0x811725E0 end:0x81172DC8
|
||||
.text start:0x815AD7BC end:0x815AE7EC
|
||||
.data start:0x8168EB68 end:0x8168EEA0
|
||||
.data start:0x8168EBA0 end:0x8168EEA0
|
||||
|
||||
libs/RVL_SDK/src/bte/l2c_utils.c:
|
||||
.text start:0x815AE7EC end:0x815B06B0
|
||||
@@ -4192,11 +4194,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
304
configure.py
304
configure.py
@@ -689,7 +689,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("sound", [
|
||||
Object(NonMatching, "sound/iplSound.cpp"),
|
||||
Object(Matching, "sound/iplSound.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("iplwww", [
|
||||
@@ -738,11 +738,11 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("board", [
|
||||
Object(Equivalent, "scene/board/iplBoard.cpp"),
|
||||
Object(Matching, "scene/board/iplBoard.cpp"),
|
||||
Object(Matching, "scene/board/iplBoardObject.cpp"),
|
||||
Object(Matching, "scene/board/iplBoardSD.cpp"),
|
||||
Object(Matching, "scene/board/iplUrlProcessor.cpp"),
|
||||
Object(Equivalent, "scene/board/iplFocusObject.cpp"),
|
||||
Object(Matching, "scene/board/iplFocusObject.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("button", [
|
||||
@@ -772,7 +772,7 @@ config.libs = [
|
||||
]
|
||||
),
|
||||
IPLSection("channelTitle", [
|
||||
Object(Equivalent, "scene/channelTitle/iplChannelTitle.cpp"),
|
||||
Object(Matching, "scene/channelTitle/iplChannelTitle.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("faceSelect", [
|
||||
@@ -812,11 +812,11 @@ 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"),
|
||||
Object(Matching, "scene/memoryCard/iplGCWindow.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("textBalloon", [
|
||||
@@ -850,7 +850,7 @@ config.libs = [
|
||||
),
|
||||
IPLSection("sdChannelSelect", [
|
||||
Object(NonMatching, "scene/sdChannelSelect/iplSDChannelSelect.cpp"),
|
||||
Object(NonMatching, "scene/sdChannelSelect/iplSDChannelObj.cpp"),
|
||||
Object(Matching, "scene/sdChannelSelect/iplSDChannelObj.cpp"),
|
||||
]
|
||||
),
|
||||
IPLSection("sdChannelTitle", [
|
||||
@@ -869,15 +869,15 @@ config.libs = [
|
||||
),
|
||||
IPLSection("setting", [
|
||||
Object(NonMatching, "scene/setting/iplSetting.cpp"),
|
||||
Object(NonMatching, "scene/setting/iplSensitivity.cpp"),
|
||||
Object(Matching, "scene/setting/iplSensitivity.cpp"),
|
||||
Object(Matching, "scene/setting/iplNCDSetting.cpp"),
|
||||
Object(Matching, "scene/setting/iplParental.cpp"),
|
||||
Object(Matching, "scene/setting/iplAPScanThread.cpp"),
|
||||
Object(NonMatching, "scene/setting/iplUSBAP.cpp"),
|
||||
Object(NonMatching, "scene/setting/iplUSBAPThread.cpp"),
|
||||
Object(Matching, "scene/setting/iplUSBAP.cpp"),
|
||||
Object(Matching, "scene/setting/iplUSBAPThread.cpp"),
|
||||
Object(Matching, "scene/setting/iplAOSSThread.cpp"),
|
||||
Object(NonMatching, "scene/setting/AOSSLink.c"),
|
||||
Object(NonMatching, "scene/setting/iplRakuRakuThread.cpp"),
|
||||
Object(Matching, "scene/setting/iplRakuRakuThread.cpp"),
|
||||
Object(NonMatching, "scene/setting/AOSS.c", extra_cflags=["-O4,p", "-inline off"]),
|
||||
Object(NonMatching, "scene/setting/ATERM.c", extra_cflags=["-O4,p", "-inline off"]),
|
||||
]
|
||||
@@ -901,7 +901,7 @@ config.libs = [
|
||||
),
|
||||
IPLSection("bannerSound", [
|
||||
Object(Matching, "bannerSound/AudioWavePlayer.cpp"),
|
||||
Object(Equivalent, "bannerSound/AxAdpcmPlayer.cpp"),
|
||||
Object(Matching, "bannerSound/AxAdpcmPlayer.cpp"),
|
||||
Object(Matching, "bannerSound/BannerSoundPlayer.cpp"),
|
||||
Object(Matching, "bannerSound/AudioWaveUtility.cpp"),
|
||||
]
|
||||
@@ -918,23 +918,23 @@ 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/tiKeyboard.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),
|
||||
Object(Matching, "keyboard/tiPkData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
|
||||
Object(Matching, "keyboard/tiLanguageIndependentData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
|
||||
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/MyTiManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/MyTiInputForm.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"]),
|
||||
Object(NonMatching, "keyboard/tiHKBManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiHwKeyboard.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiHKBManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiHwKeyboard.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiLayout.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiLayoutGather.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiKoreanInput.cpp", extra_cflags=["-O4,p"]), # for 4.3K
|
||||
@@ -987,9 +987,9 @@ 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/zi8dawg.c"),
|
||||
Object(Matching, "clib/zi8getc.c"),
|
||||
Object(NonMatching, "clib/zi8getc2.c"),
|
||||
Object(Matching, "clib/zi8getSW.c"),
|
||||
@@ -1004,8 +1004,8 @@ config.libs = [
|
||||
Object(Matching, "clib/zi8ver.c"),
|
||||
Object(Matching, "clib/zi8ZHuwd.c"),
|
||||
Object(NonMatching, "clib/zidawg1.c"),
|
||||
Object(NonMatching, "clib/zikorean.c"),
|
||||
Object(NonMatching, "clib/ziswordw.c"),
|
||||
Object(Matching, "clib/zikorean.c"),
|
||||
Object(Matching, "clib/ziswordw.c"),
|
||||
Object(NonMatching, "clib/zkokeyp.c"),
|
||||
Object(Matching, "clib/zierror.c"),
|
||||
Object(NonMatching, "clib/zmtkey.c"),
|
||||
@@ -1025,7 +1025,7 @@ config.libs = [
|
||||
Object(NonMatching, "cdb/CDBRecord.c"),
|
||||
Object(Matching, "cdb/CDBRecordFile.c"),
|
||||
Object(Matching, "cdb/CDBRecordKey.c"),
|
||||
Object(NonMatching, "cdb/CDBIntArray.c"),
|
||||
Object(Matching, "cdb/CDBIntArray.c"),
|
||||
Object(Matching, "cdb/CDBSystem.c"),
|
||||
Object(Matching, "cdb/CDBAttr.c"),
|
||||
Object(Matching, "cdb/CDBFBridge.c"),
|
||||
@@ -1044,9 +1044,9 @@ config.libs = [
|
||||
Object(Matching, "net/nettime.c"),
|
||||
Object(Matching, "net/crc.c"),
|
||||
Object(NonMatching, "net/md5.c"),
|
||||
Object(NonMatching, "net/sha1.c"),
|
||||
Object(NonMatching, "net/hmac.c"),
|
||||
Object(NonMatching, "net/neterrorcode.c"),
|
||||
Object(Matching, "net/sha1.c"),
|
||||
Object(Matching, "net/hmac.c"),
|
||||
Object(Matching, "net/neterrorcode.c"),
|
||||
Object(Matching, "net/NETVersion.c"),
|
||||
Object(NonMatching, "net/aes.c"),
|
||||
Object(Matching, "net/wireless_macaddr.c"),
|
||||
@@ -1060,10 +1060,10 @@ config.libs = [
|
||||
Object(NonMatching, "nhttp/NHTTP_recvbuf.c"),
|
||||
Object(Matching, "nhttp/NHTTP_request.c"),
|
||||
Object(Matching, "nhttp/NHTTP_response.c"),
|
||||
Object(NonMatching, "nhttp/NHTTP_socket_RVL.c"),
|
||||
Object(Matching, "nhttp/NHTTP_socket_RVL.c"),
|
||||
Object(NonMatching, "nhttp/NHTTP_stdlib_RVL.c"),
|
||||
Object(NonMatching, "nhttp/NHTTP_thread.c"),
|
||||
Object(NonMatching, "nhttp/d_nhttp_private.c"),
|
||||
Object(Matching, "nhttp/NHTTP_thread.c"),
|
||||
Object(Matching, "nhttp/d_nhttp_private.c"),
|
||||
Object(Matching, "nhttp/d_nhttp.c"),
|
||||
Object(Matching, "nhttp/d_nhttp_common.c"),
|
||||
]
|
||||
@@ -1075,12 +1075,12 @@ config.libs = [
|
||||
Object(Matching, "nwc24/NWC24Utils.c"),
|
||||
Object(Matching, "nwc24/NWC24Manage.c"),
|
||||
Object(Matching, "nwc24/NWC24MsgObj.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MBoxCtrl.c"),
|
||||
Object(NonMatching, "nwc24/NWC24Mime.c"),
|
||||
Object(Matching, "nwc24/NWC24MBoxCtrl.c"),
|
||||
Object(Matching, "nwc24/NWC24Mime.c"),
|
||||
Object(Matching, "nwc24/NWC24Stream.c"),
|
||||
Object(Matching, "nwc24/NWC24Parser.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MsgCommit.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MsgRead.c"),
|
||||
Object(Matching, "nwc24/NWC24MsgCommit.c"),
|
||||
Object(Matching, "nwc24/NWC24MsgRead.c"),
|
||||
Object(NonMatching, "nwc24/NWC24MsgSubject.c"),
|
||||
Object(Matching, "nwc24/NWC24Schedule.c"),
|
||||
Object(NonMatching, "nwc24/NWC24DateParser.c"),
|
||||
@@ -1097,8 +1097,8 @@ config.libs = [
|
||||
RevoEXLib("so", [
|
||||
Object(Matching, "so/SOCommon.c"),
|
||||
Object(NonMatching, "so/SOBasic.c"),
|
||||
Object(NonMatching, "so/SOInformation.c"),
|
||||
Object(NonMatching, "so/SOOption.c"),
|
||||
Object(Matching, "so/SOInformation.c"),
|
||||
Object(Matching, "so/SOOption.c"),
|
||||
]
|
||||
),
|
||||
RevoEXLib("ssl", [
|
||||
@@ -1212,7 +1212,7 @@ config.libs = [
|
||||
Object(NonMatching, "exif/exif_parse.c"),
|
||||
|
||||
Object(Matching, "reschange/iqdec_resolution_change_a3.c"),
|
||||
Object(NonMatching, "reschange/idct_resolution_change_var.c"),
|
||||
Object(Matching, "reschange/idct_resolution_change_var.c"),
|
||||
|
||||
Object(NonMatching, "texturecvtr/Texture_MCUtoY8U8V8.c"),
|
||||
Object(NonMatching, "texturecvtr/Texture_MCUtoRGB565.c"),
|
||||
@@ -1453,7 +1453,7 @@ config.libs = [
|
||||
Object(Matching, "axfx/AXFXReverbStd.c"),
|
||||
Object(Matching, "axfx/AXFXReverbStdExp.c"),
|
||||
Object(Matching, "axfx/AXFXChorus.c"),
|
||||
Object(NonMatching, "axfx/AXFXChorusExp.c"),
|
||||
Object(Matching, "axfx/AXFXChorusExp.c"),
|
||||
Object(Matching, "axfx/AXFXLfoTable.c"),
|
||||
Object(Matching, "axfx/AXFXSrcCoef.c"),
|
||||
Object(Matching, "axfx/AXFXHooks.c"),
|
||||
@@ -1687,144 +1687,144 @@ config.libs = [
|
||||
Object(Matching, "fa/pf_service.c"),
|
||||
Object(Matching, "fa/pf_str.c"),
|
||||
Object(Matching, "fa/pf_driver.c"),
|
||||
Object(NonMatching, "fa/pdm_api.c"),
|
||||
Object(NonMatching, "fa/pdm_bpb.c"),
|
||||
Object(NonMatching, "fa/pdm_disk.c"),
|
||||
Object(Matching, "fa/pdm_api.c"),
|
||||
Object(Matching, "fa/pdm_bpb.c"),
|
||||
Object(Matching, "fa/pdm_disk.c"),
|
||||
Object(NonMatching, "fa/pdm_partition.c"),
|
||||
Object(NonMatching, "fa/pf_cache.c"),
|
||||
Object(NonMatching, "fa/pf_cluster.c"),
|
||||
Object(NonMatching, "fa/pf_dir.c"),
|
||||
Object(Matching, "fa/pf_cluster.c"),
|
||||
Object(Matching, "fa/pf_dir.c"),
|
||||
Object(Matching, "fa/pf_entry.c"),
|
||||
Object(NonMatching, "fa/pf_entry_iterator.c"),
|
||||
Object(NonMatching, "fa/pf_fat.c"),
|
||||
Object(NonMatching, "fa/pf_fat12.c"),
|
||||
Object(NonMatching, "fa/pf_fat16.c"),
|
||||
Object(NonMatching, "fa/pf_fat32.c"),
|
||||
Object(Matching, "fa/pf_entry_iterator.c"),
|
||||
Object(Matching, "fa/pf_fat.c"),
|
||||
Object(Matching, "fa/pf_fat12.c"),
|
||||
Object(Matching, "fa/pf_fat16.c"),
|
||||
Object(Matching, "fa/pf_fat32.c"),
|
||||
Object(Matching, "fa/pf_fatfs.c"),
|
||||
Object(NonMatching, "fa/pf_file.c"),
|
||||
Object(NonMatching, "fa/pf_path.c"),
|
||||
Object(NonMatching, "fa/pf_sector.c"),
|
||||
Object(NonMatching, "fa/pf_volume.c"),
|
||||
Object(NonMatching, "fa/pf_volume_apiadd.c"),
|
||||
Object(NonMatching, "fa/pf_cp932.c"),
|
||||
Object(Matching, "fa/pf_file.c"),
|
||||
Object(Matching, "fa/pf_path.c"),
|
||||
Object(Matching, "fa/pf_sector.c"),
|
||||
Object(Matching, "fa/pf_volume.c"),
|
||||
Object(Matching, "fa/pf_volume_apiadd.c"),
|
||||
Object(Matching, "fa/pf_cp932.c"),
|
||||
Object(Matching, "fa/pf_api_util.c"),
|
||||
Object(Matching, "fa/pf_attach.c"),
|
||||
Object(NonMatching, "fa/pf_buffering.c"),
|
||||
Object(NonMatching, "fa/pf_cdelete.c"),
|
||||
Object(NonMatching, "fa/pf_chdir.c"),
|
||||
Object(NonMatching, "fa/pf_chdmod.c"),
|
||||
Object(NonMatching, "fa/pf_chmod.c"),
|
||||
Object(NonMatching, "fa/pf_cinsert.c"),
|
||||
Object(Matching, "fa/pf_buffering.c"),
|
||||
Object(Matching, "fa/pf_cdelete.c"),
|
||||
Object(Matching, "fa/pf_chdir.c"),
|
||||
Object(Matching, "fa/pf_chdmod.c"),
|
||||
Object(Matching, "fa/pf_chmod.c"),
|
||||
Object(Matching, "fa/pf_cinsert.c"),
|
||||
Object(Matching, "fa/pf_closedir.c"),
|
||||
Object(NonMatching, "fa/pf_combine.c"),
|
||||
Object(NonMatching, "fa/pf_create.c"),
|
||||
Object(NonMatching, "fa/pf_createdir.c"),
|
||||
Object(NonMatching, "fa/pf_cut.c"),
|
||||
Object(NonMatching, "fa/pf_derrnum.c"),
|
||||
Object(Matching, "fa/pf_combine.c"),
|
||||
Object(Matching, "fa/pf_create.c"),
|
||||
Object(Matching, "fa/pf_createdir.c"),
|
||||
Object(Matching, "fa/pf_cut.c"),
|
||||
Object(Matching, "fa/pf_derrnum.c"),
|
||||
Object(Matching, "fa/pf_detach.c"),
|
||||
Object(NonMatching, "fa/pf_divide.c"),
|
||||
Object(Matching, "fa/pf_divide.c"),
|
||||
Object(Matching, "fa/pf_errnum.c"),
|
||||
Object(NonMatching, "fa/pf_fadjust.c"),
|
||||
Object(NonMatching, "fa/pf_fappend.c"),
|
||||
Object(NonMatching, "fa/pf_fchdir.c"),
|
||||
Object(Matching, "fa/pf_fadjust.c"),
|
||||
Object(Matching, "fa/pf_fappend.c"),
|
||||
Object(Matching, "fa/pf_fchdir.c"),
|
||||
Object(Matching, "fa/pf_fclose.c"),
|
||||
Object(NonMatching, "fa/pf_fconcat.c"),
|
||||
Object(Matching, "fa/pf_fconcat.c"),
|
||||
Object(Matching, "fa/pf_feof.c"),
|
||||
Object(Matching, "fa/pf_ferror.c"),
|
||||
Object(NonMatching, "fa/pf_finfo.c"),
|
||||
Object(Matching, "fa/pf_finfo.c"),
|
||||
Object(Matching, "fa/pf_flock.c"),
|
||||
Object(Matching, "fa/pf_fopen.c"),
|
||||
Object(NonMatching, "fa/pf_format.c"),
|
||||
Object(Matching, "fa/pf_format.c"),
|
||||
Object(Matching, "fa/pf_fread.c"),
|
||||
Object(Matching, "fa/pf_fseek.c"),
|
||||
Object(NonMatching, "fa/pf_fsetclstlink.c"),
|
||||
Object(NonMatching, "fa/pf_fsexec.c"),
|
||||
Object(Matching, "fa/pf_fsetclstlink.c"),
|
||||
Object(Matching, "fa/pf_fsexec.c"),
|
||||
Object(Matching, "fa/pf_fsfirst.c"),
|
||||
Object(Matching, "fa/pf_fsnext.c"),
|
||||
Object(Matching, "fa/pf_fstat.c"),
|
||||
Object(Matching, "fa/pf_fsync.c"),
|
||||
Object(Matching, "fa/pf_fwrite.c"),
|
||||
Object(NonMatching, "fa/pf_getdev.c"),
|
||||
Object(NonMatching, "fa/pf_getvol.c"),
|
||||
Object(NonMatching, "fa/pf_getvolcfg.c"),
|
||||
Object(NonMatching, "fa/pf_init_prfile2.c"),
|
||||
Object(NonMatching, "fa/pf_insert.c"),
|
||||
Object(NonMatching, "fa/pf_iswriteprotected.c"),
|
||||
Object(Matching, "fa/pf_getdev.c"),
|
||||
Object(Matching, "fa/pf_getvol.c"),
|
||||
Object(Matching, "fa/pf_getvolcfg.c"),
|
||||
Object(Matching, "fa/pf_init_prfile2.c"),
|
||||
Object(Matching, "fa/pf_insert.c"),
|
||||
Object(Matching, "fa/pf_iswriteprotected.c"),
|
||||
Object(Matching, "fa/pf_mkdir.c"),
|
||||
Object(Matching, "fa/pf_mount.c"),
|
||||
Object(NonMatching, "fa/pf_move.c"),
|
||||
Object(Matching, "fa/pf_move.c"),
|
||||
Object(Matching, "fa/pf_opendir.c"),
|
||||
Object(Matching, "fa/pf_readdir.c"),
|
||||
Object(NonMatching, "fa/pf_regctx.c"),
|
||||
Object(Matching, "fa/pf_regctx.c"),
|
||||
Object(Matching, "fa/pf_remove.c"),
|
||||
Object(Matching, "fa/pf_rename.c"),
|
||||
Object(Matching, "fa/pf_rewinddir.c"),
|
||||
Object(Matching, "fa/pf_rmdir.c"),
|
||||
Object(NonMatching, "fa/pf_rmvvol.c"),
|
||||
Object(Matching, "fa/pf_rmvvol.c"),
|
||||
Object(Matching, "fa/pf_seekdir.c"),
|
||||
Object(NonMatching, "fa/pf_setclstlink.c"),
|
||||
Object(NonMatching, "fa/pf_setcode.c"),
|
||||
Object(NonMatching, "fa/pf_setencode.c"),
|
||||
Object(NonMatching, "fa/pf_settailbuf.c"),
|
||||
Object(NonMatching, "fa/pf_setupfsi.c"),
|
||||
Object(NonMatching, "fa/pf_setvol.c"),
|
||||
Object(NonMatching, "fa/pf_setvolcfg.c"),
|
||||
Object(NonMatching, "fa/pf_sync.c"),
|
||||
Object(Matching, "fa/pf_setclstlink.c"),
|
||||
Object(Matching, "fa/pf_setcode.c"),
|
||||
Object(Matching, "fa/pf_setencode.c"),
|
||||
Object(Matching, "fa/pf_settailbuf.c"),
|
||||
Object(Matching, "fa/pf_setupfsi.c"),
|
||||
Object(Matching, "fa/pf_setvol.c"),
|
||||
Object(Matching, "fa/pf_setvolcfg.c"),
|
||||
Object(Matching, "fa/pf_sync.c"),
|
||||
Object(Matching, "fa/pf_telldir.c"),
|
||||
Object(Matching, "fa/pf_unmount.c"),
|
||||
Object(NonMatching, "fa/pf_unregctx.c"),
|
||||
Object(NonMatching, "fa/pf_xdivide.c"),
|
||||
Object(Matching, "fa/pf_unregctx.c"),
|
||||
Object(Matching, "fa/pf_xdivide.c"),
|
||||
Object(Matching, "fa/pf_w_api_util.c"),
|
||||
Object(NonMatching, "fa/pf_w_cdelete.c"),
|
||||
Object(NonMatching, "fa/pf_w_chdir.c"),
|
||||
Object(NonMatching, "fa/pf_w_chdmod.c"),
|
||||
Object(NonMatching, "fa/pf_w_chmod.c"),
|
||||
Object(NonMatching, "fa/pf_w_cinsert.c"),
|
||||
Object(NonMatching, "fa/pf_w_combine.c"),
|
||||
Object(NonMatching, "fa/pf_w_create.c"),
|
||||
Object(NonMatching, "fa/pf_w_createdir.c"),
|
||||
Object(NonMatching, "fa/pf_w_cut.c"),
|
||||
Object(NonMatching, "fa/pf_w_divide.c"),
|
||||
Object(NonMatching, "fa/pf_w_fconcat.c"),
|
||||
Object(NonMatching, "fa/pf_w_fopen.c"),
|
||||
Object(NonMatching, "fa/pf_w_fsexec.c"),
|
||||
Object(NonMatching, "fa/pf_w_fsfirst.c"),
|
||||
Object(NonMatching, "fa/pf_w_fsnext.c"),
|
||||
Object(NonMatching, "fa/pf_w_fstat.c"),
|
||||
Object(NonMatching, "fa/pf_w_insert.c"),
|
||||
Object(NonMatching, "fa/pf_w_mkdir.c"),
|
||||
Object(NonMatching, "fa/pf_w_move.c"),
|
||||
Object(NonMatching, "fa/pf_w_opendir.c"),
|
||||
Object(NonMatching, "fa/pf_w_remove.c"),
|
||||
Object(NonMatching, "fa/pf_w_rename.c"),
|
||||
Object(NonMatching, "fa/pf_w_rmdir.c"),
|
||||
Object(NonMatching, "fa/pf_w_xdivide.c"),
|
||||
Object(NonMatching, "fa/pf_filelock.c"),
|
||||
Object(NonMatching, "fa/pf_stub.c"),
|
||||
Object(NonMatching, "fa/pf_system.c"),
|
||||
Object(NonMatching, "fa/pf_stub_standard.c"),
|
||||
Object(NonMatching, "fa/pfs_attach.c"),
|
||||
Object(NonMatching, "fa/pfs_buffering.c"),
|
||||
Object(NonMatching, "fa/pfs_create.c"),
|
||||
Object(NonMatching, "fa/pfs_createdir.c"),
|
||||
Object(NonMatching, "fa/pfs_detach.c"),
|
||||
Object(NonMatching, "fa/pfs_errnum.c"),
|
||||
Object(NonMatching, "fa/pfs_fclose.c"),
|
||||
Object(NonMatching, "fa/pfs_finfot.c"),
|
||||
Object(NonMatching, "fa/pfs_fopen.c"),
|
||||
Object(NonMatching, "fa/pfs_format.c"),
|
||||
Object(NonMatching, "fa/pfs_fread.c"),
|
||||
Object(NonMatching, "fa/pfs_fseek.c"),
|
||||
Object(NonMatching, "fa/pfs_fsfirst.c"),
|
||||
Object(NonMatching, "fa/pfs_fsnext.c"),
|
||||
Object(NonMatching, "fa/pfs_fstat.c"),
|
||||
Object(NonMatching, "fa/pfs_fwrite.c"),
|
||||
Object(NonMatching, "fa/pfs_getdev.c"),
|
||||
Object(NonMatching, "fa/pfs_init_prfile2.c"),
|
||||
Object(NonMatching, "fa/pfs_mount.c"),
|
||||
Object(NonMatching, "fa/pfs_remove.c"),
|
||||
Object(NonMatching, "fa/pfs_unmount.c"),
|
||||
Object(NonMatching, "fa/pf_stub_unicode.c"),
|
||||
Object(Matching, "fa/pf_w_cdelete.c"),
|
||||
Object(Matching, "fa/pf_w_chdir.c"),
|
||||
Object(Matching, "fa/pf_w_chdmod.c"),
|
||||
Object(Matching, "fa/pf_w_chmod.c"),
|
||||
Object(Matching, "fa/pf_w_cinsert.c"),
|
||||
Object(Matching, "fa/pf_w_combine.c"),
|
||||
Object(Matching, "fa/pf_w_create.c"),
|
||||
Object(Matching, "fa/pf_w_createdir.c"),
|
||||
Object(Matching, "fa/pf_w_cut.c"),
|
||||
Object(Matching, "fa/pf_w_divide.c"),
|
||||
Object(Matching, "fa/pf_w_fconcat.c"),
|
||||
Object(Matching, "fa/pf_w_fopen.c"),
|
||||
Object(Matching, "fa/pf_w_fsexec.c"),
|
||||
Object(Matching, "fa/pf_w_fsfirst.c"),
|
||||
Object(Matching, "fa/pf_w_fsnext.c"),
|
||||
Object(Matching, "fa/pf_w_fstat.c"),
|
||||
Object(Matching, "fa/pf_w_insert.c"),
|
||||
Object(Matching, "fa/pf_w_mkdir.c"),
|
||||
Object(Matching, "fa/pf_w_move.c"),
|
||||
Object(Matching, "fa/pf_w_opendir.c"),
|
||||
Object(Matching, "fa/pf_w_remove.c"),
|
||||
Object(Matching, "fa/pf_w_rename.c"),
|
||||
Object(Matching, "fa/pf_w_rmdir.c"),
|
||||
Object(Matching, "fa/pf_w_xdivide.c"),
|
||||
Object(Matching, "fa/pf_filelock.c"),
|
||||
Object(Matching, "fa/pf_stub.c"),
|
||||
Object(Matching, "fa/pf_system.c"),
|
||||
Object(Matching, "fa/pf_stub_standard.c"),
|
||||
Object(Matching, "fa/pfs_attach.c"),
|
||||
Object(Matching, "fa/pfs_buffering.c"),
|
||||
Object(Matching, "fa/pfs_create.c"),
|
||||
Object(Matching, "fa/pfs_createdir.c"),
|
||||
Object(Matching, "fa/pfs_detach.c"),
|
||||
Object(Matching, "fa/pfs_errnum.c"),
|
||||
Object(Matching, "fa/pfs_fclose.c"),
|
||||
Object(Matching, "fa/pfs_finfot.c"),
|
||||
Object(Matching, "fa/pfs_fopen.c"),
|
||||
Object(Matching, "fa/pfs_format.c"),
|
||||
Object(Matching, "fa/pfs_fread.c"),
|
||||
Object(Matching, "fa/pfs_fseek.c"),
|
||||
Object(Matching, "fa/pfs_fsfirst.c"),
|
||||
Object(Matching, "fa/pfs_fsnext.c"),
|
||||
Object(Matching, "fa/pfs_fstat.c"),
|
||||
Object(Matching, "fa/pfs_fwrite.c"),
|
||||
Object(Matching, "fa/pfs_getdev.c"),
|
||||
Object(Matching, "fa/pfs_init_prfile2.c"),
|
||||
Object(Matching, "fa/pfs_mount.c"),
|
||||
Object(Matching, "fa/pfs_remove.c"),
|
||||
Object(Matching, "fa/pfs_unmount.c"),
|
||||
Object(Matching, "fa/pf_stub_unicode.c"),
|
||||
|
||||
Object(NonMatching, "fa/api/FAAttach.c"),
|
||||
Object(Matching, "fa/api/FABuffering.c"),
|
||||
@@ -1851,16 +1851,16 @@ config.libs = [
|
||||
Object(Matching, "fa/api/FASetThreadPriority.c"),
|
||||
Object(Matching, "fa/api/FAUnmount.c"),
|
||||
|
||||
Object(NonMatching, "fa/kernel/pfk_api.c"),
|
||||
Object(Matching, "fa/kernel/pfk_api.c"),
|
||||
|
||||
Object(Matching, "fa/driver/nand_drv.c"),
|
||||
Object(NonMatching, "fa/driver/sd_drv.c"),
|
||||
Object(NonMatching, "fa/driver/pfd_cmn.c"),
|
||||
Object(Matching, "fa/driver/pfd_cmn.c"),
|
||||
Object(Matching, "fa/driver/msc_drv.c"),
|
||||
|
||||
Object(NonMatching, "fa/msc/puh_msc.c"),
|
||||
Object(NonMatching, "fa/msc/puh_msc_cmd.c"),
|
||||
Object(NonMatching, "fa/msc/puh_msc_blk.c"),
|
||||
Object(Matching, "fa/msc/puh_msc.c"),
|
||||
Object(Matching, "fa/msc/puh_msc_cmd.c"),
|
||||
Object(Matching, "fa/msc/puh_msc_blk.c"),
|
||||
]
|
||||
),
|
||||
RVLSDKLib("sdi", [
|
||||
@@ -1869,7 +1869,7 @@ config.libs = [
|
||||
),
|
||||
RVLSDKLib("nup", [
|
||||
Object(NonMatching, "nup/nup.cpp"),
|
||||
Object(NonMatching, "nup/nup_nhttp.cpp"),
|
||||
Object(Matching, "nup/nup_nhttp.cpp"),
|
||||
Object(Matching, "nup/nup_mem.cpp"),
|
||||
]
|
||||
),
|
||||
@@ -1887,12 +1887,12 @@ config.libs = [
|
||||
RVLSDKLib("kbd", [
|
||||
Object(NonMatching, "kbd/kbd_lib.c"),
|
||||
Object(NonMatching, "kbd/kbd_lib_map_jp.c"),
|
||||
Object(NonMatching, "kbd/kbd_lib_map_us.c"),
|
||||
Object(Matching, "kbd/kbd_lib_map_us.c"),
|
||||
Object(NonMatching, "kbd/kbd_lib_map_eu.c"),
|
||||
]
|
||||
),
|
||||
RVLSDKLib("kpr", [
|
||||
Object(NonMatching, "kpr/kpr_lib.c"),
|
||||
Object(Matching, "kpr/kpr_lib.c"),
|
||||
]
|
||||
),
|
||||
RVLSDKLib("usbkbd", [
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -37,8 +37,16 @@ namespace ipl {
|
||||
u8 unk_0x06; // 0x06
|
||||
u8 unk_0x07; // 0x07
|
||||
u8 iconFmt[8]; // 0x08
|
||||
u16 anmFrameBits; // 0x10
|
||||
#ifdef IPL_MEMORY_CARD_MANAGER_CPP
|
||||
volatile u16 anmFrameBits;
|
||||
#else
|
||||
u16 anmFrameBits;
|
||||
#endif
|
||||
#ifdef IPL_MEMORY_CARD_MANAGER_CPP
|
||||
volatile s16 anmMax;
|
||||
#else
|
||||
s16 anmMax; // 0x12
|
||||
#endif
|
||||
u32 bannerOffset; // 0x14
|
||||
u32 bannerTlutOffset; // 0x18
|
||||
u32 iconOffset[8]; // 0x1C
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -14,11 +14,17 @@ namespace textinput {
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout {
|
||||
public:
|
||||
LayoutByNW4R(nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* layoutBinName,
|
||||
EventObserver* event)
|
||||
: nw4rmanager::Layout(resAccessor, layoutBinName, event) {}
|
||||
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
LayoutByNW4R(nw4r::lyt::MultiArcResourceAccessor* multiArc, const char* layoutName, EventObserver* event)
|
||||
: nw4rmanager::Layout(multiArc, layoutName, event) {}
|
||||
#endif
|
||||
#if defined(MYTIMANAGER_MATCHING)
|
||||
virtual ~LayoutByNW4R() {}
|
||||
#elif defined(MYTIMANAGER_IMPLEMENTATION)
|
||||
virtual ~LayoutByNW4R();
|
||||
#else
|
||||
virtual ~LayoutByNW4R() {}
|
||||
#endif
|
||||
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void init();
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "tiInputForm.h"
|
||||
#include "tiString.h"
|
||||
#include "tiUtil.h"
|
||||
|
||||
#include <nw4r/lyt/pane.h>
|
||||
|
||||
@@ -21,7 +20,9 @@ namespace textinput {
|
||||
virtual void moveNigaoeButton() {}
|
||||
};
|
||||
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
class ScrollButton;
|
||||
#endif
|
||||
|
||||
class InputForm : public textinput::InputForm {
|
||||
public:
|
||||
@@ -33,24 +34,51 @@ namespace textinput {
|
||||
EM_Last
|
||||
} EditMode;
|
||||
|
||||
InputForm(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName,
|
||||
EventObserver* observer, const char* subName)
|
||||
: textinput::InputForm(manager, resAccessor, arcName, observer, subName),
|
||||
mpMemoPane(NULL), mpMemoRootPane(NULL), mpBoundPane(NULL), mpDrawPane(NULL),
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
InputForm(textinput::Manager* manager, nw4r::lyt::MultiArcResourceAccessor* multiArc,
|
||||
const char* layoutName, EventObserver* event, const char* fontName)
|
||||
: textinput::InputForm(manager, multiArc, layoutName, event, fontName),
|
||||
unk_0x308(NULL), unk_0x30C(NULL), unk_0x310(NULL), unk_0x314(NULL),
|
||||
mfScroll(0.0f), mfScrollFrom(0.0f), mfScrollTo(0.0f), mnLine(0),
|
||||
mDrawRect(0.0f, 0.0f, 0.0f, 0.0f), mDefaultDrawSize(0.0f, 0.0f), mDefaultBoundSize(0.0f, 0.0f),
|
||||
mDrawRect(), mDefaultDrawSize(), mDefaultBoundSize(), mExScrollAnm(),
|
||||
mpNigaoeObserver(NULL), mpDefaultNigaoe(NULL), mpSendString(NULL),
|
||||
mbEdited(false), mbGoodBye(false), mbEditScrollUp(false), mbEditScrollDown(false), mbCloseWithSend(false),
|
||||
mpScrollButton(NULL), mbScrollUp(false), mbScrollDown(false), meEditMode(EM_Disp) {}
|
||||
mbEdited(false), mbGoodBye(false), mbEditScrollUp(false), mbEditScrollDown(false),
|
||||
mbCloseWithSend(false), mpScrollButton(NULL), mbScrollUp(false), mbScrollDown(false),
|
||||
meEditMode(EM_Disp) {}
|
||||
#endif
|
||||
|
||||
~InputForm();
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
virtual void moveCursorUp();
|
||||
virtual void moveCursorDown();
|
||||
virtual void onCommand(INPUT_COMMAND command, void* data);
|
||||
virtual void create(MEMAllocator* allocator, inputform::EditBuffer* editBuffer);
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data);
|
||||
virtual bool updateInput(input::HKBManager& hkbManager);
|
||||
virtual void init();
|
||||
virtual void draw();
|
||||
virtual void calc();
|
||||
virtual void doScroll(Scroll* scroll);
|
||||
virtual u32 calcCursorPos(f32 x, f32 y);
|
||||
virtual void drawCursor(f32 x, f32 y);
|
||||
virtual nw4r::math::VEC2 getScale() const;
|
||||
virtual void preDraw(u32 pos);
|
||||
virtual void doLineFeed();
|
||||
virtual void finishDraw(u32 pos);
|
||||
virtual bool isInScroll();
|
||||
#endif
|
||||
|
||||
virtual void setScroll(f32 scroll);
|
||||
virtual void setAddScroll(f32 scroll, bool up, bool down);
|
||||
|
||||
virtual f32 getScroll() { return mfScroll; }
|
||||
virtual f32 getScroll() { return mfScroll; }
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
virtual f32 getScrollFrom();
|
||||
virtual f32 getScrollTo();
|
||||
#else
|
||||
virtual f32 getScrollFrom() { return mfScrollFrom; }
|
||||
virtual f32 getScrollTo() { return mfScrollTo; }
|
||||
virtual f32 getScrollTo() { return mfScrollTo; }
|
||||
#endif
|
||||
|
||||
virtual void open();
|
||||
virtual void close();
|
||||
@@ -72,7 +100,7 @@ namespace textinput {
|
||||
virtual void onArrowRTrig();
|
||||
virtual void onArrowLTrig();
|
||||
|
||||
virtual void setNigaoeEventObserver(NigaoeEventObserver* nigaoeObserver);
|
||||
virtual void setNigaoeEventObserver(NigaoeEventObserver* nigaoeObserver) { mpNigaoeObserver = nigaoeObserver; }
|
||||
virtual nw4r::lyt::Pane* getNigaoePane();
|
||||
virtual nw4r::lyt::Material* getNigaoePaneMaterial();
|
||||
|
||||
@@ -94,33 +122,6 @@ namespace textinput {
|
||||
virtual void onCommandOnEditMode(INPUT_COMMAND command, void* arg);
|
||||
|
||||
virtual void doAutoScroll();
|
||||
|
||||
#ifdef MYTIINPUTFORM_IMPLEMENTATION
|
||||
virtual void pure_0() = 0;
|
||||
virtual void pure_1() = 0;
|
||||
virtual void pure_2() = 0;
|
||||
virtual void pure_3() = 0;
|
||||
virtual void pure_4() = 0;
|
||||
virtual void pure_5() = 0;
|
||||
#endif
|
||||
|
||||
virtual void create(MEMAllocator* allocator, inputform::EditBuffer* editBuffer);
|
||||
virtual void moveCursorUp();
|
||||
virtual void moveCursorDown();
|
||||
virtual void onCommand(CommandReceiver::INPUT_COMMAND command, void* arg);
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data);
|
||||
virtual bool updateInput(textinput::input::HKBManager& hkbManager);
|
||||
virtual void init();
|
||||
virtual void draw();
|
||||
virtual void calc();
|
||||
virtual void doScroll(CommandReceiver::Scroll* scroll);
|
||||
virtual u32 calcCursorPos(f32 x, f32 y);
|
||||
virtual void drawCursor(f32 x, f32 y);
|
||||
virtual nw4r::math::VEC2 getScale() const;
|
||||
virtual void preDraw(u32);
|
||||
virtual void doLineFeed();
|
||||
virtual void finishDraw(u32);
|
||||
virtual bool isInScroll();
|
||||
|
||||
/* For letter writing */
|
||||
|
||||
@@ -130,7 +131,11 @@ namespace textinput {
|
||||
void setEditScrollDown(bool editScrollDown) { mbEditScrollUp = editScrollDown; }
|
||||
void setCloseWithSend(bool closeWithSend) { mbCloseWithSend = closeWithSend; }
|
||||
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
void setEditMode(EditMode editMode);
|
||||
#else
|
||||
void setEditMode(EditMode editMode) { meEditMode = editMode; }
|
||||
#endif
|
||||
|
||||
bool isEdited() { return mbEdited; }
|
||||
bool isGoodBye() { return mbGoodBye; }
|
||||
@@ -142,11 +147,24 @@ namespace textinput {
|
||||
|
||||
tistring::Decolated* getSendString() { return mpSendString; }
|
||||
|
||||
#ifdef MYTILETTERFORM_IMPLEMENTATION
|
||||
protected:
|
||||
nw4r::lyt::Pane* mpMemoPane; // 0x308
|
||||
nw4r::lyt::Pane* mpMemoRootPane; // 0x30C
|
||||
nw4r::lyt::Pane* mpBoundPane; // 0x310
|
||||
nw4r::lyt::Pane* mpDrawPane; // 0x314
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
nw4r::lyt::Pane* mpMemoPane;
|
||||
nw4r::lyt::Pane* mpMemoRootPane;
|
||||
nw4r::lyt::Pane* mpBoundPane;
|
||||
nw4r::lyt::Pane* mpDrawPane;
|
||||
#else
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
undefined4* unk_0x308;
|
||||
#endif
|
||||
undefined4* unk_0x30C;
|
||||
undefined4* unk_0x310;
|
||||
undefined4* unk_0x314;
|
||||
#endif
|
||||
f32 mfScroll; // 0x318
|
||||
f32 mfScrollFrom; // 0x31C
|
||||
f32 mfScrollTo; // 0x320
|
||||
@@ -158,7 +176,11 @@ namespace textinput {
|
||||
nw4r::lyt::Size mDefaultBoundSize; // 0x358
|
||||
Mtx mDrawMtx; // 0x360
|
||||
Mtx mBoundMtx; // 0x390
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
util::Animation mExScrollAnm; // 0x3C0
|
||||
#else
|
||||
u8 /*todo*/ mExScrollAnm[32]; // 0x3C0
|
||||
#endif
|
||||
NigaoeEventObserver* mpNigaoeObserver; // 0x3E0
|
||||
GXTexObj* mpDefaultNigaoe; // 0x3E4
|
||||
tistring::Decolated* mpSendString; // 0x3E8
|
||||
@@ -168,10 +190,13 @@ namespace textinput {
|
||||
bool mbEditScrollDown; // 0x3EF
|
||||
bool mbCloseWithSend; // 0x3F0
|
||||
u8 padding[3]; // 0x3F1
|
||||
ScrollButton* mpScrollButton; // 0x3F4
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
ScrollButton* mpScrollButton;
|
||||
#else
|
||||
undefined4* mpScrollButton;
|
||||
#endif
|
||||
bool mbScrollUp; // 0x3F8
|
||||
bool mbScrollDown; // 0x3F9
|
||||
u8 padding2[2]; // 0x3FA
|
||||
EditMode meEditMode; // 0x3FC
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,36 +16,42 @@ namespace textinput {
|
||||
T_Last,
|
||||
} Type;
|
||||
|
||||
InputForm(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName,
|
||||
EventObserver* observer, const char* subName)
|
||||
: MemoInputForm(manager, resAccessor, arcName, observer, subName),
|
||||
mbPhotoScaledUp(false), mbPhotoDraw(false), meType(T_MailAddressSel) {}
|
||||
|
||||
~InputForm();
|
||||
|
||||
virtual void create(MEMAllocator* allocator, inputform::EditBuffer* editBuffer);
|
||||
virtual void drawBody();
|
||||
virtual void drawFooter();
|
||||
virtual void open();
|
||||
virtual void close();
|
||||
virtual bool isWholePaneInAnimation();
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
InputForm(textinput::Manager* manager, nw4r::lyt::MultiArcResourceAccessor* multiArc,
|
||||
const char* layoutName, EventObserver* event, const char* fontName)
|
||||
: textinput::MemoInputForm(manager, multiArc, layoutName, event, fontName),
|
||||
unk_0x400(0), mbPhotoDraw(false), meType(T_MailAddressSel) {}
|
||||
#endif
|
||||
|
||||
#ifdef MYTILETTERFORM_IMPLEMENTATION
|
||||
virtual ~InputForm();
|
||||
virtual void create(MEMAllocator*, inputform::EditBuffer*);
|
||||
virtual void drawBody();
|
||||
virtual void drawFooter();
|
||||
virtual void open();
|
||||
virtual void close();
|
||||
virtual bool isWholePaneInAnimation();
|
||||
#endif
|
||||
virtual nw4r::lyt::Material* getPhotoPaneMaterial();
|
||||
|
||||
virtual void onPhotoTrig();
|
||||
virtual void onPhotoPoint();
|
||||
virtual void onPhotoLeft();
|
||||
virtual bool isPhotoScaledUp();
|
||||
virtual void setPhotoDraw(bool photoDraw);
|
||||
virtual void setPhotoDraw(bool photoDraw) { mbPhotoDraw = photoDraw; }
|
||||
|
||||
virtual void setType(Type type);
|
||||
virtual void setType(Type type) { meType = type; }
|
||||
|
||||
virtual void setSendOutMessage(const wchar_t* sendOutMessage);
|
||||
|
||||
void resizePhotoPane(f32 width, f32 height);
|
||||
|
||||
private:
|
||||
bool mbPhotoScaledUp; // 0x400
|
||||
#ifdef MYTILETTERFORM_IMPLEMENTATION
|
||||
bool mbPhotoScaledUp;
|
||||
#else
|
||||
u8 unk_0x400;
|
||||
#endif
|
||||
bool mbPhotoDraw; // 0x401
|
||||
Type meType; // 0x404
|
||||
};
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
|
||||
namespace textinput {
|
||||
namespace extend {
|
||||
namespace bg {
|
||||
class LayoutByNW4R;
|
||||
}
|
||||
|
||||
namespace memo {
|
||||
class State;
|
||||
|
||||
@@ -32,7 +28,9 @@ namespace textinput {
|
||||
CT_NumericWithSeparator,
|
||||
CT_NormalWithoutLineFeedWithSign,
|
||||
CT_PredictWithoutLineFeed,
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
CT_PredictBigText,
|
||||
#endif
|
||||
|
||||
CT_Last
|
||||
} ConfigType;
|
||||
@@ -83,21 +81,39 @@ namespace textinput {
|
||||
virtual void start();
|
||||
virtual void end();
|
||||
|
||||
virtual textinput::InputForm* createInputForm();
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
virtual textinput::InputForm* createInputForm();
|
||||
#else
|
||||
virtual InputForm* createInputForm();
|
||||
#endif
|
||||
|
||||
virtual void memoDraw();
|
||||
|
||||
virtual void setSaveData(savedata::MemoSetting memoSetting);
|
||||
virtual savedata::MemoSetting getSaveData();
|
||||
virtual void setSaveData(savedata::MemoSetting memoSetting) {
|
||||
mMemoSetting = memoSetting;
|
||||
}
|
||||
#ifdef IPL_KEYBOARD_MEMO_GET_SAVE_DATA
|
||||
virtual savedata::MemoSetting getSaveData();
|
||||
#else
|
||||
virtual savedata::MemoSetting getSaveData() { return mMemoSetting; }
|
||||
#endif
|
||||
|
||||
virtual void changeState(StateTimeLine stateTimeLine);
|
||||
virtual State* getState();
|
||||
virtual State* getState() { return mpCurrentState; }
|
||||
virtual void setState(StateType stateType);
|
||||
|
||||
virtual ConfigType getConfigType();
|
||||
virtual ConfigType getConfigType() { return meConfigType; }
|
||||
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
virtual void setSaveData();
|
||||
#else
|
||||
virtual void setSaveData_();
|
||||
#endif
|
||||
virtual void reflectSaveData();
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
void reflectSaveDataRev1();
|
||||
void reflectSaveDataDefault();
|
||||
#endif
|
||||
|
||||
virtual void configDefault();
|
||||
virtual void configLetter();
|
||||
@@ -114,24 +130,21 @@ namespace textinput {
|
||||
virtual void configNormalWithoutLineFeedWithSign();
|
||||
virtual void configPredictWithoutLineFeed();
|
||||
virtual void configPredictBigText();
|
||||
virtual InputForm* createMemoInputForm();
|
||||
virtual letter::InputForm* createLetterInputForm();
|
||||
virtual textinput::InputForm* createBigTextInputForm();
|
||||
virtual bg::LayoutByNW4R* createBG();
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
virtual textinput::MemoInputForm* createMemoInputForm();
|
||||
virtual textinput::LetterInputForm* createLetterInputForm();
|
||||
virtual textinput::InputForm* createBigTextInputForm();
|
||||
virtual void* createBG();
|
||||
#else
|
||||
virtual void createMemoInputForm();
|
||||
virtual void createLetterInputForm();
|
||||
virtual void createBigTextInputForm();
|
||||
virtual void createBG();
|
||||
#endif
|
||||
|
||||
virtual void pure_0() {}
|
||||
virtual void pure_1() {}
|
||||
virtual void pure_2() {}
|
||||
virtual void pure_3() {}
|
||||
virtual void pure_4() {}
|
||||
virtual void pure_5() {}
|
||||
virtual void pure_6() {}
|
||||
virtual void pure_7() {}
|
||||
virtual void pure_8() {}
|
||||
virtual void pure_9() {}
|
||||
|
||||
void reflectSaveDataRev1();
|
||||
void reflectSaveDataDefault();
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
void* getBackGround() const { return mpBackGround; }
|
||||
#endif
|
||||
|
||||
private:
|
||||
State* mpCurrentState; // 0x40
|
||||
@@ -140,22 +153,25 @@ namespace textinput {
|
||||
MemoInputForm* mpMemoInputForm; // 0x50
|
||||
LetterInputForm* mpLetterInputForm; // 0x54
|
||||
textinput::InputForm* mpBigTextInputForm; // 0x58
|
||||
keyboard::pctype::LayoutByNW4R* mpDefaultPCKeyboard; // 0x5C
|
||||
keyboard::cellphonetype::LayoutByNW4R* mpDefaultCellPhoneKeyboard; // 0x60
|
||||
void* mpDefaultPCKeyboard; // 0x5C
|
||||
void* mpDefaultCellPhoneKeyboard; // 0x60
|
||||
textinput::InputForm* mpDefaultInputForm; // 0x64
|
||||
candidatebox::LayoutByNW4R* mpDefaultCandidateBox; // 0x68
|
||||
toolbar::LayoutByNW4R* mpDefaultToolBar; // 0x6C
|
||||
predictlang::LayoutByNW4R* mpDefaultPredictLanguageDialog; // 0x70
|
||||
keyboard::signwindow::LayoutByNW4R* mpDefaultSignWindow; // 0x74
|
||||
bg::LayoutByNW4R* mpBackGround; // 0x78
|
||||
|
||||
friend class State;
|
||||
void* mpDefaultCandidateBox; // 0x68
|
||||
void* mpDefaultToolBar; // 0x6C
|
||||
void* mpDefaultPredictLanguageDialog; // 0x70
|
||||
void* mpDefaultSignWindow; // 0x74
|
||||
void* mpBackGround; // 0x78
|
||||
};
|
||||
|
||||
class State {
|
||||
public:
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
State() : mpManager(NULL) {}
|
||||
Manager* getManager() const { return mpManager; }
|
||||
void setManager(Manager* manager) { mpManager = manager; }
|
||||
#endif
|
||||
virtual ~State();
|
||||
#ifdef MYTIMANAGER_MATCHING
|
||||
virtual Manager::StateType getStateType() = 0;
|
||||
|
||||
virtual void create() = 0;
|
||||
@@ -173,100 +189,43 @@ namespace textinput {
|
||||
virtual void start() = 0;
|
||||
virtual void end() = 0;
|
||||
|
||||
virtual InputForm* InputForm();
|
||||
virtual keyboard::hwkey::HWKeyboard* HWKeyboard();
|
||||
virtual keyboard::pctype::LayoutByNW4R* PCKeyboard();
|
||||
#else
|
||||
virtual Manager::StateType getStateType();
|
||||
|
||||
virtual void create();
|
||||
|
||||
virtual void init();
|
||||
|
||||
virtual void draw();
|
||||
virtual void memoDraw();
|
||||
|
||||
virtual void calc();
|
||||
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release);
|
||||
virtual bool updateInput(input::HKBManager& hkbManager);
|
||||
|
||||
virtual void start();
|
||||
virtual void end();
|
||||
|
||||
#endif
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
virtual InputForm* InputForm();
|
||||
virtual keyboard::hwkey::HWKeyboard* HWKeyboard();
|
||||
virtual keyboard::pctype::LayoutByNW4R* PCKeyboard();
|
||||
virtual keyboard::cellphonetype::LayoutByNW4R* CellPhoneKeyboard();
|
||||
virtual keyboard::signwindow::LayoutByNW4R* SignKeyboard();
|
||||
virtual candidatebox::LayoutByNW4R* CandidateBox();
|
||||
virtual toolbar::LayoutByNW4R* ToolBar();
|
||||
virtual predictlang::LayoutByNW4R* PredictLanguageSelectDialog();
|
||||
virtual bg::LayoutByNW4R* BG();
|
||||
virtual void* SignKeyboard();
|
||||
virtual candidatebox::LayoutByNW4R* CandidateBox();
|
||||
virtual toolbar::LayoutByNW4R* ToolBar();
|
||||
virtual void* PredictLanguageSelectDialog();
|
||||
virtual void* BG();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
private:
|
||||
Manager* mpManager; // 0x04
|
||||
|
||||
friend class Manager;
|
||||
};
|
||||
|
||||
class DispMemoState : public State {
|
||||
public:
|
||||
virtual ~DispMemoState();
|
||||
virtual Manager::StateType getStateType();
|
||||
|
||||
virtual void create();
|
||||
virtual void init();
|
||||
|
||||
virtual void draw();
|
||||
virtual void memoDraw();
|
||||
|
||||
virtual void calc();
|
||||
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release);
|
||||
virtual bool updateInput(input::HKBManager& hkbManager);
|
||||
|
||||
virtual void start();
|
||||
virtual void end();
|
||||
};
|
||||
|
||||
class AppearMemoState : public State {
|
||||
public:
|
||||
AppearMemoState() : mfAnim(0.0f) {}
|
||||
virtual ~AppearMemoState();
|
||||
virtual Manager::StateType getStateType();
|
||||
|
||||
virtual void create();
|
||||
virtual void init();
|
||||
|
||||
virtual void draw();
|
||||
virtual void memoDraw();
|
||||
|
||||
virtual void calc();
|
||||
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release);
|
||||
virtual bool updateInput(input::HKBManager& hkbManager);
|
||||
|
||||
virtual void start();
|
||||
virtual void end();
|
||||
|
||||
protected:
|
||||
f32 mfAnim; // 0x08
|
||||
};
|
||||
|
||||
class EditMemoState : public State {
|
||||
public:
|
||||
virtual ~EditMemoState();
|
||||
virtual Manager::StateType getStateType();
|
||||
|
||||
virtual void create();
|
||||
virtual void init();
|
||||
|
||||
virtual void draw();
|
||||
virtual void memoDraw();
|
||||
|
||||
virtual void calc();
|
||||
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release);
|
||||
virtual bool updateInput(input::HKBManager& hkbManager);
|
||||
|
||||
virtual void start();
|
||||
virtual void end();
|
||||
};
|
||||
|
||||
class DisappearMemoState : public AppearMemoState {
|
||||
public:
|
||||
virtual ~DisappearMemoState();
|
||||
virtual Manager::StateType getStateType();
|
||||
|
||||
virtual void calc();
|
||||
|
||||
virtual void start();
|
||||
};
|
||||
}
|
||||
}
|
||||
typedef extend::memo::Manager MemoManager;
|
||||
}
|
||||
|
||||
#include "MyTiBg.h"
|
||||
|
||||
#endif // TEXTINPUT_MY_MANAGER_H
|
||||
|
||||
@@ -48,6 +48,9 @@ namespace textinput {
|
||||
|
||||
class CandidateBoxCaller {
|
||||
public:
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
CandidateBoxCaller() : mpCandidateBox(NULL) {}
|
||||
#endif
|
||||
// This candidate thing is a bit different from the dwarf
|
||||
class Candidates {
|
||||
public:
|
||||
@@ -74,11 +77,9 @@ namespace textinput {
|
||||
|
||||
class Base : public CommandSender {
|
||||
public:
|
||||
#ifdef TI_CANDIDATEBOX_SAMPLE_CLASS
|
||||
Base(Manager* manager)
|
||||
: mpCandidates(NULL), mpAllocator(NULL), mbOn(false), mbInvalid(true), meLanguage(USA), mpManager(manager) {}
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
Base(Manager* manager) : mpCandidates(NULL), mpAllocator(NULL), mbOn(false), mbInvalid(true), meLanguage(USA), mpManager(manager) {}
|
||||
#endif
|
||||
|
||||
virtual ~Base();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override {}
|
||||
@@ -113,8 +114,9 @@ namespace textinput {
|
||||
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
EventHandler(LayoutByNW4R* layout) : mpLayoutByNW4R(layout) {}
|
||||
|
||||
#endif
|
||||
virtual void onTiEvent(gui::PaneComponent* paneComponent, u32 event, Input* input) override; // 0x18
|
||||
|
||||
LayoutByNW4R* mpLayoutByNW4R; // 0xC
|
||||
@@ -185,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;
|
||||
@@ -288,13 +302,13 @@ namespace textinput {
|
||||
// TODO
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout, public UIObj::Listener {
|
||||
public:
|
||||
#ifdef TI_CANDIDATEBOX_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, arcName, observer), mEventHandler(this),
|
||||
mpTiString(NULL), mTextArea(0, this, this), mLeftScroll(1, this, this), mRightScroll(2, this, this),
|
||||
mOnOffButton(3, this, this), mTextWindow(4, this, this), mbActive(true) {}
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* accessor, EventObserver* observer, const char* layoutName)
|
||||
: Base(manager), nw4rmanager::Layout(accessor, layoutName, observer), mEventHandler(this), mpTiString(NULL),
|
||||
mTextArea(0, this, this), mLeftScroll(1, this, this), mRightScroll(2, this, this), mOnOffButton(3, this, this),
|
||||
mTextWindow(4, this, this), mbActive(true) {}
|
||||
const UIOnOffButton& getOnOffButton() const { return mOnOffButton; }
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
@@ -323,7 +337,11 @@ namespace textinput {
|
||||
virtual u16 getScroll() { return mTextArea.GetDispOffset(); } // 0x100
|
||||
virtual bool isInScroll(); // 0x104
|
||||
virtual void setActive(bool active); // 0x108
|
||||
virtual bool isActive() const; // 0x10C
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
virtual bool isActive() const { return mbActive; }
|
||||
#else
|
||||
virtual bool isActive() const;
|
||||
#endif // 0x10C
|
||||
virtual void setSelectedTextPane(int pane) { mTextArea.SetSelectedText(pane); } // 0x110
|
||||
virtual void setFocusedTextPane(int pane) { mTextArea.SetFocusedText(pane); } // 0x114
|
||||
virtual int getFocusedTextPane() { return mTextArea.GetFocusedText(); } // 0x118
|
||||
@@ -333,13 +351,13 @@ namespace textinput {
|
||||
virtual void cancelStateFocusIn(); // 0x128
|
||||
virtual void onEvent(UIObj*, u32, void*) override; // 0x12C
|
||||
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
UITextArea& getTextArea() { return mTextArea; }
|
||||
#endif
|
||||
void onPressedShift(bool shift);
|
||||
void onReleasedShift();
|
||||
void startTurnOn(bool);
|
||||
|
||||
UIOnOffButton& getOnOffButton() { return mOnOffButton; }
|
||||
const UIOnOffButton& getOnOffButton() const { return mOnOffButton; }
|
||||
|
||||
private:
|
||||
void createAnmPane_(MEMAllocator* allocator);
|
||||
|
||||
@@ -402,17 +420,6 @@ namespace textinput {
|
||||
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent) override; // 0x10
|
||||
};
|
||||
|
||||
#ifdef TI_CANDIDATEBOX_SAMPLE_CLASS
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, arcName, observer) {}
|
||||
virtual ~Sample();
|
||||
};
|
||||
#else
|
||||
class Sample {};
|
||||
#endif
|
||||
} // namespace candidatebox
|
||||
} // namespace textinput
|
||||
|
||||
|
||||
@@ -1,226 +1,273 @@
|
||||
#ifndef TEXTINPUT_CELL_PHONE_H
|
||||
#define TEXTINPUT_CELL_PHONE_H
|
||||
|
||||
#include "tiKeyboard.h"
|
||||
#include "tiNw4rManager.h"
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#include "tiKeyboard.h"
|
||||
#endif
|
||||
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
#include <revolution/gx.h>
|
||||
#endif
|
||||
|
||||
namespace textinput {
|
||||
class Manager;
|
||||
|
||||
#ifdef TI_CELLPHONE_SAMPLE_CLASS
|
||||
class EventObserver;
|
||||
#endif
|
||||
namespace predictlang {
|
||||
class LayoutByNW4R;
|
||||
}
|
||||
|
||||
namespace keyboard {
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
enum VKeyCode {
|
||||
VK_LINE_FEED = 0,
|
||||
VK_DELETE = 1,
|
||||
VK_SIGN_INPUT = 9,
|
||||
VK_PREDICT_LANGUAGE = 10,
|
||||
VK_INPUT_MODE_02 = 11,
|
||||
VK_INPUT_MODE_03 = 13,
|
||||
VK_INPUT_MODE_00 = 18,
|
||||
VK_INPUT_MODE_01 = 19,
|
||||
VK_TOGGLE_ABC_MODE = 23,
|
||||
};
|
||||
#endif
|
||||
namespace signwindow {
|
||||
class LayoutByNW4R;
|
||||
}
|
||||
}
|
||||
|
||||
class KeyboardBase;
|
||||
|
||||
typedef enum VKeyCode {
|
||||
VK_LF = 0,
|
||||
VK_DELETE = 1,
|
||||
VK_SPACE = 2,
|
||||
VK_OTHERS = 9,
|
||||
VK_PRDC = 0xA,
|
||||
VK_TAG_02 = 0xB,
|
||||
VK_TAG_03 = 0xD,
|
||||
VK_UNKNOWN_11 = 0x11,
|
||||
VK_TAG_00 = 0x12,
|
||||
VK_TAG_01 = 0x13,
|
||||
VK_SML_CPT = 0x17,
|
||||
VK_NONE = 0x1B,
|
||||
} VKeyCode;
|
||||
|
||||
namespace keyboard {
|
||||
namespace cellphonetype {
|
||||
class EventHandler;
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
class CellPhoneAnmPane;
|
||||
struct PaneNameToCharCode;
|
||||
struct KeySet;
|
||||
struct LanguageDependency;
|
||||
|
||||
class LayoutByNW4R;
|
||||
|
||||
class Base : public KeyboardBase {
|
||||
#endif
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
class Base : public textinput::keyboard::KeyboardBase {
|
||||
#else
|
||||
class Base {
|
||||
#endif
|
||||
public:
|
||||
typedef enum InputMode {
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) && defined(TI_CELLPHONE_SAMPLE_CLASS)
|
||||
Base(Manager* manager) : mPreviousInputMode(0), mCurrentInputMode(0), mpManager(manager) {}
|
||||
#endif
|
||||
enum InputMode {
|
||||
IM_00,
|
||||
IM_01,
|
||||
IM_02,
|
||||
IM_03,
|
||||
IM_04,
|
||||
IM_05,
|
||||
} InputMode;
|
||||
};
|
||||
|
||||
#ifdef TI_CELLPHONE_SAMPLE_CLASS
|
||||
virtual ~Base();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
virtual void updateFromReceiver(u32, void*) override;
|
||||
virtual void onKey(u32, void*) override;
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
Base(Manager* manager) : mpManager(manager) {}
|
||||
#endif
|
||||
#if defined(TI_CELLPHONE_IMPLEMENTATION)
|
||||
virtual u32 getType() override;
|
||||
#elif defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual int getType() override;
|
||||
#elif defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
virtual int getType() override;
|
||||
#else
|
||||
virtual void getType() override;
|
||||
#endif
|
||||
virtual void onActive() override;
|
||||
virtual void calc();
|
||||
virtual void draw();
|
||||
virtual InputMode getInputMode() const;
|
||||
virtual bool isLocked() const;
|
||||
virtual bool isNumeric() const;
|
||||
virtual bool isNumericWithDot() const;
|
||||
virtual bool isHoldingButton() const;
|
||||
virtual void doNumericMode(bool);
|
||||
virtual void changeInputMode(InputMode);
|
||||
virtual bool isUpperCase();
|
||||
virtual void setInputMode(InputMode);
|
||||
virtual void setUpperCaseJP(bool);
|
||||
virtual void setLangKeyActive(bool);
|
||||
virtual bool onClose();
|
||||
virtual void goSignInputMode();
|
||||
virtual void changePredictLanguage();
|
||||
virtual void setAbcMode(bool);
|
||||
virtual bool isZiActive();
|
||||
virtual bool isAtokActive();
|
||||
virtual void doInput();
|
||||
virtual void updateFixMode();
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
wchar_t convertToZiCellphoneInput_(wchar_t value);
|
||||
#endif
|
||||
#else
|
||||
virtual void vt_0x08();
|
||||
virtual void vt_0x0C();
|
||||
virtual void vt_0x10();
|
||||
virtual void vt_0x14();
|
||||
virtual void vt_0x18();
|
||||
virtual void vt_0x1C();
|
||||
virtual void vt_0x20();
|
||||
virtual void vt_0x24();
|
||||
virtual void vt_0x28();
|
||||
virtual void vt_0x2C();
|
||||
virtual void vt_0x30();
|
||||
virtual void vt_0x34();
|
||||
virtual void vt_0x38();
|
||||
virtual void vt_0x3C();
|
||||
virtual void vt_0x40();
|
||||
virtual void vt_0x44();
|
||||
|
||||
virtual void create(MEMAllocator* allocator) override; // 0x0C
|
||||
virtual void init() override; // 0x10
|
||||
virtual void setCommandReceiver(CommandReceiver* receiver) override; // 0x14
|
||||
virtual void sendCommand(u32, void*) override; // 0x18
|
||||
virtual void updateFromReceiver(u32, void*) override; // 0x1C
|
||||
virtual void onKey(u32, void*); // 0x20
|
||||
virtual int getType(); // 0x24
|
||||
virtual void setLanguage(Language language) override; // 0x28
|
||||
virtual Language getLanguage() const override; // 0x2C
|
||||
virtual void onActive() override; // 0x34
|
||||
virtual void calc(); // 0x38
|
||||
virtual void draw(); // 0x3C
|
||||
virtual int getInputMode() const; // 0x40
|
||||
virtual bool isLocked() const; // 0x44
|
||||
virtual bool isNumeric() const; // 0x48
|
||||
virtual bool isNumericWithDot() const; // 0x4C
|
||||
virtual bool isHoldingButton() const; // 0x50
|
||||
virtual void doNumericMode(bool); // 0x54
|
||||
virtual void changeInputMode(InputMode mode); // 0x58
|
||||
virtual bool isUpperCase(); // 0x5C
|
||||
virtual void setInputMode(InputMode mode); // 0x60
|
||||
virtual void setUpperCaseJP(bool); // 0x64
|
||||
virtual void setLangKeyActive(bool); // 0x68
|
||||
virtual void onClose(); // 0x6C
|
||||
virtual void goSignInputMode(); // 0x70
|
||||
virtual void changePredictLanguage(); // 0x74
|
||||
virtual void setAbcMode(bool); // 0x78
|
||||
virtual bool isZiActive(); // 0x7C
|
||||
virtual bool isAtokActive(); // 0x80
|
||||
virtual void doInput(); // 0x84
|
||||
virtual void updateFixMode(); // 0x88
|
||||
virtual bool isNumeric() const;
|
||||
|
||||
void onCtrlKey_(VKeyCode code);
|
||||
wchar_t convertToZiCellphoneInput_(wchar_t wc);
|
||||
virtual void vt_0x4C();
|
||||
virtual void vt_0x50();
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
virtual void doNumericMode(bool);
|
||||
#else
|
||||
virtual void vt_0x54();
|
||||
#endif
|
||||
virtual void vt_0x58();
|
||||
virtual void vt_0x5C();
|
||||
virtual void vt_0x60();
|
||||
virtual void vt_0x64();
|
||||
virtual void vt_0x68(bool);
|
||||
|
||||
virtual bool onClose();
|
||||
#endif
|
||||
|
||||
// TODO enum?
|
||||
int getInputType() const;
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
void resetHoldingButton();
|
||||
#endif
|
||||
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) && defined(TI_CELLPHONE_IMPLEMENTATION)
|
||||
protected:
|
||||
Manager* mgr() { return mpManager; }
|
||||
|
||||
s32 mTapIndex; // 0x14
|
||||
s32 mInputMode; // 0x18
|
||||
u8 mbLocked; // 0x1C
|
||||
u8 mbNumeric; // 0x1D
|
||||
u8 mbNumericWithDot; // 0x1E
|
||||
u8 mbUpperCase; // 0x1F
|
||||
u8 mbShiftHeld; // 0x20
|
||||
u8 unk_0x21; // 0x21
|
||||
const PaneNameToCharCode* mpHoldingPane; // 0x24
|
||||
const LanguageDependency* mpLanguageDep; // 0x28
|
||||
MEMAllocator* mpAllocator; // 0x2C
|
||||
Manager* mpManager; // 0x30
|
||||
u8 mbLangKeyActive; // 0x34
|
||||
u8 unk_0x35[3]; // 0x35
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
u32 mPreviousInputMode;
|
||||
u32 mCurrentInputMode;
|
||||
bool mbInputModeLocked;
|
||||
bool mbNumericMode;
|
||||
bool mbNumericWithDotMode;
|
||||
bool mbUpperCaseMode;
|
||||
bool mbAbcMode;
|
||||
bool mbLanguageKeyMode;
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
const PaneNameToCharCode* mHoldingButton;
|
||||
#else
|
||||
u32 mHoldingButton;
|
||||
#endif
|
||||
void* mpInputModeTable;
|
||||
MEMAllocator* mpAllocator;
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
Manager* mpManager;
|
||||
bool mInputState;
|
||||
#elif defined(TIMANAGER_IMPLEMENTATION)
|
||||
Manager* mpManager;
|
||||
u32 mInputState;
|
||||
#else
|
||||
void* mpInputSettings;
|
||||
u32 mInputState;
|
||||
#endif
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
void onCtrlKey_(VKeyCode keyCode);
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef TI_CELLPHONE_MATCH_LAYOUT
|
||||
#include "tiCellPhoneLayout.h"
|
||||
#else
|
||||
class LayoutByNW4R;
|
||||
#endif
|
||||
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
enum Animation {
|
||||
ANM_Normal,
|
||||
ANM_FocusIn,
|
||||
ANM_FocusOut,
|
||||
ANM_RollOver,
|
||||
ANM_Pushed,
|
||||
ANM_05,
|
||||
ANM_06,
|
||||
ANM_ToggleOff,
|
||||
ANM_Last,
|
||||
};
|
||||
|
||||
enum KeyType {
|
||||
KT_NormalButton,
|
||||
KT_ControlButton,
|
||||
};
|
||||
|
||||
#ifdef TI_CELLPHONE_MATCH_LAYOUT
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
EventHandler(LayoutByNW4R* layout) : mpLayout(layout) {}
|
||||
|
||||
virtual void onTiEvent(gui::PaneComponent* paneComponent, u32 event, TiEventHandler::Input* input); // 0x18
|
||||
EventHandler(LayoutByNW4R* layout) : mpLayoutByNW4R(layout) {}
|
||||
virtual ~EventHandler();
|
||||
virtual void onTiEvent(gui::PaneComponent* pane, u32 event, Input* input) override;
|
||||
|
||||
private:
|
||||
LayoutByNW4R* mpLayout; // 0x0C
|
||||
LayoutByNW4R* mpLayoutByNW4R;
|
||||
};
|
||||
#endif
|
||||
|
||||
class CellPhoneAnmPane : public nw4rmanager::AnmPane {
|
||||
public:
|
||||
CellPhoneAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer, u32 keyType)
|
||||
: nw4rmanager::AnmPane(pane, observer) {
|
||||
mState = 0;
|
||||
mKeyType = keyType;
|
||||
CellPhoneAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
#ifdef TI_CELLPHONE_MATCH_LAYOUT
|
||||
: nw4rmanager::AnmPane(pane, observer), meState(ANM_Normal), meKeyType(KT_NormalButton) {
|
||||
init();
|
||||
changeAnimation(mState);
|
||||
changeAnimation(meState);
|
||||
}
|
||||
#else
|
||||
: nw4rmanager::AnmPane(pane, observer), meState(ANM_Normal), meKeyType(KT_NormalButton) {}
|
||||
#endif
|
||||
|
||||
virtual void init(); // 0x08
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent); // 0x10
|
||||
virtual void changeAnimation(u32 id); // 0x14
|
||||
virtual u32 getKeyType() const; // 0x24
|
||||
virtual void init() override;
|
||||
virtual void onAnmEvent(AnmPaneEvent event) override;
|
||||
virtual void changeAnimation(u32 id) override;
|
||||
virtual KeyType getKeyType() const;
|
||||
u32 getAnimationState() const { return meState; }
|
||||
virtual ~CellPhoneAnmPane();
|
||||
|
||||
protected:
|
||||
s32 mState; // 0x2C
|
||||
u32 mKeyType; // 0x30
|
||||
Animation meState;
|
||||
KeyType meKeyType;
|
||||
};
|
||||
|
||||
class CellPhoneControlAnmPane : public CellPhoneAnmPane {
|
||||
public:
|
||||
CellPhoneControlAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer, u32 keyType)
|
||||
: CellPhoneAnmPane(pane, observer, 0) {
|
||||
mKeyType = keyType;
|
||||
}
|
||||
CellPhoneControlAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: CellPhoneAnmPane(pane, observer) { meKeyType = KT_ControlButton; }
|
||||
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent); // 0x10
|
||||
virtual void onAnmEvent(AnmPaneEvent event) override;
|
||||
virtual ~CellPhoneControlAnmPane();
|
||||
};
|
||||
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout {
|
||||
#ifndef TI_CELLPHONE_MATCH_LAYOUT
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
#ifdef TI_CELLPHONE_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, arcName, observer),
|
||||
mpEventHandler(NULL) {}
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
virtual void setCommandReceiver(CommandReceiver* receiver) override;
|
||||
virtual void updateFromReceiver(u32, void*) override;
|
||||
virtual void onKey(u32, void*) override;
|
||||
virtual void setLanguage(Language language) override;
|
||||
virtual void update() override;
|
||||
virtual void onActive() override;
|
||||
virtual void calc() override;
|
||||
virtual void draw() override;
|
||||
virtual void doNumericMode(bool) override;
|
||||
virtual void changeInputMode(InputMode mode) override;
|
||||
virtual void setInputMode(InputMode mode) override;
|
||||
virtual void setUpperCaseJP(bool) override;
|
||||
virtual void setLangKeyActive(bool) override;
|
||||
virtual void onClose() override;
|
||||
virtual void goSignInputMode() override;
|
||||
virtual void changePredictLanguage() override;
|
||||
virtual void setAbcMode(bool) override;
|
||||
|
||||
virtual void setPredictLanguageDialog(predictlang::LayoutByNW4R*); // 0x104
|
||||
virtual void setSignWindow(signwindow::LayoutByNW4R*); // 0x108
|
||||
virtual void doNumericWithDotMode(bool); // 0x10C
|
||||
virtual void setLineFeedButton(bool); // 0x110
|
||||
virtual void setPredictLanguageButton(bool); // 0x114
|
||||
virtual void setSignWindowButton(bool); // 0x118
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data); // 0x11C
|
||||
virtual bool updateInput(textinput::input::HKBManager& hkbManager); // 0x120
|
||||
virtual nw4rmanager::AnmPane* getAnmPane(InputMode mode); // 0x124
|
||||
virtual void throwReleaseForAll(); // 0x128
|
||||
virtual void changeAnimationAllToNormal(); // 0x12C
|
||||
virtual void updatePredictLanguage(CommandReceiver::ChangePredictMode* mode); // 0x130
|
||||
virtual void changeKeyTop(const PaneNameToCharCode* table); // 0x134
|
||||
virtual void changeSpaceKeyTop(const PaneNameToCharCode* table); // 0x138
|
||||
|
||||
void onPressedShift(bool shift);
|
||||
void onReleasedShift();
|
||||
void resetHoldingButton();
|
||||
EventHandler(LayoutByNW4R* layout) : mpLayoutByNW4R(layout) {}
|
||||
virtual ~EventHandler();
|
||||
virtual void onTiEvent(gui::PaneComponent* pane, u32 event, Input* input) override;
|
||||
|
||||
private:
|
||||
bool mbLineFeed; // 0xE0
|
||||
u8 unk_0xE1[3]; // 0xE1
|
||||
GXTexObj mSpaceTexObjJP; // 0xE4
|
||||
GXTexObj mSpaceTexObjCN; // 0x104
|
||||
GXTexObj mSpaceTexObjKR; // 0x124
|
||||
EventHandler* mpEventHandler; // 0x144
|
||||
predictlang::LayoutByNW4R* mpPredictLanguageDialog; // 0x148
|
||||
signwindow::LayoutByNW4R* mpSignWindow; // 0x14C
|
||||
LayoutByNW4R* mpLayoutByNW4R;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef TI_CELLPHONE_SAMPLE_CLASS
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, arcName, observer) {}
|
||||
virtual ~Sample();
|
||||
};
|
||||
#else
|
||||
class Sample {};
|
||||
#endif
|
||||
|
||||
#ifdef TI_CELLPHONE_MATCH_LAYOUT
|
||||
#include "tiCellPhoneLayout.h"
|
||||
#endif
|
||||
|
||||
} // namespace cellphonetype
|
||||
|
||||
@@ -72,10 +72,10 @@ namespace textinput {
|
||||
|
||||
virtual ~EventHandler() {} // 0x08
|
||||
|
||||
virtual void onEvent(GUIComponent& comp, u32 event, void* data); // 0x0C
|
||||
virtual void onEvent(GUIComponent& comp, u32 event, void* data) {} // 0x0C
|
||||
|
||||
virtual void setLatestEventCtrlNo(int ctrlNo); // 0x10
|
||||
virtual int getLatestEventCtrlNo(); // 0x14
|
||||
virtual void setLatestEventCtrlNo(int ctrlNo) { muLatestEventCtrlNo = ctrlNo; } // 0x10
|
||||
virtual int getLatestEventCtrlNo() { return muLatestEventCtrlNo; } // 0x14
|
||||
|
||||
protected:
|
||||
int muLatestEventCtrlNo; // 0x04
|
||||
@@ -92,6 +92,9 @@ namespace textinput {
|
||||
EVENT_RELEASE
|
||||
};
|
||||
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
virtual void init();
|
||||
#else
|
||||
virtual void init() { // 0x10
|
||||
for (int i = 0; i < GUI_POINTS_MAX; i++) {
|
||||
mbPointed[i] = false;
|
||||
@@ -100,19 +103,20 @@ namespace textinput {
|
||||
mFlightDuration[i] = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
GUIComponent(u32 id)
|
||||
: GUIInterface(), mbInitialize(false), mDraggingButton(0xFFFF), mID(id), mbTriggerTarget(false), mpManager(NULL), mpListener(NULL) {
|
||||
init();
|
||||
}
|
||||
virtual ~GUIComponent(); // 0x08
|
||||
virtual ~GUIComponent() {} // 0x08
|
||||
|
||||
virtual u32 getID(); // 0x20
|
||||
virtual u32 getID() { return mID; } // 0x20
|
||||
|
||||
virtual bool isPointed(int point); // 0x24
|
||||
virtual bool isDragging(int point); // 0x28
|
||||
virtual bool isPointed(int point) { return mbPointed[point]; } // 0x24
|
||||
virtual bool isDragging(int point) { return mbDragging[point]; } // 0x28
|
||||
|
||||
virtual void setPointed(int point, bool bEnable); // 0x2C
|
||||
virtual void setPointed(int point, bool bEnable) { mbPointed[point] = bEnable; } // 0x2C
|
||||
|
||||
void onEvent(u32 event, void* data) {
|
||||
if (mpListener) {
|
||||
@@ -120,30 +124,39 @@ namespace textinput {
|
||||
}
|
||||
}
|
||||
|
||||
virtual void onPointIn(int point); // 0x30
|
||||
virtual void onPointOut(int point); // 0x34
|
||||
virtual void onPointIn(int point) { mFlightDuration[point] = 0; } // 0x30
|
||||
virtual void onPointOut(int point) { mFlightDuration[point] = 0; } // 0x34
|
||||
|
||||
virtual void onDrag(f32 x, f32 y);
|
||||
virtual void onMove(int point, f32 x, f32 y); // 0x38
|
||||
virtual void onTrig(int point, u32 trig, Vec& dragPos);
|
||||
virtual void onDrag(f32 x, f32 y) {}
|
||||
virtual void onMove(int point, f32 x, f32 y) { mFlightDuration[point]++; } // 0x38
|
||||
virtual void onTrig(int point, u32 trig, Vec& dragPos) {
|
||||
if (trig & mDraggingButton) {
|
||||
mDraggingPos[point] = dragPos;
|
||||
mbDragging[point] = true;
|
||||
mFlightDuration[point] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void setDraggingButton(u32 dragBtn); // 0x3C
|
||||
virtual void setDraggingButton(u32 dragBtn) { mDraggingButton = dragBtn; } // 0x3C
|
||||
|
||||
virtual u32 updatePointer(const GUIPointer& pointer); // 0x48
|
||||
virtual u32 updatePointer(int point, f32 x, f32 y, u32 trig, u32 hold, u32 release); // 0x4C
|
||||
virtual u32 updatePointer(const GUIPointer& pointer) { return updatePointerImpl(pointer); } // 0x40
|
||||
virtual u32 updatePointer(int point, f32 x, f32 y, u32 trig, u32 hold, u32 release) { // 0x44
|
||||
GUIPointer pointer(point, x, y, hold, trig, release);
|
||||
return updatePointerImpl(pointer);
|
||||
}
|
||||
|
||||
virtual bool isTriggerTarget(); // 0x50
|
||||
virtual void setTriggerTarget(bool bEnable); // 0x54
|
||||
virtual bool isTriggerTarget() { return mbTriggerTarget; } // 0x48
|
||||
virtual void setTriggerTarget(bool bEnable) { mbTriggerTarget = bEnable; } // 0x4C
|
||||
|
||||
void setParentManager(GUIManager* manager) { mpManager = manager; }
|
||||
GUIManager* getParentManager() { return mpManager; }
|
||||
|
||||
virtual bool isVisible(); // 0x58
|
||||
virtual bool isVisible() { return true; } // 0x50
|
||||
|
||||
virtual u16 getFlightDuration(int point); // 0x5C
|
||||
virtual void setFlightDuration(int point, u16 flightDir); // 0x60
|
||||
virtual u16 getFlightDuration(int point) { return mFlightDuration[point]; } // 0x54
|
||||
virtual void setFlightDuration(int point, u16 flightDir) { mFlightDuration[point] = flightDir; } // 0x58
|
||||
|
||||
virtual bool contain(f32 x, f32 y) = 0; // 0x64
|
||||
virtual bool contain(f32 x, f32 y) = 0; // 0x5C
|
||||
|
||||
void setListener(EventHandler* listener) { mpListener = listener; }
|
||||
|
||||
@@ -154,9 +167,9 @@ namespace textinput {
|
||||
|
||||
bool mbInitialize; // 0x04
|
||||
|
||||
bool mbPointed[GUI_POINTS_MAX]; // 0x05
|
||||
bool mbPointed[GUI_POINTS_MAX]; // 0x08
|
||||
|
||||
bool mbDragging[GUI_POINTS_MAX]; // 0x0D
|
||||
bool mbDragging[GUI_POINTS_MAX]; // 0x10
|
||||
Vec mDraggingPos[GUI_POINTS_MAX]; // 0x18
|
||||
int mDraggingButton; // 0x78
|
||||
|
||||
@@ -164,10 +177,10 @@ namespace textinput {
|
||||
|
||||
u16 mFlightDuration[GUI_POINTS_MAX]; // 0x80
|
||||
|
||||
bool mbTriggerTarget; // 0x90
|
||||
bool mbTriggerTarget; // 0x8A
|
||||
|
||||
GUIManager* mpManager; // 0x94
|
||||
EventHandler* mpListener; // 0x98
|
||||
GUIManager* mpManager; // 0x8C
|
||||
EventHandler* mpListener; // 0x90
|
||||
};
|
||||
|
||||
class GUIManager : public GUIInterface {
|
||||
@@ -187,15 +200,27 @@ namespace textinput {
|
||||
virtual GUIComponent* getComponent(u32 id); // 0x24
|
||||
virtual GUIComponent* getComponent(u32 id) const; // 0x28
|
||||
|
||||
virtual bool update(int point, const KPADStatus* kpad, f32, f32, void* data); // 0x2C
|
||||
virtual bool update(int point, const KPADStatus* kpad, f32, f32, void* data) { return false; } // 0x2C
|
||||
virtual bool update(int point, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data); // 0x30
|
||||
|
||||
virtual void onEvent(GUIComponent& comp, u32 event, int point, void* data); // 0x34
|
||||
virtual void onEvent(GUIComponent& comp, u32 event, int point, void* data) { // 0x34
|
||||
if (mpEventHandler) {
|
||||
mpEventHandler->setLatestEventCtrlNo(point);
|
||||
mpEventHandler->onEvent(comp, event, data);
|
||||
}
|
||||
comp.onEvent(event, data);
|
||||
}
|
||||
|
||||
virtual void setAllComponentTriggerTarget(bool bEnable); // 0x38
|
||||
|
||||
virtual void setEventHandler(EventHandler* eventHandler); // 0x3C
|
||||
virtual EventHandler* changeEventHandler(EventHandler* eventHandler); // 0x40
|
||||
virtual void setEventHandler(EventHandler* eventHandler) { // 0x3C
|
||||
mpEventHandler = eventHandler;
|
||||
}
|
||||
virtual EventHandler* changeEventHandler(EventHandler* eventHandler) { // 0x40
|
||||
EventHandler* prevHandler = mpEventHandler;
|
||||
mpEventHandler = eventHandler;
|
||||
return prevHandler;
|
||||
}
|
||||
|
||||
virtual void setDraggingButton(u32 dragBtn); // 0x44
|
||||
|
||||
@@ -234,7 +259,7 @@ namespace textinput {
|
||||
|
||||
virtual PaneComponent* getPaneComponentByPane(nw4r::lyt::Pane* pane); // 0x4C
|
||||
|
||||
virtual const nw4r::lyt::DrawInfo* getDrawInfo(); // 0x50
|
||||
virtual const nw4r::lyt::DrawInfo* getDrawInfo() { return mpDrawInfo; } // 0x50
|
||||
virtual void setDrawInfo(const nw4r::lyt::DrawInfo* drawInfo) { mpDrawInfo = drawInfo; } // 0x54
|
||||
|
||||
virtual void setAllBoundingBoxComponentTriggerTarget(bool bEnable); // 0x58
|
||||
@@ -273,11 +298,11 @@ namespace textinput {
|
||||
|
||||
virtual void draw(); // 0x1C
|
||||
|
||||
virtual bool isVisible(); // 0x58
|
||||
virtual bool isVisible(); // 0x50
|
||||
|
||||
virtual bool contain(f32 x, f32 y); // 0x64
|
||||
virtual bool contain(f32 x, f32 y); // 0x5C
|
||||
|
||||
virtual void setPane(nw4r::lyt::Pane* pane); // 0x68
|
||||
virtual void setPane(nw4r::lyt::Pane* pane) { mpPane = pane; } // 0x60
|
||||
nw4r::lyt::Pane* getPane() { return mpPane; }
|
||||
|
||||
nw4r::lyt::TextBox* getTextPane() { return static_cast<nw4r::lyt::TextBox*>(mpPane); }
|
||||
|
||||
@@ -4,158 +4,248 @@
|
||||
#include <revolution/types.h>
|
||||
|
||||
#include <revolution/mem/allocator.h>
|
||||
#include <revolution/os.h>
|
||||
|
||||
#include "keyboard/tiCpData.h"
|
||||
|
||||
typedef enum _KBDEc {
|
||||
KBD_EC_0 = 0,
|
||||
KBD_EC_1,
|
||||
KBD_EC_2,
|
||||
KBD_EC_3,
|
||||
KBD_EC_4,
|
||||
KBD_EC_5,
|
||||
KBD_EC_6,
|
||||
KBD_EC_OK,
|
||||
} KBDEc;
|
||||
|
||||
typedef struct _KBDDevEvent {
|
||||
u8 chan;
|
||||
u8 unk_0x01[0x1F];
|
||||
} KBDDevEvent;
|
||||
|
||||
typedef struct _KBDKeyEvent {
|
||||
u8 chan;
|
||||
u8 key;
|
||||
u8 unk_0x02[2];
|
||||
u32 mods;
|
||||
} KBDKeyEvent;
|
||||
|
||||
extern "C" {
|
||||
void KBDInitRegionUS(void);
|
||||
void KBDInit(void);
|
||||
void KBDSetAttachCallback(void (*cb)(KBDDevEvent*));
|
||||
void KBDSetDetachCallback(void (*cb)(KBDDevEvent*));
|
||||
void KBDSetKeyCallback(void (*cb)(KBDKeyEvent*));
|
||||
int KBDSetLedsAsync(u8 chan, u8 leds, void (*cb)(KBDEc, void*), void* arg);
|
||||
int KBDSetLeds(u8 chan, u8 leds);
|
||||
int KBDSetModState(u8 chan, u32 mods);
|
||||
int KBDSetCountry(u8 chan, u32 country);
|
||||
int KBDSetLockProcessing(u8 chan, int lock);
|
||||
u16 KBDTranslateHidCode(u8 key, u32 country);
|
||||
}
|
||||
#ifdef TIHKBMANAGER_IMPLEMENTATION
|
||||
#include <revolution/kbd.h>
|
||||
enum _KBDEc { KBD_EC_BUSY = 7 };
|
||||
#endif
|
||||
|
||||
namespace textinput {
|
||||
namespace input {
|
||||
|
||||
#ifdef TIHKBMANAGER_IMPLEMENTATION
|
||||
class HKBManager {
|
||||
public:
|
||||
HKBManager();
|
||||
~HKBManager();
|
||||
|
||||
class KeyState_ {
|
||||
public:
|
||||
void NotifyEvent(u8 down, u8 code);
|
||||
void Update();
|
||||
bool HasCurrentKey(u32 slot) const { return (current & (1 << slot)) != 0; }
|
||||
bool HadPreviousKey(u32 slot) const { return (previous & (1 << slot)) != 0; }
|
||||
void UpdateModState_();
|
||||
void Clear() {
|
||||
held = 0;
|
||||
triggered = 0;
|
||||
released = 0;
|
||||
repeated = 0;
|
||||
current = 0;
|
||||
pending = 0;
|
||||
modifiers &= 0x700;
|
||||
forceMask = 0;
|
||||
forceState = 0;
|
||||
retryLeds = 0;
|
||||
}
|
||||
void Initialize(u8 channel) {
|
||||
held = 0;
|
||||
triggered = 0;
|
||||
released = 0;
|
||||
repeated = 0;
|
||||
current = 0;
|
||||
pending = 0;
|
||||
forceMask = 0;
|
||||
forceState = 0;
|
||||
retryLeds = 0;
|
||||
device = channel;
|
||||
country = 0xf;
|
||||
modifiers = 0;
|
||||
}
|
||||
u8 device;
|
||||
u32 held, triggered, released, repeated;
|
||||
u32 previous, current, pending;
|
||||
u32 modifiers, forceState, forceMask;
|
||||
s32 country;
|
||||
u8 retryLeds;
|
||||
u8 previousKeys[8], currentKeys[8], pendingKeys[8];
|
||||
u32 repeatDelay[8];
|
||||
};
|
||||
class KeySet {
|
||||
public:
|
||||
KeySet() {}
|
||||
KeySet(const HKBManager* owner, u8 kind)
|
||||
: manager(owner), type(kind), index(-1), device(0), vcode(0) {}
|
||||
u8 GetKey() const;
|
||||
u32 GetWChar() const;
|
||||
u32 GetVCode() const;
|
||||
u32 IsValid() const;
|
||||
bool CheckValidity() const {
|
||||
if (!manager) return false;
|
||||
s8 keyIndex = index;
|
||||
if (keyIndex < 0 || keyIndex >= 8) return false;
|
||||
u8 keyDevice = device;
|
||||
if (keyDevice >= 2) return false;
|
||||
switch (type) {
|
||||
case 0: return (manager->states[keyDevice].held & (1 << keyIndex)) != 0;
|
||||
case 1: return (manager->states[keyDevice].triggered & (1 << keyIndex)) != 0;
|
||||
case 2: return (manager->states[keyDevice].released & (1 << keyIndex)) != 0;
|
||||
case 3: return (manager->states[keyDevice].repeated & (1 << keyIndex)) != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
KeySet GetNext() const;
|
||||
const HKBManager* manager;
|
||||
u8 type;
|
||||
s8 index;
|
||||
u8 device;
|
||||
mutable u16 vcode;
|
||||
};
|
||||
class KBDListenerOwn;
|
||||
class KBDListenerLinks {
|
||||
public:
|
||||
KBDListenerLinks() : previous(0), next(0) {}
|
||||
virtual ~KBDListenerLinks() {}
|
||||
virtual void OnAttach(KBDDevEvent*) = 0;
|
||||
virtual void OnDetach(KBDDevEvent*) = 0;
|
||||
virtual void OnKeyEvent(KBDKeyEvent*) = 0;
|
||||
KBDListenerOwn* previous;
|
||||
KBDListenerOwn* next;
|
||||
};
|
||||
class KBDListenerOwn : public KBDListenerLinks {
|
||||
public:
|
||||
KBDListenerOwn(HKBManager* owner) : manager(owner) {}
|
||||
virtual ~KBDListenerOwn();
|
||||
virtual void OnAttach(KBDDevEvent* event);
|
||||
virtual void OnDetach(KBDDevEvent* event);
|
||||
virtual void OnKeyEvent(KBDKeyEvent* event);
|
||||
HKBManager* manager;
|
||||
};
|
||||
HKBManager() __attribute__((never_inline));
|
||||
static HKBManager& getInstance() { return sInstance; }
|
||||
void Initialize();
|
||||
void ClearState();
|
||||
u32 FilterCharacter(u32 code) const {
|
||||
if (allowedCharacters == 0) return code;
|
||||
u32 count = allowedCharacterCount;
|
||||
if (count == 0) return code;
|
||||
for (u32 index = 0; index < count; index++) {
|
||||
if (static_cast<u16>(code) == allowedCharacters[index]) return code;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void DetachDevice(KBDDevEvent* event) {
|
||||
u8 device = event->device;
|
||||
attached[device] = 0;
|
||||
states[device].Clear();
|
||||
}
|
||||
u32 GetModifierState() const;
|
||||
void SetCountry(u8 country);
|
||||
void SetModifierState(u32 state, u32 mask);
|
||||
void SetForceModifierState(u32 state, u32 mask);
|
||||
void Update();
|
||||
KeySet GetTriggeredKeySet() const;
|
||||
KeySet GetReleasedKeySet() const;
|
||||
KeySet GetRepeatedKeySet() const;
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
KeySet GetReleasedKeySet() const;
|
||||
#endif
|
||||
static void SetLedCB(_KBDEc result, void* userData);
|
||||
static void AttachCB(KBDDevEvent* event);
|
||||
static void DetachCB(KBDDevEvent* event);
|
||||
static void KeyEventCB(KBDKeyEvent* event);
|
||||
private:
|
||||
u8 initialized;
|
||||
u8 attached[2];
|
||||
u32 lockState;
|
||||
u32 retryDevices;
|
||||
const wchar_t* allowedCharacters;
|
||||
u32 allowedCharacterCount;
|
||||
KeyState_ states[2];
|
||||
KBDListenerOwn listener;
|
||||
static HKBManager sInstance;
|
||||
};
|
||||
#else
|
||||
class HKBManager {
|
||||
public:
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
void ClearState();
|
||||
#endif
|
||||
static HKBManager& getInstance() { return sInstance; }
|
||||
|
||||
void Initialize();
|
||||
void Update();
|
||||
|
||||
u32 GetModifierState() const;
|
||||
void SetModifierState(u32 state, u32 mask);
|
||||
void SetForceModifierState(u32 state, u32 mask);
|
||||
u32 GetModifierState() const;
|
||||
void SetCountry(u8 country);
|
||||
void ClearState();
|
||||
void SetModifierState(u32, u32);
|
||||
|
||||
#if defined(TI_CELLPHONE_HKB_KEYSET)
|
||||
class KeySet {
|
||||
public:
|
||||
KeySet(const HKBManager* manager, u8 type) :
|
||||
mpManager(manager), mType(type),
|
||||
mIndex(-1), mSubIndex(0), mVCode(0) {}
|
||||
|
||||
u8 GetKey() const;
|
||||
wchar_t GetWChar() const;
|
||||
wchar_t GetVCode() const;
|
||||
bool IsValid() const;
|
||||
KeySet GetNext() const;
|
||||
|
||||
const HKBManager* mpManager; // 0x00
|
||||
u8 mType; // 0x04
|
||||
s8 mIndex; // 0x05
|
||||
u8 mSubIndex; // 0x06
|
||||
mutable u16 mVCode; // 0x08
|
||||
u8 GetKey() const;
|
||||
u32 GetWChar() const;
|
||||
bool IsValid() const;
|
||||
KeySet GetNext() const;
|
||||
KeySet(const KeySet& other)
|
||||
: mpManager(other.mpManager), mKind(other.mKind), mIndex(other.mIndex),
|
||||
mDevice(other.mDevice), mCharacter(other.mCharacter) {}
|
||||
private:
|
||||
const HKBManager* mpManager;
|
||||
u8 mKind;
|
||||
s8 mIndex;
|
||||
u8 mDevice;
|
||||
u16 mCharacter;
|
||||
};
|
||||
|
||||
KeySet GetTriggeredKeySet() const;
|
||||
KeySet GetReleasedKeySet() const;
|
||||
KeySet GetRepeatedKeySet() const;
|
||||
#else
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
class KeySet {
|
||||
public:
|
||||
u8 GetKey() const;
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
u32 GetWChar() const;
|
||||
#else
|
||||
wchar_t GetWChar() const;
|
||||
#endif
|
||||
bool IsValid() const;
|
||||
KeySet GetNext() const;
|
||||
KeySet(const KeySet& other)
|
||||
: mpManager(other.mpManager), mKind(other.mKind), mIndex(other.mIndex), mDevice(other.mDevice), mCharacter(other.mCharacter) {}
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
KeySet() : mpManager(NULL), mKind(0), mIndex(-1), mDevice(0), mCharacter(0) {}
|
||||
#endif
|
||||
private:
|
||||
const HKBManager* mpManager;
|
||||
u8 mKind;
|
||||
s8 mIndex;
|
||||
u8 mDevice;
|
||||
u16 mCharacter;
|
||||
};
|
||||
KeySet GetTriggeredKeySet() const;
|
||||
KeySet GetRepeatedKeySet() const;
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
KeySet GetReleasedKeySet() const;
|
||||
#endif
|
||||
void SetForceModifierState(u32 mask, u32 state);
|
||||
#else
|
||||
class KeySet {
|
||||
private:
|
||||
keyboard::cellphonetype::PaneNameToCharCode* pPaneNameToCharCode; // 0x00
|
||||
wchar_t szKeySetName[17]; // 0x04
|
||||
u16 uNum; // 0x26
|
||||
u16 uType; // 0x28
|
||||
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
public:
|
||||
bool IsValid() const;
|
||||
u32 GetKey() const;
|
||||
wchar_t GetWChar() const;
|
||||
KeySet GetNext() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
KeySet GetTriggeredKeySet() const;
|
||||
KeySet GetRepeatedKeySet() const;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
private:
|
||||
class KeyState_ {
|
||||
public:
|
||||
void NotifyEvent(u8 type, u8 key);
|
||||
void Update();
|
||||
void UpdateModState_();
|
||||
|
||||
u8 mKbdChan; // 0x00
|
||||
u8 pad_0x01[3];
|
||||
u32 mMaskWork; // 0x04
|
||||
u32 mTrigMask; // 0x08
|
||||
u32 mRelMask; // 0x0C
|
||||
u32 mRepMask; // 0x10
|
||||
u32 mPrevMask; // 0x14
|
||||
u32 mCurMask; // 0x18
|
||||
u32 mInputMask; // 0x1C
|
||||
u32 mModState; // 0x20
|
||||
u32 mForceMod; // 0x24
|
||||
u32 mForceMask; // 0x28
|
||||
s32 mCountry; // 0x2C
|
||||
u8 mLedOK; // 0x30
|
||||
u8 mReleasedKeys[8]; // 0x31
|
||||
u8 mPrevKeys[8]; // 0x39
|
||||
u8 mCurKeys[8]; // 0x41
|
||||
u8 pad_0x49[3];
|
||||
u32 mRepeatCtr[8]; // 0x4C
|
||||
};
|
||||
|
||||
class KBDListener {
|
||||
public:
|
||||
KBDListener() : unk_0x04(0), mpNext(NULL) {}
|
||||
virtual ~KBDListener() {}
|
||||
virtual void OnAttach(KBDDevEvent* event);
|
||||
virtual void OnDetach(KBDDevEvent* event);
|
||||
virtual void OnKeyEvent(KBDKeyEvent* event);
|
||||
|
||||
u32 unk_0x04;
|
||||
KBDListener* mpNext;
|
||||
};
|
||||
|
||||
class KBDListenerOwn : public KBDListener {
|
||||
public:
|
||||
KBDListenerOwn(HKBManager* manager) : mpManager(manager) {}
|
||||
|
||||
virtual void OnAttach(KBDDevEvent* event);
|
||||
virtual void OnDetach(KBDDevEvent* event);
|
||||
virtual void OnKeyEvent(KBDKeyEvent* event);
|
||||
|
||||
HKBManager* mpManager; // 0x0C
|
||||
};
|
||||
|
||||
static void SetLedCB(KBDEc result, void* arg);
|
||||
static void AttachCB(KBDDevEvent* event);
|
||||
static void DetachCB(KBDDevEvent* event);
|
||||
static void KeyEventCB(KBDKeyEvent* event);
|
||||
|
||||
u8 mInitialized; // 0x00
|
||||
u8 mAttached[2]; // 0x01
|
||||
u8 pad_0x03;
|
||||
u32 mModState; // 0x04
|
||||
u32 mPendingLeds; // 0x08
|
||||
const wchar_t* mpKeyTable; // 0x0C
|
||||
u32 mKeyTableNum; // 0x10
|
||||
KeyState_ mKeyStates[2]; // 0x14
|
||||
KBDListenerOwn mListener; // 0xEC
|
||||
u8 unk_0x00[0xFC];
|
||||
|
||||
static HKBManager sInstance;
|
||||
};
|
||||
|
||||
#endif
|
||||
} // namespace input
|
||||
} // namespace textinput
|
||||
|
||||
|
||||
@@ -8,39 +8,63 @@ namespace textinput {
|
||||
class Manager;
|
||||
namespace keyboard {
|
||||
namespace hwkey {
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
class HWKeyboard : public CommandSender {
|
||||
#else
|
||||
class HWKeyboard : CommandSender {
|
||||
#endif
|
||||
public:
|
||||
struct AnimationFile {
|
||||
u32 mAnimationNo;
|
||||
char mFileName[0x40];
|
||||
};
|
||||
static const AnimationFile csAninationFile[8];
|
||||
|
||||
HWKeyboard(Manager *);
|
||||
#if defined(TIMANAGER_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
inline ~HWKeyboard();
|
||||
#else
|
||||
~HWKeyboard();
|
||||
#endif
|
||||
#if defined(TIMANAGER_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
void setLanguage(Destination destination, Language language);
|
||||
#endif
|
||||
|
||||
virtual void init();
|
||||
virtual ~HWKeyboard();
|
||||
#if defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
wchar_t convertWCCode(wchar_t code) const;
|
||||
#endif
|
||||
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
|
||||
void updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data);
|
||||
#else
|
||||
virtual void updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data);
|
||||
#endif
|
||||
virtual bool updateInput(input::HKBManager& hkbManager);
|
||||
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
void resetQuoteState() { mbSingleQuoteClosing = 0; mbDoubleQuoteClosing = 0; }
|
||||
#endif
|
||||
private:
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
bool updateRepeatKey_(input::HKBManager&);
|
||||
bool updateTriggerKey_(input::HKBManager&);
|
||||
bool updateTappingShift_(input::HKBManager&);
|
||||
#endif
|
||||
void updateShift(input::HKBManager& hkbManager);
|
||||
bool updateRepeatKey_(input::HKBManager& hkbManager);
|
||||
bool updateTriggerKey_(input::HKBManager& hkbManager);
|
||||
bool updateTappingShift_(input::HKBManager& hkbManager);
|
||||
public:
|
||||
u16 convertWCCode(wchar_t wc) const;
|
||||
void setLanguage(Destination destination, Language language);
|
||||
private:
|
||||
void controlKeyTriggeredHandler(input::HKBManager);
|
||||
bool controlKeyTriggeredHandler(input::HKBManager&);
|
||||
|
||||
Manager *mgr() { return mpManager; }
|
||||
const Manager *mgr() const { return mpManager; }
|
||||
|
||||
Manager* mpManager; // 0x10
|
||||
u8 field_0x14; // 0x14
|
||||
bool field_0x15; // 0x15
|
||||
bool field_0x16; // 0x16
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
u8 mbSingleQuoteClosing;
|
||||
u8 mbDoubleQuoteClosing;
|
||||
#else
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
bool field_0x15;
|
||||
bool field_0x16;
|
||||
#else
|
||||
u8 field_0x15; // 0x15
|
||||
u8 field_0x16; // 0x16
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -13,17 +13,43 @@
|
||||
#include "tiZiString.h"
|
||||
#include "tiSEId.h"
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
extern "C" wchar_t KPRGetChar(KPRQueue* queue);
|
||||
extern "C" void KPRPutChar(KPRQueue* queue, wchar_t character);
|
||||
extern "C" void KPRClearQueue(KPRQueue* queue);
|
||||
extern "C" void KPRInitRegionUS();
|
||||
extern "C" u8 KPRLookAhead(KPRQueue* queue, wchar_t* character, wchar_t* combining);
|
||||
#endif
|
||||
|
||||
namespace textinput {
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
class Manager;
|
||||
#endif
|
||||
namespace inputform {
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
class Base;
|
||||
class EventHandler;
|
||||
class LayoutByNW4R;
|
||||
#endif
|
||||
class EditBuffer {
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
friend class textinput::Manager;
|
||||
public:
|
||||
EditBuffer() : mpString(NULL), mpUnfixString(NULL), mpZiString(NULL), mpAllocator(NULL) {}
|
||||
#endif
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
friend class LayoutByNW4R;
|
||||
friend class Base;
|
||||
#endif
|
||||
public:
|
||||
EditBuffer() : mpString(NULL), mpUnfixString(NULL), mpZiString(NULL), mpAllocator(NULL) {}
|
||||
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
void create(MEMAllocator* allocator);
|
||||
#endif
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
virtual ~EditBuffer();
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
|
||||
void* getString() const { return mpString; }
|
||||
void* getZiString() const { return mpZiString; }
|
||||
#else
|
||||
~EditBuffer();
|
||||
#endif
|
||||
|
||||
private:
|
||||
void* mpString; // 0x04
|
||||
@@ -33,10 +59,27 @@ namespace textinput {
|
||||
};
|
||||
|
||||
class DeadKeyStream {
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
public:
|
||||
DeadKeyStream() { KPRInitRegionUS(); init(); }
|
||||
static wchar_t ToCombineClass(Language language, wchar_t code);
|
||||
static wchar_t ToIndependentClass(wchar_t code);
|
||||
inline wchar_t getChar();
|
||||
void init();
|
||||
u8 lookAhead() { return KPRLookAhead(&mKPRQueue, NULL, NULL); }
|
||||
void putChar(wchar_t character) { KPRPutChar(&mKPRQueue, character); }
|
||||
bool isEmpty() const { return mKPRQueue.oCount == 0; }
|
||||
void clear() { KPRClearQueue(&mKPRQueue); }
|
||||
private:
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
friend class textinput::Manager;
|
||||
#endif
|
||||
static bool sbCompatibleFilterEnabled;
|
||||
static wchar_t ToIndependentClass(wchar_t wc);
|
||||
|
||||
static inline bool isCompatible(wchar_t character);
|
||||
#elif defined(TI_PC_KEYBOARD_IMPLEMENTATION)
|
||||
public:
|
||||
static wchar_t ToIndependentClass(wchar_t code);
|
||||
#endif
|
||||
private:
|
||||
KPRQueue mKPRQueue; // 0x00
|
||||
};
|
||||
@@ -85,17 +128,61 @@ namespace textinput {
|
||||
|
||||
// TODO - location
|
||||
class RowInfoManager {
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
friend class LayoutByNW4R;
|
||||
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:
|
||||
Info_* mpInfo; // 0x00
|
||||
u16 mMaxLength; // 0x04
|
||||
MEMAllocator* mpAllocator; // 0x08
|
||||
};
|
||||
|
||||
#ifdef TISIGNWINDOW_IMPLEMENTATION
|
||||
bool isAtokActive() const;
|
||||
#endif
|
||||
#if defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void init();
|
||||
virtual void onCommand(INPUT_COMMAND command, void* data);
|
||||
#endif
|
||||
virtual ~Base();
|
||||
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void init();
|
||||
virtual void onCommand(INPUT_COMMAND command, void* data);
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
Base(Manager* manager);
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void init();
|
||||
virtual void onCommand(INPUT_COMMAND command, void* data);
|
||||
void setCursorPos(tistring::Decolated* string, u32 pos);
|
||||
void calcCursorTimer();
|
||||
bool isAtokActive() const;
|
||||
bool isVacancy() const;
|
||||
void dirtyCacheAll();
|
||||
tistring::Decolated* getCurrentString(bool inputting);
|
||||
void moveCandidateToIdx(s32 index);
|
||||
void onPressDownHWKB();
|
||||
void onPressLeftHWKB();
|
||||
void onPressRightHWKB();
|
||||
void toggleAtokMode_(u8 operation);
|
||||
void onSpaceKeyHWKB(u32 modifiers);
|
||||
void onHKBCtrlCode(HVKCode code, u32 modifiers);
|
||||
void confirmInput_();
|
||||
void confirmInputting_(wchar_t character, bool direct, u16 letterMode, bool confirmOnly, void* holdingKey);
|
||||
void inputCharZi_(wchar_t character, u32 modifiers);
|
||||
void inputCharDefault_(wchar_t character, u32 modifiers);
|
||||
void inputInputting_(wchar_t character);
|
||||
inline bool hasZiPredictions() const;
|
||||
inline bool usesZiPrediction() const;
|
||||
inline void resetPredictionContext();
|
||||
inline void resetInputRelation();
|
||||
#endif
|
||||
|
||||
virtual void create(MEMAllocator* allocator, EditBuffer* editBuffer);
|
||||
|
||||
@@ -134,7 +221,6 @@ namespace textinput {
|
||||
virtual void setAtokDictionary(void* atokDict, int atokDictSize, void* apotDict, int apotDictSize, void* nintendoDict, int nintendoDictSize);
|
||||
virtual void closeAtokDictionary();
|
||||
virtual bool isAtokDictionaryOpened();
|
||||
bool isAtokActive() const;
|
||||
|
||||
void setZiDictionary(void* ziOemDict, void* ziDict) {
|
||||
mpZiString->openDictionary(ziDict, ziOemDict);
|
||||
@@ -144,7 +230,6 @@ namespace textinput {
|
||||
|
||||
void initZiString();
|
||||
void resetContextPredict_();
|
||||
void dirtyCacheAll();
|
||||
|
||||
void notifyChangeMode();
|
||||
|
||||
@@ -153,9 +238,12 @@ namespace textinput {
|
||||
|
||||
virtual void enableSpaceByRight(bool rightWithSpace);
|
||||
virtual void onClose();
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
tistring::WithAtok* getCurrentString(bool fixed);
|
||||
virtual bool canConvert() { return getCurrentString(false) == mpUnfixString; }
|
||||
#else
|
||||
virtual bool canConvert();
|
||||
|
||||
void* getCurrentString(bool flag);
|
||||
#endif
|
||||
|
||||
virtual void setString(const wchar_t* string);
|
||||
|
||||
@@ -185,6 +273,10 @@ namespace textinput {
|
||||
|
||||
virtual void onSE(sound::SE seId);
|
||||
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
void dirtyCacheAll();
|
||||
#endif
|
||||
|
||||
virtual void clear();
|
||||
|
||||
virtual u32 calcCursorPos(f32 x, f32 y);
|
||||
@@ -201,15 +293,21 @@ namespace textinput {
|
||||
|
||||
virtual void makeUpCursorPos(CursorPos* cursorPos, u32 pos, s32 startLine, s32 endLine);
|
||||
|
||||
bool isVacancy() const;
|
||||
bool isPredictOn() const { return mbPredictOn; }
|
||||
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
protected:
|
||||
#if !defined(TIINPUTFORM_IMPLEMENTATION) && !defined(TIMANAGER_IMPLEMENTATION)
|
||||
void setCursorPos(tistring::Decolated* string, u32 pos);
|
||||
void calcCursorTimer();
|
||||
#endif
|
||||
void resetRelation();
|
||||
|
||||
nw4r::ut::Rect mRect; // 0x120
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
nw4r::ut::Rect mRect;
|
||||
#else
|
||||
Rect mRect;
|
||||
#endif
|
||||
nw4r::math::MTX34 mMtx; // 0x130
|
||||
Destination meDestination; // 0x160
|
||||
tistring::Decolated* mpString; // 0x164
|
||||
@@ -217,6 +315,9 @@ namespace textinput {
|
||||
tistring::WithZi* mpZiString; // 0x16C
|
||||
InputMode meInputMode; // 0x170
|
||||
PredictMode mePredictMode; // 0x174
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
friend class textinput::Manager;
|
||||
#endif
|
||||
bool mbPredictOn; // 0x178
|
||||
bool mbDoWordWrap; // 0x179
|
||||
bool mbRightWithSpace; // 0x17A
|
||||
@@ -252,14 +353,18 @@ namespace textinput {
|
||||
};
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout {
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
friend class EventHandler;
|
||||
inline const nw4r::lyt::Pane* getLanguageTextPane() const;
|
||||
#endif
|
||||
public:
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName,
|
||||
EventObserver* observer, const char* subName);
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
LayoutByNW4R(textinput::Manager*, nw4r::lyt::MultiArcResourceAccessor*, const char*, EventObserver*, const char*);
|
||||
#endif
|
||||
~LayoutByNW4R();
|
||||
|
||||
virtual void init();
|
||||
virtual void onCommand(INPUT_COMMAND command, void* data);
|
||||
virtual void onSE(sound::SE seId);
|
||||
|
||||
virtual void create(MEMAllocator* allocator, EditBuffer* editBuffer);
|
||||
|
||||
@@ -270,6 +375,9 @@ namespace textinput {
|
||||
|
||||
virtual nw4r::math::VEC2 getScale() const;
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
void updateRepeatInput(u32 trig, u32 hold);
|
||||
#endif
|
||||
virtual void updateInputCommon(int chan, u32 trig, u32 hold, u32 release, void* data);
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data);
|
||||
virtual bool updateInput(textinput::input::HKBManager& hkbManager);
|
||||
@@ -280,27 +388,38 @@ namespace textinput {
|
||||
virtual void setRootPaneScaleFor16x9();
|
||||
virtual void setRootPaneScaleFor4x3();
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual void onSE(sound::SE seId);
|
||||
#endif
|
||||
|
||||
virtual void visibleSeparator(bool flag);
|
||||
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
protected:
|
||||
u8 unk_0x2C0[0x0C];
|
||||
bool mbAbleToUp; // 0x2CC
|
||||
bool mbAbleToDown; // 0x2CD
|
||||
bool mbSeparator; // 0x2CE
|
||||
u8 unk_0x2CF;
|
||||
nw4rmanager::TiEventHandler* mpInputEventHandler; // 0x2D0
|
||||
u8 unk_0x2D4[0x34];
|
||||
};
|
||||
|
||||
#ifdef TI_INPUTFORM_SAMPLE_CLASS
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName,
|
||||
EventObserver* observer, const char* subName)
|
||||
: LayoutByNW4R(manager, resAccessor, arcName, observer, subName) {}
|
||||
virtual ~Sample();
|
||||
};
|
||||
const void* mpLayoutData;
|
||||
const void* mpLanguageData;
|
||||
const char* mpFontName;
|
||||
bool mbUpVisible;
|
||||
bool mbDownVisible;
|
||||
bool mbRepeat;
|
||||
nw4rmanager::TiEventHandler* mpInputEventHandler;
|
||||
nw4r::ut::ResFont mFont;
|
||||
int mUpRepeat;
|
||||
int mDownRepeat;
|
||||
int mLeftRepeat;
|
||||
int mRightRepeat;
|
||||
int mDeleteRepeat;
|
||||
int mConfirmRepeat;
|
||||
u32 mRepeatButtons;
|
||||
#else
|
||||
private:
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
u8 unk_0x2C0[0x48];
|
||||
#else
|
||||
u8 unk_0x2C0[0x4C];
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
}
|
||||
typedef inputform::LayoutByNW4R InputForm;
|
||||
typedef inputform::Base InputFormBase;
|
||||
|
||||
@@ -8,16 +8,50 @@ namespace textinput {
|
||||
|
||||
class KeyboardBase : public CommandSender {
|
||||
public:
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
KeyboardBase() : meLanguage(JP) {}
|
||||
|
||||
#endif
|
||||
virtual ~KeyboardBase() {}
|
||||
#if !(defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) && !defined(TIMANAGER_IMPLEMENTATION) && !defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual void create(MEMAllocator* alloc) override;
|
||||
virtual void init() override;
|
||||
|
||||
#ifndef TI_CELLPHONE_MATCH_LAYOUT
|
||||
virtual void setCommandReceiver(CommandReceiver* receiver) override;
|
||||
virtual void sendCommand(u32 command, void*) override;
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(TIMANAGER_IMPLEMENTATION) && !defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual void updateFromReceiver(u32, void*) override;
|
||||
#endif
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual void onKey(u32, void*);
|
||||
#else
|
||||
virtual void onKey(u32);
|
||||
#endif
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
virtual u32 getType();
|
||||
#elif (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
virtual int getType();
|
||||
#else
|
||||
virtual void getType();
|
||||
#endif
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
virtual void setLanguage(Language language) { meLanguage = language; }
|
||||
#else
|
||||
virtual void setLanguage(Language language);
|
||||
#endif
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#ifdef TISIGNWINDOW_IMPLEMENTATION
|
||||
virtual Language getLanguage() const;
|
||||
#else
|
||||
virtual Language getLanguage() const { return meLanguage; }
|
||||
#endif
|
||||
virtual void update() {}
|
||||
#else
|
||||
virtual Language getLanguage() const;
|
||||
virtual void update();
|
||||
#endif
|
||||
virtual void onActive();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -19,12 +19,13 @@ namespace textinput {
|
||||
bool isHoldingShift() const {
|
||||
return isHWPressedShift() || isPressedShiftB();
|
||||
}
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
u8 isCapsLock() const { return mbCpasLock; }
|
||||
void setPressedShiftB(bool pressed) { mbPressedShiftB = pressed; }
|
||||
#endif
|
||||
u8 isHWPressedShift() const { return mbPressedShift; }
|
||||
u8 isPressedShiftB() const { return mbPressedShiftB; }
|
||||
void setHWPressedShift(u8 arg) { mbPressedShift = arg; }
|
||||
void setPressedShiftB(u8 arg) { mbPressedShiftB = arg; }
|
||||
void clearPressedShift() { mbPressedShift = 0; mbPressedShiftB = 0; }
|
||||
void setHWPressedShift(const u8& arg) { mbPressedShift = arg; }
|
||||
|
||||
class Singleton {
|
||||
public:
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#include "tiToolBar.h"
|
||||
#include "tiPcKeyboard.h"
|
||||
#include "tiCellPhone.h"
|
||||
#include "tiPredictLang.h"
|
||||
#include "tiSignWindow.h"
|
||||
|
||||
#include <nw4r/lyt/pane.h>
|
||||
#include <nw4r/lyt/arcResourceAccessor.h>
|
||||
@@ -25,16 +23,25 @@
|
||||
namespace textinput {
|
||||
class EventObserver {
|
||||
public:
|
||||
virtual void onInput(CommandReceiver::INPUT_COMMAND command, void* data); // 0x08
|
||||
virtual void onCommand(CommandReceiver::INPUT_COMMAND command, void* data); // 0x0C
|
||||
virtual void onEvent(nw4r::lyt::Pane* pane, u32 event); // 0x10
|
||||
virtual void onInput(CommandReceiver::INPUT_COMMAND command, void* data) {} // 0x08
|
||||
virtual void onCommand(CommandReceiver::INPUT_COMMAND command, void* data) {} // 0x0C
|
||||
virtual void onEvent(nw4r::lyt::Pane* pane, u32 event) {} // 0x10
|
||||
|
||||
virtual void onSE(sound::SE seId);
|
||||
virtual void onOK();
|
||||
virtual void onCancel();
|
||||
virtual void onOutOfLength();
|
||||
virtual void onSE(sound::SE seId) {}
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
virtual void onOK();
|
||||
virtual void onCancel();
|
||||
virtual void onOutOfLength();
|
||||
#else
|
||||
virtual void onOK() { printf("OK!\n"); }
|
||||
virtual void onCancel() { printf("Cancel!\n"); }
|
||||
virtual void onOutOfLength() { printf("OutOfLength\n"); }
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
namespace predictlang { class LayoutByNW4R; }
|
||||
#endif
|
||||
class Manager : public Base {
|
||||
public:
|
||||
Manager(MEMAllocator* allocator, nw4r::lyt::MultiArcResourceAccessor* multiArc, textinput::EventObserver* event);
|
||||
@@ -57,7 +64,10 @@ namespace textinput {
|
||||
virtual void setWCString(const wchar_t* string);
|
||||
|
||||
virtual void setLanguage(Language language);
|
||||
virtual Language getLanguage() const;
|
||||
virtual Language getLanguage() const { return meLanguage; }
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
Language getLanguageForMemo() const { return meLanguage; }
|
||||
#endif
|
||||
|
||||
virtual void setDestination(Destination destination);
|
||||
|
||||
@@ -68,49 +78,86 @@ namespace textinput {
|
||||
|
||||
virtual void setAspectRatio(bool b4x3);
|
||||
|
||||
#ifdef MYTIMANAGER_IMPLEMENTATION
|
||||
MEMAllocator* getAllocatorForMemo() const { return mpAllocator; }
|
||||
inputform::EditBuffer* getEditBufferForMemo() const { return mpEditBuffer; }
|
||||
void setEditBufferForMemo(inputform::EditBuffer* editBuffer) { mpEditBuffer = editBuffer; }
|
||||
void setHWKeyboardForMemo(keyboard::hwkey::HWKeyboard* keyboard) { mpHWKeyboard = keyboard; }
|
||||
nw4r::lyt::MultiArcResourceAccessor* getMultiArcForMemo() const { return mpMultiArcResourceAccessor; }
|
||||
EventObserver* getEventObserverForMemo() const { return mpEventObserver; }
|
||||
InputForm* getInputFormForMemo() const { return mpInputForm; }
|
||||
void setInputFormForMemo(InputForm* inputForm) { mpInputForm = inputForm; }
|
||||
toolbar::LayoutByNW4R* getToolBarForMemo() const { return mpToolBar; }
|
||||
candidatebox::LayoutByNW4R* getCandidateBoxForMemo() const { return mpCandidateBox; }
|
||||
void setPCKeyboardForMemo(keyboard::pctype::LayoutByNW4R* keyboard) { mpPCKeyboard = keyboard; }
|
||||
void setCellPhoneKeyboardForMemo(keyboard::cellphonetype::LayoutByNW4R* keyboard) { mpCellPhoneKeyboard = keyboard; }
|
||||
void setCandidateBoxForMemo(candidatebox::LayoutByNW4R* candidateBox) { mpCandidateBox = candidateBox; }
|
||||
void setToolBarForMemo(toolbar::LayoutByNW4R* toolBar) { mpToolBar = toolBar; }
|
||||
void setPredictLanguageDialogForMemo(void* dialog) { mpPredictLanguageDialog = dialog; }
|
||||
void setSignWindowForMemo(void* signWindow) { mpSignWindow = signWindow; }
|
||||
void* getSignWindowForMemo() const { return mpSignWindow; }
|
||||
keyboard::pctype::LayoutByNW4R* getPCKeyboardForMemo() const { return mpPCKeyboard; }
|
||||
keyboard::cellphonetype::LayoutByNW4R* getCellPhoneKeyboardForMemo() const { return mpCellPhoneKeyboard; }
|
||||
Destination getDestinationForMemo() const { return meDestination; }
|
||||
void initAspect();
|
||||
#endif
|
||||
|
||||
virtual void setSecretInputMode(bool secretInputMode) { mpInputForm->setSecretModeOn(secretInputMode); }
|
||||
#if defined(IPL_ADDRESS_EDIT_CPP) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
void enableKSXFilter(bool compatibleFilter);
|
||||
#endif
|
||||
|
||||
virtual void setDefaultPredictionJP(int num, const char** predicts);
|
||||
virtual void setFixedPredictionJP(int num, const char** predicts);
|
||||
|
||||
virtual void setTitleText(wchar_t* titleText);
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
virtual void setTitleText(wchar_t* titleText);
|
||||
void initAspect();
|
||||
#elif defined(MYTIMANAGER_IMPLEMENTATION)
|
||||
virtual void setTitleText(wchar_t* titleText);
|
||||
#else
|
||||
virtual void setTitleText(const wchar_t* titleText);
|
||||
#endif
|
||||
|
||||
void setTitleText(const wchar_t* titleText) {
|
||||
nw4r::lyt::Pane* pane = mpInputForm->getPane("T_title_text");
|
||||
nw4r::lyt::TextBox* textBox = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(pane);
|
||||
if (textBox != NULL) {
|
||||
textBox->SetString(titleText, 0);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void start();
|
||||
virtual void end();
|
||||
virtual void start() {}
|
||||
virtual void end() {}
|
||||
|
||||
#ifdef TIHWKEYBOARD_IMPLEMENTATION
|
||||
EventObserver* getEventObserverForHardware() const { return mpEventObserver; }
|
||||
#endif
|
||||
virtual InputForm* getInputForm() { return mpInputForm; }
|
||||
virtual const InputForm* getInputForm() const;
|
||||
virtual const InputForm* getInputForm() const { return mpInputForm; }
|
||||
|
||||
virtual keyboard::hwkey::HWKeyboard* getHWKeyboard() { return mpHWKeyboard; }
|
||||
virtual const keyboard::hwkey::HWKeyboard* getHWKeyboard() const;
|
||||
virtual const keyboard::hwkey::HWKeyboard* getHWKeyboard() const { return mpHWKeyboard; }
|
||||
|
||||
virtual keyboard::pctype::LayoutByNW4R* getPCKeyboard();
|
||||
virtual const keyboard::pctype::LayoutByNW4R* getPCKeyboard() const;
|
||||
virtual keyboard::pctype::LayoutByNW4R* getPCKeyboard() { return mpPCKeyboard; }
|
||||
virtual const keyboard::pctype::LayoutByNW4R* getPCKeyboard() const { return mpPCKeyboard; }
|
||||
|
||||
virtual keyboard::cellphonetype::LayoutByNW4R* getCellPhoneKeyboard() { return mpCellPhoneKeyboard; }
|
||||
virtual const keyboard::cellphonetype::LayoutByNW4R* getCellPhoneKeyboard() const;
|
||||
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();
|
||||
virtual candidatebox::LayoutByNW4R* getCandidateBox() { return mpCandidateBox; }
|
||||
virtual const candidatebox::LayoutByNW4R* getCandidateBox() const { return mpCandidateBox; }
|
||||
|
||||
virtual toolbar::LayoutByNW4R* getToolBar();
|
||||
virtual const toolbar::LayoutByNW4R* getToolBar() const;
|
||||
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;
|
||||
|
||||
EventObserver* getEventObserver() { return mpEventObserver; }
|
||||
#else
|
||||
virtual void* getPredictLanguageSelectDialog() { return mpPredictLanguageDialog; }
|
||||
virtual const void* getPredictLanguageSelectDialog() const { return mpPredictLanguageDialog; }
|
||||
#endif
|
||||
|
||||
virtual inputform::EditBuffer* createEditBuffer();
|
||||
virtual keyboard::hwkey::HWKeyboard* createHWKeyboard();
|
||||
@@ -126,17 +173,14 @@ namespace textinput {
|
||||
virtual void setLayoutScaleFor4x3();
|
||||
|
||||
void enableCompatibleFilter(bool compatibleFilter);
|
||||
void enableKSXFilter(bool flag);
|
||||
|
||||
void startPredictTurnOn(bool flag);
|
||||
bool isPredictTurning() const;
|
||||
|
||||
bool isVacancy() const;
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
bool isPredictTurning() const;
|
||||
void startPredictTurnOn(bool enabled);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void initAspect();
|
||||
|
||||
protected:
|
||||
private:
|
||||
MEMAllocator* mpAllocator; // 0x04
|
||||
nw4r::lyt::MultiArcResourceAccessor* mpMultiArcResourceAccessor; // 0x08
|
||||
|
||||
@@ -148,9 +192,14 @@ namespace textinput {
|
||||
InputForm* mpInputForm; // 0x1C
|
||||
candidatebox::LayoutByNW4R* mpCandidateBox; // 0x20
|
||||
toolbar::LayoutByNW4R* mpToolBar; // 0x24
|
||||
predictlang::LayoutByNW4R* mpPredictLanguageDialog; // 0x28
|
||||
keyboard::signwindow::LayoutByNW4R* mpSignWindow; // 0x2C
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
predictlang::LayoutByNW4R* mpPredictLanguageDialog;
|
||||
keyboard::signwindow::LayoutByNW4R* mpSignWindow;
|
||||
#else
|
||||
void* mpPredictLanguageDialog; // 0x28
|
||||
void* mpSignWindow; // 0x2C
|
||||
|
||||
#endif
|
||||
EventObserver* mpEventObserver; // 0x30
|
||||
|
||||
Destination meDestination; // 0x34
|
||||
|
||||
@@ -14,20 +14,29 @@ namespace textinput {
|
||||
class TiEventHandler : public gui::EventHandler {
|
||||
public:
|
||||
typedef struct Input {
|
||||
u32 field_0x00; // 0x00 chan
|
||||
f32 mfX; // 0x04
|
||||
f32 mfY; // 0x08
|
||||
u32 field_0x0C; // 0x0C trigger
|
||||
u32 field_0x10; // 0x10 hold
|
||||
u32 field_0x14; // 0x14 release
|
||||
u8 dummy[8]; // 0x18
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
u32 controller;
|
||||
f32 x;
|
||||
f32 y;
|
||||
u32 trigger;
|
||||
u32 hold;
|
||||
u32 release;
|
||||
u8 remaining[8];
|
||||
#else
|
||||
// todo
|
||||
u32 field_0x00; // 0x00
|
||||
u8 dummy[8];
|
||||
u32 field_0x0C; // 0x0C
|
||||
u32 field_0x10; // 0x10
|
||||
u8 dummy2[12];
|
||||
#endif
|
||||
} Input;
|
||||
|
||||
virtual void onEvent(gui::GUIComponent& comp, u32 event, void* data); // 0x0C
|
||||
|
||||
virtual void onTiEvent(gui::PaneComponent* paneComponent, u32 event, Input* input) = 0; // 0x18
|
||||
|
||||
virtual void setEventObserver(EventObserver *event); // 0x1C
|
||||
virtual void setEventObserver(EventObserver *event) { mpEventObserver = event; } // 0x1C
|
||||
|
||||
protected:
|
||||
EventObserver* mpEventObserver; // 0x08
|
||||
@@ -81,21 +90,35 @@ namespace textinput {
|
||||
PE_5,
|
||||
PE_6,
|
||||
PE_7,
|
||||
PE_8,
|
||||
PE_9,
|
||||
PE_10,
|
||||
PE_11,
|
||||
PE_Last,
|
||||
} AnmPaneEvent;
|
||||
|
||||
virtual void init() {} // 0x08
|
||||
virtual void calc(); // 0x0C
|
||||
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent); // 0x10
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
virtual void onAnmEvent(AnmPaneEvent) {}
|
||||
#else
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent);
|
||||
#endif // 0x10
|
||||
|
||||
virtual void changeAnimation(u32 id); // 0x14
|
||||
virtual bool isInAnimation(); // 0x18
|
||||
virtual Anim* searchAnimation(u32 id); // 0x1C
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
virtual bool isInAnimation() { return mpCurrentAnim != NULL; }
|
||||
#else
|
||||
virtual bool isInAnimation();
|
||||
#endif // 0x18
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
virtual Anim* searchAnimation(u32 id) {
|
||||
for (Anim* animation = static_cast<Anim*>(nw4r::ut::List_GetNext(&mAnms, NULL)); animation != NULL;
|
||||
animation = static_cast<Anim*>(nw4r::ut::List_GetNext(&mAnms, animation))) {
|
||||
if (animation->muID == id) return animation;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
virtual Anim* searchAnimation(u32 id);
|
||||
#endif // 0x1C
|
||||
|
||||
virtual ~AnmPane(); // 0x20
|
||||
|
||||
@@ -133,11 +156,11 @@ namespace textinput {
|
||||
|
||||
class AnimPaneGroup {
|
||||
public:
|
||||
AnimPaneGroup() {}
|
||||
#ifdef MYTIINPUTFORM_IMPLEMENTATION
|
||||
AnimPaneGroup(nw4r::lyt::Group* group) : mpGroup(group) {
|
||||
nw4r::ut::List_Init(&mAnmPaneList, offsetof(AnmPane, mGroupLink));
|
||||
}
|
||||
|
||||
#endif
|
||||
virtual void create() {} // 0x08
|
||||
virtual void init() {} // 0x0C
|
||||
|
||||
@@ -191,7 +214,11 @@ namespace textinput {
|
||||
|
||||
virtual nw4r::lyt::Pane* get(int i) { return mpaFifo[i]; } // 0x10
|
||||
virtual nw4r::lyt::Pane* getLast() { // 0x14
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
for (int i = MAX_COUNT-1; i > -1; i--) {
|
||||
#else
|
||||
for (int i = MAX_COUNT-1; i > -1; i++) {
|
||||
#endif
|
||||
if (mpaFifo[i] != NULL) {
|
||||
return mpaFifo[i];
|
||||
}
|
||||
@@ -220,14 +247,14 @@ namespace textinput {
|
||||
virtual bool updateInput(int point, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data); // 0x20
|
||||
virtual bool updateInput(input::HKBManager& hkbManager); // 0x24
|
||||
|
||||
virtual TiLayout* getLayout(); // 0x28
|
||||
virtual TiLayout* getLayout() { return mpLayout; } // 0x28
|
||||
|
||||
virtual nw4r::lyt::Pane* getPane(const char* paneName); // 0x2C
|
||||
virtual const nw4r::lyt::Pane* getPane(const char* paneName) const; // 0x30
|
||||
|
||||
virtual u32 getFlightDuration(int point, const char* paneName); // 0x34
|
||||
|
||||
virtual void setAnimOn(bool flag); // 0x38
|
||||
virtual void setAnimOn(bool flag) { mbAnimOn = flag; } // 0x38
|
||||
|
||||
virtual void drawPane(const char* paneName); // 0x3C
|
||||
|
||||
@@ -236,8 +263,16 @@ namespace textinput {
|
||||
|
||||
virtual void setProjectionMtx(); // 0x48
|
||||
|
||||
virtual void setPaneLastDrawReceived(nw4r::lyt::Pane* paneLastDraw); // 0x4C
|
||||
virtual void initPaneLastDrawReceived(); // 0x50
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
virtual void setPaneLastDrawReceived(nw4r::lyt::Pane* pane) { mAnmPaneFifo.push(pane); }
|
||||
#else
|
||||
virtual void setPaneLastDrawReceived(nw4r::lyt::Pane* paneLastDraw);
|
||||
#endif // 0x4C
|
||||
#ifdef TI_PC_KEYBOARD_IMPLEMENTATION
|
||||
virtual void initPaneLastDrawReceived() { mAnmPaneFifo.init(); }
|
||||
#else
|
||||
virtual void initPaneLastDrawReceived();
|
||||
#endif // 0x50
|
||||
|
||||
virtual void setVisible(const char* paneName, bool flag); // 0x54
|
||||
virtual bool isVisible(const char* paneName, bool* result) const; // 0x58
|
||||
@@ -247,8 +282,8 @@ namespace textinput {
|
||||
virtual AnmPane* searchAnmPane(const char* paneName); // 0x60
|
||||
virtual AnmPane* searchAnmPane(wchar_t ch); // 0x64
|
||||
|
||||
virtual nw4r::ut::List& getAnmPaneList(); // 0x68
|
||||
virtual gui::PaneManager* getPaneManager(); // 0x6C
|
||||
virtual nw4r::ut::List& getAnmPaneList() { return mAnmPanes; } // 0x68
|
||||
virtual gui::PaneManager* getPaneManager() { return mpPaneManager; } // 0x6C
|
||||
|
||||
virtual void AdjustPaneMtx(Mtx& mtx, const nw4r::lyt::DrawInfo& drawInfo, const nw4r::math::MTX34& mGlobalMtx); // 0x70
|
||||
|
||||
|
||||
@@ -1,340 +1,210 @@
|
||||
#ifndef TEXTINPUT_PC_KEYBOARD_H
|
||||
#define TEXTINPUT_PC_KEYBOARD_H
|
||||
|
||||
#include "tiKeyboard.h"
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
#include "tiPcKeyboardImpl.h"
|
||||
#else
|
||||
|
||||
#include "tiNw4rManager.h"
|
||||
#include "tiGUIManager.h"
|
||||
#include "tiTextInputBase.h"
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
#include "tiKeyboard.h"
|
||||
#endif
|
||||
|
||||
namespace textinput {
|
||||
class Manager;
|
||||
|
||||
namespace predictlang {
|
||||
class LayoutByNW4R;
|
||||
}
|
||||
|
||||
namespace keyboard {
|
||||
namespace signwindow {
|
||||
class LayoutByNW4R;
|
||||
}
|
||||
|
||||
namespace pctype {
|
||||
|
||||
class LayoutByNW4R;
|
||||
class AnmPane;
|
||||
|
||||
class UIObj : public gui::EventHandler {
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
class UIObj {
|
||||
public:
|
||||
class Listener {
|
||||
public:
|
||||
virtual void onEvent(UIObj* uiObj, u32, void*) = 0; // 0x08
|
||||
virtual void onEvent(UIObj*, u32, void*);
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
// TODO
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
class Base : public textinput::keyboard::KeyboardBase {
|
||||
#else
|
||||
class Base : public CommandSender {
|
||||
#endif
|
||||
public:
|
||||
enum TranslateMode {
|
||||
TM_00,
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
TM_Kana,
|
||||
TM_Roman,
|
||||
#endif
|
||||
};
|
||||
|
||||
UIObj(u32 ctrlNo, LayoutByNW4R* layout, Listener* listener) : mCtrlNo(ctrlNo), mpLayout(layout) {
|
||||
mpListener = listener;
|
||||
}
|
||||
|
||||
virtual ~UIObj(); // 0x08
|
||||
virtual void onEvent(gui::GUIComponent& comp, u32 event, void* data); // 0x0C
|
||||
virtual void onGUIEvent(gui::PaneComponent& pane, u32 event, nw4rmanager::TiEventHandler::Input* input); // 0x18
|
||||
|
||||
protected:
|
||||
u32 mCtrlNo; // 0x08
|
||||
LayoutByNW4R* mpLayout; // 0x0C
|
||||
Listener* mpListener; // 0x10
|
||||
};
|
||||
|
||||
class UIModifierButton : public UIObj {
|
||||
friend class LayoutByNW4R;
|
||||
|
||||
public:
|
||||
UIModifierButton(u32 ctrlNo, LayoutByNW4R* layout, Listener* listener);
|
||||
|
||||
virtual ~UIModifierButton();
|
||||
virtual void onGUIEvent(gui::PaneComponent& pane, u32 event, nw4rmanager::TiEventHandler::Input* input);
|
||||
|
||||
private:
|
||||
gui::PaneComponent* mpPaneComp1; // 0x14
|
||||
gui::PaneComponent* mpPaneComp2; // 0x18
|
||||
nw4rmanager::AnmPane* mpAnmPane; // 0x1C
|
||||
u8 mbFocused; // 0x20
|
||||
};
|
||||
|
||||
class UIModePanel : public UIObj {
|
||||
friend class LayoutByNW4R;
|
||||
|
||||
public:
|
||||
UIModePanel(u32 ctrlNo, LayoutByNW4R* layout, Listener* listener);
|
||||
|
||||
virtual ~UIModePanel();
|
||||
virtual void onGUIEvent(gui::PaneComponent& pane, u32 event, nw4rmanager::TiEventHandler::Input* input);
|
||||
|
||||
void Create(nw4rmanager::Layout* layout);
|
||||
|
||||
private:
|
||||
u32 unk_0x14; // 0x14
|
||||
gui::PaneComponent* mpComps1[5]; // 0x18
|
||||
gui::PaneComponent* mpComps2[5]; // 0x2C
|
||||
nw4rmanager::AnmPane* mpAnmPanes[5]; // 0x40
|
||||
nw4r::lyt::Pane* mExtraPanes[3]; // 0x54
|
||||
GXTexObj mTexObjs[4]; // 0x60
|
||||
};
|
||||
|
||||
class AnmPane : public nw4rmanager::AnmPane {
|
||||
public:
|
||||
AnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: nw4rmanager::AnmPane(pane, observer) {
|
||||
mState = 0;
|
||||
}
|
||||
|
||||
virtual void init(); // 0x08
|
||||
virtual void changeAnimation(u32 id); // 0x14
|
||||
virtual ~AnmPane(); // 0x20
|
||||
virtual u32 getState() const { return mState; } // 0x24
|
||||
virtual u32 getKeyType() const { return mKeyType; } // 0x28
|
||||
|
||||
protected:
|
||||
s32 mState; // 0x2C
|
||||
u32 mKeyType; // 0x30
|
||||
};
|
||||
|
||||
class NormalButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
NormalButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) {
|
||||
mKeyType = 0;
|
||||
}
|
||||
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent); // 0x10
|
||||
virtual ~NormalButtonAnmPane();
|
||||
};
|
||||
|
||||
class ShiftCapsAnmPane : public AnmPane {
|
||||
public:
|
||||
ShiftCapsAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) {
|
||||
mKeyType = 1;
|
||||
mbFocused = false;
|
||||
}
|
||||
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent); // 0x10
|
||||
virtual ~ShiftCapsAnmPane();
|
||||
|
||||
virtual bool isFocused() const; // 0x2C
|
||||
|
||||
private:
|
||||
u8 mbFocused; // 0x34
|
||||
};
|
||||
|
||||
class ToggleButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
ToggleButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) {
|
||||
mKeyType = 2;
|
||||
}
|
||||
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent); // 0x10
|
||||
virtual ~ToggleButtonAnmPane();
|
||||
};
|
||||
|
||||
class OnOffButtonAnmPane : public AnmPane {
|
||||
public:
|
||||
OnOffButtonAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer) : AnmPane(pane, observer) {
|
||||
mKeyType = 3;
|
||||
}
|
||||
|
||||
virtual void onAnmEvent(AnmPaneEvent paneEvent); // 0x10
|
||||
virtual ~OnOffButtonAnmPane();
|
||||
};
|
||||
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
EventHandler(LayoutByNW4R* layout) : mpLayout(layout) {}
|
||||
|
||||
virtual ~EventHandler(); // 0x08
|
||||
virtual void onTiEvent(gui::PaneComponent* paneComponent, u32 event, TiEventHandler::Input* input); // 0x18
|
||||
|
||||
private:
|
||||
LayoutByNW4R* mpLayout; // 0x0C
|
||||
};
|
||||
|
||||
class Base : public KeyboardBase {
|
||||
public:
|
||||
typedef enum TranslateMode {
|
||||
TM_00,
|
||||
TM_01,
|
||||
TM_02,
|
||||
TM_03,
|
||||
} TranslateMode;
|
||||
|
||||
typedef enum InputMode {
|
||||
IM_00,
|
||||
IM_01,
|
||||
IM_02,
|
||||
IM_03,
|
||||
IM_04,
|
||||
IM_05,
|
||||
IM_06,
|
||||
IM_07,
|
||||
IM_08,
|
||||
} InputMode;
|
||||
|
||||
typedef enum InputType {
|
||||
enum InputType {
|
||||
IT_00,
|
||||
IT_01,
|
||||
IT_02,
|
||||
IT_03,
|
||||
IT_04,
|
||||
} InputType;
|
||||
|
||||
struct KeyState {
|
||||
#ifdef TI_PCTYPE_SAMPLE_CLASS
|
||||
KeyState() : mFlags(0), mIsABC(0), mAIUFlags(0), mLanguage((Language)1) {}
|
||||
#endif
|
||||
|
||||
void refresh_();
|
||||
void refreshText(nw4r::lyt::Pane* pane);
|
||||
void setABCFlag(u32 flag);
|
||||
wchar_t getWCCode(u32 keyType);
|
||||
wchar_t getWCCode(char* out);
|
||||
|
||||
u32 mFlags; // 0x00
|
||||
u32 mIsABC; // 0x04
|
||||
u32 mAIUFlags; // 0x08
|
||||
Language mLanguage; // 0x0C
|
||||
const void* mpLanguageDep; // 0x10
|
||||
Base* mpBase; // 0x14
|
||||
};
|
||||
|
||||
#ifdef TI_PCTYPE_SAMPLE_CLASS
|
||||
Base(Manager* manager) {
|
||||
mKeyState.mpLanguageDep = NULL;
|
||||
mKeyState.mpBase = this;
|
||||
mpAllocator = NULL;
|
||||
mbOnlyQwerty = false;
|
||||
mpManager = manager;
|
||||
}
|
||||
#endif
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
enum InputMode {
|
||||
IM_00,
|
||||
IM_01,
|
||||
IM_02,
|
||||
IM_03,
|
||||
IM_04,
|
||||
};
|
||||
|
||||
virtual ~Base();
|
||||
virtual void create(MEMAllocator* allocator) override; // 0x0C
|
||||
virtual void init() override; // 0x10
|
||||
virtual void updateFromReceiver(u32, void*) override; // 0x1C
|
||||
virtual void onKey(u32, void*); // 0x20
|
||||
virtual int getType(); // 0x24
|
||||
virtual void setLanguage(Language language) override; // 0x28
|
||||
virtual void onActive() override; // 0x34
|
||||
virtual void inputCharCode(wchar_t wc); // 0x38
|
||||
virtual void* getState(); // 0x3C
|
||||
virtual bool isShiftOn() const; // 0x40
|
||||
virtual bool isCapsOn() const; // 0x44
|
||||
virtual bool isABC(); // 0x48
|
||||
virtual void setABC(bool); // 0x4C
|
||||
virtual int getABCInputMode() const; // 0x50
|
||||
virtual int getAIUInputMode() const; // 0x54
|
||||
virtual TranslateMode getTranslateMode() const; // 0x58
|
||||
virtual void setTranslateMode(TranslateMode mode); // 0x5C
|
||||
virtual void onlyQwerty(bool); // 0x60
|
||||
virtual void setLangKeyActive(bool); // 0x64
|
||||
virtual void setInputModeJP(bool, u32, u32); // 0x68
|
||||
virtual void setInputModeCK(u32); // 0x6C
|
||||
virtual void refreshState(); // 0x70
|
||||
virtual void changeABCInputMode(InputMode mode); // 0x74
|
||||
virtual void changeAIUInputMode(InputMode mode); // 0x78
|
||||
virtual void onClose(); // 0x7C
|
||||
virtual wchar_t getWCCode(char* out); // 0x80
|
||||
virtual u32 getControlKey(char* out); // 0x84
|
||||
virtual void sendInputWChar(wchar_t wc, bool flag); // 0x88
|
||||
virtual void goSignInputMode(); // 0x8C
|
||||
virtual void changePredictLanguage(); // 0x90
|
||||
virtual void updateFixMode(); // 0x94
|
||||
|
||||
protected:
|
||||
Manager* mgr() { return mpManager; }
|
||||
|
||||
public:
|
||||
u8 unk_0x14; // 0x14
|
||||
u8 unk_0x15[3]; // 0x15
|
||||
u32 unk_0x18; // 0x18
|
||||
const void* mpLanguageDep; // 0x1C
|
||||
KeyState mKeyState; // 0x20
|
||||
MEMAllocator* mpAllocator; // 0x38
|
||||
u8 mbOnlyQwerty; // 0x3C
|
||||
u8 mbLangKeyActive; // 0x3D
|
||||
u8 unk_0x3E[2]; // 0x3E
|
||||
Manager* mpManager; // 0x40
|
||||
};
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout, public UIObj::Listener {
|
||||
public:
|
||||
#ifdef TI_PCTYPE_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, arcName, observer), mpEventHandler(NULL),
|
||||
mShiftButton(1, this, this), mCapsButton(0, this, this), mModePanel(2, this, this) {}
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
virtual void updateFromReceiver(u32, void*) override;
|
||||
virtual void onKey(u32, void*) override;
|
||||
virtual void setLanguage(Language language) override;
|
||||
virtual void onActive() override;
|
||||
virtual void inputCharCode(wchar_t wc) override;
|
||||
virtual void setABC(bool) override;
|
||||
virtual void setTranslateMode(TranslateMode mode) override;
|
||||
virtual void onlyQwerty(bool) override;
|
||||
virtual void setLangKeyActive(bool) override;
|
||||
virtual void setInputModeJP(bool, u32, u32) override;
|
||||
virtual void setInputModeCK(u32) override;
|
||||
virtual void refreshState() override;
|
||||
virtual void onClose() override;
|
||||
virtual void sendInputWChar(wchar_t wc, bool flag) override;
|
||||
virtual void goSignInputMode() override;
|
||||
virtual void changePredictLanguage() override;
|
||||
|
||||
virtual void draw(); // 0x11C
|
||||
virtual void calc(); // 0x120
|
||||
virtual void setPredictLanguageDialog(predictlang::LayoutByNW4R* dialog); // 0x124
|
||||
virtual void setSignWindow(signwindow::LayoutByNW4R* window); // 0x128
|
||||
virtual void setLineFeedButton(bool); // 0x12C
|
||||
virtual void setPredictLanguageButton(bool); // 0x130
|
||||
virtual void setSignWindowButton(bool); // 0x134
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data); // 0x138
|
||||
virtual bool updateInput(textinput::input::HKBManager& hkbManager); // 0x13C
|
||||
virtual void changeAnimationAllToNormal(); // 0x140
|
||||
virtual void throwReleaseForAll(); // 0x144
|
||||
virtual void cancelStateFocusIn(); // 0x148
|
||||
virtual void updatePredictLanguage(CommandReceiver::ChangePredictMode* mode); // 0x14C
|
||||
virtual void updateDakuten(); // 0x150
|
||||
virtual void initLayout(); // 0x154
|
||||
virtual void onEvent(UIObj* uiObj, u32, void*); // 0x158
|
||||
|
||||
void createAnmPane_(MEMAllocator* allocator);
|
||||
void onPressedCaps();
|
||||
void onPressedShift(bool);
|
||||
void onReleasedShift();
|
||||
|
||||
private:
|
||||
EventHandler* mpEventHandler; // 0xF0
|
||||
predictlang::LayoutByNW4R* mpPredictLanguageDialog; // 0xF4
|
||||
signwindow::LayoutByNW4R* mpSignWindow; // 0xF8
|
||||
bool mbLineFeed; // 0xFC
|
||||
u8 unk_0xFD[3]; // 0xFD
|
||||
UIModifierButton mShiftButton; // 0x100
|
||||
UIModifierButton mCapsButton; // 0x124
|
||||
UIModePanel mModePanel; // 0x148
|
||||
};
|
||||
|
||||
#ifdef TI_PCTYPE_SAMPLE_CLASS
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, arcName, observer) {}
|
||||
virtual ~Sample();
|
||||
};
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
virtual u32 getType() override;
|
||||
#else
|
||||
class Sample {};
|
||||
virtual void getType() override;
|
||||
#endif
|
||||
virtual void setLanguage(Language) override;
|
||||
virtual void onActive() override;
|
||||
virtual void inputCharCode(u16);
|
||||
virtual void getState();
|
||||
virtual bool isShiftOn() const;
|
||||
virtual bool isCapsOn() const;
|
||||
virtual bool isABC();
|
||||
virtual void setABC(bool);
|
||||
virtual InputMode getABCInputMode() const;
|
||||
virtual InputMode getAIUInputMode() const;
|
||||
virtual TranslateMode getTranslateMode() const;
|
||||
virtual void setTranslateMode(TranslateMode);
|
||||
virtual void onlyQwerty(bool);
|
||||
virtual void setLangKeyActive(bool);
|
||||
virtual void setInputModeJP(bool, u32, u32);
|
||||
virtual void setInputModeCK(u32);
|
||||
virtual void refreshState();
|
||||
virtual void changeABCInputMode(InputMode);
|
||||
virtual void changeAIUInputMode(InputMode);
|
||||
virtual void onClose();
|
||||
virtual void getWCCode(char*);
|
||||
virtual void getControlKey(char*);
|
||||
virtual void sendInputWChar(u16, bool);
|
||||
virtual void goSignInputMode();
|
||||
virtual void changePredictLanguage();
|
||||
virtual void updateFixMode();
|
||||
#else
|
||||
virtual ~Base();
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void init();
|
||||
virtual void setCommandReceiver(textinput::CommandReceiver*);
|
||||
virtual void updateFromReceiver(u32, void*);
|
||||
virtual void onKey();
|
||||
virtual void getType();
|
||||
virtual void setLanguage();
|
||||
virtual void getLanguage();
|
||||
virtual void update();
|
||||
virtual void onActive();
|
||||
virtual void inputCharCode();
|
||||
virtual void getState();
|
||||
virtual void isShiftOn();
|
||||
virtual void isCapsOn();
|
||||
virtual void isABC();
|
||||
virtual void setABC();
|
||||
virtual void getABCInputMode();
|
||||
virtual void getAIUInputMode();
|
||||
virtual TranslateMode getTranslateMode();
|
||||
virtual void setTranslateMode(TranslateMode);
|
||||
virtual void onlyQwerty();
|
||||
virtual void setLangKeyActive(bool);
|
||||
virtual void setInputModeJP();
|
||||
virtual void setInputModeCK();
|
||||
virtual void refreshState();
|
||||
virtual void changeABCInputMode();
|
||||
virtual void changeAIUInputMode();
|
||||
virtual void onClose();
|
||||
virtual void getWCCode();
|
||||
virtual void getControlKey();
|
||||
virtual void sendInputWChar();
|
||||
virtual void goSignInputMode();
|
||||
virtual void changePredictLanguage();
|
||||
virtual void updateFixMode();
|
||||
#endif
|
||||
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
private:
|
||||
u8 mKeyboardInputFlags[8];
|
||||
const void* mpKeyStateTable;
|
||||
u32 mTranslateMode;
|
||||
u32 mABCInputMode;
|
||||
u32 mAIUInputMode;
|
||||
u32 mCurrentInputType;
|
||||
u32 mInputState;
|
||||
const void* mpLanguageData;
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
MEMAllocator* mpAllocator;
|
||||
#endif
|
||||
bool mbOnlyQwerty;
|
||||
bool mbLanguageKeyActive;
|
||||
u16 mKeyboardFlags;
|
||||
void* mpInputSettings;
|
||||
void* mpCurrentKeyState;
|
||||
|
||||
public:
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
bool isQwertyOnly() const { return mbOnlyQwerty; }
|
||||
bool isLanguageKeyActive() const { return mbLanguageKeyActive; }
|
||||
#endif
|
||||
u32 getTranslateModeForMemo() const { return mTranslateMode; }
|
||||
u32 getABCInputModeForMemo() const { return mABCInputMode; }
|
||||
u32 getAIUInputModeForMemo() const { return mAIUInputMode; }
|
||||
#endif
|
||||
};
|
||||
|
||||
// TODO
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
, public UIObj::Listener
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
// TODO - ...
|
||||
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
virtual void draw();
|
||||
virtual void calc();
|
||||
virtual void setPredictLanguageDialog(void*);
|
||||
virtual void setSignWindow(void*);
|
||||
virtual void setLineFeedButton(bool);
|
||||
virtual void setPredictLanguageButton(bool);
|
||||
virtual void setSignWindowButton(bool);
|
||||
#endif
|
||||
virtual void onClose();
|
||||
|
||||
void onPressedShift(bool shift);
|
||||
void onReleasedShift();
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
bool hasLineFeedButton() const { return mbLineFeedButton; }
|
||||
private:
|
||||
void* mpPredictLanguageDialog;
|
||||
void* mpSignWindow;
|
||||
bool mbLineFeedButton;
|
||||
public:
|
||||
#endif
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION)
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data) override;
|
||||
virtual bool updateInput(input::HKBManager& hkbManager) override;
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace pctype
|
||||
|
||||
} // namespace keyboard
|
||||
|
||||
} // namespace textinput
|
||||
|
||||
#endif // TEXTINPUT_PC_KEYBOARD_H
|
||||
#endif
|
||||
#endif // TEXTINPUT_HW_KEYBOARD_H
|
||||
|
||||
@@ -14,13 +14,17 @@ namespace textinput {
|
||||
|
||||
class Base : public CommandSender {
|
||||
public:
|
||||
#ifdef TI_PREDICTLANG_SAMPLE_CLASS
|
||||
#if defined(TI_PREDICTLANG_SAMPLE_CLASS) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
Base(Manager* manager) : mePredictMode(inputform::Base::PM_USEn), mpAllocator(NULL), mpManager(manager) {}
|
||||
#endif
|
||||
|
||||
virtual ~Base() {}
|
||||
virtual void create(MEMAllocator* allocator) override { mpAllocator = allocator; }
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
virtual ~Base();
|
||||
virtual void init();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
#else
|
||||
virtual void create(MEMAllocator* allocator) override { mpAllocator = allocator; }
|
||||
#endif
|
||||
virtual void setPredictMode(inputform::Base::PredictMode mode) { mePredictMode = mode; }
|
||||
|
||||
protected:
|
||||
@@ -34,16 +38,20 @@ namespace textinput {
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout, public nw4rmanager::AnmObserver {
|
||||
public:
|
||||
#ifdef TI_PREDICTLANG_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, arcName, observer), mbActive(false), mbInput(false),
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer, const char* layoutName)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, layoutName, observer), mbActive(false), mbInput(false),
|
||||
mpEventHandler(NULL), meDestination(DST_US), mpCaller(NULL) {}
|
||||
#elif defined(TI_PREDICTLANG_SAMPLE_CLASS)
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, "fs_prdicSelWidw_a.brlyt", observer), mbActive(false), mbInput(false),
|
||||
mpEventHandler(NULL), meDestination(DST_US), mpCaller(NULL) {}
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void draw() override;
|
||||
virtual void init() override;
|
||||
virtual void draw() override;
|
||||
|
||||
virtual void open(inputform::Base::PredictMode predictMode, keyboard::KeyboardBase* keyboard);
|
||||
virtual void endToOpen();
|
||||
@@ -70,12 +78,21 @@ namespace textinput {
|
||||
keyboard::KeyboardBase* mpCaller; // 0xD4
|
||||
};
|
||||
|
||||
#ifdef TI_PREDICTLANG_SAMPLE_CLASS
|
||||
#if defined(TI_PREDICTLANG_SAMPLE_CLASS) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, arcName, observer) {}
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer, const char* layoutName)
|
||||
: LayoutByNW4R(manager, resAccessor, observer, layoutName) {}
|
||||
#else
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, observer) {}
|
||||
#endif
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
virtual ~Sample();
|
||||
#else
|
||||
virtual ~Sample() {}
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,13 +7,7 @@ namespace textinput {
|
||||
namespace extend {
|
||||
namespace savedata {
|
||||
typedef struct MemoSetting {
|
||||
union {
|
||||
u8 uRevisionAndType; // 0x00
|
||||
struct {
|
||||
u8 uType : 4; // 0x00:11110000
|
||||
u8 uRevision : 4; // 0x00:00001111
|
||||
};
|
||||
};
|
||||
u8 uRevisionAndType; // 0x00
|
||||
|
||||
union {
|
||||
struct {
|
||||
|
||||
@@ -3,152 +3,132 @@
|
||||
|
||||
#include "tiKeyboard.h"
|
||||
#include "tiNw4rManager.h"
|
||||
#include "tiTextInputBase.h"
|
||||
#include "tiSwData.h"
|
||||
|
||||
namespace textinput {
|
||||
class Manager;
|
||||
class Manager;
|
||||
namespace keyboard {
|
||||
|
||||
namespace keyboard {
|
||||
namespace signwindow {
|
||||
struct LanguageDependency {
|
||||
u8 count;
|
||||
const PaneNameToCharCodeInSignMode* keys;
|
||||
};
|
||||
namespace signwindow {
|
||||
|
||||
struct LanguageDependency {
|
||||
u8 count;
|
||||
const PaneNameToCharCodeInSignMode* keys;
|
||||
};
|
||||
|
||||
class Base : public KeyboardBase {
|
||||
public:
|
||||
virtual ~Base();
|
||||
virtual void create(MEMAllocator*) override;
|
||||
virtual void init() override;
|
||||
virtual void onKey(u32, void*) override;
|
||||
virtual bool isLocked();
|
||||
virtual void setPage(u8);
|
||||
virtual u8 getPage();
|
||||
virtual void movePrevSignPage();
|
||||
virtual void moveNextSignPage();
|
||||
virtual void close();
|
||||
virtual int getType() override;
|
||||
virtual void setLanguage(Language) override;
|
||||
|
||||
protected:
|
||||
u8 mInputFlags;
|
||||
bool mbLocked;
|
||||
bool mbRepeat;
|
||||
u8 muPage;
|
||||
const LanguageDependency* mpLanguageDependency;
|
||||
MEMAllocator* mpAllocator;
|
||||
Manager* mpManager;
|
||||
};
|
||||
|
||||
class EventHandler;
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout, public nw4rmanager::AnmObserver {
|
||||
public:
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator*) override;
|
||||
virtual void init() override;
|
||||
virtual void onKey(u32, void*) override;
|
||||
virtual void movePrevSignPage() override;
|
||||
virtual void moveNextSignPage() override;
|
||||
virtual void close() override;
|
||||
virtual void draw() override;
|
||||
virtual void open(KeyboardBase*, bool);
|
||||
virtual bool isActive();
|
||||
virtual void onChangeAnmState(AnmEvent, nw4rmanager::AnmPane*, nw4rmanager::Anim*) override;
|
||||
virtual bool updateInput(int, f32, f32, u32, u32, u32, void*) override;
|
||||
virtual bool updateInput(input::HKBManager&) override;
|
||||
virtual void throwReleaseForAll();
|
||||
virtual void resetAnmSignWindow();
|
||||
virtual void setSignKeyTop(u16, u16);
|
||||
virtual void setPageNumber(u16);
|
||||
virtual void endToClose();
|
||||
virtual void startToInput();
|
||||
virtual void movePrevSignWindow();
|
||||
virtual void moveNextSignWindow();
|
||||
|
||||
bool mbActive;
|
||||
bool mbInput;
|
||||
EventHandler* mpEventHandler;
|
||||
KeyboardBase* mpKeyboard;
|
||||
};
|
||||
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
virtual ~Sample();
|
||||
};
|
||||
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
explicit EventHandler(LayoutByNW4R* layout) : mpLayoutByNW4R(layout) {}
|
||||
virtual ~EventHandler();
|
||||
virtual void onTiEvent(gui::PaneComponent*, u32, Input*) override;
|
||||
LayoutByNW4R* mpLayoutByNW4R;
|
||||
};
|
||||
|
||||
class AnmPane : public nw4rmanager::AnmPane {
|
||||
public:
|
||||
AnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: nw4rmanager::AnmPane(pane, observer), muAnimation(0) {}
|
||||
inline virtual ~AnmPane();
|
||||
virtual void init() override;
|
||||
virtual void changeAnimation(u32) override;
|
||||
virtual u32 getKeyType() const;
|
||||
|
||||
protected:
|
||||
s32 muAnimation;
|
||||
u32 muKeyType;
|
||||
};
|
||||
|
||||
class CellPhoneSignAllAnmPane : public AnmPane {
|
||||
public:
|
||||
CellPhoneSignAllAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: AnmPane(pane, observer) { muKeyType = 0; }
|
||||
virtual ~CellPhoneSignAllAnmPane();
|
||||
virtual void init() override;
|
||||
virtual void onAnmEvent(AnmPaneEvent) override;
|
||||
};
|
||||
|
||||
class CellPhoneSignScrollAnmPane : public AnmPane {
|
||||
public:
|
||||
CellPhoneSignScrollAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: AnmPane(pane, observer) { muKeyType = 1; }
|
||||
virtual ~CellPhoneSignScrollAnmPane();
|
||||
virtual void init() override;
|
||||
virtual void onAnmEvent(AnmPaneEvent) override;
|
||||
};
|
||||
|
||||
class CellPhoneSignButtonPane : public AnmPane {
|
||||
public:
|
||||
CellPhoneSignButtonPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: AnmPane(pane, observer) { muKeyType = 2; }
|
||||
virtual ~CellPhoneSignButtonPane();
|
||||
virtual void init() override;
|
||||
virtual void onAnmEvent(AnmPaneEvent) override;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Base : public KeyboardBase {
|
||||
public:
|
||||
#ifdef TI_SIGNWINDOW_SAMPLE_CLASS
|
||||
Base(Manager* manager) : mpAllocator(NULL), mpManager(manager) {}
|
||||
#endif
|
||||
|
||||
virtual ~Base();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
virtual void onKey(u32, void*);
|
||||
virtual int getType();
|
||||
virtual void setLanguage(Language language) override;
|
||||
virtual bool isLocked(); // 0x38
|
||||
virtual void setPage(u8 page); // 0x3C
|
||||
virtual u8 getPage(); // 0x40
|
||||
virtual void movePrevSignPage(); // 0x44
|
||||
virtual void moveNextSignPage(); // 0x48
|
||||
virtual void close(); // 0x4C
|
||||
|
||||
protected:
|
||||
u8 mInputFlags; // 0x14
|
||||
bool mbLocked; // 0x15
|
||||
bool mbRepeat; // 0x16
|
||||
u8 muPage; // 0x17
|
||||
const LanguageDependency* mpLanguageDependency; // 0x18
|
||||
MEMAllocator* mpAllocator; // 0x1C
|
||||
Manager* mpManager; // 0x20
|
||||
};
|
||||
|
||||
class AnmPane;
|
||||
class EventHandler;
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout, public nw4rmanager::AnmObserver {
|
||||
public:
|
||||
#ifdef TI_SIGNWINDOW_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, arcName, observer), mbActive(false), mbInput(false),
|
||||
mpEventHandler(NULL), mpKeyboard(NULL) {}
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void init() override;
|
||||
virtual void onKey(u32, void*) override;
|
||||
virtual void movePrevSignPage() override; // 0x44
|
||||
virtual void moveNextSignPage() override; // 0x48
|
||||
virtual void close() override; // 0x4C
|
||||
|
||||
virtual void draw(); // 0xD4
|
||||
virtual void open(KeyboardBase* keyboard, bool flag); // 0xD8
|
||||
virtual bool isActive(); // 0xDC
|
||||
virtual void onChangeAnmState(nw4rmanager::AnmObserver::AnmEvent anmEvent,
|
||||
nw4rmanager::AnmPane* anmPane, nw4rmanager::Anim* anim); // 0xE0
|
||||
virtual bool updateInput(int chan, f32 x, f32 y, u32 trig, u32 hold, u32 release, void* data); // 0xE4
|
||||
virtual bool updateInput(textinput::input::HKBManager& hkbManager); // 0xE8
|
||||
virtual void throwReleaseForAll(); // 0xEC
|
||||
virtual void resetAnmSignWindow(); // 0xF0
|
||||
virtual void setSignKeyTop(u16, u16); // 0xF4
|
||||
virtual void setPageNumber(u16); // 0xF8
|
||||
virtual void endToClose(); // 0xFC
|
||||
virtual void startToInput(); // 0x100
|
||||
virtual void movePrevSignWindow(); // 0x104
|
||||
virtual void moveNextSignWindow(); // 0x108
|
||||
|
||||
private:
|
||||
bool mbActive; // 0xD0
|
||||
bool mbInput; // 0xD1
|
||||
EventHandler* mpEventHandler; // 0xD4
|
||||
KeyboardBase* mpKeyboard; // 0xD8
|
||||
};
|
||||
|
||||
#ifdef TI_SIGNWINDOW_SAMPLE_CLASS
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, arcName, observer) {}
|
||||
virtual ~Sample();
|
||||
};
|
||||
#else
|
||||
class Sample {};
|
||||
#endif
|
||||
|
||||
class EventHandler : public nw4rmanager::TiEventHandler {
|
||||
public:
|
||||
explicit EventHandler(LayoutByNW4R* layout) : mpLayoutByNW4R(layout) {}
|
||||
virtual ~EventHandler();
|
||||
virtual void onTiEvent(gui::PaneComponent*, u32, Input*) override;
|
||||
LayoutByNW4R* mpLayoutByNW4R;
|
||||
};
|
||||
|
||||
class AnmPane : public nw4rmanager::AnmPane {
|
||||
public:
|
||||
AnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: nw4rmanager::AnmPane(pane, observer), muAnimation(0) {}
|
||||
inline virtual ~AnmPane();
|
||||
virtual void init() override;
|
||||
virtual void changeAnimation(u32) override;
|
||||
virtual u32 getKeyType() const;
|
||||
|
||||
protected:
|
||||
s32 muAnimation;
|
||||
u32 muKeyType;
|
||||
};
|
||||
|
||||
class CellPhoneSignAllAnmPane : public AnmPane {
|
||||
public:
|
||||
CellPhoneSignAllAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: AnmPane(pane, observer) { muKeyType = 0; }
|
||||
virtual ~CellPhoneSignAllAnmPane();
|
||||
virtual void init() override;
|
||||
virtual void onAnmEvent(AnmPaneEvent) override;
|
||||
};
|
||||
|
||||
class CellPhoneSignScrollAnmPane : public AnmPane {
|
||||
public:
|
||||
CellPhoneSignScrollAnmPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: AnmPane(pane, observer) { muKeyType = 1; }
|
||||
virtual ~CellPhoneSignScrollAnmPane();
|
||||
virtual void init() override;
|
||||
virtual void onAnmEvent(AnmPaneEvent) override;
|
||||
};
|
||||
|
||||
class CellPhoneSignButtonPane : public AnmPane {
|
||||
public:
|
||||
CellPhoneSignButtonPane(nw4r::lyt::Pane* pane, nw4rmanager::AnmObserver* observer)
|
||||
: AnmPane(pane, observer) { muKeyType = 2; }
|
||||
virtual ~CellPhoneSignButtonPane();
|
||||
virtual void init() override;
|
||||
virtual void onAnmEvent(AnmPaneEvent) override;
|
||||
};
|
||||
|
||||
} // namespace signwindow
|
||||
} // namespace keyboard
|
||||
} // namespace textinput
|
||||
|
||||
#endif // TEXTINPUT_SIGN_WINDOW_H
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
#include <revolution/types.h>
|
||||
#include <revolution/mem/allocator.h>
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
#include <revolution/kpr.h>
|
||||
#endif
|
||||
|
||||
namespace textinput {
|
||||
namespace tistring {
|
||||
@@ -34,15 +36,23 @@ namespace textinput {
|
||||
|
||||
virtual void setLength(u16);
|
||||
|
||||
virtual wchar_t* getWCString() const;
|
||||
virtual wchar_t* getWCString() const { return mpszString; }
|
||||
|
||||
virtual void setCandidate(wchar_t candidate) { mwcCandidate = candidate; }
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
virtual wchar_t getCandidate() const { return mwcCandidate; }
|
||||
#else
|
||||
virtual wchar_t getCandidate() { return mwcCandidate; }
|
||||
#endif
|
||||
virtual bool hasCandidate() const;
|
||||
|
||||
virtual wchar_t getLastWChar();
|
||||
|
||||
#if defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
protected:
|
||||
#else
|
||||
private:
|
||||
#endif
|
||||
u16 muMaxLength; // 0x04
|
||||
u16 muLength; // 0x06
|
||||
|
||||
@@ -55,41 +65,56 @@ namespace textinput {
|
||||
};
|
||||
|
||||
class KanaStream {
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
public:
|
||||
KPRQueue mQueue;
|
||||
wchar_t mPending;
|
||||
wchar_t mOutput[5];
|
||||
#else
|
||||
private:
|
||||
u8 field_0x00[0x24];
|
||||
#endif
|
||||
};
|
||||
|
||||
class Decolated : public StringBase {
|
||||
public:
|
||||
enum TranslateMode { TM_Direct, TM_Kana, TM_Roman, TM_Hangul };
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
Decolated(u16 maxLen) : StringBase(maxLen), mCursorStart(0), mCursorEnd(0), mbSustain(false), mTranslateMode(0) { initKanaConverter(); }
|
||||
virtual ~Decolated();
|
||||
#else
|
||||
Decolated(u16 maxLen) : StringBase(maxLen), field_0x18(0), field_0x1C(0), field_0x20(0), field_0x24(0) { initKanaConverter(); }
|
||||
#endif
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
virtual ~Decolated();
|
||||
enum TranslateMode { TM_Direct, TM_Kana, TM_Roman, TM_Hangul };
|
||||
virtual void clear();
|
||||
virtual void set(const wchar_t* string);
|
||||
virtual void setLength(u16);
|
||||
|
||||
virtual void inputChar(wchar_t);
|
||||
virtual void inputString(const wchar_t*);
|
||||
virtual void setLength(u16 length);
|
||||
void setTranslateMode(TranslateMode mode);
|
||||
TranslateMode getTranslateMode() const { return static_cast<TranslateMode>(mTranslateMode); }
|
||||
void inputString(const wchar_t* string, TranslateMode mode);
|
||||
virtual void inputChar(wchar_t ch);
|
||||
virtual void inputString(const wchar_t* string);
|
||||
virtual void deleteChar();
|
||||
virtual void backSpace();
|
||||
virtual void confirm(const wchar_t*);
|
||||
virtual void confirm(const wchar_t* string);
|
||||
virtual bool moveCursorRight();
|
||||
virtual bool moveCursorLeft();
|
||||
virtual void setCursorPos(u32);
|
||||
virtual void setCursorPos(u32 pos);
|
||||
virtual void onSustain();
|
||||
virtual void offSustain();
|
||||
virtual bool isOnSustain();
|
||||
virtual u32 getCursorPos() const;
|
||||
virtual void getCursorPos(u32*, u32*);
|
||||
virtual void getCursorPos(u32* start, u32* end);
|
||||
virtual bool canBackSpace();
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
virtual bool deleteForward();
|
||||
virtual void getSelected(u32&, u32&);
|
||||
#else
|
||||
virtual void deleteForward();
|
||||
#endif
|
||||
virtual void getSelected(u32& start, u32& end);
|
||||
virtual wchar_t getWCharAtCursor();
|
||||
virtual void replaceAtCursor(wchar_t);
|
||||
virtual void replaceAtCursor(wchar_t ch);
|
||||
virtual bool isDakuten();
|
||||
virtual void converDakuten();
|
||||
virtual bool isHandaku();
|
||||
@@ -99,68 +124,123 @@ namespace textinput {
|
||||
virtual void converSmall();
|
||||
virtual bool atTheBeginningOfASentence();
|
||||
virtual void initKanaConverter();
|
||||
virtual void* getKanaBuffer();
|
||||
virtual wchar_t* getKanaBuffer();
|
||||
virtual bool isKanaFix() const;
|
||||
virtual void confirmKana();
|
||||
virtual void clearKana();
|
||||
virtual void EnableKSXFilter(bool);
|
||||
virtual void EnableKSXFilter(bool enable);
|
||||
#else
|
||||
virtual void inputChar();
|
||||
virtual void inputString();
|
||||
virtual void deleteChar();
|
||||
virtual void backSpace();
|
||||
virtual void confirm();
|
||||
virtual void moveCursorRight();
|
||||
virtual void moveCursorLeft();
|
||||
virtual void setCursorPos();
|
||||
virtual void onSustain();
|
||||
virtual void offSustain();
|
||||
virtual void isOnSustain();
|
||||
virtual void getCursorPos();
|
||||
virtual void getCursorPos(u32*, u32*);
|
||||
virtual void canBackSpace();
|
||||
virtual void deleteForward();
|
||||
virtual void getSelected();
|
||||
virtual void getWCharAtCursor();
|
||||
virtual void replaceAtCursor();
|
||||
virtual void isDakuten();
|
||||
virtual void converDakuten();
|
||||
virtual void isHandaku();
|
||||
virtual void converHandaku();
|
||||
virtual void convertAll();
|
||||
virtual void isSmall();
|
||||
virtual void converSmall();
|
||||
virtual bool atTheBeginningOfASentence();
|
||||
virtual void initKanaConverter();
|
||||
virtual void getKanaBuffer();
|
||||
virtual void isKanaFix();
|
||||
virtual void confirmKana();
|
||||
virtual void clearKana();
|
||||
virtual void EnableKSXFilter();
|
||||
|
||||
void setTranslateMode(TranslateMode mode);
|
||||
TranslateMode getTranslateMode() const { return static_cast<TranslateMode>(mTranslateMode); }
|
||||
void inputString(const wchar_t* string, TranslateMode mode);
|
||||
#endif
|
||||
|
||||
#if defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
protected:
|
||||
#else
|
||||
private:
|
||||
u32 mCursorStart; // 0x18
|
||||
u32 mCursorEnd; // 0x1C
|
||||
u8 mbSustain; // 0x20
|
||||
s32 mTranslateMode; // 0x24
|
||||
#endif
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
u32 mCursorStart;
|
||||
u32 mCursorEnd;
|
||||
#if defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
u8 mbSustain;
|
||||
s32 mTranslateMode;
|
||||
#else
|
||||
bool mbSustain;
|
||||
u32 mTranslateMode;
|
||||
#endif
|
||||
#else
|
||||
u32 field_0x18; // 0x18
|
||||
u32 field_0x1C; // 0x1C
|
||||
u8 field_0x20; // 0x20
|
||||
u32 field_0x24; // 0x24
|
||||
#endif
|
||||
KanaStream mKanaStream; // 0x28
|
||||
};
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISTRING_IMPLEMENTATION) || defined(TIZISTRING_IMPLEMENTATION)
|
||||
class WithAtok : public Decolated {
|
||||
public:
|
||||
struct DrawInfo;
|
||||
|
||||
~WithAtok();
|
||||
|
||||
WithAtok(u16 maxLength) : Decolated(maxLength) {}
|
||||
virtual ~WithAtok();
|
||||
virtual void pushBack(wchar_t ch);
|
||||
virtual void popBack();
|
||||
virtual void inputChar(wchar_t);
|
||||
virtual void inputChar(wchar_t ch);
|
||||
virtual void backSpace();
|
||||
virtual void confirm(const wchar_t*);
|
||||
virtual void confirm(const wchar_t* string);
|
||||
virtual bool moveCursorRight();
|
||||
virtual bool moveCursorLeft();
|
||||
virtual void getCursorPos(u32*, u32*);
|
||||
|
||||
virtual void getCursorPos(u32* start, u32* end);
|
||||
struct DrawInfo {
|
||||
const wchar_t* string;
|
||||
u32 start;
|
||||
u32 end;
|
||||
u32 selectedStart;
|
||||
u32 selectedEnd;
|
||||
};
|
||||
virtual bool isFix();
|
||||
virtual void setFix(bool);
|
||||
virtual void setFix(bool fix);
|
||||
virtual void initConverting();
|
||||
virtual bool isConverting();
|
||||
virtual wchar_t* getConfirmedWCString() const;
|
||||
virtual int getCurrentNumPredicted();
|
||||
virtual bool getPredicted(int, wchar_t*);
|
||||
virtual void commitPredicted(int);
|
||||
virtual void setSelectedCandidate(long);
|
||||
virtual void getPredicted(int index, wchar_t* string);
|
||||
virtual void commitPredicted(int index);
|
||||
virtual void setSelectedCandidate(s32 index);
|
||||
virtual bool isCandidateSelected();
|
||||
virtual int getSelectedCandidate();
|
||||
virtual s32 getSelectedCandidate();
|
||||
virtual void init();
|
||||
virtual void setInputting(wchar_t);
|
||||
virtual void getDrawString(DrawInfo&);
|
||||
virtual void openDictionary(void*, int, void*, int, void*, int);
|
||||
virtual void setInputting(wchar_t ch);
|
||||
virtual void getDrawString(DrawInfo& info);
|
||||
virtual void openDictionary(void* atok, int atokSize, void* apot, int apotSize, void* nintendo, int nintendoSize);
|
||||
virtual void closeDictionary();
|
||||
virtual bool hasConfirmedString();
|
||||
virtual void enableConfirmedString(bool);
|
||||
virtual void enableConfirmedString(bool enable);
|
||||
virtual void startConverting();
|
||||
virtual bool isDictionaryOpened();
|
||||
virtual void changeKanaMode(bool);
|
||||
virtual int getInputStringLength();
|
||||
virtual void changeKanaMode(bool kana);
|
||||
virtual wchar_t getInputStringLength();
|
||||
virtual void resetRelation();
|
||||
virtual void setFixMode(bool);
|
||||
virtual void setFixPrediction(int, const char* const*);
|
||||
virtual void setDefaultPrediction(int, const char* const*);
|
||||
virtual int getSelectedConverting();
|
||||
virtual int getFixedPredictionNum();
|
||||
virtual void setFixMode(bool fixed);
|
||||
virtual void setFixPrediction(int count, const char** predictions);
|
||||
virtual void setDefaultPrediction(int count, const char** predictions);
|
||||
virtual s16 getSelectedConverting();
|
||||
virtual s32 getFixedPredictionNum();
|
||||
};
|
||||
#else
|
||||
class WithAtok : public StringBase {};
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,17 @@
|
||||
|
||||
#include <nw4r/ut/CharWriter.h>
|
||||
#include <nw4r/ut/Rect.h>
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
namespace textinput {
|
||||
namespace textdrawer {
|
||||
#if defined(MYTIMANAGER_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
class Base : public nw4r::ut::CharWriter {
|
||||
#else
|
||||
class Base : nw4r::ut::CharWriter {
|
||||
#endif
|
||||
public:
|
||||
typedef struct ViewPort {
|
||||
f32 xOrig; // 0x00
|
||||
@@ -27,11 +34,23 @@ namespace textinput {
|
||||
} CursorPos;
|
||||
|
||||
typedef struct DrawInfo {
|
||||
nw4r::ut::Rect rect; // 0x00
|
||||
wchar_t character; // 0x10
|
||||
u8 unk_0x12[6]; // 0x12
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
nw4r::ut::Rect rect;
|
||||
wchar_t character;
|
||||
#else
|
||||
u8 unk_0x00[32];
|
||||
#endif
|
||||
} DrawInfo;
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
Base() : mpDrawAllocator(NULL), mfViewX(0.0f), mfViewY(0.0f), mfViewWidth(0.0f), mfViewHeight(0.0f),
|
||||
mfVIWidth(640.0f), mbAspect4x3(false), mbDrawClipped(false), muLine(0), mfLineSpacing(0.0f),
|
||||
mfCharacterSpacing(0.0f), mfFontWidth(0.0f), mfFontHeight(0.0f), mfModifyStartY(0.0f), mfMinScrollY(0.0f),
|
||||
muDrawStartPos(0), muDrawEndPos(65535), mbSecretMode(false), muDrawModifyStartLine(0), muDrawModifyEndLine(0),
|
||||
muDrawModifyStartPos(0), muDrawModifyEndPos(0), muCachedStartPos(0), muCachedEndPos(0), mbDrawCache(false),
|
||||
mfCachedCursorX(0.0f), mfCachedCursorY(0.0f), mfDrawScrollY(0.0f), muCachedCursorPosition(0),
|
||||
mbCursorCache(false), mbMaintainCursorCache(true) { memset(&mCachedCursor, 0, sizeof(mCachedCursor)); }
|
||||
#endif
|
||||
virtual void create(MEMAllocator* allocator);
|
||||
virtual void draw(CursorPos* cursorPos);
|
||||
virtual void draw();
|
||||
@@ -53,7 +72,7 @@ namespace textinput {
|
||||
|
||||
virtual nw4r::math::VEC2 getScale() const = 0;
|
||||
|
||||
virtual void setSecretModeOn(bool secretMode);
|
||||
virtual void setSecretModeOn(bool secretMode) { mbSecretMode = secretMode; }
|
||||
|
||||
virtual void doBeforeDrawProcess(const wchar_t*, u32, const DrawInfo& drawInfo);
|
||||
virtual void doAfterDrawProcess(const wchar_t*, u32, const DrawInfo& drawInfo);
|
||||
@@ -75,49 +94,117 @@ namespace textinput {
|
||||
virtual u32 getEndPos() const;
|
||||
|
||||
// todo
|
||||
virtual void setDrawModifyScopeLine(s32, s32);
|
||||
virtual void setDrawCacheScopeLine(s32, s32);
|
||||
virtual void modifyCursorCache(s32, u32, f32, f32, f32, f32);
|
||||
#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);
|
||||
#else
|
||||
virtual void setDrawModifyScopeLine();
|
||||
virtual void setDrawCacheScopeLine();
|
||||
virtual void modifyCursorCache();
|
||||
#endif
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
virtual bool isEnableCursorCache() const;
|
||||
virtual s32 getDrawModifyStartLine() const;
|
||||
virtual s32 getDrawModifyEndLine() const;
|
||||
#else
|
||||
virtual void isEnableCursorCache();
|
||||
#endif
|
||||
#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
|
||||
virtual void getDrawModifyStartLine();
|
||||
virtual void getDrawModifyEndLine();
|
||||
#endif
|
||||
virtual u32 getDrawCacheStartPos() const;
|
||||
virtual void dirtyDrawCache();
|
||||
virtual void dirtyCursorCache();
|
||||
|
||||
#ifdef TITEXTDRAWER_IMPLEMENTATION
|
||||
protected:
|
||||
const wchar_t* mpDrawString; // 0x50
|
||||
ViewPort mSavedViewport; // 0x54
|
||||
f32 mSavedProjection[7]; // 0x6C
|
||||
nw4r::ut::Rect mProjectionRect; // 0x88
|
||||
f32 mfVIWidth; // 0x98
|
||||
bool mbAspect4x3; // 0x9C
|
||||
bool mbDrawClipped; // 0x9D
|
||||
s32 muLine; // 0xA0
|
||||
f32 mfLineSpacing; // 0xA4
|
||||
f32 mfCharacterSpacing; // 0xA8
|
||||
f32 mfFontWidth; // 0xAC
|
||||
f32 mfFontHeight; // 0xB0
|
||||
f32 mfModifyStartY; // 0xB4
|
||||
f32 mfMinScrollY; // 0xB8
|
||||
u32 muDrawStartPos; // 0xBC
|
||||
u32 muDrawEndPos; // 0xC0
|
||||
u32 muDrawCacheStartPos; // 0xC4
|
||||
bool mbSecretMode; // 0xC8
|
||||
s32 muDrawModifyStartLine; // 0xCC
|
||||
s32 muDrawModifyEndLine; // 0xD0
|
||||
s32 muDrawModifyStartPos; // 0xD4
|
||||
s32 muDrawModifyEndPos; // 0xD8
|
||||
u32 muCachedStartPos; // 0xDC
|
||||
u32 muCachedEndPos; // 0xE0
|
||||
bool mbDrawCache; // 0xE4
|
||||
f32 mfCachedCursorX; // 0xE8
|
||||
f32 mfCachedCursorY; // 0xEC
|
||||
f32 mfDrawScrollY; // 0xF0
|
||||
s32 mnCachedCursorLine; // 0xF4
|
||||
CursorPos mCachedCursor; // 0xF8
|
||||
bool mbCursorCache; // 0x104
|
||||
bool mbMaintainCursorCache; // 0x105
|
||||
const wchar_t* mpDrawString;
|
||||
ViewPort mSavedViewport;
|
||||
f32 mSavedProjection[7];
|
||||
nw4r::ut::Rect mProjectionRect;
|
||||
f32 mfVIWidth;
|
||||
bool mbAspect4x3;
|
||||
bool mbDrawClipped;
|
||||
s32 muLine;
|
||||
f32 mfLineSpacing;
|
||||
f32 mfCharacterSpacing;
|
||||
f32 mfFontWidth;
|
||||
f32 mfFontHeight;
|
||||
f32 mfModifyStartY;
|
||||
f32 mfMinScrollY;
|
||||
u32 muDrawStartPos;
|
||||
u32 muDrawEndPos;
|
||||
u32 muDrawCacheStartPos;
|
||||
bool mbSecretMode;
|
||||
s32 muDrawModifyStartLine;
|
||||
s32 muDrawModifyEndLine;
|
||||
s32 muDrawModifyStartPos;
|
||||
s32 muDrawModifyEndPos;
|
||||
u32 muCachedStartPos;
|
||||
u32 muCachedEndPos;
|
||||
bool mbDrawCache;
|
||||
f32 mfCachedCursorX;
|
||||
f32 mfCachedCursorY;
|
||||
f32 mfDrawScrollY;
|
||||
s32 mnCachedCursorLine;
|
||||
CursorPos mCachedCursor;
|
||||
bool mbCursorCache;
|
||||
bool mbMaintainCursorCache;
|
||||
#else
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
protected:
|
||||
MEMAllocator* mpDrawAllocator;
|
||||
u8 mDrawConfiguration[0x34];
|
||||
f32 mfViewX;
|
||||
f32 mfViewY;
|
||||
f32 mfViewWidth;
|
||||
f32 mfViewHeight;
|
||||
f32 mfVIWidth;
|
||||
bool mbAspect4x3;
|
||||
bool mbDrawClipped;
|
||||
u32 muLine;
|
||||
f32 mfLineSpacing;
|
||||
f32 mfCharacterSpacing;
|
||||
f32 mfFontWidth;
|
||||
f32 mfFontHeight;
|
||||
f32 mfModifyStartY;
|
||||
f32 mfMinScrollY;
|
||||
u32 muDrawStartPos;
|
||||
u32 muDrawEndPos;
|
||||
u32 muDrawCacheStartPos;
|
||||
#else
|
||||
private:
|
||||
u8 unk_0x50[0x78];
|
||||
#endif
|
||||
bool mbSecretMode; // 0xC8
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION) || defined(TITEXTDRAWER_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION)
|
||||
u32 muDrawModifyStartLine;
|
||||
u32 muDrawModifyEndLine;
|
||||
u32 muDrawModifyStartPos;
|
||||
u32 muDrawModifyEndPos;
|
||||
u32 muCachedStartPos;
|
||||
u32 muCachedEndPos;
|
||||
bool mbDrawCache;
|
||||
f32 mfCachedCursorX;
|
||||
f32 mfCachedCursorY;
|
||||
f32 mfDrawScrollY;
|
||||
u32 muCachedCursorPosition;
|
||||
CursorPos mCachedCursor;
|
||||
bool mbCursorCache;
|
||||
bool mbMaintainCursorCache;
|
||||
#elif defined(MYTIINPUTFORM_IMPLEMENTATION)
|
||||
protected:
|
||||
void setDrawScrollY(const f32& scroll) { mfDrawScrollY = scroll; }
|
||||
u8 mDrawState[0x27];
|
||||
f32 mfDrawScrollY;
|
||||
u8 mDrawCacheState[0x14];
|
||||
#else
|
||||
u8 unk_0xCC[0x3C];
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ namespace textinput {
|
||||
f32 y; // 0x08
|
||||
} Scroll;
|
||||
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
enum HVKCode { HVK_None = 0 };
|
||||
#endif
|
||||
|
||||
class Base {
|
||||
public :
|
||||
virtual ~Base() {}
|
||||
@@ -50,23 +54,28 @@ namespace textinput {
|
||||
class CommandSender;
|
||||
class CommandReceiver : public Base {
|
||||
public:
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
struct ChangePredictMode;
|
||||
#endif
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
CommandReceiver() { clearSender(); }
|
||||
virtual ~CommandReceiver();
|
||||
#endif
|
||||
#if defined(MYTIINPUTFORM_IMPLEMENTATION) || defined(MYTILETTERFORM_IMPLEMENTATION) || defined(TIINPUTFORM_IMPLEMENTATION) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
struct Scroll {
|
||||
bool absY;
|
||||
f32 x;
|
||||
f32 y;
|
||||
};
|
||||
#endif
|
||||
typedef enum INPUT_COMMAND {
|
||||
IC_TRANSLATE_MODE = 6,
|
||||
INPUT_COMMAND_0 = 0,
|
||||
INPUT_COMMAND_37 = 37,
|
||||
} INPUT_COMMAND;
|
||||
|
||||
typedef struct Scroll {
|
||||
bool absY; // 0x00
|
||||
f32 x; // 0x04
|
||||
f32 y; // 0x08
|
||||
} Scroll;
|
||||
|
||||
typedef struct ChangePredictMode {
|
||||
u32 muLanguage; // 0x00
|
||||
u8 mbPredictOn; // 0x04
|
||||
} ChangePredictMode;
|
||||
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION) || defined(TISIGNWINDOW_IMPLEMENTATION)
|
||||
struct ChangePredictMode { u32 mode; bool enabled; };
|
||||
#endif
|
||||
virtual void clearSender();
|
||||
virtual void onCommand(INPUT_COMMAND command, void* data);
|
||||
virtual void addSender(CommandSender* cmdSend);
|
||||
@@ -80,7 +89,13 @@ namespace textinput {
|
||||
CommandSender() : mpCommandReceiver(NULL) {}
|
||||
|
||||
virtual void setCommandReceiver(CommandReceiver* cmdRecv);
|
||||
#if (defined(TI_PC_KEYBOARD_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
virtual void sendCommand(u32 command, void* data) {
|
||||
if (mpCommandReceiver != NULL) mpCommandReceiver->onCommand(static_cast<CommandReceiver::INPUT_COMMAND>(command), data);
|
||||
}
|
||||
#else
|
||||
virtual void sendCommand(u32, void*);
|
||||
#endif
|
||||
virtual void updateFromReceiver(u32, void*) {}
|
||||
|
||||
nw4r::ut::Link mLink; // 0x00
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace textinput {
|
||||
namespace toolbar {
|
||||
class Base {
|
||||
public:
|
||||
#ifdef TI_TOOLBAR_SAMPLE_CLASS
|
||||
#if defined(TI_TOOLBAR_SAMPLE_CLASS) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
Base(Manager* manager) : mQwerty(true), meLanguage(USA), mpAllocator(NULL), mpManager(manager) {}
|
||||
#endif
|
||||
|
||||
@@ -35,16 +35,20 @@ namespace textinput {
|
||||
|
||||
class LayoutByNW4R : public Base, public nw4rmanager::Layout {
|
||||
public:
|
||||
#ifdef TI_TOOLBAR_SAMPLE_CLASS
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, arcName, observer), mpEventHandler(NULL),
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer, const char* layoutName)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, layoutName, observer), mpEventHandler(NULL),
|
||||
mbIsEnableQwertyChg(false) {}
|
||||
#elif defined(TI_TOOLBAR_SAMPLE_CLASS)
|
||||
LayoutByNW4R(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: Base(manager), nw4rmanager::Layout(resAccessor, "fs_VK_toolbar_a.brlyt", observer), mpEventHandler(NULL),
|
||||
mbIsEnableQwertyChg(false) {}
|
||||
#endif
|
||||
|
||||
virtual ~LayoutByNW4R();
|
||||
virtual void create(MEMAllocator* allocator) override;
|
||||
virtual void draw() override;
|
||||
virtual void init() override;
|
||||
virtual void draw() override;
|
||||
|
||||
virtual void setQwerty(bool qwerty) override;
|
||||
virtual void setLanguage(Language language) override;
|
||||
@@ -52,10 +56,19 @@ namespace textinput {
|
||||
virtual void onOK();
|
||||
virtual void onCancel();
|
||||
virtual void setQwertyWithSE(bool qwerty);
|
||||
#ifdef TI_CELLPHONE_IMPLEMENTATION
|
||||
virtual bool isEnableKeytopChange() const { return mbIsEnableQwertyChg; }
|
||||
#else
|
||||
virtual bool isEnableKeytopChange() const;
|
||||
#endif
|
||||
virtual void enableKeytopChange(bool enable);
|
||||
#ifdef MYTIMANAGER_MATCHING
|
||||
virtual nw4r::lyt::Pane* getDownArea();
|
||||
virtual nw4r::lyt::Pane* getUpArea();
|
||||
#else
|
||||
virtual nw4r::lyt::Pane* getUpArea();
|
||||
virtual nw4r::lyt::Pane* getDownArea();
|
||||
#endif
|
||||
virtual void setOKButtonVisible(bool visible);
|
||||
virtual void setCancelButtonVisible(bool visible);
|
||||
virtual void setOKButtonCaption(const wchar_t* caption);
|
||||
@@ -117,12 +130,21 @@ namespace textinput {
|
||||
KeyType meKeyType; // 0x30
|
||||
};
|
||||
|
||||
#ifdef TI_TOOLBAR_SAMPLE_CLASS
|
||||
#if defined(TI_TOOLBAR_SAMPLE_CLASS) || defined(TIMANAGER_IMPLEMENTATION)
|
||||
class Sample : public LayoutByNW4R {
|
||||
public:
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, const char* arcName, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, arcName, observer) {}
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer, const char* layoutName)
|
||||
: LayoutByNW4R(manager, resAccessor, observer, layoutName) {}
|
||||
#else
|
||||
Sample(Manager* manager, nw4r::lyt::MultiArcResourceAccessor* resAccessor, EventObserver* observer)
|
||||
: LayoutByNW4R(manager, resAccessor, observer) {}
|
||||
#endif
|
||||
#ifdef TIMANAGER_IMPLEMENTATION
|
||||
virtual ~Sample();
|
||||
#else
|
||||
virtual ~Sample() {}
|
||||
#endif
|
||||
};
|
||||
#else
|
||||
class Sample {};
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
namespace textinput {
|
||||
namespace util {
|
||||
#ifdef TIINPUTFORM_IMPLEMENTATION
|
||||
wchar_t HankakuToZenkaku(wchar_t ch);
|
||||
#endif
|
||||
wchar_t toWLower(wchar_t ch);
|
||||
wchar_t toWUpper(wchar_t ch);
|
||||
|
||||
@@ -17,9 +20,15 @@ namespace textinput {
|
||||
wchar_t KBD_ConvertSmall(wchar_t ch);
|
||||
wchar_t KBD_ConvertAll(wchar_t ch);
|
||||
|
||||
#ifdef TISTRING_IMPLEMENTATION
|
||||
u32 KBD_IsDakuten(wchar_t ch);
|
||||
u32 KBD_IsHandaku(wchar_t ch);
|
||||
u32 KBD_IsSmall(wchar_t ch);
|
||||
#else
|
||||
bool KBD_IsDakuten(wchar_t ch);
|
||||
bool KBD_IsHandaku(wchar_t ch);
|
||||
bool KBD_IsSmall(wchar_t ch);
|
||||
#endif
|
||||
|
||||
bool strcmp(const char* s1, const char* s2);
|
||||
void replaceChar(char* dest, u32 destLen, const char* src, int replaceIdx, char newCh);
|
||||
@@ -46,10 +55,11 @@ namespace textinput {
|
||||
public:
|
||||
Animation() : mfAnimationTime(0.0f), mbInAnimation(false), mbSE(false), mpAnimObserver(NULL) {}
|
||||
|
||||
virtual void startAnm(f32, f32, f32, AnimObserver*, void*); // 0x08
|
||||
void startAnm(AnimObserver* observer, f32 start, f32 end, f32 frame, void* arg) {
|
||||
startAnm(start, end, frame, observer, arg);
|
||||
}
|
||||
#if defined(TIINPUTFORM_IMPLEMENTATION) || defined(MYTIMANAGER_IMPLEMENTATION)
|
||||
virtual void startAnm(f32 start, f32 end, f32 duration, AnimObserver* observer, void* data);
|
||||
#else
|
||||
virtual void startAnm(AnimObserver*, f32, f32, f32, void*);
|
||||
#endif // 0x08
|
||||
virtual void calc(); // 0x0C
|
||||
virtual f32 getValue(); // 0x10
|
||||
virtual bool isActive(); // 0x14
|
||||
|
||||
@@ -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_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_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_GC_SAVEDATA_NOVTABLE) || defined(IPL_MEMORY_CARD_NOVTABLE)
|
||||
virtual ~PaneManager();
|
||||
#else
|
||||
virtual ~PaneManager() {}
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
#include "utility/iplFrameController.h"
|
||||
|
||||
#ifdef IPL_GC_WINDOW_CPP
|
||||
#include "math/iplMathTypes.h"
|
||||
#endif
|
||||
|
||||
#ifdef IPL_GCW_INTP_CTOR_OUT_OF_LINE
|
||||
#include "global/decomp/utils.h"
|
||||
#endif
|
||||
@@ -38,6 +42,33 @@ namespace ipl {
|
||||
T mEnd;
|
||||
};
|
||||
|
||||
#ifdef IPL_GC_WINDOW_CPP
|
||||
template <>
|
||||
class Interporation<VEC3> : public utility::FrameController {
|
||||
public:
|
||||
virtual ~Interporation();
|
||||
|
||||
void init(int playback, f32 maxFrame, f32 minFrame, const VEC3& start,
|
||||
const VEC3& end, f32 speed = 1.0f) {
|
||||
mStart = start;
|
||||
mEnd = end;
|
||||
utility::FrameController::init(playback, maxFrame, minFrame, speed);
|
||||
}
|
||||
|
||||
const VEC3& getStart() { return mStart; }
|
||||
const VEC3& getEnd() { return mEnd; }
|
||||
|
||||
void playBackwards() {
|
||||
mAnmType = ANIM_TYPE_BACKWARD;
|
||||
mState = ANIM_STATE_PLAY;
|
||||
}
|
||||
|
||||
protected:
|
||||
VEC3 mStart;
|
||||
VEC3 mEnd;
|
||||
};
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
class LinearIntp : public Interporation<T> {
|
||||
public:
|
||||
@@ -61,6 +92,16 @@ namespace ipl {
|
||||
T get2() const { return (((mStart * (mMaxFrame - mFrame)) + (mEnd * mFrame)) / mMaxFrame); }
|
||||
};
|
||||
|
||||
#ifdef IPL_GC_WINDOW_CPP
|
||||
template <>
|
||||
class LinearIntp<VEC3> : public Interporation<VEC3> {
|
||||
public:
|
||||
LinearIntp();
|
||||
virtual ~LinearIntp();
|
||||
VEC3 get() const;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
template <typename T>
|
||||
@@ -69,7 +110,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 +122,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 +142,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 +150,8 @@ namespace ipl {
|
||||
protected:
|
||||
T mStart;
|
||||
T mEnd;
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
f32 mStartTangent;
|
||||
f32 mEndTangent;
|
||||
};
|
||||
|
||||
template <>
|
||||
@@ -119,7 +160,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 +173,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 +185,8 @@ namespace ipl {
|
||||
protected:
|
||||
f32 mStart;
|
||||
f32 mEnd;
|
||||
f32 unkVal0;
|
||||
f32 unkVal1;
|
||||
f32 mStartTangent;
|
||||
f32 mEndTangent;
|
||||
};
|
||||
|
||||
#pragma dont_instantiate HermiteIntp<float>
|
||||
@@ -155,12 +196,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 +217,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 +237,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 +254,55 @@ 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
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_CPP
|
||||
} // namespace math
|
||||
} // namespace ipl
|
||||
#include "math/iplMathTypes.h"
|
||||
namespace ipl {
|
||||
namespace math {
|
||||
template <>
|
||||
class HermiteIntp<VEC3> : public utility::FrameController {
|
||||
public:
|
||||
HermiteIntp() {}
|
||||
virtual ~HermiteIntp();
|
||||
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;
|
||||
VEC3 result =
|
||||
(mStart * (1.0f + (inverseDuration * (inverseDuration *
|
||||
(inverseDuration * (frame * (2.0f * frame * frame)))) -
|
||||
inverseDuration * (inverseDuration * (3.0f * frame * frame))))) -
|
||||
(mEnd * (inverseDuration * (inverseDuration *
|
||||
(inverseDuration * (frame * (2.0f * frame * frame)))) -
|
||||
inverseDuration * (inverseDuration * (3.0f * frame * frame))));
|
||||
f32 frameSquared = frame * frame;
|
||||
f32 cubic = inverseDuration * (inverseDuration * (frame * frameSquared));
|
||||
f32 tangent = mStartTangent * (frame + (cubic -
|
||||
inverseDuration * (2.0f * frame * frame))) +
|
||||
mEndTangent * (cubic - inverseDuration * frameSquared);
|
||||
result.x += tangent;
|
||||
result.y += tangent;
|
||||
result.z += tangent;
|
||||
return result;
|
||||
}
|
||||
protected:
|
||||
VEC3 mStart;
|
||||
VEC3 mEnd;
|
||||
f32 mStartTangent;
|
||||
f32 mEndTangent;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -143,7 +143,11 @@ namespace ipl {
|
||||
#else
|
||||
VEC3 operator-(const VEC3& rhs) const { return VEC3(x - rhs.x, y - rhs.y, z - rhs.z); }
|
||||
#endif
|
||||
#ifdef IPL_FOCUS_OBJECT_CPP
|
||||
VEC3 operator*(f32 val) const;
|
||||
#else
|
||||
VEC3 operator*(f32 val) const { return VEC3(x * val, y * val, z * val); }
|
||||
#endif
|
||||
VEC3 operator*(f64 val) const {
|
||||
nw4r::math::VEC3 vecOut;
|
||||
VEC3Scale(&vecOut, this, (f32)val);
|
||||
|
||||
@@ -162,14 +162,14 @@ namespace ipl {
|
||||
class {
|
||||
public:
|
||||
void init() {
|
||||
unk_0x0C = -1;
|
||||
mAngleIdx = -1;
|
||||
pos.x = 0.0f;
|
||||
pos.y = 0.0f;
|
||||
}
|
||||
|
||||
math::VEC2 pos; // pos
|
||||
int unk_0x08;
|
||||
int unk_0x0C;
|
||||
int mStep;
|
||||
int mAngleIdx;
|
||||
} mStandData; // 0xE4
|
||||
|
||||
picture mPicture; // 0xF4
|
||||
|
||||
@@ -53,24 +53,7 @@ namespace ipl {
|
||||
mBScroller.init();
|
||||
}
|
||||
|
||||
BOOL calc(bool canScroll) __attribute__((never_inline)) /*for now*/ {
|
||||
BOOL result = FALSE;
|
||||
|
||||
if (canScroll) {
|
||||
if (mBScroller.calc()) {
|
||||
result = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
mScroller.calc();
|
||||
|
||||
f32 movable = mScroller.movable_pos(mBScroller.getSpeed());
|
||||
|
||||
mScroller.addScroll(movable);
|
||||
mBScroller.addSoundFreq(movable);
|
||||
|
||||
return result;
|
||||
}
|
||||
BOOL calc(bool canScroll);
|
||||
|
||||
BOOL is_busy() const {
|
||||
BOOL result = TRUE;
|
||||
|
||||
@@ -18,11 +18,11 @@ namespace ipl {
|
||||
|
||||
class line_collision {
|
||||
public:
|
||||
line_collision() : unk_0x00(0.0f), unk_0x04(0.0f), unk_0x08(0.0f) {}
|
||||
line_collision() : mLeft(0.0f), mRight(0.0f), mY(0.0f) {}
|
||||
|
||||
f32 unk_0x00;
|
||||
f32 unk_0x04;
|
||||
f32 unk_0x08;
|
||||
f32 mLeft;
|
||||
f32 mRight;
|
||||
f32 mY;
|
||||
nw4r::ut::Link mLinkList; // 0x0C
|
||||
};
|
||||
|
||||
@@ -31,9 +31,9 @@ namespace ipl {
|
||||
url_collision();
|
||||
~url_collision();
|
||||
|
||||
int unk_0x00;
|
||||
wchar_t* unk_0x04;
|
||||
wchar_t* unk_0x08;
|
||||
int mTagNo;
|
||||
wchar_t* mpStart;
|
||||
wchar_t* mpEnd;
|
||||
nw4r::ut::Link mLinkList; // 0x0C
|
||||
nw4r::ut::List mLineCollisions; // 0x14
|
||||
};
|
||||
@@ -53,19 +53,19 @@ namespace ipl {
|
||||
void parse(nw4r::ut::PrintContext<wchar_t>* context);
|
||||
|
||||
BOOL is_focused() const;
|
||||
void select(int unk);
|
||||
void select(int tagNo);
|
||||
|
||||
int get_focused_tagno(int chan) const;
|
||||
url_collision* get_selected_col();
|
||||
|
||||
void get_url(char* urlOut, u32 urlLen);
|
||||
|
||||
void setUnk_0x40(f32 val) { unk_0x40 = val; }
|
||||
void setUnk_0x44(f32 val) { unk_0x44 = val; }
|
||||
void setUnk_0x53(bool val) { unk_0x53 = val; }
|
||||
void setHitYOffset(f32 val) { mHitYOffset = val; }
|
||||
void setMemoTranslateY(f32 val) { mMemoTranslateY = val; }
|
||||
void setFocusEnabled(bool val) { mbFocusEnabled = val; }
|
||||
|
||||
u8 getUnk_0x50() const { return unk_0x50; }
|
||||
void setUnk_0x50(u8 val) { unk_0x50 = val; }
|
||||
u8 getColorPass() const { return mbColorPass; }
|
||||
void setColorPass(u8 val) { mbColorPass = val; }
|
||||
|
||||
private:
|
||||
typedef struct {
|
||||
@@ -75,14 +75,14 @@ namespace ipl {
|
||||
|
||||
con_data mConData[WPAD_MAX_CONTROLLERS]; // 0x00
|
||||
nw4r::ut::List mUrlCollisions; // 0x34
|
||||
f32 unk_0x40;
|
||||
f32 unk_0x44;
|
||||
int unk_0x48;
|
||||
int unk_0x4C;
|
||||
u8 unk_0x50;
|
||||
u8 unk_0x51;
|
||||
u8 unk_0x52;
|
||||
u8 unk_0x53;
|
||||
f32 mHitYOffset;
|
||||
f32 mMemoTranslateY;
|
||||
int mCurTagNo;
|
||||
int mSelectedTagNo;
|
||||
u8 mbColorPass;
|
||||
u8 mbInTag;
|
||||
u8 mbHoverOffset;
|
||||
u8 mbFocusEnabled;
|
||||
};
|
||||
} // namespace scene
|
||||
} // namespace ipl
|
||||
|
||||
@@ -309,8 +309,8 @@ namespace ipl {
|
||||
return mbArrowVisible[i];
|
||||
}
|
||||
|
||||
void setUnk_0x105(bool flag) {
|
||||
unk_0x105 = flag;
|
||||
void setSuppressNewMailAnm(bool flag) {
|
||||
mbSuppressNewMailAnm = flag;
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -354,7 +354,7 @@ namespace ipl {
|
||||
ANIM_MAX,
|
||||
};
|
||||
|
||||
int unk_0x54;
|
||||
int mAnimWait;
|
||||
|
||||
layout::Object* mpLayout; // 0x58
|
||||
nand::LayoutFile* mpLayoutFile; // 0x5C
|
||||
@@ -373,8 +373,8 @@ namespace ipl {
|
||||
|
||||
BOOL mbHovered[BTN_MAX]; // 0xD8
|
||||
|
||||
bool unk_0x104;
|
||||
bool unk_0x105;
|
||||
bool mbNewMailAnm;
|
||||
bool mbSuppressNewMailAnm;
|
||||
|
||||
utility::timer mTimer; // 0x108
|
||||
bool mbEnabled; // 0x110
|
||||
|
||||
@@ -95,9 +95,9 @@ namespace ipl {
|
||||
|
||||
public:
|
||||
nw4r::ut::List mDateList; // 0x84
|
||||
nw4r::ut::List unk_0x90;
|
||||
nw4r::ut::List mDrawList;
|
||||
bool mbScrolling; // 0x9C
|
||||
vBOOL unk_0xA0;
|
||||
vBOOL mbSearchTaskRunning;
|
||||
BOOL mbTaskCanceled; // 0xA4
|
||||
vBOOL mbBackToBoardAlt; // 0xA8
|
||||
bool mbAsian; // 0xAC
|
||||
|
||||
@@ -68,8 +68,8 @@ namespace ipl {
|
||||
vBOOL mbAppearMsg; // 0x0C
|
||||
|
||||
private:
|
||||
u32 unk_0x10;
|
||||
int unk_0x14;
|
||||
u32 mFocusState;
|
||||
int mPendingFocusCmd;
|
||||
layout::Object* mpLayout; // 0x18
|
||||
gui::PaneManager* mpGui; // 0x1C
|
||||
layout::PaneAnimator* mpCurrentPaneAnim; // 0x20
|
||||
@@ -77,7 +77,7 @@ namespace ipl {
|
||||
|
||||
public:
|
||||
utility::Date* mpDate; // 0x38
|
||||
u32 unk_0x3C;
|
||||
u32 mPointCount;
|
||||
|
||||
static const char* mscAnimPanes[ANIM_PANE_MAX];
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -65,7 +65,11 @@ namespace ipl {
|
||||
virtual BOOL isReady() const { return FALSE; }
|
||||
|
||||
/** @brief If the user can power off/reset the system */
|
||||
#ifdef IPL_SD_CHANNEL_TITLE_CPP
|
||||
virtual BOOL isResetAcceptable() { return TRUE; }
|
||||
#else
|
||||
virtual BOOL isResetAcceptable() const { return TRUE; }
|
||||
#endif
|
||||
/** @brief The scene running code when powering off/resetting the system */
|
||||
virtual void startResetting() {}
|
||||
/** @brief If the scene has finished its powering off/resetting task */
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -35,7 +35,11 @@ namespace ipl {
|
||||
MemoryBase* mpBase; // 0x0C
|
||||
};
|
||||
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
class __declspec(novtable) MemoryBase {
|
||||
#else
|
||||
class MemoryBase {
|
||||
#endif
|
||||
public:
|
||||
class Anm {
|
||||
public:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -102,12 +102,7 @@ namespace ipl {
|
||||
static const char* getButtonName(int button) { return smButtonName[button]; }
|
||||
#endif
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_CPP
|
||||
void setEventHandler(::gui::EventHandler * event,
|
||||
::gui::EventHandler * optOutEvent = NULL);
|
||||
#else
|
||||
void setEventHandler(::gui::EventHandler * event, ::gui::EventHandler * optOutEvent);
|
||||
#endif
|
||||
void setEventHandler(::gui::EventHandler * event);
|
||||
|
||||
void setText(const char* paneName, u32 msgId);
|
||||
void setText(const char* paneName, const wchar_t* text);
|
||||
@@ -150,7 +145,7 @@ namespace ipl {
|
||||
ANIM_MAX,
|
||||
};
|
||||
|
||||
int unk_0x54;
|
||||
int mAnimWait;
|
||||
|
||||
layout::Object* mpLayout; // 0x58
|
||||
nand::LayoutFile* mpLayoutFile; // 0x5C
|
||||
|
||||
@@ -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];
|
||||
@@ -203,9 +203,9 @@ namespace ipl {
|
||||
bool enqueueLoadNotice();
|
||||
bool enqueuePageNotice();
|
||||
bool enqueueResultNotice(u32 result);
|
||||
bool enqueueChannelNotice(u32 controller, u32 page, u32 index, u32 value);
|
||||
bool enqueueChannelNotice(u64 titleId, u32 value);
|
||||
bool enqueueMoveNotice(u32 controller, u32 page, u32 index);
|
||||
bool enqueueStateNotice(u32 controller, u32 page, u32 index, u32 state);
|
||||
bool enqueueStateNotice(u64 titleId, u32 state);
|
||||
bool enqueueErrorNotice(u32 page, u32 index);
|
||||
bool enqueueCommandNotice(u32 page, u32 index, u32 command);
|
||||
bool enqueueDeleteNotice(u32 controller, u32 page, u32 index);
|
||||
@@ -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;
|
||||
|
||||
@@ -62,17 +62,17 @@ namespace ipl {
|
||||
void start_left_event(const char* paneName);
|
||||
void start_trig_event(const char* paneName);
|
||||
|
||||
typedef struct Unk {
|
||||
typedef struct CmdEntry {
|
||||
int command; // 0x00
|
||||
u32 msgID; // 0x04
|
||||
} Unk;
|
||||
} CmdEntry;
|
||||
|
||||
Unk unk_0x64[64];
|
||||
CmdEntry mCmdQueue[64];
|
||||
|
||||
int unk_0x264;
|
||||
int unk_0x268;
|
||||
int unk_0x26C;
|
||||
int unk_0x270;
|
||||
int mQueueCapacity;
|
||||
int mQueueCount;
|
||||
int mQueueRead;
|
||||
int mQueueWrite;
|
||||
|
||||
int mSettingArg; // 0x274
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace ipl {
|
||||
WAIT_UNTIL_FADE_IN = 15
|
||||
};
|
||||
|
||||
TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const ipl::math::VEC3& unk2,
|
||||
f32 unk3 = 120.0f, f32 unk4 = 30.0f);
|
||||
TextBalloon(EGG::Heap* heap, nand::LayoutFile* layoutFile, const char* directory, const char* fileName, const ipl::math::VEC3& initialPos,
|
||||
f32 margin16x9 = 120.0f, f32 margin4x3 = 30.0f);
|
||||
~TextBalloon();
|
||||
|
||||
void calc();
|
||||
@@ -31,7 +31,7 @@ namespace ipl {
|
||||
void fadeout();
|
||||
void fadeoutForce();
|
||||
|
||||
void setPos(const math::VEC3& pos, bool unk0, int unk1);
|
||||
void setPos(const math::VEC3& pos, bool use16x9X, int hAlign);
|
||||
void updatePos(const math::VEC3& pos);
|
||||
|
||||
void set_translate(const math::VEC3& trans);
|
||||
@@ -50,7 +50,7 @@ namespace ipl {
|
||||
|
||||
undefined4 unk_0x00;
|
||||
undefined4 unk_0x04;
|
||||
BOOL unk_0x08;
|
||||
BOOL mbWaitingFadeIn; // 0x08
|
||||
|
||||
layout::Object* mpLayout; // 0x0C
|
||||
|
||||
@@ -60,10 +60,10 @@ namespace ipl {
|
||||
|
||||
u32 mTextLen; // 0x18
|
||||
math::VEC3 mBalloonPos; // 0x1C
|
||||
undefined4 unk_0x28;
|
||||
undefined unk_0x2C;
|
||||
f32 unk_0x30;
|
||||
f32 unk_0x34;
|
||||
undefined4 mHAlign; // 0x28
|
||||
undefined mbUse16x9X; // 0x2C
|
||||
f32 mMargin16x9; // 0x30
|
||||
f32 mMargin4x3; // 0x34
|
||||
|
||||
int mWaitUntilFadeIn; // 0x38
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace ipl {
|
||||
};
|
||||
|
||||
virtual BOOL isResetAcceptable() const {
|
||||
return unk_0x7D;
|
||||
return mbResetAcceptable;
|
||||
}
|
||||
|
||||
virtual void prepare();
|
||||
@@ -108,7 +108,7 @@ namespace ipl {
|
||||
static const int mToFace_Duration = 20;
|
||||
|
||||
bool mbClosing; // 0x7C
|
||||
bool unk_0x7D;
|
||||
bool mbResetAcceptable;
|
||||
|
||||
wchar_t* mWCString; // 0x80
|
||||
|
||||
|
||||
@@ -38,21 +38,49 @@ namespace ipl {
|
||||
int holdSE(const char* sndName);
|
||||
int holdSEwithPosDis(const char* sndName, f32 x, f32 y);
|
||||
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void stopBGM(int unk = 0);
|
||||
#else
|
||||
int stopBGM(int unk = 0);
|
||||
#endif
|
||||
int stopBGM(nw4r::snd::SoundHandle* handle, int unk = 0);
|
||||
int stopSE(nw4r::snd::SoundHandle* handle, int unk = 0);
|
||||
void stopSE(nw4r::snd::SoundHandle* handle, int unk = 0);
|
||||
void stopAllSound(int unk = 0);
|
||||
|
||||
int resetAllSound();
|
||||
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void muteOffBGM(int);
|
||||
#else
|
||||
int muteOffBGM(int);
|
||||
#endif
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void muteOnBGM(int);
|
||||
#else
|
||||
int muteOnBGM(int);
|
||||
#endif
|
||||
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void pauseOnBGM();
|
||||
#else
|
||||
int pauseOnBGM();
|
||||
#endif
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void pauseOffBGM();
|
||||
#else
|
||||
int pauseOffBGM();
|
||||
#endif
|
||||
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void pauseOnSE();
|
||||
#else
|
||||
int pauseOnSE();
|
||||
#endif
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void pauseOffSE();
|
||||
#else
|
||||
int pauseOffSE();
|
||||
#endif
|
||||
|
||||
void setOutputMode(EAudioOutputMode mode);
|
||||
|
||||
@@ -71,7 +99,7 @@ namespace ipl {
|
||||
long clipGELT_S32(long value, long lo, long hi);
|
||||
|
||||
private:
|
||||
u32 unk_0x620[0x18];
|
||||
u32 unk_0x620[3];
|
||||
};
|
||||
|
||||
// use getSystem() and getBannerPlayer() instead
|
||||
|
||||
@@ -89,10 +89,10 @@ namespace ipl {
|
||||
|
||||
int mIPLState; // 0x04
|
||||
volatile BS2State mState; // 0x08
|
||||
bool unk_0x0C;
|
||||
bool unk_0x0D;
|
||||
bool unk_0x0E;
|
||||
bool unk_0x0F;
|
||||
bool mbTickEnabled; // 0x0C
|
||||
bool mbUpdateRequested; // 0x0D
|
||||
bool mbAbortRequested; // 0x0E
|
||||
bool mbRestartRequested; // 0x0F
|
||||
bool mbIsDiagDisc; // 0x10
|
||||
bool mbIncludesSeatTitles; // 0x11
|
||||
u8* mpBannerBuffer; // 0x14
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -118,26 +118,26 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &status;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &status;
|
||||
}
|
||||
|
||||
Base(int chan, int type, KPADStatus& status) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = type;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
KPADEnableDPD(chan);
|
||||
}
|
||||
|
||||
@@ -152,15 +152,15 @@ namespace ipl {
|
||||
|
||||
protected:
|
||||
u8 mButton;
|
||||
u32 unk_0x08;
|
||||
u32 mDecideHoldCount;
|
||||
OSTick mLastRumbleTime;
|
||||
s32 mRumbleType;
|
||||
u32 mChan;
|
||||
u32 mType;
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D;
|
||||
u8 unk_0x1E;
|
||||
KPADStatus* unk_0x20;
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinch;
|
||||
u8 mbPrevPinch;
|
||||
KPADStatus* mpStatus;
|
||||
};
|
||||
|
||||
class Revolution : public Base {
|
||||
@@ -206,8 +206,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const;
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursor;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Master : public Interface {
|
||||
@@ -264,18 +264,18 @@ namespace ipl {
|
||||
public:
|
||||
Base(int chan, KPADStatus& arg1) {
|
||||
mButton = 0;
|
||||
unk_0x08 = 0;
|
||||
mDecideHoldCount = 0;
|
||||
mLastRumbleTime = 0;
|
||||
mRumbleType = -1;
|
||||
mChan = chan;
|
||||
mType = 2;
|
||||
unk_0x1C = 0;
|
||||
mbForceInvalid = 0;
|
||||
|
||||
KPADEnableDPD(chan);
|
||||
|
||||
unk_0x1D = 0;
|
||||
unk_0x1E = 0;
|
||||
unk_0x20 = &arg1;
|
||||
mbPinch = 0;
|
||||
mbPrevPinch = 0;
|
||||
mpStatus = &arg1;
|
||||
}
|
||||
|
||||
virtual ~Base(); // 0x08
|
||||
@@ -326,15 +326,15 @@ namespace ipl {
|
||||
|
||||
// protected:
|
||||
u8 mButton; // 0x4
|
||||
u32 unk_0x08; // 0x8
|
||||
u32 mDecideHoldCount; // 0x8
|
||||
OSTick mLastRumbleTime; // 0xC
|
||||
s32 mRumbleType; // 0x10
|
||||
u32 mChan; // 0x14
|
||||
u32 mType; // 0x18
|
||||
u8 unk_0x1C;
|
||||
u8 unk_0x1D; // 0x1D
|
||||
u8 unk_0x1E; // 0x1E
|
||||
KPADStatus* unk_0x20; // 0x20
|
||||
u8 mbForceInvalid;
|
||||
u8 mbPinch; // 0x1D
|
||||
u8 mbPrevPinch; // 0x1E
|
||||
KPADStatus* mpStatus; // 0x20
|
||||
};
|
||||
|
||||
class Interface : public Base {
|
||||
@@ -446,8 +446,8 @@ namespace ipl {
|
||||
virtual BOOL isValidDpdClassic() const; // 0x8C
|
||||
|
||||
private:
|
||||
math::VEC2 unk_0x24;
|
||||
int unk_0x2C;
|
||||
math::VEC2 mClassicCursor;
|
||||
int mClassicCursorTimer;
|
||||
};
|
||||
|
||||
class Manager {
|
||||
|
||||
@@ -60,9 +60,9 @@ namespace ipl {
|
||||
|
||||
int mMessageID; // 0x08
|
||||
|
||||
int unk_0x0C;
|
||||
int unk_0x10;
|
||||
char unk_0x14[4];
|
||||
int mArg2;
|
||||
int mArg3;
|
||||
char mArg1[4];
|
||||
|
||||
u8* mpArcData; // 0x18
|
||||
u32 mArcSize; // 0x1C
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace ipl {
|
||||
virtual void onSE(textinput::sound::SE seId);
|
||||
virtual void onOK();
|
||||
virtual void onCancel();
|
||||
virtual void setManager(Manager* manager);
|
||||
virtual void setManager(Manager* manager) { mpKeyboardMgr = manager; }
|
||||
|
||||
private:
|
||||
Manager* mpKeyboardMgr; // 0x04
|
||||
|
||||
@@ -145,6 +145,13 @@ namespace ipl {
|
||||
mpCommonFile = commonFile;
|
||||
mpLangFile = langFile;
|
||||
}
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~LangFile() {}
|
||||
virtual void read() {}
|
||||
virtual bool isFinished() { return false; }
|
||||
virtual int checkData() { return 0; }
|
||||
virtual bool isFatalError() { return false; }
|
||||
#else
|
||||
virtual ~LangFile(); // 0x08
|
||||
|
||||
virtual void read(); // 0x0C
|
||||
@@ -152,6 +159,7 @@ namespace ipl {
|
||||
virtual bool isFinished(); // 0x14
|
||||
virtual int checkData(); // 0x18
|
||||
virtual bool isFatalError(); // 0x1C
|
||||
#endif
|
||||
|
||||
File* getCmnFile() const { return mpCommonFile; }
|
||||
File* getLangFile() const { return mpLangFile; }
|
||||
@@ -165,7 +173,11 @@ namespace ipl {
|
||||
public:
|
||||
LayoutFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool bIsNandFile);
|
||||
LayoutFile(File* commonFile, File* langFile = NULL) : LangFile(commonFile, langFile) {}
|
||||
#ifdef IPL_CHANNEL_TITLE_NOVTABLE
|
||||
virtual ~LayoutFile() {} // 0x08
|
||||
#else
|
||||
virtual ~LayoutFile(); // 0x08
|
||||
#endif
|
||||
};
|
||||
} // namespace nand
|
||||
} // namespace ipl
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace ipl {
|
||||
BOOL is_working();
|
||||
|
||||
#ifdef IPL_SD_CHANNEL_SELECT_CPP
|
||||
void requestCancel() { unk_0x04 = true; }
|
||||
void requestCancel() { mbCancel = true; }
|
||||
#endif
|
||||
|
||||
WIISaveBannerFile* get_cached_nand_save_banner(ESTitleId titleId);
|
||||
@@ -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();
|
||||
@@ -531,7 +531,7 @@ namespace ipl {
|
||||
static void wad_backup_progress_callback(u32 completed, u32 total, BOOL done);
|
||||
|
||||
Work* myWork; // 0x00
|
||||
bool unk_0x04; // 0x04
|
||||
bool mbCancel; // 0x04
|
||||
|
||||
static const char* c_banner_file_name;
|
||||
static const char* c_nocopy_folder_name;
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace ipl {
|
||||
|
||||
bool received() { return mbReviecedMsg; }
|
||||
void prepNextReceive() { mbReviecedMsg = false; }
|
||||
volatile bool isUnk0xA31() { return unk_0xA31 == false; }
|
||||
volatile bool isReceivingIdle() { return mbReceiving == false; }
|
||||
|
||||
BOOL isAppDlEnableLock(u32 appId) {
|
||||
utility::autoMutexLock lock(mAutoLock);
|
||||
@@ -175,9 +175,9 @@ namespace ipl {
|
||||
OSMutex mAutoLock; // 0xA18
|
||||
|
||||
bool mbReviecedMsg;
|
||||
bool unk_0xA31;
|
||||
bool mbReceiving;
|
||||
bool mbReceivePaused; // 0xA32
|
||||
bool unk_0xA33;
|
||||
bool mbNewTitleTblReady;
|
||||
|
||||
static Arg smArg;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -38,6 +38,19 @@ namespace EGG {
|
||||
|
||||
virtual void calc(); // 0x30
|
||||
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x34
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x38
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x3C
|
||||
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x48
|
||||
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, u32 id); // 0x50
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, unsigned int id); // 0x50
|
||||
virtual bool holdSound(nw4r::snd::SoundHandle* pHandle, const char* pName); // 0x58
|
||||
#else
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, u32 id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x34
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, unsigned int id) { return mSoundArchivePlayer.StartSound(pHandle, id); } // 0x38
|
||||
virtual bool startSound(nw4r::snd::SoundHandle* pHandle, const char* pName) NO_INLINE {
|
||||
@@ -48,10 +61,14 @@ namespace EGG {
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, u32 id) { return mSoundArchivePlayer.PrepareSound(pHandle, id); } // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, unsigned int id) { return mSoundArchivePlayer.PrepareSound(pHandle, id); } // 0x44
|
||||
virtual bool prepareSound(nw4r::snd::SoundHandle* pHandle, const char* pName) {
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
u32 id = changeNameToId(pName);
|
||||
#else
|
||||
u32 id = nw4r::snd::SoundArchive::INVALID_ID;
|
||||
if (mpArchive != NULL) {
|
||||
id = changeNameToId(pName);
|
||||
}
|
||||
#endif
|
||||
|
||||
return mSoundArchivePlayer.PrepareSound(pHandle, id);
|
||||
} // 0x48
|
||||
@@ -62,6 +79,7 @@ namespace EGG {
|
||||
u32 id = changeNameToId(pName);
|
||||
return mSoundArchivePlayer.HoldSound(pHandle, id);
|
||||
} // 0x58
|
||||
#endif
|
||||
|
||||
u32 changeNameToId(const char* pName) { return mpArchive->ConvertLabelStringToSoundId(pName); }
|
||||
const char* changeIdToName(u32 id) { return mpArchive->GetSoundLabelString(id); }
|
||||
|
||||
@@ -19,10 +19,18 @@ namespace EGG {
|
||||
|
||||
~SoundHeapMgr() { destroySoundHeap(); }
|
||||
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
virtual bool loadState(s32 id); // 0x08
|
||||
virtual s32 getCurrentLevel(); // 0x0C
|
||||
#else
|
||||
virtual bool loadState(s32 id) {
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
if (id > 0 && mHeap.GetCurrentLevel() >= id) {
|
||||
#else
|
||||
s32 level = mHeap.GetCurrentLevel();
|
||||
|
||||
if (id > 0 && level >= id) {
|
||||
#endif
|
||||
mHeap.LoadState(id);
|
||||
return true;
|
||||
}
|
||||
@@ -31,6 +39,7 @@ namespace EGG {
|
||||
} // 0x08
|
||||
|
||||
virtual s32 getCurrentLevel() { return mHeap.GetCurrentLevel(); } // 0x0C
|
||||
#endif
|
||||
|
||||
s32 saveState() { return mHeap.SaveState(); }
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
|
||||
#include <egg/core.h>
|
||||
|
||||
namespace EGG {
|
||||
|
||||
@@ -1120,6 +1120,7 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
case 's':
|
||||
if (format.argument_options == wchar_argument) {
|
||||
wchar_t* wcs_ptr = va_arg(args, wchar_t*);
|
||||
int wideLength;
|
||||
|
||||
if (wcs_ptr == NULL) {
|
||||
wcs_ptr = L"";
|
||||
@@ -1127,22 +1128,24 @@ static int __wpformatter(void* (*write_proc)(void*, const wchar_t*, size_t),
|
||||
|
||||
if (format.alternate_form) {
|
||||
wchar_t first = *wcs_ptr++;
|
||||
num_chars = (unsigned char)first;
|
||||
wideLength = (unsigned char)first;
|
||||
|
||||
if (format.precision_specified && num_chars > format.precision) {
|
||||
num_chars = format.precision;
|
||||
if (format.precision_specified && wideLength > format.precision) {
|
||||
wideLength = format.precision;
|
||||
}
|
||||
} else if (format.precision_specified) {
|
||||
num_chars = format.precision;
|
||||
wideLength = format.precision;
|
||||
|
||||
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, num_chars)) != 0) {
|
||||
num_chars = string_end - wcs_ptr;
|
||||
if ((string_end = wmemchr((wchar_t*)wcs_ptr, 0, wideLength)) != 0) {
|
||||
wideLength = string_end - wcs_ptr;
|
||||
}
|
||||
|
||||
} else {
|
||||
num_chars = wcslen(wcs_ptr);
|
||||
wideLength = wcslen(wcs_ptr);
|
||||
}
|
||||
|
||||
num_chars = wideLength;
|
||||
|
||||
buff_ptr = wcs_ptr;
|
||||
break;
|
||||
} else {
|
||||
|
||||
@@ -1,32 +1,45 @@
|
||||
|
||||
// Yes, versions other than 4.3U align by 8.
|
||||
#if defined(VERSION_43U)
|
||||
#pragma function_align 32
|
||||
#else
|
||||
#pragma function_align 8
|
||||
#endif // VERSION_43U
|
||||
#endif
|
||||
|
||||
#include <TRK_Hollywood_Revolution.h>
|
||||
|
||||
#pragma force_active on
|
||||
|
||||
// Encapsulating function to get the file to align properly
|
||||
asm void __targsupp() {
|
||||
// clang-format off
|
||||
#ifdef __MWERKS__
|
||||
// clang-format off
|
||||
asm DSIOResult TRKAccessFile(MessageCommandID cmd, unsigned int handle, int* count, unsigned char* buffer) {
|
||||
#ifdef __MWERKS__
|
||||
nofralloc
|
||||
entry TRKAccessFile
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
entry TRKOpenFile
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
entry TRKCloseFile
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
entry TRKPositionFile
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
#endif // __MWERKS__
|
||||
// clang-format on
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma function_align 8
|
||||
|
||||
asm DSIOResult TRKOpenFile() {
|
||||
#ifdef __MWERKS__
|
||||
nofralloc
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
#endif
|
||||
}
|
||||
|
||||
asm DSIOResult TRKCloseFile() {
|
||||
#ifdef __MWERKS__
|
||||
nofralloc
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
#endif
|
||||
}
|
||||
|
||||
asm DSIOResult TRKPositionFile() {
|
||||
#ifdef __MWERKS__
|
||||
nofralloc
|
||||
twi 31, r0, 0
|
||||
blr
|
||||
#endif
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace nw4r {
|
||||
class FontRefLink {
|
||||
public:
|
||||
FontRefLink();
|
||||
~FontRefLink();
|
||||
|
||||
void Set(const char* name, ut::Font* pFont);
|
||||
|
||||
|
||||
@@ -11,7 +11,11 @@ namespace nw4r {
|
||||
namespace snd {
|
||||
class SoundHandle : private ut::NonCopyable {
|
||||
public:
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
SoundHandle() NO_INLINE;
|
||||
#else
|
||||
SoundHandle() NO_INLINE : mSound(NULL) {}
|
||||
#endif
|
||||
~SoundHandle() { DetachSound(); }
|
||||
|
||||
void detail_AttachSound(detail::BasicSound* sound);
|
||||
|
||||
@@ -31,7 +31,14 @@ namespace nw4r {
|
||||
ut::detail::AutoLock<OSMutex> lock(mMutex);
|
||||
return mFrameHeap.SaveState();
|
||||
}
|
||||
#ifdef IPL_SOUND_MATCHING
|
||||
void LoadState(int id) {
|
||||
ut::detail::AutoLock<OSMutex> lock(mMutex);
|
||||
mFrameHeap.LoadState(id);
|
||||
}
|
||||
#else
|
||||
void LoadState(int id);
|
||||
#endif
|
||||
|
||||
bool IsValid() { return mFrameHeap.IsValid(); }
|
||||
|
||||
|
||||
@@ -19,8 +19,13 @@ namespace nw4r {
|
||||
template <typename T>
|
||||
class AutoLock : private NonCopyable {
|
||||
public:
|
||||
#ifdef EGG_AUDIO_EXPMGR_NO_INLINE_VIRTUALS
|
||||
explicit AutoLock(T& rLockObj);
|
||||
~AutoLock();
|
||||
#else
|
||||
explicit AutoLock(T& rLockObj) : mLockObj(rLockObj) { Lock(rLockObj); }
|
||||
~AutoLock() { Unlock(mLockObj); }
|
||||
#endif
|
||||
|
||||
private:
|
||||
T& mLockObj; // 0x00
|
||||
|
||||
@@ -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,22 +1,31 @@
|
||||
#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;
|
||||
extern "C" const u8 scLytFatalColorG;
|
||||
extern "C" const u8 scLytFatalColorB;
|
||||
extern "C" const u8 scLytFatalColorA;
|
||||
extern "C" char scLytFatalMsg[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
|
||||
|
||||
#undef NW4R_ASSERT
|
||||
#define NW4R_ASSERT(x) \
|
||||
#define NW4R_GLOBAL_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); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define NW4R_ASSERT(x) \
|
||||
{ \
|
||||
if (!(x)) { \
|
||||
GXColor front = {255, 255, 255, 0}; \
|
||||
GXColor back = {0, 0, 0, 0}; \
|
||||
OSFatal((GXColor)front, (GXColor)back, ::scLytFatalMsg); \
|
||||
} \
|
||||
}
|
||||
|
||||
#include <nw4r/lyt/window.h>
|
||||
|
||||
#include <nw4r/lyt/common.h>
|
||||
@@ -488,7 +497,7 @@ namespace nw4r {
|
||||
}
|
||||
|
||||
Material* Window::GetFrameMaterial(u32 frameIdx) const {
|
||||
NW4R_ASSERT(frameIdx < WINDOWFRAME_MAX);
|
||||
NW4R_GLOBAL_ASSERT(frameIdx < WINDOWFRAME_MAX);
|
||||
if (frameIdx >= mFrameNum) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -501,3 +510,8 @@ namespace nw4r {
|
||||
}
|
||||
} // namespace lyt
|
||||
} // namespace nw4r
|
||||
|
||||
extern "C" const u8 scLytFatalColorR = 255;
|
||||
extern "C" const u8 scLytFatalColorG = 255;
|
||||
extern "C" const u8 scLytFatalColorB = 255;
|
||||
extern "C" const u8 scLytFatalColorA = 0;
|
||||
|
||||
@@ -314,7 +314,7 @@ namespace nw4r {
|
||||
ArchiveFontBase::ConstructState ArchiveFontBase::ConstructOpAnalyzeGLGR(ConstructContext* ctx, CachedStreamReader* reader) {
|
||||
u32 glgrInnerLen;
|
||||
HeaderedGlyphGroups* pGlgr;
|
||||
ArchiveFontBinaryLayout* font;
|
||||
const ArchiveFontBinaryLayout* font;
|
||||
u8* glgrEnd;
|
||||
|
||||
u32 expectedMaxSize;
|
||||
@@ -337,7 +337,7 @@ namespace nw4r {
|
||||
|
||||
// Copy the glgr to work
|
||||
{
|
||||
pGlgr = &font->glgr;
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
glgrEnd = (u8*)pGlgr + (u32)ctx->mNextBlockHdr.size;
|
||||
|
||||
memcpy(pGlgr, &ctx->mNextBlockHdr, sizeof(BinaryBlockHeader));
|
||||
@@ -368,21 +368,21 @@ namespace nw4r {
|
||||
|
||||
u32 sheetOffsetsScratchSize;
|
||||
|
||||
dataBlockCount = font->hdr.dataBlocks; // 0x0E
|
||||
sheetGlyphCount = font->glgr.inner.sheetGlyphCount; // 0x1C
|
||||
dataBlockCount = font->hdr.dataBlocks; // 0x0E
|
||||
// countName = font->glgr.inner.nameCount;
|
||||
countSheet = font->glgr.inner.sheetCount;
|
||||
// count0A = font->glgr.inner.smthCount_0x0a;
|
||||
// count0C = font->glgr.inner.smthCount_0x0c;
|
||||
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
|
||||
|
||||
stepSheetFlags = detail::CalcSizeFlagSet(countSheet);
|
||||
flagsSheetsOff = detail::CalcOffsetSheetFlags(font->glgr.inner.nameCount, countSheet, font->glgr.inner.smthCount_0x0a,
|
||||
font->glgr.inner.smthCount_0x0c);
|
||||
flagsSheets = (const u32*)font + (flagsSheetsOff >> 2);
|
||||
|
||||
pGlgr = &font->glgr;
|
||||
sheetOffsetsSize = ROUNDUP(countSheet * sizeof(u16), 4);
|
||||
sheetOffsetsScratch = (u16*)ROUNDDOWN((u32)((u8*)font + ctx->remWorkSpace()) - sheetOffsetsSize, 2);
|
||||
|
||||
pGlgr = (HeaderedGlyphGroups*)&font->glgr;
|
||||
ENSURE_WORK_HAS_SIZE(ctx, glgrEnd - (u8*)font + sheetOffsetsSize);
|
||||
// if (ctx->pWorkEnd - workCurr < fontSizeToEndOfGlgr + sheetOffsetsSize) {
|
||||
// return CONSTRUCT_STATE_FATAL_ERR;
|
||||
|
||||
@@ -63,9 +63,9 @@ typedef struct {
|
||||
u8 mcuYRem; // 0x0F
|
||||
u16 mcuYCount; // 0x10
|
||||
u16 mcuXCount2; // 0x12
|
||||
u32 unk_0x14;
|
||||
u8 unk_0x18;
|
||||
u8 unk_0x19;
|
||||
u32 mcuTotal; // 0x14
|
||||
u8 remX; // 0x18
|
||||
u8 remY; // 0x19
|
||||
u8 compCount; // 0x1A
|
||||
u8 scanCompCount; // 0x1B
|
||||
u8 blockCount[4]; // 0x1C
|
||||
@@ -142,9 +142,9 @@ struct TMCCJPEGDecWork_t {
|
||||
u8 mcuYRem; // 0x17FF
|
||||
u16 mcuYCount; // 0x1800
|
||||
u16 mcuXCount2; // 0x1802
|
||||
u32 unk_0x1804;
|
||||
u8 unk_0x1808;
|
||||
u8 unk_0x1809;
|
||||
u32 mcuTotal; // 0x1804
|
||||
u8 remX; // 0x1808
|
||||
u8 remY; // 0x1809
|
||||
u8 compCount; // 0x180A
|
||||
u8 scanCompCount; // 0x180B
|
||||
u8 blockCount[4]; // 0x180C
|
||||
|
||||
@@ -10,28 +10,127 @@ static TMCHuffmanEntry readHuffmanEntry(const TMCHuffmanEntry* entries, u32 inde
|
||||
return entries[index];
|
||||
}
|
||||
|
||||
static TMCHuffmanEntry readHuffmanLimit(const TMCHuffmanEntry* entries) {
|
||||
TMCHuffmanEntry limit;
|
||||
limit.bitLength = entries->bitLength;
|
||||
limit.symbol = entries->symbol;
|
||||
return limit;
|
||||
static void readHuffmanLimit(const TMCHuffmanEntry* entries, TMCHuffmanEntry* limit) {
|
||||
limit->bitLength = entries->bitLength;
|
||||
limit->symbol = entries->symbol;
|
||||
}
|
||||
|
||||
static inline s32 decodeLongHuffman(s32 bitCount, const TMCHuffmanEntry* table, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
const TMCHuffmanEntry* entry;
|
||||
|
||||
if (bitCount <= 17) {
|
||||
s32 result = TMCJPEGDEC_load_buff(work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
bitData = work->bitBuf;
|
||||
bitCount -= 9;
|
||||
code = (bitData >> bitCount) & 0x1FF;
|
||||
work->bitCount = bitCount;
|
||||
length = 9;
|
||||
entry = table + 9;
|
||||
goto read_entry;
|
||||
while (1) {
|
||||
length++;
|
||||
entry++;
|
||||
if (length > 16) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
code <<= 1;
|
||||
bitData = work->bitBuf;
|
||||
bitCount--;
|
||||
work->bitCount = bitCount;
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
readHuffmanLimit(entry, limit);
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
{
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline s32 decodeACHuffman(s32 bitCount, const TMCHuffmanEntry* entry, const u8* symbols, TMCCJPEGDecWork* work, TMCHuffmanEntry* limit, TMCHuffmanEntry* decoded) {
|
||||
u32 bitData;
|
||||
u32 code;
|
||||
u32 length;
|
||||
|
||||
if (bitCount <= 17) {
|
||||
s32 result = TMCJPEGDEC_load_buff(work);
|
||||
if (result < 0) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
bitData = work->bitBuf;
|
||||
bitCount -= 9;
|
||||
code = (bitData >> bitCount) & 0x1FF;
|
||||
work->bitCount = bitCount;
|
||||
length = 9;
|
||||
entry += 9;
|
||||
goto read_entry;
|
||||
while (1) {
|
||||
length++;
|
||||
entry++;
|
||||
if (length > 16) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
}
|
||||
bitCount = work->bitCount;
|
||||
code <<= 1;
|
||||
bitData = work->bitBuf;
|
||||
bitCount--;
|
||||
work->bitCount = bitCount;
|
||||
code |= (bitData >> bitCount) & 1;
|
||||
read_entry:
|
||||
{
|
||||
readHuffmanLimit(entry, limit);
|
||||
*decoded = *limit;
|
||||
if (code > (u32)decoded->bitLength) {
|
||||
continue;
|
||||
}
|
||||
{
|
||||
u32 relativeCode = code - entry->bitLength;
|
||||
u32 symbolIndex = relativeCode + entry->symbol;
|
||||
return symbols[symbolIndex & 0xFF];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_ptr, TMCCJPEGDecWork* work) {
|
||||
const TMCHuffmanEntry* ac_fast;
|
||||
TMCHuffmanEntry dcEntry;
|
||||
TMCHuffmanEntry dcDecoded;
|
||||
TMCHuffmanEntry dcLimit;
|
||||
TMCHuffmanEntry acDecoded;
|
||||
TMCHuffmanEntry acLimit;
|
||||
u8* huff_sym;
|
||||
const TMCHuffmanEntry* ac_fast;
|
||||
s32 idx;
|
||||
u32* huff_tbl;
|
||||
s32 bit_pos;
|
||||
u32 bit_data;
|
||||
const TMCHuffmanEntry* dc_fast;
|
||||
u32 tmp;
|
||||
s32 r;
|
||||
s32 blk0;
|
||||
s32 idx;
|
||||
TMCHuffmanEntry acEntry;
|
||||
s32 extra;
|
||||
s32 t;
|
||||
s32 zz;
|
||||
s32 q;
|
||||
u32 tmp;
|
||||
const TMCHuffmanEntry* dc_fast;
|
||||
const u8* zztbl;
|
||||
|
||||
bit_pos = work->bitCount;
|
||||
@@ -46,81 +145,21 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
|
||||
bit_pos = work->bitCount;
|
||||
bit_data = work->bitBuf;
|
||||
tmp = bit_pos - 8;
|
||||
tmp = ((bit_data >> tmp) & 0xFF) << 2;
|
||||
{
|
||||
TMCHuffmanEntry dcEntry = readHuffmanEntry(dc_fast, tmp >> 2);
|
||||
dcEntry = readHuffmanEntry(dc_fast, (bit_data >> (bit_pos - 8)) & 0xFF);
|
||||
r = dcEntry.bitLength;
|
||||
extra = dcEntry.symbol;
|
||||
}
|
||||
|
||||
if (r != 0) {
|
||||
bit_pos -= r;
|
||||
work->bitCount = bit_pos;
|
||||
work->bitCount = bit_pos - r;
|
||||
r = extra;
|
||||
} else {
|
||||
s32 dcResult;
|
||||
u32 code;
|
||||
unsigned int i;
|
||||
const TMCHuffmanEntry* entry;
|
||||
s32 thresh;
|
||||
s32 offs;
|
||||
|
||||
huff_sym = work->pDCHuffSym;
|
||||
huff_tbl = work->pDCHuffTbl;
|
||||
|
||||
if (bit_pos <= 17) {
|
||||
dcResult = TMCJPEGDEC_load_buff(work);
|
||||
if (dcResult < 0) {
|
||||
goto dc_end;
|
||||
}
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
bit_data = work->bitBuf;
|
||||
bit_pos -= 9;
|
||||
code = (bit_data >> bit_pos) & 0x1FF;
|
||||
work->bitCount = bit_pos;
|
||||
|
||||
i = 9;
|
||||
entry = (const TMCHuffmanEntry*)huff_tbl + 9;
|
||||
|
||||
goto dc_entry;
|
||||
|
||||
while (1) {
|
||||
i++;
|
||||
entry++;
|
||||
if (i > 16) {
|
||||
dcResult = TMCC_ERROR_OVERFLOW;
|
||||
goto dc_end;
|
||||
}
|
||||
|
||||
bit_pos = work->bitCount;
|
||||
code <<= 1;
|
||||
bit_data = work->bitBuf;
|
||||
bit_pos--;
|
||||
work->bitCount = bit_pos;
|
||||
code |= (bit_data >> bit_pos) & 1;
|
||||
|
||||
dc_entry:
|
||||
{
|
||||
TMCHuffmanEntry decoded = readHuffmanLimit(entry);
|
||||
thresh = decoded.bitLength;
|
||||
offs = entry->symbol;
|
||||
}
|
||||
|
||||
if (code > (u32)thresh) {
|
||||
continue;
|
||||
}
|
||||
|
||||
code = code - entry->bitLength + offs;
|
||||
dcResult = huff_sym[code & 0xFF];
|
||||
break;
|
||||
}
|
||||
|
||||
dc_end:
|
||||
r = dcResult;
|
||||
if (dcResult < 0) {
|
||||
return dcResult;
|
||||
r = decodeLongHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &dcLimit, &dcDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,8 +171,8 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
if (load_ret < 0) {
|
||||
return load_ret;
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
bit_data = work->bitBuf;
|
||||
tmp = 1 << r;
|
||||
extra = tmp - 1;
|
||||
@@ -149,7 +188,6 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
*block = dc_predict_row_ptr[0] * blk0;
|
||||
|
||||
{
|
||||
TMCHuffmanEntry acEntry;
|
||||
ac_fast = (const TMCHuffmanEntry*)work->pACFast;
|
||||
huff_tbl = work->pACHuffTbl;
|
||||
huff_sym = work->pACHuffSym;
|
||||
@@ -170,7 +208,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
t = bit_pos - 8;
|
||||
acEntry = readHuffmanEntry(ac_fast, (bit_data >> t) & 0xFF);
|
||||
|
||||
while (idx < 64) {
|
||||
do {
|
||||
s32 ac_thresh = acEntry.bitLength;
|
||||
if (ac_thresh != 0) {
|
||||
bit_pos = work->bitCount;
|
||||
@@ -178,62 +216,8 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
work->bitCount = bit_pos;
|
||||
r = acEntry.symbol;
|
||||
} else {
|
||||
u32 code;
|
||||
unsigned int i;
|
||||
const TMCHuffmanEntry* entry;
|
||||
s32 thresh;
|
||||
s32 offs;
|
||||
|
||||
bit_pos = work->bitCount;
|
||||
if (bit_pos <= 17) {
|
||||
r = TMCJPEGDEC_load_buff(work);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
}
|
||||
bit_data = work->bitBuf;
|
||||
bit_pos -= 9;
|
||||
code = (bit_data >> bit_pos) & 0x1FF;
|
||||
work->bitCount = bit_pos;
|
||||
|
||||
i = 9;
|
||||
entry = (const TMCHuffmanEntry*)huff_tbl + 9;
|
||||
|
||||
goto ac_entry_huff;
|
||||
|
||||
while (1) {
|
||||
i++;
|
||||
entry++;
|
||||
if (i > 16) {
|
||||
r = TMCC_ERROR_OVERFLOW;
|
||||
goto ac_end;
|
||||
}
|
||||
|
||||
bit_pos = work->bitCount;
|
||||
code <<= 1;
|
||||
bit_data = work->bitBuf;
|
||||
bit_pos--;
|
||||
work->bitCount = bit_pos;
|
||||
code |= (bit_data >> bit_pos) & 1;
|
||||
|
||||
ac_entry_huff:
|
||||
{
|
||||
TMCHuffmanEntry decoded = readHuffmanLimit(entry);
|
||||
thresh = decoded.bitLength;
|
||||
offs = entry->symbol;
|
||||
}
|
||||
|
||||
if (code > (u32)thresh) {
|
||||
continue;
|
||||
}
|
||||
|
||||
code = code - entry->bitLength + offs;
|
||||
r = huff_sym[code & 0xFF];
|
||||
break;
|
||||
}
|
||||
|
||||
ac_end:
|
||||
r = decodeACHuffman(bit_pos, (const TMCHuffmanEntry*)huff_tbl, huff_sym, work, &acLimit, &acDecoded);
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
@@ -256,8 +240,8 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
if (r < 0) {
|
||||
return r;
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
}
|
||||
bit_pos = work->bitCount;
|
||||
tmp = 1 << t;
|
||||
bit_data = work->bitBuf;
|
||||
extra = tmp - 1;
|
||||
@@ -265,14 +249,14 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
work->bitCount = bit_pos;
|
||||
t = bit_pos - 8;
|
||||
extra = extra & (bit_data >> bit_pos);
|
||||
q = ((s32*)conv_row_ptr)[(u8)zz];
|
||||
acEntry = readHuffmanEntry(ac_fast, (bit_data >> t) & 0xFF);
|
||||
|
||||
if (((s32)tmp >> 1) > extra) {
|
||||
extra -= tmp - 1;
|
||||
}
|
||||
|
||||
q = ((s32*)conv_row_ptr)[zz];
|
||||
block[zz] = extra * q;
|
||||
block[(u8)zz] = extra * q;
|
||||
|
||||
idx++;
|
||||
} else {
|
||||
@@ -294,7 +278,7 @@ s32 TMCJPEGDEC_decode_iquant(s32* block, u8* conv_row_ptr, u32* dc_predict_row_p
|
||||
|
||||
idx += 16;
|
||||
}
|
||||
}
|
||||
} while (idx < 64);
|
||||
|
||||
if (idx > 64) {
|
||||
return TMCC_ERROR_OVERFLOW;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,30 +1,28 @@
|
||||
#include <string.h>
|
||||
#include <tmc_jpeg_internal.h>
|
||||
|
||||
static u8 clampU8(s32 v) {
|
||||
static s32 clampU8(s32 v) {
|
||||
s32 ok;
|
||||
ok = 0;
|
||||
if (v < 256 && v > -1) {
|
||||
ok = 1;
|
||||
}
|
||||
return ok ? v : 255 & ~(v >> 31);
|
||||
return ok ? v : (v < 0 ? 0 : 255);
|
||||
}
|
||||
|
||||
static s8 clampS8(s32 v) {
|
||||
static s32 clampS8(s32 v) {
|
||||
s32 inRange = 0;
|
||||
if (v < 128 && v > -129) {
|
||||
inRange = 1;
|
||||
}
|
||||
return inRange ? (s8)v : (v > 0) ? 127 : -128;
|
||||
return inRange ? v : (v > 0) ? 127 : -128;
|
||||
}
|
||||
|
||||
static s32 scalingClampU8(s32 val) {
|
||||
s32 result;
|
||||
if (val >> 19 != 0)
|
||||
result = ~(val >> 31) & 0xFF;
|
||||
else
|
||||
result = (val >> 11);
|
||||
return result;
|
||||
static s32 scalingClampU8(s32 value) {
|
||||
if ((value >> 19) == 0) {
|
||||
return value >> 11;
|
||||
}
|
||||
return value < 0 ? 0 : 255;
|
||||
}
|
||||
|
||||
void TMCJPEGDEC_IdctBlock_Lumi(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag) {
|
||||
@@ -33,13 +31,35 @@ void TMCJPEGDEC_IdctBlock_Lumi(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigz
|
||||
s32 done;
|
||||
s32 iter;
|
||||
s32 i;
|
||||
s32 b1, b2, b3, b4, b5, b6, b7;
|
||||
s32 v, e, a, d, n, o, p, q, t, u, w, x, y;
|
||||
s32 x_factor, z_factor, m_part, p_part;
|
||||
s32 r, z, m;
|
||||
s32 e;
|
||||
s32 b2;
|
||||
s32 b3;
|
||||
s32 b4;
|
||||
s32 b5;
|
||||
s32 b6;
|
||||
s32 b7;
|
||||
s32 v;
|
||||
s32 m;
|
||||
s32 a;
|
||||
s32 d;
|
||||
s32 z;
|
||||
s32 o;
|
||||
s32 p;
|
||||
s32 p_part;
|
||||
s32 t;
|
||||
s32 u;
|
||||
s32 r;
|
||||
s32 n;
|
||||
s32 y;
|
||||
s32 x_factor;
|
||||
s32 z_factor;
|
||||
s32 m_part;
|
||||
s32 q;
|
||||
s32 w;
|
||||
s32 x;
|
||||
s32 b1;
|
||||
|
||||
r = (zigzag >> 4) * 8;
|
||||
iter = (u32)(r + 7) >> 3;
|
||||
dst = tmp;
|
||||
done = 0;
|
||||
{
|
||||
@@ -71,28 +91,41 @@ void TMCJPEGDEC_IdctBlock_Lumi(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigz
|
||||
dst[1] = val;
|
||||
dst[0] = val;
|
||||
} else {
|
||||
t = (b2 - b6) * 0xB5 >> 8;
|
||||
a = block[0] - b4;
|
||||
d = block[0] + b4;
|
||||
u = t + (b6 + b2);
|
||||
v = a + t;
|
||||
e = a - t;
|
||||
w = d + u;
|
||||
x_factor = (b1 + b7) - (b5 + b3);
|
||||
y = d - u;
|
||||
z_factor = (b5 - b3) + (b1 - b7);
|
||||
m_part = (b1 - b7) * 0x14E >> 8;
|
||||
p_part = (b5 - b3) * 0x8B >> 8;
|
||||
s32 oddLowSum;
|
||||
s32 oddHighSum;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
b5 = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
b1 = b1 - b7;
|
||||
u = b6 + b2;
|
||||
t = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = b5 + b1;
|
||||
dcValue = block[0];
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
d = dcValue + b4;
|
||||
u = t + u;
|
||||
v = a + t;
|
||||
z = z_factor * 0x62 >> 8;
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
m_part = b1 * 0x14E >> 8;
|
||||
e = a - t;
|
||||
m = m_part - z;
|
||||
n = (b1 + b7) + ((b5 + b3) + m);
|
||||
oddLowSum += m;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m;
|
||||
p = z + p_part;
|
||||
q = x + p;
|
||||
dst[0] = w + n;
|
||||
p_part = b5 * 0x8B;
|
||||
dst[7] = w - n;
|
||||
p_part >>= 8;
|
||||
dst[1] = v + o;
|
||||
p = z + p_part;
|
||||
q = p + x;
|
||||
dst[6] = v - o;
|
||||
dst[2] = e + q;
|
||||
dst[5] = e - q;
|
||||
@@ -145,25 +178,37 @@ void TMCJPEGDEC_IdctBlock_Lumi(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigz
|
||||
out[pitch] = val;
|
||||
out[0] = val;
|
||||
} else {
|
||||
t = (b2 - b6) * 0xB5 >> 8;
|
||||
a = (*dst + 0x40000) - b4;
|
||||
d = (*dst + 0x40000) + b4;
|
||||
u = t + (b6 + b2);
|
||||
v = a + t;
|
||||
e = a - t;
|
||||
w = d + u;
|
||||
x_factor = (b1 + b7) - (b5 + b3);
|
||||
s32 oddLowSum;
|
||||
s32 oddHighSum;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
b5 = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
b1 = b1 - b7;
|
||||
u = b6 + b2;
|
||||
b2 = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = b5 + b1;
|
||||
dcValue = *dst + 0x40000;
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
d = dcValue + b4;
|
||||
u = b2 + u;
|
||||
v = a + b2;
|
||||
z_factor = z_factor * 0x62 >> 8;
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
|
||||
z_factor = ((b5 - b3) + (b1 - b7)) * 0x62 >> 8;
|
||||
m_part = ((b1 - b7) * 0x14E >> 8) - z_factor;
|
||||
|
||||
n = (b1 + b7) + ((b5 + b3) + m_part);
|
||||
m_part = b1 * 0x14E >> 8;
|
||||
e = a - b2;
|
||||
m_part = m_part - z_factor;
|
||||
oddLowSum += m_part;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m_part;
|
||||
p = ((b5 - b3) * 0x8B >> 8) + z_factor;
|
||||
q = x + p;
|
||||
|
||||
p_part = b5 * 0x8B >> 8;
|
||||
p = z_factor + p_part;
|
||||
q = p + x;
|
||||
out[0] = scalingClampU8(w + n);
|
||||
out[r] = scalingClampU8(w - n);
|
||||
out[pitch] = scalingClampU8(v + o);
|
||||
@@ -182,11 +227,34 @@ void TMCJPEGDEC_IdctBlock_Col(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigza
|
||||
s32* dst;
|
||||
s32 done;
|
||||
s32 iter;
|
||||
s32 i;
|
||||
s32 b1, b2, b3, b4, b5, b6, b7;
|
||||
s32 v, e, a, d, m, n, o, p, q, t, u, w, x, y, z;
|
||||
s32 x_factor, z_factor, m_part, p_part;
|
||||
s32 d;
|
||||
s32 b1;
|
||||
s32 b2;
|
||||
s32 b3;
|
||||
s32 b4;
|
||||
s32 b5;
|
||||
s32 b6;
|
||||
s32 b7;
|
||||
s32 v;
|
||||
s32 r;
|
||||
s32 a;
|
||||
s32 i;
|
||||
s32 m;
|
||||
s32 n;
|
||||
s32 o;
|
||||
s32 x;
|
||||
s32 q;
|
||||
s32 y;
|
||||
s32 u;
|
||||
s32 w;
|
||||
s32 p;
|
||||
s32 t;
|
||||
s32 z;
|
||||
s32 x_factor;
|
||||
s32 z_factor;
|
||||
s32 m_part;
|
||||
s32 p_part;
|
||||
s32 e;
|
||||
|
||||
if (zigzag == 0x11) {
|
||||
s32 val;
|
||||
@@ -200,90 +268,42 @@ void TMCJPEGDEC_IdctBlock_Col(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigza
|
||||
goto mode_gt_2;
|
||||
}
|
||||
|
||||
{
|
||||
s32 inner;
|
||||
dst = tmp;
|
||||
done = 0;
|
||||
for (; done < r; done += 8) {
|
||||
s32 dcValue;
|
||||
s32 oddCoefficient;
|
||||
|
||||
dst = tmp;
|
||||
done = 0;
|
||||
iter = (r + 7) >> 3;
|
||||
if (r > 0) {
|
||||
inner = (r + 7) >> 4;
|
||||
done = iter << 3;
|
||||
if (inner != 0) {
|
||||
for (; inner > 0; inner--) {
|
||||
t = block[1] * 0xB5 >> 8;
|
||||
v = block[1] * 0x62 >> 8;
|
||||
u = v + t;
|
||||
z = (block[1] * 0x14E >> 8) - v;
|
||||
m = block[1] + z;
|
||||
n = t + z;
|
||||
b1 = block[0] + m;
|
||||
dst[0] = b1;
|
||||
dst[7] = block[0] - m;
|
||||
dst[1] = block[0] + n;
|
||||
dst[6] = block[0] - n;
|
||||
dst[2] = block[0] + u;
|
||||
dst[5] = block[0] - u;
|
||||
dst[3] = block[0] + v;
|
||||
dst[4] = block[0] - v;
|
||||
|
||||
t = block[9] * 0xB5 >> 8;
|
||||
v = block[9] * 0x62 >> 8;
|
||||
u = v + t;
|
||||
z = (block[9] * 0x14E >> 8) - v;
|
||||
m = block[9] + z;
|
||||
n = t + z;
|
||||
b2 = block[8] + m;
|
||||
dst[8] = b2;
|
||||
dst[15] = block[8] - m;
|
||||
dst[9] = block[8] + n;
|
||||
dst[14] = block[8] - n;
|
||||
dst[10] = block[8] + u;
|
||||
dst[13] = block[8] - u;
|
||||
dst[11] = block[8] + v;
|
||||
dst[12] = block[8] - v;
|
||||
dst += 0x10;
|
||||
block += 0x10;
|
||||
}
|
||||
iter = iter & 1;
|
||||
if (iter == 0) {
|
||||
goto zero_fill;
|
||||
}
|
||||
}
|
||||
for (; iter > 0; iter--) {
|
||||
t = block[1] * 0xB5 >> 8;
|
||||
v = block[1] * 0x62 >> 8;
|
||||
u = v + t;
|
||||
z = (block[1] * 0x14E >> 8) - v;
|
||||
m = block[1] + z;
|
||||
n = t + z;
|
||||
b1 = block[0] + m;
|
||||
dst[0] = b1;
|
||||
dst[7] = block[0] - m;
|
||||
dst[1] = block[0] + n;
|
||||
dst[6] = block[0] - n;
|
||||
dst[2] = block[0] + u;
|
||||
dst[5] = block[0] - u;
|
||||
dst[3] = block[0] + v;
|
||||
dst[4] = block[0] - v;
|
||||
dst += 8;
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
zero_fill:
|
||||
dst = tmp + done;
|
||||
for (; done <= 0x38; done += 8) {
|
||||
memset(dst, 0, 0x20);
|
||||
dst += 8;
|
||||
}
|
||||
oddCoefficient = block[1];
|
||||
dcValue = block[0];
|
||||
t = oddCoefficient * 0xB5 >> 8;
|
||||
v = oddCoefficient * 0x62 >> 8;
|
||||
u = v + t;
|
||||
z = (oddCoefficient * 0x14E >> 8) - v;
|
||||
m = oddCoefficient + z;
|
||||
n = t + z;
|
||||
dst[0] = dcValue + m;
|
||||
dst[7] = dcValue - m;
|
||||
dst[1] = dcValue + n;
|
||||
dst[6] = dcValue - n;
|
||||
dst[2] = dcValue + u;
|
||||
dst[5] = dcValue - u;
|
||||
dst[3] = dcValue + v;
|
||||
dst[4] = dcValue - v;
|
||||
dst += 8;
|
||||
block += 8;
|
||||
}
|
||||
dst = tmp + done;
|
||||
for (; done <= 0x38; done += 8) {
|
||||
memset(dst, 0, 0x20);
|
||||
dst += 8;
|
||||
}
|
||||
goto epilogue;
|
||||
|
||||
mode_gt_2:
|
||||
dst = tmp;
|
||||
done = 0;
|
||||
if (r > 0) {
|
||||
for (iter = (r + 7) >> 3; iter > 0; iter--) {
|
||||
for (; done < r; done += 8) {
|
||||
u32 ac;
|
||||
b4 = block[4];
|
||||
b6 = block[6];
|
||||
@@ -312,28 +332,43 @@ mode_gt_2:
|
||||
dst[1] = val;
|
||||
dst[0] = val;
|
||||
} else {
|
||||
t = (b2 - b6) * 0xB5 >> 8;
|
||||
a = block[0] - b4;
|
||||
d = block[0] + b4;
|
||||
u = t + (b6 + b2);
|
||||
v = a + t;
|
||||
e = a - t;
|
||||
w = d + u;
|
||||
x_factor = (b1 + b7) - (b5 + b3);
|
||||
y = d - u;
|
||||
z_factor = (b5 - b3) + (b1 - b7);
|
||||
m_part = (b1 - b7) * 0x14E >> 8;
|
||||
p_part = (b5 - b3) * 0x8B >> 8;
|
||||
s32 oddLowSum;
|
||||
s32 oddLowDifference;
|
||||
s32 oddHighSum;
|
||||
s32 oddHighDifference;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
oddLowDifference = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
oddHighDifference = b1 - b7;
|
||||
u = b6 + b2;
|
||||
t = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = oddLowDifference + oddHighDifference;
|
||||
dcValue = block[0];
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
d = dcValue + b4;
|
||||
u = t + u;
|
||||
v = a + t;
|
||||
z = z_factor * 0x62 >> 8;
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
m_part = oddHighDifference * 0x14E >> 8;
|
||||
e = a - t;
|
||||
m = m_part - z;
|
||||
n = (b1 + b7) + ((b5 + b3) + m);
|
||||
oddLowSum += m;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m;
|
||||
dst[0] = w + n;
|
||||
p_part = oddLowDifference * 0x8B;
|
||||
dst[7] = w - n;
|
||||
p_part >>= 8;
|
||||
dst[1] = v + o;
|
||||
p = z + p_part;
|
||||
q = p + x;
|
||||
dst[0] = w + n;
|
||||
dst[7] = w - n;
|
||||
dst[1] = v + o;
|
||||
dst[6] = v - o;
|
||||
dst[2] = e + q;
|
||||
dst[5] = e - q;
|
||||
@@ -342,8 +377,6 @@ mode_gt_2:
|
||||
}
|
||||
block += 8;
|
||||
dst += 8;
|
||||
done += 8;
|
||||
}
|
||||
}
|
||||
|
||||
dst = tmp + done;
|
||||
@@ -357,7 +390,9 @@ epilogue:
|
||||
dst = tmp + 7;
|
||||
for (iter = 8, i = 7; iter > 0; iter--, i--) {
|
||||
u32 ac;
|
||||
u8* output;
|
||||
b4 = dst[0x20];
|
||||
output = conv_row_ptr + i;
|
||||
b6 = dst[0x30];
|
||||
b2 = dst[0x10];
|
||||
b1 = dst[8];
|
||||
@@ -375,42 +410,56 @@ epilogue:
|
||||
if (ac == 0) {
|
||||
s32 val;
|
||||
val = clampS8(*dst >> 11);
|
||||
conv_row_ptr[i + 56] = (u8)val;
|
||||
conv_row_ptr[i + 48] = (u8)val;
|
||||
conv_row_ptr[i + 40] = (u8)val;
|
||||
conv_row_ptr[i + 32] = (u8)val;
|
||||
conv_row_ptr[i + 24] = (u8)val;
|
||||
conv_row_ptr[i + 16] = (u8)val;
|
||||
conv_row_ptr[i + 8] = (u8)val;
|
||||
conv_row_ptr[i] = (u8)val;
|
||||
output[56] = (u8)val;
|
||||
output[48] = (u8)val;
|
||||
output[40] = (u8)val;
|
||||
output[32] = (u8)val;
|
||||
output[24] = (u8)val;
|
||||
output[16] = (u8)val;
|
||||
output[8] = (u8)val;
|
||||
output[0] = (u8)val;
|
||||
} else {
|
||||
t = (b2 - b6) * 0xB5 >> 8;
|
||||
a = *dst - b4;
|
||||
d = *dst + b4;
|
||||
u = t + (b6 + b2);
|
||||
v = a + t;
|
||||
e = a - t;
|
||||
w = d + u;
|
||||
x_factor = (b1 + b7) - (b5 + b3);
|
||||
s32 oddLowSum;
|
||||
s32 oddLowDifference;
|
||||
s32 oddHighSum;
|
||||
s32 oddHighDifference;
|
||||
s32 dcValue;
|
||||
|
||||
t = b2 - b6;
|
||||
oddLowSum = b5 + b3;
|
||||
oddLowDifference = b5 - b3;
|
||||
oddHighSum = b1 + b7;
|
||||
oddHighDifference = b1 - b7;
|
||||
u = b6 + b2;
|
||||
t = t * 0xB5 >> 8;
|
||||
x_factor = oddHighSum - oddLowSum;
|
||||
z_factor = oddLowDifference + oddHighDifference;
|
||||
dcValue = *dst;
|
||||
a = dcValue - b4;
|
||||
x = x_factor * 0xB5 >> 8;
|
||||
y = d - u;
|
||||
z_factor = (b5 - b3) + (b1 - b7);
|
||||
d = dcValue + b4;
|
||||
u = t + u;
|
||||
v = a + t;
|
||||
z = z_factor * 0x62 >> 8;
|
||||
m = ((b1 - b7) * 0x14E >> 8) - z;
|
||||
n = (b1 + b7) + ((b5 + b3) + m);
|
||||
w = d + u;
|
||||
y = d - u;
|
||||
m_part = oddHighDifference * 0x14E >> 8;
|
||||
e = a - t;
|
||||
m = m_part - z;
|
||||
oddLowSum += m;
|
||||
n = oddHighSum + oddLowSum;
|
||||
o = x + m;
|
||||
|
||||
p = z + ((b5 - b3) * 0x8B >> 8);
|
||||
p_part = oddLowDifference * 0x8B >> 8;
|
||||
p = z + p_part;
|
||||
q = p + x;
|
||||
|
||||
conv_row_ptr[i] = (u8)clampS8((w + n) >> 11);
|
||||
conv_row_ptr[i + 56] = (u8)clampS8((w - n) >> 11);
|
||||
conv_row_ptr[i + 8] = (u8)clampS8((v + o) >> 11);
|
||||
conv_row_ptr[i + 48] = (u8)clampS8((v - o) >> 11);
|
||||
conv_row_ptr[i + 16] = (u8)clampS8((e + q) >> 11);
|
||||
conv_row_ptr[i + 40] = (u8)clampS8((e - q) >> 11);
|
||||
conv_row_ptr[i + 24] = (u8)clampS8((y + p) >> 11);
|
||||
conv_row_ptr[i + 32] = (u8)clampS8((y - p) >> 11);
|
||||
output[0] = (u8)clampS8((w + n) >> 11);
|
||||
output[56] = (u8)clampS8((w - n) >> 11);
|
||||
output[8] = (u8)clampS8((v + o) >> 11);
|
||||
output[48] = (u8)clampS8((v - o) >> 11);
|
||||
output[16] = (u8)clampS8((e + q) >> 11);
|
||||
output[40] = (u8)clampS8((e - q) >> 11);
|
||||
output[24] = (u8)clampS8((y + p) >> 11);
|
||||
output[32] = (u8)clampS8((y - p) >> 11);
|
||||
}
|
||||
dst--;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ static u16 readU16(const u8* p, u16 byteOrder) {
|
||||
}
|
||||
|
||||
static u16 readExifU16(const u8* data, u16 byteOrder) {
|
||||
u32 value = data[0] | data[1] << 8;
|
||||
u16 value = data[0] | data[1] << 8;
|
||||
if (byteOrder == 0x4949) {
|
||||
return (u16)value;
|
||||
}
|
||||
@@ -244,6 +244,11 @@ _error:
|
||||
static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData* pInfo) {
|
||||
u16 byteOrder;
|
||||
u32 ifdOffset;
|
||||
const u8* entries;
|
||||
u16 remaining;
|
||||
u16 index;
|
||||
s32 entriesSize;
|
||||
u16 count;
|
||||
pInfo->thumbnailData = (u8*)data;
|
||||
pInfo->dataEnd = (u8*)data + size;
|
||||
pInfo->nextIfdOffset = 0;
|
||||
@@ -262,11 +267,8 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
|
||||
return -161;
|
||||
}
|
||||
{
|
||||
const u8* entries = data + ifdOffset;
|
||||
u16 remaining = size - (u16)ifdOffset;
|
||||
u16 count;
|
||||
s32 entriesSize;
|
||||
u16 index;
|
||||
entries = data + ifdOffset;
|
||||
remaining = size - (u16)ifdOffset;
|
||||
if (remaining < 2) {
|
||||
return -161;
|
||||
}
|
||||
@@ -294,11 +296,8 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
|
||||
return -161;
|
||||
}
|
||||
{
|
||||
const u8* entries = data + ifdOffset;
|
||||
u16 remaining = size - (u16)ifdOffset;
|
||||
u16 count;
|
||||
s32 entriesSize;
|
||||
u16 index;
|
||||
entries = data + ifdOffset;
|
||||
remaining = size - (u16)ifdOffset;
|
||||
if (remaining < 2) {
|
||||
return -161;
|
||||
}
|
||||
@@ -319,11 +318,8 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
|
||||
return -161;
|
||||
}
|
||||
{
|
||||
const u8* entries = data + ifdOffset;
|
||||
u16 remaining = size - (u16)ifdOffset;
|
||||
u16 count;
|
||||
s32 entriesSize;
|
||||
u16 index;
|
||||
entries = data + ifdOffset;
|
||||
remaining = size - (u16)ifdOffset;
|
||||
if (remaining < 2) {
|
||||
return -161;
|
||||
}
|
||||
@@ -343,7 +339,7 @@ static s32 TMCJPEGDEC_exif_parse(const u8* data, u32 size, TMCCJPEGDecExifData*
|
||||
}
|
||||
|
||||
static void TMCJPEGDEC_IFD0_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder, const u8* entry) {
|
||||
u16 tag;
|
||||
s32 tag;
|
||||
u16 type;
|
||||
|
||||
tag = readU16(entry, byteOrder);
|
||||
@@ -354,7 +350,7 @@ static void TMCJPEGDEC_IFD0_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder,
|
||||
case 0x0111:
|
||||
case 0x0201:
|
||||
case 0x0202: {
|
||||
return;
|
||||
break;
|
||||
}
|
||||
case 0x0112: {
|
||||
pInfo->orientation = readU16(entry + 8, byteOrder);
|
||||
@@ -474,21 +470,19 @@ static void TMCJPEGDEC_IFD0_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder,
|
||||
return;
|
||||
}
|
||||
case 0xA002: {
|
||||
u32 offset = readU32(entry + 8, byteOrder);
|
||||
if (type == 4) {
|
||||
pInfo->pixelXDim = offset;
|
||||
} else if (type == 3) {
|
||||
if (type == 3) {
|
||||
pInfo->pixelXDim = readU16(entry + 8, byteOrder);
|
||||
} else if (type == 4) {
|
||||
pInfo->pixelXDim = readU32(entry + 8, byteOrder);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
case 0xA003: {
|
||||
u32 offset = readU32(entry + 8, byteOrder);
|
||||
if (type == 4) {
|
||||
pInfo->pixelYDim = offset;
|
||||
} else if (type == 3) {
|
||||
if (type == 3) {
|
||||
pInfo->pixelYDim = readU16(entry + 8, byteOrder);
|
||||
} else if (type == 4) {
|
||||
pInfo->pixelYDim = readU32(entry + 8, byteOrder);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -508,7 +502,7 @@ static void TMCJPEGDEC_IFD1_tag_parse(TMCCJPEGDecExifData* pInfo, u16 byteOrder,
|
||||
case 0x9000:
|
||||
case 0x9101:
|
||||
case 0xA003: {
|
||||
return;
|
||||
break;
|
||||
}
|
||||
case 0x011A: {
|
||||
u32 offset;
|
||||
|
||||
@@ -51,7 +51,7 @@ s32 TMCJPEGDEC_Setsize(TMCCJPEGDecWork* work) {
|
||||
}
|
||||
|
||||
state->componentCount = work->componentCount;
|
||||
state->result = work->unk_0x1804;
|
||||
state->result = work->mcuTotal;
|
||||
state->maxX = work->mcuYCount;
|
||||
state->maxY = work->mcuXCount2;
|
||||
|
||||
@@ -59,8 +59,8 @@ s32 TMCJPEGDEC_Setsize(TMCCJPEGDecWork* work) {
|
||||
state->stepY = (state->scaleFactor + work->mcuXRem - 1) / state->scaleFactor;
|
||||
state->jpegWidth = ((s32)(work->frameWidth + state->scaleFactor) - 1) / state->scaleFactor;
|
||||
state->jpegHeight = (state->scaleFactor + work->frameHeight - 1) / state->scaleFactor;
|
||||
state->stepXExt = (state->scaleFactor + work->unk_0x1808 - 1) / state->scaleFactor;
|
||||
state->stepYExt = (state->scaleFactor + work->unk_0x1809 - 1) / state->scaleFactor;
|
||||
state->stepXExt = (state->scaleFactor + work->remX - 1) / state->scaleFactor;
|
||||
state->stepYExt = (state->scaleFactor + work->remY - 1) / state->scaleFactor;
|
||||
|
||||
state->dataSizeX = (state->stepXExt != 0) ? (state->maxX - 1) * state->stepX : (state->maxX + 1) * state->stepX;
|
||||
state->dataSizeY = (state->stepYExt != 0) ? (state->maxY - 1) * state->stepY : (state->maxY + 1) * state->stepY;
|
||||
|
||||
@@ -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,
|
||||
@@ -562,12 +562,12 @@ s32 TMCJPEGDEC_scan_varinit(TMCCJPEGDecWork* work) {
|
||||
remX = p->frameWidth % p->mcuXCount;
|
||||
remY = p->frameHeight % p->mcuXRem;
|
||||
|
||||
p->unk_0x18 = remX;
|
||||
p->unk_0x19 = remY;
|
||||
p->remX = remX;
|
||||
p->remY = remY;
|
||||
|
||||
p->mcuYCount = p->mcuYCount + ((u8)remX != 0 ? 1 : 0);
|
||||
p->mcuXCount2 = p->mcuXCount2 + ((u8)remY != 0 ? 1 : 0);
|
||||
p->unk_0x14 = (u32)p->mcuYCount * (u32)p->mcuXCount2;
|
||||
p->mcuTotal = (u32)p->mcuYCount * (u32)p->mcuXCount2;
|
||||
|
||||
for (idx = 0; idx < (s32)p->scanCompCount; idx++) {
|
||||
u8 compId;
|
||||
@@ -1411,131 +1411,22 @@ static s32 TMCJPEGDEC_parse_dht(s32 first, TMCCJPEGDecWork* work) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
static asm s32 TMCJPEGDEC_parse_dqt(register TMCCJPEGDecWork* work) {
|
||||
nofralloc
|
||||
|
||||
stwu r1, -0x130(r1)
|
||||
mflr r0
|
||||
lis r4, lbl_8161E080@ha
|
||||
stw r0, 0x134(r1)
|
||||
addi r4, r4, lbl_8161E080@l
|
||||
li r0, 0x20
|
||||
addi r6, r1, 0xc
|
||||
stmw r24, 0x110(r1)
|
||||
mr r30, r3
|
||||
addi r5, r4, -4
|
||||
mtctr r0
|
||||
|
||||
_parse_dqt_copy:
|
||||
lwz r4, 4(r5)
|
||||
lwzu r0, 8(r5)
|
||||
stw r4, 4(r6)
|
||||
stwu r0, 8(r6)
|
||||
bdnz _parse_dqt_copy
|
||||
|
||||
addi r31, r3, 0x58
|
||||
mr r4, r30
|
||||
addi r3, r1, 0xa
|
||||
bl TMCJPEGDEC_get_wbyte
|
||||
cmpwi r3, 0
|
||||
bge _parse_dqt_have_length
|
||||
b _parse_dqt_return
|
||||
|
||||
_parse_dqt_have_length:
|
||||
lhz r3, 0xa(r1)
|
||||
addi r29, r1, 0x10
|
||||
li r27, 1
|
||||
lis r28, TMCJPEGDEC_Zigzag_data@ha
|
||||
addi r0, r3, -2
|
||||
sth r0, 0xa(r1)
|
||||
|
||||
_parse_dqt_table:
|
||||
lhz r5, 0xa(r1)
|
||||
mr r4, r30
|
||||
addi r3, r1, 9
|
||||
addi r0, r5, -0x41
|
||||
sth r0, 0xa(r1)
|
||||
bl TMCJPEGDEC_get_byte
|
||||
cmpwi r3, 0
|
||||
bge _parse_dqt_have_qt_info
|
||||
b _parse_dqt_return
|
||||
|
||||
_parse_dqt_have_qt_info:
|
||||
lbz r0, 9(r1)
|
||||
cmplwi r0, 4
|
||||
ble _parse_dqt_valid_qt_info
|
||||
li r3, -0x41
|
||||
b _parse_dqt_return
|
||||
|
||||
_parse_dqt_valid_qt_info:
|
||||
add r3, r31, r0
|
||||
addi r26, r28, TMCJPEGDEC_Zigzag_data@l
|
||||
stb r27, 0x1790(r3)
|
||||
li r25, 0
|
||||
|
||||
_parse_dqt_coeff:
|
||||
lbz r24, 0(r26)
|
||||
cmpwi r24, 0x3f
|
||||
ble _parse_dqt_valid_coeff
|
||||
li r3, -0x41
|
||||
b _parse_dqt_return
|
||||
|
||||
_parse_dqt_valid_coeff:
|
||||
mr r4, r30
|
||||
addi r3, r1, 8
|
||||
bl TMCJPEGDEC_get_byte
|
||||
cmpwi r3, 0
|
||||
bge _parse_dqt_have_coeff
|
||||
b _parse_dqt_return
|
||||
|
||||
_parse_dqt_have_coeff:
|
||||
slwi r4, r24, 2
|
||||
lbz r3, 9(r1)
|
||||
add r0, r4, r31
|
||||
lbz r5, 8(r1)
|
||||
lwzx r4, r29, r4
|
||||
slwi r3, r3, 8
|
||||
mullw. r4, r5, r4
|
||||
stwx r4, r3, r0
|
||||
bne _parse_dqt_nonzero
|
||||
li r3, -0x41
|
||||
b _parse_dqt_return
|
||||
|
||||
_parse_dqt_nonzero:
|
||||
addi r25, r25, 1
|
||||
addi r26, r26, 1
|
||||
cmpwi r25, 0x40
|
||||
blt _parse_dqt_coeff
|
||||
lhz r0, 0xa(r1)
|
||||
cmpwi r0, 0
|
||||
bne _parse_dqt_table
|
||||
li r3, 0
|
||||
|
||||
_parse_dqt_return:
|
||||
lmw r24, 0x110(r1)
|
||||
lwz r0, 0x134(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x130
|
||||
blr
|
||||
}
|
||||
#else
|
||||
static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
|
||||
typedef struct {
|
||||
u32 data[64];
|
||||
} CopyBlock64;
|
||||
|
||||
u8* scaleInfo;
|
||||
u32 tblCopy[65];
|
||||
u32* tblPtr;
|
||||
typedef struct { u32 coefficients[4][64]; } QuantizationTables;
|
||||
QuantizationTables* scaleInfo;
|
||||
u32 tblCopy[64];
|
||||
u32* d;
|
||||
u16 len;
|
||||
s32 r;
|
||||
|
||||
d = tblCopy;
|
||||
*(CopyBlock64*)(d + 1) = *(CopyBlock64*)lbl_8161E080;
|
||||
*(CopyBlock64*)d = *(CopyBlock64*)scJpegAanScale;
|
||||
|
||||
scaleInfo = (u8*)work + 0x58;
|
||||
scaleInfo = (QuantizationTables*)&work->scaleFlag;
|
||||
|
||||
r = TMCJPEGDEC_get_wbyte(&len, work);
|
||||
if (r < 0) {
|
||||
@@ -1543,8 +1434,6 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
|
||||
}
|
||||
len -= 2;
|
||||
|
||||
tblPtr = &tblCopy[1];
|
||||
|
||||
do {
|
||||
u8 qtInfo;
|
||||
const u8* zigPtr;
|
||||
@@ -1563,11 +1452,10 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
|
||||
return -0x41;
|
||||
}
|
||||
|
||||
scaleInfo[qtInfo + 0x1790] = 1; // quantTblFlag[0..3]
|
||||
((TMCUnknownInfo*)scaleInfo)->quantTblFlag[qtInfo] = 1;
|
||||
|
||||
zigPtr = TMCJPEGDEC_Zigzag_data;
|
||||
for (zzIdx = 0; zzIdx < 64; zzIdx++) {
|
||||
u32 tmp;
|
||||
|
||||
zz = *zigPtr;
|
||||
if (zz > 0x3F) {
|
||||
@@ -1579,9 +1467,8 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
|
||||
return r;
|
||||
}
|
||||
|
||||
tmp = (zz << 2) + ((u32)qtInfo << 8);
|
||||
val = (u32)byte * tblPtr[zz];
|
||||
*(u32*)(tmp + scaleInfo) = val;
|
||||
val = (u32)byte * tblCopy[zz];
|
||||
scaleInfo->coefficients[qtInfo][zz] = val;
|
||||
if (val == 0) {
|
||||
return -0x41;
|
||||
}
|
||||
@@ -1592,7 +1479,6 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
static asm s32 TMCJPEGDEC_parse_sof(register TMCCJPEGDecWork* work) {
|
||||
@@ -2033,8 +1919,8 @@ static s32 TMCJPEGDEC_parse_sof(TMCCJPEGDecWork* work) {
|
||||
remX = fw - mcuCountX * mcuX;
|
||||
remY = fh - mcuCountY * mcuY;
|
||||
|
||||
work->unk_0x1808 = remX;
|
||||
work->unk_0x1809 = remY;
|
||||
work->remX = remX;
|
||||
work->remY = remY;
|
||||
|
||||
{
|
||||
u16 xr = (remX != 0) ? 1 : 0;
|
||||
@@ -2043,7 +1929,7 @@ static s32 TMCJPEGDEC_parse_sof(TMCCJPEGDecWork* work) {
|
||||
mcuCountY += yr;
|
||||
frameInfo->mcuYCount = mcuCountX;
|
||||
frameInfo->mcuXCount2 = mcuCountY;
|
||||
work->unk_0x1804 = (u32)mcuCountX * (u32)mcuCountY;
|
||||
work->mcuTotal = (u32)mcuCountX * (u32)mcuCountY;
|
||||
}
|
||||
|
||||
compCount2 = frameInfo->compCount;
|
||||
|
||||
@@ -15,9 +15,13 @@ static s8 clampS8(s32 v) {
|
||||
|
||||
void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag) {
|
||||
s32 bd;
|
||||
s32 d;
|
||||
s32 c;
|
||||
s32 a;
|
||||
s32 cd;
|
||||
s32 oddrot;
|
||||
s32 evsum;
|
||||
s32 rot;
|
||||
s32 d;
|
||||
s32 b;
|
||||
|
||||
s32* sp;
|
||||
@@ -26,57 +30,41 @@ void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag
|
||||
s32 tmp[64];
|
||||
s32 i;
|
||||
|
||||
s32 evsum, rot, oddrot, cd;
|
||||
|
||||
sp = block + 24;
|
||||
dp = tmp + 24;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
a = sp[0]; // 0x0
|
||||
b = sp[1]; // 0x4
|
||||
c = sp[2]; // 0x8
|
||||
d = sp[3]; // 0xc
|
||||
for (i = 0; i < 4; i++) {
|
||||
s32 a, b, c, d;
|
||||
s32 odddiff, bd, evsum, cd, rot, oddrot;
|
||||
a = sp[0];
|
||||
b = sp[1];
|
||||
c = sp[2];
|
||||
d = sp[3];
|
||||
odddiff = b - d;
|
||||
bd = b + d;
|
||||
evsum = a + c;
|
||||
|
||||
oddrot = (0xB5 * (sp[1] - sp[3]) >> 8) + bd;
|
||||
rot = (0xB5 * (sp[1] - sp[3])) >> 8;
|
||||
|
||||
dp[1] = (a - c) + rot;
|
||||
dp[2] = (a - c) - rot;
|
||||
dp[3] = evsum - oddrot;
|
||||
dp[0] = evsum + oddrot;
|
||||
|
||||
b = sp[-7]; // -0x1c
|
||||
d = sp[-5]; // -0x14
|
||||
|
||||
bd = b + d;
|
||||
rot = ((b - d) * 0xB5) >> 8;
|
||||
cd = a - c;
|
||||
rot = (odddiff * 0xB5) >> 8;
|
||||
oddrot = rot + bd;
|
||||
|
||||
a = sp[-8]; // -0x20
|
||||
c = sp[-6]; // -0x18
|
||||
|
||||
dp[-8] = (a + c) + oddrot;
|
||||
dp[-7] = (a - c) + rot;
|
||||
dp[-6] = (a - c) - rot;
|
||||
dp[-5] = (a + c) - oddrot;
|
||||
|
||||
sp -= 16;
|
||||
dp -= 16;
|
||||
dp[0] = evsum + oddrot;
|
||||
dp[1] = cd + rot;
|
||||
dp[2] = cd - rot;
|
||||
dp[3] = evsum - oddrot;
|
||||
sp -= 8;
|
||||
dp -= 8;
|
||||
}
|
||||
|
||||
{
|
||||
u32 idx = 3;
|
||||
sp = tmp + 3;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
u8* bp = conv_row_ptr + idx;
|
||||
|
||||
a = sp[0] + 0x40000;
|
||||
b = sp[8];
|
||||
d = sp[24];
|
||||
c = sp[16];
|
||||
a = tmp[idx] + 0x40000;
|
||||
b = tmp[idx + 8];
|
||||
d = tmp[idx + 24];
|
||||
c = tmp[idx + 16];
|
||||
|
||||
evsum = a + c;
|
||||
cd = a - c;
|
||||
@@ -90,7 +78,6 @@ void TMCJPEGDEC_IdctBlock4x4(s32* block, u8* conv_row_ptr, u16 pitch, s32 zigzag
|
||||
bp[pitch * 2] = clampU8((cd - rot) >> 11);
|
||||
bp[pitch * 4 - pitch] = clampU8((evsum - oddrot) >> 11);
|
||||
|
||||
sp--;
|
||||
idx -= 1;
|
||||
}
|
||||
}
|
||||
@@ -131,38 +118,37 @@ void TMCJPEGDEC_IdctBlock4x4_Col(s32* sp, u8* conv_row_ptr, u16 pitch, s32 zigza
|
||||
s32 a, b, c, d;
|
||||
s32 evsum, evdiff, oddsum, odddiff, rot, oddrot;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
s32 a0 = src[0], b0 = src[1], c0 = src[2], d0 = src[3];
|
||||
s32 a1 = src[-8], b1 = src[-7], c1 = src[-6], d1 = src[-5];
|
||||
|
||||
s32 odddiff0 = b0 - d0;
|
||||
s32 oddsum0 = b0 + d0;
|
||||
s32 evsum0 = a0 + c0;
|
||||
s32 evdiff0 = a0 - c0;
|
||||
s32 rot0 = (odddiff0 * 0xB5) >> 8;
|
||||
|
||||
s32 odddiff1 = b1 - d1;
|
||||
s32 oddsum1 = b1 + d1;
|
||||
s32 evsum1 = a1 + c1;
|
||||
s32 evdiff1 = a1 - c1;
|
||||
s32 rot1 = (odddiff1 * 0xB5) >> 8;
|
||||
|
||||
dst[0] = evsum0 + (oddsum0 + rot0);
|
||||
dst[1] = evdiff0 + rot0;
|
||||
dst[2] = evdiff0 - rot0;
|
||||
dst[3] = evsum0 - (oddsum0 + rot0);
|
||||
|
||||
dst[-8] = evsum1 + (oddsum1 + rot1);
|
||||
dst[-7] = evdiff1 + rot1;
|
||||
dst[-6] = evdiff1 - rot1;
|
||||
dst[-5] = evsum1 - (oddsum1 + rot1);
|
||||
|
||||
src -= 16;
|
||||
dst -= 16;
|
||||
for (i = 0; i < 4; i++) {
|
||||
a = src[0];
|
||||
b = src[1];
|
||||
c = src[2];
|
||||
d = src[3];
|
||||
odddiff = b - d;
|
||||
oddsum = b + d;
|
||||
evsum = a + c;
|
||||
evdiff = a - c;
|
||||
rot = (odddiff * 0xB5) >> 8;
|
||||
oddrot = rot + oddsum;
|
||||
dst[0] = evsum + oddrot;
|
||||
dst[1] = evdiff + rot;
|
||||
dst[2] = evdiff - rot;
|
||||
dst[3] = evsum - oddrot;
|
||||
src -= 8;
|
||||
dst -= 8;
|
||||
}
|
||||
|
||||
src = tmp + 3;
|
||||
for (i = 3; i >= 0; i--) {
|
||||
s32 evdiff;
|
||||
s32 a;
|
||||
s32 c;
|
||||
s32 b;
|
||||
s32 evsum;
|
||||
s32 d;
|
||||
s32 oddsum;
|
||||
s32 odddiff;
|
||||
s32 rot;
|
||||
s32 oddrot;
|
||||
u8* out = conv_row_ptr + i;
|
||||
a = src[0];
|
||||
b = src[8];
|
||||
@@ -170,7 +156,7 @@ void TMCJPEGDEC_IdctBlock4x4_Col(s32* sp, u8* conv_row_ptr, u16 pitch, s32 zigza
|
||||
d = src[24];
|
||||
|
||||
odddiff = b - d;
|
||||
oddsum = b + d;
|
||||
oddsum = d + b;
|
||||
evsum = a + c;
|
||||
evdiff = a - c;
|
||||
rot = odddiff * 0xB5 >> 8;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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 {
|
||||
@@ -202,21 +205,21 @@ typedef struct _ziUwdNode {
|
||||
|
||||
struct __zi8_work_data_s {
|
||||
ziU8 unk_0x00;
|
||||
ziU8 unk_0x01;
|
||||
ziU8 countOnly; // 0x01
|
||||
ziU8 unk_0x02[2];
|
||||
ziLanguageEntry* langEntries; // 0x04
|
||||
ziU8 unk_0x08;
|
||||
ziU8 unk_0x09;
|
||||
ziU8 unk_0x0A;
|
||||
ziU8 maxWordLength;
|
||||
ziU8 unk_0x0B;
|
||||
ziU32 unk_0x0C;
|
||||
ziU32 unk_0x10;
|
||||
ziU16 unk_0x14;
|
||||
ziU8 unk_0x16;
|
||||
ziU8 cangjieEnabled; // 0x16
|
||||
ziU8 unk_0x17;
|
||||
ziU8 unk_0x18;
|
||||
ziU8 subLanguage; // 0x18
|
||||
ziU8 unk_0x19;
|
||||
ziU16 unk_0x1A;
|
||||
ziU16 separator; // 0x1A
|
||||
ziU8 unk_0x1C[3];
|
||||
ziU8 unk_0x1F;
|
||||
ziU16 unk_0x20[0x40];
|
||||
@@ -255,32 +258,32 @@ struct __zi8_work_data_s {
|
||||
ziU8 unk_0x330[8];
|
||||
ziU32 unk_0x338;
|
||||
ziU8 unk_0x33C[0x1FC];
|
||||
ziU8 unk_0x538;
|
||||
ziU8 language; // 0x538
|
||||
ziU8 unk_0x539;
|
||||
ziU8 unk_0x53A[0x40];
|
||||
ziWChar unk_0x57A[0x641];
|
||||
ziPtr unk_0x11FC;
|
||||
ziPtr userKeys[0x83]; // 0x1200
|
||||
ziU8 unk_0x140C[4];
|
||||
ziU32 unk_0x1410;
|
||||
ziU32 formats; // 0x1410
|
||||
ziU8 unk_0x1414[4];
|
||||
ziU8 unk_0x1418;
|
||||
ziU8 formatCount;
|
||||
ziU8 unk_0x1419;
|
||||
ziU16 unk_0x141A;
|
||||
ziU16 capacity; // 0x141A
|
||||
ziU8 unk_0x141C;
|
||||
ziU8 unk_0x141D;
|
||||
ziU8 unk_0x141E;
|
||||
ziU8 unk_0x141F;
|
||||
ziU8 graphTableId; // 0x141E
|
||||
ziU8 maxCnt; // 0x141F
|
||||
ziU8 unk_0x1420[4];
|
||||
zi8DawgCtx dawgCtx; // 0x1424
|
||||
ziU8 unk_0x1760[4]; // 0x1760
|
||||
ziU8* unk_0x1764; // 0x1764
|
||||
ziU8* groupPtr; // 0x1764
|
||||
ziU8 unk_0x1768;
|
||||
ziU8 unk_0x1769[0x81];
|
||||
ziU16 unk_0x17EA;
|
||||
ziU16 matchOffset; // 0x17EA
|
||||
ziU8 unk_0x17EC;
|
||||
ziU8 unk_0x17ED[3];
|
||||
ziU8* unk_0x17F0;
|
||||
ziU8* dawgGroup; // 0x17F0
|
||||
ziWChar unk_0x17F4[0x40]; // 0x17F4..0x1874
|
||||
ziU16 unk_0x1874;
|
||||
ziU8 unk_0x1876;
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ ziU32 Zi8GetTableData(ziU8 lang, ziU8 tableIdx, ziU8 memberId ZI_NEED_WORK) {
|
||||
if (langIdx-- != 0) {
|
||||
tableData = ZI_WORK->langEntries[langIdx].tableData;
|
||||
if ((lang == ZI8_LANG_ZH) && (tableData[3] >= 4) &&
|
||||
((ZI_WORK->unk_0x18 == 1) || (ZI_WORK->unk_0x18 == 0x80) || (ZI_WORK->unk_0x18 == 0x40))) {
|
||||
((ZI_WORK->subLanguage == 1) || (ZI_WORK->subLanguage == 0x80) || (ZI_WORK->subLanguage == 0x40))) {
|
||||
offset = ((tableData[0x8B] << 0x10) + (tableData[0x8C] << 8) + tableData[0x8D]);
|
||||
if (offset != 0) {
|
||||
tableData += offset;
|
||||
|
||||
@@ -27,11 +27,11 @@ ziPtr Zi8GetTableAddress(ziU8, ziU8 ZI_NEED_WORK);
|
||||
ziWChar Zi8ConvertUC2UserKey(ziChar, ziU8 ZI_NEED_WORK);
|
||||
|
||||
ziWChar Zi8ConvertUC2WC(ziChar character, ziU8 language ZI_NEED_WORK) {
|
||||
ziU8* table;
|
||||
const ziConversionTables* defaults;
|
||||
ziWChar* mapped;
|
||||
ziU8* cursor;
|
||||
ziU16 first, last;
|
||||
const ziConversionTables* defaults;
|
||||
ziU8* table;
|
||||
if (character == 0) {
|
||||
Zi8LogError(0x133, __zi8_work_data);
|
||||
return 0;
|
||||
@@ -67,12 +67,11 @@ ziWChar Zi8ConvertUC2WC(ziChar character, ziU8 language ZI_NEED_WORK) {
|
||||
return mapped[character - defaults->first];
|
||||
}
|
||||
ziChar Zi8ConvertWC2UC(ziWChar character, ziU8 language ZI_NEED_WORK) {
|
||||
ziU16 index, count, first, last, value;
|
||||
ziU16 index, count, value, first, last;
|
||||
ziU8* cursor;
|
||||
ziConversionTable* table;
|
||||
const ziConversionRangeTable* defaults;
|
||||
ziConversionRange* ranges;
|
||||
ziConversionEntry* entry;
|
||||
ziU8* cursor;
|
||||
if (character == 0) {
|
||||
Zi8LogError(0x133, __zi8_work_data);
|
||||
return 0;
|
||||
@@ -83,94 +82,109 @@ ziChar Zi8ConvertWC2UC(ziWChar character, ziU8 language ZI_NEED_WORK) {
|
||||
Zi8LogError(0x6AE, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
entry = table->entries;
|
||||
count = (ziU16)table->count[0] << 8 | table->count[1];
|
||||
entry = (ziConversionEntry*)table;
|
||||
count = (ziU16)entry->first[0] << 8 | entry->first[1];
|
||||
entry++;
|
||||
for (index = 0; index < count; index++) {
|
||||
first = ((ziU16)entry->first[0] << 8 | entry->first[1]);
|
||||
first = (ziU16)entry->first[0] << 8 | entry->first[1];
|
||||
last = (ziU16)entry->last[0] << 8 | entry->last[1];
|
||||
if (first <= character && character <= last) {
|
||||
value = ((ziU16)entry->value[0] << 8 | entry->value[1]);
|
||||
if (first == last) {
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
return value & 0xFF;
|
||||
}
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
return ((ziU8*)table->entries)[character + value - first];
|
||||
if (character < first || character > last) {
|
||||
entry++;
|
||||
continue;
|
||||
}
|
||||
entry++;
|
||||
value = (ziU16)entry->value[0] << 8 | entry->value[1];
|
||||
if (first == last) {
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
return value & 0xFF;
|
||||
}
|
||||
entry = (ziConversionEntry*)((ziU8*)table + value + character - first + 8);
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
return *(ziU8*)entry;
|
||||
}
|
||||
Zi8LogError(0x6C2, __zi8_work_data);
|
||||
return 0;
|
||||
} else {
|
||||
defaults = &Zi8CvrtTables.reverse;
|
||||
if (defaults == 0) {
|
||||
ranges = Zi8CvrtTables.reverse.entries;
|
||||
if (ranges == 0) {
|
||||
Zi8LogError(0x6AE, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
ranges = defaults->entries;
|
||||
for (index = 0; index < defaults->count; index++) {
|
||||
if (ranges[index].first <= character && character <= ranges[index].last) {
|
||||
count = Zi8CvrtTables.reverse.count;
|
||||
for (index = 0; index < count; index++) {
|
||||
if (character >= ranges[index].first && character <= ranges[index].last) {
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
if (ranges[index].first == ranges[index].last) return ranges[index].result.character & 0xFF;
|
||||
return ((ziU8*)ranges[index].result.table)[character - ranges[index].first];
|
||||
if (ranges[index].first == ranges[index].last)
|
||||
return ranges[index].result.character & 0xFF;
|
||||
cursor = ranges[index].result.table;
|
||||
return cursor[character - ranges[index].first];
|
||||
}
|
||||
}
|
||||
Zi8LogError(0x6C2, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
Zi8LogError(0x6C2, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
ziWChar Zi8ConvertUC2Key(ziChar character, ziU8 language ZI_NEED_WORK) {
|
||||
ziU16 count, index, first, last;
|
||||
ziU32 key = 0;
|
||||
ziU16 key = 0;
|
||||
ziU16 index, count, first, last;
|
||||
ziConversionTable* table;
|
||||
const ziConversionRangeTable* defaults;
|
||||
ziWChar* mapped;
|
||||
ziConversionRange* ranges;
|
||||
ziConversionEntry* entry;
|
||||
ziU8* cursor;
|
||||
if (character == 0) {
|
||||
Zi8LogError(0x133, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
if (ZI_WORK->userKeys[language] != 0) return Zi8ConvertUC2UserKey(character, language, __zi8_work_data);
|
||||
if (ZI_WORK->userKeys[language] != 0)
|
||||
return Zi8ConvertUC2UserKey(character, language, __zi8_work_data);
|
||||
if (Zi8GetTableCount(language, 8, __zi8_work_data) != 0) {
|
||||
table = Zi8GetTableAddress(language, 8, __zi8_work_data);
|
||||
if (table == 0) {
|
||||
Zi8LogError(0x6B8, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
entry = table->entries;
|
||||
count = (ziU16)table->count[0] << 8 | table->count[1];
|
||||
entry = (ziConversionEntry*)table;
|
||||
count = (ziU16)entry->first[0] << 8 | entry->first[1];
|
||||
entry++;
|
||||
for (index = 0; index < count; index++) {
|
||||
first = ((ziU16)entry->first[0] << 8 | entry->first[1]);
|
||||
first = (ziU16)entry->first[0] << 8 | entry->first[1];
|
||||
last = (ziU16)entry->last[0] << 8 | entry->last[1];
|
||||
if (first <= character && character <= last) {
|
||||
key = ((ziU16)entry->value[0] << 8 | entry->value[1]);
|
||||
if (first != last) {
|
||||
cursor = (ziU8*)table->entries + key + (character - first) * 2;
|
||||
key = (ziU16)cursor[0] << 8 | cursor[1];
|
||||
}
|
||||
break;
|
||||
if (character < first || character > last) {
|
||||
entry++;
|
||||
continue;
|
||||
}
|
||||
entry++;
|
||||
key = (ziU16)entry->value[0] << 8 | entry->value[1];
|
||||
if (first == last) break;
|
||||
entry = (ziConversionEntry*)((ziU8*)table + key + (character - first) * 2);
|
||||
entry = (ziConversionEntry*)((ziU8*)entry + 8);
|
||||
key = (ziU16)entry->first[0] << 8 | entry->first[1];
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
defaults = &Zi8CvrtTables.keys;
|
||||
if (defaults == 0) {
|
||||
ranges = Zi8CvrtTables.keys.entries;
|
||||
if (ranges == 0) {
|
||||
Zi8LogError(0x6B8, __zi8_work_data);
|
||||
return 0;
|
||||
}
|
||||
ranges = defaults->entries;
|
||||
for (index = 0; index < defaults->count; index++) {
|
||||
if (ranges[index].first <= character && character <= ranges[index].last) {
|
||||
if (ranges[index].first == ranges[index].last) key = ranges[index].result.character & 0xFF;
|
||||
else key = ((ziWChar*)ranges[index].result.table)[character - ranges[index].first];
|
||||
count = Zi8CvrtTables.keys.count;
|
||||
for (index = 0; index < count; index++) {
|
||||
if (character >= ranges[index].first && character <= ranges[index].last) {
|
||||
if (ranges[index].first == ranges[index].last) {
|
||||
key = (ziU8)ranges[index].result.character;
|
||||
break;
|
||||
}
|
||||
mapped = ranges[index].result.table;
|
||||
key = mapped[character - ranges[index].first];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (key == 0) {
|
||||
Zi8LogError(0x6C2, __zi8_work_data);
|
||||
key = 0xEFF1;
|
||||
} else Zi8LogError(100, __zi8_work_data);
|
||||
return key;
|
||||
return 0xEFF1;
|
||||
} else {
|
||||
Zi8LogError(100, __zi8_work_data);
|
||||
return key;
|
||||
}
|
||||
}
|
||||
ziWChar Zi8ConvertWC2Key(ziWChar character, ziU8 language ZI_NEED_WORK) {
|
||||
return Zi8ConvertUC2Key(Zi8ConvertWC2UC(character, language, __zi8_work_data), language, __zi8_work_data);
|
||||
|
||||
@@ -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];
|
||||
@@ -311,7 +311,7 @@ Zi8UInt Zi8SpellingPY(ziU16 *output,Zi8UInt key,ziU8 includeTone)
|
||||
return length;
|
||||
}
|
||||
|
||||
ziU8 Zi8IsMatch1Key(ziU16 *input,Zi8UInt inputLength,Zi8UInt key,ziU8 requireFull,ziU8 usePinyin,Zi8UInt tone)
|
||||
ziU8 Zi8IsMatch1Key(ziU16 *input,Zi8UInt inputLength,Zi8UInt key,ziU8 requireFull,ziU8 usePinyin,ziU8 tone)
|
||||
{
|
||||
ziU16 spelling[16];
|
||||
Zi8UInt spellingLength;
|
||||
@@ -330,7 +330,7 @@ ziU8 Zi8IsMatch1Key(ziU16 *input,Zi8UInt inputLength,Zi8UInt key,ziU8 requireFul
|
||||
if ((requireFull != 0) && ((inputLength & 0xff) != (spellingLength & 0xff))) {
|
||||
return 0;
|
||||
}
|
||||
if (((tone & 0xff) == 0) && ((inputLength & 0xff) > (spellingLength & 0xff))) {
|
||||
if ((tone == 0) && ((inputLength & 0xff) > (spellingLength & 0xff))) {
|
||||
switch (input[(inputLength & 0xff) - 1]) {
|
||||
case 0xeff1:
|
||||
case 0xeff2:
|
||||
@@ -796,11 +796,11 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
|
||||
if (remaining != 0) {
|
||||
remaining--;
|
||||
} else {
|
||||
totalCandidates++;
|
||||
totalCandidates = totalCandidates + 1;
|
||||
if (options->countOnly == '\0') {
|
||||
*output++ = spellingBuffer[spellingIndex];
|
||||
*output++ = 0;
|
||||
candidateCount++;
|
||||
candidateCount = candidateCount + 1;
|
||||
}
|
||||
else if ((int)totalCandidates >= options->maxCount) goto finishSpelling;
|
||||
if (candidateCount >= params->maxCandidates) goto finishSpelling;
|
||||
@@ -940,11 +940,9 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
|
||||
for (tableIndex = 0; tableIndex < params->count;) {
|
||||
while (*output != 0) {
|
||||
if (*output != 0x27) {
|
||||
*output |= 0xf300;
|
||||
output++;
|
||||
*output++ |= 0xf300;
|
||||
} else {
|
||||
*output = 0xf360;
|
||||
output++;
|
||||
*output++ = 0xf360;
|
||||
}
|
||||
}
|
||||
tableIndex++;
|
||||
@@ -1002,10 +1000,10 @@ Zi8UInt Zi8Get1KeyPressSpelling(Zi8OneKeyParam *params,Zi8OneKeyOptions *options
|
||||
}
|
||||
if (Zi8IsDupWordW(output,(ziU8)phoneticIndex,work) == 0) {
|
||||
if (remaining == 0) {
|
||||
totalCandidates++;
|
||||
totalCandidates = totalCandidates + 1;
|
||||
if (options->countOnly == 0) {
|
||||
output += phoneticIndex + 1;
|
||||
candidateCount++;
|
||||
++candidateCount;
|
||||
} else if ((int)totalCandidates >= options->maxCount) goto finishSpelling;
|
||||
if (candidateCount >= params->maxCandidates) goto finishSpelling;
|
||||
} else {
|
||||
|
||||
@@ -285,9 +285,9 @@ static ziBool ZiIsLetterHyphen(ziWChar character ZI_NEED_WORK) {
|
||||
else return ZI8_FALSE;
|
||||
}
|
||||
|
||||
void Zi8ChangeWordCase(ziWChar* word, ziU8 language, ziPtr work) {
|
||||
void Zi8ChangeWordCase(ziWChar* word, ziU8 language, ZiAlphaWork* work) {
|
||||
enum { LOWER_CASE, UPPER_CASE } upper = LOWER_CASE;
|
||||
if (((ZiAlphaWork*)work)->caseMode == 3) {
|
||||
if (work->caseMode == 3) {
|
||||
Zi8ChangeCharCase(1, word++, language, work);
|
||||
} else if (((ZiAlphaWork*)work)->caseMode == 1) {
|
||||
upper = UPPER_CASE;
|
||||
@@ -305,7 +305,7 @@ ziU8 Zi8LangSupported(ziU8 language, ziPtr work);
|
||||
ziU8 Zi8MatchOEMdata(ziWChar* elements, ziU8 count, ziU8 language, ziWChar* word, ziU16 capacity, ziU8 mode, ziU8 status, ziPtr work);
|
||||
ziU8 Zi8MatchPUDdata(ziWChar* elements, ziU8 count, ziU8 language, ziWChar* word, ziU16 capacity, ziU8 mode, ziU8 status, ziPtr work);
|
||||
ziU8 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language, ziWChar* word, ziU16 capacity, ziU8 mode, ziU8 status, ziBool reservedMode, ziBool exactLength, ziPtr work);
|
||||
ziU8 Zi8MatchUWDdata(ziWChar* elements, ziU8 count, ziWChar* currentWord, ziU8 currentLength, ziU8 language, ziWChar* word, ziU16 capacity, ziU8 mode, ziU8 status, ziPtr work);
|
||||
ziU8 Zi8MatchUWDdata(ziWChar* elements, ziU8 count, ziWChar* currentWord, ziU16 currentLength, ziU8 language, ziWChar* word, ziU16 capacity, ziU8 mode, ziU8 status, ziPtr work);
|
||||
void Zi8Memset(ziPtr destination, ziU32 value, ziU32 count);
|
||||
ziU16 Zi8WCharCount(ziWChar* word, ziPtr work);
|
||||
ziBool Zi8ZHCheckSpelling(ziWChar* word, ziWChar* elements, ziU8 count, ziPtr work);
|
||||
@@ -414,7 +414,12 @@ int Zi8AlphaGetCandidates(ziGetParam* parameters, ziPtr optionData, ziPtr workDa
|
||||
phoneticInput = ZI8_TRUE;
|
||||
for (elementIndex = 0; elementIndex < elementCount; elementIndex++) {
|
||||
normalizedElements[elementIndex] = elements[elementIndex];
|
||||
if ((int)elements[elementIndex] < 0xf336 && (int)elements[elementIndex] >= 0xf331) {
|
||||
switch ((int)elements[elementIndex]) {
|
||||
case 0xf331:
|
||||
case 0xf332:
|
||||
case 0xf333:
|
||||
case 0xf334:
|
||||
case 0xf335:
|
||||
phoneticSeparator = ZI8_TRUE;
|
||||
phoneticInput = ZI8_FALSE;
|
||||
if ((language == 0x7d) || ((language == 0x79 || (language == 0x7a)))) {
|
||||
@@ -887,7 +892,7 @@ selectDictionary:
|
||||
if ((((matchMode == 0) && (currentVowelRestriction)) &&
|
||||
((2 < (int)elementCount &&
|
||||
((((ZiAlphaWork*)workData)->language == language &&
|
||||
((unsigned int)((ZiAlphaWork*)workData)->prefixCount == elementCount - 1)))))) &&
|
||||
(((ZiAlphaWork*)workData)->prefixCount == elementCount - 1)))))) &&
|
||||
(elements[elementCount - 1] == 0xeff1)) {
|
||||
wordLength = 0;
|
||||
}
|
||||
@@ -942,15 +947,15 @@ selectDictionary:
|
||||
}
|
||||
if (wordLength != 0) goto filterVowelCandidate;
|
||||
dictionaryStatus[dictionaryKind] = 1;
|
||||
if (elements[apostropheIndex] < 0xEFF1) goto finishDictionaryPass;
|
||||
goto retryDictionary;
|
||||
if (elements[apostropheIndex] >= 0xEFF1) goto retryDictionary;
|
||||
goto finishDictionaryPass;
|
||||
}
|
||||
filterVowelCandidate:
|
||||
if ((wordLength != 0) && (prefixVowelRestriction)) {
|
||||
if ((*wordCursor >= 0x30) && (*wordCursor <= 0x39)) {
|
||||
wordLength = 0;
|
||||
} else {
|
||||
if (((elementCount == 1) && (dictionaryKind != 10)) && (0xeff0 < *wordCursor)) {
|
||||
if (((elementCount == 1) && (dictionaryKind != 10)) && (*wordCursor >= 0xeff1)) {
|
||||
punctuationCandidate = ZI8_TRUE;
|
||||
goto finishDictionaryPass;
|
||||
}
|
||||
@@ -1017,67 +1022,59 @@ filterVowelCandidate:
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
index = *punctuationCursor;
|
||||
*wordCursor = index;
|
||||
if (index == 0) {
|
||||
if ((*wordCursor = *punctuationCursor) != 0) {
|
||||
punctuationCursor++;
|
||||
wordLength = 1;
|
||||
} else {
|
||||
wordLength = 0;
|
||||
}
|
||||
else {
|
||||
punctuationCursor = punctuationCursor + 1;
|
||||
wordLength = 1;
|
||||
break;
|
||||
case 11:
|
||||
if (prefixCount != 0) break;
|
||||
if (retryPunctuation) {
|
||||
for (index = 0; index < parameters->elementCount - 1; index++) {
|
||||
wordCursor[index] = ((ZiAlphaWork*)workData)->prefix[index];
|
||||
if (wordCursor[index] == 0) break;
|
||||
}
|
||||
if (index < parameters->elementCount - 1) {
|
||||
wordLength = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
for (index = 0; index < ((ZiAlphaWork*)workData)->rememberedCount; index++) {
|
||||
wordCursor[index] = ((ZiAlphaWork*)workData)->rememberedWord[index];
|
||||
if (wordCursor[index] == 0) break;
|
||||
}
|
||||
if (index < ((ZiAlphaWork*)workData)->rememberedCount) {
|
||||
wordLength = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((wordCursor[index++] = *punctuationCursor) != 0) {
|
||||
punctuationCursor++;
|
||||
wordLength = index;
|
||||
} else {
|
||||
wordLength = 0;
|
||||
}
|
||||
break;
|
||||
case 0xb:
|
||||
if (prefixCount == 0) {
|
||||
if (retryPunctuation) {
|
||||
for (index = 0;
|
||||
index < parameters->elementCount - 1; index++) {
|
||||
wordCursor[index] = ((ZiAlphaWork*)workData)->prefix[index];
|
||||
if (wordCursor[index] == 0) break;
|
||||
}
|
||||
if (index < (int)(parameters->elementCount - 1)) {
|
||||
wordLength = 0;
|
||||
}
|
||||
else {
|
||||
appendPunctuation:
|
||||
wordLength = index + 1;
|
||||
wordCursor[index] = *punctuationCursor;
|
||||
if (wordCursor[index] == 0) {
|
||||
wordLength = 0;
|
||||
}
|
||||
else {
|
||||
punctuationCursor = punctuationCursor + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (index = 0;
|
||||
index < ((ZiAlphaWork*)workData)->rememberedCount; index++) {
|
||||
wordCursor[index] = ((ZiAlphaWork*)workData)->rememberedWord[index];
|
||||
if (wordCursor[index] == 0) break;
|
||||
}
|
||||
if ((int)(unsigned int)((ZiAlphaWork*)workData)->rememberedCount <= index) goto appendPunctuation;
|
||||
wordLength = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
dictionaryStatus[dictionaryKind] = 1;
|
||||
if (wordLength == 0) {
|
||||
dictionaryStatus[dictionaryKind] = 2;
|
||||
if ((((((((ZiAlphaWork*)workData)->prefixEnabled != '\0') && (!retryPunctuation)) && (parameters->elementCount != 0)) &&
|
||||
(((int)(parameters->elementCount - 1) <= (int)(unsigned int)((ZiAlphaWork*)workData)->requiredLength &&
|
||||
((((ZiAlphaWork*)workData)->requiredLength >= parameters->elementCount - 1 &&
|
||||
(parameters->elements[parameters->elementCount - 1] == 0xEFF1)))) &&
|
||||
(((((ZiAlphaWork*)workData)->prefixEnabled != '\x01' ||
|
||||
(((ZiAlphaWork*)workData)->requiredLength != parameters->elementCount)) &&
|
||||
(((((ZiAlphaWork*)workData)->prefixLength == '\0' ||
|
||||
((unsigned int)parameters->elementCount <= ((ZiAlphaWork*)workData)->prefixLength + 1)) && (dictionaryExact != 0)))
|
||||
(((ZiAlphaWork*)workData)->prefixLength + 1 >= parameters->elementCount)) && (dictionaryExact != 0)))
|
||||
))) && ((((completionAllowed && (prefixCount == 0)) && (dictionaryKind != 0xb)) &&
|
||||
((((int)dictionaryIndex < (int)(unsigned int)((ZiAlphaWork*)workData)->dictionaryCount &&
|
||||
(((ZiAlphaOptions*)optionData)->lookupMode == '\0')) &&
|
||||
(((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;
|
||||
}
|
||||
@@ -1089,10 +1086,10 @@ appendPunctuation:
|
||||
}
|
||||
if ((((((dictionaryExact == 0) || (!completionAllowed)) || (prefixCount != 0)) ||
|
||||
((dictionaryKind == 0xb ||
|
||||
((int)(unsigned int)((ZiAlphaWork*)workData)->dictionaryCount <= (int)dictionaryIndex)))) ||
|
||||
(elements == (ziU16 *)0x0)) ||
|
||||
(dictionaryIndex >= ((ZiAlphaWork*)workData)->dictionaryCount)))) ||
|
||||
(elements == 0)) ||
|
||||
((((elementCount == 0 || (elements[elementCount - 1] != 0xeff1)) ||
|
||||
(((unsigned int)((ZiAlphaWork*)workData)->rememberedCount != parameters->elementCount - 1 ||
|
||||
((((ZiAlphaWork*)workData)->rememberedCount != parameters->elementCount - 1 ||
|
||||
(((((ZiAlphaWork*)workData)->rememberedWord[0] == 0 || (((ZiAlphaOptions*)optionData)->lookupMode != '\0')) ||
|
||||
(((ZiAlphaWork*)workData)->dictionaries[language] != 0)))))) ||
|
||||
(languagePassCount == 2)))) break;
|
||||
@@ -1104,7 +1101,7 @@ appendPunctuation:
|
||||
punctuationCursor = &punctuationBuffer[0];
|
||||
dictionaryKind = 0xb;
|
||||
}
|
||||
else if ((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->minWordLength <= (int)wordLength) {
|
||||
else if (((ZiAlphaOptions*)optionData)->minWordLength <= wordLength) {
|
||||
if (prefixVowelRestriction) {
|
||||
if (*wordCursor >= 0x30 && *wordCursor <= 0x39) goto retryDictionary;
|
||||
if (language == 0x2f) {
|
||||
@@ -1119,15 +1116,15 @@ appendPunctuation:
|
||||
{
|
||||
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))) &&
|
||||
@@ -1139,35 +1136,39 @@ prepareCandidate:
|
||||
((Zi8ZHCheckSpelling(wordCursor,parameters->elements,parameters->elementCount,
|
||||
workData)) != '\0')) {
|
||||
if ((((ZiAlphaWork*)workData)->caseMode != '\0') && ((!phoneticInput && (!phoneticSeparator)))) {
|
||||
Zi8ChangeWordCase(wordCursor + -prefixCount,language,workData);
|
||||
Zi8ChangeWordCase(wordCursor - prefixCount,language,workData);
|
||||
}
|
||||
if ((((ZiAlphaOptions*)optionData)->suffixOnly != '\0') &&
|
||||
((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount))) {
|
||||
wordLength = (ziU8)((ZiAlphaOptions*)optionData)->maxWordLength - prefixCount;
|
||||
((int)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount))) {
|
||||
wordLength = ((ZiAlphaOptions*)optionData)->maxWordLength - prefixCount;
|
||||
wordCursor[wordLength] = 0;
|
||||
}
|
||||
if (((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount)) ||
|
||||
((Zi8IsDupWordW(wordCursor + -prefixCount,wordLength + prefixCount & 0xff,
|
||||
if (((int)((ZiAlphaOptions*)optionData)->maxWordLength < (int)(wordLength + prefixCount)) ||
|
||||
((Zi8IsDupWordW(wordCursor - prefixCount,wordLength + prefixCount & 0xff,
|
||||
workData)) != '\0')) {
|
||||
if ((prefixCount != 0) && ((ziU8)((ZiAlphaOptions*)optionData)->maxWordLength <= prefixCount)) break;
|
||||
if ((prefixCount != 0) && (((ZiAlphaOptions*)optionData)->maxWordLength <= prefixCount)) break;
|
||||
}
|
||||
else {
|
||||
|
||||
if ((((keyLayoutCount == 0) || (((ZiAlphaOptions*)optionData)->lookupMode != '\0')) ||
|
||||
((int)(wordLength + prefixCount) < 2)) ||
|
||||
((int)(wordLength + prefixCount) <= 1)) ||
|
||||
(0x40 < (int)(wordLength + prefixCount))) goto emitCandidate;
|
||||
if (dictionaryKind == 5) {
|
||||
switch (dictionaryKind) {
|
||||
case 5:
|
||||
case 1:
|
||||
case 9:
|
||||
checkKeyLayout:
|
||||
keyLayoutCursor = keyLayout;
|
||||
candidateCharacterCount = wordLength + prefixCount;
|
||||
for (index = 0; (int)index < (int)(unsigned int)keyLayoutCount; index = index + 1) {
|
||||
if (candidateCharacterCount <= *keyLayoutCursor) {
|
||||
if (candidateCharacterCount < *keyLayoutCursor++) {
|
||||
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,32 +1176,31 @@ 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;
|
||||
goto retryDictionary;
|
||||
}
|
||||
keyLayoutCursor += candidateCharacterCount;
|
||||
if (candidateCharacterCount < *keyLayoutCursor++) break;
|
||||
if (*keyLayoutCursor++ > candidateCharacterCount) break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else if (dictionaryKind < 5) {
|
||||
if (dictionaryKind == 1) goto checkKeyLayout;
|
||||
}
|
||||
else if (dictionaryKind == 9) goto checkKeyLayout;
|
||||
emitCandidate:
|
||||
if (firstCandidate == 0) {
|
||||
if (((ZiAlphaOptions*)optionData)->countOnly != '\0') {
|
||||
if (((ZiAlphaOptions*)optionData)->suffixOnly != '\0') {
|
||||
if ((int)(wordLength + prefixCount) < (int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->shortestWord) {
|
||||
if ((int)((ZiAlphaOptions*)optionData)->shortestWord > (int)(wordLength + prefixCount)) {
|
||||
((ZiAlphaOptions*)optionData)->shortestWord = wordLength + prefixCount;
|
||||
}
|
||||
if ((int)(unsigned int)(ziU8)((ZiAlphaOptions*)optionData)->longestWord < (int)(wordLength + prefixCount)) {
|
||||
if ((int)((ZiAlphaOptions*)optionData)->longestWord < (int)(wordLength + prefixCount)) {
|
||||
((ZiAlphaOptions*)optionData)->longestWord = wordLength + prefixCount;
|
||||
}
|
||||
}
|
||||
@@ -1224,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];
|
||||
@@ -1251,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)))) ||
|
||||
@@ -1313,7 +1314,7 @@ emitCandidate:
|
||||
}
|
||||
else {
|
||||
if (((ZiAlphaOptions*)optionData)->suffixOnly != '\0') {
|
||||
wordCursor = wordCursor + -prefixCount;
|
||||
wordCursor = wordCursor - prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
wordLength += prefixCount;
|
||||
for (index = 0; parameters->elementCount + index < wordLength; index++) {
|
||||
@@ -1435,7 +1436,7 @@ finishDictionaryPass:;
|
||||
if ((completionAllowed) &&
|
||||
((((((ZiAlphaWork*)workData)->suffixMode == '\0' && (2 < (int)elementCount)) &&
|
||||
(elements[elementCount - 2] == 0xeff1)) &&
|
||||
((unsigned int)((ZiAlphaWork*)workData)->prefixCount == elementCount - 2)))) {
|
||||
((int)((ZiAlphaWork*)workData)->prefixCount == elementCount - 2)))) {
|
||||
((ZiAlphaWork*)workData)->prefixElementCount = ((ZiAlphaWork*)workData)->prefixCount + '\x01';
|
||||
((ZiAlphaWork*)workData)->suffixMode = 1;
|
||||
}
|
||||
@@ -1443,19 +1444,58 @@ finishDictionaryPass:;
|
||||
prefixPrepared = ZI8_TRUE;
|
||||
goto preparePrefix;
|
||||
}
|
||||
if ((((completionAllowed) && (((ZiAlphaWork*)workData)->suffixMode != '\0')) &&
|
||||
if (!((((completionAllowed) && (((ZiAlphaWork*)workData)->suffixMode != '\0')) &&
|
||||
((((ZiAlphaWork*)workData)->suffixLocked == '\0' && (2 < (int)elementCount)))) &&
|
||||
(((elements[elementCount - 2] == 0xeff1 &&
|
||||
((unsigned int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 2)) ||
|
||||
(((unsigned int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 1 &&
|
||||
((Zi8IsAlphaPunct(elements[elementCount - 1])) != '\0')))))) {
|
||||
((int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 2)) ||
|
||||
(((int)((ZiAlphaWork*)workData)->suffixCount == elementCount - 1 &&
|
||||
((Zi8IsAlphaPunct(elements[elementCount - 1])) != '\0'))))))) {
|
||||
tryAlternatePrefix:
|
||||
if ((prefixPrepared) && (1 < ((ZiAlphaWork*)workData)->alternatePrefixCount)) {
|
||||
if (language == parameters->language) {
|
||||
if (primaryMatched) {
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
}
|
||||
else if (secondaryMatched) {
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
if (((ZiAlphaWork*)workData)->alternatePrefixCount != '\0') {
|
||||
wordCursor -= prefixCount;
|
||||
elements -= prefixCount;
|
||||
elementCount = elementCount + prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
prefixCount = 0;
|
||||
prefixPrepared = ZI8_FALSE;
|
||||
((ZiAlphaWork*)workData)->suffixMode = 0;
|
||||
((ZiAlphaWork*)workData)->suffixLocked = 0;
|
||||
((ZiAlphaWork*)workData)->suffixCount = 0;
|
||||
for (index = 0; index < (int)(unsigned int)((ZiAlphaWork*)workData)->alternatePrefixCount; index = index + 1) {
|
||||
((ZiAlphaWork*)workData)->prefix[index] =
|
||||
((ZiAlphaWork*)workData)->alternatePrefix[index];
|
||||
}
|
||||
((ZiAlphaWork*)workData)->prefixCount = (ziU8)index;
|
||||
if (((ZiAlphaWork*)workData)->language == parameters->language) {
|
||||
((ZiAlphaWork*)workData)->language = parameters->subLanguage;
|
||||
}
|
||||
else {
|
||||
((ZiAlphaWork*)workData)->language = parameters->language;
|
||||
}
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
}
|
||||
if ((((primaryMatched) && (secondaryMatched)) || (elementCount == 0)) ||
|
||||
(((language == parameters->language && (primaryMatched)) || ((language == parameters->subLanguage && (secondaryMatched))))))
|
||||
goto finishCandidates;
|
||||
if (completionAllowed) goto checkPrefixPunctuation;
|
||||
} else {
|
||||
if ((((ZiAlphaWork*)workData)->prefixEnabled == '\0') || (elements[elementCount - 1] != 0xeff1)) {
|
||||
if ((!primaryMatched) && (!secondaryMatched)) {
|
||||
((ZiAlphaWork*)workData)->suffixLocked = 1;
|
||||
((ZiAlphaWork*)workData)->suffixElementCount = parameters->elementCount - 1;
|
||||
if (prefixCount != 0) {
|
||||
wordCursor = wordCursor + -prefixCount;
|
||||
elements = elements + -prefixCount;
|
||||
wordCursor -= prefixCount;
|
||||
elements -= prefixCount;
|
||||
elementCount = elementCount + prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
prefixCount = 0;
|
||||
@@ -1480,8 +1520,8 @@ checkPrefixPunctuation:
|
||||
((((Zi8GetTableCount(language,0x1f,workData)) & 8) == 0 &&
|
||||
(parameters->elements[parameters->elementCount - 1] != 0xEFF1)))))) {
|
||||
if (prefixPrepared) {
|
||||
wordCursor = wordCursor + -prefixCount;
|
||||
elements = elements + -prefixCount;
|
||||
wordCursor -= prefixCount;
|
||||
elements -= prefixCount;
|
||||
elementCount = elementCount + prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
prefixCount = 0;
|
||||
@@ -1489,7 +1529,7 @@ checkPrefixPunctuation:
|
||||
if (((ZiAlphaWork*)workData)->suffixLocked != '\0') {
|
||||
((ZiAlphaWork*)workData)->previousSuffixCount = ((ZiAlphaWork*)workData)->suffixElementCount;
|
||||
((ZiAlphaWork*)workData)->suffixElementCount = parameters->elementCount;
|
||||
elementIndex = (unsigned int)((ZiAlphaWork*)workData)->prefixCount + (unsigned int)((ZiAlphaWork*)workData)->suffixCount;
|
||||
elementIndex = (int)((ZiAlphaWork*)workData)->prefixCount + (int)((ZiAlphaWork*)workData)->suffixCount;
|
||||
if (elements[elementIndex] != 0xEFF1 && Zi8IsAlphaPunct(elements[elementIndex]) != 0) {
|
||||
((ZiAlphaWork*)workData)->suffix[((ZiAlphaWork*)workData)->suffixCount++] = elements[elementIndex];
|
||||
} else {
|
||||
@@ -1519,46 +1559,6 @@ checkPrefixPunctuation:
|
||||
goto preparePrefix;
|
||||
}
|
||||
}
|
||||
else {
|
||||
tryAlternatePrefix:
|
||||
if ((prefixPrepared) && (1 < ((ZiAlphaWork*)workData)->alternatePrefixCount)) {
|
||||
if (language == parameters->language) {
|
||||
if (primaryMatched) {
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
}
|
||||
else if (secondaryMatched) {
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
if (((ZiAlphaWork*)workData)->alternatePrefixCount != '\0') {
|
||||
wordCursor = wordCursor + -prefixCount;
|
||||
elements = elements + -prefixCount;
|
||||
elementCount = elementCount + prefixCount;
|
||||
wordCapacity = wordCapacity + prefixCount;
|
||||
prefixCount = 0;
|
||||
prefixPrepared = ZI8_FALSE;
|
||||
((ZiAlphaWork*)workData)->suffixMode = 0;
|
||||
((ZiAlphaWork*)workData)->suffixLocked = 0;
|
||||
((ZiAlphaWork*)workData)->suffixCount = 0;
|
||||
for (index = 0; index < (int)(unsigned int)((ZiAlphaWork*)workData)->alternatePrefixCount; index = index + 1) {
|
||||
((ZiAlphaWork*)workData)->prefix[index] =
|
||||
((ZiAlphaWork*)workData)->alternatePrefix[index];
|
||||
}
|
||||
((ZiAlphaWork*)workData)->prefixCount = (ziU8)index;
|
||||
if (((ZiAlphaWork*)workData)->language == parameters->language) {
|
||||
((ZiAlphaWork*)workData)->language = parameters->subLanguage;
|
||||
}
|
||||
else {
|
||||
((ZiAlphaWork*)workData)->language = parameters->language;
|
||||
}
|
||||
((ZiAlphaWork*)workData)->alternatePrefixCount = 0;
|
||||
}
|
||||
}
|
||||
if ((((primaryMatched) && (secondaryMatched)) || (elementCount == 0)) ||
|
||||
(((language == parameters->language && (primaryMatched)) || ((language == parameters->subLanguage && (secondaryMatched))))))
|
||||
goto finishCandidates;
|
||||
if (completionAllowed) goto checkPrefixPunctuation;
|
||||
}
|
||||
if (!completionAllowed && ((ZiAlphaWork*)workData)->suffixMode == 0 && ((ZiAlphaWork*)workData)->prefixCount != 0 &&
|
||||
elementCount > 2 && ((ZiAlphaWork*)workData)->prefixCount == elementCount - 1 &&
|
||||
Zi8IsAlphaPunct(parameters->elements[((ZiAlphaWork*)workData)->prefixCount - 1]) != 0) goto checkPrefixFields;
|
||||
@@ -1618,7 +1618,7 @@ finishCandidates:
|
||||
} else {
|
||||
wordCursor = 0;
|
||||
}
|
||||
if (wordCursor != (ziU16 *)0x0) {
|
||||
if (wordCursor) {
|
||||
Zi8SetHighlightedWordW(wordCursor,parameters->language,parameters->subLanguage,workData);
|
||||
}
|
||||
}
|
||||
@@ -1634,8 +1634,7 @@ finishCandidates:
|
||||
countIndex = ((ZiAlphaWork*)workData)->dictionaryCount - 1;
|
||||
}
|
||||
for (; countIndex >= 1; countIndex = countIndex - 1) {
|
||||
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex] =
|
||||
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex] -
|
||||
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex] -=
|
||||
((ZiAlphaWork*)workData)->dictionaryCounts[countIndex - 1];
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -39,10 +39,10 @@ ziU32 Zi8MatchROMdata0(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
}
|
||||
if (mode == 1) acceptPrefix = 0;
|
||||
} else {
|
||||
if (ZI_WORK->unk_0x141E != 0 && graphTable == 0xc &&
|
||||
Zi8GetTableSize(language, ZI_WORK->unk_0x141E, ZI_WORK) != 0) {
|
||||
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->unk_0x141E, ZI_WORK);
|
||||
keyTable = ZI_WORK->unk_0x141E + 1;
|
||||
if (ZI_WORK->graphTableId != 0 && graphTable == 0xc &&
|
||||
Zi8GetTableSize(language, ZI_WORK->graphTableId, ZI_WORK) != 0) {
|
||||
graphData = (ziU8*)Zi8GetTableAddress(language, ZI_WORK->graphTableId, ZI_WORK);
|
||||
keyTable = ZI_WORK->graphTableId + 1;
|
||||
} else {
|
||||
if (Zi8GetTableSize(language, graphTable, ZI_WORK) == 0) {
|
||||
Zi8LogError(0x961, ZI_WORK);
|
||||
@@ -136,7 +136,7 @@ descend:
|
||||
records[context->cnt].node = ZiDAWGGetChild(records[context->cnt - 1].node);
|
||||
if (records[context->cnt].node == (ziU8*)0) goto next_sibling;
|
||||
context->cnt++;
|
||||
if (ZI_WORK->unk_0x141F < context->cnt) ZI_WORK->unk_0x141F = context->cnt;
|
||||
if (ZI_WORK->maxCnt < context->cnt) ZI_WORK->maxCnt = context->cnt;
|
||||
goto update_current;
|
||||
next_sibling:
|
||||
while (context->cnt != 0) {
|
||||
@@ -184,37 +184,36 @@ unsigned int Zi8MatchROMdata1(ziWChar *elements, ziU8 count, ziU8 language, ziWC
|
||||
|
||||
result = 0;
|
||||
if (status == 0) {
|
||||
ZI_WORK->unk_0x1764 = (ziU8*)group;
|
||||
if (ZI_WORK->unk_0x1764 == 0) {
|
||||
ZI_WORK->groupPtr = (ziU8*)group;
|
||||
if (ZI_WORK->groupPtr == 0) {
|
||||
if (Zi8GetTableSize(language & 0xff,0xb,ZI_WORK) != 0) {
|
||||
tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK);
|
||||
ZI_WORK->unk_0x1764 = (ziU8*)tableAddress;
|
||||
ZI_WORK->groupPtr = (ziU8*)(tableAddress = Zi8GetTableAddress(language & 0xff,0xb,ZI_WORK));
|
||||
}
|
||||
}
|
||||
if (ZI_WORK->unk_0x1764 != 0) {
|
||||
for (; (*ZI_WORK->unk_0x1764 != 0xff && ((groupIndex & 0xff) != 0));
|
||||
if (ZI_WORK->groupPtr != 0) {
|
||||
for (; (*ZI_WORK->groupPtr != 0xff && ((groupIndex & 0xff) != 0));
|
||||
groupIndex = groupIndex - 1) {
|
||||
while (*ZI_WORK->unk_0x1764 != 0xff) {
|
||||
ZI_WORK->unk_0x1764 += 2;
|
||||
while (*ZI_WORK->groupPtr != 0xff) {
|
||||
ZI_WORK->groupPtr += 2;
|
||||
}
|
||||
ZI_WORK->unk_0x1764++;
|
||||
ZI_WORK->groupPtr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ZI_WORK->unk_0x1764 == 0) {
|
||||
if (ZI_WORK->groupPtr == 0) {
|
||||
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,capacity & 0xffff,
|
||||
mode & 0xff,status & 0xff,0,1,acceptPrefix,0,&ZI_WORK->dawgCtx,
|
||||
ZI_WORK->unk_0x1760,ZI_WORK);
|
||||
}
|
||||
else {
|
||||
while (*ZI_WORK->unk_0x1764 != 0xff) {
|
||||
while (*ZI_WORK->groupPtr != 0xff) {
|
||||
result = Zi8MatchROMdata0(elements,count,language & 0xff,output,
|
||||
capacity & 0xffff,mode & 0xff,status & 0xff,
|
||||
*ZI_WORK->unk_0x1764,
|
||||
ZI_WORK->unk_0x1764[1],acceptPrefix,0,
|
||||
*ZI_WORK->groupPtr,
|
||||
ZI_WORK->groupPtr[1],acceptPrefix,0,
|
||||
&ZI_WORK->dawgCtx,ZI_WORK->unk_0x1760,ZI_WORK);
|
||||
if ((result & 0xff) != 0) break;
|
||||
ZI_WORK->unk_0x1764 += 2;
|
||||
ZI_WORK->groupPtr += 2;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
@@ -231,31 +230,31 @@ unsigned int Zi8MatchROMdata2(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
if (reservedMode != 0) return 0;
|
||||
if (status == 0) {
|
||||
ZI_WORK->unk_0x1768 = 0;
|
||||
ZI_WORK->unk_0x17EA = 0;
|
||||
ZI_WORK->matchOffset = 0;
|
||||
if (group != 0 && *group == 0xc && language == 10 && ZI_WORK->unk_0x141C != 0) {
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
} else {
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
}
|
||||
}
|
||||
search_segment:
|
||||
ZI_WORK->unk_0x141F = 1;
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
|
||||
count - ZI_WORK->unk_0x17EA, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
ZI_WORK->maxCnt = 1;
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
|
||||
count - ZI_WORK->matchOffset, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
mode, status, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) {
|
||||
for (index = (ziU8)(ZI_WORK->unk_0x17EA + result); index != 0; index--) {
|
||||
for (index = (ziU8)(ZI_WORK->matchOffset + result); index != 0; index--) {
|
||||
output[index - 1] = ZI_WORK->unk_0x17F4[index - 1];
|
||||
}
|
||||
result = (ziU8)(result + ZI_WORK->unk_0x17EA);
|
||||
result = (ziU8)(result + ZI_WORK->matchOffset);
|
||||
} else {
|
||||
if (status != 0 || count == 1) goto finish_segments;
|
||||
if (mode == 1 && ZI_WORK->unk_0x1768 == 0 &&
|
||||
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA,
|
||||
count - ZI_WORK->unk_0x17EA, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
(ziU8)Zi8MatchROMdata1(elements + ZI_WORK->matchOffset,
|
||||
count - ZI_WORK->matchOffset, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
0, status, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK) != 0) goto finish_segments;
|
||||
if ((Zi8GetTableCount(language, 0x1f, ZI_WORK) & 4) == 0) {
|
||||
@@ -263,25 +262,25 @@ search_segment:
|
||||
if (elements[index] == 0xeff1) goto finish_segments;
|
||||
}
|
||||
}
|
||||
if (ZI_WORK->unk_0x141F > capacity) goto finish_segments;
|
||||
for (index = ZI_WORK->unk_0x141F; index != 0; index--) {
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->unk_0x17EA, index, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->unk_0x17EA], capacity,
|
||||
if (ZI_WORK->maxCnt > capacity) goto finish_segments;
|
||||
for (index = ZI_WORK->maxCnt; index != 0; index--) {
|
||||
result = Zi8MatchROMdata1(elements + ZI_WORK->matchOffset, index, language,
|
||||
&ZI_WORK->unk_0x17F4[ZI_WORK->matchOffset], capacity,
|
||||
1, 0, ZI_WORK->unk_0x1768, (char*)group,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) {
|
||||
ZI_WORK->unk_0x17EA += (ziU8)result;
|
||||
if (ZI_WORK->unk_0x17EA == count) return 0;
|
||||
ZI_WORK->matchOffset += (ziU8)result;
|
||||
if (ZI_WORK->matchOffset == count) return 0;
|
||||
ZI_WORK->unk_0x1768++;
|
||||
status = 0;
|
||||
ZI_WORK->unk_0x141E = 0;
|
||||
ZI_WORK->graphTableId = 0;
|
||||
if (ZI_WORK->dawgCtx.key == 0 && language == 10) {
|
||||
for (index = 0; index < ZI_WORK->unk_0x17EA; index++) {
|
||||
for (index = 0; index < ZI_WORK->matchOffset; index++) {
|
||||
switch (ZI_WORK->unk_0x17F4[index]) {
|
||||
case 0x61:
|
||||
case 0x6f:
|
||||
case 0x75:
|
||||
ZI_WORK->unk_0x141E = 0x10;
|
||||
ZI_WORK->graphTableId = 0x10;
|
||||
goto search_segment;
|
||||
}
|
||||
}
|
||||
@@ -307,7 +306,7 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
} else {
|
||||
if (status == 0) {
|
||||
ZI_WORK->unk_0x17EC = 0;
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
|
||||
} else if (ZI_WORK->unk_0x17EC != 0) {
|
||||
Zi8LogError(100, ZI_WORK);
|
||||
goto finish_match;
|
||||
@@ -317,30 +316,30 @@ ziU32 Zi8MatchROMdata(ziWChar* elements, ziU8 count, ziU8 language,
|
||||
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
mode, status, reservedMode, 0, acceptPrefix, ZI_WORK);
|
||||
} else {
|
||||
while (ZI_WORK->unk_0x17F0 != 0) {
|
||||
while (ZI_WORK->dawgGroup != 0) {
|
||||
result = Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
|
||||
mode, status, reservedMode, ZI_WORK->dawgGroup,
|
||||
acceptPrefix, ZI_WORK);
|
||||
if ((ziU8)result != 0) break;
|
||||
status = 0;
|
||||
if (count <= 1 && language == 0x36) break;
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
|
||||
}
|
||||
}
|
||||
if ((ziU8)result == 0 && status == 0 && mode == 1 && count == 1 && capacity >= 1) {
|
||||
mode = 0;
|
||||
ZI_WORK->unk_0x17EC = 1;
|
||||
if (tableSize != 0) {
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(0, language, ZI_WORK);
|
||||
while (ZI_WORK->unk_0x17F0 != 0) {
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(0, language, ZI_WORK);
|
||||
while (ZI_WORK->dawgGroup != 0) {
|
||||
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
mode, status, reservedMode, ZI_WORK->unk_0x17F0,
|
||||
mode, status, reservedMode, ZI_WORK->dawgGroup,
|
||||
acceptPrefix, ZI_WORK) != 0) {
|
||||
*output = *elements;
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
ZI_WORK->unk_0x17F0 = NextDawgGroup(ZI_WORK->unk_0x17F0, language, ZI_WORK);
|
||||
ZI_WORK->dawgGroup = NextDawgGroup(ZI_WORK->dawgGroup, language, ZI_WORK);
|
||||
}
|
||||
} else {
|
||||
if ((ziU8)Zi8MatchROMdata2(elements, count, language, output, capacity,
|
||||
|
||||
@@ -50,11 +50,11 @@ ziBool Zi8ZHsetZYfuzzyPairs(ziFuzzyZYPairs pairs ZI_NEED_WORK) {
|
||||
|
||||
ziBool Zi8SetLatinSearchOrder(ziU8* searchArray, ziU8 searchSize ZI_NEED_WORK) {
|
||||
if (searchArray == 0 || *searchArray == 0) {
|
||||
ZI_WORK->unk_0x1410 = (ziU32)Zi8SOdefaultArray;
|
||||
ZI_WORK->unk_0x1418 = 9;
|
||||
ZI_WORK->formats = (ziU32)Zi8SOdefaultArray;
|
||||
ZI_WORK->formatCount = 9;
|
||||
} else {
|
||||
ZI_WORK->unk_0x1410 = (ziU32)searchArray;
|
||||
ZI_WORK->unk_0x1418 = searchSize;
|
||||
ZI_WORK->formats = (ziU32)searchArray;
|
||||
ZI_WORK->formatCount = searchSize;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -158,13 +158,13 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
length = length - parameters->firstCandidate;
|
||||
if (countOnly != 0) {
|
||||
parameters->letters = length;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
|
||||
parameters->letters = length;
|
||||
if ((parameters->getOptions & 0x80) == 0) {
|
||||
ZI_WORK->unk_0x538 = parameters->language;
|
||||
ZI_WORK->language = parameters->language;
|
||||
parameters->candidates[0] = 0xfff0;
|
||||
output = (ziWChar*)&ZI_WORK->unk_0x338;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
current = signatures.first;
|
||||
length = signatures.length;
|
||||
}
|
||||
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
|
||||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
|
||||
length = parameters->elementCount;
|
||||
@@ -185,7 +185,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
if (parameters->letters == 2) {
|
||||
current = signatures.second;
|
||||
length = secondLength;
|
||||
if (length > ZI_WORK->unk_0x0A) length = ZI_WORK->unk_0x0A;
|
||||
if (length > ZI_WORK->maxWordLength) length = ZI_WORK->maxWordLength;
|
||||
if ((parameters->elementCount < ZI_WORK->unk_0x140C[0] ||
|
||||
(parameters->getOptions & 0x7e) == 2) && length > parameters->elementCount) {
|
||||
length = parameters->elementCount;
|
||||
@@ -194,7 +194,7 @@ static ziBool Zi8AlphaSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED
|
||||
*output++ = 0;
|
||||
}
|
||||
*output++ = 0;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ static ziBool Zi8ZhSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED_WO
|
||||
length = length - parameters->firstCandidate;
|
||||
if (countOnly != 0) {
|
||||
parameters->letters = length;
|
||||
ZI_WORK->unk_0x0A = 0xff;
|
||||
ZI_WORK->maxWordLength = 0xff;
|
||||
return 1;
|
||||
}
|
||||
if (parameters->maxCandidates < length) length = parameters->maxCandidates;
|
||||
@@ -279,13 +279,13 @@ static ziBool Zi8ZhSignature(ziGetParam* parameters, ziBool countOnly ZI_NEED_WO
|
||||
|
||||
ziU8 _Zi8GetCandidates(ziGetParam* parameters ZI_NEED_WORK) {
|
||||
ZiCandidateOptions options = {0};
|
||||
options.capacity = ZI_WORK->unk_0x141A;
|
||||
options.capacity = ZI_WORK->capacity;
|
||||
return Zi8GetCandidatesOrCount(parameters, &options, ZI_WORK);
|
||||
}
|
||||
|
||||
ziU8 _Zi8CheckCandidates(ziGetParam* parameters ZI_NEED_WORK) {
|
||||
ZiCandidateOptions options = {0};
|
||||
options.capacity = ZI_WORK->unk_0x141A;
|
||||
options.capacity = ZI_WORK->capacity;
|
||||
options.flags = 1;
|
||||
return Zi8GetCandidatesOrCount(parameters, &options, ZI_WORK);
|
||||
}
|
||||
@@ -339,11 +339,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
if ((parameters->elementCount == 1) && (parameters->firstCandidate == 0)) {
|
||||
switch (parameters->language) {
|
||||
case 1:
|
||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
|
||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->unk_0x00) {
|
||||
case '\0':
|
||||
if (parameters->elements[0] == 0xEF04) {
|
||||
ZI_WORK->unk_0x01 = options->countOnly;
|
||||
ZI_WORK->countOnly = options->countOnly;
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
}
|
||||
break;
|
||||
@@ -400,11 +400,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
break;
|
||||
case 0x11:
|
||||
default:
|
||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->unk_0x01 == options->countOnly)) {
|
||||
if ((ZI_WORK->unk_0x00 == '\0') || (ZI_WORK->countOnly == options->countOnly)) {
|
||||
switch(ZI_WORK->unk_0x00) {
|
||||
case '\0':
|
||||
if (parameters->elements[0] == 0xEFF2) {
|
||||
ZI_WORK->unk_0x01 = options->countOnly;
|
||||
ZI_WORK->countOnly = options->countOnly;
|
||||
ZI_WORK->unk_0x00 = '\x01';
|
||||
}
|
||||
break;
|
||||
@@ -490,11 +490,11 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
ZI_WORK->unk_0x00 = '\0';
|
||||
}
|
||||
}
|
||||
ZI_WORK->unk_0x18 = parameters->subLanguage;
|
||||
ZI_WORK->unk_0x16 = Zi8GetFormatVersion(1,ZI_WORK) & 2;
|
||||
ZI_WORK->subLanguage = parameters->subLanguage;
|
||||
ZI_WORK->cangjieEnabled = Zi8GetFormatVersion(1,ZI_WORK) & 2;
|
||||
options->maxCount = ZI_WORK->unk_0x10;
|
||||
options->maxWordLength = ZI_WORK->unk_0x0A;
|
||||
ZI_WORK->unk_0x0A = -1;
|
||||
options->maxWordLength = ZI_WORK->maxWordLength;
|
||||
ZI_WORK->maxWordLength = -1;
|
||||
if ((ziU8)Zi8LangSupported(parameters->language,ZI_WORK) == 0) {
|
||||
Zi8LogError(0x163,ZI_WORK);
|
||||
return 0;
|
||||
@@ -558,7 +558,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
}
|
||||
else if ((parameters->language == 1) &&
|
||||
((((parameters->getMode == 7 || (parameters->getMode == 8)) || (parameters->getMode == 10)) || (parameters->getMode == 9)))) {
|
||||
if (ZI_WORK->unk_0x16 != '\0') {
|
||||
if (ZI_WORK->cangjieEnabled != '\0') {
|
||||
candidateCount = Zi8GetChineseCandidates(parameters,options,ZI_WORK);
|
||||
} else {
|
||||
error = 0x708;
|
||||
@@ -582,7 +582,7 @@ ziU32 Zi8GetCandidatesOrCount(ziGetParam* parameters, ZiCandidateOptions* option
|
||||
}
|
||||
}
|
||||
else {
|
||||
ZI_WORK->unk_0x538 = parameters->language;
|
||||
ZI_WORK->language = parameters->language;
|
||||
if ((parameters->getOptions & 0x80) == 0) {
|
||||
saved.restoreCandidates = 1;
|
||||
saved.savedOptions = parameters->getOptions;
|
||||
@@ -711,6 +711,6 @@ void Zi8Memcpy(ziU8* destination, ziU8* source, ziS32 count) {
|
||||
}
|
||||
|
||||
ziBool Zi8SetMaxWordLength(ziU8 length ZI_NEED_WORK) {
|
||||
ZI_WORK->unk_0x0A = length;
|
||||
ZI_WORK->maxWordLength = length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user